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