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