* elflink.h (elf_link_input_bfd): Complain about all relocs
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2001-11-15 Alan Modra <amodra@bigpond.net.au>
2
3 * elflink.h (elf_link_input_bfd): Complain about all relocs
4 against local syms from discarded sections. K&R fixes.
5 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
6 K&R fixes.
7
8 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
9
10 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
11 overflows in the .stab section.
12
13 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
14
15 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
16 (bfd_elf64_discard_info): Likewise.
17 * bfd-in2.h: Regenerate.
18 * elf-bfd.h (struct elf_reloc_cookie): New.
19 (struct elf_backend_data): Add elf_backend_discard_info,
20 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
21 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
22 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
23 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
24 (_bfd_elf32_mips_ignore_discarded_relocs): New.
25 (_bfd_elf32_mips_write_section): New.
26 (elf_backend_discard_info): Define.
27 (elf_backend_ignore_discarded_relocs): Define.
28 (elf_backend_write_section): Define.
29 * elfcode.h (elf_bfd_discard_info): Define.
30 (elf_reloc_symbol_deleted_p): Define.
31 * elflink.h (elf_link_input_bfd): Check
32 elf_section_ignore_discarded_relocs. Call
33 bed->elf_backend_write_section if available.
34 (elf_reloc_symbol_deleted_p): New.
35 (elf_bfd_discard_info): New.
36 (elf_section_ignore_discarded_relocs): New.
37 * elfxx-target.h (elf_backend_discard_info): Define.
38 (elf_backend_ignore_discarded_relocs): Define.
39 (elf_backend_write_section): Define.
40 (elfNN_bed): Add elf_backend_discard_info,
41 elf_backend_ignore_discarded_relocs, and
42 elf_backend_write_section.
43 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
44 * libbfd.h: Regenerate.
45 * stabs.c (_bfd_discard_section_stabs): New.
46
47 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
48
49 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
50 scheme to get rid of an ugly complicated test.
51 * elf64-s390.c (elf_s390_relocate_section): Likewise.
52
53 2001-11-14 Andreas Jaeger <aj@suse.de>
54
55 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
56 x86-64 for display.
57
58 2001-11-14 Jakub Jelinek <jakub@redhat.com>
59
60 * dwarf2.c (struct line_head) [total_length]: Change type to
61 bfd_vma.
62 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
63 (struct comp_unit): Add stash and offset_size.
64 (read_8_bytes): Return bfd_vma.
65 (read_indirect_string): New.
66 (read_attribute): Handle DW_FORM_strp.
67 (decode_line_info): Support 64-bit DWARF format.
68 (_bfd_dwarf2_find_nearest_line): Likewise.
69 (parse_comp_unit): Set offset_size and stash.
70
71 2001-11-13 Keith Walker <keith.walker@arm.com>
72
73 * dwarf2.c (read_attribute_value): New function to handle
74 DW_FORM_indirect.
75 (read_attribute): Use it.
76
77 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
78
79 * dwarf2.c (decode_line_info): Properly deal with unknown standard
80 opcodes.
81
82 2001-11-13 John Marshall <jmarshall@acm.org>
83 Alan Modra <amodra@bigpond.net.au>
84
85 * section.c (bfd_make_section_anyway): Don't increment section_id
86 and the BFD's section_count if adding the section failed.
87 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
88 change.
89
90 2001-11-12 Orjan Friberg <orjanf@axis.com>
91
92 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
93 core dump format.
94
95 2001-11-11 H.J. Lu <hjl@gnu.org>
96
97 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
98 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
99
100 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
101 dynstr type to `struct elf_strtab_hash *'.
102
103 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
104
105 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
106 size_t. Rename second i to j.
107
108 Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
109
110 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
111
112 2001-11-10 Alan Modra <amodra@bigpond.net.au>
113
114 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
115 relocs into shared libs.
116 * elf32-cris.c (cris_elf_relocate_section): Likewise.
117 * elf32-i370.c (i370_elf_relocate_section): Likewise.
118 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
119 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
120 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
121 * elf32-sh.c (sh_elf_relocate_section): Likewise.
122 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
123 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
124 * elf64-s390.c (elf_s390_relocate_section): Likewise.
125 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
126 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
127 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
128
129 * elf.c (bfd_section_from_r_symndx): New function.
130 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
131 (struct sym_sec_cache): New.
132 (bfd_section_from_r_symndx): Declare.
133 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
134 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
135 relocs when relocatable. Don't zero entire reloc, just zero the
136 addend and sym.
137 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
138 (elf32_hppa_link_hash_table_create): Init it.
139 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
140 syms on a per-section basis as we do for globals.
141 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
142 (allocate_dynrelocs): Warning fix.
143 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
144 section has been discarded.
145 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
146 into shared libs.
147 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
148 (elf_i386_link_hash_table_create): Init it.
149 (elf_i386_check_relocs): Track dynamic relocs needed for local
150 syms on a per-section basis as we do for globals.
151 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
152 Remove dead code.
153 (allocate_dynrelocs): Warning fix.
154 (elf_i386_size_dynamic_sections): Don't allocate relocs when
155 section has been discarded.
156 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
157 into shared libs.
158 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
159 (elf_s390_link_hash_table_create): Init it.
160 (elf_s390_check_relocs): Track dynamic relocs needed for local
161 syms on a per-section basis as we do for globals.
162 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
163 Remove dead code.
164 (allocate_dynrelocs): Warning fix.
165 (elf_s390_size_dynamic_sections): Don't allocate relocs when
166 section has been discarded.
167 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
168 into shared libs.
169 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
170 (ppc64_link_hash_table_create): Init it.
171 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
172 syms on a per-section basis as we do for globals.
173 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
174 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
175 function. Warning fix.
176 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
177 section has been discarded.
178 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
179 into shared libs.
180 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
181 (elf_s390_link_hash_table_create): Init it.
182 (elf_s390_check_relocs): Track dynamic relocs needed for local
183 syms on a per-section basis as we do for globals.
184 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
185 Remove dead code.
186 (allocate_dynrelocs): Warning fix.
187 (elf_s390_size_dynamic_sections): Don't allocate relocs when
188 section has been discarded.
189 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
190 into shared libs.
191
192 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
193
194 * elf32-s390: Major rework that introduces all recent changes to
195 the s390 backends. Get a closer match to elf32-i386.
196 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
197 Localise vars, and delay setting. Better error reporting, replace
198 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
199 symbol is not defined in the regular object file and tread the weak
200 definition as the normal one. Don't discard relocs for undefweak or
201 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
202 test for avoided copy relocs. Reinstate fudge for unresolved relocs
203 in debugging sections.
204 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
205 reloc processing for weakdefs. Remove redundant casts and aborts.
206 Delay setting of vars until needed. Move creation of dynamic symbols
207 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
208 BFD_ASSERT with abort. Discard .plt entries for everything with
209 plt.refcount <= 0.
210 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
211 .got or .relgot here but do it in allocate_dynrelocs. Reference count
212 possible .plt and .got entries. Don't test input section SEC_READONLY
213 here to try to avoid copy relocs, and keep dyn_relocs regardless of
214 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
215 variables until needed. Remove separate switch stmt for creating .got
216 section. Initialise local_got_refcounts to 0. Cache pointer to
217 "sreloc" section in elf_section_data. Tweak condition under which .got
218 created. Report files with bad relocation section names.
219 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
220 have been forced local. Use same test to decide if we can use a
221 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
222 comment. Move expressions out of function calls. Replace BFD_ASSERT
223 with abort.
224 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
225 statement. Replace BFD_ASSERT with abort.
226 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
227 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
228 instead of looking up section names for DT_TEXTREL. Replace
229 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
230 Add a comment to remind us that one day this ought to be fixed.
231 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
232 (struct elf_s390_link_hash_table): Likewise.
233 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
234 rid of unnecessary casts.
235 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
236 Remove "section" field.
237 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
238 Reference count possible .plt entries. Don't deallocate .got and
239 .relgot space here.
240 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
241 Update comment.
242 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
243 dyn_relocs.
244 (elf_s390_discard_copies): Delete.
245 (elf_s390_link_hash_traverse): Delete.
246 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
247 rather than gc variety).
248 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
249 srelplt, sdynbss, srelbss fields.
250 (elf_s390_link_hash_table_create): Init them.
251 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
252 (allocate_dynrelocs): New function.
253 (create_got_section): New function.
254 (elf_backend_can_refcount): Define.
255 (elf_backend_copy_indirect_symbol): Define.
256 (elf_s390_copy_indirect_symbol): New function.
257 (elf_s390_create_dynamic_sections): New function.
258 (readonly_dynrelocs): New function.
259 * elf64-s390.c: Likewise.
260
261 2001-11-07 Jakub Jelinek <jakub@redhat.com>
262
263 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
264 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
265 (elf-strtab.lo): Add rule.
266 * Makefile.in: Rebuilt.
267 * configure.in (elf): Add elf-strtab.lo.
268 * configure: Rebuilt.
269 * elf-bfd.h (elf_strtab_hash): Forward declare.
270 (struct elf_link_hash_table): Change dynstr type to
271 struct elf_strtab_hash *.
272 (struct elf_obj_tdata): Change strtab_ptr type to
273 struct elf_strtab_hash *.
274 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
275 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
276 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
277 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
278 _bfd_elf_strtab_finalize): New prototypes.
279 * elf-strtab.c: New file.
280 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
281 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
282 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
283 when forcing dynamic symbol to local.
284 (elf_link_create_dynamic_sections): Call
285 _bfd_elf_strtab_init instead of elf_stringtab_init.
286 (elf_link_record_local_dynamic_symbol): Likewise, change
287 dynstr type. Use _bfd_elf_strtab functions instead of
288 _bfd_stringtab calls.
289 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
290 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
291 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
292 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
293 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
294 dynamic symbol to local.
295 (elf_link_assign_sym_version): Likewise.
296 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
297 _bfd_stringtab_emit.
298 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
299 type. Call _bfd_elf_strtab functions instead of
300 _bfd_stringtab functions.
301 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
302 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
303 (elf_fake_sections): Likewise.
304 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
305 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
306 name in the output. Call _bfd_elf_strtab_finalize and
307 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
308 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
309 instead of _bfd_stringtab_size.
310 (prep_headers): Change shstrtab type.
311 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
312
313 2001-11-07 Alan Modra <amodra@bigpond.net.au>
314
315 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
316 bad symtab segfault. Formatting and warning fixes. Improve
317 error message for internationalisation.
318
319 2001-11-06 H.J. Lu (hjl@gnu.org)
320
321 * elflink.h (elf_link_input_bfd): Complain about relocs against
322 discarded sections.
323
324 2001-11-03 Alan Modra <amodra@bigpond.net.au>
325
326 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
327
328 2001-11-02 H.J. Lu <hjl@gnu.org>
329
330 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
331 dynamic relocation for symbols defined in regular objects when
332 creating executables.
333
334 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
335
336 * configure.in (ALL_LINGUAS): Add "fr".
337 * configure: Regenerate.
338 * po/fr.po: New file.
339
340 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
341
342 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
343
344 * som.c (setup_sections): Initialize subspace_sections.
345
346 2001-11-02 H.J. Lu (hjl@gnu.org)
347
348 * coffgen.c (coff_object_p): Return 0 if the header is too big.
349
350 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
351
352 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
353 information. Save bfd arch and mach values. Restore on error.
354
355 2001-11-02 Alan Modra <amodra@bigpond.net.au>
356
357 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
358 (allocate_PIC_calls): New function.
359 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
360 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
361 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
362
363 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
364
365 * elf32-cris.c (cris_elf_grok_prstatus): New function.
366 (cris_elf_grok_psinfo): New function.
367 (elf_backend_grok_prstatus): Define.
368 (elf_backend_grok_psinfo): Define.
369
370 2001-11-01 Alan Modra <amodra@bigpond.net.au>
371
372 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
373 prediction bits.
374
375 2001-10-31 Chris Demetriou <cgd@demetriou.com>
376
377 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
378 relocations properly.
379
380 2001-10-31 H.J. Lu <hjl@gnu.org>
381
382 * elflink.h (elf_link_output_extsym): Don't clear the visibility
383 field for relocateable.
384
385 2001-11-01 Alan Modra <amodra@bigpond.net.au>
386
387 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
388 .plt relocs in DT_RELASZ.
389
390 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
391
392 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
393 targets.
394
395 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
396
397 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
398
399 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
400
401 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
402 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
403 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
404 Regenerate dependencies.
405 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
406 * config.bfd: [BFD64] (mmix-*-*): New case.
407 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
408 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
409 (bfd_mmix_arch): Declare.
410 (bfd_archures_list): Add bfd_mmix_arch.
411 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
412 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
413 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
414 bfd_mmo_mmix_vec.
415 * reloc.c: Add MMIX relocations.
416 * bfd.c (struct _bfd, tdata): Add mmo_data.
417 * Makefile.in: Regenerate.
418 * configure: Regenerate.
419 * libbfd.h: Regenerate.
420 * bfd-in2.h: Regenerate.
421 * configure: Rebuild.
422
423 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
424
425 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
426 p_paddr of the segment that contains it.
427 (copy_private_bfd_data): If the LMA for a segment is known, use it
428 for matching sections to segments.
429 (assign_file_positions_for_segments): Use the LMA when adjusting
430 for inter-section alignment padding.
431
432 2001-10-29 Kazu Hirata <kazu@hxi.com>
433
434 * README: Fix a typo.
435
436 2001-10-24 Richard Henderson <rth@redhat.com>
437
438 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
439 timestamp to time_t for ctime.
440
441 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
442
443 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
444 unsigned, increasing index.
445
446 2001-10-23 H.J. Lu <hjl@gnu.org>
447
448 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
449 m != NULL before accessing it.
450
451 2001-10-23 Alan Modra <amodra@bigpond.net.au>
452
453 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
454 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
455 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
456
457 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
458 (hppa_link_hash_newfunc): Likewise.
459 (elf32_hppa_finish_dynamic_symbol): Likewise.
460 (allocate_dynrelocs): Always allocate .got relocs if shared.
461 (elf32_hppa_relocate_section): Output them too. Similarly
462 consolidate .plt reloc code, and no longer initialise .plt
463 when a reloc is output.
464 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
465 when no reloc is output.
466
467 From Herbert Xu <herbert@gondor.apana.org.au>
468 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
469 unreachable branches.
470
471 2001-10-22 H.J. Lu <hjl@gnu.org>
472
473 * configure.in (WIN32LIBADD): Use -L../libiberty for
474 mips*-*-linux*.
475 * configure: Rebuild.
476
477 2001-10-21 H.J. Lu <hjl@gnu.org>
478
479 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
480 if shared library is enabled only for Linux hosts.
481 * configure: Rebuild.
482
483 2001-10-21 H.J. Lu <hjl@gnu.org>
484
485 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
486 ../libiberty/Makefile instead of $enable_shared.
487 * configure: Rebuild.
488
489 2001-10-21 H.J. Lu <hjl@gnu.org>
490
491 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
492 index 0.
493
494 2001-10-20 H.J. Lu <hjl@gnu.org>
495
496 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
497 if shared library is enabled.
498 * configure: Rebuild.
499
500 2001-10-20 H.J. Lu <hjl@gnu.org>
501
502 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
503
504 2001-10-19 H.J. Lu <hjl@gnu.org>
505
506 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
507 size is empty.
508
509 2001-10-18 H.J. Lu <hjl@gnu.org>
510
511 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
512 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
513
514 2001-10-18 Jakub Jelinek <jakub@redhat.com>
515
516 * section.c (_bfd_strip_section_from_output): Don't count
517 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
518
519 2001-10-17 Alan Modra <amodra@bigpond.net.au>
520
521 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
522 Elf_Internal_Shdr.contents now that it's no longer a PTR.
523 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
524 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
525 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
526 * elf32-sh.c (sh_elf_relax_section): Likewise.
527 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
528 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
529 * elf.c (setup_group): Warning fixes.
530 * elflink.h (elf_link_sort_relocs): Likewise.
531 * pdp11.c (slurp_reloc_table): Likewise.
532
533 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
534
535 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
536 casts.
537
538 2001-10-15 H.J. Lu <hjl@gnu.org>
539
540 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
541 for relocations against discarded link-once section.
542
543 2001-10-15 Alan Modra <amodra@bigpond.net.au>
544
545 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
546 bfd_reloc_outofrange and similar errors.
547
548 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
549 rather than ind->weakdef.
550 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
551 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
552 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
553 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
554 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
555
556 2001-10-15 Alan Modra <amodra@bigpond.net.au>
557 H.J. Lu <hjl@gnu.org>
558
559 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
560 counts for aliases instead of aborting.
561 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
562 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
563
564 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
565 to -1 for non-function symbols.
566 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
567 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
568 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
569 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
570 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
571 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
572 plt.offset instead of plt.refcount when setting to -1.
573
574 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
575
576 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
577 like R_ARM_PC24. Include reloc number in error message about
578 unresolvable relocs.
579
580 2001-10-10 Jakub Jelinek <jakub@redhat.com>
581
582 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
583 relocations against the same symbol in .rel{,a}.dyn section.
584
585 2001-10-10 Kazu Hirata <kazu@hxi.com>
586
587 * aout-encap.c: Fix comment typos.
588 * aoutx.h: Likewise.
589 * archive.c: Likewise.
590 * bout.c: Likewise.
591 * coff64-rs6000.c: Likewise.
592 * coffcode.h: Likewise.
593 * coffgen.c: Likewise.
594 * cofflink.c: Likewise.
595 * coff-mips.c: Likewise.
596 * ecoff.c: Likewise.
597 * elf32-m32r.c: Likewise.
598 * libcoff-in.h: Likewise.
599 * libecoff.h: Likewise.
600 * libxcoff.h: Likewise.
601 * nlm32-i386.c: Likewise.
602 * pdp11.c: Likewise.
603 * section.c: Likewise.
604 * som.c: Likewise.
605 * som.h: Likewise.
606 * bfd-in2.h: Regenerate.
607 * libcoff.h: Likewise.
608
609 2001-10-10 Alan Modra <amodra@bigpond.net.au>
610
611 * elf.c (elf_map_symbols): Don't create new section symbols; Use
612 existing section syms. Update comments.
613 (copy_private_bfd_data): Formatting fixes.
614 (elfcore_grok_win32pstatus): Likewise.
615 (swap_out_syms): Likewise. Remove unnecessary level of braces.
616
617 2001-10-09 Alan Modra <amodra@bigpond.net.au>
618
619 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
620 "group_name".
621 (elf_group_name): Define.
622 (elf_next_in_group): Define.
623 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
624 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
625 first member section; Instead use elf_next_in_group.
626 (bfd_section_from_shdr): Likewise.
627 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
628
629 2001-10-09 Alan Modra <amodra@bigpond.net.au>
630
631 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
632 "next_in_group". Fix gp and gp_size comments.
633 * elf.c (union elf_internal_group): New.
634 (setup_group): New function.
635 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
636 Call setup_group for SHF_GROUP sections.
637 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
638 (elf_fake_sections): Set header type for SEC_GROUP, and header
639 flags for sections in a group.
640 (set_group_contents): New function.
641 (_bfd_elf_compute_section_file_positions): Call it.
642 (assign_section_numbers): Set sh_link for SHT_GROUP.
643
644 * elflink.h (gc_mark_hook): Handle section groups.
645 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
646 * section.c (SEC_GROUP): Define.
647 (struct sec): Comment fixes.
648 * bfd-in2.h: Regenerate.
649
650 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
651 out of function args.
652 (_bfd_elf_canonicalize_reloc): Similarly.
653 (_bfd_elf_get_symtab): Here too.
654 (_bfd_elf_canonicalize_dynamic_symtab): And here.
655 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
656 bfd_bread, and remove unnecessary cast.
657
658 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
659
660 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
661
662 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
663
664 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
665 compilation unit.
666
667 2001-10-06 Alan Modra <amodra@bigpond.net.au>
668
669 * bfd.c (bfd_assert): Report bfd version.
670 (_bfd_abort): Likewise.
671
672 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
673 section sym values. Instead replace any relocs against them with
674 relocs against STN_UNDEF, which has a zero value.
675
676 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
677 relocs.
678
679 2001-10-05 Jeff Law <law@redhat.com>
680
681 * som.h (som_exec_data): New field "version_id".
682 * som.c (som_object_setup): Record the version_id if it
683 exists.
684 (som_prep_headers): Do not initialize version_id here.
685 (som_finish_writing): Initialize version_id here.
686
687 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
688
689 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
690 according to the MIPS/SGI ELF64 ABI Draft.
691 (mips_elf_sort_hash_table): Typo.
692
693 2001-10-04 Alan Modra <amodra@bigpond.net.au>
694
695 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
696
697 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
698 copying flags if this is a weakdef.
699
700 2001-10-04 Alan Modra <amodra@bigpond.net.au>
701
702 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
703 packing.
704
705 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
706 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
707 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
708
709 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
710 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
711 backends we configure. Run "make dep-am".
712 (install-data-local): Install symcat.h.
713 * dep-in.sed: Remove symcat.h from dependencies.
714 * Makefile.in: Regenerate.
715
716 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
717
718 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
719
720 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
721
722 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
723 (elf_backend_default_use_rela_p): New define.
724
725 2001-10-03 Alan Modra <amodra@bigpond.net.au>
726
727 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
728 change.
729
730 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
731 * configure: Regenerate.
732 * Makefile.am (BFD_H_FILES): Add version.h.
733 * Makefile.in: Regenerate.
734 * po/SRC-POTFILES.in: Regenerate.
735
736 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
737 elf_backend_copy_indirect_symbol so that backend has a chance to
738 copy other necessary fields.
739 * elf-bfd.h (struct elf_backend_data): Update description of
740 elf_backend_copy_indirect_symbol.
741 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
742 copying flags if this is a weakdef.
743 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
744 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
745 than bfd_link_hash_lookup.
746 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
747 reloc processing for weakdefs.
748 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
749 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
750
751 2001-10-02 Alan Modra <amodra@bigpond.net.au>
752
753 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
754 result of ELF64_R_TYPE to enum before using in a switch.
755 (ppc64_elf_gc_mark_hook): Likewise.
756 (ppc64_elf_gc_sweep_hook): Likewise.
757 (ppc64_elf_reloc_type_class): Likewise.
758
759 2001-10-02 Alan Modra <amodra@bigpond.net.au>
760
761 * version.h: New file.
762 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
763 (BFD_VERSION_DATE): Define.
764 (BFD_VERSION_STRING): Define.
765 * configure.in: AC_SUBST bfd_version, bfd_version_date and
766 bfd_version_string.
767 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
768 * bfd-in2.h: Regenerate.
769 * configure: Regenerate.
770 * Makefile.am: Run "make dep-am".
771 * Makefile.in: Regenerate.
772
773 * bfd-in.h: Include "symcat.h".
774 (CONCAT4): Redefine as for old CAT4.
775 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
776 Add warning regarding whitespace.
777 * aout-cris.c: Likewise.
778 * aout-ns32k.c: Likewise.
779 * aout-sparcle.c: Likewise.
780 * aout-tic30.c: Likewise.
781 * aout0.c: Likewise.
782 * armnetbsd.c: Likewise.
783 * demo64.c: Likewise.
784 * elf-bfd.h: Likewise.
785 * gen-aout.c: Likewise.
786 * host-aout.c: Likewise.
787 * hp300bsd.c: Likewise.
788 * hp300hpux.c: Likewise.
789 * i386aout.c: Likewise.
790 * i386bsd.c: Likewise.
791 * i386dynix.c: Likewise.
792 * i386freebsd.c: Likewise.
793 * i386linux.c: Likewise.
794 * i386lynx.c: Likewise.
795 * i386mach3.c: Likewise.
796 * i386netbsd.c: Likewise.
797 * libaout.h: Likewise.
798 * m68k4knetbsd.c: Likewise.
799 * m68klinux.c: Likewise.
800 * m68klynx.c: Likewise.
801 * m68knetbsd.c: Likewise.
802 * m88kmach3.c: Likewise.
803 * mipsbsd.c: Likewise.
804 * newsos3.c: Likewise.
805 * ns32knetbsd.c: Likewise.
806 * pc532-mach.c: Likewise.
807 * pdp11.c: Likewise.
808 * riscix.c: Likewise.
809 * sparclinux.c: Likewise.
810 * sparclynx.c: Likewise.
811 * sparcnetbsd.c: Likewise.
812 * sunos.c: Likewise.
813 * targets.c: Likewise.
814 * vaxnetbsd.c: Likewise.
815 * vms-hdr.c: Likewise.
816
817 2001-10-01 Alan Modra <amodra@bigpond.net.au>
818
819 * bfd-in.h: Remove comments regarding generated files.
820 * libbfd-in.h: Likewise.
821 * libcoff-in.h: Likewise.
822 * bfd-in2.h: Regenerate.
823 * libbfd.h: Likewise.
824 * libcoff.h: Likewise.
825
826 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
827 Hans-Peter Nilsson <hp@bitrange.com>
828
829 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
830 partial_inplace, matching assembler output. Set src_mask to
831 all ones.
832 (sh_elf_relocate_section): Delete misplaced comment.
833 For relocatable linking against section symbol, call
834 _bfd_relocate_contents for partial_inplace relocs and adjust
835 rel->r_addend for others.
836 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
837 bfd_get_32, not at rel->r_addend.
838
839 2001-09-30 Alan Modra <amodra@bigpond.net.au>
840
841 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
842 the old dir refcount, so we indirectly set them to init_refcount.
843 Short-circuit asserts when we've just verified they are true.
844
845 2001-09-29 Alan Modra <amodra@bigpond.net.au>
846
847 * section.c (struct sec): Remove kept_section.
848 (STD_SECTION): Remove kept_section initialisation.
849 (bfd_make_section_anyway): Here too.
850 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
851 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
852 * elflink.h (elf_link_input_bfd): Set discarded link-once section
853 symbols to zero, and remove all code involved with kept_section
854 and tracking section symbol values.
855 * bfd-in2.h: Regenerate.
856 * configure.in: Bump version number.
857 * configure: Regenerate.
858
859 2001-09-29 Alan Modra <amodra@bigpond.net.au>
860
861 * elf64-ppc.c (struct ppc_dyn_relocs): New.
862 (IS_ABSOLUTE_RELOC): Define.
863 (struct ppc_link_hash_entry): New.
864 (struct ppc_link_hash_table): New.
865 (ppc_hash_table): Define.
866 (link_hash_newfunc): New function.
867 (ppc64_elf_link_hash_table_create): New function.
868 (create_got_section): New function.
869 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
870 pointers to our dynamic sections in hash table.
871 (ppc64_elf_copy_indirect_symbol): New function.
872 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
873 dynamic sections. Localise vars. Modify code for refcounts
874 starting from zero. Don't allocate here, or force symbols dynamic.
875 Don't copy all relocs if shared, select ones we need. Add code
876 to track possible copy relocs for non-shared link.
877 (ppc64_elf_gc_mark_hook): Update comment.
878 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
879 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
880 code for reference counting garbage collection. Don't create .plt
881 entries for functions that don't comply with ABI naming convention,
882 and don't allocate .plt space here. Use short-cuts to dynamic
883 sections. If possible, keep dynamic relocations instead of using
884 copy relocs. Remove confused comments.
885 (ppc_adjust_dynindx): Delete.
886 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
887 (allocate_dynrelocs): New function.
888 (readonly_dynrelocs): New function.
889 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
890 space here, and call allocate_dynrelocs to allocate space for
891 global .plt, .got and reloc sections. Use short-cuts to dynamic
892 sections. Call readonly_dynrelocs to determine whether we need
893 DT_TEXTREL. Don't generate section symbols here, the generic
894 ELF linker code does it for us.
895 (ppc64_elf_final_link): Call regular ELF backend linker rather than
896 gc variety, since we do our own .got handling.
897 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
898 dynamic section short-cuts. Localise vars, and delay setting.
899 Handle unknown relocs in main switch statement. Replace ugly
900 complicated tests for unresolvable relocs with a simple direct
901 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
902 before allowing an undefined sym in a shared lib. Do R_*_DS tests
903 after main switch, when we've set addend. Do non-addend insn
904 tweaks before main swithc. Ignore input_section->vma when
905 calculating reloc offsets as it's always zero. Rewrite dynamic
906 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
907 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
908 of dynamic section short-cuts. Reorganise .plt handling code.
909 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
910 Move expressions out of swap_reloca_out function calls.
911 (ppc64_elf_reloc_type_class): New function.
912 (ppc64_elf_info_to_howto): Move common expression to local var.
913 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
914 of dynamic section short-cuts. Don't fiddle with section syms
915 here as the ELF linker does it for us.
916 (elf_backend_can_refcount): Define.
917 (bfd_elf64_bfd_link_hash_table_create): Define.
918 (elf_backend_copy_indirect_symbol): Define.
919 (elf_backend_reloc_type_class): Define.
920 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
921
922 2001-09-29 Alan Modra <amodra@bigpond.net.au>
923
924 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
925 (struct elf_backend_data): Add can_refcount.
926 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
927 got.refcount and plt.refcount from init_refcount.
928 (_bfd_elf_link_hash_table_init): Set up init_refcount.
929 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
930 rather than got/plt.offset, and test for <= 0 rather than -1.
931 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
932 * elfxx-target.h (elf_backend_can_refcount): Define.
933 (elfNN_bed): Init can_refcount.
934 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
935 (_bfd_generic_link_hash_newfunc): Likewise.
936 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
937 starting from zero.
938 (elf_backend_can_refcount): Define.
939 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
940 starting from zero.
941 (elf32_hppa_copy_indirect_symbol): Make static to agree with
942 prototype.
943 (elf_backend_can_refcount): Define.
944 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
945 starting from zero.
946 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
947 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
948 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
949 (elf_backend_can_refcount): Define.
950 (elf_i386_copy_indirect_symbol): Make static to agree with
951 prototype. Formatting fix.
952 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
953 starting from zero.
954 (elf_backend_can_refcount): Define.
955 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
956 starting from zero.
957 (elf_backend_can_refcount): Define.
958 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
959 starting from zero.
960 (elf_backend_can_refcount): Define.
961 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
962 starting from zero.
963 (elf_backend_can_refcount): Define.
964 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
965 starting from zero.
966 (elf_backend_can_refcount): Define.
967
968 * som.c (som_write_symbol_strings): Cast current_offset in
969 bfd_seek call to match param type.
970
971 2001-09-28 J. Brobecker <brobecker@gnat.com>
972
973 * som.c (som_write_symbol_strings): Fix incorrect type of
974 current_offset to match the function definition. Fixes a build
975 failure on HPUX-11.00.
976
977 2001-09-28 Richard Henderson <rth@redhat.com>
978
979 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
980 SEC_MERGE, SEC_STRINGS.
981
982 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
983 * bfd-in2.h: Rebuild.
984
985 2001-09-28 Alan Modra <amodra@bigpond.net.au>
986
987 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
988 reloc code using x86_64_reloc_map.
989
990 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
991 no longer allocate here. Localise some vars to blocks where they
992 are used.
993 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
994 setting of vars until needed.
995 (allocate_dynrelocs): Don't create a .plt entry without a reloc
996 when symbol visibilty makes a function local.
997 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
998 swap_reloca_out function calls.
999 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1000 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1001 switch statement.
1002
1003 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1004 no longer allocate here. Localise some vars to blocks where they
1005 are used. Remove separate switch stmt for creating .got sec.
1006 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1007 redundant casts and aborts. Delay setting of vars until needed.
1008 (allocate_dynrelocs): Remove redundant casts and aborts.
1009 (elf_i386_size_dynamic_sections): Move comment.
1010 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1011 calls.
1012 (elf_i386_relocate_section): Likewise. Comment typo fix.
1013 (elf_i386_finish_dynamic_sections): Migrate common code out of
1014 switch statement.
1015 (elf_backend_* defines): Sort.
1016
1017 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1018 without a reloc when symbol visibilty makes a function local.
1019
1020 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1021
1022 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1023 conflicting float flags.
1024
1025 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1026
1027 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1028 (elf_backend_copy_indirect_symbol): Define.
1029 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1030 (struct elf_i386_link_hash_table): Likewise.
1031 (link_hash_newfunc): Get rid of unnecessary casts.
1032 (elf_i386_link_hash_table_create): Likewise.
1033 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1034 Don't test input section SEC_READONLY here to try to avoid copy
1035 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1036 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1037 here to properly test whether we need copy relocs. Do so for weak
1038 syms too.
1039
1040 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1041 (elf_backend_copy_indirect_symbol): Define.
1042 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1043 (stub_hash_newfunc): Get rid of unnecessary casts.
1044 (hppa_link_hash_newfunc): Likewise.
1045 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1046 Don't test input section SEC_READONLY here to try to avoid copy
1047 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1048 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1049 here to properly test whether we need copy relocs. Do so for weak
1050 syms too.
1051
1052 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1053
1054 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1055 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1056 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1057
1058 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1059
1060 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1061 computation.
1062
1063 2001-09-25 H.J. Lu <hjl@gnu.org>
1064
1065 * bfd-in2.h: Regenerated.
1066
1067 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1068
1069 * elf32-i386.c: Add comment re linker function names and ordering.
1070 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1071 (elf_i386_grok_prstatus): Move before linker functions.
1072 (elf_i386_grok_psinfo): Likewise.
1073 (elf_i386_fake_sections): Move so that functions are ordered.
1074 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1075
1076 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1077
1078 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1079 throughout file.
1080
1081 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1082 code handling this option.
1083 (LONG_BRANCH_VIA_PLT): Likewise.
1084 (RELATIVE_DYNRELOCS): Define as zero.
1085 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1086 "pc_count" fields. Remove "section" field.
1087 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1088 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1089 relocs here. Instead, record all needed dynamic relocs via
1090 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1091 in elf_section_data.
1092 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1093 (allocate_plt_and_got_and_discard_relocs): Rename to
1094 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1095 (readonly_dynrelocs): New function.
1096 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1097 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1098 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1099 (elf32_hppa_relocate_section): Make use of cached sreloc.
1100 (elf32_hppa_reloc_type_class): New function.
1101 (elf_backend_reloc_type_class): Define.
1102
1103 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1104
1105 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1106 and "sreloc" fields.
1107 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1108 "pc_count" fields. Remove "section" field.
1109 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1110 allocate space for dynamic relocs here. Instead, record all
1111 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1112 pointer to "sreloc" section in elf_section_data.
1113 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1114 (allocate_plt_and_got_and_discard_relocs): Rename to
1115 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1116 (readonly_dynrelocs): New function.
1117 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1118 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1119 (elf_i386_relocate_section): Make use of cached sreloc.
1120
1121 2001-09-24 Alan Modra <amodra@bigpond.net.au>
1122
1123 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1124 reloc rather than just the type.
1125 (_bfd_elf_reloc_type_class): Likewise.
1126 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1127 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1128 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1129 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1130 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1131 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1132 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1133 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1134 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1135 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1136 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1137 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1138 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1139 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1140 * elflink.h: Formatting fixes.
1141 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1142 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1143 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1144
1145 2001-09-22 John Reiser <jreiser@BitWagon.com>
1146
1147 * elfcode.h (elf_object_p): Allow for no section header at all in
1148 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1149
1150 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1151
1152 * elfxx-ia64.c: Fix compile time warning messages.
1153 * coff-mcore.c: Fix compile time warning messages.
1154 * coff-ppc.c: Fix compile time warning messages.
1155 * coffcode.h: Fix compile time warning messages.
1156 * elf32-mips.c: Fix compile time warning messages.
1157 * elf64-alpha.c: Fix compile time warning messages.
1158 * libbfd.c: Fix compile time warning messages.
1159 * bfd-in2.h: Regenerate.
1160
1161 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1162
1163 * Makefile.am: Run "make dep-am".
1164 * Makefile.in: Regenerate.
1165
1166 * aoutx.h: Formatting fixes.
1167 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1168
1169 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1170 in error message.
1171
1172 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1173
1174 * bfd.c (bfd_archive_filename): New function.
1175 * bfd-in2.h: Regenerate.
1176 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1177 in error messages where the bfd is an input bfd.
1178 * aout-cris.c: Likewise.
1179 * coff-arm.c: Likewise.
1180 * coff-mcore.c: Likewise.
1181 * coff-ppc.c: Likewise.
1182 * coff-rs6000.c: Likewise.
1183 * coff-sh.c: Likewise.
1184 * coff-tic54x.c: Likewise.
1185 * coff-tic80.c: Likewise.
1186 * coff64-rs6000.c: Likewise.
1187 * coffcode.h: Likewise.
1188 * coffgen.c: Likewise.
1189 * cofflink.c: Likewise.
1190 * ecofflink.c: Likewise.
1191 * elf-hppa.h: Likewise.
1192 * elf.c: Likewise.
1193 * elf32-arm.h: Likewise.
1194 * elf32-cris.c: Likewise.
1195 * elf32-gen.c: Likewise.
1196 * elf32-hppa.c: Likewise.
1197 * elf32-i370.c: Likewise.
1198 * elf32-i386.c: Likewise.
1199 * elf32-m32r.c: Likewise.
1200 * elf32-mcore.c: Likewise.
1201 * elf32-mips.c: Likewise.
1202 * elf32-ppc.c: Likewise.
1203 * elf32-s390.c: Likewise.
1204 * elf32-sh.c: Likewise.
1205 * elf32-sparc.c: Likewise.
1206 * elf32-v850.c: Likewise.
1207 * elf64-alpha.c: Likewise.
1208 * elf64-gen.c: Likewise.
1209 * elf64-ppc.c: Likewise.
1210 * elf64-s390.c: Likewise.
1211 * elf64-sparc.c: Likewise.
1212 * elf64-x86-64.c: Likewise.
1213 * elflink.h: Likewise.
1214 * elfxx-ia64.c: Likewise.
1215 * ieee.c: Likewise.
1216 * ihex.c: Likewise.
1217 * libbfd.c: Likewise.
1218 * pdp11.c: Likewise.
1219 * pe-mips.c: Likewise.
1220 * peicode.h: Likewise.
1221 * srec.c: Likewise.
1222 * xcofflink.c: Likewise.
1223
1224 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1225
1226 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1227 error message.
1228
1229 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1230 error message.
1231
1232 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1233 Consolidate error messages, and split long messages to two lines.
1234
1235 2001-09-20 John Reiser <jreiser@BitWagon.com>
1236
1237 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1238 and info->allow_shlib_undefined.
1239 * elf32-cris.c: Likewise.
1240 * elf32-hppa.c: Likewise.
1241 * elf32-m68k.c: Likewise.
1242 * elf32-mips.c: Likewise.
1243 * elf32-ppc.c: Likewise.
1244 * elf32-s390.c: Likewise.
1245 * elf32-sh.c: Likewise.
1246 * elf32-sparc.c: Likewise.
1247 * elf64-alpha.c: Likewise.
1248 * elf64-hppa.c: Likewise.
1249 * elf64-ppc.c: Likewise.
1250 * elf64-s390.c: Likewise.
1251 * elf64-sparc.c: Likewise.
1252 * elf64-x86-64.c: Likewise.
1253 * elfxx-ia64.c: Likewise.
1254
1255 2001-09-18 Bruno Haible <haible@clisp.cons.org>
1256
1257 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1258 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1259 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1260 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1261 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1262 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1263 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1264 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1265 isxdigit/isdigit/islower.
1266 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1267 (mangle_name): Use ISALNUM instead of isalnum.
1268 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1269 (scan): Use ISDIGIT instead of isdigit.
1270 * hosts/alphavms.h: Don't include <ctype.h>.
1271 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1272 (ieee_object_p): Use TOUPPER instead of toupper.
1273 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1274 (ihex_bad_byte): Use ISPRINT instead of isprint.
1275 * merge.c: Don't include <ctype.h>.
1276 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1277 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1278 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1279 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1280 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1281 (mangle_name): Use ISALNUM instead of isalnum.
1282 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1283 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1284 isupper/islower/isdigit.
1285 (som_decode_symclass): Use TOUPPER instead of toupper.
1286 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1287 (srec_bad_byte): Use ISPRINT instead of isprint.
1288 (srec_scan): Use ISSPACE instead of isspace.
1289 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1290 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1291 * syms.c: Include "safe-ctype.h"
1292 (islower, toupper): Remove macro definitions.
1293 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1294 * vms-gsd.c: Don't include <ctype.h>.
1295 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1296 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1297 islower/toupper.
1298 * vms-tir.c: Don't include <ctype.h>.
1299
1300 2001-09-18 Alan Modra <amodra@bigpond.net.au>
1301
1302 * libbfd.c (bfd_bread): New function replacing bfd_read without
1303 redundant params. Allow reads up to (size_t) -2 in length.
1304 (bfd_bwrite): Similarly for bfd_write.
1305 (real_read): Return a size_t.
1306 (bfd_read): Call bfd_bread.
1307 (bfd_write): Call bfd_bwrite.
1308 (warn_deprecated): New function to annoy everybody.
1309 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1310 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1311 (bfd_read, bfd_write): Define as macro.
1312 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1313 likewise for bfd_write. Ensure function args are correct size by
1314 using casts or local vars. In some cases, remove unnecessary
1315 casts. Formatting fixes, in some cases removing a large expression
1316 from function args by using a local var. Replace CONST with const.
1317 Modify variable types to avoid warings. Use casts to avoid
1318 warnings when using negative numbers in unsigned expressions.
1319 * aout-adobe.c: Likewise.
1320 * aout-arm.c: Likewise.
1321 * aout-cris.c: Likewise.
1322 * aout-encap.c: Likewise.
1323 * aout-ns32k.c: Likewise.
1324 * aout-target.h: Likewise.
1325 * aout-tic30.c: Likewise.
1326 * aoutf1.h: Likewise.
1327 * aoutx.h: Likewise.
1328 * archive.c: Likewise.
1329 * archures.c: Likewise.
1330 * bfd-in.h: Likewise.
1331 * bfd.c: Likewise.
1332 * binary.c: Likewise.
1333 * bout.c: Likewise.
1334 * cache.c: Likewise.
1335 * cisco-core.c: Likewise.
1336 * coff-a29k.c: Likewise.
1337 * coff-alpha.c: Likewise.
1338 * coff-arm.c: Likewise.
1339 * coff-h8300.c: Likewise.
1340 * coff-h8500.c: Likewise.
1341 * coff-i386.c: Likewise.
1342 * coff-i860.c: Likewise.
1343 * coff-i960.c: Likewise.
1344 * coff-ia64.c: Likewise.
1345 * coff-m68k.c: Likewise.
1346 * coff-m88k.c: Likewise.
1347 * coff-mcore.c: Likewise.
1348 * coff-mips.c: Likewise.
1349 * coff-ppc.c: Likewise.
1350 * coff-rs6000.c: Likewise.
1351 * coff-sh.c: Likewise.
1352 * coff-sparc.c: Likewise.
1353 * coff-stgo32.c: Likewise.
1354 * coff-tic30.c: Likewise.
1355 * coff-tic54x.c: Likewise.
1356 * coff-tic80.c: Likewise.
1357 * coff-w65.c: Likewise.
1358 * coff-z8k.c: Likewise.
1359 * coff64-rs6000.c: Likewise.
1360 * coffcode.h: Likewise.
1361 * coffgen.c: Likewise.
1362 * cofflink.c: Likewise.
1363 * coffswap.h: Likewise.
1364 * corefile.c: Likewise.
1365 * cpu-arc.c: Likewise.
1366 * cpu-h8300.c: Likewise.
1367 * cpu-h8500.c: Likewise.
1368 * cpu-i960.c: Likewise.
1369 * cpu-ia64-opc.c: Likewise.
1370 * cpu-ns32k.c: Likewise.
1371 * cpu-pdp11.c: Likewise.
1372 * cpu-pj.c: Likewise.
1373 * cpu-sh.c: Likewise.
1374 * cpu-w65.c: Likewise.
1375 * cpu-z8k.c: Likewise.
1376 * dwarf1.c: Likewise.
1377 * dwarf2.c: Likewise.
1378 * ecoff.c: Likewise.
1379 * ecofflink.c: Likewise.
1380 * ecoffswap.h: Likewise.
1381 * elf-bfd.h: Likewise.
1382 * elf-hppa.h: Likewise.
1383 * elf-m10200.c: Likewise.
1384 * elf-m10300.c: Likewise.
1385 * elf.c: Likewise.
1386 * elf32-arc.c: Likewise.
1387 * elf32-arm.h: Likewise.
1388 * elf32-avr.c: Likewise.
1389 * elf32-cris.c: Likewise.
1390 * elf32-fr30.c: Likewise.
1391 * elf32-gen.c: Likewise.
1392 * elf32-h8300.c: Likewise.
1393 * elf32-hppa.c: Likewise.
1394 * elf32-i370.c: Likewise.
1395 * elf32-i386.c: Likewise.
1396 * elf32-i860.c: Likewise.
1397 * elf32-m32r.c: Likewise.
1398 * elf32-m68k.c: Likewise.
1399 * elf32-mcore.c: Likewise.
1400 * elf32-mips.c: Likewise.
1401 * elf32-openrisc.c: Likewise.
1402 * elf32-pj.c: Likewise.
1403 * elf32-ppc.c: Likewise.
1404 * elf32-s390.c: Likewise.
1405 * elf32-sh-lin.c: Likewise.
1406 * elf32-sh.c: Likewise.
1407 * elf32-sparc.c: Likewise.
1408 * elf32-v850.c: Likewise.
1409 * elf64-alpha.c: Likewise.
1410 * elf64-hppa.c: Likewise.
1411 * elf64-mips.c: Likewise.
1412 * elf64-ppc.c: Likewise.
1413 * elf64-s390.c: Likewise.
1414 * elf64-sparc.c: Likewise.
1415 * elf64-x86-64.c: Likewise.
1416 * elfarm-nabi.c: Likewise.
1417 * elfcode.h: Likewise.
1418 * elfcore.h: Likewise.
1419 * elflink.c: Likewise.
1420 * elflink.h: Likewise.
1421 * elfxx-ia64.c: Likewise.
1422 * elfxx-target.h: Likewise.
1423 * format.c: Likewise.
1424 * hash.c: Likewise.
1425 * hp300hpux.c: Likewise.
1426 * hppabsd-core.c: Likewise.
1427 * hpux-core.c: Likewise.
1428 * i386aout.c: Likewise.
1429 * i386dynix.c: Likewise.
1430 * i386linux.c: Likewise.
1431 * i386lynx.c: Likewise.
1432 * i386mach3.c: Likewise.
1433 * i386msdos.c: Likewise.
1434 * i386os9k.c: Likewise.
1435 * ieee.c: Likewise.
1436 * ihex.c: Likewise.
1437 * irix-core.c: Likewise.
1438 * libaout.h: Likewise.
1439 * libbfd-in.h: Likewise.
1440 * libbfd.c: Likewise.
1441 * libcoff-in.h: Likewise.
1442 * libecoff.h: Likewise.
1443 * libieee.h: Likewise.
1444 * libnlm.h: Likewise.
1445 * libpei.h: Likewise.
1446 * libxcoff.h: Likewise.
1447 * linker.c: Likewise.
1448 * lynx-core.c: Likewise.
1449 * m68klinux.c: Likewise.
1450 * merge.c: Likewise.
1451 * mipsbsd.c: Likewise.
1452 * netbsd-core.c: Likewise.
1453 * nlm.c: Likewise.
1454 * nlm32-alpha.c: Likewise.
1455 * nlm32-i386.c: Likewise.
1456 * nlm32-ppc.c: Likewise.
1457 * nlm32-sparc.c: Likewise.
1458 * nlmcode.h: Likewise.
1459 * nlmswap.h: Likewise.
1460 * ns32k.h: Likewise.
1461 * oasys.c: Likewise.
1462 * opncls.c: Likewise.
1463 * osf-core.c: Likewise.
1464 * pc532-mach.c: Likewise.
1465 * pdp11.c: Likewise.
1466 * pe-mips.c: Likewise.
1467 * peXXigen.c: Likewise.
1468 * peicode.h: Likewise.
1469 * ppcboot.c: Likewise.
1470 * ptrace-core.c: Likewise.
1471 * reloc.c: Likewise.
1472 * reloc16.c: Likewise.
1473 * riscix.c: Likewise.
1474 * rs6000-core.c: Likewise.
1475 * sco5-core.c: Likewise.
1476 * section.c: Likewise.
1477 * som.c: Likewise.
1478 * sparclinux.c: Likewise.
1479 * sparclynx.c: Likewise.
1480 * srec.c: Likewise.
1481 * stabs.c: Likewise.
1482 * sunos.c: Likewise.
1483 * syms.c: Likewise.
1484 * targets.c: Likewise.
1485 * tekhex.c: Likewise.
1486 * trad-core.c: Likewise.
1487 * versados.c: Likewise.
1488 * vms-gsd.c: Likewise.
1489 * vms-hdr.c: Likewise.
1490 * vms-misc.c: Likewise.
1491 * vms-tir.c: Likewise.
1492 * vms.c: Likewise.
1493 * vms.h: Likewise.
1494 * xcofflink.c: Likewise.
1495 * bfd-in2.h: Regenerate.
1496 * libbfd.h: Regenerate.
1497 * libcoff.h: Regenerate.
1498
1499 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1500 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1501 (ufile_ptr): Define.
1502 (bfd_tell): Return a ufile_ptr.
1503 * libbfd.c (bfd_tell): Likewise.
1504 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1505 unnecessarily.
1506 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1507 * aoutf1.h: Likewise.
1508 * som.c: Likewise.
1509 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1510 larger than unsigned long can represent.
1511
1512 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1513 size overflows size_t.
1514 (bfd_realloc): Likewise.
1515 (bfd_zmalloc): Likewise.
1516 * opncls.c (bfd_alloc): Likewise.
1517 (bfd_zalloc): Likewise.
1518 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1519 (bfd_alloc, bfd_zalloc): Update.
1520
1521 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1522 8 bits.
1523 (bfd_get_signed_8): Likewise.
1524 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1525 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1526 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1527 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1528 * libaout.h: Likewise define and use here.
1529 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1530 * aout-arm.c: Likewise.
1531 * aout-encap.c: Likewise.
1532 * aout-ns32k.c: Likewise.
1533 * aout-tic30.c: Likewise.
1534 * aoutf1.h: Likewise.
1535 * aoutx.h: Likewise.
1536 * bout.c: Likewise.
1537 * coff-alpha.c: Likewise.
1538 * coff-h8300.c: Likewise.
1539 * coff-h8500.c: Likewise.
1540 * coff-i960.c: Likewise.
1541 * coff-ia64.c: Likewise.
1542 * coff-m88k.c: Likewise.
1543 * coff-mips.c: Likewise.
1544 * coff-ppc.c: Likewise.
1545 * coff-rs6000.c: Likewise.
1546 * coff-sh.c: Likewise.
1547 * coff-sparc.c: Likewise.
1548 * coff-stgo32.c: Likewise.
1549 * coff-tic30.c: Likewise.
1550 * coff-tic80.c: Likewise.
1551 * coff-w65.c: Likewise.
1552 * coff-z8k.c: Likewise.
1553 * coff64-rs6000.c: Likewise.
1554 * coffgen.c: Likewise.
1555 * cofflink.c: Likewise.
1556 * coffswap.h: Likewise.
1557 * ecoff.c: Likewise.
1558 * ecoffswap.h: Likewise.
1559 * elf.c: Likewise.
1560 * elf32-mips.c: Likewise.
1561 * elf64-mips.c: Likewise.
1562 * hp300hpux.c: Likewise.
1563 * i386dynix.c: Likewise.
1564 * i386lynx.c: Likewise.
1565 * i386msdos.c: Likewise.
1566 * i386os9k.c: Likewise.
1567 * libpei.h: Likewise.
1568 * nlm32-alpha.c: Likewise.
1569 * nlm32-i386.c: Likewise.
1570 * nlm32-ppc.c: Likewise.
1571 * nlmcode.h: Likewise.
1572 * nlmswap.h: Likewise.
1573 * oasys.c: Likewise.
1574 * pdp11.c: Likewise.
1575 * pe-mips.c: Likewise.
1576 * peXXigen.c: Likewise.
1577 * peicode.h: Likewise.
1578 * riscix.c: Likewise.
1579 * sunos.c: Likewise.
1580 * xcofflink.c: Likewise.
1581 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1582 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1583 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1584 equivalent H_PUT_* macro instead.
1585 (GETWORD, GETHALF, GETBYTE): Similarly.
1586 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1587 (GETWORD, GETHALF, GETBYTE): Likewise.
1588 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1589
1590 * bfd-in.h (struct orl): Change "pos" to a union.
1591 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1592 (bsd_write_armap): Here too.
1593 (coff_write_armap): And here.
1594 * coff-rs6000.c (xcoff_write_armap_old): And here.
1595 (xcoff_write_one_armap_big): And here.
1596 (xcoff_write_armap_big): And here.
1597 * ecoff.c (_bfd_ecoff_write_armap): And here.
1598 * elf64-mips.c (mips_elf64_write_armap): And here.
1599
1600 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1601 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1602 * elf32-h8300.c (elf32_h8_mach): Likewise.
1603 * elf32-mips.c (elf_mips_mach): Likewise.
1604 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1605
1606 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1607 calls.
1608 (aix386_core_vec): Typo fix.
1609
1610 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1611 etc. to avoid redefined macro warning.
1612 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1613 (MY(fix_pcrel_26)): Likewise.
1614 * aout-ns32k.c (MY(put_reloc)): Likewise.
1615 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1616 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1617 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1618
1619 * aout-encap.c: Include "file", not <file> for binutils headers.
1620 (encap_object_p): Half baked attempt to fix compile errors in
1621 code dealing with "magic".
1622
1623 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1624 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1625 bfd_vma's rather than longs.
1626 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1627 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1628 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1629 remove case 3.
1630 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1631 Use unsigned comparisons.
1632 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1633 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1634 (_bfd_do_ns32k_reloc_contents): Likewise.
1635 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1636 (_bfd_ns32k_get_immediate): Likewise.
1637 (_bfd_ns32k_put_displacement): Likewise.
1638 (_bfd_ns32k_put_immediate): Likewise.
1639 (bfd_reloc_status_type): Likewise.
1640
1641 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1642 to avoid shadowing.
1643 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1644 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1645 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1646 avoid shadowing.
1647 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1648 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1649 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1650 shadow warning.
1651 (_bfd_elfcore_strndup): Likewise for "dup".
1652 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1653 "name" to avoid shadowing.
1654 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1655 definition of "off".
1656 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1657 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1658 definition of "s".
1659 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1660 "secpp".
1661 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1662 to avoid shadowing.
1663 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1664 to avoid shadowing.
1665 (elf_link_input_bfd): Likewise.
1666 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1667 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1668 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1669 "input_section".
1670 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1671 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1672 (sunos_write_dynamic_symbol): Remove unused vars.
1673 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1674 innermost "directory_name" and "file_name" vars.
1675 * tekhex.c (first_phase): Rename local var "type" to "stype".
1676 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1677 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1678 doing comparison at caller.
1679 (vms_esecflag_by_name): Likewise.
1680 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1681 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1682 (xcoff_write_global_symbol): Rename "p" param to "inf".
1683
1684 * cisco-core.c: Add missing prototypes.
1685 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1686 (cisco_core_file_failing_signal): Likewise.
1687 (cisco_core_file_matches_executable_p): Likewise.
1688 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1689 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1690 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1691 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1692
1693 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1694 thumb_glue_size and arm_glue_size.
1695 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1696
1697 * coff64-rs6000.c: Group prototypes together.
1698
1699 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1700 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1701
1702 * cpu-arc.c: Add missing prototypes.
1703 * cpu-h8500.c: Likewise.
1704 * cpu-i960.c: Likewise.
1705 * cpu-pj.c: Likewise.
1706 * cpu-sh.c: Likewise.
1707 * cpu-w65.c: Likewise.
1708 * cpu-z8k.c: Likewise.
1709 * elf32-fr30.c: Likewise.
1710 * elf32-h8300.c: Likewise.
1711 * elf32-i370.c: Likewise.
1712 * hpux-core.c: Likewise.
1713 * versados.c: Likewise.
1714
1715 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1716 * cpu-h8500.c: Likewise.
1717 * cpu-i960.c: Likewise.
1718 * cpu-z8k.c: Likewise.
1719
1720 * cpu-ia64-opc.c: Correct comment.
1721
1722 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1723
1724 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1725 to unsigned.
1726 (bfd_elf32_write_out_phdrs): Likewise.
1727 (bfd_elf64_write_out_phdrs): Likewise.
1728 (elf_linker_section_pointers): Change addend to bfd_vma.
1729 (_bfd_elf_find_pointer_linker_section): Likewise.
1730 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1731 filepos to unsigned file_ptr.
1732 (_bfd_elfcore_strndup): Change max param to size_t.
1733 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1734 (_bfd_elfcore_strndup): Likewise.
1735 (_bfd_elf_find_pointer_linker_section): Likewise.
1736
1737 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1738 insn and sym_value to ints.
1739
1740 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1741 bfd_size_type.
1742 (elfcore_read_notes): Likewise.
1743
1744 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1745 param from unsigned char to int.
1746 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1747 for info_to_howto call.
1748 (add_dynamic_entry): Define macro.
1749 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1750
1751 * elf32-cris.c (add_dynamic_entry): Define macro.
1752 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1753
1754 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1755 (elf32_h8_object_p): Likewise.
1756 (elf32_h8_merge_private_bfd_data): Likewise.
1757 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1758
1759 * elf32-hppa.c (add_dynamic_entry): Define macro.
1760 (elf32_hppa_size_dynamic_sections): Use it.
1761 * elf32-i370.c (add_dynamic_entry): Define macro.
1762 (i370_elf_size_dynamic_sections): Use it.
1763 (i370_noop): Make static.
1764 * elf32-i386.c (add_dynamic_entry): Define macro.
1765 (elf_i386_size_dynamic_sections): Use it.
1766 * elf32-m68k.c (add_dynamic_entry): Define macro.
1767 (elf_m68k_size_dynamic_sections): Use it.
1768 * elf32-ppc.c (add_dynamic_entry): Define macro.
1769 (ppc_elf_size_dynamic_sections): Use it.
1770 * elf32-s390.c (add_dynamic_entry): Define macro.
1771 (elf_s390_size_dynamic_sections): Use it.
1772 * elf64-alpha.c (add_dynamic_entry): Define macro.
1773 (elf64_alpha_size_dynamic_sections): Use it.
1774 * elf64-hppa.c (add_dynamic_entry): Define macro.
1775 (elf64_hppa_size_dynamic_sections): Use it.
1776 * elf64-ppc.c (add_dynamic_entry): Define macro.
1777 (ppc64_elf_size_dynamic_sections): Use it.
1778 * elf64-s390.c (add_dynamic_entry): Define macro.
1779 (elf_s390_size_dynamic_sections): Use it.
1780 * elf64-sparc.c (add_dynamic_entry): Define macro.
1781 (sparc64_elf_size_dynamic_sections): Use it.
1782 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1783 (elf64_x86_64_size_dynamic_sections): Use it.
1784 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1785 (elfNN_ia64_size_dynamic_sections): Use it.
1786
1787 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1788 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1789
1790 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1791 false if the first malloc fails rather than going via error_return.
1792
1793 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1794 "index" param.
1795 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1796
1797 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1798
1799 * elfxx-ia64.c (global_sym_index): Return a long.
1800
1801 * ieee.c (get_symbol): Use int rather than char param.
1802 (ieee_slurp_sections): Move "section" var to inner blocks.
1803 (copy_expression): Don't init "value" to zero or worry about
1804 clearing to zero after using.
1805 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1806 shadowing.
1807
1808 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1809 unsigned int.
1810
1811 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1812 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1813
1814 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1815
1816 * pc532-mach.c (MYNSX): Delete.
1817 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1818 (write_object_contents): Correct prototype.
1819
1820 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1821 than unsigned short.
1822
1823 * section.c (bfd_set_section_contents): Remove redundant
1824 "offset < 0" test. Check that "count" doesn't overflow size_t.
1825 (bfd_get_section_contents): Likewise.
1826
1827 * som.c (som_fixup_formats): Add missing braces.
1828 (som_reloc_addend): Pass a bfd_vma for "addend".
1829
1830 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1831 (srec_write_symbols): Remove an unnecessary var.
1832
1833 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1834 to match.
1835 * configure.in: Sort to match. Bump version number.
1836 * configure: Regenerate.
1837
1838 * tekhex.c (move_section_contents): Assert offset == 0.
1839
1840 * versados.c (new_symbol_string): Constify arg.
1841 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1842 (versados_get_symbol_info): Make static.
1843 (versados_print_symbol): Likewise.
1844 (versados_get_reloc_upper_bound): Likewise.
1845 (versados_canonicalize_reloc): Likewise.
1846
1847 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1848
1849 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1850
1851 2001-09-17 H.J. Lu <hjl@gnu.org>
1852
1853 * dwarf1.c (parse_die): Take a new arg for the end of the
1854 section. Return false if die is beyond the section.
1855 (parse_functions_in_unit): Pass the end of the section to
1856 parse_die ().
1857 (_bfd_dwarf1_find_nearest_line): Likewise.
1858
1859 2001-09-14 Michael Rauch <mrauch@netbsd.org>
1860
1861 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1862 just like R_SPARC_32.
1863
1864 2001-09-14 Kevin Lo <kevlo@openbsd.org>
1865
1866 * configure.bfd: Add arm-openbsd target.
1867
1868 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1869
1870 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1871 Add support for mips64.
1872
1873 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
1874
1875 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1876
1877 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1878
1879 * elf.c (prep_headers): Get the machine code from the elf
1880 backend data.
1881 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1882 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1883 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1884 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1885 * elf-arc.c (arc_elf_final_write_processing): Don't override
1886 e_machine, it's now properly set in prep_headers.
1887 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1888 EM_AVR_OLD.
1889 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1890 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1891 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1892 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1893 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1894 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1895 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1896 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1897 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1898 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1899 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1900 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1901
1902 2001-09-11 Richard Henderson <rth@redhat.com>
1903
1904 * elf64-alpha.c (elf64_alpha_section_flags): New.
1905 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1906
1907 2001-09-11 Richard Henderson <rth@redhat.com>
1908
1909 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1910 apply HINT relocations against dynamic symbols.
1911
1912 2001-09-11 H.J. Lu <hjl@gnu.org>
1913
1914 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
1915
1916 2001-09-09 Richard Henderson <rth@redhat.com>
1917
1918 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1919
1920 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1921 following a call to a near function.
1922
1923 2001-09-08 Richard Henderson <rth@redhat.com>
1924
1925 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1926 relocation errors. Fail gp-relative relocations against
1927 dynamic symbols.
1928
1929 2001-09-08 Alan Modra <amodra@bigpond.net.au>
1930
1931 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1932 as well as DEF_DYNAMIC in test for avoided copy relocs.
1933 (allocate_plt_and_got_and_discard_relocs): Likewise.
1934 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1935 (allocate_plt_and_got_and_discard_relocs): Likewise.
1936
1937 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1938
1939 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1940 of R_MIPS_PC16.
1941
1942 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1943
1944 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1945 definitions.
1946 (mips_elf64_howto_table_rel): Likewise.
1947
1948 2001-09-05 Tom Rix <trix@redhat.com>
1949
1950 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1951 and syscall symbols.
1952 (write_global_symbol) : Same.
1953 (bfd_xcoff_export_symbol): Remove unused syscall param.
1954 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1955 bfd_xcoff_import_symbol.
1956 * bfd-in.h: Same.
1957 * bfd-in2.h : Regenerate.
1958
1959 2001-09-04 Richard Henderson <rth@redhat.com>
1960
1961 * elf64-alpha.c (SKIP_HOWTO): New.
1962 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1963 Fix sizes of 16-bit mem format relocs.
1964 (elf64_alpha_reloc_map): Update to match.
1965 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1966 (elf64_alpha_relax_without_lituse): Likewise.
1967 (elf64_alpha_check_relocs): Handle GPREL16.
1968 (elf64_alpha_relocate_section): Likewise.
1969 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1970 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1971 * bfd-in2.h, libbfd.h: Rebuild.
1972
1973 2001-09-04 Jeff Law <law@redhat.com>
1974
1975 * elf32-h8300.c (elf32_h8_relax_section): New function.
1976 (elf32_h8_relax_delete_bytes): Likewise.
1977 (elf32_h8_symbol_address_p): Likewise.
1978 (elf32_h8_get_relocated_section_contents): Likewise.
1979 (bfd_elf32_bfd_relax_section): Define.
1980 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1981
1982 * elf32-h8300.c (special): New function.
1983 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1984 all relocations.
1985 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1986 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1987 Fix minor problems with 8bit and 16bit PC relative relocations.
1988
1989 2001-09-01 Andreas Jaeger <aj@suse.de>
1990
1991 * vms-tir.c: Add missing prototypes.
1992 * vms-hdr.c: Likewise.
1993 * vms-gsd.c: Likewise.
1994 * vms-misc.c: Likewise.
1995
1996 2001-08-31 H.J. Lu <hjl@gnu.org>
1997
1998 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1999 with bad relocation.
2000
2001 2001-08-31 Eric Christopher <echristo@redhat.com>
2002 Jason Eckhardt <jle@redhat.com>
2003
2004 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2005 mips32_4k and mips64.
2006 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2007 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2008 * bfd/cpu-mips.c: Ditto.
2009 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2010 * bfd/bfd-in2.h: Regenerate.
2011
2012 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2013
2014 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2015 value into R_ALPHA_RELATIVE's addend.
2016 (elf64_alpha_finish_dynamic_symbol): Likewise.
2017
2018 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2019
2020 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2021 recomputed addend during relocatable link if not USE_REL.
2022
2023 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2024 error.
2025
2026 2001-08-30 H.J. Lu <hjl@gnu.org>
2027
2028 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2029 2 changes.
2030 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2031 relocations for weak definitions.
2032
2033 2001-08-30 H.J. Lu <hjl@gnu.org>
2034
2035 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2036 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2037 * Makefile.in: Rebuild.
2038
2039 2001-08-30 H.J. Lu <hjl@gnu.org>
2040
2041 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2042 dynamic relocation for undefined weak symbols when creating
2043 executables. Check h->root.root.type, instead of h->root.type.
2044
2045 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2046
2047 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2048 default from coff to elf.
2049
2050 2001-08-29 Jeff Law <law@redhat.com>
2051
2052 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2053 relocations.
2054 (h8_reloc_map): Similarly.
2055 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2056 Add support for PC relative relocations.
2057
2058 * elf32-h8300.c: Put all prototypes together.
2059 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2060 (elf32_h8_final_link_relocate): New function for linker.
2061 (elf32_h8_relocate_section): Similarly.
2062 (elf_backend_relocate_section): Define.
2063
2064 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2065 (h8300_scan): Handle architecture:machine encodings typically
2066 found in linker scripts.
2067 * elf.c (prep_headers): Do not try to do H8 machine recognition
2068 here.
2069 * elf32-h8300.c: Add some missing prototypes.
2070 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2071 (elf32_h8_object_p): Similarly.
2072
2073 2001-08-29 Tom Rix <trix@redhat.com>
2074
2075 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2076 does not follow a XTY_SD.
2077
2078 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2079
2080 * targmatch.sed: Delete case statements.
2081 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2082 aix4.3 and above.
2083
2084 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
2085
2086 * Makefile.am (elf32-h8300.lo): New target.
2087 * config.bfd (h8300*-*-elf): New case.
2088 * configure.in (bfd_elf32_h8300_vec): New case.
2089 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2090 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2091 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2092 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2093 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2094 * elf32-h8300.c: New file.
2095 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2096
2097 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2098
2099 * sparclynx.c: Add missing prototypes.
2100 * coff-mcore.c: Add missing prototypes.
2101 * elf32-pj.c: Add missing prototypes.
2102 * nlm32-sparc.c: Add missing prototypes.
2103 * oasys.c: Add missing prototypes.
2104 * pdp11.c: Add missing prototypes.
2105 * pe-mips.c: Add missing prototypes.
2106 * riscix.c: Add missing prototypes.
2107
2108 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2109
2110 * elf32-i386.c: Add missing prototypes.
2111 * elf32-ppc.c: Likewise.
2112 * elf32-sh-lin.c: Likewise.
2113 * elfarm-nabi.c: Likewise.
2114
2115 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2116
2117 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2118 (elf_i386_grok_psinfo): New function.
2119 (elf_backend_grok_prstatus): Define.
2120 (elf_backend_grok_psinfo): Likewise.
2121 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2122 (ppc_elf_grok_psinfo): New function.
2123 (elf_backend_grok_prstatus): Define.
2124 (elf_backend_grok_psinfo): Likewise.
2125 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2126 (elf32_shlin_grok_psinfo): New function.
2127 (elf_backend_grok_prstatus): Define.
2128 (elf_backend_grok_psinfo): Likewise.
2129 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2130 (elf32_arm_nabi_grok_psinfo): New function.
2131 (elf_backend_grok_prstatus): Define.
2132 (elf_backend_grok_psinfo): Likewise.
2133
2134 2001-08-27 H.J. Lu <hjl@gnu.org>
2135
2136 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2137 sanity check.
2138 (mips_elf_calculate_relocation): Create dynamic relocation for
2139 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2140 bit is not set.
2141
2142 2001-08-27 H.J. Lu <hjl@gnu.org>
2143
2144 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2145 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2146 (_bfd_elf32_mips_grok_prstatus): Likewise.
2147 (_bfd_elf32_mips_grok_psinfo): Likewise.
2148 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2149 `struct mips_elf_link_hash_entry *'.
2150 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2151
2152 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2153
2154 * mipsbsd.c: Add missing prototypes.
2155 * hp300hpux.c: Add missing prototypes.
2156 * i386aout.c: Add missing prototypes.
2157 * i386lynx.c: Add missing prototypes.
2158 * i386mach3.c: Add missing prototypes.
2159 * i386msdos.c: Add missing prototypes.
2160 * i386os9k.c: Add missing prototypes.
2161
2162 2001-08-27 Linus Nordberg <linus@swox.se>
2163 Torbjorn Granlund <tege@swox.com>
2164 Staffan Ulfberg <staffanu@swox.se>
2165 Alan Modra <amodra@bigpond.net.au>
2166
2167 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2168 targ64_selvecs for 32 bit powerpc targets.
2169 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2170 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2171 Run "make dep-am".
2172 * Makefile.in: Regenerate.
2173 * configure.in: Add elf64_powerpc vecs.
2174 * configure: Regenerate.
2175 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2176 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2177 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2178 * elf64-ppc.c: New file.
2179 * reloc.c: Add powerpc64 relocs.
2180 * libbfd.h: Regenerate.
2181 * bfd-in2.h: Regenerate.
2182
2183 2001-08-27 Andreas Schwab <schwab@suse.de>
2184
2185 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2186 reloc is against read-only section.
2187 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2188 looking up section names for DT_TEXTREL.
2189 (elf32_m68k_reloc_type_class): New function.
2190 (elf_backend_reloc_type_class): Define.
2191
2192 2001-08-27 Andreas Jaeger <aj@suse.de>
2193
2194 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2195 reloc is against read-only section.
2196 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2197 looking up section names for DT_TEXTREL.
2198 (elf_s390_reloc_type_class): New.
2199 (elf_backend_reloc_type_class): Define.
2200
2201 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2202 reloc is against read-only section.
2203 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2204 looking up section names for DT_TEXTREL.
2205 (elf_s390_reloc_type_class): New.
2206 (elf_backend_reloc_type_class): Define.
2207
2208 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2209 is against read-only section.
2210 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2211 looking up section names for DT_TEXTREL.
2212 (ppc_elf_reloc_type_class): New.
2213 (elf_backend_reloc_type_class): Define.
2214
2215 2001-08-26 Andreas Jaeger <aj@suse.de>
2216
2217 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2218 reloc is against read-only section.
2219 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2220 looking up section names for DT_TEXTREL.
2221 (elf_cris_reloc_type_class): New.
2222 (elf_backend_reloc_type_class): Define.
2223
2224 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2225 against read-only section.
2226 (elf_backend_reloc_type_class): Define.
2227 (sh_elf_reloc_type_class): New.
2228 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2229 looking up section names for DT_TEXTREL.
2230
2231 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2232 reloc is against read-only section.
2233 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2234 looking up section names for DT_TEXTREL.
2235 (elf32_arm_reloc_type_class): New.
2236 (elf_backend_reloc_type_class): Define.
2237
2238 2001-08-25 Andreas Jaeger <aj@suse.de>
2239
2240 * oasys.c: Add missing prototypes.
2241
2242 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2243 attribute for parameter.
2244 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2245
2246 * versados.c (get_4): Make static.
2247 (get_10): Make static.
2248 Add missing prototypes.
2249 (process_esd): Fix call to versados_new_symbol.
2250
2251 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2252
2253 * coff-a29k.c: Add missing prototypes.
2254 * coff-apollo.c: Add missing prototypes.
2255 * coff-arm.c: Add missing prototypes.
2256 * coff-i860.c: Add missing prototypes.
2257 * coff-rs6000.c: Add missing prototypes.
2258 * coff-tic80.c: Add missing prototypes.
2259 * elf-m10200.c: Add missing prototypes.
2260 * elf-m10300.c: Add missing prototypes.
2261 * elf32-arm.h: Add missing prototypes.
2262 * elf32-d10v.c: Add missing prototypes.
2263 * elf32-m32r.c: Add missing prototypes.
2264 * elf32-mcore.c: Add missing prototypes.
2265 * elf32-openrisc.c: Add missing prototypes.
2266 * elf32-sh.c: Add missing prototypes.
2267 * elf32-sparc.c: Add missing prototypes.
2268 * elf32-v850.c: Add missing prototypes.
2269 * elfarm-nabi.c: Add missing prototypes.
2270 * elfarm-oabi.c: Add missing prototypes.
2271
2272 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2273
2274 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2275 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2276
2277 2001-08-24 H.J. Lu <hjl@gnu.org>
2278
2279 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2280 hash structure.
2281
2282 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2283
2284 * elf-bfd.h (elf_hash_table): Revert definition.
2285 (is_elf_hash_table): New macro.
2286 * elflink.h (elf_link_add_object_symbols): Test
2287 is_elf_hash_table before accessing ELF only fields in hash
2288 structure.
2289 (elf_link_create_dynamic_sections): Fail if not using an ELF
2290 hash structure.
2291 (elf_add_dynamic_entry): Fail if not using an ELF hash
2292 structure.
2293 (elf_link_record_local_dynamic_symbol): Fail if not using an
2294 ELF hash structure.
2295 (size_dynamic_sections): Fail if not using an ELF hash
2296 structure.
2297 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2298 hash structure.
2299 (elf_bfd_final_link): Fail if not using an ELF hash
2300 structure.
2301
2302 2001-08-24 H.J. Lu <hjl@gnu.org>
2303
2304 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2305 table is not an ELF linker hash table.
2306
2307 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2308 table type to bfd_link_elf_hash_table.
2309
2310 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2311 the last change.
2312
2313 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2314 table type to bfd_link_generic_hash_table.
2315
2316 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2317
2318 * bfd.c (bfd_alt_mach_code): New function.
2319 * bfd-in2.h: Rebuilt.
2320
2321 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2322
2323 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2324 `type' field in the hash entry when deciding whether to follow a
2325 link.
2326
2327 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2328
2329 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2330 last.
2331 (elf_link_sort_relocs): Adjust accordingly.
2332
2333 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2334 (elf64_alpha_check_relocs): Set it if section this reloc is against
2335 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2336 read-only section.
2337 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2338 is is against read-only section.
2339 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2340 check section names.
2341 (elf64_alpha_reloc_type_class): New.
2342 (elf_backend_reloc_type_class): Define.
2343
2344 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2345
2346 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2347 by bfd_malloc().
2348
2349 2001-08-23 Andreas Jaeger <aj@suse.de>
2350
2351 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2352 the reloc is against read-only section.
2353 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2354 of looking up section names for DT_TEXTREL.
2355 (elf64_x86_64_reloc_type_class): New.
2356 (elf_backend_reloc_type_class): Define.
2357
2358 2001-08-23 H.J. Lu <hjl@gnu.org>
2359
2360 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2361 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2362
2363 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2364 bfd_print_symbol_vandf.
2365 * coffgen.c (coff_print_symbol): Likewise.
2366 * elf.c (bfd_elf_print_symbol): Likewise.
2367 * ieee.c (ieee_print_symbol): Likewise.
2368 * nlmcode.h (nlm_print_symbol): Likewise.
2369 * oasys.c (oasys_print_symbol): Likewise.
2370 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2371 * som.c (som_print_symbol): Likewise.
2372 * srec.c (srec_print_symbol): Likewise.
2373 * tekhex.c (tekhex_print_symbol): Likewise.
2374 * versados.c (versados_print_symbol): Likewise.
2375 * vms.c (vms_print_symbol): Likewise.
2376
2377 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2378 with bfd_fprintf_vma.
2379 (bfd_elf_print_symbol): Likewise.
2380 * syms.c (bfd_print_symbol_vandf): Likewise.
2381
2382 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2383
2384 * aoutf1.h (sunos_write_object_contents): Silence compile time
2385 warning.
2386 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2387
2388 * bout.c: Add missing function prototypes. Fix formatting.
2389 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2390 * coff-w65.c: Add missing function prototypes. Fix formatting.
2391 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2392 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2393 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2394 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2395 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2396 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2397 * coff-sh.c: Add missing function prototypes. Fix formatting.
2398
2399 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2400
2401 * elf-bfd.h (enum elf_reloc_type_class): New.
2402 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2403 (_bfd_elf_reloc_type_class): New.
2404 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2405 (elfNN_bed): Add elf_backend_reloc_type_class.
2406 * elf.c (_bfd_elf_reloc_type_class): New.
2407 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2408 is against read-only section.
2409 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2410 looking up section names for DT_TEXTREL.
2411 (elf_i386_reloc_type_class): New.
2412 (elf_backend_reloc_type_class): Define.
2413 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2414 reloc is against read-only section.
2415 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2416 looking up section names for DT_TEXTREL.
2417 (elf32_sparc_reloc_type_class): New.
2418 (elf_backend_reloc_type_class): Define.
2419 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2420 reloc is against read-only section.
2421 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2422 looking up section names for DT_TEXTREL.
2423 (sparc64_elf_reloc_type_class): New.
2424 (elf_backend_reloc_type_class): Define.
2425 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2426 (elfNN_ia64_hash_table_create): Clear ia64_info.
2427 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2428 section.
2429 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2430 instead of looking up section names for DT_TEXTREL.
2431 (elfNN_ia64_reloc_type_class): New.
2432 (elf_backend_reloc_type_class): Define.
2433 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2434 (struct elf_link_sort_rela): New.
2435 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2436 (elf_bfd_final_link): Call elf_link_sort_relocs.
2437 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2438 necessary.
2439
2440 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2441
2442 * configure.in (x86-bsdi): No corefile support.
2443 * configure: Regenerate.
2444
2445 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2446
2447 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2448 comma.
2449
2450 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2451
2452 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2453 the alignment of dwarf2 linkonce sections to 0.
2454 * coff-sto32.c: Likewise.
2455
2456 2001-08-20 Andreas Jaeger <aj@suse.de>
2457
2458 * coff-sparc.c: Add missing prototypes.
2459 * elf32-s390.c: Likewise.
2460 * elf32-i960.c: Likewise.
2461 * aout-target.h: Likewise.
2462
2463 2001-08-20 H.J. Lu <hjl@gnu.org>
2464
2465 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2466 (elf_num_section_syms): New for num_section_syms.
2467
2468 * elf.c (elf_map_symbols): Set num_section_syms.
2469 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2470 the section symbol index.
2471
2472 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2473
2474 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2475 select the generic has table creator. All elf backends need elf
2476 specific fields in the hash table.
2477
2478 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2479
2480 * archive.c (offsetof): Remove define.
2481 * elf.c: Likewise.
2482 * oasys.c: Likewise
2483 * sysdep.h (offsetof): Define.
2484
2485 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2486
2487 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2488 (bfd_set_gp_size): Make param unsigned.
2489 * bfd-in2.h: Regenerate.
2490 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2491 than calling bfd_get_gp_size.
2492 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2493 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2494
2495 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2496
2497 * linker.c (default_fill_link_order): Handle four byte fill value.
2498
2499 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2500
2501 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2502 prototype.
2503 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2504
2505 * elf64-mips.c (UNUSED_RELOC): Define.
2506 (mips_elf64_howto_table_rel): Use it.
2507 (mips_elf64_howto_table_rela): Here too.
2508 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2509
2510 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2511 silence warning.
2512 * coffgen.c (coff_print_symbol): Fix warnings.
2513 (coff_find_nearest_line): Likewise.
2514 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2515 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2516 * format.c (bfd_check_format_matches): Likewise.
2517 (bfd_set_format): Likewise.
2518 * coff-ia64.c: Add missing prototypes.
2519 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2520 signed to silence warnings.
2521 (elf64_alpha_relocate_section): Likewise.
2522 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2523 (elf64_alpha_add_symbol_hook): Likewise.
2524 (elf64_alpha_final_link): Likewise.
2525 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2526 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2527 (elf64_alpha_size_got_sections): Likewise.
2528 * elfxx-ia64.c: Add missing prototypes.
2529 (elfNN_ia64_relocate_section): Fix warning.
2530 (elfNN_ia64_unwind_entry_compare): Make params const.
2531
2532 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2533
2534 * config.bfd (targ64_selvecs): New.
2535 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2536
2537 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2538 (BFD_DEFAULT_TARGET_SIZE): New.
2539 (BFD_ARCH_SIZE): Comment.
2540 * configure.in (target_size): New. Set instead of target64 in
2541 selvecs case statement. Set target64 from it.
2542 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2543 * bfd-in2.h: Regenerate.
2544 * configure: Regenerate.
2545
2546 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2547
2548 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2549 (bfd_errmsgs): Add corresponding message.
2550 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2551 finding an archive that contains different format object files.
2552 Return bfd_error_wrong_object_format for this case.
2553 * format.c: Formatting fixes. s/CONST/const/.
2554 (bfd_check_format_matches): Accept archives that give
2555 bfd_error_wrong_object_format if no full match is found. Tidy
2556 code handling matching_vector. Don't return a pointer to freed
2557 memory in `matching'. Handle ambiguous matches as for partial
2558 archive matches.
2559 * bfd-in2.h: Regenerate.
2560
2561 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2562
2563 * libieee.h (common_header_type): Add last_byte field.
2564
2565 * ieee.c: Add missing prototypes. Some format fixes.
2566 (struct output_buffer_struct): Move for availability to prototypes.
2567 (ieee_part_after): New function.
2568 (ieee_slurp_debug): Use it here.
2569 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2570 ieee_part_after to set last_byte to one past end of current part.
2571 Update callers.
2572 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2573 Update callers.
2574 (parse_expression): Don't go beyond the end of the current part.
2575 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2576 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2577 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2578 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2579 ieee_set_section_contents, ieee_write_object_contents,
2580 ieee_make_empty_symbol): Make static.
2581 (ieee_archive_p): Correct comments regarding bfd_read.
2582 (ieee_object_p): Similarly.
2583 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2584 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2585 input_bfd, output_bfd, output_buffer.
2586 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2587 do_with_relocs, ie. as a symbol for relocatable files.
2588 (ieee_vec): Add comments showing functions referenced by macros.
2589
2590 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2591
2592 * aout-tic30.c: Add missing prototypes. Fix formatting.
2593 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2594 * peXXigen.c: Add missining prototypes. Fix formatting.
2595 * aout-adobe.c: Add missining prototypes. Fix formatting.
2596
2597 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2598
2599 * elf32-v850.c: Add missing function prototypes.
2600 Fix some formatting.
2601
2602 * cpu-v850.c: Add missing function prototype.
2603 Fix some formatting.
2604
2605 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2606
2607 * elf-bfd.h (struct elf_backend_data): Add new fields
2608 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2609 (bfd_elf_sprintf_vma): Rename function prototype to
2610 '_bfd_elf_sprintf_vma'.
2611 (bfd_elf_fprintf_vma): Rename function prototype to
2612 '_bfd_elf_fprintf_vma'.
2613 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2614 directly, instead indirect via the elf_backend_data structure.
2615 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2616 instead indirect via the elf_backend_data structure.
2617 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2618 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2619 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2620 already defined.
2621 (elf_backend_fprintf_vma): Initialise if not already defined.
2622 (struct elf_backend_data): Initialise the
2623 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2624
2625 2001-08-10 Andreas Jaeger <aj@suse.de>
2626
2627 * elf64-sparc.c: Add missing prototypes.
2628 * elf32-cris.c: Likewise.
2629 * elf32-i370.c: Likewise.
2630 * elf64-hppa.c: Likewise.
2631 * elf64-s390.c: Likewise.
2632
2633 2001-08-10 Andreas Jaeger <aj@suse.de>
2634
2635 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2636 Add prototypes where needed.
2637
2638 2001-08-10 H.J. Lu <hjl@gnu.org>
2639
2640 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2641 (bfd_fprintf_vma): Likewise.
2642
2643 2001-08-10 H.J. Lu <hjl@gnu.org>
2644
2645 * bfd.c (bfd_sprintf_vma): Don't return void.
2646 (bfd_fprintf_vma): Likewise.
2647
2648 2001-08-10 Andreas Jaeger <aj@suse.de>
2649
2650 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2651 to build warnings.
2652 * configure: Regenerate.
2653
2654 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2655
2656 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2657 warning if not BFD64. Add braces so emacs auto format works.
2658 (bfd_elf_fprintf_vma): Likewise.
2659
2660 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2661 of _xcoff_swap_ld*.
2662 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2663 param to agree with libxcoff.h.
2664 (xcoff_swap_ldhdr_out): Likewise.
2665 (xcoff_swap_ldsym_in): Likewise.
2666 (xcoff_swap_ldsym_out): Likewise.
2667 (xcoff_swap_ldrel_in): Likewise.
2668 (xcoff_swap_ldrel_out): Likewise.
2669 (xcoff_create_csect_from_smclas): Likewise.
2670 * coff64-rs6000.c: Add missing prototypes.
2671 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2672 with libxcoff.h.
2673 (xcoff64_swap_ldhdr_out): Likewise.
2674 (xcoff64_swap_ldsym_in): Likewise.
2675 (xcoff64_swap_ldsym_out): Likewise.
2676 (xcoff64_swap_ldrel_in): Likewise.
2677 (xcoff64_swap_ldrel_out): Likewise.
2678 (xcoff64_ppc_relocate_section): Make static.
2679 (xcoff64_slurp_armap): Likewise.
2680 (xcoff64_archive_p): Likewise.
2681 (xcoff64_openr_next_archived_file): Likewise.
2682 (xcoff64_sizeof_headers): Likewise.
2683 (xcoff64_is_lineno_count_overflow): Likewise.
2684 (xcoff64_is_reloc_count_overflow): Likewise.
2685 (xcoff64_loader_symbol_offset): Likewise.
2686 (xcoff64_loader_reloc_offset): Likewise.
2687 * elf64-gen.c: Add missing prototypes.
2688
2689 2001-08-09 H.J. Lu <hjl@gnu.org>
2690
2691 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2692 (bfd_elf_fprintf_vma): Likewise.
2693
2694 2001-08-09 H.J. Lu <hjl@gnu.org>
2695
2696 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2697 to ...
2698 * elf-bfd.h: Here.
2699 * bfd-in2.h: Regenerated.
2700
2701 2001-08-09 H.J. Lu <hjl@gnu.org>
2702
2703 * bfd-in.h (bfd_sprintf_vma): New prototype.
2704 (bfd_fprintf_vma): Likewise.
2705 (bfd_elf_sprintf_vma): Likewise.
2706 (bfd_elf_fprintf_vma): Likewise.
2707 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2708 * bfd-in2.h: Regenerated.
2709
2710 * bfd.c (bfd_sprintf_vma): New. Defined.
2711 (bfd_fprintf_vma): Likewise.
2712
2713 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2714 (bfd_elf_fprintf_vma): Likewise.
2715
2716 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2717
2718 * coff-rs6000.c: Add missing prototypes.
2719 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2720 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2721 xcoff_loader_reloc_offset): Make static.
2722 * dwarf1.c: Add missing prototypes.
2723 * dwarf2.c: Add missing prototypes.
2724 (struct abbrev_info): Move definition.
2725 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2726 * elf.c: Add missing prototypes.
2727 * elf32-gen.c: Likewise.
2728 * elf32-i386.c: Likewise.
2729 * elf32-ppc.c: Likewise.
2730 (ppc_elf_sort_rela): Use PTR instead of "void *".
2731 * elflink.h: Add missing prototypes. Formatting fixes.
2732 * merge.c: Add missing prototypes.
2733 (last4_eq): Use PTR instead of "void *".
2734 (last_eq): Likewise.
2735 * syms.c: Add missing prototypes.
2736
2737 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2738
2739 * bfd.c: Fix formatting.
2740 * bfd-in2.h: Regenerate.
2741
2742 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2743
2744 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2745 true (this target uses REL relocations) and 'pcrel_offset' to
2746 false (the PC is implied, not stored in the offset).
2747
2748 2001-08-08 Alan Modra <amodra@bigpond.net.au>
2749
2750 1999-10-19 Linus Nordberg <linus@swox.se>
2751 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2752 * elfxx-target.h (elf_backend_want_got_sym): Define.
2753 (elfNN_bed): Add elf_backend_want_got_sym.
2754 * elflink.c (_bfd_elf_create_got_section): Define
2755 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2756
2757 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
2758
2759 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2760 (find_rela_addend): New function.
2761 (parse_comp_unit): Call it to find the abbrev offset addend.
2762 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2763 members of dwarf2_debug as debugging information is read.
2764
2765 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2766
2767 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2768 targets as well as sh-pe.
2769
2770 2001-08-03 Ben Harris <bjh21@netbsd.org>
2771
2772 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2773 reloc from start of section when computing value for R_ARM_REL32
2774 reloc.
2775
2776 2001-08-03 Alan Modra <amodra@bigpond.net.au>
2777
2778 From H.J. Lu <hjl@gnu.org>
2779 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2780 keep relocs for undefined syms if there are no dynamic sections in
2781 executable.
2782 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2783
2784 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2785
2786 * cofflink.c (coff_link_check_ar_symbols): also search for
2787 __imp__symbol as well as _symbol.
2788 * linker.c (_bfd_generic_link_add_archive_symbols): also
2789 search for __imp__symbol as well as _symbol.
2790
2791 2001-08-01 Adam Nemet <anemet@lnxw.com>
2792
2793 * elf.c (elf_sort_sections): Return zero only as the last step.
2794
2795 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2796
2797 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2798 ARM_COFF_BUGFIX.
2799 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2800 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2801 ARM_COFF_BUGFIX.
2802
2803 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2804
2805 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2806 to match corresponding bfd_coff_backend data member.
2807
2808 2001-07-24 Alan Modra <amodra@bigpond.net.au>
2809
2810 * Makefile.am: Update dependencies with "make dep-am".
2811 * Makefile.in: Regenerate
2812
2813 2001-07-15 H.J. Lu <hjl@gnu.org>
2814
2815 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2816 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2817 * Makefile.in: Regenerate.
2818
2819 2001-07-11 H.J. Lu <hjl@gnu.org>
2820
2821 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2822 flags when creating the reloc section if the ALLOC flag in the
2823 source section is set.
2824
2825 2001-07-11 Steve Ellcey <sje@cup.hp.com>
2826
2827 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2828 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2829 * bfd-in2.h: Regenerate.
2830 * libbfd.h: Regenerate.
2831 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2832 new relocations.
2833 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2834 (elfNN_ia64_check_relocs): Likewise.
2835 (elfNN_ia64_install_value): Likewise.
2836 (elfNN_ia64_relocate_section): Likewise.
2837
2838 2001-07-11 Jakub Jelinek <jakub@redhat.com>
2839
2840 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2841 R_SPARC_UA64.
2842 (elf32_sparc_check_relocs): Likewise.
2843 Only create .rela section for alloced sections in shared libraries.
2844 (elf32_sparc_relocate_section): Likewise.
2845 Remove redundant check.
2846 Optimize unaligned reloc usage.
2847 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2848 check.
2849
2850 2001-07-11 H.J. Lu <hjl@gnu.org>
2851
2852 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2853 ALLOC|LOAD flags as the source section for debugging sections
2854 when creating the reloc section.
2855
2856 2001-07-05 Jim Wilson <wilson@redhat.com>
2857
2858 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2859 the section of the bigger symbol.
2860
2861 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2862
2863 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2864
2865 * peicode.h (coff_swap_scnhdr_in): For sections containing
2866 uninitialised data, only set their size to s_paddr if this does
2867 not reset their size to zero. MS's latest compilers will set
2868 s_paddr to zero.
2869
2870 2001-07-04 H.J. Lu <hjl@gnu.org>
2871
2872 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2873 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2874 bfd_mach_mips5000.
2875
2876 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
2877
2878 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2879
2880 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2881 sections being discarded.
2882
2883 2001-06-30 Alan Modra <amodra@bigpond.net.au>
2884
2885 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2886 instead of _bfd_elfcore_section_from_phdr.
2887 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2888 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2889 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2890 (elfcore_grok_prstatus): Likewise.
2891 (elfcore_grok_lwpstatus): Likewise.
2892 (bfd_get_elf_phdr_upper_bound): Likewise.
2893 (elfcore_make_note_pseudosection): Formatting.
2894 (_bfd_elfcore_strndup): Formatting.
2895 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2896 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2897
2898 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
2899
2900 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2901 and _bfd_elfcore_strndup.
2902 (struct elf_backend_data): Add elf_backend_grok_prstatus
2903 and elf_backend_grok_psinfo.
2904 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2905 (elfcore_grok_prstatus): Use it.
2906 (elfcore_make_note_pseudosection): Likewise.
2907 (elfcore_strndup): Rename to...
2908 (_bfd_elfcore_strndup): Here, and make global.
2909 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2910 (elfcore_grok_note): Call elf_backend_grok_prstatus
2911 and elf_backend_grok_psinfo if available.
2912 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2913 (_bfd_elf32_mips_grok_psinfo): New function.
2914 (elf_backend_grok_prstatus): Define.
2915 (elf_backend_grok_psinfo): Define.
2916 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2917 (elf_backend_grok_psinfo): Likewise.
2918 (elfNN_bed): Include elf_backend_grok_prstatus and
2919 elf_backend_grok_psinfo.
2920
2921 2001-06-29 H.J. Lu <hjl@gnu.org>
2922
2923 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2924 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2925 is NULL before filling PLT.
2926
2927 2001-06-29 Alan Modra <amodra@bigpond.net.au>
2928
2929 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2930
2931 2001-06-27 Alan Modra <amodra@bigpond.net.au>
2932
2933 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2934 here..
2935 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2936 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2937 after gc has run.
2938
2939 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2940 (IS_ABSOLUTE_RELOC): Define.
2941 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2942 (hppa_link_hash_newfunc): Always init it.
2943 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2944 create COPY relocs only when the reloc is in a read-only section.
2945 Instead, allocate space for a dynamic reloc to reference the
2946 library symbol directly. Keep track of space we allocate using
2947 relocs_entries.
2948 (hppa_discard_copies): Delete, and move code to..
2949 (allocate_plt_and_got): ..here. Rename to
2950 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2951 relocs for non-shared link.
2952 (elf32_hppa_size_dynamic_sections): Update calls to above.
2953 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2954 in lieu of COPY relocs.
2955
2956 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2957 here..
2958 (elf_i386_adjust_dynamic_symbol): ..nor here..
2959 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2960 after gc has run.
2961 (elf_i386_size_dynamic_sections): Fix a comment.
2962 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2963 involved in writing reloc out.
2964
2965 2001-06-25 Alan Modra <amodra@bigpond.net.au>
2966
2967 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2968 Ensure syms are dynamic if we might be emitting a reloc.
2969 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2970 for undefweak or undefined syms..
2971 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2972
2973 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2974 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2975 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2976 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2977
2978 2001-06-24 H.J. Lu <hjl@gnu.org>
2979
2980 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2981 strncasecmp/strcasecmp instead of strncmp/strcmp.
2982
2983 2001-06-23 H.J. Lu <hjl@gnu.org>
2984
2985 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2986 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2987 in the regular object file and treat the weak definition as
2988 the normal one.
2989
2990 2001-06-23 Alan Modra <amodra@bigpond.net.au>
2991
2992 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2993 unresolved_reloc test to exclude cases where we use "relocation"
2994 before setting it to point into the .got. Reinstate fudge for
2995 unresolved relocs in debugging sections.
2996
2997 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2998 complicated tests for unresolvable relocs with a simple direct
2999 scheme using "unresolved_reloc" var.
3000
3001 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3002 elf_i386_dyn_relocs. Update comment.
3003 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3004 dyn_relocs.
3005 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3006 others to aborts.
3007 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3008 abort.
3009 (elf_i386_size_dynamic_sections): Likewise.
3010 (elf_i386_finish_dynamic_symbol): Likewise.
3011 (elf_i386_finish_dynamic_sections): Likewise.
3012 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3013 handling code.
3014
3015 Avoid creating COPY relocs if possible.
3016 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3017 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3018 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3019 reloc is in a read-only section. Instead, allocate space for a
3020 dynamic reloc to reference the library symbol directly. Keep
3021 track of space we allocate using pcrel_relocs_copied.
3022 (discard_copies): Delete, and move code to ..
3023 (allocate_plt_and_got): ..here. Rename to
3024 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3025 relocs for non-shared link.
3026 (elf_i386_size_dynamic_sections): Update calls to above functions.
3027 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3028 more ugly logic to avoid "unresolvable relocation" error. Use
3029 htab shortcut in place of elf_hash_table macro.
3030 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3031 not always be created now.
3032
3033 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3034
3035 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3036 shared libraries.
3037
3038 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3039
3040 * configure.host (mips64-*-linux): Reformat.
3041
3042 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3043
3044 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3045 allocate local .got space. Use shortcuts from hash table for .got
3046 and .plt rather than comparing section names.
3047 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3048 adjusting index into local_got_refcounts to document what we are
3049 really doing.
3050 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3051 Tidy .got and .plt error checking.
3052
3053 2001-06-20 Catherine Moore <clm@redhat.com>
3054
3055 * elf-bfd.h (struct elf_backend_data):
3056 elf_backend_emit_relocs: New field: Function for emitting
3057 relocs.
3058 elf_backend_count_relocs: New field: Function for determining
3059 the number of relocs to be emitted.
3060 * elfxx-target.h: Provide default (NULL) values for
3061 elf_backend_emit_relocs and elf_backend_count_relocs.
3062 * elflink.h (elf_link_size_reloc_section): Make the hash table
3063 big enough to hold the relocs counted by either reloc_count or
3064 o->reloc_count.
3065 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3066 should be emitted, either because of a command line option
3067 stored in the info structure or because the target provides a
3068 special reloc emitting function.
3069 If the target provides a reloc counting function use it,
3070 unless performing a relocatable link or emitting all relocs.
3071 Also set the SEC_RELOC flag on any output section which will
3072 contain relocs.
3073 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3074 should be emitted, either because of a command line option
3075 stored in the info structure or because the target provides a
3076 special reloc emitting function.
3077 If the target provides a reloc emitting function, use it,
3078 unless performing a relocatable link or emitting all relocs.
3079
3080 2001-06-20 H.J. Lu <hjl@gnu.org>
3081
3082 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3083 allocate local .got space.
3084
3085 2001-06-19 Andreas Jaeger <aj@suse.de>
3086
3087 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3088 dynamic symbols.
3089
3090 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3091
3092 * elflink.h (struct elf_assign_sym_version_info): Remove member
3093 export_dynamic. All users changed to use info member.
3094 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3095 export_dynamic, instead use member in parameter info.
3096 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3097 bfd_elf64_size_dynamic_sections): Update prototype.
3098 * bfd-in2.h: Regenerate.
3099
3100 2001-06-18 H.J. Lu <hjl@gnu.org>
3101
3102 * elflink.h (elf_info_failed): Add a new field, verdefs.
3103 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3104 elf_export_symbol.
3105 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3106 should be exported.
3107
3108 2001-06-17 H.J. Lu <hjl@gnu.org>
3109
3110 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3111 readonly_reloc, to record if a relocation in the .rel.dyn
3112 section is against a read-only section.
3113 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3114 field to false.
3115 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3116 in the .rel.dyn section against a read-only section by setting
3117 DF_TEXTREL or readonly_reloc.
3118 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3119 it is true.
3120 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3121 there is a relocation in the .rel.dyn section against a
3122 read-only section.
3123 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3124 DF_TEXTREL is set.
3125
3126 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3127
3128 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3129 function. Move flagword result into parameter list. Remove
3130 comment about setting bfd_error_handler to intercept failure
3131 results.
3132 * coffgen.c (make_a_section_from_file): Examine result of
3133 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3134 caller.
3135 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3136 function. Move flagword result into parameter list.
3137 * libcoff.h: Regenerate.
3138 * libecoff.h: Regenerate.
3139
3140 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3141
3142 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3143 section is going to follow it.
3144
3145 2001-06-12 Catherine Moore <clm@redhat.com>
3146
3147 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3148 with the file_align entry from elf_backend_data.
3149 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3150 (elf_gc_record_vtentry): Likewise.
3151
3152 2001-06-10 Alan Modra <amodra@bigpond.net.au>
3153
3154 * elflink.h: Whitespace changes.
3155 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3156 rather than "unsigned char".
3157 (elf_link_output_relocs): Likewise.
3158 (elf_link_input_bfd): Likewise.
3159 (elf_reloc_link_order): LIkewise.
3160 * elf.c: s/CONST/const/. Whitespace changes.
3161 * elf32-mips.c: Formatting fix.
3162
3163 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3164 * Makefile.in: Regenerate.
3165 * po/Make-in: Remove trailing tab.
3166
3167 2001-06-09 Philip Blundell <philb@gnu.org>
3168
3169 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3170 change.
3171 (elf32_arm_plt_entry): Likewise.
3172
3173 2001-06-08 H.J. Lu <hjl@gnu.org>
3174
3175 * elf.c (swap_out_syms): Keep names for global section symbols.
3176
3177 2001-06-07 H.J. Lu <hjl@gnu.org>
3178
3179 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3180 MIPS-based machines need it.
3181
3182 2001-06-07 H.J. Lu <hjl@gnu.org>
3183
3184 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3185 for SGI only.
3186
3187 * config.bfd: Remove ecoff from Linux/mips.
3188
3189 2001-06-07 Andreas Jaeger <aj@suse.de>
3190
3191 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3192 assertion.
3193 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3194 alignment of 8 for .rela sections; handle further relocations.
3195
3196 2001-06-06 Christian Groessler <cpg@aladdin.de>
3197
3198 * coff-z8k.c: Fix formatting.
3199 Fix howtos: howto->size was always 1.
3200
3201 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3202
3203 * configure.host (mips64*-*-linux*): Define.
3204
3205 2001-06-05 Alan Modra <amodra@bigpond.net.au>
3206
3207 * elf32-i386.c (elf_i386_discard_copies): Rename to
3208 discard_copies, and use elf_link_hash_entry arg rather than
3209 elf_i386_link_hash_entry.
3210 (elf_i386_link_hash_traverse): Delete.
3211 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3212 Tidy sizing of dynamic sections.
3213 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3214 possible .plt entries.
3215 (elf_i386_gc_sweep_hook): Likewise.
3216 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3217 everything with plt.refcount <= 0.
3218
3219 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3220 .relgot space here.
3221 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3222 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3223 .rel.plt here..
3224 (allocate_plt_and_got): ..instead do it all here. New function.
3225 (elf_i386_size_dynamic_sections): Allocate local .got space and
3226 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3227 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3228 rather than gc variety).
3229 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3230 (elf_i386_relocate_section): Use it here and correct handling of
3231 R_386_GOT32. Provide section and offset for "unresolvable
3232 relocation" error message.
3233 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3234
3235 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3236 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3237 (elf_i386_link_hash_table_create): Init them.
3238 (create_got_section): New function.
3239 (elf_i386_create_dynamic_sections): New function.
3240 (elf_backend_create_dynamic_sections): Set to above.
3241 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3242 calling bfd_get_section_by_name.
3243 (elf_i386_gc_sweep_hook): Likewise.
3244 (elf_i386_adjust_dynamic_symbol): Likewise.
3245 (elf_i386_size_dynamic_sections): Likewise.
3246 (elf_i386_relocate_section): Likewise.
3247 (elf_i386_finish_dynamic_sections): Likewise.
3248
3249 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3250
3251 2001-06-02 H.J. Lu <hjl@gnu.org>
3252
3253 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3254 and ELFOSABI_HPUX.
3255 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3256
3257 2001-06-02 H.J. Lu <hjl@gnu.org>
3258
3259 * aout-cris.c (MACHTYPE_OK): New. Defined.
3260
3261 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
3262
3263 * section.c (_bfd_strip_section_from_output): Handle NULL
3264 output_section.
3265
3266 2001-06-02 H.J. Lu <hjl@gnu.org>
3267
3268 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3269 rs6000coff64_vec only if BFD64 is defined.
3270 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3271
3272 2001-06-02 H.J. Lu <hjl@gnu.org>
3273
3274 * coff-ia64.c (ia64coff_object_p): Rewrite with
3275 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3276
3277 2001-06-01 Andreas Jaeger <aj@suse.de>
3278
3279 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3280 relocation, small reformatting.
3281
3282 2001-05-29 Andreas Jaeger <aj@suse.de>
3283
3284 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3285 (elf64_x86_64_relocate_section): Likewise.
3286
3287 2001-05-30 Alan Modra <amodra@one.net.au>
3288
3289 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3290 millicode. Don't allocate .got and .rela.got space here..
3291 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3292 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3293 .rela.plt here..
3294 (hppa_handle_PIC_calls): ..nor here..
3295 (allocate_plt_and_got): ..instead do it all here. New function.
3296 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3297 call allocate_plt_and_got. No need to zap .got if not dynamic.
3298 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3299 gc_common_final_link.
3300 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3301 (elf32_hppa_relocate_section): Use it here.
3302 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3303 dynamic_sections_created.
3304 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3305
3306 2001-05-28 Andreas Jaeger <aj@suse.de>
3307
3308 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3309 generic version since we want a hashsize of 4.
3310 (elf_backend_size_info): Likewise.
3311
3312 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3313
3314 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3315 a zeroing loop.
3316 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3317 (elf_link_input_bfd): Likewise.
3318 (elf_reloc_link_order): Likewise.
3319 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3320 relocations correctly.
3321
3322 2001-05-28 Nicolas Pitre <nico@cam.org>
3323
3324 * elf32-arm.h: fix PLT generation for big endian ARM
3325
3326 2001-05-28 Alan Modra <amodra@one.net.au>
3327
3328 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3329 for symbols forced local that need plabels.
3330 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3331 .plt.rela for local syms if non-shared.
3332 (hppa_build_one_stub): Mask lsb of plt.offset.
3333 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3334 (clobber_millicode_symbols): Correct comment.
3335 (elf32_hppa_relocate_section): Likewise.
3336 (elf32_hppa_finish_dynamic_symbol): Likewise.
3337
3338 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3339
3340 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3341 * bfd-in2.h: Regenerate.
3342 * libbfd.h: Regenerate.
3343 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3344 and BFD_RELOC_SPARC_UA64 mapping
3345 * elf64-sparc.c: Likewise.
3346
3347 2001-05-25 H.J. Lu <hjl@gnu.org>
3348
3349 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3350 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3351 (coff-rs6000.lo): Remove the old dependency.
3352 * Makefile.in: Rebuild.
3353
3354 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3355 coff-rs6000.lo.
3356
3357 2001-05-25 H.J. Lu <hjl@gnu.org>
3358
3359 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3360 rs6000coff_core_file_matches_executable_p,
3361 rs6000coff_core_file_failing_command and
3362 rs6000coff_core_file_failing_signal only if AIX_CORE is
3363 defined.
3364 (pmac_xcoff_vec): Likewise.
3365 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3366
3367 2001-05-25 Timothy Wall <twall@redhat.com>
3368
3369 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3370 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3371
3372 2001-05-25 H.J. Lu <hjl@gnu.org>
3373
3374 * bfd-in2.h: Regenerated.
3375 * libcoff.h: Likewise.
3376
3377 2001-05-25 Alan Modra <amodra@one.net.au>
3378
3379 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3380 undefined millicode syms in shared libs.
3381 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3382 (elf32_hppa_check_relocs): Likewise.
3383 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3384 (elf32_hppa_size_dynamic_sections): Likewise.
3385 (elf32_hppa_relocate_section): Likewise.
3386 (elf32_hppa_finish_dynamic_symbol): Likewise.
3387 (elf32_hppa_finish_dynamic_sections): Likewise.
3388
3389 2001-05-24 Tom Rix <trix@redhat.com>
3390
3391 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3392 xcoff-target.h not used to define rs6000 or ppc bfd.
3393 * Makefile.in same
3394
3395 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3396 to 64 bit.
3397
3398 * coff-rs6000.c : Many changes for 64 bit support. Move common
3399 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3400 and pmac_xcoff_vec
3401
3402 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3403 linker now supported. Explictly define the rs6000coff64_vec.
3404
3405 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3406 (coff_print_aux) same
3407 (coff_write_object_contents) same
3408 (coff_slurp_line_table) same
3409
3410 * coffgen.c : (coff_fix_symbol_name) formatting
3411 (coff_mangle_symbols) xcoff 64 bit support
3412 (coff_write_symbol) same
3413 (coff_write_alien_symbol) same
3414 (coff_write_native_symbol) same
3415 (coff_write_symbols) same
3416 (coff_get_symbol_info) same
3417 (bfd_coff_get_syment) same
3418 (coff_print_symbol) same
3419
3420 * config.bfd : add powerpc64-*-aix* target
3421
3422 * libcoff-in.h : formatting
3423
3424 * libcoff.h : move xcoff extern declarations to libxcoff.h
3425
3426 * libxcoff.h : New file
3427
3428 * xcofflink.c : Many changes for xcoff64 support. Move common
3429 structures to include/coff/xcoff.h. Move specific structure to
3430 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3431 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3432
3433 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3434 aix4.2+ -binitfini.
3435
3436 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3437
3438 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3439
3440 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3441 s/ENTIRES/ENTRIES/.
3442
3443 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3444
3445 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3446 * libbfd.h: Regenerate.
3447 * bfd-in2.h: Regenerate.
3448
3449 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3450 * archures.c (bfd_mach_mips12000): Define.
3451 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3452 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3453 support.
3454 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3455 * bfd-in2.h: Regenerate.
3456 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3457
3458 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3459
3460 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3461 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3462 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3463 that is used by GCC.
3464
3465 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3466
3467 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3468 of entries in a structured section.
3469 * elf.c: Use new macro.
3470 * elf32-i386.c: Use new macro.
3471 * elf32-mips.c: Use new macro.
3472 * elf64-alpha.c: Use new macro.
3473 * elf64-sparc.c: Use new macro.
3474 * elfcode.h: Use new macro.
3475 * elflink.h: Use new macro.
3476
3477 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3478
3479 * bfdint.texi: Replace -oformat with --oformat.
3480
3481 2001-05-21 Andreas Jaeger <aj@suse.de>
3482
3483 * dwarf2.c (decode_line_info): Fix error message.
3484 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3485 adjust error message.
3486
3487 2001-05-18 H.J. Lu <hjl@gnu.org>
3488
3489 * elflink.h (elf_link_add_object_symbols): Revert the last
3490 change.
3491
3492 2001-05-17 Alan Modra <amodra@one.net.au>
3493
3494 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3495 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3496 (hppa_build_one_stub): Add an assert to check plt.offset.
3497
3498 2001-05-17 H.J. Lu <hjl@gnu.org>
3499
3500 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3501 version definition to basename of the output filename.
3502
3503 2001-05-17 H.J. Lu <hjl@gnu.org>
3504
3505 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3506 basename of the bfd filename.
3507
3508 2001-05-16 Alan Modra <amodra@one.net.au>
3509
3510 * section.c (asection): Add linker_has_input field.
3511 (STD_SECTION): Adjust initialization to suit.
3512 * ecoff.c (bfd_debug_section): Likewise.
3513 * bfd-in2.h: Regenerate.
3514
3515 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3516
3517 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3518 negative 32-bit operands to 16 operands when the operand is
3519 going to be zero-extended by the modified opcode.
3520
3521 2001-05-12 Peter Targett <peter.targett@arccores.com>
3522
3523 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3524 name for 'arc5' core versions.
3525 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3526
3527 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3528 architecture.
3529 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3530
3531 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3532
3533 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3534 sections as well.
3535 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3536 to .gnu.linkonce.t.FOO text section.
3537
3538 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3539
3540 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3541 fields, change sec into secinfo.
3542 (struct sec_merge_info): Add chain, remove last fields.
3543 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3544 (sec_merge_hash_lookup): If lookup could not use a string only
3545 because it has bad alignment, mark the old string for deletion.
3546 (sec_merge_add): Add secinfo argument. Don't compute entry's
3547 position, instead record the section.
3548 (sec_merge_emit): Update for the sec into secinfo change in
3549 struct sec_merge_hash_entry.
3550 (_bfd_merge_section): Only record the section for merging, defer
3551 putting strings into the hash table.
3552 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3553 _bfd_merge_sections): New functions.
3554 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3555 changes.
3556 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3557 (_bfd_nolink_bfd_merge_sections): Define.
3558 * libbfd.h: Likewise.
3559 (bfd_generic_merge_sections): Add prototype.
3560 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3561 (struct bfd_target): Likewise.
3562 * bfd.c (bfd_merge_sections): Define.
3563 * bfd-in2.h: Rebuilt.
3564 * elf.c (_bfd_elf_merge_sections): New function.
3565 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3566 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3567 * reloc.c (bfd_generic_merge_sections): New function.
3568 * vms.c (vms_bfd_merge_sections): New function.
3569 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3570 * aout-target.h (MY_bfd_merge_sections): Define.
3571 * aout-tic30.c (MY_bfd_merge_sections): Define.
3572 * binary.c (binary_bfd_merge_sections): Define.
3573 * bout.c (b_out_bfd_merge_sections): Define.
3574 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3575 * coffcode.c (coff_bfd_merge_sections): Define.
3576 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3577 * i386msdos.c (msdos_bfd_merge_sections): Define.
3578 * i386os9k.c (os9k_bfd_merge_sections): Define.
3579 * ieee.c (ieee_bfd_merge_sections): Define.
3580 * ihex.c (ihex_bfd_merge_sections): Define.
3581 * nlm-target.h (nlm_bfd_merge_sections): Define.
3582 * oasys.c (oasys_bfd_merge_sections): Define.
3583 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3584 * som.c (som_bfd_merge_sections): Define.
3585 * srec.c (srec_bfd_merge_sections): Define.
3586 * tekhex.c (tekhex_bfd_merge_sections): Define.
3587 * versados.c (versados_bfd_merge_sections): Define.
3588 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3589
3590 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3591
3592 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3593 to be unsigned long, in order to match its use.
3594
3595 2001-05-10 H.J. Lu <hjl@gnu.org>
3596
3597 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3598 indirect symbols.
3599
3600 2001-05-09 H.J. Lu <hjl@gnu.org>
3601
3602 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3603 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3604 Remove the unused veriable `dynver'.
3605
3606 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3607
3608 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3609 NULL or is not COFF.
3610 (coff_i386_rtype_to_howto): Don't dump core if output section
3611 owner is not COFF.
3612
3613 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3614
3615 * ecoff.c (bfd_debug_section): Fix initialization.
3616 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3617 is always a positive integer. Cast away sign mismatch.
3618 * elf32-mips.c: Fix misleading comment and typo.
3619 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3620 correct data type.
3621 * elflink.c: Fix typo.
3622 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3623 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3624
3625 2001-05-04 Richard Henderson <rth@redhat.com>
3626
3627 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3628
3629 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3630
3631 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3632 EF_ARM_HASENTRY if the start address is set.
3633
3634 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3635
3636 * targets.c (_bfd_target_vector_entries): Compute value based on
3637 the size of the _bfd_target_vector and not bfd_target_vector.
3638
3639 2001-05-03 H.J. Lu <hjl@gnu.org>
3640
3641 * elfcode.h: Include "libiberty.h".
3642
3643 * elflink.h (elf_link_add_object_symbols): Set
3644 elf_dt_name (abfd) to basename of the bfd filename.
3645 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3646 of the bfd filename.
3647
3648 2001-05-03 Andreas Jaeger <aj@suse.de>
3649
3650 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3651 (elf_generic_info_to_howto_rel): Likewise.
3652 * coff-alpha.c (reloc_nil): Likewise.
3653 (alpha_ecoff_bad_format_hook): Likewise.
3654 (alpha_adjust_reloc_out): Likewise.
3655 (alpha_bfd_reloc_type_lookup): Likewise.
3656 (alpha_convert_external_reloc): Likewise.
3657 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3658 (elf64_alpha_reloc_bad): Likewise.
3659 (elf64_alpha_reloc_gpdisp): Likewise.
3660 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3661 (elf64_alpha_info_to_howto): Likewise.
3662 (elf64_alpha_add_symbol_hook): Likewise.
3663 (elf64_alpha_create_got_section): Likewise.
3664 (elf64_alpha_is_local_label_name): Likewise.
3665 (elf64_alpha_merge_ind_symbols): Likewise.
3666 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3667 (mips_elf64_get_reloc_upper_bound): Likewise.
3668 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3669 (nlm_alpha_get_public_offset): Likewise.
3670
3671 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3672
3673 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3674 about overflow in R_OPENRISC_LO_16_IN_INSN and
3675 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3676
3677 2001-04-30 H.J. Lu <hjl@gnu.org>
3678
3679 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3680 only for ELF_LINK_FORCED_LOCAL.
3681 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3682 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3683 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3684
3685 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3686 if the symbol has hidden or internal visibility.
3687
3688 2001-04-30 Alan Modra <amodra@one.net.au>
3689
3690 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3691 calls to undefined weak symbols.
3692
3693 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3694
3695 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3696 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3697
3698 2001-04-27 Andreas Jaeger <aj@suse.de>
3699
3700 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3701 out handled entries.
3702 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3703 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3704 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3705 GOT32.
3706
3707 2001-04-27 Sean McNeil <sean@mcneil.com>
3708
3709 * config.bfd: Add arm-vxworks target.
3710 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3711 addend (fro VXworks targets).
3712
3713 2001-04-26 H.J. Lu <hjl@gnu.org>
3714
3715 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3716 valid.
3717
3718 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3719
3720 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3721 * bfd-in2.h: Regenerated.
3722
3723 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3724
3725 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3726 (struct sec_merge_hash): Remove alignment_power.
3727 (sec_merge_hash_newfunc): Clear alignment.
3728 (sec_merge_hash_lookup): Pass alignment as argument.
3729 Use hashp->root.next, not hashp->next to walk the hash chain.
3730 If a string already in the hashtable does not have required
3731 alignment, create a new hashtable entry.
3732 (sec_merge_init): Remove alignment_power argument.
3733 (sec_merge_add): Add alignment argument.
3734 (sec_merge_emit): Alignment is now a per-entity thing, not per
3735 section.
3736 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3737 for proper alignment.
3738 Pass alignment information to sec_merge_add.
3739
3740 2001-04-24 Christian Groessler <cpg@aladdin.de>
3741
3742 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3743 and R_REL16 reloc types; accept odd values for R_REL16 type
3744
3745 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3746
3747 * cpu-openrisc.c: New file.
3748 * elf32-openrisc.c: Likewise.
3749
3750 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3751 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3752 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3753 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3754 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3755 * Makefile.in: Regenerated.
3756 * config.bfd: (openrisc-*-elf): New target.
3757 * configure.in (bfd_elf32_openrisc_vec): New vector.
3758 * configure: Regenerated.
3759 * libbfd.h: Regenerated.
3760 * bfd-in2.h: Regenerated.
3761 * reloc.c: Add OpenRISC relocations.
3762 * targets.c (bfd_elf32_openrisc_vec): Declare.
3763 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3764 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3765 (bfd_openrisc_arch): Declare.
3766 (bfd_archures_list): Add bfd_openrisc_arch.
3767 * elf.c (prep_headers): Add bfd_arch_openrisc.
3768
3769 2001-04-23 Bo Thorsen <bo@suse.de>
3770
3771 * elf64-x86-64.c: Add c++ vtable hack.
3772 Small whitespace and comment changes.
3773
3774 2001-04-19 Andreas Jaeger <aj@suse.de>
3775
3776 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3777 (elf64_x86_64_plt_entry): Likewise.
3778 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3779 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3780
3781 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
3782
3783 * elf32-cris.c: Tweak comments related to dynamic linking.
3784 (cris_elf_relocate_section): When not creating shared object, fill
3785 in the .got table for any symbol not in the dynamic symbol table.
3786 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3787 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3788 table.
3789 (cris_elf_check_relocs): Use variable r_type in all places rather
3790 than the original expression. Add default case in switch for
3791 reloc types.
3792 (elf_cris_size_dynamic_sections): Iterate over
3793 elf_cris_discard_excess_program_dynamics when not creating shared
3794 library.
3795 (elf_cris_discard_excess_dso_dynamics): Renamed from
3796 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3797 (elf_cris_discard_excess_program_dynamics): New.
3798
3799 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3800
3801 * coffcode.h (coff_write_object_contents): Use
3802 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3803
3804 2001-04-14 H.J. Lu <hjl@gnu.org>
3805
3806 * bfd-in2.h: Regenerate.
3807
3808 2001-04-14 Jakub Jelinek <jakub@redhat.com>
3809
3810 * section.c (STD_SECTION): Add entsize.
3811
3812 2001-04-13 H.J. Lu <hjl@gnu.org>
3813
3814 * section.c (SEC_MERGE): Define new flag for merging.
3815 (SEC_STRINGS): Likewise.
3816 (entsize): New field.
3817
3818 2001-04-13 Roger Sayle <roger@metaphorics.com>
3819
3820 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3821 flag on pe-i386 targets.
3822
3823 2001-04-13 Jakub Jelinek <jakub@redhat.com>
3824
3825 * libbfd-in.h (_bfd_merge_section): New.
3826 (_bfd_write_merged_section): New.
3827 (_bfd_merged_section_offset): New.
3828 * libbfd.h: Rebuilt.
3829 * linker.c (_bfd_generic_link_output_symbols): Handle
3830 discard_sec_merge.
3831 * aoutx.h (aout_link_write_symbols): Likewise.
3832 * pdp11.c (aout_link_write_symbols): Likewise.
3833 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3834 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3835 sections.
3836 (elf_link_sec_merge_syms): New.
3837 (elf_link_input_bfd): Call _bfd_merged_section_offset
3838 and _bfd_write_merged_section.
3839 Handle discard_sec_merge.
3840 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3841 field.
3842 (struct bfd_elf_section_data): Likewise.
3843 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3844 SEC_STRINGS section flags and entsize from their ELF counterparts.
3845 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3846 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3847 from their BFD counterparts.
3848 * merge.c: New file.
3849 * Makefile.am: Add strtab.lo.
3850 * Makefile.in: Rebuilt.
3851
3852 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3853
3854 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3855 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3856
3857 2001-04-05 Steven J. Hill <sjhill@cotw.com>
3858
3859 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3860 endian MIPS ELF target.
3861 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3862 MIPS ELF target.
3863
3864 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3865 64bit big endian MIPS ELF target.
3866 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3867 endian MIPS ELF target.
3868 * configure: Regenerated.
3869
3870 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3871 little endian targets.
3872 (mips_elf_sym_is_global): Handle traditional targets.
3873
3874 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3875 64bit big endian MIPS ELF target.
3876 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3877 endian MIPS ELF target.
3878
3879 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3880 and bfd_elf64_tradlittlemips_vec.
3881
3882 2001-04-05 David Mosberger <davidm@hpl.hp.com>
3883
3884 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3885 ordinary "progbits" section.
3886
3887 2001-04-04 Alan Modra <alan@linuxcare.com.au>
3888
3889 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3890 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3891
3892 2001-04-03 David Mosberger <davidm@hpl.hp.com>
3893
3894 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3895
3896 2001-03-30 H.J. Lu <hjl@gnu.org>
3897
3898 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3899 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3900
3901 2001-03-26 H.J. Lu <hjl@gnu.org>
3902
3903 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3904 if there are any relocations for generic ELF.
3905 (bfd_elf32_bfd_link_add_symbols): Defined to
3906 elf32_generic_link_add_symbols.
3907 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3908 if there are any relocations for generic ELF.
3909 (bfd_elf64_bfd_link_add_symbols): Defined to
3910 elf64_generic_link_add_symbols.
3911
3912 2001-03-23 Nick Clifton <nickc@redhat.com>
3913
3914 * Makefile.am (BUILD_CFILES): New variable: List of C source
3915 files created in build directory.
3916 (BUILD_HFILES): New variable: List of header files created in
3917 build directory.
3918 (POTFILES): Delete.
3919 (po/POTFILES.in): Replace rule with empty entry.
3920 (po/SRC-POTFILES.in): New rule: Create a list of source files
3921 in the source directory.
3922 (po/BLD-POTFILES.in): New rule: Create a list of source files
3923 in the build directory.
3924 (MOSTLYCLEAN): Do not delete source files created in build
3925 directory.
3926 * Makefile.in: Regenerate.
3927 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3928 into po/Makefile.
3929 * configure: Regenerate.
3930
3931 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3932 and BLD_POTFILES.
3933 Add .. to the search path when building bfd.pot.
3934 Delete POTFILES when performing distclean.
3935 Add comment describing why distclean is broken in maintainer mode.
3936 * po/POTFILES.in: Delete.
3937 * po/SRC-POTFILES.in: New file.
3938 * po/BLD-POTFILES.in: New file.
3939 * po/bfd.pot: Regenerate.
3940
3941 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
3942
3943 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3944 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3945 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3946 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3947 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3948 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3949 functions.
3950 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3951 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3952 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3953 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3954 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3955 New HOWTO members for new relocs.
3956 (cris_reloc_map): Map new relocs.
3957 (ELF_DYNAMIC_INTERPRETER): Define.
3958 (PLT_ENTRY_SIZE): Define.
3959 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3960 elf_cris_pic_plt_entry): New, PLT templates.
3961 (struct elf_cris_pcrel_relocs_copied, struct
3962 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3963 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3964 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3965 positive values. Adjust PCREL relocs to be relative to location
3966 after relocation.
3967 (cris_elf_relocate_section): Handle relocations to dynamic
3968 objects. Handle new relocations. Call error handler when seeing
3969 non-PIC relocation for read-only sections while generating shared
3970 object.
3971 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3972 entries.
3973 (bfd_elf32_bfd_link_hash_table_create,
3974 elf_backend_adjust_dynamic_symbol,
3975 elf_backend_size_dynamic_sections,
3976 elf_backend_finish_dynamic_symbol,
3977 elf_backend_finish_dynamic_sections,
3978 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3979 elf_backend_hide_symbol, elf_backend_want_got_plt,
3980 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3981 elf_backend_got_header_size, elf_backend_plt_header_size):
3982 Define.
3983
3984 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3985 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3986 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3987 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3988 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3989 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3990 * bfd-in2.h, libbfd.h: Regenerate.
3991
3992 2001-03-21 Diego Novillo <dnovillo@redhat.com>
3993
3994 (_bfd_mips_elf_relocate_section): Give a better error message when
3995 a relocation is not recognized.
3996
3997 2001-03-21 Alan Modra <alan@linuxcare.com.au>
3998
3999 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4000 non-NULL before attempting to dereference.
4001
4002 2001-03-20 H.J. Lu <hjl@gnu.org>
4003
4004 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4005 * configure: Rebuild.
4006
4007 2001-03-20 Andreas Schwab <schwab@suse.de>
4008
4009 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4010 relocation value when resolving a reference from a debugging
4011 section.
4012
4013 2001-03-16 Scott Thomason <SThomaso@hii.com>
4014
4015 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4016 (xcoff64_swap_sym_out): Fix syntax errors.
4017
4018 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4019
4020 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4021
4022 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4023
4024 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4025 (hppa_link_hash_newfunc): Init it.
4026 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4027 section appears to be non-PIC.
4028 (final_link_relocate): Likewise.
4029 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4030 possible candidate function, and set pic_call for those that will
4031 only have a .plt entry for the PIC call stub.
4032 (hppa_handle_PIC_calls): Set maybe_pic_call.
4033
4034 2001-03-12 DJ Delorie <dj@redhat.com>
4035
4036 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4037 R_SH_DIR8WP* relocs if they're against external symbols, else
4038 they're just for relaxing. Validate the reloc values.
4039
4040 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4041
4042 * binary.c (bfd_external_binary_architecture): Declare.
4043 (binary_object_p): If bfd_external_binary_architecture is defined,
4044 set the architecture to this string.
4045
4046 2001-03-11 Philip Blundell <philb@gnu.org>
4047
4048 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4049 entries that could serve as a definition for a weak symbol.
4050
4051 2001-03-08 Nick Clifton <nickc@redhat.com>
4052
4053 * Most files: Update copyright notices using Perl script created
4054 by Kevin Buettner <kevinb@redhat.com>.
4055
4056 2001-03-07 Nick Clifton <nickc@redhat.com>
4057
4058 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4059 prior patch on ! defined OLD_ARM_ABI.
4060
4061 2001-03-07 Andreas Jaeger <aj@suse.de>
4062
4063 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4064 some relocation values.
4065
4066 2001-03-06 Nick Clifton <nickc@redhat.com>
4067
4068 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4069 of offset in BLX(1) instruction.
4070 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4071 offset in BLX(1) instruction.
4072 Fix formatting.
4073
4074 2001-03-06 Nick Clifton <nickc@redhat.com>
4075
4076 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4077 BFD_RELOC_THUMB_PCREL_BLX.
4078
4079 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4080
4081 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4082 * bfd-in2.h: Regenerate.
4083 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4084 * ieee.c (ieee_write_processor): Set proper id for
4085 Coldfire CPUs.
4086
4087 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4088
4089 * configure.in: Add s390 target.
4090 * configure: Regenerate.
4091
4092 2001-02-28 Andreas Jaeger <aj@suse.de>
4093
4094 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4095 to addend.
4096
4097 2001-02-28 Philip Blundell <pb@futuretv.com>
4098
4099 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4100 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4101
4102 2001-02-27 H.J. Lu <hjl@gnu.org>
4103
4104 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4105 abfd->tdata.aout_data == NULL.
4106
4107 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4108
4109 * elf32-hppa.c: Correct field selector in stub comments.
4110 (clobber_millicode_symbols): Formatting fix.
4111
4112 * configure.in: Bump version to 2.11.90.
4113 * configure: Regenerate.
4114 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4115 (CFILES): $SOURCE_CFILES + generated C files.
4116 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4117 Run "make dep-am"
4118 * Makefile.in: Regenerate.
4119 * doc/Makefile.in: This too.
4120
4121 2001-02-26 Timothy Wall <twall@cygnus.com>
4122
4123 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4124 comments.
4125
4126 2001-02-26 Nick Clifton <nickc@redhat.com>
4127
4128 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4129 up, replacing multiple if statements with a switch.
4130 (handle_COMDAT): New function.
4131
4132 2001-02-26 H.J. Lu <hjl@gnu.org>
4133
4134 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4135 a warning for section flags we do not handle instead of
4136 aborting.
4137
4138 2001-02-26 Andreas Jaeger <aj@suse.de>
4139
4140 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4141
4142 2001-02-22 Timothy Wall <twall@cygnus.com>
4143
4144 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4145 * configure.in: Add objects for elf64_ia64_aix vectors.
4146 * configure: Regenerated.
4147 * configure.host: Recognize ia64-*-aix*.
4148 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4149 for AIX. AIX5 requires most relocations to be dynamic (*all*
4150 binaries are somewhat similar to shared libraries).
4151 * targets.c: Add elf64_ia64_aix vectors.
4152
4153 2001-02-21 David Mosberger <davidm@hpl.hp.com>
4154
4155 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4156 C8 said "1" instead of "8". Clarify error string for IMM22:
4157 "signed integer" instead of just "integer".
4158
4159 2001-02-20 Andreas Jaeger <aj@suse.de>
4160
4161 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4162 PLT entries that could serve as a definition for a weak symbol.
4163
4164 2001-02-19 Jakub Jelinek <jakub@redhat.com>
4165
4166 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4167 entries that could serve as a definition for a weak symbol.
4168 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4169
4170 2001-02-18 David O'Brien <obrien@FreeBSD>
4171
4172 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4173 FreeBSD/i386-CURRENT differently until I can figure out the needed
4174 corefile changes.
4175 * configure: Regenerate.
4176 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4177 FreeBSD/PowerPC, and FreeBSD/sparc64.
4178
4179 2001-02-18 lars brinkhoff <lars@nocrew.org>
4180
4181 * Makefile.am: Add PDP-11 a.out target.
4182 * config.bfd: Likewise.
4183 * configure.in: Likewise.
4184 * targets.c: Likewise.
4185 * archures.c: Likewise.
4186 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4187 * libbfd.h: Add PDP-11 relocations.
4188 * reloc.c: Likewise.
4189 * cpu-pdp11.c: New file.
4190 * pdp11.c: New file.
4191
4192 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4193 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4194 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4195 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4196 (GET_MAGIC): New macro.
4197 (PUT_MAGIC): Likewise.
4198 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4199
4200 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4201
4202 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4203 multiarch needs it).
4204
4205 2001-02-18 H.J. Lu <hjl@gnu.org>
4206
4207 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4208 index.
4209
4210 2001-02-18 Kazu Hirata <kazu@hxi.com>
4211
4212 * vms-misc.c: Fix formatting.
4213
4214 2001-02-16 Kazu Hirata <kazu@hxi.com>
4215
4216 * vms.c: Fix formatting.
4217
4218 2001-02-14 H.J. Lu <hjl@gnu.org>
4219
4220 * elf.c (elf_find_function): New function.
4221 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4222 the file name and function name.
4223
4224 2001-02-14 Nick Clifton <nickc@redhat.com>
4225
4226 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4227 asection structure.
4228
4229 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4230 (BFD64_BACKENDS): Add pepigen.c
4231 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4232
4233 * Makefile.in: Regenerate.
4234 * configure: Regenerate.
4235 * po/POTFILES.in: Regenerate.
4236 * po/bfd.pot: Regenerate.
4237
4238 2001-02-14 H.J. Lu <hjl@gnu.org>
4239
4240 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4241 force_minimum_alignment.
4242
4243 2001-02-14 Bo Thorsen <bo@suse.de>
4244
4245 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4246 (elf64_86_64_size_info): Struct added to fix a problem
4247 with the hashtable string entries.
4248 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4249 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4250 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4251 remove the FIXME for this.
4252 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4253 section. Also removed the FIXME for it.
4254 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4255 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4256 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4257
4258 2001-02-13 Richard Henderson <rth@redhat.com>
4259
4260 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4261 and not user provided.
4262
4263 2001-02-13 Kazu Hirata <kazu@hxi.com>
4264
4265 * vms.c (vms_print_symbol): Remove unreachable code.
4266
4267 * rs6000-core.c: Fix formatting.
4268
4269 2001-02-13 David Mosberger <davidm@hpl.hp.com>
4270
4271 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4272 as _bfd_XXi_only_swap_filehdr_out.
4273 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4274 pe->force_minimum_alignment to TRUE.
4275 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4276 PEI_TARGET_SUBSYSTEM.
4277 (pe_print_private_bfd_data): Call
4278 _bfd_XX_print_private_bfd_data_common() instead of
4279 _bfd_pe_print_private_bfd_data_common().
4280 (pe_bfd_copy_private_bfd_data): Call
4281 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4282 _bfd_pe_bfd_copy_private_bfd_data_common().
4283 (coff_bfd_copy_private_section_data): Define as
4284 _bfd_XX_bfd_copy_private_section_data instead of
4285 _bfd_pe_bfd_copy_private_section_data.
4286 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4287 of a _bfd_pe_get_symbol_info.
4288
4289 * peigen.c: Delete.
4290
4291 * peXXigen.c: Renamed from peigen.c.
4292 (COFF_WITH_XX): Define this macro (will get expanded into
4293 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4294 compiled as peigen.c or pepigen.c.
4295 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4296 define the canonical PEP structures and definitions.
4297 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4298 effect, enforce minimum file and section alignments. If
4299 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4300 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4301 so, by default, this is a no-op).
4302
4303 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4304 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4305 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4306 _bfd_pefoo if it's not defined. Use these macros to define
4307 coff swap macros.
4308
4309 * libcoff.h (pe_tdata): Add members target_subsystem and
4310 force_minimum_alignment.
4311
4312 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4313 COFF_WITH_pep.
4314 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4315
4316 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4317 peigen.lo.
4318
4319 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4320 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4321 PEPAOUTHDR.
4322
4323 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4324 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4325 (peigen.c): Add rule to generate from peXXigen.c.
4326 (pepigen.c): Ditto.
4327 (pepigen.lo): List dependencies for pepigen.lo.
4328
4329 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4330
4331 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4332 $global$ referenced but not defined, set its value here.
4333
4334 2001-02-09 Bo Thorsen <bo@suse.de>
4335
4336 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4337 alignment to 3.
4338 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4339 and relocation.
4340 (elf64_x86_64_relocate_section): Fix formatting.
4341 (elf64_x86_64_relocate_section): Fix addend for relocation of
4342 R_X86_64_(8|16|32|PC8|PC16|PC32).
4343
4344 2001-02-12 Jan Hubicka <jh@suse.cz>
4345
4346 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4347
4348 2001-02-11 H.J. Lu <hjl@gnu.org>
4349
4350 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4351 alignment.
4352
4353 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4354
4355 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4356 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4357 relocations against dynsym symbols.
4358
4359 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4360 the R_MIPS_26 relocation.
4361 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4362 the R_MIPS_26 relocation.
4363 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4364 relocation.
4365 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4366 the R_MIPS_26 relocation.
4367 (mips_elf64_howto_table_rela): Likewise.
4368
4369 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4370 member to mark symbols that have non-CALL relocations against
4371 them.
4372 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4373 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4374 R_MIPS_GOT16.
4375 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4376 non-CALL relocation against it is encountered.
4377 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4378 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4379 no_fn_stub is not set.
4380
4381 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4382 information from the real symbol for indirect ones.
4383 Check no_fn_stub to find out if a symbol has a function stub
4384 indeed.
4385
4386 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4387
4388 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4389 * Makefile.in: Regenerate.
4390
4391 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4392
4393 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4394 true if section name is an unwind table section name.
4395 (elfNN_ia64_additional_program_headers): Count each unwind section
4396 separately.
4397 (elfNN_ia64_modify_segment_map): Install one unwind program header
4398 for each unwind separate section. Note: normally the linker
4399 script merges the unwind sections that go into a single segment,
4400 so this still generates at most one unwind program header per
4401 segment.
4402
4403 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4404 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4405 (elfNN_ia64_fake_sections): Mark sections with names that start
4406 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4407 unwind section.
4408
4409 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4410 Use it to make sh_info in unwind section point to the text section
4411 it applies to.
4412
4413 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4414
4415 * Makefile.am: Add linux target for S/390.
4416 * archures.c: Likewise.
4417 * bfd-in2.h: Likewise.
4418 * config.bfd: Likewise.
4419 * configure.in: Likewise.
4420 * elf.c: Likewise.
4421 * libbfd.h: Likewise.
4422 * targets.c: Likewise.
4423 * cpu-s390.c: New file.
4424 * elf32-s390.c: New file.
4425 * elf64-s390.c: New file.
4426
4427 2001-02-09 Nick Clifton <nickc@redhat.com>
4428
4429 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4430 ImageBase. This has already been done by coff_swap_hdr_in.
4431
4432 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4433
4434 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4435
4436 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4437
4438 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4439 (sparc64_elf_relocate_section): Likewise.
4440
4441 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4442
4443 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4444 similar to R_SPARC_32.
4445 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4446
4447 2001-02-08 H.J. Lu <hjl@gnu.org>
4448
4449 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4450 relocation entries for weak definitions when building DSO with
4451 -Bsymbolic.
4452
4453 2001-02-08 Richard Henderson <rth@redhat.com>
4454
4455 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4456 before visibility. Locally defined protected symbols are not
4457 dynamic.
4458
4459 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4460
4461 * config.bfd: Enable coff64 for rs6000-*. Patch from
4462 <hzoli@austin.ibm.com>.
4463
4464 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4465
4466 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4467 found, do not attempt to find dwarf2 info before returning.
4468
4469 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4470
4471 * elflink.h (is_global_symbol_definition): Rename to
4472 is_global_data_symbol_definition and have it reject function
4473 symbols.
4474 (elf_link_is_defined_archive_symbol): Use renamed function.
4475
4476 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4477
4478 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4479 * libbfd.h (bfd_target_vector): Likewise.
4480 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4481 make static; create pointer reference named bfd_target_vector.
4482 (_bfd_target_vector_entries): Calculate this based on the array
4483 typed _bfd_target_vector.
4484
4485 2001-02-06 H.J. Lu <hjl@gnu.org>
4486
4487 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4488 internal symbols are not dynamic.
4489 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4490
4491 2001-02-06 Nick Clifton <nickc@redhat.com>
4492
4493 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4494 that it will not be pulled into the list of files that make up
4495 po/POTFILES.in.
4496 * Makefile.in: Regenerate.
4497 * po/bfd.pot: Regenerate.
4498
4499 2001-02-06 H.J. Lu <hjl@gnu.org>
4500
4501 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4502 checking.
4503 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4504 external_PEI_IMAGE_hdr.
4505
4506 2001-02-06 Kazu Hirata <kazu@hxi.com>
4507
4508 * elf-m10200.c: Fix formatting.
4509
4510 2001-02-04 Nick Clifton <nickc@redhat.com>
4511
4512 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4513 rel, it will be handled later on.
4514
4515 2001-02-02 Fred Fish <fnf@ninemoons.com>
4516
4517 * Makefile.in: Fix typo.
4518
4519 2001-02-01 Kazu Hirata <kazu@hxi.com>
4520
4521 * elf-m10300.c: Fix formatting.
4522
4523 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4524
4525 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4526 (elf_backend_get_symbol_type): Define.
4527 (elf64_hppa_object_p): Set architecture and machine from elf
4528 header flags.
4529
4530 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4531
4532 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4533 before mdebug.
4534
4535 2001-01-26 Richard Henderson <rth@redhat.com>
4536
4537 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4538 for non-default visibility.
4539 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4540 delete ugly macro and replace with pretty function.
4541
4542 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4543
4544 * coff-go32.c: Update copyright.
4545 * coff-stgo32.c: Likewise.
4546 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4547 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4548 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4549 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4550
4551 2001-01-25 Kazu Hirata <kazu@hxi.com>
4552
4553 * bfd-in2.h: Rebuild.
4554 * libbfd.h: Likewise.
4555
4556 2001-01-23 H.J. Lu <hjl@gnu.org>
4557
4558 * bfd-in2.h: Rebuild.
4559
4560 2001-01-23 H.J. Lu <hjl@gnu.org>
4561
4562 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4563 is NULL or PRIV(vms_rec) is outside of the buffer.
4564
4565 2001-01-23 Kazu Hirata <kazu@hxi.com>
4566
4567 * coff64-rs6000.c: Fix formatting.
4568 * coff-arm.c: Likewise.
4569 * coffgen.c: Likewise.
4570 * cofflink.c: Likewise.
4571 * coff-mcore.c: Likewise.
4572 * coff-mips.c: Likewise.
4573 * coff-pmac.c: Likewise.
4574 * coff-ppc.c: Likewise.
4575 * coff-rs6000.c: Likewise.
4576 * elf32.c: Likewise.
4577 * elf32-fr30.c: Likewise.
4578 * elf32-i370.c: Likewise.
4579 * elf32-i860.c: Likewise.
4580 * elf32-m32r.c: Likewise.
4581 * elf32-m68k.c: Likewise.
4582 * elf32-mcore.c: Likewise.
4583 * elf32-ppc.c: Likewise.
4584 * elf32-sh.c: Likewise.
4585 * elf32-v850.c: Likewise.
4586 * elf64-alpha.c: Likewise.
4587 * elf64-sparc.c: Likewise.
4588 * elflink.c: Likewise.
4589 * elflink.h: Likewise.
4590 * elf-m10200.c: Likewise.
4591 * elf-m10300.c: Likewise.
4592 * elfxx-ia64.c: Likewise.
4593
4594 * aoutx.h: Fix formatting.
4595 * bfd.c: Likewise.
4596 * bfd-in2.h: Likewise.
4597 * bfd-in.h: Likewise.
4598 * cpu-i386.c: Likewise.
4599 * cpu-m68hc11.c: Likewise.
4600 * dwarf2.c: Likewise.
4601 * elf64-x86-64.c: Likewise.
4602 * format.c: Likewise.
4603 * freebsd.h: Likewise.
4604 * hash.c: Likewise.
4605 * hp300hpux.c: Likewise.
4606 * hppabsd-core.c: Likewise.
4607 * hpux-core.c: Likewise.
4608
4609 2001-01-22 Bo Thorsen <bo@suse.de>
4610
4611 * elf64-x86-64.c: Added PIC support for X86-64.
4612 (elf64_x86_64_link_hash_newfunc): Function added.
4613 (elf64_x86_64_link_hash_table_create): Likewise.
4614 (elf64_x86_64_check_relocs): Likewise.
4615 (elf64_x86_64_gc_mark_hook): Likewise.
4616 (elf64_x86_64_gc_sweep_hook): Likewise.
4617 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4618 (elf64_x86_64_size_dynamic_sections): Likewise.
4619 (elf64_x86_64_discard_copies): Likewise.
4620 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4621 (elf64_x86_64_finish_dynamic_sections): Likewise.
4622 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4623
4624 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4625
4626 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4627 * Makefile.in: Regenerate.
4628
4629 2001-01-21 Kazu Hirata <kazu@hxi.com>
4630
4631 * coff-a29k.c: Fix formatting.
4632
4633 2001-01-19 H.J. Lu <hjl@gnu.org>
4634
4635 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4636 relocation section names.
4637 (elf_i386_relocate_section): Report files with bad relocation
4638 section names and return false.
4639
4640 2001-01-17 Bo Thorsen <bo@suse.de>
4641
4642 * targets.c: Alphabetize list of xvecs.
4643
4644 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4645
4646 * config.bfd: Add linux target variant for elfxx-hppa.
4647 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4648 bfd_elf64_hppa_linux_vec.
4649 * configure: Regenerate.
4650 * elf64-hppa.c: Include elf64-target.h again to support linux
4651 target variant.
4652 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4653 * elf32-hppa.c: Include elf32-target.h again to support linux
4654 target variant.
4655 (elf32_hppa_post_process_headers): New function.
4656 (elf_backend_post_process_headers): Define.
4657 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4658 bfd_elf32_hppa_linux_vec.
4659
4660 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4661 and data_segment_base fields.
4662 (elf32_hppa_link_hash_table_create ): Init them.
4663 (elf32_hppa_check_relocs): Update comments.
4664 (hppa_record_segment_addr): New function.
4665 (elf32_hppa_relocate_section): Call it.
4666 (final_link_relocate): Handle R_PARISC_SEGREL32.
4667 (elf32_hppa_final_link): New function.
4668 (bfd_elf32_bfd_final_link): Define to call it.
4669 (hppa_unwind_entry_compare): New function.
4670 * cache.c (bfd_open_file): Create files in write+read mode.
4671
4672 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4673 SEGREL32 and numerous other relocs. Change duplicate
4674 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4675
4676 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4677 O_ACCMODE.
4678
4679 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4680 .plt entries for DT_INIT and DT_FINI.
4681 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4682 DT_INIT and DT_FINI.
4683
4684 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4685 offsets for stub .plt access if wide mode. Check offset in range.
4686
4687 2001-01-13 Nick Clifton <nickc@redhat.com>
4688
4689 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4690 line.
4691
4692 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4693 line.
4694
4695 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4696
4697 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4698 * configure: Regenerate.
4699
4700 2001-01-11 Peter Targett <peter.targett@arccores.com>
4701
4702 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4703 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4704 * cpu-arc.c (arch_info_struct): Add entries for variants.
4705 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4706 (arc_get_mach) Don't assume machine names prefixed arc- before
4707 testing.
4708 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4709 selections.
4710 (arc_elf_final_write_processing) Likewise.
4711 (ELF_MACHINE_CODE) Use EM_ARC.
4712
4713 2001-01-10 Nick Clifton <nickc@redhat.com>
4714
4715 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4716
4717 2001-01-07 Philip Blundell <philb@gnu.org>
4718
4719 * README: Replace `bug-gnu-utils@gnu.org' with
4720 `bug-binutils@gnu.org'.
4721
4722 2001-01-04 Kazu Hirata <kazu@hxi.com>
4723
4724 * som.c: Fix formatting.
4725
4726 2001-01-03 Kazu Hirata <kazu@hxi.com>
4727
4728 * ecoffswap.h: Fix formatting.
4729 * elf-bfd.h: Likewise.
4730 * elfarm-nabi.c: Likewise.
4731 * elfarm-oabi.c: Likewise.
4732 * elfcode.h: Likewise.
4733 * elfcore.h: Likewise.
4734 * elflink.c: Likewise.
4735 * elflink.h: Likewise.
4736 * elfxx-ia64.c: Likewise.
4737 * elfxx-target.h: Likewise.
4738 * libbfd.c: Likewise
4739 * linker.c: Likewise.
4740 * lynx-core.c: Likewise.
4741
4742 2001-01-02 Kazu Hirata <kazu@hxi.com>
4743
4744 * pc532-mach.c: Fix formatting.
4745 * pe-arm.c: Likewise.
4746 * pe-i386.c: Likewise.
4747 * pe-mips.c: Likewise.
4748 * pe-ppc.c: Likewise.
4749 * pe-sh.c: Likewise.
4750 * pei-mips.c: Likewise.
4751 * pei-sh.c: Likewise.
4752 * peicode.h: Likewise.
4753 * ppcboot.c: Likewise.
4754 * ptrace-core.c: Likewise.
4755
4756 2001-01-01 Kazu Hirata <kazu@hxi.com>
4757
4758 * reloc.c: Fix formatting.
4759 * riscix.c: Likewise.
4760 * rs6000-core.c: Likewise.
4761 * xcoff-target.h: Likewise.
4762
4763 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4764
4765 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4766 error, by calling bfd_default_set_arch_mach with incoming
4767 values.
4768
4769 2000-12-26 Kazu Hirata <kazu@hxi.com>
4770
4771 * vaxnetbsd.c: Fix formatting.
4772 * versados.c: Likewise.
4773 * vms-gsd.c: Likewise.
4774 * vms-hdr.c: Likewise.
4775 * vms-misc.c: Likewise.
4776
4777 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4778
4779 * archive.c (coff_write_armap): Don't write more than symbol_count
4780 `archive_member_file_ptr's.
4781
4782 2000-12-25 Kazu Hirata <kazu@hxi.com>
4783
4784 * vms-tir.c: Fix formatting.
4785
4786 2000-12-23 Kazu Hirata <kazu@hxi.com>
4787
4788 * vms.c: Fix formatting.
4789 * vms.h: Likewise.
4790
4791 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4792
4793 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4794
4795 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4796
4797 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4798 arithmetic.
4799
4800 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4801
4802 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4803
4804 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
4805
4806 * libbfd.c (bfd_get_bits): Added
4807 (bfd_put_bits): Likewise
4808 * bfd-in.h: Declared the above.
4809 * bfd-in2.h: Regenerated.
4810
4811 2000-12-20 Kazu Hirata <kazu@hxi.com>
4812
4813 * targets.c: Fix formatting.
4814 * tekhex.c: Likewise.
4815 * trad-core.c: Likewise.
4816
4817 2000-12-19 Kazu Hirata <kazu@hxi.com>
4818
4819 * sco5-core.c: Fix formatting.
4820 * section.c: Likewise.
4821 * sparclinux.c: Likewise.
4822 * sparclynx.c: Likewise.
4823 * sparcnetbsd.c: Likewise.
4824 * srec.c: Likewise.
4825 * stabs.c: Likewise.
4826 * stab-syms.c: Likewise.
4827 * sunos.c: Likewise.
4828 * syms.c: Likewise.
4829 * sysdep.h: Likewise.
4830
4831 2000-12-18 Nick Clifton <nickc@redhat.com>
4832
4833 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4834 defined.
4835 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4836 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4837
4838 2000-12-18 Nick Clifton <nickc@redhat.com>
4839
4840 * vms-misc.c (_bfd_vms_get_record): Add default case to
4841 file_format switch.
4842
4843 2000-12-15 Miloslav Trmac <mitr@volny.cz>
4844
4845 * elfcore.h (elf_core_file_p): Move to the start of the program
4846 headers before attempting to read them.
4847
4848 2000-12-14 Kazu Hirata <kazu@hxi.com>
4849
4850 * peigen.c: Fix formatting.
4851 * som.c: Likewise.
4852 * som.h: Likewise.
4853
4854 2000-12-13 Kazu Hirata <kazu@hxi.com>
4855
4856 * peigen.c: Fix formatting.
4857
4858 2000-12-12 Jim Wilson <wilson@redhat.com>
4859
4860 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4861
4862 2000-12-08 Mark Salter <msalter@redhat.com>
4863
4864 * binary.c (binary_set_section_contents): Ignore sections
4865 with zero size.
4866
4867 2000-12-12 Kazu Hirata <kazu@hxi.com>
4868
4869 * m68klinux.c: Fix formatting.
4870 * m68knetbsd.c: Likewise.
4871 * mipsbsd.c: Likewise.
4872 * netbsd-core.c: Likewise.
4873 * netbsd.h: Likewise.
4874 * newsos3.c: Likewise.
4875 * nlm32-alpha.c: Likewise.
4876 * nlm32-i386.c: Likewise.
4877 * nlm32-ppc.c: Likewise.
4878 * nlm32-sparc.c: Likewise.
4879 * nlmcode.h: Likewise.
4880 * nlmswap.h: Likewise.
4881 * nlm-target.h: Likewise.
4882 * ns32knetbsd.c: Likewise.
4883
4884 2000-12-10 Fred Fish <fnf@be.com>
4885
4886 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4887 symbols in shared objects if allow_shlib_undefined is true.
4888
4889 2000-12-12 Nick Clifton <nickc@redhat.com>
4890
4891 * cpu-sh.c: Fix formattng.
4892 * elf.c: Fix formattng.
4893 * elf32-mips.c: Fix formattng.
4894 * elf32-sh.c: Fix formattng.
4895 * elf64-alpha.c: Fix formattng.
4896
4897 2000-12-09 Nick Clifton <nickc@redhat.com>
4898
4899 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4900 dwarf2_find_line_info as last parameter to invocation of
4901 _bfd_dwarf2_find_nearest_line.
4902 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4903 dwarf2_find_line_info as last parameter to invocation of
4904 _bfd_dwarf2_find_nearest_line.
4905
4906 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4907
4908 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4909 (BFD_LIBS): ...to here.
4910 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4911 (BFD_LIBS_CFILES): ...to here.
4912 * Makefile.in: Regenerate.
4913 * configure.in: Remove dwarf.lo from the elf shell variable.
4914 * configure: Regenerate.
4915 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4916 * libcoff.h: Regenerate.
4917 * coffgen.c (coff_find_nearest_line): Call
4918 _bfd_dwarf2_find_nearest_line.
4919 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4920 accordingly.
4921 (read_abbrevs): Likewise
4922 (decode_line_info): Likewise.
4923 (parse_comp_unit): Likewise.
4924 (comp_unit_find_nearest_line): Likewise.
4925 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4926 * libbfd.h: Regenerate.
4927 * elf.c (_bfd_elf_find_nearest_line): Update call.
4928 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4929 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4930 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4931 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4932 (styp_to_sec_flags): Handle DWARF2 sections.
4933 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4934 to _bfd_find_nearest_line.
4935 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4936 call to _bfd_find_nearest_line.
4937
4938 2000-12-08 Kazu Hirata <kazu@hxi.com>
4939
4940 * coffgen.c: Fix formatting.
4941 * elf-m10300.c: Likewise.
4942 * elf32-i386.c: Likewise.
4943 * elf32-i960.c: Likewise.
4944 * elf32-m68k.c: Likewise.
4945 * elf32-mcore.c: Likewise.
4946 * elf32-ppc.c: Likewise.
4947 * elf32-sh.c: Likewise.
4948 * elf32-sparc.c: Likewise.
4949 * elf32-v850.c: Likewise.
4950 * elf64-alpha.c: Likewise.
4951 * elf64-hppa.c: Likewise.
4952 * elf64-mips.c: Likewise.
4953 * elf64-sparc.c: Likewise.
4954
4955 2000-12-07 Kazu Hirata <kazu@hxi.com>
4956
4957 * elf32-ppc.c: Fix formatting.
4958 * elf64-x86-64.c: Likewise.
4959
4960 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4961
4962 From Ralf Baechle <ralf@gnu.org>
4963
4964 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4965 BFDs containing no sections or empty .text, .data or .bss sections
4966 to be merged, regardless of their flags.
4967
4968 2000-12-06 Kazu Hirata <kazu@hxi.com>
4969
4970 * elf32-m32r.c: Fix formatting.
4971 * elf32-m68hc11.c: Likewise.
4972 * elf32-m68hc12.c: Likewise.
4973 * elf32-m68k.c: Likewise.
4974 * elf32-mcore.c: Likewise.
4975 * elf32-pj.c: Likewise.
4976 * elf32-ppc.c: Likewise.
4977
4978 2000-12-05 Kazu Hirata <kazu@hxi.com>
4979
4980 * elf32-fr30.c: Fix formatting.
4981 * elf32-hppa.c: Likewise.
4982 * elf32-i370.c: Likewise.
4983 * elf32-i386.c: Likewise.
4984 * elf32-i860.c: Likewise.
4985 * elf32-i960.c: Likewise.
4986
4987 2000-12-03 Kazu Hirata <kazu@hxi.com>
4988
4989 * elf32-arm.h: Fix formatting.
4990 * elf32-avr.c: Likewise.
4991 * elf32-cris.c: Likewise.
4992 * elf32-d10v.c: Likewise.
4993 * elf32-d30v.c: Likewise.
4994 * elf-hppa.h: Likewise.
4995 * elf-m10200.c: Likewise.
4996 * elf-m10300.c: Likewise.
4997
4998 2000-12-01 Chris Demetriou <cgd@sibyte.com>
4999
5000 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5001 bfd_mach_mips32_4k. Update FIXME comment.
5002 * archures.c (bfd_mach_mips32): New constant.
5003 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5004 the latter, renumber it.
5005 * bfd-in2.h (bfd_mach_mips32): New constant.
5006 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5007 the latter, renumber it.
5008 * cpu-mips.c (I_mips32): New constant.
5009 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5010 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5011 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5012 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5013 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5014 with E_MIPS_MACH_MIPS32_4K.
5015 (_bfd_mips_elf_final_write_processing): Replace
5016 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5017 bfd_mach_mips32 case.
5018 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5019 comparison with support for MIPS32.
5020 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5021 MIPS32.
5022
5023 * aoutx.h (NAME(aout,machine_type)): Add cases for
5024 bfd_mach_mips5 and bfd_mach_mips64.
5025 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5026 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5027 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5028 (arch_info_struct): Add entries for bfd_mach_mips5 and
5029 bfd_mach_mips64.
5030 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5031 _bfd_mips_elf_print_private_bfd_data): Add cases for
5032 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5033 (_bfd_mips_elf_final_write_processing): Add cases for
5034 bfd_mach_mips5 and bfd_mach_mips64.
5035
5036 * aoutx.h (NAME(aout,machine_type)): Add a
5037 bfd_mach_mips_sb1 case.
5038 * archures.c (bfd_mach_mips_sb1): New constant.
5039 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5040 * cpu-mips.c (I_sb1): New constant.
5041 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5042 * elf32-mips.c (elf_mips_mach): Add case for
5043 E_MIPS_MACH_SB1.
5044 (_bfd_mips_elf_final_write_processing): Add case for
5045 bfd_mach_mips_sb1.
5046
5047 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5048
5049 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5050 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5051 (sparc*-*-rtems*): Switched from a.out to ELF.
5052
5053 2000-11-30 Jan Hubicka <jh@suse.cz>
5054
5055 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5056 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5057 (elf64-x86-64.lo): Add dependencies.
5058 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5059 bfd_mach_x86_64_intel_syntax.
5060 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5061 * config.bfd (x86_64): Add.
5062 * configure.in: Add support for bfd_elf64_x86_64_vec.
5063 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5064 (bfd_i386_arch, i8086_ar): Link in.
5065 * elf64-x86-64.c: New file.
5066 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5067 * targets.c (bfd_elf64_x86_64_vec): Add.
5068 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5069
5070 2000-11-30 Kazu Hirata <kazu@hxi.com>
5071
5072 * xcofflink.c: Fix formatting.
5073
5074 2000-11-28 Kazu Hirata <kazu@hxi.com>
5075
5076 * aoutx.h: Fix formatting.
5077 * bfd-in.h: Likewise.
5078 * bfd-in2.h: Likewise.
5079 * cache.c: Likewise.
5080 * cisco-core.c: Likewise.
5081 * coff64-rs6000.c: Likewise.
5082 * coffcode.h: Likewise.
5083 * coffswap.h: Likewise.
5084 * corefile.c: Likewise.
5085 * elf32-mips.c: Likewise.
5086
5087 2000-11-27 Kazu Hirata <kazu@hxi.com>
5088
5089 * aout-adobe.c: Fix formatting.
5090 * coff64-rs6000.c: Likewise.
5091 * coffgen.c: Likewise.
5092 * cofflink.c: Likewise.
5093
5094 2000-11-27 Philip Blundell <pb@futuretv.com>
5095
5096 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5097 (obj_coff_strings_written): New accessor macro for above.
5098 * libcoff.h: Regenerate.
5099 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5100 strings.
5101 * coffcode.h (coff_write_object_contents): No need to write out
5102 the string table if it's already been done.
5103
5104 2000-11-22 Philip Blundell <pb@futuretv.com>
5105
5106 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5107 weak undefined symbols.
5108
5109 2000-11-24 Nick Clifton <nickc@redhat.com>
5110
5111 * archures.c (bfd_mach_arm_5TE): Define.
5112 (bfd_mach_arm+XScale): Define.
5113 * bfd-in2.h: Regenerate.
5114
5115 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5116 BFD_RELOC_ARM_PCREL_BLX.
5117
5118 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5119 XScale machine numbers.
5120
5121 * config.bfd (xscale-elf): Add target.
5122 (xscale-coff): Add target.
5123
5124 * cpu-arm.c: Add xscale machine name.
5125 Add v5t, v5te and XScale machine numbers.
5126
5127 2000-11-23 Kazu Hirata <kazu@hxi.com>
5128
5129 * aix386-core.c: Fix formatting.
5130
5131 2000-11-22 Jim Wilson <wilson@redhat.com>
5132
5133 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5134 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5135 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5136 (ins_imms_scaled): Initialize sign_bit at function entry.
5137 (elf64_ia64_operands): Add missing initializers.
5138 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5139 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5140 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5141 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5142 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5143 parameters.
5144 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5145 and free_extsyms at function entry.
5146 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5147 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5148 (get_got): Delete unused local srel.
5149 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5150 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5151
5152 2000-11-21 Kazu Hirata <kazu@hxi.com>
5153
5154 * coff-a29k.c: Fix formatting.
5155 * coff-h8500.c: Likewise.
5156 * coff-i960.c: Likewise.
5157 * coff-ppc.c: Likewise.
5158 * coff-rs6000.c: Likewise.
5159 * coff-stgo32.c: Likewise.
5160 * coff-tic54x.c: Likewise.
5161 * coff-w65.c: Likewise.
5162 * cpu-h8500.c: Likewise.
5163 * cpu-hppa.c: Likewise.
5164 * cpu-ns32k.c: Likewise.
5165 * ecoff.c: Likewise.
5166 * ecofflink.c: Likewise.
5167
5168 2000-11-21 Nick Clifton <nickc@redhat.com>
5169
5170 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5171 remove possibility of infinite loop.
5172
5173 2000-11-20 Kazu Hirata <kazu@hxi.com>
5174
5175 * aix386-core.c: Fix formatting.
5176 * aout-adobe.c: Likewise.
5177 * aout-arm.c: Likewise.
5178 * aout-encap.c: Likewise.
5179 * aout-ns32k.c: Likewise.
5180 * aout-target.h: Likewise.
5181 * aout-tic30.c: Likewise.
5182 * aoutf1.h: Likewise.
5183 * aoutx.h: Likewise.
5184 * archive.c: Likewise.
5185 * bfd-in.h: Likewise.
5186 * bfd-in2.h: Likewise.
5187 * bfd.c: Likewise.
5188 * bout.c: Likewise.
5189
5190 2000-11-17 H.J. Lu <hjl@gnu.org>
5191
5192 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5193 pltoff entries for DT_INIT and DT_FINI.
5194 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5195 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5196 entries.
5197
5198 2000-11-16 Richard Henderson <rth@redhat.com>
5199
5200 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5201 (allocate_dynrel_entries): Likewise.
5202 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5203 (set_pltoff_entry): Likewise.
5204 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5205 (elfNN_ia64_reloc_type_lookup): Likewise.
5206 (elfNN_ia64_install_value): Likewise.
5207 (elfNN_ia64_relocate_section): Likewise.
5208 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5209 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5210
5211 2000-11-16 Kazu Hirata <kazu@hxi.com>
5212
5213 * cpu-a29k.c: Fix formatting.
5214 * cpu-alpha.c: Likewise.
5215 * cpu-arm.c: Likewise.
5216 * cpu-avr.c: Likewise.
5217 * cpu-d10v.c: Likewise.
5218 * cpu-h8500.c: Likewise.
5219 * cpu-hppa.c: Likewise.
5220 * cpu-i370.c: Likewise.
5221 * cpu-i386.c: Likewise.
5222 * cpu-i960.c: Likewise.
5223 * cpu-ia64-opc.c: Likewise.
5224 * cpu-ia64.c: Likewise.
5225 * cpu-m32r.c: Likewise.
5226 * cpu-m68hc11.c: Likewise.
5227 * cpu-m68hc12.c: Likewise.
5228 * cpu-m68k.c: Likewise.
5229 * cpu-m88k.c: Likewise.
5230 * cpu-mips.c: Likewise.
5231 * cpu-ns32k.c: Likewise.
5232 * cpu-pj.c: Likewise.
5233 * cpu-powerpc.c: Likewise.
5234 * cpu-sh.c: Likewise.
5235 * cpu-sparc.c: Likewise.
5236 * cpu-tic54x.c: Likewise.
5237 * cpu-v850.c: Likewise.
5238 * cpu-vax.c: Likewise.
5239 * cpu-w65.c: Likewise.
5240 * cpu-we32k.c: Likewise.
5241 * cpu-z8k.c: Likewise.
5242 * dwarf1.c: Likewise.
5243 * dwarf2.c: Likewise.
5244
5245 2000-11-15 Kazu Hirata <kazu@hxi.com>
5246
5247 * coff-arm.c: Fix formatting.
5248 * coff-ppc.c: Likewise.
5249 * coff-rs6000.c: Likewise.
5250 * coff-sh.c: Likewise.
5251 * coff-sparc.c: Likewise.
5252 * coff-tic30.c: Likewise.
5253 * coff-tic54x.c: Likewise.
5254 * coff-tic80.c: Likewise.
5255 * coff-w65.c: Likewise.
5256 * coff-we32k.c: Likewise.
5257 * coff-z8k.c: Likewise.
5258
5259 2000-11-15 Richard Henderson <rth@redhat.com>
5260
5261 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5262 section with the same ALLOC|LOAD flags as the source section.
5263
5264 2000-11-14 Jakub Jelinek <jakub@redhat.com>
5265
5266 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5267 by STO_ALPHA constants.
5268
5269 2000-11-14 Kazu Hirata <kazu@hxi.com>
5270
5271 * coff-pmac.c: Fix formatting.
5272 * coff-ppc.c: Likewise.
5273
5274 2000-11-13 H.J. Lu <hjl@gnu.org>
5275
5276 * elflink.h (elf_link_add_object_symbols): Also add indirect
5277 symbols for common symbols with the default version.
5278
5279 2000-11-09 Philip Blundell <pb@futuretv.com>
5280
5281 * section.c (STD_SECTION): Set gc_mark flag.
5282
5283 2000-11-11 Kazu Hirata <kazu@hxi.com>
5284
5285 * coff-i960.c: Likewise.
5286 * coff-m68k.c: Likewise.
5287 * coff-m88k.c: Likewise.
5288 * coff-mcore.c: Likewise.
5289 * coff-mips.c: Likewise.
5290
5291 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5292
5293 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5294
5295 2000-11-10 Kazu Hirata <kazu@hxi.com>
5296
5297 * coff-h8300.c: Fix formatting.
5298 * coff-h8500.c: Likewise.
5299 * coff-i386.c: Likewise.
5300 * coff-i860.c: Likewise.
5301 * coff-i960.c: Likewise.
5302 * coff-ia64.c: Likewise.
5303
5304 2000-11-09 Kazu Hirata <kazu@hxi.com>
5305
5306 * archive.c: Fix formatting.
5307 * archures.c: Likewise.
5308
5309 2000-11-07 Richard Henderson <rth@redhat.com>
5310
5311 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5312 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5313 * section.c (bfd_set_section_contents): Call memcpy if
5314 section->contents set and location not equal to contents plus offset.
5315
5316 2000-11-08 Kazu Hirata <kazu@hxi.com>
5317
5318 * bfd-in.h: Fix formatting.
5319 * bfd-in2.h: Likewise.
5320 * bfd.c: Likewise.
5321 * binary.c: Likewise.
5322 * bout.c: Likewise.
5323 * coff-a29k.c: Likewise.
5324 * coff-alpha.c: Likewise.
5325 * coff-apollo.c: Likewise.
5326 * coff-aux.c: Likewise.
5327
5328 2000-11-07 Kazu Hirata <kazu@hxi.com>
5329
5330 * aix386-core.c: Fix formatting.
5331 * aoutf1.h: Likewise.
5332 * aoutx.h: Likewise.
5333 * archures.c: Likewise.
5334 * armnetbsd.c: Likewise.
5335
5336 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5337
5338 * coff-h8300.c (special): Adjust reloc address.
5339
5340 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5341
5342 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5343 to differentiate elf32 and elf64 on ia64.
5344 * bfd-in2.h: Regenerate.
5345 * config.bfd: Add target for "ia64*-*-hpux*".
5346 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5347 * configure: Regenerate.
5348 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5349 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5350
5351 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5352 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5353 * Makefile.in: Regnerate.
5354 * elf64-ia64.c: Deleted.
5355 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5356
5357 2000-11-06 Kazu Hirata <kazu@hxi.com>
5358
5359 * aout-adobe.c: Fix formatting.
5360 * aout-arm.c: Likewise.
5361 * aout-cris.c: Likewise.
5362 * aout-encap.c: Likewise.
5363 * aout-ns32k.c: Likewise.
5364 * aout-target.h: Likewise.
5365 * aout-tic30.c: Likewise.
5366
5367 2000-11-05 Philip Blundell <philb@gnu.org>
5368
5369 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5370 BFDs containing no sections to be merged, regardless of their flags.
5371
5372 2000-11-04 Philip Blundell <philb@gnu.org>
5373
5374 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5375 if a relocation for an undefined symbol also results in an
5376 overflow.
5377
5378 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5379
5380 * config.bfd: Add support for Sun Chorus.
5381
5382 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5383
5384 * configure.in: Recognize alpha-*-freebsd*.
5385 * configure: Regenerate.
5386
5387 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5388
5389 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5390 (Chunk): New global variable set by a parameter in objcopy.c.
5391 (S3Forced): New global variable set by a parameter in
5392 objcopy.c.
5393 (srec_set_section_contents): If S3Forced is true, always generate
5394 S3 records.
5395 (srec_write_section): Use 'Chunk' to limit maximum length of S
5396 records.
5397
5398 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5399
5400 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5401 * Makefile.in: Regenerate.
5402 * bfd-in2.h: Regenerate.
5403 * po/bfd.pot: Regenerate.
5404
5405 2000-10-31 Philip Blundell <philb@gnu.org>
5406
5407 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5408 EF_SOFT_FLOAT if it is defined.
5409
5410 2000-10-27 Philip Blundell <philb@gnu.org>
5411
5412 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5413 attempts to mix PIC code with non-PIC, just mark the output as
5414 being position dependent.
5415 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5416 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5417 all mismatches, not just the first one.
5418
5419 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5420
5421 * ieee.c (ieee_archive_p): Plug one of many possible
5422 memory leaks in error handling.
5423
5424 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5425
5426 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5427 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5428 Support v8plusb.
5429 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5430 sparc64_elf_object_p): Support v9b.
5431 * archures.c: Declare v8plusb and v9b machines.
5432 * bfd-in2.h: Ditto.
5433 * cpu-sparc.c: Ditto.
5434
5435 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5436
5437 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5438 of a GOT reloc.
5439
5440 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5441 (SYMBOL_CALLS_LOCAL): New macro.
5442 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5443 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5444 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5445 (ppc_elf_relocate_section): Use flag variable to determine
5446 whether the relocation refers to a local symbol.
5447 Test whether a PLTREL24 reloc will produce a reloc by looking
5448 to see whether a PLT entry was made.
5449
5450 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5451
5452 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5453 entries that could serve as a definition for a weak symbol.
5454
5455 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5456
5457 From Ralf Baechle <ralf@gnu.org>
5458
5459 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5460 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5461 against local symbols.
5462 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5463
5464 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5465
5466 * section.c (struct sec): Add kept_section.
5467 (struct bfd_comdat_info): Remove sec, we can use above.
5468 (STD_SECTION): Add initializer.
5469 (bfd_make_section_anyway): Init here too.
5470
5471 * bfd-in2.h: Regenerate.
5472
5473 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5474 zeroing of `flags'.
5475 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5476 fudge values for discarded link-once section symbols.
5477
5478 * elf64-hppa.c: Include alloca-conf.h
5479
5480 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5481
5482 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5483
5484 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5485
5486 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5487
5488 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5489
5490 2000-10-10 Tom Rix <trix@redhat.com>
5491
5492 * section.c (bfd_make_section_anyway): Release newsect ptr when
5493 newsect->symbol fails to alloc. Use bfd_release instead of free.
5494
5495 2000-10-09 Richard Henderson <rth@cygnus.com
5496
5497 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5498 (elf64_ia64_unwind_entry_compare): New.
5499 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5500
5501 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5502
5503 * elflink.h (size_dynamic_sections): Don't create various tags if
5504 .dynstr is excluded from the link. Don't set first dynsym entry
5505 if dynsymcount is zero.
5506 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5507 .dynsym excluded from the link. Don't try to write any dynamic
5508 sections excluded from the link.
5509
5510 * elf.c (swap_out_syms): Handle global section symbols.
5511
5512 2000-10-05 DJ Delorie <dj@redhat.com>
5513
5514 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5515 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5516 (coff_write_relocs): write extended reloc count
5517 (coff_write_object_contents): account for extended relocs
5518
5519 2000-10-05 Jim Wilson <wilson@cygnus.com>
5520
5521 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5522 field.
5523 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5524 elf_backend_section_flags function.
5525 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5526 code.
5527 (elf64_ia64_section_flags): New function containing flag conversion
5528 code.
5529 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5530 * elfxx-target.h (elf_backend_section_flags): Define.
5531 (elfNN_bed): Initialize elf_backend_section_flags field.
5532
5533 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5534
5535 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5536 _bfd_elf32_gc_record_vtable. Correct a comment.
5537
5538 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5539
5540 From Ralf Baechle <ralf@gnu.org>
5541
5542 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5543 produces binaries with got[1] = 0x80000001 to differenciate them
5544 for the dynamic linker from the broken binaries produced by old
5545 versions.
5546
5547 2000-09-30 Petr Sorfa <petrs@sco.com>
5548
5549 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5550 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5551 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5552 * configure: Regenerate.
5553
5554 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5555
5556 Define two bfd_targets for absence and presence of leading
5557 underscore on symbols. Make sure to only link same kind.
5558 * elf32-cris.c (cris_elf_object_p,
5559 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5560 cris_elf_merge_private_bfd_data): New.
5561 (elf_backend_object_p, elf_backend_final_write_processing,
5562 bfd_elf32_bfd_print_private_bfd_data,
5563 bfd_elf32_bfd_merge_private_bfd_data): Define.
5564 <Target vector definition>: Include elf32-target.h twice with
5565 different macro settings:
5566 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5567 bfd_elf32_us_cris_vec.
5568 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5569 (elf_symbol_leading_char): First as 0, then '_'.
5570 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5571 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5572 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5573 * configure: Regenerate.
5574 * targets.c: Declare bfd_elf32_us_cris_vec.
5575 * po/bfd.pot: Regenerate.
5576
5577 2000-09-29 Momchil Velikov <velco@fadata.bg>
5578
5579 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5580 R_ARM_THM_PC22 relocations.
5581
5582 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5583
5584 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5585
5586 2000-09-29 Momchil Velikov <velco@fadata.bg>
5587
5588 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5589 is has the SEC_HAS_CONTENTS flag set.
5590
5591 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
5592 Hans-Peter Nilsson <hp@axis.com>
5593
5594 * aout-cris.c (N_TXTADDR): Define.
5595
5596 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5597
5598 * som.c: Include alloca-conf.h.
5599 * Makefile.am: "make dep-am"
5600 * Makefile.in: Regenerate.
5601
5602 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5603
5604 * elf32-hppa.c (plt_stub): New.
5605 (PLT_STUB_ENTRY): Define.
5606 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5607 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5608 (elf32_hppa_link_hash_table_create): Init to suit.
5609 (elf32_hppa_check_relocs): Set has_12bit_branch and
5610 has_17bit_branch as appropriate.
5611 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5612 non-local functions.
5613 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5614 Add space for plt_stub as needed.
5615 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5616 functions at plt_stub.
5617 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5618 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5619
5620 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5621 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5622 of fixed size, and if negative, disable handling of input sections
5623 before stub section. Set up default stub group size depending
5624 on detected branch relocs.
5625 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5626 ensure different offsets from sym_value aren't rounded to
5627 different 2k blocks. Use lrsel and rrsel for other stubs too for
5628 consistency rather than necessity.
5629 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5630 (final_link_relocate): Likewise.
5631 (elf32_hppa_relocate_section): Likewise.
5632
5633 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5634 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5635 (elf_hppa_final_link_relocate): Handle them.
5636 (elf_hppa_relocate_insn): Likewise.
5637 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5638
5639 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5640
5641 * elfcode.h (elf_object_p): Preserve and clear abfd section
5642 information. Restore at error.
5643
5644 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5645
5646 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5647 is empty, make sure that its rva also 0. NT loader dislikes
5648 having otherwise.
5649
5650 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5651
5652 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5653 global by default.
5654
5655 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5656
5657 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5658 currently unused RELATIVE_DYNAMIC_RELOCS code.
5659 (hppa_discard_copies): Likewise.
5660 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5661 comments. Don't check non-code output sections for stub grouping.
5662
5663 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5664
5665 * section.c (bfd_get_unique_section_name): Return NULL if
5666 bfd_malloc fails.
5667
5668 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5669
5670 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5671 instruction sequence to actually work.
5672 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5673 accordingly.
5674
5675 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5676
5677 * elf32-sh.c (sh_elf_relocate_section): Use
5678 _bfd_final_link_relocate to apply the relocation against a section
5679 symbol, when doing relocatable links.
5680
5681 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5682
5683 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5684 to id_sec.
5685 (stub_hash_newfunc): Here too.
5686 (hppa_add_stub): And here.
5687 (elf32_hppa_link_hash_table): Remove stub_section_created,
5688 reloc_section_created, first_init_sec and first_fini_sec. Add
5689 stub_group.
5690 (elf32_hppa_link_hash_table_create): Init to suit.
5691 (hppa_get_stub_entry): Add support for grouping stub sections.
5692 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5693 section code. Index stub vars by section->id.
5694 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5695 exit paths. Zap allocation of above removed vars. Refine
5696 link-once test.
5697
5698 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5699 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5700 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5701 rather than pointer to bfd_link_info.
5702 (hppa_add_stub): Likewise.
5703 (final_link_relocate): Likewise.
5704
5705 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5706
5707 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5708 link-once sections.
5709
5710 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5711
5712 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5713 ld/emulparams/shelf.sh.
5714
5715 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5716
5717 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5718 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5719 * bfd-in2.h: Regenerate.
5720
5721 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5722
5723 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5724 LITUSE relocations incorrectly if -relax is specified on the ld
5725 command line and the displacement field of the load or store
5726 instruction is non-zero. (Patch by paul.winalski@compaq.com)
5727
5728 2000-09-15 Alan Modra <alan@linuxcare.com.au>
5729
5730 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5731 first_fini_sec here.
5732 (elf32_hppa_size_stubs): Instead correctly find the first .init
5733 and .fini section here.
5734
5735 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5736
5737 * elf32-hppa.c (clobber_millicode_symbols): New function.
5738 (elf32_hppa_size_dynamic_sections): Call it.
5739
5740 2000-09-14 Alan Modra <alan@linuxcare.com.au>
5741
5742 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5743 packed. Add plabel, plt_abs packed booleans.
5744 (hppa_link_hash_newfunc): Init new fields.
5745 (PLABEL_PLT_ENTRY_SIZE): Define.
5746 (hppa_stub_name): Use size_t len vars.
5747 (hppa_add_stub): Likewise.
5748 (elf32_hppa_build_stubs): Likewise.
5749 (hppa_build_one_stub): Kill some compiler warnings.
5750 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5751 if dynamic linking. Munge the local plt offsets into
5752 local_got_refcounts. Set h->plabel for all global PLABELs. Use
5753 size_t len vars. Add assert for plabel addend.
5754 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5755 (elf32_hppa_hide_symbol): New function.
5756 (elf_backend_hide_symbol): Define.
5757 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5758 with h->plabel set. Don't make plt entries to have dynamic syms
5759 when they have been forced local. If plt entry is used by a
5760 plabel, make it PLABEL_PLT_ENTRY_SIZE.
5761 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5762 Set up .plt offsets for local syms.
5763 (elf32_hppa_relocate_section): Initialise plt entries for local
5764 syms. Leave weak undefined plabels zero. Make global plabel
5765 relocs against function symbol, and leave the addend zero.
5766 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5767 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5768 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
5769 relocs instead of SEGREL32 for dynamic got relocs.
5770 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5771 (elf_backend_got_header_size): Adjust.
5772 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5773
5774 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5775 (hppa_type_of_stub): Use it instead of #if 0
5776 (hppa_discard_copies): Use it here too.
5777 (elf32_hppa_size_dynamic_sections): And here.
5778
5779 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5780 (elf32_hppa_link_hash_table_create): And here.
5781 (hppa_build_one_stub): And here. Instead keep track of stub
5782 offset using _raw_size.
5783 (elf32_hppa_size_stubs): Likewise.
5784 (elf32_hppa_build_stubs): Likewise.
5785 (hppa_size_one_stub): Likewise. Resize reloc section too.
5786
5787 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5788 first_fini_sec handling. Don't search for reloc section or set
5789 hplink->reloc_section_created here.
5790 (elf32_hppa_size_stubs): Instead search for reloc sections, and
5791 set reloc_section_created here.
5792 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5793 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
5794 and DT_FINI.
5795 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
5796
5797 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
5798 with `hplink->root.'.
5799 (elf32_hppa_check_relocs): Likewise.
5800 (elf32_hppa_gc_sweep_hook): Likewise.
5801 (elf32_hppa_adjust_dynamic_symbol): Likewise.
5802 (hppa_handle_PIC_calls): Likewise.
5803 (elf32_hppa_size_dynamic_sections): Likewise.
5804 (elf32_hppa_set_gp): Likewise.
5805 (elf32_hppa_relocate_section): Likewise.
5806 (elf32_hppa_finish_dynamic_symbol): Likewise.
5807 (elf32_hppa_finish_dynamic_sections): Likewise.
5808
5809 From David Huggins-Daines <dhd@linuxcare.com>
5810 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
5811 defined weak symbols in shared links.
5812 (final_link_relocate): Calls to defined weak symbols in shared
5813 objects must go via import stubs, as the target might not be known
5814 at link time.
5815
5816 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
5817
5818 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
5819 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
5820 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
5821 the original entries with EMPTY_HOWTOs, and added new ones to fill
5822 in the gap.
5823 (sh_elf_info_to_howto): Make sure the new gap isn't used.
5824 (sh_elf_relocate_section): Likewise.
5825
5826 2000-09-13 Anders Norlander <anorland@acc.umu.se>
5827
5828 * cpu-mips.c (arch_info_struct): Add mips:4K
5829 * bfd-in2.h (bfd_mach_mips4K): New define.
5830 * archures.c: Add bfd_mach_mips4K to comment.
5831 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
5832 E_MIPS_ARCH_2 for bfd_mach_mips4K.
5833
5834 2000-09-13 Marco Franzen <marcof@thyron.com>
5835
5836 * som.c (som_write_symbol_strings): Do not used fixed buffers,
5837 use size_t as a counter.
5838 (som_write_space_strings): Similarly.
5839
5840 2000-09-12 Jason Eckhardt <jle@cygnus.com>
5841
5842 * elf32-i860.c (elf32_i860_relocate_pc26): New function
5843 and prototype.
5844 (elf32_i860_relocate_section): Invoke new function from here.
5845
5846 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5847
5848 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
5849 static.
5850
5851 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5852
5853 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
5854 target section name instead of dumping core when the target symbol is
5855 undefined.
5856
5857 2000-09-09 Kazu Hirata <kazu@hxi.com>
5858
5859 * riscix.c: Remove DEFUN.
5860
5861 2000-09-08 Nick Clifton <nickc@redhat.com>
5862
5863 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
5864 initialise flags in output bfd if the input bfd is the default
5865 architecture with the default flags.
5866
5867 2000-09-08 Kazu Hirata <kazu@hxi.com>
5868
5869 * archive.c: Fix formatting.
5870 * coff-arm.c: Likewise.
5871 * doc/chew.c: Likewise.
5872
5873 2000-09-08 Alan Modra <alan@linuxcare.com.au>
5874
5875 * section.c (bfd_get_unique_section_name): Put a dot before the
5876 numeric suffix.
5877
5878 2000-09-07 Kazu Hirata <kazu@hxi.com>
5879
5880 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
5881 * elf.c: Fix formatting.
5882
5883 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
5884
5885 * config.bfd (sh-*-linux*): Added.
5886 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
5887 * targets.c: Declare them.
5888 * elf32-sh-lin.c: New file.
5889 * Makefile.am: Compile it.
5890 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
5891 * configure, Makefile.in: Rebuilt.
5892
5893 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
5894
5895 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
5896 pseduo-section when determining where the TOC ends.
5897
5898 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
5899 output x_tvndx as it is only two bytes wide.
5900
5901 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
5902 reloc is 26 or 32 bits wide.
5903
5904 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
5905 for relocs that don't change anything. Also look at the full
5906 6 bits of bitsize.
5907
5908 2000-09-06 Philip Blundell <philb@gnu.org>
5909
5910 * config.bfd (arm*-*-uclinux*): New target.
5911
5912 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
5913
5914 * configure: Rebuilt with new libtool.m4.
5915
5916 2000-09-06 Alan Modra <alan@linuxcare.com.au>
5917
5918 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
5919 word for variable name.
5920 * bfd-in2.h: Regenerate.
5921
5922 2000-09-05 Nick Clifton <nickc@redhat.com>
5923
5924 * config.in: Regenerate.
5925 * libbfd.h: Regenerate.
5926 * po/bfd.pot: Regenerate.
5927 * doc/bfdint.texi: Remove CVS date string - it foils compares with
5928 local versions.
5929
5930 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
5931
5932 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
5933
5934 2000-09-05 Alan Modra <alan@linuxcare.com.au>
5935
5936 Shared library and PIC support.
5937 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
5938 (GOT_ENTRY_SIZE): New.
5939 (ELF_DYNAMIC_INTERPRETER): New.
5940 (STUB_SUFFIX): Define.
5941 (LONG_BRANCH_PIC_IN_SHLIB): Define.
5942 (RELATIVE_DYNAMIC_RELOCS): Define.
5943 (enum elf32_hppa_stub_type): New.
5944 (struct elf32_hppa_stub_hash_entry): Rename offset to
5945 stub_offset. Add a number of new fields.
5946 (struct elf32_hppa_link_hash_entry): New.
5947 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
5948 global_value.
5949 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
5950 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
5951 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
5952 new fields.
5953 (hppa_link_hash_newfunc): New function.
5954 (elf32_hppa_link_hash_table_create): Use above function. Init new
5955 fields.
5956 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
5957 instead of addend, and remove sym_name from args. Don't use
5958 symbol name for local syms, instead use sym index.
5959 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
5960 stub type rather than size. Pass in hash and handle import stub
5961 case. Also pass in reloc instead of offset so we can calculate
5962 PCREL22F and PCREL12F branches properly.
5963 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
5964 import and export stubs too.
5965 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
5966 import and export stub sizing.
5967 (elf32_hppa_check_relocs): New function.
5968 (elf32_hppa_adjust_dynamic_symbol): New function.
5969 (hppa_discard_copies): New function.
5970 (elf32_hppa_size_dynamic_sections): New function.
5971 (elf_backend_size_dynamic_sections): Define.
5972 (elf32_hppa_finish_dynamic_symbol): New function.
5973 (elf_backend_finish_dynamic_symbol): Define.
5974 (elf32_hppa_size_stubs): Stash params in link hash table, and move
5975 some local vars into the link hash table too. For shared links,
5976 trundle over function syms, generating export stubs. Handle
5977 PCREL22F branches. Break out stub creation code from here..
5978 (hppa_add_stub): .. to here. New function.
5979 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
5980 call the bfd linker. Use elf_gp to record global pointer.
5981 Calculate a value from sections if $global$ is missing.
5982 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
5983 (elf32_hppa_gc_mark_hook): New function.
5984 (elf_backend_gc_mark_hook): Define.
5985 (elf32_hppa_gc_sweep_hook): New function.
5986 (elf_backend_gc_sweep_hook): Define.
5987 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
5988 Add rel to args, and remove howto, input_bfd, offset, addend,
5989 sym_name as we can recalculate these locally. Handle calls to
5990 dynamic objects, extra PIC relocs, PCREL22F branches. Change
5991 handling of undefined weak syms. Check that stubs are in range.
5992 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
5993 message on hitting a DPREL21L reloc that needs fixing. Subtract
5994 off PC for PCREL14F. Break out code that does a stub lookup from
5995 here..
5996 (hppa_get_stub_entry): ..to here. New function.
5997 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
5998 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
5999 relocs, etc. etc.
6000 (elf32_hppa_finish_dynamic_sections): New function.
6001 (elf_backend_finish_dynamic_sections): Define.
6002 (elf_backend_final_write_processing) Define.
6003 (hppa_handle_PIC_calls): New function.
6004 (elf32_hppa_build_stubs): Call it. Pass link_info to
6005 hppa_build_one_stub.
6006 (elf32_hppa_create_dynamic_sections): New function
6007 to create .plt and .got then set .plt flags correctly.
6008 (elf_backend_create_dynamic_sections): Define.
6009 (elf32_hppa_object_p): New function.
6010 (elf_backend_object_p): Define.
6011 (elf32_hppa_elf_get_symbol_type): New function.
6012 (elf_backend_get_symbol_type): Define.
6013 (elf_backend_can_gc_sections): Define.
6014 (elf_backend_want_got_plt): Define.
6015 (elf_backend_plt_alignment): Set to 2.
6016 (elf_backend_plt_readonly): Define.
6017 (elf_backend_want_plt_sym): Define.
6018 (elf_backend_got_header_size): Reserve one entry.
6019
6020 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6021 (elf32_hppa_size_stubs): Pass in multi_subspace.
6022 (elf32_hppa_set_gp): Declare.
6023
6024 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6025 (bfd_get_unique_section_name): New function.
6026 * bfd-in2.h: Regenerate.
6027
6028 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6029 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6030 comment.
6031
6032 From David Huggins-Daines <dhd@linuxcare.com>
6033 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6034 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6035 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6036 been updated in finish_dynamic_symbol before modifying function
6037 symbol.
6038
6039 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6040 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6041 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6042 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6043 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6044 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6045 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6046 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6047
6048 From David Huggins-Daines <dhd@linuxcare.com>
6049 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6050 style of local labels as well.
6051
6052 2000-09-03 Philip Blundell <philb@gnu.org>
6053
6054 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6055 references to undefined symbols in debugging sections.
6056
6057 2000-09-02 H.J. Lu <hjl@gnu.org>
6058
6059 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6060 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6061 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6062 section.
6063
6064 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6065
6066 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6067 (elf32_i860_is_local_label_name): New function and prototype.
6068
6069 2000-09-02 Nick Clifton <nickc@redhat.com>
6070
6071 * configure.in: Increase version number to 2.10.91.
6072 * configure: Regenerate.
6073 * aclocal.m4: Regenerate.
6074 * config.in: Regenerate.
6075 * po/bfd.pot: Regenerate.
6076
6077 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6078
6079 * elf.c (_bfd_elf_make_section_from_shdr): Add
6080 .gnu.linkobce.wi. to the list of debug section names.
6081
6082 2000-09-02 Nick Clifton <nickc@redhat.com>
6083
6084 * dwarf2.c (find_debug_info): New function: Locate a section
6085 containing dwarf2 debug information.
6086 (bfd_dwarf2_find_nearest_line): Find all sections containing
6087 debug information and include them in the stash.
6088
6089 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6090
6091 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6092 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6093 (sh_reloc_map): Add new relocs.
6094 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6095 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6096 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6097 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6098 functions.
6099 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6100 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6101 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6102 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6103 New array constants.
6104 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6105 New variables.
6106 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6107 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6108 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6109 elf_sh_plt_reloc_offset): Define.
6110 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6111 elf_sh_link_hash_table): New structs.
6112 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6113 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6114 relocation types.
6115 (elf_backend_create_dynamic_sections,
6116 bfd_elf32_bfd_link_hash_table_create,
6117 elf_backend_adjust_dynamic_symbol,
6118 elf_backend_size_dynamic_sections,
6119 elf_backend_finish_dynamic_symbol,
6120 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6121 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6122 elf_backend_got_header_size, elf_backend_plt_header_size):
6123 Define.
6124 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6125 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6126 New relocs.
6127 * bfd-in2.h, libbfd.h: Rebuilt.
6128
6129 2000-09-01 Alan Modra <alan@linuxcare.com.au>
6130
6131 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6132 change.
6133
6134 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
6135
6136 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6137 not initialized, set them to indicate the SH1 instruction set.
6138
6139 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
6140
6141 * acinclude.m4: Include libtool and gettext macros from the
6142 top level.
6143 * aclocal.m4, configure: Rebuilt.
6144
6145 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
6146
6147 * elf.c: Eliminate references to __sparcv9 macro; replace with
6148 autoconf variables HAVE_PSINFO32_T etc.
6149 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6150 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6151 * config.in: Ditto.
6152 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6153 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6154 * aclocal.m4: Ditto.
6155 * configure: Regenerate.
6156
6157 2000-08-27 Alan Modra <alan@linuxcare.com.au>
6158
6159 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6160 for any shared link, not just shared -Bsymbolic.
6161 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6162 any shared link, and pass link info to it.
6163 (elf_i386_size_dynamic_sections): Update comment.
6164 (elf_i386_discard_copies): Modify to discard relocs for symbols
6165 that have been forced local.
6166 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6167 that have been forced local.
6168
6169 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
6170
6171 * elflink.h (elf_link_add_object_symbols): Allow common
6172 symbols to have an alignment of 1 if explicitly requested, and
6173 not overridden by other definitions.
6174
6175 2000-08-22 Doug Kwan <dkwan@transmeta.com>
6176
6177 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6178 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6179
6180 2000-08-22 H.J. Lu <hjl@gnu.org>
6181
6182 * elf-bfd.h (elf_link_hash_table): Add runpath.
6183
6184 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6185 * bfd-in2.h: Rebuilt.
6186
6187 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6188 "runpath" field to NULL.
6189 (bfd_elf_get_runpath_list): New function.
6190
6191 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6192 DT_RUNPATH entries.
6193
6194 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
6195
6196 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6197 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6198 explicitly. Improve validation of r_type.
6199
6200 2000-08-21 H.J. Lu <hjl@gnu.org>
6201
6202 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6203 dynamic allocated content space. Add a comment to remind us that
6204 one day this ought to be fixed.
6205 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6206 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6207 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6208
6209 2000-08-21 Jason Eckhardt <jle@cygnus.com>
6210
6211 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6212 field with the newly relocated value instead of adding it to the
6213 existing immediate field.
6214 (elf32_i860_relocate_splitn): Likewise.
6215 (elf32_i860_relocate_highadj): Likewise.
6216
6217 2000-08-16 Jason Eckhardt <jle@cygnus.com>
6218
6219 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6220 was previously just a stub).
6221
6222 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
6223
6224 * elflink.c (_bfd_elf_create_got_section): Don't abort().
6225 Formatting fixes.
6226 (_bfd_elf_create_dynamic_sections): Likewise.
6227
6228 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
6229
6230 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6231 for undefined symbols to be the beginning of the section.
6232
6233 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6234 four extra entries at the beginning of the .rela.plt section.
6235 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6236 section to account for the four reserved entries in the .plt section.
6237
6238 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
6239
6240 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6241 to the list of NOPs we recognize after a branch-and-link.
6242 Use the ori NOP when one is needed.
6243
6244 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6245 for large archives.
6246
6247 2000-08-14 Jim Wilson <wilson@cygnus.com>
6248
6249 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6250 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6251 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
6252 EF_IA_64_ABSOLUTE.
6253
6254 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
6255
6256 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6257
6258 2000-08-10 Jason Eckhardt <jle@cygnus.com>
6259
6260 * elf32-i860.c (elf32_i860_relocate_section): New function.
6261 (i860_final_link_relocate): New function.
6262 (elf32_i860_relocate_splitn): New function.
6263 (elf32_i860_relocate_pc16): New function.
6264 (elf32_i860_relocate_highadj): New function.
6265 (elf32_i860_howto): Minor adjustments to some relocations.
6266 (elf_info_to_howto_rel): Define.
6267 (elf_backend_relocate_section): Define.
6268
6269 2000-08-10 Nick Clifton <nickc@cygnus.com>
6270
6271 * elf32-arm.h: Fix formatting.
6272
6273 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
6274
6275 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6276
6277 2000-08-08 Jason Eckhardt <jle@cygnus.com>
6278
6279 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6280
6281 2000-08-07 Kazu Hirata <kazu@hxi.com>
6282
6283 * ieee.c (ieee_write_debug_part): Rewrite a comment.
6284 * elf64-ia64.c: Fix a typo.
6285
6286 2000-08-05 Jason Eckhardt <jle@cygnus.com>
6287
6288 * elf32-i860.c (elf32_i860_howto_table): New structure.
6289 (lookup_howto): New function.
6290 (elf32_i860_reloc_type_lookup): New function.
6291 (elf32_i860_info_to_howto_rela): New function.
6292 (elf_code_to_howto_index): New structure.
6293 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6294 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6295 elf32_i860_reloc_type_lookup.
6296
6297 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
6298
6299 * som.c (struct fixup_format): Constify `format'.
6300 (som_hppa_howto_table): Use SOM_HOWTO macro.
6301 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6302 (som_bfd_reloc_type_lookup): Likewise.
6303 (compare_subspaces): Remove unused `count1', `count2'.
6304 (som_begin_writing): Remove unused `total_reloc_size'.
6305 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6306 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6307 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6308 (som_find_nearest_line): Decorate unused parameter(s).
6309 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6310 (som_bfd_link_split_section): Likewise.
6311
6312 2000-08-03 Nick Clifton <nickc@cygnus.com>
6313
6314 * section.c: Restore backed out code.
6315 * elf.c: Restore backed out code.
6316 (copy_private_bfd_data): Fix bug preventing stipped dynamic
6317 binaries from working.
6318 * bfd-in2.h: Regenerate.
6319
6320 2000-08-03 H.J. Lu <hjl@gnu.org>
6321
6322 * section.c: Back out the change made by Nick Clifton
6323 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6324 binaries.
6325 * bfd-in2.h: Likewise.
6326 * elf.c: Likewise.
6327
6328 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6329
6330 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6331
6332 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6333
6334 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6335 * bfd-in2.h, libbfd.h: Regenerate.
6336
6337 2000-07-31 Nick Clifton <nickc@cygnus.com>
6338
6339 * section.c (struct sec): Add new boolean field 'segment_mark'.
6340 (STD_SECTION): Initialise new field to zero.
6341
6342 * bfd-in2.h: Regenerate.
6343
6344 * elf.c (copy_private_bfd_data): Reorganise section to segment
6345 mapping to cope with moved sections requiring new segments,
6346 and overlapping segments.
6347 (SEGMENT_END): New macro: Return the end address of a segment.
6348 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6349 contains a section by comparing their VMA addresses.
6350 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6351 contains a section by comparing their LMA addresses.
6352 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6353 section should be included in a segment.
6354 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6355 follows another in memory.
6356 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6357 segments overlap.
6358
6359 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6360
6361 * cpu-i860.c: Added comments.
6362
6363 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6364 bfd_elf32_i860_little_vec.
6365 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6366 (ELF_MAXPAGESIZE): Changed to 4096.
6367
6368 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6369 new target.
6370 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6371
6372 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6373 config for little endian elf32 i860.
6374 (targ_defvec): Define for the new config above
6375 as "bfd_elf32_i860_little_vec".
6376 (targ_selvecs): Define for the new config above
6377 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6378
6379 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6380 of new target vec.
6381
6382 * configure: Regenerated.
6383
6384 2000-07-27 H.J. Lu <hjl@gnu.org>
6385
6386 * elflink.h (elf_merge_symbol): Take one more argument,
6387 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6388 entry. Don't overide the existing weak definition if dt_needed
6389 is true.
6390 (elf_link_add_object_symbols): Pass dt_needed to
6391 elf_merge_symbol ().
6392
6393 2000-07-27 Nick Clifton <nickc@cygnus.com>
6394
6395 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6396 allocated contents.
6397
6398 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6399
6400 * configure.host (*-*-aix*): AIX has 'long long' always.
6401
6402 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6403 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6404 (xcoff_write_archive_contents_big): Don't update the offset
6405 of the symbol table, xcoff_write_armap will do it.
6406
6407 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6408
6409 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6410 of dynobj for SGI_COMPAT checks.
6411
6412 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6413
6414 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6415 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6416 * bfd-in2.h: Regenerate.
6417
6418 2000-07-21 Nick Clifton <nickc@cygnus.com>
6419
6420 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6421 range symbol indices in relocs and issue an error message.
6422
6423 2000-07-20 H.J. Lu <hjl@gnu.org>
6424
6425 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6426 info->new_dtags when setting DT_FLAGS_1. It will only be set
6427 by the new linker options. It shouldn't break anything.
6428
6429 2000-07-20 H.J. Lu <hjl@gnu.org>
6430
6431 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6432 only if info->new_dtags is true.
6433
6434 2000-07-20 H.J. Lu <hjl@gnu.org>
6435
6436 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6437 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6438
6439 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6440
6441 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6442 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6443 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6444 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6445 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6446 * Makefile.in: Rebuild.
6447 * aclocal.m4: Rebuild.
6448 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6449 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6450 (bfd_cris_arch): Declare.
6451 (bfd_archures_list): Add bfd_cris_arch.
6452 * bfd-in2.h: Rebuild.
6453 * config.bfd: (cris-*-*): New target.
6454 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6455 * configure: Rebuild.
6456 * elf.c (prep_headers): Add bfd_arch_cris.
6457 * libbfd.h: Rebuild.
6458 * libaout.h (enum machine_type): Add M_CRIS.
6459 * reloc.c: Add CRIS relocations.
6460 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6461 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6462 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6463 * po/POTFILES.in, po/bfd.pot: Regenerate.
6464
6465 2000-07-19 H.J. Lu <hjl@gnu.org>
6466
6467 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6468 DF_TEXTREL if DT_TEXTREL is set.
6469 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6470 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6471 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6472 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6473 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6474 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6475 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6476 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6477 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6478 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6479
6480 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6481 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6482 DT_RPATH is set.
6483 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6484
6485 2000-07-19 H.J. Lu <hjl@gnu.org>
6486
6487 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6488 * bfd-in2.h: Rebuild.
6489
6490 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6491 (elf_dt_soname): New.
6492
6493 * elf.c (bfd_elf_set_dt_needed_soname): New.
6494
6495 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6496 entry if the shared object loaded by DT_NEEDED is used to
6497 resolve the reference in a regular object.
6498
6499 2000-07-19 H.J. Lu <hjl@gnu.org>
6500
6501 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6502 DT_DEPAUDIT and DT_AUDIT as strings.
6503
6504 2000-07-19 Nick Clifton <nickc@cygnus.com>
6505
6506 * format.c: Fix formatting.
6507
6508 2000-07-19 H.J. Lu <hjl@gnu.org>
6509
6510 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6511
6512 2000-07-19 H.J. Lu <hjl@gnu.org>
6513
6514 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6515 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6516 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6517 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6518 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6519 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6520 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6521
6522 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6523
6524 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6525 renamed functions from here...
6526 (assign_section_numbers): Use renamed functions.
6527 (prep_headers): Use renamed functions.
6528
6529 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6530 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6531 * bfd-in2.h: Regenerate.
6532
6533 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6534
6535 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6536 parenthesis in if statement.
6537
6538 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6539
6540 Enable the support for Traditional MIPS.
6541 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6542 return ict_none appropriately for traditional mips targets.
6543 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6544 (STUB_MOVE): Conditionalize for traditonal mips.
6545 (STUB_LI16): Likewise.
6546 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6547 room for RTPROC header.
6548 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6549 the permission for the PT_DYNAMIC as read, write and execute.
6550 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6551 for traditonal mips.
6552 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6553 _DYNAMIC_LINKING for traditonal mips.
6554 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6555 in case of traditonal mips.
6556 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6557 entry is required. For a function if PLT is not required then set the
6558 corresponding hash table entry to 0.
6559 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6560 traditonal mips.
6561 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6562 shared object set the value to 0.
6563 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6564 _DYNAMIC_LINKING for traditonal mips.
6565 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6566 for traditonal mips.
6567
6568 2000-07-15 H.J. Lu <hjl@gnu.org>
6569
6570 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6571
6572 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6573
6574 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6575 out a structure that is BFD_IN_MEMORY.
6576
6577 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6578
6579 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6580 bfd pointer. Print section id instead of bfd pointer for local
6581 syms. Prefix addend with `+' for global syms as well as local.
6582 Correct calculation of name component lengths.
6583 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6584
6585 From David Huggins-Daines <dhd@linuxcare.com>
6586 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6587 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6588 (elf64_hppa_modify_segment_map): Likewise.
6589
6590 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6591
6592 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6593 addresses to be "naturally" sign extended. Return -1 if unknown.
6594 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6595 * bfd-in2.h: Regenerate.
6596
6597 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6598
6599 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6600 and ECOF_SIGNED_64 to list ways to extract an offset.
6601 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6602 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6603 Update.
6604 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6605 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6606
6607 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6608
6609 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6610 bfd_get_start_address.
6611 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6612 (elf_swap_ehdr_out): Ditto.
6613
6614 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6615
6616 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6617 compatibility with older binutils.
6618
6619 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6620
6621 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6622 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6623
6624 From Ryan Bradetich <rbradetich@uswest.net>
6625 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6626 (parse_line_table): Ditto.
6627 (_bfd_dwarf1_find_nearest_line): Ditto.
6628 * syms.c (cmpindexentry): Remove extra `*' from params.
6629
6630 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6631
6632 * elf32-mips.c (sort_dynamic_relocs): New Function.
6633 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6634 via qsort to sort the dynamic relocations in increasing r_symndx
6635 value.
6636
6637 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6638
6639 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6640 ATTRIBUTE_UNUSED to unused args.
6641 (get_opd): Likewise.
6642 (get_plt): Likewise.
6643 (get_dlt): Likewise.
6644 (get_stub): Likewise.
6645 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6646 (elf64_hppa_link_output_symbol_hook): Likewise.
6647 (elf64_hppa_check_relocs): Delete unused var.
6648 (elf64_hppa_size_dynamic_sections): Likewise.
6649 (elf64_hppa_finalize_opd): Likewise.
6650 (elf64_hppa_finalize_dynreloc): Likewise.
6651 (elf64_hppa_modify_segment_map): Likewise.
6652 (elf64_hppa_finish_dynamic_sections): Likewise.
6653
6654 * elf-hppa.h (elf_hppa_final_write_processing): Add
6655 ATTRIBUTE_UNUSED to unused args.
6656 (elf_hppa_final_link_relocate): Likewise.
6657 (elf_hppa_record_segment_addrs): Add paretheses.
6658 (elf_hppa_relocate_section): Constify dyn_name.
6659
6660 From David Huggins-Daines <dhd@linuxcare.com>
6661 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6662 rearrange case statement so that it gets preferred to 32-bit ones.
6663
6664 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6665 asection->id instead of address of asection structure.
6666 (elf32_hppa_size_stubs): Likewise.
6667
6668 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6669 for .init* and .fini*.
6670
6671 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6672 and addends used in stub names to 32 bits.
6673 (elf32_hppa_size_stubs): Likewise.
6674
6675 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6676 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6677 not bfd_put_64. Fix minor comment typo and formatting.
6678
6679 Changes to create multiple linker stubs, positioned immediately
6680 before the section where they are required.
6681 * elf32-hppa.c: Don't include hppa_stubs.h.
6682 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6683 (elf32_hppa_stub_hash_table): Delete.
6684 (elf32_hppa_link_hash_entry): Delete.
6685 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6686 stub_hash_table, and store the struct here rather than a pointer.
6687 Delete output_symbol_count. Add offset array. Change
6688 global_value to a bfd_vma.
6689 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6690 (elf32_hppa_stub_hash_traverse): Delete.
6691 (elf32_hppa_name_of_stub): Delete.
6692 (elf32_hppa_link_hash_lookup): Delete.
6693 (elf32_hppa_link_hash_traverse): Delete.
6694 (elf32_hppa_stub_hash_table_init): Delete.
6695 (elf32_hppa_size_of_stub): Pass input section and offset rather
6696 than location and calculate location here. Don't pass name as all
6697 stubs are now the same size.
6698 (elf32_hppa_stub_hash_newfunc): Init new fields.
6699 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6700 too.
6701 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6702 comparing against ints. Rewrite stub handling code.
6703 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6704 Case enums to int before comparing against ints. Remove
6705 bfd_reloc_dangerous case.
6706 (elf32_hppa_build_one_stub): Rewrite.
6707 (elf32_hppa_size_one_stub): New function.
6708 (elf32_hppa_build_stubs): Rewrite.
6709 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6710 Rewrite stub-handling specific code.
6711
6712 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6713
6714 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6715
6716 * hppa_stubs.h: Delete.
6717 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6718 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6719 * Makefile.in: Regenerate.
6720
6721 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6722 e_nlrsel.
6723
6724 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6725
6726 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6727 and section name for bfd_reloc_notsupported error message.
6728 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6729 bfd_reloc_notsupported.
6730 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6731
6732 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6733 undefined weak symbols for all relocs.
6734 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6735 offsets are relative to one past the delay slot.
6736 (elf32_hppa_size_stubs): Account for reloc addend when calculating
6737 branch destination. Put addend into stub name too.
6738 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6739 adjust by 8 when deciding whether a linker stub is needed. Put
6740 addend into stub name as for above.
6741
6742 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6743 various args and vars.
6744 (elf32_hppa_bfd_final_link_relocate): Here too.
6745 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
6746 inner block var to avoid shadowing.
6747
6748 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
6749 unsigned.
6750 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6751 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6752 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6753
6754 * libhppa.h: Change practically all unsigned ints to plain ints.
6755 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
6756 prototypes.
6757
6758 From Ryan Bradetich <rbradetich@uswest.net>
6759 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6760 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6761 suit above.
6762 From David Huggins-Daines <dhd@linuxcare.com>
6763 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6764 to the new OP_* ones.
6765
6766 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6767 error exit. Bail out earlier on plabel relocs that we aren't
6768 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
6769 string, and then don't free our copy.
6770 (elf32_hppa_build_one_stub): Make insn unsigned int.
6771
6772 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6773 available with BL, not BE and BLE.
6774
6775 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6776 code for elf arg relocs.
6777 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6778 argument with elf_link_hash_entry h. Handle undefined weak
6779 symbols. Move $global$ lookup from here...
6780 (elf32_hppa_relocate_section): ...to here. Return correct error
6781 message for non-handled relocs.
6782 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
6783 wrong test was -0x3ffff to +0x40000.
6784
6785 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6786 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6787 Handle them as such.
6788 (elf_hppa_relocate_insn): Fix a typo.
6789
6790 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6791 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6792 assemble_17, assemble_21): Delete.
6793 Supply defines for all 64 possible opcodes.
6794 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
6795 formats. Handle COMICLR.
6796 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
6797 -10, -16, 16, 22.
6798
6799 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
6800 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
6801 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
6802 to suit.
6803 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
6804 the local syms - did this code get deleted accidentally? Ignore
6805 undefined and undefweak syms.
6806
6807 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
6808 block. Use it instead of elf64_hppa_hash_table (info).
6809 (elf_hppa_final_link_relocate): Use hppa_info instead of
6810 elf64_hppa_hash_table (info).
6811
6812 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6813 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6814 (hppa_rebuild_insn): Mask immediate bits here instead.
6815 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6816
6817 2000-07-08 Alan Modra <alan@linuxcare.com.au>
6818
6819 * section.c (struct sec): Add id field. Tidy comment formatting.
6820 (bfd_make_section_anyway): Set id.
6821 (STD_SECTION): Init id too.
6822 Change CONST to const throughout.
6823 * archures.c (bfd_arch_info): Tidy comment.
6824 (bfd_arch_list): Change a CONST to const.
6825 * libbfd-in.h: Tidy comments and replace CONST with const.
6826 * elf-bfd.h: Likewise.
6827 * libbfd.h: Regenerate.
6828 * bfd-in2.h: Regenerate.
6829 * libcoff.h: Regenerate.
6830
6831 2000-07-07 DJ Delorie <dj@redhat.com>
6832
6833 * archive.c (_bfd_write_archive_contents): Add an informative
6834 comment.
6835
6836 2000-07-06 Kazu Hirata <kazu@hxi.com>
6837
6838 * srec.c: Fix formatting.
6839
6840 2000-06-05 DJ Delorie <dj@redhat.com>
6841
6842 * MAINTAINERS: new
6843
6844 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
6845
6846 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
6847 value of PC-relative offsets.
6848
6849 2000-07-03 Jim Wilson <wilson@cygnus.com>
6850
6851 * elf64-alpha.c (alpha_elf_size_info): New.
6852 (elf_backend_size_info): Define to alpha_elf_size_info.
6853 * elfcode.h (elf_size_info): Change hash bucket size to 4.
6854
6855 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
6856
6857 * elf32-mips.c: Include elf32-target.h again for the traditional
6858 MIPS targets.
6859
6860 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
6861
6862 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
6863 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
6864 (avr_info_to_howto_rela): Likewise.
6865 (elf32_avr_gc_mark_hook): Likewise.
6866 (elf32_avr_gc_sweep_hook): Likewise.
6867 (elf32_avr_relocate_section): Likewise.
6868
6869 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
6870
6871 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
6872 an external symbol for a non-shared, non-relocatable link.
6873
6874 2000-07-03 Nick Clifton <nickc@redhat.com>
6875
6876 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
6877 is an external symbol.
6878 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
6879 external symbol.
6880
6881 2000-07-03 Kazu Hirata <kazu@hxi.com>
6882
6883 * reloc16.c: Fix formatting.
6884
6885 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
6886
6887 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
6888 to add a new target for traditional mips i.e
6889 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
6890 * configure.in: Likewise.
6891 * configure: Rebuild.
6892 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
6893 bfd_target_vector.
6894 (bfd_elf32_tradlittlemips_vec): Likewise.
6895 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
6896 to see that elfNN_bed does not get redefined even if the target file
6897 is included twice for a chip. See elf32-mips.c.
6898
6899 2000-07-01 Alan Modra <alan@linuxcare.com.au>
6900
6901 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6902 (CLEANFILES): Add DEPA.
6903 * Makefile.in: Regenerate.
6904
6905 2000-06-30 DJ Delorie <dj@cygnus.com>
6906
6907 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
6908 can't assume the PE header is at 0x80.
6909
6910 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
6911
6912 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
6913
6914 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
6915
6916 * go32stub.h: Update stub.
6917
6918 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
6919
6920 * archures.c (bfd_mach_avr5): Define.
6921 * bfd-in2.h (bfd_mach_avr5): Define.
6922 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
6923 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
6924 (compatible): Update comment. Add missing test.
6925 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
6926 for avr2 and avr4. Simplify 8K wrap code.
6927 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
6928 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
6929
6930 2000-06-26 Kazu Hirata <kazu@hxi.com>
6931
6932 * coff-h8300.c: Fix formatting.
6933 * cpu-h8300.c: Likewise.
6934
6935 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
6936
6937 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
6938 for local symbols whose names are unknown.
6939
6940 2000-06-22 Alan Modra <alan@linuxcare.com.au>
6941
6942 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6943 find one.
6944 * Makefile.in: Regenerate.
6945 * doc/Makefile.in: Regenerate.
6946
6947 2000-06-20 H.J. Lu <hjl@gnu.org>
6948
6949 * Makefile.am: Rebuild dependency.
6950 * Makefile.in: Rebuild.
6951
6952 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6953
6954 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
6955 (elf_backend_copy_indirect_symbol): Map to the new function.
6956
6957 2000-06-20 Alan Modra <alan@linuxcare.com.au>
6958
6959 * archive.c (normalize): Correct pointer comparison when checking
6960 for backslashes.
6961 (bfd_bsd_truncate_arname): Likewise.
6962 (bfd_gnu_truncate_arname): Likewise.
6963
6964 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
6965
6966 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
6967 sections elf_{text,data}_{section,symbol}.
6968 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
6969 (_bfd_mips_elf_hide_symbol): New function.
6970 (elf_backend_hide_symbol): Map to the new function.
6971 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
6972 definitions of mips_elf_{text,data}_{section,symbol}.
6973 (mips_elf_local_relocation_p): Try to find the direct symbol
6974 based on new check_forced argument.
6975 (mips_elf_calculate_relocation): Use new version of
6976 mips_elf_local_relocation_p.
6977 (mips_elf_relocate_section): Likewise.
6978 (_bfd_mips_elf_relocate_section): Likewise.
6979 (mips_elf_sort_hash_table): Only assert that have enough GOT
6980 space.
6981 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
6982 entry if the relocation based on the new external argument.
6983 (mips_elf_create_dynamic_relocation): Assert that we have a
6984 section contents allocated where we can swap out the dynamic
6985 relocations.
6986 (mips_elf_calculate_relocation): Find the real hash-table entry
6987 correctly by using h->root.root.type. Only create a dynamic
6988 relocation entry if the symbol is defined in a shared library.
6989 Create an external GOT entry for the GOT16 relocation if the
6990 symbol was forced local.
6991 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
6992 dynamic index if the symbol was forced local.
6993
6994 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6995
6996 * elf32-mips.c: Fix typos in comments.
6997
6998 2000-06-19 Mark Kettenis <kettenis@gnu.org>
6999
7000 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7001 CORE_VERSION_1.
7002
7003 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7004
7005 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7006 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7007 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7008 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7009 (bfd_elf32_m68hc11_vec): Likewise.
7010 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7011 Supports 68hc11 & 68hc12 at the same time.
7012 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7013 bfd_target_vector.
7014 (bfd_elf32_m68hc11_vec): Likewise.
7015 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7016 * archures.c (bfd_m68hc12_arch): Define and register in global list
7017 (bfd_m68hc11_arch): Likewise.
7018 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7019 BFD_RELOC_M68HC11_3B): Define.
7020 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7021 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7022
7023 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7024
7025 * elf_bfd.h (struct elf_backend_data): Add info argument to
7026 elf_backend_hide_symbol.
7027 (_bfd_elf_link_hash_hide_symbol): Likewise.
7028 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7029 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7030 * elflink.h (elf_link_add_object_symbols): Likewise.
7031 (elf_link_assign_sym_version): Likewise.
7032
7033 2000-06-18 H.J. Lu <hjl@gnu.org>
7034
7035 * coff-i386.c (coff_i386_reloc): Don't return in case of
7036 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7037 Compensate PE relocations when linking with non-PE object
7038 files to generate a non-PE executable.
7039
7040 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7041
7042 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7043 GOT entries if we're doing a static link or -Bsymbolic link.
7044
7045 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7046
7047 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7048 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7049 available.
7050 (elf_link_output_relocs): Likewise.
7051 (elf_reloc_link_order): Likewise.
7052
7053 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7054
7055 * archures.c (enum bfd_architecture): #define constants for
7056 PowerPc and RS6000 machine numbers.
7057 * bfd-in2.h: Regenerate.
7058 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7059 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7060 and RS6000 machine numbers using #defined constants from
7061 archures.c.
7062 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7063 machine numbers using #defined constants from archures.c. Add
7064 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7065 64-bit words in 620 entry.
7066 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7067 RSC, and RS2.
7068 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7069
7070 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7071
7072 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7073 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7074 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7075
7076 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7077
7078 * bfd-in.h (bfd_family_coff): Define.
7079 * bfd-in2.h: Regenerate.
7080 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7081 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7082 instead of bfd_target_coff_flavour.
7083 * cofflink.c (_bfd_coff_final_link): Likewise.
7084 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7085 exclude XCOFF files.
7086 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7087 Likewise.
7088 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7089 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7090 * xcofflink.c (XCOFF_XVECP): Delete.
7091 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7092 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7093 bfd_xcoff_record_link_assignment,
7094 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7095 check for bfd_target_xcoff_flavour.
7096
7097 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7098
7099 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7100 files on AIX 4.3.
7101 (read_hdr): New function.
7102 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7103 of trying to extract individual registers. Set abfd->arch_info
7104 to match the architecture that created the core file.
7105 (rs6000coff_get_section_contents): Delete.
7106 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7107
7108 2000-06-14 H.J. Lu <hjl@gnu.org>
7109
7110 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7111 is NULL.
7112
7113 2000-06-13 H.J. Lu <hjl@gnu.org>
7114
7115 * configure: Regenerate.
7116
7117 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
7118
7119 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7120 armpei_little_vec.
7121
7122 2000-06-08 David O'Brien <obrien@FreeBSD.org>
7123
7124 * configure.in (VERSION): Update to show this is the CVS mainline.
7125
7126 2000-06-07 Alan Modra <alan@linuxcare.com.au>
7127
7128 * elf32-d10v.c: Include elf/d10v.h
7129 (enum reloc_type): Delete.
7130 * elf32-d30v.c: Include elf/d30v.h
7131 (enum reloc_type): Delete.
7132
7133 * Makefile.am: Run "make dep-am" to regenerate dependencies.
7134 * Makefile.in: Regenerate.
7135
7136 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7137 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7138 move HOWTOs into elf_howto_table.
7139 (R_386_standard, R_386_ext_offset): Define.
7140 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7141 (elf_i386_reloc_type_lookup): Modify calculation of index into
7142 elf_howto_table since we've removed the padding.
7143 (elf_i386_info_to_howto_rel): Likewise.
7144 (elf_i386_relocate_section): Likewise.
7145
7146 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
7147
7148 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7149
7150 2000-06-05 H.J. Lu <hjl@gnu.org>
7151
7152 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7153 an error when seeing an undefined symbol with hidden/internal
7154 attribute. It is handled in *_relocate_section ().
7155
7156 2000-06-05 H.J. Lu <hjl@gnu.org>
7157
7158 * elflink.h (elf_fix_symbol_flags): Follow the link for the
7159 indirect symbol for the ELF_LINK_NON_ELF bit.
7160 (elf_link_output_extsym): Don't output the indirect symbol even
7161 if the ELF_LINK_NON_ELF bit is set.
7162
7163 2000-06-01 J.T. Conklin <jtc@redback.com>
7164
7165 * config.bfd (i[3456]86-*-netbsdelf*): New target.
7166 (i[3456]86-*-netbsdaout*): New target.
7167 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7168 (i[3456]86-*-openbsd*): Likewise.
7169
7170 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
7171
7172 * trad-core.c: From hpux-core.c, include <dirent.h> or
7173 <sys/ndir.h> when possible.
7174
7175 2000-05-31 Ulrich Drepper <drepper@redhat.com>
7176
7177 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7178 definitions. We must not assume they are sorted in the file
7179 according to their index numbers.
7180
7181 2000-05-31 Alan Modra <alan@linuxcare.com.au>
7182
7183 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7184 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
7185 R_PARISC_DIR17F are for absolute branches; Handle them as such.
7186
7187 2000-05-30 Nick Clifton <nickc@cygnus.com>
7188
7189 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7190 80960CA, 80960MC as valid machine names.
7191
7192 2000-05-30 H.J. Lu <hjl@gnu.org>
7193
7194 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7195 visibility bits if the symbol is undefined. Correctly handle
7196 weak undefined symbols with hidden and internal attributes.
7197
7198 * elflink.h (elf_link_add_object_symbols): Always turn the
7199 symbol into local if it has the hidden or internal attribute.
7200
7201 2000-05-29 Philip Blundell <philb@gnu.org>
7202
7203 * ppcboot.c: Add packed attribute if compiling with GCC.
7204
7205 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
7206
7207 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7208
7209 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
7210
7211 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7212 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7213 corefile on a 64-bit (Sparc Solaris) host. Also clean up
7214 a few old comments.
7215
7216 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7217
7218 * Makefile.am: Update dependencies with "make dep-am"
7219 * Makefile.in: Regenerate.
7220
7221 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7222 bindtextdomain): Replace defines with those from intl/libgettext.h
7223 to quieten gcc warnings.
7224
7225 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
7226
7227 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7228
7229 * archive.c (normalize, bfd_bsd_truncate_arname,
7230 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7231 file names with backslashes.
7232
7233 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7234 before opening it.
7235
7236 * sysdep.h: Include filenames.h.
7237
7238 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7239
7240 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7241
7242 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7243
7244 * elf64-sparc.c (sparc64_elf_relax_section): New.
7245 (sparc64_elf_relocate_section): Optimize tail call into branch always
7246 if possible.
7247 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7248 (elf32_sparc_relax_section): New.
7249
7250 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7251
7252 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7253 Remove unusued variables.
7254 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7255 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7256 previous fix, so that shared libs really don't influence targets
7257 extension mask and memory model.
7258
7259 2000-05-23 H.J. Lu <hjl@gnu.org>
7260
7261 * elf64-alpha.c (elf64_alpha_relocate_section): Check
7262 h->root.other not h->other.
7263 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7264
7265 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7266
7267 2000-05-23 H.J. Lu <hjl@gnu.org>
7268
7269 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7270 undefined symbol with the non-default visibility attributes.
7271 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7272 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7273 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7274 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7275 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7276 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7277 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7278 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7279 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7280 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7281 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7282
7283 2000-05-22 Richard Henderson <rth@cygnus.com>
7284
7285 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7286 PCREL22, PCREL64I. Zero size of special relocs.
7287 (elf64_ia64_reloc_type_lookup): Likewise.
7288 (USE_BRL, oor_brl, oor_ip): New.
7289 (elf64_ia64_relax_section): New.
7290 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7291 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7292 (elf64_ia64_relocate_section): Likewise.
7293 (bfd_elf64_bfd_relax_section): New.
7294 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7295 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7296 * bfd-in2.h, libbfd.h: Regenerate.
7297
7298 2000-05-22 Nick Clifton <nickc@cygnus.com>
7299
7300 * configure.in : Add peigen.lo to MIPS PE targets.
7301 * configure: Regenerate.
7302
7303 2000-05-22 Momchil Velikov <velco@fadata.bg>
7304
7305 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7306 only if it is known for both input and output bfds. Separate
7307 error message strings as in some languages, it may be necessary
7308 to change more than one place in the string to change between
7309 'big' and 'little'.
7310
7311 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7312 endianess checks, call _bfd_generic_verify_endian_match() instead.
7313
7314 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7315
7316 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7317
7318 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7319 endianess before checking bfd flavours.
7320
7321 2000-05-22 H.J. Lu <hjl@gnu.org>
7322
7323 * elflink.h (elf_link_output_extsym): Clear the visibility
7324 field for symbols not defined locally.
7325
7326 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7327
7328 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7329 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7330 (hppa_rebuild_insn): Mask immediate bits here instead.
7331 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7332
7333 2000-05-18 Momchil Velikov <velco@fadata.bg>
7334
7335 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7336 relocs for an executable, ensure that they are virtual addresses.
7337
7338 2000-05-18 Jeffrey A Law (law@cygnus.com)
7339
7340 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7341
7342 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7343 Rick Gorton <gorton@scrugs.lkg.dec.com>
7344
7345 * elflink.h: Add emitrelocations support: when enabled, relocation
7346 information and relocation sections are put into final output
7347 executables. If the emitrelocations flag is set, do the following:
7348 (elf_bfd_final_link): Emit relocation sections.
7349 (elf_link_input_bfd): Compute relocation section contents.
7350 (elf_gc_sections): Don't clean relocation sections.
7351
7352 2000-05-16 Catherine Moore <clm@cygnus.com>
7353
7354 * som.c (som_decode_symclass): Recognize weak symbols.
7355
7356 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7357
7358 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7359 read idata section only from dataoff.
7360 (pe_print_edata): Correctly check for valid eat_member.
7361
7362 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7363
7364 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7365
7366 2000-05-14 Philip Blundell <philb@gnu.org>
7367
7368 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7369
7370 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7371
7372 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7373
7374 * peigen.c (pe_print_idata): Look for .idata section and print
7375 info even if data directory has zero entries. Read idata section
7376 starting from dataoff, and adjust all data offsets to suit. Cast
7377 all bfd_vma vars to unsigned long before passing to fprintf.
7378 * peigen.c (pe_print_edata): Similarly, look for .edata section
7379 and print info even if data directory has zero entries. Cast
7380 all bfd_vma vars to unsigned long before passing to fprintf.
7381
7382 From Szabolcs Szakacsits <szaka@F-Secure.com>
7383 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7384 directory size which may be bogus.
7385 * peigen.c (pe_print_edata): Similarly.
7386
7387 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7388
7389 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7390 section is empty.
7391 (copy_private_bfd_data): Allow for space possibly taken up by elf
7392 headers when calculating segment physical address from lma.
7393
7394 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7395
7396 * versados.c (versados_scan): Init stringlen and pass_2_done.
7397
7398 * trad-core.c (trad_unix_core_file_p): Return
7399 bfd_error_wrong_format rather than bfd_error_file_truncated.
7400
7401 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7402 add_data_entry. DataDirectory virtual address is relative.
7403 (pe_print_idata): Account for relative DataDirectory virtual
7404 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7405 (pe_print_edata): Similarly.
7406
7407 From Szabolcs Szakacsits <szaka@F-Secure.com>
7408 * peigen.c (dir_names): Add Delay Import Directory.
7409 (pe_print_idata): Always search for bfd section containing
7410 idata address rather than looking up section name. Print this
7411 section name rather than .idata.
7412 (pe_print_edata): Similarly. Also print some fields as %08lx.
7413 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7414 Win32Version.
7415
7416 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7417
7418 * xcoff.h: Rename to xcoff-target.h
7419 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7420 * coff-rs6000.c: Ditto.
7421 * coff64-rs6000.c: Ditto.
7422 * coff-pmac.c: Ditto.
7423 * Makefile.in: Regenerate.
7424
7425 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7426
7427 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7428 Change U802TOC64MAGIC to U803XTOCMAGIC.
7429
7430 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7431
7432 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7433 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7434 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7435
7436 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7437
7438 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7439
7440 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7441
7442 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7443 hidden and internal symbols.
7444 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7445 visibility.
7446 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7447 assign a PLT or GOT entry to symbols with hidden and
7448 internal visibility.
7449
7450 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7451
7452 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7453 the .bss section.
7454 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7455
7456 2000-05-02 H.J. Lu <hjl@gnu.org>
7457
7458 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7459 ELFOSABI_SYSV.
7460
7461 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7462
7463 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7464 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7465 dependencies.
7466 * Makefile.in: Regenerate.
7467
7468 2000-05-01 Jim Wilson <wilson@cygnus.com>
7469
7470 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7471 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7472 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7473 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7474 * Makefile.in: Rebuild.
7475
7476 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7477
7478 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7479 doesn't work very well.
7480
7481 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7482 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7483 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7484 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7485 (elf_hppa_info_to_howto): Likewise.
7486 (elf_hppa_info_to_howto_rel): Likewise.
7487 (elf_hppa_reloc_type_lookup): Likewise.
7488 (elf_hppa_is_local_label_name): Likewise.
7489 (elf_hppa_fake_sections): Likewise.
7490 (elf_hppa_final_write_processing): Likewise.
7491 (elf_hppa_howto_table): Fully initialise all entries.
7492 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7493 (elf_hppa_info_to_howto): Likewise.
7494 (elf_hppa_info_to_howto_rel): Likewise.
7495 (elf_hppa_reloc_type_lookup): Likewise.
7496 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7497 elf_hppa_unmark_useless_dynamic_symbols,
7498 elf_hppa_remark_useless_dynamic_symbols,
7499 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7500 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7501 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7502 elf32-hppa.c mess is cleaned up.
7503 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7504 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7505 r_field then call hppa_field_adjust inline func with variable
7506 r_field arg, instead call hppa_field_adjust with fixed arg.
7507 In case R_PARISC_PCREL22F, don't set r_field.
7508 (elf_hppa_relocate_insn): Change args and return type to unsigned
7509 int. Call re_assemble_* funcs to do the work.
7510
7511 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7512 sign extending.
7513
7514 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7515 extending.
7516 (sign_extend): Mask first before sign extending.
7517 (low_sign_extend): Rewrite without condition expression.
7518 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7519 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7520 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7521 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7522 result as function return value rather than through pointer arg.
7523 Accept unsigned int args, and return unsigned int.
7524 (re_assemble_3): New. Combines function of dis_assemble_3 with
7525 re-assembly of opcode and immediate.
7526 (re_assemble_12): Likewise.
7527 (re_assemble_16): Likewise.
7528 (re_assemble_17): Likewise.
7529 (re_assemble_21): Likewise.
7530 (re_assemble_22): Likewise.
7531 (hppa_field_adjust): Rewrite and document, paying attention to
7532 size of types and signed/unsigned issues.
7533 (get_opcode): Shift before masking.
7534 (FDLW): Rename to FLDW.
7535 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7536 (hppa_rebuild_insn): Change args and return value to unsigned
7537 int. Make use of re_assemble_*. Correct case 11.
7538
7539 * dep-in.sed: Handle ../opcodes/.
7540 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7541 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7542 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7543 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7544 elfarm-nabi.lo dependencies outside of auto-dependency area.
7545 Regenerate dependencies.
7546 * Makefile.in: Regenerate.
7547
7548 * configure.in (TRAD_HEADER): Test non-null before
7549 AC_DEFINE_UNQUOTED.
7550 * configure: Regenerate.
7551
7552 * reloc.c: Fix mis-spelling in comment.
7553
7554 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7555
7556 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7557 * vms.c (vms_openr_next_archived_file): Return NULL.
7558
7559 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7560
7561 * coffcode.h Copy changes mistakenly done to libcoff.h in
7562 4/24/2000 patch.
7563
7564 2000-04-29 Andreas Jaeger <aj@suse.de>
7565
7566 * libbfd-in.h: Correctly check GCC version.
7567 * bfd-in.h: Likewise.
7568 * libhppa.h: Likewise.
7569 * libbfd.h: Regenerate.
7570 * bfd-in2.h: Regenerate.
7571
7572 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7573
7574 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7575 coffdu-rs6000.{lo,c}.
7576 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7577 on xcoff.h
7578 * Makefile.in: Regenerate.
7579 * xcoff.h: New file.
7580 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7581 * coff-rs6000.c: Move all declarations and defines that are
7582 common to the xcoff backends into xcoff.h
7583 * coff64-rs6000.c: Ditto,
7584
7585 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7586
7587 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7588 _bfd_coff_force_symnames in strings and
7589 _bfd_coff_debug_string_prefix_length to their default values.
7590 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7591
7592 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7593
7594 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7595 _bfd_coff_force_symnames in strings and
7596 _bfd_coff_debug_string_prefix_length to their default values.
7597
7598 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7599
7600 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7601 Check local_got_refcounts before dereferencing.
7602
7603 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7604 before deciding we don't need R_PPC_PLT32 relocation.
7605 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7606 dereferencing.
7607
7608 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7609
7610 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7611 .plt entries.
7612 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7613 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7614 (elf_i386_relocate_section): Allow for .plt to go missing.
7615 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7616 can use a relative reloc for got as elf_i386_relocate_section.
7617 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7618
7619 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7620
7621 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7622
7623 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7624
7625 * Makefile.am (coff64-rs6000.lo): New rule.
7626 * Makefile.in: Regenerate.
7627 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7628 xcoff_is_local_label_name, xcoff_rtype2howto,
7629 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7630 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7631 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7632 (NO_COFF_SYMBOLS): Define.
7633 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7634 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7635 internally.
7636 (MINUS_ONE): New macro.
7637 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7638 relocation.
7639 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7640 coff_SWAP_aux_out): Map to the new functions.
7641 * coff64-rs6000.c: New file.
7642 * libcoff.h (bfd_coff_backend_data): Add new fields
7643 _bfd_coff_force_symnames_in_strings and
7644 _bfd_coff_debug_string_prefix_length.
7645 (bfd_coff_force_symnames_in_strings,
7646 bfd_coff_debug_string_prefix_length): New macros for above fields.
7647 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7648 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7649 of using coff_swap_sym_in directly.
7650 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7651 (coff_set_flags) Set magic for XCOFF64.
7652 (coff_compute_section_file_positions): Add symbol name length to
7653 string section length if bfd_coff_debug_string_prefix_length is
7654 true.
7655 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7656 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7657 using coff_swap_lineno_in directly.
7658 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7659 and _bfd_coff_debug_string_prefix_length fields.
7660 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7661 symbol names into strings table when
7662 bfd_coff_force_symnames_in_strings is true.
7663 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7664 SET_RELOC_VADDR): New macros.
7665 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7666 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7667 code.
7668 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7669 changes within RS6000COFF_C specific code.
7670 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7671 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7672 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7673 Extend existing hack on target name.
7674 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7675 target name.
7676 * coff-tic54x.c (ticof): Keep up to date with new fields
7677 in bfd_coff_backend_data.
7678 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7679 targ_selvecs to include rs6000coff64_vec for rs6000.
7680 * configure.in: Add rs6000coff64_vec case.
7681 * cpu-powerpc.c: New bfd_arch_info_type.
7682
7683 2000-04-24 Jeffrey A Law (law@cygnus.com)
7684
7685 * config.bfd: Only disable elf32-hppa vectors, not all of the
7686 BSD and OSF configuration support. Provide (disabled) clauses
7687 for PA64 support.
7688 * configure.in: Add clause for PA64 support.
7689 * configure: Rebuilt.
7690
7691 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7692 (bfd_elf64_hppa_vec): Declare.
7693
7694 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7695 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7696 (elf64-hppa.lo): Add dependencies.
7697 * Makefile.in: Rebuilt.
7698
7699 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7700
7701 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7702
7703 * libhppa.h (dis_assemble_16): New function.
7704 (pa_arch): Added pa20w element.
7705
7706 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7707
7708 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7709 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7710 bfd_elf64_slurp_reloc_table.
7711
7712 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7713 definitions to get external names.
7714 (elf_write_relocs): Renamed from write_relocs and make global.
7715 (elf_slurp_reloc_table): Make global.
7716 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7717
7718 * archive.c (hpux_uid_gid_encode): New function.
7719 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7720 defined and the ID is greater than 99999.
7721 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7722 special uid/gid fields into 32 bit values.
7723
7724 2000-04-21 Matthew Green <mrg@cygnus.com>
7725
7726 * config.bfd: Add NetBSD/sparc64 support.
7727
7728 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
7729 David Mosberger <davidm@hpl.hp.com>
7730 Timothy Wall <twall@cygnus.com>
7731 Jim Wilson <wilson@cygnus.com>
7732
7733 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7734 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7735 (BFD64_BACKENDS): Add elf64-ia64.lo.
7736 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7737 (cpu-ia64.lo, elf64-ia64.lo): New rules.
7738 * Makefile.in: Rebuild.
7739 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7740 (bfd_ia64_arch): Declare.
7741 (bfd_archures_list): Add bfd_ia64_arch.
7742 * bfd-in2.h: Rebuild.
7743 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7744 * configure: Rebuild.
7745 * configure.host: (ia64-*-linux*): New host.
7746 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7747 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7748 * elf.c (prep_headers): Add bfd_arch_ia64.
7749 * libbfd.h: Rebuild.
7750 * reloc.c: Add IA-64 relocations.
7751 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7752 Declare.
7753 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7754 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7755
7756 2000-04-21 Richard Henderson <rth@cygnus.com>
7757
7758 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7759 contents when performing a partial link.
7760 (bfd_elf_d30v_reloc_21): Likewise.
7761
7762 2000-04-20 H.J. Lu <hjl@gnu.org>
7763
7764 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7765 patch to symbols defined by a shared object.
7766 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7767
7768 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7769
7770 K&R compiler fixes.
7771 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7772 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7773
7774 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
7775
7776 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7777 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7778 (coff-ia64.lo): Add dependency.
7779 * Makefile.in: Regenerate.
7780 * coff-ia64.c: New file.
7781 * efi-app-ia32.c: Ditto.
7782 * efi-app-ia64.c: Ditto.
7783 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7784 (coff_set_flags): Ditto.
7785 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7786 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7787 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7788 * configure: Regenerate.
7789 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7790 (PUT_OPTHDR_IMAGE_BASE): Ditto.
7791 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7792 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7793 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7794 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7795 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7796 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7797 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7798 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7799 (GET_PDATA_ENTRY): Ditto.
7800 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
7801 data_start. Use above macros to read fields that are 64 bit wide for
7802 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
7803 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
7804 FileAlignment and SectionAlignment to minimum alignment if they
7805 are zero.
7806 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
7807 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
7808 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
7809 Use above macros to write fields that are 64 bit wide for
7810 COFF_WITH_PEP64.
7811 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
7812 5*4 otherwise. This should be right for IA-32 and IA-64, but may
7813 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
7814 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
7815 begin address, end address, and unwind info address only. Use
7816 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
7817 print addresses.
7818 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
7819 HIGH3ADJ relocation names.
7820 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
7821 * targets.c: Declare bfd_efi_app_ia32_vec and
7822 bfd_efi_app_ia64_vec.
7823 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
7824 bfd_efi_app_ia64_vec.
7825
7826 2000-04-17 Timothy Wall <twall@cygnus.com>
7827
7828 * bfd-in2.h: Add prototypes for tic54x load page access.
7829 * bfd-in.h: Regenerate.
7830 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
7831 in customized _set_arch_mach function.
7832 * coffcode.h (coff_set_alignment_hook): Set section load page if
7833 the appropriate macro is defined.
7834 (write_object_contents): Read section load page.
7835
7836 2000-04-13 Alan Modra <alan@linuxcare.com.au>
7837
7838 * elf32-hppa.h: Update copyright date.
7839
7840 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
7841 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
7842
7843 * elf32-d30v.c (MAX32): Don't use LL suffix.
7844 (MIN32): Define in terms of MAX32.
7845 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
7846
7847 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
7848 expression.
7849
7850 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
7851
7852 2000-04-12 Alan Modra <alan@linuxcare.com.au>
7853
7854 * dep-in.sed: Match space before file name, not after.
7855 * Makefile.am: Regenerate dependencies.
7856 * Makefile.in: Regenerate.
7857
7858 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
7859 case, allow address wrap-around stupidly removed 2000-03-17. Sign
7860 extend without an if statement.
7861
7862 2000-04-11 Alan Modra <alan@linuxcare.com.au>
7863
7864 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
7865 signed quantites.
7866 * elf32-mips.c (gprel16_with_gp): Likewise.
7867 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
7868 here using -0x40000, not (int)0xfffc0000.
7869 (elf32_hppa_size_of_stub): Likewise.
7870
7871 2000-04-11 Timothy Wall <twall@cygnus.com>
7872
7873 * coff-tic54x.c: Now builds with all targets.
7874 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
7875 * Makefile.in: Regenerate.
7876 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
7877 unitialized variable.
7878
7879 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
7880
7881 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
7882 --enable-build-warnings option.
7883 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
7884 * Makefile.in, configure: Re-generate.
7885
7886 2000-04-07 Nick Clifton <nickc@cygnus.com>
7887
7888 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
7889 BFD_RELOC_THUMB_PCREL_BLX.
7890
7891 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7892 R_ARM_XPC25 and R_ARM_THM_PC22.
7893
7894 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
7895 R_ARM_XPC25 and R_ARM_THM_XPC22.
7896 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
7897 R_ARM_[XPC25|THM_XPC22].
7898
7899 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
7900 elf/arm-oabi.h to elf/arm.h
7901
7902 * Makefile.am: Fix dependency for elfarm-oabi.c
7903 * Makefile.in: Regenerate.
7904
7905 * bfd-in2.h: Regenerate.
7906 * libbfd.h: Regenerate.
7907
7908 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7909
7910 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
7911 and restore it on failure. Release newly allocated tdata on
7912 failure.
7913
7914 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
7915
7916 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
7917 (decode_line_info): Set it. Report error if unit->line_offset is
7918 equal to or larger than it.
7919
7920 2000-04-07 Timothy Wall <twall@cygnus.com>
7921
7922 * targets.c: Added vecs for tic54x.
7923 * reloc.c: Added relocs for tic54x.
7924 * libbfd.h: Regenerated.
7925 * configure: Add TI COFF vecs for tic54x.
7926 * configure.in: Ditto.
7927 * config.bfd (targ_cpu): Recognize new tic54x target.
7928 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
7929 * bfd-in2.h: Add tic54x target and relocations.
7930 * Makefile.am, Makefile.in: Add tic54x target.
7931 * archures.c (bfd_archures_list): Add tic54x target.
7932 * coff-tic54x.c: New.
7933 * cpu-tic54x.c: New.
7934
7935 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7936
7937 * elfcore.h (elf_core_file_p): call backend_object_p which
7938 thereby gets an opportunity to update the arch/machine type.
7939
7940 2000-04-06 Timothy Wall <twall@cygnus.com>
7941
7942 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
7943 class. Handle SEC_CLINK and SEC_BLOCK flags.
7944 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
7945 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
7946
7947 2000-04-06 Nick Clifton <nickc@cygnus.com>
7948
7949 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
7950 EF_INTERWORK if this is an unknown EABI.
7951 (elf32_arm_merge_private_bfd_data): Check EABI version
7952 numbers. Only check EF_xxx flags if the EABI version number
7953 is unknown.
7954 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
7955 if the EABI version number is unknown.
7956 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
7957 if the EABI version number is unknown.
7958
7959 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
7960
7961 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
7962 BFD_RELOC_SH_LOOP_END.
7963 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
7964 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
7965 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
7966 (sh_elf_reloc_loop): New function.
7967 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
7968 any more.
7969 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
7970 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
7971 * bfd-in2.h, libbfd.h: Regenerate.
7972
7973 2000-04-04 Alan Modra <alan@linuxcare.com.au>
7974
7975 * po/bfd.pot: Regenerate.
7976
7977 * Makefile.am: Remove extraneous mkdep comment.
7978 (MKDEP): Use gcc -MM rather than mkdep.
7979 (DEP): Quote when passing vars to sub-make. Add warning
7980 message to end.
7981 (DEP1): Rewrite for "gcc -MM".
7982 (CLEANFILES): Add DEP2.
7983 Update dependencies.
7984 * Makefile.in: Regenerate.
7985
7986 2000-04-03 Kevin Buettner <kevinb@redhat.com>
7987
7988 * configure.in: Added corefile support for AIX 4.3. In particular,
7989 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
7990 compiling rs6000-core.c.
7991 * configure: Regenerated.
7992
7993 2000-04-03 H.J. Lu <hjl@gnu.org>
7994
7995 * cache.c (bfd_open_file): Unlink the output file only if
7996 it has non-zero size.
7997
7998 2000-04-01 Ken Block USG <block@zk3.dec.com>
7999
8000 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8001 relative relocations for non-loaded sections in shared objects.
8002 (elf64_alpha_check_relocs): Similarly.
8003
8004 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
8005
8006 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8007 BFD_RELOC_16 to switch for extended relocs.
8008 (MY_swap_ext_reloc_in): New.
8009 (MY_swap_ext_reloc_out): New.
8010 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8011 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8012 (NAME(aout,squirt_out_relocs)): Similarly use
8013 MY_swap_ext_reloc_out.
8014 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8015
8016 2000-04-03 Kazu Hirata <kazu@hxi.com>
8017
8018 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8019 the R_PCRWORD_B case.
8020
8021 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8022
8023 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8024 on some targets.
8025 * ihex.c : Ditto.
8026
8027 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
8028
8029 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8030 HOWTO references to bfd_elf_generic_reloc, that have
8031 partial_inplace == true, now use the new function. The function
8032 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8033 extends its fixes to the R_M32R_{16,24,32} relocs.
8034 The new logic in m32r_elf_lo16_reloc() has been removed, and
8035 it instead calls the new routine to obtain that functionality.
8036
8037 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8038
8039 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8040 elf32_avr_check_relocs, avr_final_link_relocate,
8041 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8042 elf32_avr_object_p): Add prototypes.
8043 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8044 (bfd_elf_avr_final_write_processing): Make static.
8045
8046 2000-03-27 Denis Chertykov <denisc@overta.ru>
8047
8048 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8049 * archures.c (bfd_architecture): Add AVR architecture.
8050 (bfd_archures_list): Add reference to AVR architecture info.
8051 * elf.c (prep_headers): Handle bfd_arch_avr.
8052 * reloc.c: Add various AVR relocation enums.
8053 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8054 list.
8055 * Makefile.am: Add support for AVR elf.
8056 * configure.in: Likewise.
8057 * config.bfd: Likewise.
8058 * Makefile.in: Regenerate.
8059 * configure: This too.
8060 * bfd-in2.h: And this.
8061 * libbfd.h: And this.
8062
8063 2000-03-24 H.J. Lu <hjl@gnu.org>
8064
8065 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8066 (elf64_alpha_find_reloc_at_ofs): Likewise.
8067
8068 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8069
8070 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8071 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8072 allowable range used to be -2**(n-1) to 2**n-1.
8073 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8074 "boolean overflow" with "bfd_reloc_status_type flag".
8075
8076 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8077
8078 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8079
8080 2000-03-14 Kazu Hirata <kazu@hxi.com>
8081
8082 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8083 of shrinks properly, including the last reloc.
8084
8085 2000-03-13 Kazu Hirata <kazu@hxi.com>
8086
8087 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8088 check for R_MOVL2.
8089
8090 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8091
8092 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8093 a format mismatch rather than an "error" from bfd_read such as
8094 bfd_error_file_truncated.
8095
8096 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8097
8098 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8099 sign-extension and big-endian compensation for
8100 R_MIPS_64 even in ld -r.
8101
8102 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8103
8104 * elf32-mips.c (mips_elf_next_relocation): Rename from
8105 mips_elf_next_lo16_relocation, and generalize to look
8106 for any relocation type.
8107 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8108 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8109 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8110 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8111 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8112 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8113 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8114 (mips_rtype_to_howto): Likewise.
8115 (mips_elf_calculate_relocation): Handle new relocs.
8116 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8117 are paired. The addend for R_MIPS_GNU_REL16_S2
8118 is shifted right two bits.
8119
8120 2000-03-10 Alan Modra <alan@linuxcare.com.au>
8121
8122 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8123 comment, and ensure it doesn't happen again.
8124 (bfd_install_relocation): Same here.
8125 (_bfd_relocate_contents): Don't bother assigning unused signmask
8126 shift result. Fix typos in comments.
8127 Remove trailing whitespace throughout file.
8128
8129 2000-03-07 Doug Evans <dje@casey.transmeta.com>
8130
8131 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8132 * bfd-in2.h: Rebuild.
8133
8134 2000-03-06 Nick Clifton <nickc@cygnus.com>
8135
8136 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8137 sym_ptr_ptr fields.
8138 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8139 (SIZEOF_ILF_STRINGS): Redefine.
8140 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
8141 relative reloc, as opposed to a section relative reloc.
8142 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8143 not C_LABEL.
8144 Add length of symbol's prefix to string pointer.
8145 Store a pointer to the symbol in the symbol pointer table.
8146 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8147 Initialise the symbol pointer table.
8148 Store the hint in the Hint/Name table.
8149 Make the jump reloc be symbol realtive, not section relative.
8150 Create an import symbol for imported code.
8151
8152 2000-03-06 Catherine Moore <clm@cygnus.com>
8153
8154 * elf.c (swap_out_syms): Check for null type_ptr.
8155
8156 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
8157
8158 * aout-target.h (MY(write_object_contents)): Remove unused
8159 and unusable "#if CHOOSE_RELOC_SIZE".
8160 * pc532-mach.c (MY(write_object_contents)): Ditto.
8161 * netbsd.h (MY(write_object_contents)): Ditto.
8162 * hp300hpux.c (MY(write_object_contents)): Ditto.
8163 * freebsd.h (MY(write_object_contents)): Ditto.
8164 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8165
8166 2000-02-29 H.J. Lu <hjl@gnu.org>
8167
8168 * peicode.h (jtab): Make it static.
8169
8170 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8171 defined and COFF_IMAGE_WITH_PE is not defined.
8172 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8173 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8174
8175 2000-03-01 Nick Clifton <nickc@cygnus.com>
8176
8177 * coff-arm.c (bfd_arm_process_before_allocation): Make
8178 'symndx' signed to prevent compile time warning.
8179
8180 * coff-mcore.c: Remove unused prototype for pe_object_p.
8181
8182 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8183 functions that are not used when COFF_IMAGE_WITH_PE is
8184 defined.
8185 (struct sh_opcode): Change type of 'flags' field to unsigned
8186 long so that it can hold the USESAS flag.
8187
8188 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8189
8190 * elf-m10300.c (mn10300_elf_relax_section): Initialise
8191 'sym_sec'.
8192
8193 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8194 parameters.
8195 Remove unusued variables and code.
8196 (elf_backend_add_symbol_hook): Fix prototype.
8197
8198 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8199 'srelgot'.
8200
8201 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8202 'oldinst'.
8203
8204 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8205 parameters.
8206 Remove unusued variables and code.
8207 (elf_backend_add_symbol_hook): Fix prototype.
8208
8209 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8210
8211 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8212 to unused function parameter.
8213
8214 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8215 parameters.
8216 Use EMPTY_HOWTO to initialise empty howto slots.
8217 Remove unused variables.
8218
8219 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8220
8221 2000-03-01 H.J. Lu <hjl@gnu.org>
8222
8223 * aoutx.h (aout_link_input_section_std): Pass "true" to
8224 the undefined_symbol callback.
8225 (aout_link_input_section_ext): Likewise.
8226 * bout.c (get_value): Likewise.
8227 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8228 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8229 Likewise.
8230 (alpha_relocate_section): Likewise.
8231 * coff-arm.c (coff_arm_relocate_section): Likewise.
8232 * coff-i960.c (coff_i960_relocate_section): Likewise.
8233 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8234 * coff-mips.c (mips_relocate_section): Likewise.
8235 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8236 * coff-sh.c (sh_relocate_section): Likewise.
8237 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8238 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8239 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8240 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8241 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8242 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8243 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8244 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8245 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8246 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8247 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8248 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8249 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8250 * elflink.h (elf_link_output_extsym): Likewise.
8251 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8252 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8253 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8254
8255 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8256 undefined_symbol callback when building shared library with
8257 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8258 "true".
8259 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8260 * elf32-i386.c (elf_i386_relocate_section): Likewise.
8261 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8262 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8263 (elf32_mips_get_relocated_section_content): Likewise.
8264 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8265 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8266 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8267 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8268
8269 2000-02-28 Nick Clifton <nickc@cygnus.com>
8270
8271 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8272 * Makefile.in: Regenerate.
8273
8274 * configure.in: Add support for mips and sh pe vectors.
8275 * configure: regenerate.
8276
8277 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8278 targets.
8279
8280 * targets.c: Add mips and sh pe vectors.
8281
8282 * libpei.h (coff_final_link_postscript): Only define if not
8283 already defined.
8284
8285 * coffcode.h: Add support for WinCE magic numbers.
8286
8287 * peigen.c (pe_print_reloc): Update comment and rearrange
8288 appending of newline character.
8289
8290 * peicode.h: Add support for Image Library Format.
8291 (pe_ILF_vars): Structure containing data used by ILF code.
8292 (pe_ILF_make_a_section): New function. Create a section based
8293 on ILF data.
8294 (pe_ILF_make_a_reloc): New function. Create a reloc based on
8295 ILF data.
8296 (pe_ILF_make_a_symbol): New function. Create a symbol based
8297 on ILF data.
8298 (pe_ILF_save_relocs): New function. Store the relocs created
8299 by pe_ILF_make_a_reloc in a section.
8300 (pe_ILF_build_a_bfd): New function. Create a BFD describing
8301 an ILF object.
8302 (pe_ILF_object_p): New function. Return a bfd_target pointer
8303 for an ILF object.
8304 (pe_bfd_object_p): If an ILF object is detected call
8305 pe_ILF_object_p on it.
8306
8307 * coff-arm.c: Add support for WinCE relocs which are different
8308 from normal ARM COFF relocs.
8309 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8310
8311 * coff-sh.c: Add support for sh-pe target.
8312 * pe-sh.c: New file. Support code for sh-pe target.
8313 * pei-sh.c: New file. Support code for sh-pe target.
8314
8315 * pe-mips.c: New file. Support code for mips-pe target.
8316 * pei-mips.c: New file. Support code for mips-pe target.
8317
8318 2000-02-27 Jakub Jelinek <jakub@redhat.com>
8319
8320 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8321 architecture if the object causing the bump is dynamic.
8322 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8323 and also don't it for memory ordering.
8324 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8325
8326 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8327
8328 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8329 calling bfd_get_section_size_before_reloc.
8330 (decode_line_info): Likewise.
8331 (_bfd_dwarf2_find_nearest_line): Likewise.
8332
8333 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8334
8335 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8336 name of the libtool directory.
8337 * Makefile.in: Rebuild.
8338
8339 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
8340
8341 * som.c (SOM_HOWTO): Define.
8342 (som_hppa_howto_table): Use it.
8343
8344 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8345
8346 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8347
8348 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8349
8350 2000-02-24 Catherine Moore <clm@cygnus.com>
8351
8352 * som.c (som_misc_symbol_info): Add field
8353 secondary_def.
8354 (som_bfd_derive_misc_symbol_info): Initialize
8355 secondary_def.
8356 (som_build_and_write_symbol_table): Keep track
8357 of secondary_def field.
8358 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8359 if secondary_def field is set.
8360 (som_bfd_ar_write_symbol_stuff): Initialize
8361 secondary_def.
8362
8363 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8364
8365 * dwarf2.c (read_address): Read 16-bits addresses.
8366 (parse_comp_unit): Accept addr_size == 2.
8367
8368 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8369
8370 * bfd-in.h: Update copyright date.
8371
8372 2000-02-23 Linas Vepstas <linas@linas.org>
8373
8374 * cpu-i370.c: New file.
8375 * elf32-i370.c: New file.
8376 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8377 (bfd_i370_arch): New.
8378 (bfd_archures_list): Add bfd_i370_arch.
8379 * elf.c (prep_headers): Add bfd_arch_i370.
8380 * Makefile.am: Add support for IBM 370 elf.
8381 * config.bfd: Likewise.
8382 * configure.in: Likewise.
8383 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8384 * reloc.c (bfd_reloc_code_type): Likewise.
8385 * targets.c: Likewise.
8386
8387 * Makefile.in: Regenerate.
8388 * configure: Regenerate.
8389 * bfd-in2.h: Regenerate.
8390
8391 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8392
8393 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8394 invalid relocation types, and change them to R_386_NONE.
8395
8396 2000-02-22 H.J. Lu <hjl@gnu.org>
8397
8398 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8399 not defined, don't add a second ELF_VER_CHR.
8400
8401 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8402 symbols converted to local symbols even when stripping all
8403 symbols.
8404 (elf_link_output_extsym): Process global symbols converted to
8405 local symbols even if they are being stripped.
8406
8407 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8408
8409 * archures.c (bfd_octets_per_byte): Return unsigned int.
8410 (bfd_arch_mach_octets_per_byte): Ditto.
8411 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8412 comparison warning.
8413 * section.c (bfd_get_section_size_before_reloc): Quell signed
8414 vs. unsigned comparison warning.
8415 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8416 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8417 change. What was I thinking?
8418 * bfd-in2.h: Regenerate.
8419
8420 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8421 (elf_gc_sections): Same here.
8422 (elf_gc_common_finalize_got_offsets): And here.
8423
8424 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8425
8426 ELF HPPA doesn't work at present; remove it until it does.
8427 * config.bfd: Comment out setting targ_defvec to
8428 bfd_elf32_hppa_vec.
8429 * Makefile.am: Rebuild dependencies.
8430 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8431 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8432 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8433 * Makefile.in: Rebuild.
8434 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8435
8436 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8437
8438 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8439 is no bfd_free(). Revert bfd_free part of previous change.
8440
8441 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8442
8443 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8444 arrays.
8445 (coff_compute_section_file_positions): Use bfd_free to pair
8446 bfd_malloc.
8447 (coff_write_object_contents): Likewise.
8448
8449 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8450 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8451
8452 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8453
8454 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8455 (xcoff_ar_file_hdr_big): New structure.
8456 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8457 (xcoff_ar_hdr_big): New structure.
8458 (SIZEOF_AR_HDR_BIG): New macro.
8459 (xcoff_big_format_p): New macro.
8460 (xcoff_ardata_big): New macro.
8461 (arch_xhdr_big): New macro.
8462 (xcoff_slurp_armap): Handle large archives.
8463 (xcoff_archive_p): Detect large archives.
8464 (xcoff_read_ar_hdr): Handle large archives.
8465 (xcoff_openr_next_archived_file): Handle large archives.
8466 (xcoff_generic_stat_arch_elt): Handle large archives.
8467 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8468 (xcoff_write_armap_big): New function.
8469 (xcoff_write_armap): New function, dispatch to _old or _big.
8470 (xcoff_write_archive_contents_old): Rename from
8471 xcoff_write_archive_contents.
8472 (xcoff_write_archive_contents_big): New function.
8473 (xcoff_write_archive_contents): New function, dispatch to _old or
8474 _big.
8475
8476 2000-02-18 Richard Henderson <rth@cygnus.com>
8477
8478 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8479 and hide_symbol members.
8480 (elf_link_hash_copy_indirect): Remove.
8481 (elf_link_hash_hide_symbol): Remove.
8482 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8483 and elf_backend_hide_symbol.
8484 (_bfd_elf_link_hash_copy_indirect): Declare.
8485 (_bfd_elf_link_hash_hide_symbol): Declare.
8486 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8487 (_bfd_elf_link_hash_hide_symbol): Likewise.
8488 (_bfd_elf_link_hash_table_init): Don't init killed members.
8489 * elflink.h (elf_link_add_object_symbols): Use the bed function
8490 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8491 (elf_link_assign_sym_version): Likewise.
8492 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8493 (elf_backend_hide_symbol): Likewise.
8494 (elfNN_bed): Update for new members.
8495
8496 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8497
8498 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8499 STACK_END_ADDR): Define for new core file format.
8500 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8501 for handling the vagaries of the various core file structures used
8502 by AIX over the years.
8503 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8504 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8505 core_dumpx structure.
8506
8507 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8508
8509 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8510 (bfd_mach_sh3_dsp): Likewise.
8511 (bfd_mach_sh4): Reinstate.
8512 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8513 * bfd-in2.h: Regenerate.
8514 * coff-sh.c (struct sh_opcode): flags is no longer short.
8515 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8516 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8517 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8518 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8519 (sh_opcodes): No longer const.
8520 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8521 (sh_insn_uses_reg): Check for USESAS and USESR8.
8522 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8523 (_bfd_sh_align_load_span): Return early for SH4.
8524 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8525 Take into account that field b of a parallel processing insn
8526 could be mistaken for a separate insn.
8527 * cpu-sh.c (arch_info_struct): New array elements for
8528 sh2, sh-dsp and sh3-dsp.
8529 Reinstate element for sh4.
8530 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8531 (SH4_NEXT): Reinstate.
8532 (SH3_NEXT, SH3E_NEXT): Adjust.
8533 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8534 * elf32-sh.c (sh_elf_set_private_flags): New function.
8535 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8536 (sh_elf_merge_private_data): New function.
8537 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8538 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8539 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8540 sh_elf_merge_private_data.
8541
8542 2000-02-13 Richard Henderson <rth@cygnus.com>
8543
8544 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8545 hide_symbol members.
8546 (elf_link_hash_copy_indirect): New.
8547 (elf_link_hash_hide_symbol): New.
8548 * elflink.h (elf_link_add_object_symbols): Break out copy from
8549 indirect new new symbol to elf.c.
8550 (elf_link_assign_sym_version): Break out privatization of
8551 non-exported symbol to elf.c.
8552 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8553 (_bfd_elf_link_hash_hide_symbol): New.
8554 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8555
8556 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8557
8558 * section.c (_bfd_strip_section_from_output): Add info parameter.
8559 If it passed as non-NULL, use it to check whether any input BFD
8560 has an input section which uses this output section. Change all
8561 callers.
8562 * bfd-in2.h: Rebuild.
8563
8564 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8565 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8566 1999-11-29.
8567 * bfd-in2.h: Rebuild.
8568
8569 2000-02-10 Timothy Wall <twall@cygnus.com>
8570
8571 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8572 allow final modifications of swapped-in symbol.
8573 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8574 * coffcode.h (coff_write_relocs): Use macro
8575 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8576 symbol index should be set to -1.
8577
8578 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
8579
8580 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8581 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8582 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8583 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8584 sh_insns_uses_or_sets_freg): New functions.
8585 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8586 * (sh_insns_conflict): Use new functions and new macros to
8587 detect conflicts when two instructions both set same integer registers,
8588 both set same fp register, and both set special register.
8589
8590 2000-02-09 Timothy Wall <twall@cygnus.com>
8591
8592 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8593 swapping in sections, so that the swapping routines have access to
8594 the arch/mach info.
8595
8596 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8597
8598 * coff-go32.c: Update comment. Update copyright.
8599
8600 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8601
8602 * syms.c (bfd_decode_symclass)
8603 Two new class characters were added - 'V' and 'v'. The
8604 meaning of 'W' is now restricted to just weak non-object
8605 symbols. This allows differentiation between, for example,
8606 weak functions vs weak objects. nm for example now dumps:
8607 'W' = weak global
8608 'w' = weak unresolved
8609 'V' = weak global object
8610 'v' = weak unresolved object
8611
8612 (bfd_is_undefined_symclass): New function. Return true if the
8613 given symbol class represents and undefined/unresolved symbol.
8614
8615 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8616 unresolved symbols.
8617
8618 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8619
8620 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8621 STT_ARM_16BIT flag set, but it is not attached to a data object
8622 return STT_ARM_16BIT so that it will be treated as code by the
8623 disassembler.
8624
8625 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8626
8627 * coff-i386.c (i3coff_object_p): Remove prototype.
8628 Update copyright.
8629
8630 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8631 to name. Update copyright.
8632
8633 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8634 assignment to avoid warning. Update copyright.
8635
8636 2000-01-24 Robert Lipe (robertl@sco.com)
8637
8638 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8639 instead of using GNU C extension.
8640
8641 2000-01-21 Nick Clifton <nickc@cygnus.com>
8642
8643 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8644 amount from a bfd_in_memory structure.
8645 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8646 structure.
8647
8648 2000-01-14 Nick Clifton <nickc@cygnus.com>
8649
8650 * linker.c (default_indirect_link_order): oops - fix incorrectly
8651 applied patch from Tim Wall.
8652
8653 2000-01-13 Timothy Wall (twall@tiac.net>
8654
8655 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8656 = scnhsz, filhsz, relsz, aoutsz, etc)
8657
8658 * coffswap.h: Ditto.
8659
8660 2000-01-13 Nick Clifton <nickc@cygnus.com>
8661
8662 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8663 interwork thumb to arm stub.
8664
8665 2000-01-13 Timothy Wall (twall@tiac.net>
8666
8667 * archures.c (bfd_octets_per_byte): New function: Return
8668 target byte size.
8669 (bfd_arch_mach_octets_per_byte): New function: Return target
8670 byte size.
8671
8672 * section.c: Distinguish between octets and bytes for usage of
8673 _cooked_size, _raw_size, and output_offset. Clarify
8674 description of bfd_set_section_contents.
8675
8676 * bfd-in2.h: Regenerate.
8677
8678 * coffgen.c: Indicate that the offset parameter is in bytes, not
8679 octets.
8680
8681 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8682 where appropriate to get the octet offset when calling
8683 bfd_set_section_contents.
8684 (bfd_coff_reloc_link_order): Ditto.
8685
8686 * linker.c (bfd_generic_reloc_link_order): Ditto.
8687 (_bfd_default_link_order): Ditto.
8688
8689 * reloc.c (bfd_perform_relocation): Distinguish between octets
8690 and bytes. Use octets when indexing into octet data; use bytes
8691 when calculating target addresses.
8692 (bfd_install_relocation): Ditto.
8693
8694 * srec.c (srec_write_section): Ditto.
8695
8696 2000-01-13 Nick Clifton <nickc@cygnus.com>
8697
8698 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8699 3 to 2. This allows 4 byte sized sections, which is necessary for
8700 dlltool to build functioning DLLs.
8701
8702 2000-01-10 Philip Blundell <pb@futuretv.com>
8703
8704 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8705 (arm*-*-conix*): New target.
8706
8707 2000-01-10 Egor Duda <deo@logos-m.ru>
8708
8709 * config.bfd: Include elf32_i386 vector to target list for cygwin
8710 and mingw.
8711
8712 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8713 * configure.in: Test for structure win32_pstatus_t in
8714 <sys/procfs.h>
8715 * configure: Regenerate.
8716
8717 * elf.c (elfcore_grok_win32pstatus): New function: process
8718 win32_pstatus_t notes in elf core file.
8719 (elfcore_grok_note): Detect win32_pstatus notes.
8720
8721 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8722
8723 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8724 visibility.
8725 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8726 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8727
8728 For older changes see ChangeLog-9899
8729 \f
8730 Local Variables:
8731 mode: change-log
8732 left-margin: 8
8733 fill-column: 74
8734 version-control: never
8735 End:
This page took 0.30693 seconds and 4 git commands to generate.