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