1 2002-01-06 Steve Ellcey <sje@cup.hp.com>
3 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4 argument so we can handle HP-UX specially.
5 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
6 (elfNN_hpux_backend_section_from_bfd_section): New for support
7 of SHN_IA_64_ANSI_COMMON.
8 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9 (is_unwind_section_name): Add special HP-UX support.
10 (elfNN_ia64_section_from_shdr): Add support for more sections.
11 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
12 add support for more sections.
13 (elfNN_ia64_additional_program_headers): Modify
14 is_unwind_section_name call.
15 (elfNN_ia64_modify_segment_map): Remove assumption that there is
16 only one unwind section in segment.
18 2002-01-06 Alan Modra <amodra@bigpond.net.au>
20 * syms.c (_bfd_generic_make_empty_symbol): New function.
21 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
22 _bfd_generic_make_empty_symbol.
23 * libbfd.h: Regenerate.
24 * bfd-in2.h: Regenerate.
25 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
26 (hppabsd_core_get_symtab_upper_bound): Don't define.
27 (hppabsd_core_get_symtab): Likewise.
28 (hppabsd_core_print_symbol): Likewise.
29 (hppabsd_core_get_symbol_info): Likewise.
30 (hppabsd_core_bfd_is_local_label_name): Likewise.
31 (hppabsd_core_get_lineno): Likewise.
32 (hppabsd_core_find_nearest_line): Likewise.
33 (hppabsd_core_bfd_make_debug_symbol): Likewise.
34 (hppabsd_core_read_minisymbols): Likewise.
35 (hppabsd_core_minisymbol_to_symbol): Likewise.
36 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
38 * hpux-core.c: Similarly.
39 * irix-core.c: Similarly.
40 * osf-core.c: Similarly.
41 * sco5-core.c: Similarly.
42 * binary.c (binary_make_empty_symbol): Remove function, define as
43 _bfd_generic_make_empty_symbol.
44 * ihex.c (ihex_make_empty_symbol): Likewise.
45 * mmo.c (mmo_make_empty_symbol): Likewise.
46 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
47 * srec.c (srec_make_empty_symbol): Likewise.
48 * versados.c (versados_make_empty_symbol): Likewise.
49 * vms.c (_bfd_vms_make_empty_symbol): Remove.
50 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
51 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
52 rather than _bfd_vms_make_empty_symbol.
53 * vms-misc.c (new_symbol): Likewise.
55 2002-01-05 Alan Modra <amodra@bigpond.net.au>
57 * section.c (bfd_section_init): Remove unnecessary initialisations.
58 (bfd_section_list_clear): New function.
59 (bfd_section_list_remove, bfd_section_list_insert): New macros.
60 (_bfd_strip_section_from_output): Use them.
61 * coffcode.h (coff_set_alignment_hook): Likewise.
62 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
63 * elf64-mips.c (mips_elf64_final_link): Likewise.
64 * elf64-mmix.c (mmix_elf_final_link): Likewise.
65 * sunos.c (sunos_add_dynamic_symbols): Likewise.
66 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
67 * bfd-in2.h: Regenerate.
69 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
70 rather than doing our own section handling. Clean up after errors
71 with bfd_release and bfd_section_list_clear. Handle unexpected
73 * aoutf1.h (sunos4_core_file_p): Likewise.
74 * aix386-core.c (aix386_core_file_p): Likewise.
75 * cisco-core.c (cisco_core_file_validate): Likewise.
76 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
77 * trad-core.c (trad_unix_core_file_p): Likewise.
79 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
80 with bfd_release and bfd_section_list_clear.
81 * hpux-core.c (hpux_core_core_file_p): Likewise.
82 * irix-core.c (irix_core_core_file_p): Likewise.
83 * lynx-core.c (lynx_core_file_p): Likewise.
84 * osf-core.c (osf_core_core_file_p): Likewise.
85 * rs6000-core.c (rs6000coff_core_p): Likewise.
86 * sco5-core.c (sco5_core_file_p): Likewise.
88 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
89 sign extension adjustments without conditionals.
91 2002-01-04 Jakub Jelinek <jakub@redhat.com>
93 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
94 CIE at .eh_frame start is removed due to no FDEs referencing it.
96 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
98 * config.bfd (x86_64-*-netbsd*): New target.
99 * configure.in (x86_64-*-netbsd*): Set COREFILE
101 * configure: Regenerated.
103 2002-01-03 Tom Rix <trix@redhat.com>
105 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
106 for recent bfd_make_section_anyway change.
108 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
110 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
111 R_ARM_THM_PC11 reloc.
113 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
115 * configure.in (LINGUAS): Add ja.
116 * configure: Regenerate.
117 * po/ja.po: Import from translation project's web site.
119 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
121 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
122 messages to ease translation into other languages.
124 2001-12-31 Jakub Jelinek <jakub@redhat.com>
126 * elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
127 before looking for .eh_frame_hdr section.
128 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): If
129 .eh_frame_hdr section is being stripped from output, don't do
132 2001-12-27 Tom Rix <trix@redhat.com>
134 * coff-rs6000.c (xcoff_generate_rtinit): Clean data_buffer alloc/free.
135 * coff64-rs6000.c (xcoff64_generate_rtinit): Same.
136 (xcoff_write_archive_contents_big): Rewrite.
137 (xcoff_write_armap_big): Rewrite.
138 (xcoff_write_one_armap_big): Delete.
139 * libxcoff.h : Clean up.
141 2001-12-21 Tom Rix <trix@redhat.com>
143 * xcofflink.c (bfd_xcoff_link_generate_rtinit): New function.
144 Interface to linker for generation of __rtinit.
145 * libxcoff.h (struct xcoff_backend_data_rec): Add new ops to xcoff
146 backend to generate special linker symbol __rtinit.
147 * coff-rs6000.c (bfd_xcoff_backend_data, bfd_pmac_xcoff_backend_data)
149 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data,
150 bfd_xcoff_backend_data): Same.
151 * bfd-in.h: Add bfd_xcoff_link_generate_rtinit.
152 * bfd-in2.h : Regenerate.
154 2001-12-21 Jakub Jelinek <jakub@redhat.com>
156 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
157 R_SPARC_DISP32. Support R_SPARC_PLT32.
158 (sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
159 (elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
160 (elf32_sparc_relocate_section): Likewise.
161 * elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
162 R_SPARC_DISP32. Support R_SPARC_PLT32 and R_SPARC_PLT64.
163 (sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
164 and BFD_RELOC_SPARC_PLT32.
165 (sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
166 (sparc64_elf_relocate_section): Likewise.
167 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
168 * bfd-in2.h, libbfd.h: Rebuilt.
170 2001-12-20 Tom Rix <trix@redhat.com>
172 * coffcode.h (coff_compute_section_file_positions): Add special AIX
173 loader alignment of text section.
175 2001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
177 * config.bfd (mips-dec-netbsd*): Delete alias for mips*el-*-netbsd*.
179 * config.bfd (arm-*-netbsdelf*): Add target.
180 * configure.in: Include netbsd-core.lo for native arm-*-netbsd*.
181 * configure: Regenerate.
183 2001-12-20 Alan Modra <amodra@bigpond.net.au>
185 * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
186 as can happen with a core file, before dereferencing.
188 2001-12-19 Michael Snyder <msnyder@redhat.com>
190 * elf32-i386.c (elf_i386_grok_psinfo): Fix copy-and-paste error:
191 target is i386 (not mips), and size of descdata is 124 (not 128).
193 2001-12-19 Jakub Jelinek <jakub@redhat.com>
195 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
196 is 0, temporarily grow it to minimal CIE size.
197 (_bfd_elf_write_section_eh_frame): If input .eh_frame section would
198 end up empty, build a fake minimal CIE.
200 2001-12-19 Steve Ellcey <sje@cup.hp.com>
202 * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
203 ia64*-*-hpux* target.
204 (bfd_elf64_ia64_hpux_big_vec): Likewise.
206 * configure.in: Ditto.
207 * configure: Regenerate
208 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
209 alloca with bfd_malloc.
210 (get_local_sym_hash): Likewise.
211 (elfNN_hpux_post_process_headers): New function.
212 #include elfNN-target.h again with values for IA64 HP-UX vector.
214 2001-12-18 Michael Snyder <msnyder@redhat.com>
216 * elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
217 sections of corefiles. Also it makes no sense to sort if count == 1.
219 2001-12-18 H.J. Lu <hjl@gnu.org>
221 * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
223 2001-12-18 H.J. Lu <hjl@gnu.org>
225 * elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
227 2001-12-18 H.J. Lu <hjl@gnu.org>
229 * elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
230 (_bfd_mips_elf_copy_private_bfd_data): Removed.
232 * elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
235 * elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
236 (bfd_elf??_bfd_copy_private_bfd_data): Removed.
237 * elf32-m32r.c: Likewise.
238 * elf32-m68k.c: Likewise.
239 * elf32-mcore.c: Likewise.
240 * elf32-mips.c: Likewise.
241 * elf32-ppc.c: Likewise.
242 * elf32-v850.c: Likewise.
243 * elf64-ppc.c: Likewise.
244 * elf64-sparc.c: Likewise.
245 * elfxx-ia64.c: Likewise.
247 * elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
249 * elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
250 to _bfd_elf_copy_private_bfd_data.
252 2001-12-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
254 * elf32-s390 (elf_s390_check_relocs): Pass addend to
256 * elf64-s390 (elf_s390_check_relocs): Likewise.
257 Fix by Andreas Jaeger <aj@suse.de>.
259 2001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
261 * configure.host: Correctly match all NetBSD/mips
264 2001-12-18 matthew green <mrg@eterna.com.au>
266 * config.bfd (m68*-*-netbsdelf*): New target.
267 (m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
268 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd.
270 2001-12-18 Jakub Jelinek <jakub@redhat.com>
272 * elflink.h (size_dynamic_sections): Skip anonymous version tag.
273 (elf_link_assign_sym_version): Don't count anonymous version tag.
275 2001-12-18 Jakub Jelinek <jakub@redhat.com>
277 * elf-eh-frame.c (struct cie): Add make_lsda_relative.
278 (struct eh_cie_fde): Add lsda_encoding, lsda_offset,
280 (read_value, write_value): New.
281 (_bfd_elf_discard_section_eh_frame): Inicialize
282 lsda_encoding, lsda_offset and make_lsda_relative.
283 (_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
284 request no dynamic reloc for LSDA field of FDE.
285 (_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
286 If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
287 or pcrel. Fix address computation for DW_EH_PE_pcrel relocs.
288 Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
289 . might have changed due to deleted FDE or CIEs.
291 2001-12-18 Jakub Jelinek <jakub@redhat.com>
293 * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
295 (_bfd_elf_strtab_finalize): Don't use a hash table for last
296 character chains, instead use an array.
298 2001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
300 * elf.c (elfcore_netbsd_get_lwpid): New function.
301 (elfcore_grok_netbsd_procinfo): New function.
302 (elfcore_grok_netbsd_note): New function.
303 (elfcore_read_notes): Call elfcore_grok_netbsd_note to process
304 NetBSD ELF core file notes.
306 2001-12-18 Alan Modra <amodra@bigpond.net.au>
308 * elfcode.h (struct bfd_preserve): New.
309 (elf_object_p): Replace preserved_* vars with instance of above.
310 Save and restore arch_info pointer rather than arch, mach so that
311 more cases can be restored. Save and restore new section_tail,
312 section_htab structure, and init appropriately. Move "rest of
313 section header" code so that i_shdrp needs no NULL initialisation.
314 Free old section_htab on success.
315 * elfcore.h (elf_core_file_p): Likewise.
317 2001-12-17 Tom Rix <trix@redhat.com>
319 * coffcode.h (sec_to_styp_flags): Add STYP_EXCEPT and STYP_TYPCHK for
322 2001-12-17 Jakub Jelinek <jakub@redhat.com>
324 * elf-bfd.h (elf_discarded_section): Define.
325 * elflink.h (elf_link_input_bfd): Use it.
326 (elf_reloc_symbol_deleted_p): Likewise.
328 * elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
329 overflows for pc relative relocs against discarded sections.
331 2001-12-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
333 * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
334 * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
335 over the last months. Add some code for mips16 handling.
336 (mips_elf64_check_mips16_stubs): New function.
337 (mips_elf64_stub_section_p): Likewise.
338 (mips_elf64_calculate_relocation): Change interface to support mips16.
339 (mips_elf64_perform_relocation): Likewise.
341 2001-12-17 Alan Modra <amodra@bigpond.net.au>
343 Support for more than 64k ELF sections.
344 * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
345 (bfd_elf32_swap_symbol_in): Likewise.
346 (bfd_elf32_swap_symbol_out): Likewise.
347 (bfd_elf64_swap_symbol_in): Likewise.
348 (bfd_elf64_swap_symbol_out): Likewise.
349 (elf_reloc_cookie): Add locsym_shndx field. Make locsyms a PTR.
350 (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
351 symtab_shndx_section.
352 (elf_numsections): Define.
353 (elf_symtab_shndx): Define.
354 * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
355 (bfd_elf_find_section): Likewise.
356 (bfd_section_from_elf_index): Likewise.
357 (bfd_section_from_shdr): Likewise. Handle SHT_SYMTAB_SHNDX.
358 (bfd_section_from_r_symndx): Read symbol shndx extension, and
359 translate st_shndx for > SHN_HIRESERVE.
360 (assign_section_numbers): Skip reserved sections. Assign
361 symtab_shndx_section and elf_numsections. Exclude reserved
362 sections from e_shnum. Set up symtab_shndx_hdr.
363 (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
364 (map_sections_to_segments): Don't map eh_frame_hdr unless required.
365 (assign_file_positions_except_relocs): Use elf_numsections rather
366 than header e_shnum. Skip reserved sections and symtab_shndx_section.
367 (prep_headers): Set name for symtab_shndx_hdr.
368 (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
369 (_bfd_elf_write_object_contents): Likewise. Skip reserved sections.
370 (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
371 first. Use elf_section_data if available. Use elf_numsections.
372 Start scan at index 1.
373 (copy_private_bfd_data ): Comment fixes.
374 (MAP_ONESYMTAB): Define above SHN_HIOS.
375 (MAP_DYNSYMTAB): Likewise.
376 (MAP_STRTAB): Likewise.
377 (MAP_SHSTRTAB): Likewise.
378 (MAP_SYM_SHNDX): New define.
379 (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
380 (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
381 * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
383 (elf_swap_symbol_out): Likewise.
384 (elf_object_p): Set elf_numsections, and use instead of e_shnum.
385 Initialialise reserved elf_elfsections to point at shdr[0]. Remove
386 redundant bfd_release calls.
387 (elf_slurp_symbol_table): Read symbol shndx extension, and use with
388 elf_swap_symbol_in. Translate st_shndx for > SHN_HIRESERVE too.
389 * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
390 extension, and use with elf_swap_symbol_in.
391 (elf_link_record_local_dynamic_symbol): Likewise.
392 (elf_link_add_object_symbols): Likewise. Also translate st_shndx
393 for elf sections > SHN_HIRESERVE.
394 (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
396 (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
397 (elf_bfd_final_link): Allocate the above, and tidy code allocating
398 other buffers. Use elf_numsections instead of e_shnum. Adjust
399 elf_swap_symbol_out calls.
400 (elf_link_output_sym): Swap out symbol shndx extension too.
401 (elf_link_flush_output_syms): And flush them to disk.
402 (elf_link_output_extsym): Use SHN_BAD. Adjust elf_swap_symbol_out
404 (elf_gc_mark): Read symbol shndx extension, and use with
406 (elf_link_input_bfd): Likewise, Translate st_shndx for elf sections
407 > SHN_HIRESERVE too. Use SHN_BAD.
408 (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
409 elf_swap_symbol_in. Translate st_shndx > SHN_HIRESERVE too.
410 (elf_bfd_discard_info): Read symbol shndx extension. Don't attempt
411 to continue after a bfd error.
412 * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
413 Stash them immediately to symtab_hdr->contents rather than later
414 in multiple places. Clean up afterwards. Read symbol shndx
415 extension, and use with swap_symbol_in. Translate SHN_UNDEF,
416 SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
417 sections too. Remove dead code.
418 (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
419 when swapping in symbols. Tidy code adjusting global syms.
420 Don't swap in global syms.
421 (mn10200_elf_symbol_address_p): Likewise. Remove extsyms param.
422 (mn10200_elf_get_relocated_section_contents): Read symbol shndx
423 extension, and use with swap_symbol_in. Rename "size" -> "amt"
424 to maximize code in common with other files. Translate st_shndx
425 for > SHN_HIRESERVE too. Remove dead code.
426 * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
427 Stash them immediately to symtab_hdr->contents rather than later
428 in multiple places. Clean up afterwards. Read symbol shndx
429 extension, and use with swap_symbol_in. Remove dead code.
430 (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
431 (mn10300_elf_symbol_address_p): Likewise.
432 (mn10300_elf_get_relocated_section_contents): Likewise.
433 * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
434 (elf32_h8_relax_delete_bytes): Likewise.
435 (elf32_h8_symbol_address_p): Likewise.
436 (elf32_h8_get_relocated_section_contents): Likewise.
437 * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
438 extension, and use with swap_symbol_in.
439 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
440 * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
441 bfd_elf32_swap_symbol_out.
442 * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
443 elf sections > SHN_HIRESERVE too.
444 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
445 local syms. Read symbol shndx extension, and use with swap_symbol_in.
446 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
447 elf_numsections rather than header e_shnum.
448 * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
449 (sh_elf_relax_delete_bytes): Likewise.
450 (sh_elf_get_relocated_section_contents): Likewise. Only read local
452 * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
453 hold section index. Use elf_numsections rather than e_shnum.
454 Rename "index" -> "indx" to avoid shadowing warning.
455 (v850_elf_add_symbol_hook): Likewise.
456 * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
457 Read symbol shndx extension, and use with swap_symbol_in.
458 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
459 Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
460 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
461 (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
463 * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
464 before calling bfd_section_from_elf_index on local syms.
465 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
466 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
467 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
468 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
469 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
470 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
471 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
472 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
473 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
474 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
475 * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
476 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
477 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
478 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
479 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
480 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
481 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
482 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
483 * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
484 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
485 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
486 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
487 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
489 2001-12-17 Alan Modra <amodra@bigpond.net.au>
491 Hash bfd sections for fast lookup and create.
492 * bfd.c (struct _bfd): Add section_htab, section_tail.
493 * libbfd-in.h (_bfd_delete_bfd): Declare.
494 (bfd_section_hash_newfunc): Declare.
495 * opncls.c (_bfd_new_bfd): Free memory on failure. Init
496 section_htab and section_tail.
497 (_bfd_delete_bfd): New function.
499 (bfd_fdopenr): Likewise.
500 (bfd_openstreamr): Likewise.
501 (bfd_openw): Likewise.
502 (bfd_close): Likewise.
503 (bfd_close_all_done): Likewise.
504 (bfd_release): Comment.
505 * section.c (struct section_hash_entry): New.
506 (bfd_section_hash_newfunc): New function.
507 (section_hash_lookup): Define.
508 (bfd_section_init): New function, split out from
509 bfd_make_section_anyway.
510 (bfd_get_section_by_name): Lookup via hash table.
511 (bfd_get_unique_section_name): Likewise.
512 (bfd_make_section_old_way): Rewrite to use hash table.
513 (bfd_make_section_anyway): Likewise.
514 (bfd_make_section): Likewise. Return NULL for attempts to make
515 BFD_{ABS,COM,UND,IND}_SECTION_NAME.
516 (_bfd_strip_section_from_output): Adjust section_tail if needed.
517 * configure.in: Bump bfd version.
518 * configure: Regenerate.
519 * libbfd.h: Regenerate.
520 * bfd-in2.h: Regenerate.
522 2001-12-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
524 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
525 (mips_elf64_high): New Function.
526 (mips_elf64_higher): Likewise.
527 (mips_elf64_highest): Likewise.
528 (mips_elf64_info_to_howto_rel): Likewise.
529 (mips_elf64_info_to_howto_rela): Likewise.
530 (mips_elf64_write_rel): Likewise.
531 (mips_elf64_write_rela): Likewise.
532 (mips_elf64_link_hash_newfunc): Likewise.
533 (mips_elf64_hi16_reloc): Likewise.
534 (mips_elf64_higher_reloc): Likewise.
535 (mips_elf64_highest_reloc): Likewise.
536 (mips_elf64_gprel16_reloc): Likewise.
537 (mips_elf64_gprel16_reloca): Likewise.
538 (mips_elf64_literal_reloc): Likewise.
539 (mips_elf64_gprel32_reloc): Likewise.
540 (mips_elf64_shift6_reloc): Likewise.
541 (mips_elf64_got16_reloc): Likewise.
542 (mips_elf64_assign_gp): Likewise.
543 (mips_elf64_final_gp): Likewise.
544 (gprel16_with_gp): Likewise.
545 (mips_elf64_additional_program_headers): Likewise.
546 (mips_elf64_link_hash_table_create): Likewise.
547 (mips_elf64_got_offset_from_index): Likewise.
548 (_mips_elf64_got_info): Likewise.
549 (mips_elf64_sign_extend): Likewise.
550 (mips_elf64_overflow_p): Likewise.
551 (mips_elf64_global_got_index): Likewise.
552 (mips_elf64_sort_hash_table_f): Likewise.
553 (mips_elf64_sort_hash_table): Likewise.
554 (mips_elf64_swap_msym_out): Likewise.
555 (mips_elf64_create_local_got_entry): Likewise.
556 (mips_elf64_local_got_index): Likewise.
557 (mips_elf64_got_page): Likewise.
558 (mips_elf64_got16_entry): Likewise.
559 (mips_elf64_local_relocation_p): Likewise.
560 (mips_elf64_next_relocation): Likewise.
561 (mips_elf64_create_dynamic_relocation): Likewise.
562 (mips_elf64_calculate_relocation): Likewise.
563 (mips_elf64_obtain_contents): Likewise.
564 (mips_elf64_perform_relocation): Likewise.
565 (mips_elf64_relocate_section): Likewise.
566 (mips_elf64_create_dynamic_sections): Likewise.
567 (mips_elf64_adjust_dynamic_symbol): Likewise.
568 (mips_elf64_always_size_sections): Likewise.
569 (mips_elf64_size_dynamic_sections): Likewise.
570 (mips_elf64_finish_dynamic_symbol): Likewise.
571 (mips_elf64_finish_dynamic_sections): Likewise.
572 (mips_elf64_gc_mark_hook): Likewise.
573 (mips_elf64_gc_sweep_hook): Likewise.
574 (mips_elf64_create_got_section): Likewise.
575 (mips_elf64_record_global_got_symbol): Likewise.
576 (mips_elf64_create_msym_section): Likewise.
577 (mips_elf64_allocate_dynamic_relocations): Likewise.
578 (mips_elf64_check_relocs): Likewise.
579 (mips_elf64_output_extsym): Likewise.
580 (mips_elf64_swap_gptab_in): Likewise.
581 (mips_elf64_swap_gptab_out): Likewise.
582 (gptab_compare): Likewise.
583 (mips_elf64_final_link): Likewise.
584 (prev_reloc_addend): Remenber addend of previous parts of a combined
586 (ELF_MIPS_GP_OFFSET): New define.
587 (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
588 (MIPS_FUNCTION_STUB_SIZE): Likewise.
589 (mips_elf64_howto_rel): Fix HOWTO defines.
590 (mips_elf64_howto_rela): Likewise.
591 (mips_elf64_swap_reloca_out): Fix signedness.
592 (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
593 (mips_elf64_be_swap_reloca_in): Likewise.
594 (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
595 (mips_elf64_be_swap_reloca_out): Likewise.
597 2001-12-15 Jakub Jelinek <jakub@redhat.com>
599 * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
600 * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
601 (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
602 sec_info here. Free ehbuf.
603 (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
605 (_bfd_elf_maybe_strip_eh_frame_hdr): New.
606 * elflink.h (size_dynamic_sections): Call it.
608 2001-12-14 Alan Modra <amodra@bigpond.net.au>
610 * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
612 2001-12-13 Jakub Jelinek <jakub@redhat.com>
614 * elf-bfd.h (enum elf_link_info_type): New.
615 (struct bfd_elf_section_data): Remove stab_info and merge_info
616 fields, add sec_info and sec_info_type.
617 (struct elf_obj_tdata): Add eh_frame_hdr field.
618 (_bfd_elf_discard_section_eh_frame): New prototype.
619 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
620 (_bfd_elf_eh_frame_section_offset): Likewise.
621 (_bfd_elf_write_section_eh_frame): Likewise.
622 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
623 * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
624 (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
625 (elf-eh-frame.lo): New.
626 * Makefile.in: Rebuilt.
627 * configure.in (elf): Add elf-eh-frame.lo.
628 * configure: Rebuilt.
629 * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
630 (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
631 (get_program_header_size): Take into account PT_GNU_EH_FRAME
633 (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
634 (_bfd_elf_rel_local_sym): Likewise.
635 (_bfd_elf_section_offset): Likewise. Call
636 _bfd_elf_eh_frame_section_offset too.
637 * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
639 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
640 * elf-eh-frame.c: New file.
641 * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
642 .stab sections. Set sec_info_type, use sec_info instead
643 of merge_info and stab_info.
644 (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
646 (elf_bfd_final_link): Write .eh_frame_hdr section.
647 (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
648 (elf_link_input_bfd): Likewise.
649 Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
650 (elf_bfd_discard_info): Add output_bfd argument.
651 Call _bfd_elf_discard_section_eh_frame and
652 _bfd_elf_discard_section_eh_frame_hdr.
653 (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
655 * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
657 * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
659 2001-12-12 Richard Henderson <rth@redhat.com>
661 * syms.c (_bfd_generic_read_minisymbols): Early return for
662 no symbols. Patch from FreeBSD folk; exact origin unknown.
664 2001-12-11 Alan Modra <amodra@bigpond.net.au>
666 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
667 and e_shstrndx if out of range.
668 (elf_object_p): Read extended values for e_shnum and e_shstrndx
669 from the first section header. Allocate space in elf_elfsections
670 for reserved sections and set to NULLs.
671 (elf_write_shdrs_and_ehdr): Set overflow fields in first section
672 header. Skip reserved sections in elf_elfsections. Remove
673 duplicate size calculation.
675 2001-12-07 Geoffrey Keating <geoffk@redhat.com>
676 Richard Henderson <rth@redhat.com>
677 Corinna Vinschen <vinschen@redhat.com>
679 * Makefile.am: Add support for xstormy16.
680 * archures.c: Add support for xstormy16.
681 * config.bfd: Add support for xstormy16.
682 * configure.in: Add support for xstormy16.
683 * reloc.c: Add support for xstormy16.
684 * targets.c: Add support for xstormy16.
685 * cpu-xstormy16.c: New file.
686 * elf32-xstormy16.c: New file.
687 * Makefile.in: Regenerated.
688 * bfd-in2.h: Regenerated.
689 * configure: Regenerated.
690 * libbfd.h: Regenerated.
692 2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
694 * elf.c (assign_file_positions_for_segments): Combine sentance
695 fragments into a single sentance in order to permit better
696 translation into foreign languages.
698 2001-12-07 Jim Blandy <jimb@redhat.com>
700 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
701 (elf_backend_grok_prstatus): Define.
703 2001-12-07 Jakub Jelinek <jakub@redhat.com>
705 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
708 2001-12-07 Jakub Jelinek <jakub@redhat.com>
710 * elf.c (_bfd_elf_rela_local_sym): Only call
711 _bfd_merged_section_offset if merge_info is non-NULL.
712 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
713 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
715 * elf32-arm.h (elf32_arm_final_link_relocate): Use
716 _bfd_elf_section_offset.
717 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
718 * elf32-i386.c (elf_i386_relocate_section): Use
719 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
720 * elf32-sh.c (sh_elf_relocate_section): Likewise.
721 * elf32-sparc.c (elf32_sparc_relocate_section): Use
722 _bfd_elf_section_offset.
723 * elf32-cris.c (cris_elf_relocate_section): Likewise.
724 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
725 * elf32-i370.c (i370_elf_relocate_section): Likewise.
726 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
727 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
728 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
729 * elf32-s390.c (elf_s390_relocate_section): Likewise.
730 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
731 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
732 * elf64-s390.c (elf_s390_relocate_section): Likewise.
733 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
734 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
735 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
737 2001-12-07 Alan Modra <amodra@bigpond.net.au>
739 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
740 already forced local.
742 2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
744 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
745 fragmented sentence parts into a whole sentence to permit
746 better translation into foreign languages.
748 2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
750 * configure: Regenerate.
751 * Makefile.in: Regenerate.
753 2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
755 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
756 BFD64_LIBS, make the latter depending on the availability of BFD64.
757 Add archive64.c source file.
758 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
759 and bfd_elf64_archive_write_armap, code from elf64-mips.c
760 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
761 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
762 (mips64*el-*-linux*): Likewise.
763 (mips*el-*-linux*): Likewise. Reorder entries.
764 * configure.in (bfd_libs): Define in dependency of BFD64 and
766 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
767 bfd_elf64_archive_slurp_armap instead.
768 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
771 2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
773 * config.bfd: Remove trailing blanks.
774 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
776 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
778 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
779 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
780 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
781 Disable pointless overflow checking of NONE and 32.
783 2001-12-04 Alan Modra <amodra@bigpond.net.au>
785 * reloc.c (bfd_install_relocation): Correct reloc address test.
786 (bfd_perform_relocation): Formatting fix.
787 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
789 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
791 * configure.in (LINGUAS): Add tr.
792 * configure: Regenerate.
793 * po/tr.po: Import from translation project's web site.
795 2001-12-03 Alan Modra <amodra@bigpond.net.au>
797 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
798 happens to trigger on undefined symbols.
799 (final_link_relocate): Return bfd_reloc_undefined for undefined
801 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
802 if we have already warned about an undefined symbol.
804 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
806 * elf32-mips.c (NEWABI_P): New define.
807 (USE_REL): Remove, replaced by
808 (elf_backend_may_use_rel_p): New define.
809 (elf_backend_may_use_rela_p): Likewise.
810 (elf_backend_default_use_rela_p): Likewise.
811 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
812 Fix some relocation definitions.
813 (elf_mips_howto_table_rela): New RELA relocation definitions for
815 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
816 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
817 (mips_rtype_to_howto): Likewise.
818 (_bfd_mips_elf_relocate_section): Likewise.
819 (_bfd_mips_elf_object_p): Typo.
820 (elf_backend_sign_extend_vma): Reordered together with many other
821 defines nearby to resemble the order of declaration in the header
824 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
826 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
827 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
828 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
829 * elf32-mips.c (mips_reloc_map): Likewise. Replace
830 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
831 * elf64-mips.c (mips_reloc_map): Likewise.
832 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
833 (BFD_RELOC_MIPS_GPREL32): Remove.
835 2001-11-30 H.J. Lu <hjl@gnu.org>
837 * elflink.h (elf_add_default_symbol): New.
838 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
839 to create an indirect symbol from the default for the symbol
840 with the default version if needed.
842 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
844 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
845 if it has already been set by another thread.
847 2001-11-28 Jakub Jelinek <jakub@redhat.com>
849 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
850 (elf64_alpha_relocate_section): Translate local_got_entries
851 for STT_SECTION symbol to SHF_MERGE section the first time
853 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
855 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
856 (get_dyn_sym_info): Use it.
857 (elfNN_ia64_relocate_section): Translate local dyn entries
858 for STT_SECTION symbol to SHF_MERGE section the first time
861 2001-11-27 H.J. Lu <hjl@gnu.org>
863 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
866 2001-11-26 Jeffrey A Law (law@cygnus.com)
868 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
871 2001-11-24 Alan Modra <amodra@bigpond.net.au>
873 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
874 group sizes to accommodate c++.
876 2001-11-23 Jakub Jelinek <jakub@redhat.com>
878 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
879 relocations in non-alloced sections against global symbols
880 defined in shared library being built.
881 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
883 2001-11-23 Jakub Jelinek <jakub@redhat.com>
885 * elf.c (_bfd_elf_rela_local_sym): New.
886 * elflink.h (elf_link_input_bfd): Don't consider empty
887 merged sections as removed in relocation tests.
888 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
889 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
890 against STT_SECTION symbol of SHF_MERGE section.
891 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
892 * elf32-avr.c (elf32_avr_relocate_section): Call
893 _bfd_elf_rela_local_sym.
894 * elf32-cris.c (cris_elf_relocate_section): Likewise.
895 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
896 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
897 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
898 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
899 * elf32-i370.c (i370_elf_relocate_section): Likewise.
900 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
901 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
902 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
903 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
904 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
905 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
906 * elf32-s390.c (elf_s390_relocate_section): Likewise.
907 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
908 * elf32-v850.c (v850_elf_relocate_section): Likewise.
909 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
910 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
911 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
912 * elf64-s390.c (elf_s390_relocate_section): Likewise.
913 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
914 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
915 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
916 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
917 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
918 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
919 * elf32-sh.c (sh_elf_relocate_section): Likewise for
920 !partial_inplace relocs. Handle relocs against STT_SECTION
921 symbol of SHF_MERGE for partial_inplace relocs.
923 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
925 * po/Make-in (distclean): Move SRC-POTFILES.in and
926 BLD-POTFILES.in to maintainer-clean target.
928 2001-11-21 Alan Modra <amodra@bigpond.net.au>
930 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
931 than sym_sec->output_section to detect relocs against discarded
934 2001-11-19 H.J. Lu <hjl@gnu.org>
936 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
937 discarding relocations.
939 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
941 * section.c (bfd_is_const_section): New macro. Return true if the
942 given seciton is one of the special, constant, sections.
943 * bfd-in2.h: Regenerate.
944 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
945 (coff_write_native_symbol): Use bfd_is_const_section.
947 2001-11-19 Alan Modra <amodra@bigpond.net.au>
949 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
951 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
952 millicode syms as candidates for import stubs.
954 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
955 (allocate_PIC_calls): Rename to allocate_plt_static.
956 (allocate_dynrelocs): Move most of code handling .plt entries to..
957 (allocate_plt_static): ..here. Don't drop plabel entries.
959 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
961 * mmo.c: Adjust documentation tags to use texinfo 4 features.
963 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
965 * section.c (bfd_is_const_section): New macro. Return true if the
966 section pointer refers to one of the special, constant sections.
967 * bfd-in2.h: Regenerate.
969 * coffgen.c (coff_count_linenumbers): Only update the line number
970 count in non-special sections.
971 (coff_write_native_symbol): Only update the line number file
972 position in non-special sections.
974 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
976 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
977 local syms from discarded sections. Update comment.
979 2001-11-15 Alan Modra <amodra@bigpond.net.au>
981 * po/SRC-POTFILES.in: Regenerate.
983 * elflink.h (elf_link_input_bfd): Complain about all relocs
984 against local syms from discarded sections. K&R fixes.
985 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
988 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
990 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
991 overflows in the .stab section.
993 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
995 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
996 (bfd_elf64_discard_info): Likewise.
997 * bfd-in2.h: Regenerate.
998 * elf-bfd.h (struct elf_reloc_cookie): New.
999 (struct elf_backend_data): Add elf_backend_discard_info,
1000 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
1001 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
1002 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
1003 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
1004 (_bfd_elf32_mips_ignore_discarded_relocs): New.
1005 (_bfd_elf32_mips_write_section): New.
1006 (elf_backend_discard_info): Define.
1007 (elf_backend_ignore_discarded_relocs): Define.
1008 (elf_backend_write_section): Define.
1009 * elfcode.h (elf_bfd_discard_info): Define.
1010 (elf_reloc_symbol_deleted_p): Define.
1011 * elflink.h (elf_link_input_bfd): Check
1012 elf_section_ignore_discarded_relocs. Call
1013 bed->elf_backend_write_section if available.
1014 (elf_reloc_symbol_deleted_p): New.
1015 (elf_bfd_discard_info): New.
1016 (elf_section_ignore_discarded_relocs): New.
1017 * elfxx-target.h (elf_backend_discard_info): Define.
1018 (elf_backend_ignore_discarded_relocs): Define.
1019 (elf_backend_write_section): Define.
1020 (elfNN_bed): Add elf_backend_discard_info,
1021 elf_backend_ignore_discarded_relocs, and
1022 elf_backend_write_section.
1023 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
1024 * libbfd.h: Regenerate.
1025 * stabs.c (_bfd_discard_section_stabs): New.
1027 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
1029 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
1030 scheme to get rid of an ugly complicated test.
1031 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1033 2001-11-14 Andreas Jaeger <aj@suse.de>
1035 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
1038 2001-11-14 Jakub Jelinek <jakub@redhat.com>
1040 * dwarf2.c (struct line_head) [total_length]: Change type to
1042 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
1043 (struct comp_unit): Add stash and offset_size.
1044 (read_8_bytes): Return bfd_vma.
1045 (read_indirect_string): New.
1046 (read_attribute): Handle DW_FORM_strp.
1047 (decode_line_info): Support 64-bit DWARF format.
1048 (_bfd_dwarf2_find_nearest_line): Likewise.
1049 (parse_comp_unit): Set offset_size and stash.
1051 2001-11-13 Keith Walker <keith.walker@arm.com>
1053 * dwarf2.c (read_attribute_value): New function to handle
1055 (read_attribute): Use it.
1057 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
1059 * dwarf2.c (decode_line_info): Properly deal with unknown standard
1062 2001-11-13 John Marshall <jmarshall@acm.org>
1063 Alan Modra <amodra@bigpond.net.au>
1065 * section.c (bfd_make_section_anyway): Don't increment section_id
1066 and the BFD's section_count if adding the section failed.
1067 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
1070 2001-11-12 Orjan Friberg <orjanf@axis.com>
1072 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
1075 2001-11-11 H.J. Lu <hjl@gnu.org>
1077 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
1078 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
1080 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
1081 dynstr type to `struct elf_strtab_hash *'.
1083 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
1085 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
1086 size_t. Rename second i to j.
1088 2001-11-10 Jeffrey A Law (law@cygnus.com)
1090 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
1092 2001-11-10 Alan Modra <amodra@bigpond.net.au>
1094 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
1095 relocs into shared libs.
1096 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1097 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1098 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1099 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1100 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1101 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1102 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1103 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1104 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1105 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1106 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1107 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1109 * elf.c (bfd_section_from_r_symndx): New function.
1110 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
1111 (struct sym_sec_cache): New.
1112 (bfd_section_from_r_symndx): Declare.
1113 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
1114 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
1115 relocs when relocatable. Don't zero entire reloc, just zero the
1117 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
1118 (elf32_hppa_link_hash_table_create): Init it.
1119 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
1120 syms on a per-section basis as we do for globals.
1121 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
1122 (allocate_dynrelocs): Warning fix.
1123 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
1124 section has been discarded.
1125 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
1127 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
1128 (elf_i386_link_hash_table_create): Init it.
1129 (elf_i386_check_relocs): Track dynamic relocs needed for local
1130 syms on a per-section basis as we do for globals.
1131 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
1133 (allocate_dynrelocs): Warning fix.
1134 (elf_i386_size_dynamic_sections): Don't allocate relocs when
1135 section has been discarded.
1136 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
1138 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
1139 (elf_s390_link_hash_table_create): Init it.
1140 (elf_s390_check_relocs): Track dynamic relocs needed for local
1141 syms on a per-section basis as we do for globals.
1142 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
1144 (allocate_dynrelocs): Warning fix.
1145 (elf_s390_size_dynamic_sections): Don't allocate relocs when
1146 section has been discarded.
1147 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
1149 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
1150 (ppc64_link_hash_table_create): Init it.
1151 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
1152 syms on a per-section basis as we do for globals.
1153 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
1154 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
1155 function. Warning fix.
1156 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
1157 section has been discarded.
1158 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
1160 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
1161 (elf_s390_link_hash_table_create): Init it.
1162 (elf_s390_check_relocs): Track dynamic relocs needed for local
1163 syms on a per-section basis as we do for globals.
1164 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
1166 (allocate_dynrelocs): Warning fix.
1167 (elf_s390_size_dynamic_sections): Don't allocate relocs when
1168 section has been discarded.
1169 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
1172 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
1174 * elf32-s390: Major rework that introduces all recent changes to
1175 the s390 backends. Get a closer match to elf32-i386.
1176 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
1177 Localise vars, and delay setting. Better error reporting, replace
1178 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
1179 symbol is not defined in the regular object file and tread the weak
1180 definition as the normal one. Don't discard relocs for undefweak or
1181 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
1182 test for avoided copy relocs. Reinstate fudge for unresolved relocs
1183 in debugging sections.
1184 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
1185 reloc processing for weakdefs. Remove redundant casts and aborts.
1186 Delay setting of vars until needed. Move creation of dynamic symbols
1187 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
1188 BFD_ASSERT with abort. Discard .plt entries for everything with
1190 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
1191 .got or .relgot here but do it in allocate_dynrelocs. Reference count
1192 possible .plt and .got entries. Don't test input section SEC_READONLY
1193 here to try to avoid copy relocs, and keep dyn_relocs regardless of
1194 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
1195 variables until needed. Remove separate switch stmt for creating .got
1196 section. Initialise local_got_refcounts to 0. Cache pointer to
1197 "sreloc" section in elf_section_data. Tweak condition under which .got
1198 created. Report files with bad relocation section names.
1199 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
1200 have been forced local. Use same test to decide if we can use a
1201 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
1202 comment. Move expressions out of function calls. Replace BFD_ASSERT
1204 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
1205 statement. Replace BFD_ASSERT with abort.
1206 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
1207 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
1208 instead of looking up section names for DT_TEXTREL. Replace
1209 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
1210 Add a comment to remind us that one day this ought to be fixed.
1211 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
1212 (struct elf_s390_link_hash_table): Likewise.
1213 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
1214 rid of unnecessary casts.
1215 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
1216 Remove "section" field.
1217 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1218 Reference count possible .plt entries. Don't deallocate .got and
1220 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
1222 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
1224 (elf_s390_discard_copies): Delete.
1225 (elf_s390_link_hash_traverse): Delete.
1226 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
1227 rather than gc variety).
1228 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
1229 srelplt, sdynbss, srelbss fields.
1230 (elf_s390_link_hash_table_create): Init them.
1231 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1232 (allocate_dynrelocs): New function.
1233 (create_got_section): New function.
1234 (elf_backend_can_refcount): Define.
1235 (elf_backend_copy_indirect_symbol): Define.
1236 (elf_s390_copy_indirect_symbol): New function.
1237 (elf_s390_create_dynamic_sections): New function.
1238 (readonly_dynrelocs): New function.
1239 * elf64-s390.c: Likewise.
1241 2001-11-07 Jakub Jelinek <jakub@redhat.com>
1243 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
1244 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
1245 (elf-strtab.lo): Add rule.
1246 * Makefile.in: Rebuilt.
1247 * configure.in (elf): Add elf-strtab.lo.
1248 * configure: Rebuilt.
1249 * elf-bfd.h (elf_strtab_hash): Forward declare.
1250 (struct elf_link_hash_table): Change dynstr type to
1251 struct elf_strtab_hash *.
1252 (struct elf_obj_tdata): Change strtab_ptr type to
1253 struct elf_strtab_hash *.
1254 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
1255 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
1256 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
1257 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
1258 _bfd_elf_strtab_finalize): New prototypes.
1259 * elf-strtab.c: New file.
1260 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
1261 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
1262 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
1263 when forcing dynamic symbol to local.
1264 (elf_link_create_dynamic_sections): Call
1265 _bfd_elf_strtab_init instead of elf_stringtab_init.
1266 (elf_link_record_local_dynamic_symbol): Likewise, change
1267 dynstr type. Use _bfd_elf_strtab functions instead of
1268 _bfd_stringtab calls.
1269 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
1270 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
1271 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
1272 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
1273 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
1274 dynamic symbol to local.
1275 (elf_link_assign_sym_version): Likewise.
1276 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
1277 _bfd_stringtab_emit.
1278 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
1279 type. Call _bfd_elf_strtab functions instead of
1280 _bfd_stringtab functions.
1281 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1282 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
1283 (elf_fake_sections): Likewise.
1284 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
1285 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
1286 name in the output. Call _bfd_elf_strtab_finalize and
1287 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
1288 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
1289 instead of _bfd_stringtab_size.
1290 (prep_headers): Change shstrtab type.
1291 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
1293 2001-11-07 Alan Modra <amodra@bigpond.net.au>
1295 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
1296 bad symtab segfault. Formatting and warning fixes. Improve
1297 error message for internationalisation.
1299 2001-11-06 H.J. Lu (hjl@gnu.org)
1301 * elflink.h (elf_link_input_bfd): Complain about relocs against
1304 2001-11-03 Alan Modra <amodra@bigpond.net.au>
1306 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
1308 2001-11-02 H.J. Lu <hjl@gnu.org>
1310 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1311 dynamic relocation for symbols defined in regular objects when
1312 creating executables.
1314 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
1316 * configure.in (ALL_LINGUAS): Add "fr".
1317 * configure: Regenerate.
1318 * po/fr.po: New file.
1320 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
1322 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
1324 * som.c (setup_sections): Initialize subspace_sections.
1326 2001-11-02 H.J. Lu (hjl@gnu.org)
1328 * coffgen.c (coff_object_p): Return 0 if the header is too big.
1330 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
1332 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
1333 information. Save bfd arch and mach values. Restore on error.
1335 2001-11-02 Alan Modra <amodra@bigpond.net.au>
1337 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
1338 (allocate_PIC_calls): New function.
1339 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
1340 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
1341 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
1343 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
1345 * elf32-cris.c (cris_elf_grok_prstatus): New function.
1346 (cris_elf_grok_psinfo): New function.
1347 (elf_backend_grok_prstatus): Define.
1348 (elf_backend_grok_psinfo): Define.
1350 2001-11-01 Alan Modra <amodra@bigpond.net.au>
1352 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
1355 2001-10-31 Chris Demetriou <cgd@demetriou.com>
1357 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
1358 relocations properly.
1360 2001-10-31 H.J. Lu <hjl@gnu.org>
1362 * elflink.h (elf_link_output_extsym): Don't clear the visibility
1363 field for relocateable.
1365 2001-11-01 Alan Modra <amodra@bigpond.net.au>
1367 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
1368 .plt relocs in DT_RELASZ.
1370 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
1372 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1375 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
1377 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
1379 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
1381 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
1382 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
1383 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
1384 Regenerate dependencies.
1385 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
1386 * config.bfd: [BFD64] (mmix-*-*): New case.
1387 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
1388 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
1389 (bfd_mmix_arch): Declare.
1390 (bfd_archures_list): Add bfd_mmix_arch.
1391 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
1392 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
1393 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
1395 * reloc.c: Add MMIX relocations.
1396 * bfd.c (struct _bfd, tdata): Add mmo_data.
1397 * Makefile.in: Regenerate.
1398 * configure: Regenerate.
1399 * libbfd.h: Regenerate.
1400 * bfd-in2.h: Regenerate.
1401 * configure: Rebuild.
1403 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
1405 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
1406 p_paddr of the segment that contains it.
1407 (copy_private_bfd_data): If the LMA for a segment is known, use it
1408 for matching sections to segments.
1409 (assign_file_positions_for_segments): Use the LMA when adjusting
1410 for inter-section alignment padding.
1412 2001-10-29 Kazu Hirata <kazu@hxi.com>
1414 * README: Fix a typo.
1416 2001-10-24 Richard Henderson <rth@redhat.com>
1418 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
1419 timestamp to time_t for ctime.
1421 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
1423 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
1424 unsigned, increasing index.
1426 2001-10-23 H.J. Lu <hjl@gnu.org>
1428 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
1429 m != NULL before accessing it.
1431 2001-10-23 Alan Modra <amodra@bigpond.net.au>
1433 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
1434 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
1435 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
1437 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
1438 (hppa_link_hash_newfunc): Likewise.
1439 (elf32_hppa_finish_dynamic_symbol): Likewise.
1440 (allocate_dynrelocs): Always allocate .got relocs if shared.
1441 (elf32_hppa_relocate_section): Output them too. Similarly
1442 consolidate .plt reloc code, and no longer initialise .plt
1443 when a reloc is output.
1444 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
1445 when no reloc is output.
1447 From Herbert Xu <herbert@gondor.apana.org.au>
1448 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
1449 unreachable branches.
1451 2001-10-22 H.J. Lu <hjl@gnu.org>
1453 * configure.in (WIN32LIBADD): Use -L../libiberty for
1455 * configure: Rebuild.
1457 2001-10-21 H.J. Lu <hjl@gnu.org>
1459 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1460 if shared library is enabled only for Linux hosts.
1461 * configure: Rebuild.
1463 2001-10-21 H.J. Lu <hjl@gnu.org>
1465 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
1466 ../libiberty/Makefile instead of $enable_shared.
1467 * configure: Rebuild.
1469 2001-10-21 H.J. Lu <hjl@gnu.org>
1471 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
1474 2001-10-20 H.J. Lu <hjl@gnu.org>
1476 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1477 if shared library is enabled.
1478 * configure: Rebuild.
1480 2001-10-20 H.J. Lu <hjl@gnu.org>
1482 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
1484 2001-10-19 H.J. Lu <hjl@gnu.org>
1486 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
1489 2001-10-18 H.J. Lu <hjl@gnu.org>
1491 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1492 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1494 2001-10-18 Jakub Jelinek <jakub@redhat.com>
1496 * section.c (_bfd_strip_section_from_output): Don't count
1497 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
1499 2001-10-17 Alan Modra <amodra@bigpond.net.au>
1501 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1502 Elf_Internal_Shdr.contents now that it's no longer a PTR.
1503 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1504 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1505 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1506 * elf32-sh.c (sh_elf_relax_section): Likewise.
1507 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1508 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1509 * elf.c (setup_group): Warning fixes.
1510 * elflink.h (elf_link_sort_relocs): Likewise.
1511 * pdp11.c (slurp_reloc_table): Likewise.
1513 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
1515 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1518 2001-10-15 H.J. Lu <hjl@gnu.org>
1520 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1521 for relocations against discarded link-once section.
1523 2001-10-15 Alan Modra <amodra@bigpond.net.au>
1525 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1526 bfd_reloc_outofrange and similar errors.
1528 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1529 rather than ind->weakdef.
1530 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1531 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1532 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1533 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1534 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1536 2001-10-15 Alan Modra <amodra@bigpond.net.au>
1537 H.J. Lu <hjl@gnu.org>
1539 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1540 counts for aliases instead of aborting.
1541 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1542 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1544 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1545 to -1 for non-function symbols.
1546 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1547 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1548 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1549 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1550 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1551 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1552 plt.offset instead of plt.refcount when setting to -1.
1554 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
1556 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1557 like R_ARM_PC24. Include reloc number in error message about
1558 unresolvable relocs.
1560 2001-10-10 Jakub Jelinek <jakub@redhat.com>
1562 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1563 relocations against the same symbol in .rel{,a}.dyn section.
1565 2001-10-10 Kazu Hirata <kazu@hxi.com>
1567 * aout-encap.c: Fix comment typos.
1568 * aoutx.h: Likewise.
1569 * archive.c: Likewise.
1571 * coff64-rs6000.c: Likewise.
1572 * coffcode.h: Likewise.
1573 * coffgen.c: Likewise.
1574 * cofflink.c: Likewise.
1575 * coff-mips.c: Likewise.
1576 * ecoff.c: Likewise.
1577 * elf32-m32r.c: Likewise.
1578 * libcoff-in.h: Likewise.
1579 * libecoff.h: Likewise.
1580 * libxcoff.h: Likewise.
1581 * nlm32-i386.c: Likewise.
1582 * pdp11.c: Likewise.
1583 * section.c: Likewise.
1586 * bfd-in2.h: Regenerate.
1587 * libcoff.h: Likewise.
1589 2001-10-10 Alan Modra <amodra@bigpond.net.au>
1591 * elf.c (elf_map_symbols): Don't create new section symbols; Use
1592 existing section syms. Update comments.
1593 (copy_private_bfd_data): Formatting fixes.
1594 (elfcore_grok_win32pstatus): Likewise.
1595 (swap_out_syms): Likewise. Remove unnecessary level of braces.
1597 2001-10-09 Alan Modra <amodra@bigpond.net.au>
1599 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1601 (elf_group_name): Define.
1602 (elf_next_in_group): Define.
1603 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1604 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1605 first member section; Instead use elf_next_in_group.
1606 (bfd_section_from_shdr): Likewise.
1607 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
1609 2001-10-09 Alan Modra <amodra@bigpond.net.au>
1611 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1612 "next_in_group". Fix gp and gp_size comments.
1613 * elf.c (union elf_internal_group): New.
1614 (setup_group): New function.
1615 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1616 Call setup_group for SHF_GROUP sections.
1617 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1618 (elf_fake_sections): Set header type for SEC_GROUP, and header
1619 flags for sections in a group.
1620 (set_group_contents): New function.
1621 (_bfd_elf_compute_section_file_positions): Call it.
1622 (assign_section_numbers): Set sh_link for SHT_GROUP.
1624 * elflink.h (gc_mark_hook): Handle section groups.
1625 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1626 * section.c (SEC_GROUP): Define.
1627 (struct sec): Comment fixes.
1628 * bfd-in2.h: Regenerate.
1630 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1631 out of function args.
1632 (_bfd_elf_canonicalize_reloc): Similarly.
1633 (_bfd_elf_get_symtab): Here too.
1634 (_bfd_elf_canonicalize_dynamic_symtab): And here.
1635 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1636 bfd_bread, and remove unnecessary cast.
1638 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
1640 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
1642 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
1644 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1647 2001-10-06 Alan Modra <amodra@bigpond.net.au>
1649 * bfd.c (bfd_assert): Report bfd version.
1650 (_bfd_abort): Likewise.
1652 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1653 section sym values. Instead replace any relocs against them with
1654 relocs against STN_UNDEF, which has a zero value.
1656 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1659 2001-10-05 Jeff Law <law@redhat.com>
1661 * som.h (som_exec_data): New field "version_id".
1662 * som.c (som_object_setup): Record the version_id if it
1664 (som_prep_headers): Do not initialize version_id here.
1665 (som_finish_writing): Initialize version_id here.
1667 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1669 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1670 according to the MIPS/SGI ELF64 ABI Draft.
1671 (mips_elf_sort_hash_table): Typo.
1673 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1675 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1677 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1678 copying flags if this is a weakdef.
1680 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1682 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1685 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1686 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1687 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1689 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1690 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1691 backends we configure. Run "make dep-am".
1692 (install-data-local): Install symcat.h.
1693 * dep-in.sed: Remove symcat.h from dependencies.
1694 * Makefile.in: Regenerate.
1696 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
1698 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1700 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1702 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1703 (elf_backend_default_use_rela_p): New define.
1705 2001-10-03 Alan Modra <amodra@bigpond.net.au>
1707 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1710 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1711 * configure: Regenerate.
1712 * Makefile.am (BFD_H_FILES): Add version.h.
1713 * Makefile.in: Regenerate.
1714 * po/SRC-POTFILES.in: Regenerate.
1716 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1717 elf_backend_copy_indirect_symbol so that backend has a chance to
1718 copy other necessary fields.
1719 * elf-bfd.h (struct elf_backend_data): Update description of
1720 elf_backend_copy_indirect_symbol.
1721 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1722 copying flags if this is a weakdef.
1723 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1724 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1725 than bfd_link_hash_lookup.
1726 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1727 reloc processing for weakdefs.
1728 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1729 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1731 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1733 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1734 result of ELF64_R_TYPE to enum before using in a switch.
1735 (ppc64_elf_gc_mark_hook): Likewise.
1736 (ppc64_elf_gc_sweep_hook): Likewise.
1737 (ppc64_elf_reloc_type_class): Likewise.
1739 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1741 * version.h: New file.
1742 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1743 (BFD_VERSION_DATE): Define.
1744 (BFD_VERSION_STRING): Define.
1745 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1747 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1748 * bfd-in2.h: Regenerate.
1749 * configure: Regenerate.
1750 * Makefile.am: Run "make dep-am".
1751 * Makefile.in: Regenerate.
1753 * bfd-in.h: Include "symcat.h".
1754 (CONCAT4): Redefine as for old CAT4.
1755 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1756 Add warning regarding whitespace.
1757 * aout-cris.c: Likewise.
1758 * aout-ns32k.c: Likewise.
1759 * aout-sparcle.c: Likewise.
1760 * aout-tic30.c: Likewise.
1761 * aout0.c: Likewise.
1762 * armnetbsd.c: Likewise.
1763 * demo64.c: Likewise.
1764 * elf-bfd.h: Likewise.
1765 * gen-aout.c: Likewise.
1766 * host-aout.c: Likewise.
1767 * hp300bsd.c: Likewise.
1768 * hp300hpux.c: Likewise.
1769 * i386aout.c: Likewise.
1770 * i386bsd.c: Likewise.
1771 * i386dynix.c: Likewise.
1772 * i386freebsd.c: Likewise.
1773 * i386linux.c: Likewise.
1774 * i386lynx.c: Likewise.
1775 * i386mach3.c: Likewise.
1776 * i386netbsd.c: Likewise.
1777 * libaout.h: Likewise.
1778 * m68k4knetbsd.c: Likewise.
1779 * m68klinux.c: Likewise.
1780 * m68klynx.c: Likewise.
1781 * m68knetbsd.c: Likewise.
1782 * m88kmach3.c: Likewise.
1783 * mipsbsd.c: Likewise.
1784 * newsos3.c: Likewise.
1785 * ns32knetbsd.c: Likewise.
1786 * pc532-mach.c: Likewise.
1787 * pdp11.c: Likewise.
1788 * riscix.c: Likewise.
1789 * sparclinux.c: Likewise.
1790 * sparclynx.c: Likewise.
1791 * sparcnetbsd.c: Likewise.
1792 * sunos.c: Likewise.
1793 * targets.c: Likewise.
1794 * vaxnetbsd.c: Likewise.
1795 * vms-hdr.c: Likewise.
1797 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1799 * bfd-in.h: Remove comments regarding generated files.
1800 * libbfd-in.h: Likewise.
1801 * libcoff-in.h: Likewise.
1802 * bfd-in2.h: Regenerate.
1803 * libbfd.h: Likewise.
1804 * libcoff.h: Likewise.
1806 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1807 Hans-Peter Nilsson <hp@bitrange.com>
1809 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1810 partial_inplace, matching assembler output. Set src_mask to
1812 (sh_elf_relocate_section): Delete misplaced comment.
1813 For relocatable linking against section symbol, call
1814 _bfd_relocate_contents for partial_inplace relocs and adjust
1815 rel->r_addend for others.
1816 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1817 bfd_get_32, not at rel->r_addend.
1819 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1821 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1822 the old dir refcount, so we indirectly set them to init_refcount.
1823 Short-circuit asserts when we've just verified they are true.
1825 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1827 * section.c (struct sec): Remove kept_section.
1828 (STD_SECTION): Remove kept_section initialisation.
1829 (bfd_make_section_anyway): Here too.
1830 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1831 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1832 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1833 symbols to zero, and remove all code involved with kept_section
1834 and tracking section symbol values.
1835 * bfd-in2.h: Regenerate.
1836 * configure.in: Bump version number.
1837 * configure: Regenerate.
1839 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1841 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1842 (IS_ABSOLUTE_RELOC): Define.
1843 (struct ppc_link_hash_entry): New.
1844 (struct ppc_link_hash_table): New.
1845 (ppc_hash_table): Define.
1846 (link_hash_newfunc): New function.
1847 (ppc64_elf_link_hash_table_create): New function.
1848 (create_got_section): New function.
1849 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1850 pointers to our dynamic sections in hash table.
1851 (ppc64_elf_copy_indirect_symbol): New function.
1852 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1853 dynamic sections. Localise vars. Modify code for refcounts
1854 starting from zero. Don't allocate here, or force symbols dynamic.
1855 Don't copy all relocs if shared, select ones we need. Add code
1856 to track possible copy relocs for non-shared link.
1857 (ppc64_elf_gc_mark_hook): Update comment.
1858 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1859 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1860 code for reference counting garbage collection. Don't create .plt
1861 entries for functions that don't comply with ABI naming convention,
1862 and don't allocate .plt space here. Use short-cuts to dynamic
1863 sections. If possible, keep dynamic relocations instead of using
1864 copy relocs. Remove confused comments.
1865 (ppc_adjust_dynindx): Delete.
1866 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1867 (allocate_dynrelocs): New function.
1868 (readonly_dynrelocs): New function.
1869 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1870 space here, and call allocate_dynrelocs to allocate space for
1871 global .plt, .got and reloc sections. Use short-cuts to dynamic
1872 sections. Call readonly_dynrelocs to determine whether we need
1873 DT_TEXTREL. Don't generate section symbols here, the generic
1874 ELF linker code does it for us.
1875 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1876 gc variety, since we do our own .got handling.
1877 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1878 dynamic section short-cuts. Localise vars, and delay setting.
1879 Handle unknown relocs in main switch statement. Replace ugly
1880 complicated tests for unresolvable relocs with a simple direct
1881 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1882 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1883 after main switch, when we've set addend. Do non-addend insn
1884 tweaks before main swithc. Ignore input_section->vma when
1885 calculating reloc offsets as it's always zero. Rewrite dynamic
1886 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1887 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1888 of dynamic section short-cuts. Reorganise .plt handling code.
1889 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1890 Move expressions out of swap_reloca_out function calls.
1891 (ppc64_elf_reloc_type_class): New function.
1892 (ppc64_elf_info_to_howto): Move common expression to local var.
1893 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1894 of dynamic section short-cuts. Don't fiddle with section syms
1895 here as the ELF linker does it for us.
1896 (elf_backend_can_refcount): Define.
1897 (bfd_elf64_bfd_link_hash_table_create): Define.
1898 (elf_backend_copy_indirect_symbol): Define.
1899 (elf_backend_reloc_type_class): Define.
1900 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1902 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1904 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1905 (struct elf_backend_data): Add can_refcount.
1906 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1907 got.refcount and plt.refcount from init_refcount.
1908 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1909 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1910 rather than got/plt.offset, and test for <= 0 rather than -1.
1911 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1912 * elfxx-target.h (elf_backend_can_refcount): Define.
1913 (elfNN_bed): Init can_refcount.
1914 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1915 (_bfd_generic_link_hash_newfunc): Likewise.
1916 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1918 (elf_backend_can_refcount): Define.
1919 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1921 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1923 (elf_backend_can_refcount): Define.
1924 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1926 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1927 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1928 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1929 (elf_backend_can_refcount): Define.
1930 (elf_i386_copy_indirect_symbol): Make static to agree with
1931 prototype. Formatting fix.
1932 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1934 (elf_backend_can_refcount): Define.
1935 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1937 (elf_backend_can_refcount): Define.
1938 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1940 (elf_backend_can_refcount): Define.
1941 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1943 (elf_backend_can_refcount): Define.
1944 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1946 (elf_backend_can_refcount): Define.
1948 * som.c (som_write_symbol_strings): Cast current_offset in
1949 bfd_seek call to match param type.
1951 2001-09-28 J. Brobecker <brobecker@gnat.com>
1953 * som.c (som_write_symbol_strings): Fix incorrect type of
1954 current_offset to match the function definition. Fixes a build
1955 failure on HPUX-11.00.
1957 2001-09-28 Richard Henderson <rth@redhat.com>
1959 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1960 SEC_MERGE, SEC_STRINGS.
1962 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1963 * bfd-in2.h: Rebuild.
1965 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1967 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1968 reloc code using x86_64_reloc_map.
1970 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1971 no longer allocate here. Localise some vars to blocks where they
1973 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1974 setting of vars until needed.
1975 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1976 when symbol visibilty makes a function local.
1977 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1978 swap_reloca_out function calls.
1979 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1980 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1983 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1984 no longer allocate here. Localise some vars to blocks where they
1985 are used. Remove separate switch stmt for creating .got sec.
1986 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1987 redundant casts and aborts. Delay setting of vars until needed.
1988 (allocate_dynrelocs): Remove redundant casts and aborts.
1989 (elf_i386_size_dynamic_sections): Move comment.
1990 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1992 (elf_i386_relocate_section): Likewise. Comment typo fix.
1993 (elf_i386_finish_dynamic_sections): Migrate common code out of
1995 (elf_backend_* defines): Sort.
1997 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1998 without a reloc when symbol visibilty makes a function local.
2000 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
2002 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
2003 conflicting float flags.
2005 2001-09-26 Alan Modra <amodra@bigpond.net.au>
2007 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
2008 (elf_backend_copy_indirect_symbol): Define.
2009 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
2010 (struct elf_i386_link_hash_table): Likewise.
2011 (link_hash_newfunc): Get rid of unnecessary casts.
2012 (elf_i386_link_hash_table_create): Likewise.
2013 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
2014 Don't test input section SEC_READONLY here to try to avoid copy
2015 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
2016 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
2017 here to properly test whether we need copy relocs. Do so for weak
2020 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
2021 (elf_backend_copy_indirect_symbol): Define.
2022 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
2023 (stub_hash_newfunc): Get rid of unnecessary casts.
2024 (hppa_link_hash_newfunc): Likewise.
2025 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
2026 Don't test input section SEC_READONLY here to try to avoid copy
2027 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
2028 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
2029 here to properly test whether we need copy relocs. Do so for weak
2032 2001-09-26 Alan Modra <amodra@bigpond.net.au>
2034 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
2035 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
2036 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
2038 2001-09-25 Jakub Jelinek <jakub@redhat.com>
2040 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
2043 2001-09-25 H.J. Lu <hjl@gnu.org>
2045 * bfd-in2.h: Regenerated.
2047 2001-09-25 Alan Modra <amodra@bigpond.net.au>
2049 * elf32-i386.c: Add comment re linker function names and ordering.
2050 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
2051 (elf_i386_grok_prstatus): Move before linker functions.
2052 (elf_i386_grok_psinfo): Likewise.
2053 (elf_i386_fake_sections): Move so that functions are ordered.
2054 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
2056 2001-09-25 Alan Modra <amodra@bigpond.net.au>
2058 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
2061 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
2062 code handling this option.
2063 (LONG_BRANCH_VIA_PLT): Likewise.
2064 (RELATIVE_DYNRELOCS): Define as zero.
2065 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
2066 "pc_count" fields. Remove "section" field.
2067 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
2068 (elf32_hppa_check_relocs): Don't allocate space for dynamic
2069 relocs here. Instead, record all needed dynamic relocs via
2070 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
2071 in elf_section_data.
2072 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2073 (allocate_plt_and_got_and_discard_relocs): Rename to
2074 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
2075 (readonly_dynrelocs): New function.
2076 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
2077 Call readonly_dynrelocs to determine need for DT_TEXTREL.
2078 Rename "i" to "ibfd". Allocate space for local dyn relocs.
2079 (elf32_hppa_relocate_section): Make use of cached sreloc.
2080 (elf32_hppa_reloc_type_class): New function.
2081 (elf_backend_reloc_type_class): Define.
2083 2001-09-25 Alan Modra <amodra@bigpond.net.au>
2085 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
2086 and "sreloc" fields.
2087 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
2088 "pc_count" fields. Remove "section" field.
2089 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
2090 allocate space for dynamic relocs here. Instead, record all
2091 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
2092 pointer to "sreloc" section in elf_section_data.
2093 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2094 (allocate_plt_and_got_and_discard_relocs): Rename to
2095 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
2096 (readonly_dynrelocs): New function.
2097 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
2098 Rename "i" to "ibfd". Allocate space for local dyn relocs.
2099 (elf_i386_relocate_section): Make use of cached sreloc.
2101 2001-09-24 Alan Modra <amodra@bigpond.net.au>
2103 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
2104 reloc rather than just the type.
2105 (_bfd_elf_reloc_type_class): Likewise.
2106 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2107 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
2108 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
2109 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
2110 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
2111 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
2112 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
2113 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
2114 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
2115 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
2116 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
2117 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
2118 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
2119 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
2120 * elflink.h: Formatting fixes.
2121 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
2122 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
2123 o->contents to PTR. Update call to elf_backend_reloc_type_class.
2125 2001-09-22 John Reiser <jreiser@BitWagon.com>
2127 * elfcode.h (elf_object_p): Allow for no section header at all in
2128 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
2130 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
2132 * elfxx-ia64.c: Fix compile time warning messages.
2133 * coff-mcore.c: Fix compile time warning messages.
2134 * coff-ppc.c: Fix compile time warning messages.
2135 * coffcode.h: Fix compile time warning messages.
2136 * elf32-mips.c: Fix compile time warning messages.
2137 * elf64-alpha.c: Fix compile time warning messages.
2138 * libbfd.c: Fix compile time warning messages.
2139 * bfd-in2.h: Regenerate.
2141 2001-09-21 Alan Modra <amodra@bigpond.net.au>
2143 * Makefile.am: Run "make dep-am".
2144 * Makefile.in: Regenerate.
2146 * aoutx.h: Formatting fixes.
2147 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
2149 * linker.c: Replace bfd_get_filename with bfd_archive_filename
2152 2001-09-21 Alan Modra <amodra@bigpond.net.au>
2154 * bfd.c (bfd_archive_filename): New function.
2155 * bfd-in2.h: Regenerate.
2156 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
2157 in error messages where the bfd is an input bfd.
2158 * aout-cris.c: Likewise.
2159 * coff-arm.c: Likewise.
2160 * coff-mcore.c: Likewise.
2161 * coff-ppc.c: Likewise.
2162 * coff-rs6000.c: Likewise.
2163 * coff-sh.c: Likewise.
2164 * coff-tic54x.c: Likewise.
2165 * coff-tic80.c: Likewise.
2166 * coff64-rs6000.c: Likewise.
2167 * coffcode.h: Likewise.
2168 * coffgen.c: Likewise.
2169 * cofflink.c: Likewise.
2170 * ecofflink.c: Likewise.
2171 * elf-hppa.h: Likewise.
2173 * elf32-arm.h: Likewise.
2174 * elf32-cris.c: Likewise.
2175 * elf32-gen.c: Likewise.
2176 * elf32-hppa.c: Likewise.
2177 * elf32-i370.c: Likewise.
2178 * elf32-i386.c: Likewise.
2179 * elf32-m32r.c: Likewise.
2180 * elf32-mcore.c: Likewise.
2181 * elf32-mips.c: Likewise.
2182 * elf32-ppc.c: Likewise.
2183 * elf32-s390.c: Likewise.
2184 * elf32-sh.c: Likewise.
2185 * elf32-sparc.c: Likewise.
2186 * elf32-v850.c: Likewise.
2187 * elf64-alpha.c: Likewise.
2188 * elf64-gen.c: Likewise.
2189 * elf64-ppc.c: Likewise.
2190 * elf64-s390.c: Likewise.
2191 * elf64-sparc.c: Likewise.
2192 * elf64-x86-64.c: Likewise.
2193 * elflink.h: Likewise.
2194 * elfxx-ia64.c: Likewise.
2197 * libbfd.c: Likewise.
2198 * pdp11.c: Likewise.
2199 * pe-mips.c: Likewise.
2200 * peicode.h: Likewise.
2202 * xcofflink.c: Likewise.
2204 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
2206 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
2209 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
2212 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
2213 Consolidate error messages, and split long messages to two lines.
2215 2001-09-20 John Reiser <jreiser@BitWagon.com>
2217 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
2218 and info->allow_shlib_undefined.
2219 * elf32-cris.c: Likewise.
2220 * elf32-hppa.c: Likewise.
2221 * elf32-m68k.c: Likewise.
2222 * elf32-mips.c: Likewise.
2223 * elf32-ppc.c: Likewise.
2224 * elf32-s390.c: Likewise.
2225 * elf32-sh.c: Likewise.
2226 * elf32-sparc.c: Likewise.
2227 * elf64-alpha.c: Likewise.
2228 * elf64-hppa.c: Likewise.
2229 * elf64-ppc.c: Likewise.
2230 * elf64-s390.c: Likewise.
2231 * elf64-sparc.c: Likewise.
2232 * elf64-x86-64.c: Likewise.
2233 * elfxx-ia64.c: Likewise.
2235 2001-09-18 Bruno Haible <haible@clisp.cons.org>
2237 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
2238 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2239 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
2240 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
2241 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
2242 (bfd_default_scan): Use ISDIGIT instead of isdigit.
2243 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
2244 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
2245 isxdigit/isdigit/islower.
2246 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
2247 (mangle_name): Use ISALNUM instead of isalnum.
2248 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
2249 (scan): Use ISDIGIT instead of isdigit.
2250 * hosts/alphavms.h: Don't include <ctype.h>.
2251 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
2252 (ieee_object_p): Use TOUPPER instead of toupper.
2253 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
2254 (ihex_bad_byte): Use ISPRINT instead of isprint.
2255 * merge.c: Don't include <ctype.h>.
2256 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
2257 (oasys_write_sections): Use ISDIGIT instead of isdigit.
2258 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
2259 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2260 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
2261 (mangle_name): Use ISALNUM instead of isalnum.
2262 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
2263 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
2264 isupper/islower/isdigit.
2265 (som_decode_symclass): Use TOUPPER instead of toupper.
2266 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
2267 (srec_bad_byte): Use ISPRINT instead of isprint.
2268 (srec_scan): Use ISSPACE instead of isspace.
2269 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
2270 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
2271 * syms.c: Include "safe-ctype.h"
2272 (islower, toupper): Remove macro definitions.
2273 (bfd_decode_symclass): Use TOUPPER instead of toupper.
2274 * vms-gsd.c: Don't include <ctype.h>.
2275 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
2276 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
2278 * vms-tir.c: Don't include <ctype.h>.
2280 2001-09-18 Alan Modra <amodra@bigpond.net.au>
2282 * libbfd.c (bfd_bread): New function replacing bfd_read without
2283 redundant params. Allow reads up to (size_t) -2 in length.
2284 (bfd_bwrite): Similarly for bfd_write.
2285 (real_read): Return a size_t.
2286 (bfd_read): Call bfd_bread.
2287 (bfd_write): Call bfd_bwrite.
2288 (warn_deprecated): New function to annoy everybody.
2289 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
2290 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
2291 (bfd_read, bfd_write): Define as macro.
2292 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
2293 likewise for bfd_write. Ensure function args are correct size by
2294 using casts or local vars. In some cases, remove unnecessary
2295 casts. Formatting fixes, in some cases removing a large expression
2296 from function args by using a local var. Replace CONST with const.
2297 Modify variable types to avoid warings. Use casts to avoid
2298 warnings when using negative numbers in unsigned expressions.
2299 * aout-adobe.c: Likewise.
2300 * aout-arm.c: Likewise.
2301 * aout-cris.c: Likewise.
2302 * aout-encap.c: Likewise.
2303 * aout-ns32k.c: Likewise.
2304 * aout-target.h: Likewise.
2305 * aout-tic30.c: Likewise.
2306 * aoutf1.h: Likewise.
2307 * aoutx.h: Likewise.
2308 * archive.c: Likewise.
2309 * archures.c: Likewise.
2310 * bfd-in.h: Likewise.
2312 * binary.c: Likewise.
2314 * cache.c: Likewise.
2315 * cisco-core.c: Likewise.
2316 * coff-a29k.c: Likewise.
2317 * coff-alpha.c: Likewise.
2318 * coff-arm.c: Likewise.
2319 * coff-h8300.c: Likewise.
2320 * coff-h8500.c: Likewise.
2321 * coff-i386.c: Likewise.
2322 * coff-i860.c: Likewise.
2323 * coff-i960.c: Likewise.
2324 * coff-ia64.c: Likewise.
2325 * coff-m68k.c: Likewise.
2326 * coff-m88k.c: Likewise.
2327 * coff-mcore.c: Likewise.
2328 * coff-mips.c: Likewise.
2329 * coff-ppc.c: Likewise.
2330 * coff-rs6000.c: Likewise.
2331 * coff-sh.c: Likewise.
2332 * coff-sparc.c: Likewise.
2333 * coff-stgo32.c: Likewise.
2334 * coff-tic30.c: Likewise.
2335 * coff-tic54x.c: Likewise.
2336 * coff-tic80.c: Likewise.
2337 * coff-w65.c: Likewise.
2338 * coff-z8k.c: Likewise.
2339 * coff64-rs6000.c: Likewise.
2340 * coffcode.h: Likewise.
2341 * coffgen.c: Likewise.
2342 * cofflink.c: Likewise.
2343 * coffswap.h: Likewise.
2344 * corefile.c: Likewise.
2345 * cpu-arc.c: Likewise.
2346 * cpu-h8300.c: Likewise.
2347 * cpu-h8500.c: Likewise.
2348 * cpu-i960.c: Likewise.
2349 * cpu-ia64-opc.c: Likewise.
2350 * cpu-ns32k.c: Likewise.
2351 * cpu-pdp11.c: Likewise.
2352 * cpu-pj.c: Likewise.
2353 * cpu-sh.c: Likewise.
2354 * cpu-w65.c: Likewise.
2355 * cpu-z8k.c: Likewise.
2356 * dwarf1.c: Likewise.
2357 * dwarf2.c: Likewise.
2358 * ecoff.c: Likewise.
2359 * ecofflink.c: Likewise.
2360 * ecoffswap.h: Likewise.
2361 * elf-bfd.h: Likewise.
2362 * elf-hppa.h: Likewise.
2363 * elf-m10200.c: Likewise.
2364 * elf-m10300.c: Likewise.
2366 * elf32-arc.c: Likewise.
2367 * elf32-arm.h: Likewise.
2368 * elf32-avr.c: Likewise.
2369 * elf32-cris.c: Likewise.
2370 * elf32-fr30.c: Likewise.
2371 * elf32-gen.c: Likewise.
2372 * elf32-h8300.c: Likewise.
2373 * elf32-hppa.c: Likewise.
2374 * elf32-i370.c: Likewise.
2375 * elf32-i386.c: Likewise.
2376 * elf32-i860.c: Likewise.
2377 * elf32-m32r.c: Likewise.
2378 * elf32-m68k.c: Likewise.
2379 * elf32-mcore.c: Likewise.
2380 * elf32-mips.c: Likewise.
2381 * elf32-openrisc.c: Likewise.
2382 * elf32-pj.c: Likewise.
2383 * elf32-ppc.c: Likewise.
2384 * elf32-s390.c: Likewise.
2385 * elf32-sh-lin.c: Likewise.
2386 * elf32-sh.c: Likewise.
2387 * elf32-sparc.c: Likewise.
2388 * elf32-v850.c: Likewise.
2389 * elf64-alpha.c: Likewise.
2390 * elf64-hppa.c: Likewise.
2391 * elf64-mips.c: Likewise.
2392 * elf64-ppc.c: Likewise.
2393 * elf64-s390.c: Likewise.
2394 * elf64-sparc.c: Likewise.
2395 * elf64-x86-64.c: Likewise.
2396 * elfarm-nabi.c: Likewise.
2397 * elfcode.h: Likewise.
2398 * elfcore.h: Likewise.
2399 * elflink.c: Likewise.
2400 * elflink.h: Likewise.
2401 * elfxx-ia64.c: Likewise.
2402 * elfxx-target.h: Likewise.
2403 * format.c: Likewise.
2405 * hp300hpux.c: Likewise.
2406 * hppabsd-core.c: Likewise.
2407 * hpux-core.c: Likewise.
2408 * i386aout.c: Likewise.
2409 * i386dynix.c: Likewise.
2410 * i386linux.c: Likewise.
2411 * i386lynx.c: Likewise.
2412 * i386mach3.c: Likewise.
2413 * i386msdos.c: Likewise.
2414 * i386os9k.c: Likewise.
2417 * irix-core.c: Likewise.
2418 * libaout.h: Likewise.
2419 * libbfd-in.h: Likewise.
2420 * libbfd.c: Likewise.
2421 * libcoff-in.h: Likewise.
2422 * libecoff.h: Likewise.
2423 * libieee.h: Likewise.
2424 * libnlm.h: Likewise.
2425 * libpei.h: Likewise.
2426 * libxcoff.h: Likewise.
2427 * linker.c: Likewise.
2428 * lynx-core.c: Likewise.
2429 * m68klinux.c: Likewise.
2430 * merge.c: Likewise.
2431 * mipsbsd.c: Likewise.
2432 * netbsd-core.c: Likewise.
2434 * nlm32-alpha.c: Likewise.
2435 * nlm32-i386.c: Likewise.
2436 * nlm32-ppc.c: Likewise.
2437 * nlm32-sparc.c: Likewise.
2438 * nlmcode.h: Likewise.
2439 * nlmswap.h: Likewise.
2440 * ns32k.h: Likewise.
2441 * oasys.c: Likewise.
2442 * opncls.c: Likewise.
2443 * osf-core.c: Likewise.
2444 * pc532-mach.c: Likewise.
2445 * pdp11.c: Likewise.
2446 * pe-mips.c: Likewise.
2447 * peXXigen.c: Likewise.
2448 * peicode.h: Likewise.
2449 * ppcboot.c: Likewise.
2450 * ptrace-core.c: Likewise.
2451 * reloc.c: Likewise.
2452 * reloc16.c: Likewise.
2453 * riscix.c: Likewise.
2454 * rs6000-core.c: Likewise.
2455 * sco5-core.c: Likewise.
2456 * section.c: Likewise.
2458 * sparclinux.c: Likewise.
2459 * sparclynx.c: Likewise.
2461 * stabs.c: Likewise.
2462 * sunos.c: Likewise.
2464 * targets.c: Likewise.
2465 * tekhex.c: Likewise.
2466 * trad-core.c: Likewise.
2467 * versados.c: Likewise.
2468 * vms-gsd.c: Likewise.
2469 * vms-hdr.c: Likewise.
2470 * vms-misc.c: Likewise.
2471 * vms-tir.c: Likewise.
2474 * xcofflink.c: Likewise.
2475 * bfd-in2.h: Regenerate.
2476 * libbfd.h: Regenerate.
2477 * libcoff.h: Regenerate.
2479 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
2480 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
2481 (ufile_ptr): Define.
2482 (bfd_tell): Return a ufile_ptr.
2483 * libbfd.c (bfd_tell): Likewise.
2484 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
2486 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
2487 * aoutf1.h: Likewise.
2489 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2490 larger than unsigned long can represent.
2492 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
2493 size overflows size_t.
2494 (bfd_realloc): Likewise.
2495 (bfd_zmalloc): Likewise.
2496 * opncls.c (bfd_alloc): Likewise.
2497 (bfd_zalloc): Likewise.
2498 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2499 (bfd_alloc, bfd_zalloc): Update.
2501 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2503 (bfd_get_signed_8): Likewise.
2504 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2505 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2506 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2507 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2508 * libaout.h: Likewise define and use here.
2509 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2510 * aout-arm.c: Likewise.
2511 * aout-encap.c: Likewise.
2512 * aout-ns32k.c: Likewise.
2513 * aout-tic30.c: Likewise.
2514 * aoutf1.h: Likewise.
2515 * aoutx.h: Likewise.
2517 * coff-alpha.c: Likewise.
2518 * coff-h8300.c: Likewise.
2519 * coff-h8500.c: Likewise.
2520 * coff-i960.c: Likewise.
2521 * coff-ia64.c: Likewise.
2522 * coff-m88k.c: Likewise.
2523 * coff-mips.c: Likewise.
2524 * coff-ppc.c: Likewise.
2525 * coff-rs6000.c: Likewise.
2526 * coff-sh.c: Likewise.
2527 * coff-sparc.c: Likewise.
2528 * coff-stgo32.c: Likewise.
2529 * coff-tic30.c: Likewise.
2530 * coff-tic80.c: Likewise.
2531 * coff-w65.c: Likewise.
2532 * coff-z8k.c: Likewise.
2533 * coff64-rs6000.c: Likewise.
2534 * coffgen.c: Likewise.
2535 * cofflink.c: Likewise.
2536 * coffswap.h: Likewise.
2537 * ecoff.c: Likewise.
2538 * ecoffswap.h: Likewise.
2540 * elf32-mips.c: Likewise.
2541 * elf64-mips.c: Likewise.
2542 * hp300hpux.c: Likewise.
2543 * i386dynix.c: Likewise.
2544 * i386lynx.c: Likewise.
2545 * i386msdos.c: Likewise.
2546 * i386os9k.c: Likewise.
2547 * libpei.h: Likewise.
2548 * nlm32-alpha.c: Likewise.
2549 * nlm32-i386.c: Likewise.
2550 * nlm32-ppc.c: Likewise.
2551 * nlmcode.h: Likewise.
2552 * nlmswap.h: Likewise.
2553 * oasys.c: Likewise.
2554 * pdp11.c: Likewise.
2555 * pe-mips.c: Likewise.
2556 * peXXigen.c: Likewise.
2557 * peicode.h: Likewise.
2558 * riscix.c: Likewise.
2559 * sunos.c: Likewise.
2560 * xcofflink.c: Likewise.
2561 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2562 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2563 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2564 equivalent H_PUT_* macro instead.
2565 (GETWORD, GETHALF, GETBYTE): Similarly.
2566 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2567 (GETWORD, GETHALF, GETBYTE): Likewise.
2568 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2570 * bfd-in.h (struct orl): Change "pos" to a union.
2571 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2572 (bsd_write_armap): Here too.
2573 (coff_write_armap): And here.
2574 * coff-rs6000.c (xcoff_write_armap_old): And here.
2575 (xcoff_write_one_armap_big): And here.
2576 (xcoff_write_armap_big): And here.
2577 * ecoff.c (_bfd_ecoff_write_armap): And here.
2578 * elf64-mips.c (mips_elf64_write_armap): And here.
2580 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2581 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2582 * elf32-h8300.c (elf32_h8_mach): Likewise.
2583 * elf32-mips.c (elf_mips_mach): Likewise.
2584 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2586 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2588 (aix386_core_vec): Typo fix.
2590 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2591 etc. to avoid redefined macro warning.
2592 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2593 (MY(fix_pcrel_26)): Likewise.
2594 * aout-ns32k.c (MY(put_reloc)): Likewise.
2595 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2596 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2597 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2599 * aout-encap.c: Include "file", not <file> for binutils headers.
2600 (encap_object_p): Half baked attempt to fix compile errors in
2601 code dealing with "magic".
2603 * aout-ns32k.c: Include "file", not <file> for binutils headers.
2604 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2605 bfd_vma's rather than longs.
2606 * cpu-ns32k.c (ns32k_sign_extend): Delete.
2607 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2608 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
2610 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2611 Use unsigned comparisons.
2612 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2613 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2614 (_bfd_do_ns32k_reloc_contents): Likewise.
2615 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2616 (_bfd_ns32k_get_immediate): Likewise.
2617 (_bfd_ns32k_put_displacement): Likewise.
2618 (_bfd_ns32k_put_immediate): Likewise.
2619 (bfd_reloc_status_type): Likewise.
2621 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2623 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2624 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2625 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2627 (record_toc): Use a bfd_signed_vma for our_toc_offset.
2628 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2629 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2631 (_bfd_elfcore_strndup): Likewise for "dup".
2632 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2633 "name" to avoid shadowing.
2634 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2635 definition of "off".
2636 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2637 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2639 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
2641 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2643 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2645 (elf_link_input_bfd): Likewise.
2646 (elf_bfd_final_link): Remove duplicate innermost "off" var.
2647 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2648 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2650 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2651 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2652 (sunos_write_dynamic_symbol): Remove unused vars.
2653 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2654 innermost "directory_name" and "file_name" vars.
2655 * tekhex.c (first_phase): Rename local var "type" to "stype".
2656 (tekhex_write_object_contents): Rename innermost "s" to "sym".
2657 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2658 doing comparison at caller.
2659 (vms_esecflag_by_name): Likewise.
2660 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2661 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2662 (xcoff_write_global_symbol): Rename "p" param to "inf".
2664 * cisco-core.c: Add missing prototypes.
2665 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2666 (cisco_core_file_failing_signal): Likewise.
2667 (cisco_core_file_matches_executable_p): Likewise.
2668 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2669 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2670 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2671 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2673 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2674 thumb_glue_size and arm_glue_size.
2675 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2677 * coff64-rs6000.c: Group prototypes together.
2679 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2680 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2682 * cpu-arc.c: Add missing prototypes.
2683 * cpu-h8500.c: Likewise.
2684 * cpu-i960.c: Likewise.
2685 * cpu-pj.c: Likewise.
2686 * cpu-sh.c: Likewise.
2687 * cpu-w65.c: Likewise.
2688 * cpu-z8k.c: Likewise.
2689 * elf32-fr30.c: Likewise.
2690 * elf32-h8300.c: Likewise.
2691 * elf32-i370.c: Likewise.
2692 * hpux-core.c: Likewise.
2693 * versados.c: Likewise.
2695 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2696 * cpu-h8500.c: Likewise.
2697 * cpu-i960.c: Likewise.
2698 * cpu-z8k.c: Likewise.
2700 * cpu-ia64-opc.c: Correct comment.
2702 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2704 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2706 (bfd_elf32_write_out_phdrs): Likewise.
2707 (bfd_elf64_write_out_phdrs): Likewise.
2708 (elf_linker_section_pointers): Change addend to bfd_vma.
2709 (_bfd_elf_find_pointer_linker_section): Likewise.
2710 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2711 filepos to unsigned file_ptr.
2712 (_bfd_elfcore_strndup): Change max param to size_t.
2713 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2714 (_bfd_elfcore_strndup): Likewise.
2715 (_bfd_elf_find_pointer_linker_section): Likewise.
2717 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2718 insn and sym_value to ints.
2720 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2722 (elfcore_read_notes): Likewise.
2724 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2725 param from unsigned char to int.
2726 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2727 for info_to_howto call.
2728 (add_dynamic_entry): Define macro.
2729 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2731 * elf32-cris.c (add_dynamic_entry): Define macro.
2732 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2734 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2735 (elf32_h8_object_p): Likewise.
2736 (elf32_h8_merge_private_bfd_data): Likewise.
2737 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2739 * elf32-hppa.c (add_dynamic_entry): Define macro.
2740 (elf32_hppa_size_dynamic_sections): Use it.
2741 * elf32-i370.c (add_dynamic_entry): Define macro.
2742 (i370_elf_size_dynamic_sections): Use it.
2743 (i370_noop): Make static.
2744 * elf32-i386.c (add_dynamic_entry): Define macro.
2745 (elf_i386_size_dynamic_sections): Use it.
2746 * elf32-m68k.c (add_dynamic_entry): Define macro.
2747 (elf_m68k_size_dynamic_sections): Use it.
2748 * elf32-ppc.c (add_dynamic_entry): Define macro.
2749 (ppc_elf_size_dynamic_sections): Use it.
2750 * elf32-s390.c (add_dynamic_entry): Define macro.
2751 (elf_s390_size_dynamic_sections): Use it.
2752 * elf64-alpha.c (add_dynamic_entry): Define macro.
2753 (elf64_alpha_size_dynamic_sections): Use it.
2754 * elf64-hppa.c (add_dynamic_entry): Define macro.
2755 (elf64_hppa_size_dynamic_sections): Use it.
2756 * elf64-ppc.c (add_dynamic_entry): Define macro.
2757 (ppc64_elf_size_dynamic_sections): Use it.
2758 * elf64-s390.c (add_dynamic_entry): Define macro.
2759 (elf_s390_size_dynamic_sections): Use it.
2760 * elf64-sparc.c (add_dynamic_entry): Define macro.
2761 (sparc64_elf_size_dynamic_sections): Use it.
2762 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2763 (elf64_x86_64_size_dynamic_sections): Use it.
2764 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2765 (elfNN_ia64_size_dynamic_sections): Use it.
2767 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2768 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2770 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2771 false if the first malloc fails rather than going via error_return.
2773 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2775 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2777 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2779 * elfxx-ia64.c (global_sym_index): Return a long.
2781 * ieee.c (get_symbol): Use int rather than char param.
2782 (ieee_slurp_sections): Move "section" var to inner blocks.
2783 (copy_expression): Don't init "value" to zero or worry about
2784 clearing to zero after using.
2785 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2788 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2791 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2792 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2794 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2796 * pc532-mach.c (MYNSX): Delete.
2797 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2798 (write_object_contents): Correct prototype.
2800 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2801 than unsigned short.
2803 * section.c (bfd_set_section_contents): Remove redundant
2804 "offset < 0" test. Check that "count" doesn't overflow size_t.
2805 (bfd_get_section_contents): Likewise.
2807 * som.c (som_fixup_formats): Add missing braces.
2808 (som_reloc_addend): Pass a bfd_vma for "addend".
2810 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2811 (srec_write_symbols): Remove an unnecessary var.
2813 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2815 * configure.in: Sort to match. Bump version number.
2816 * configure: Regenerate.
2818 * tekhex.c (move_section_contents): Assert offset == 0.
2820 * versados.c (new_symbol_string): Constify arg.
2821 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2822 (versados_get_symbol_info): Make static.
2823 (versados_print_symbol): Likewise.
2824 (versados_get_reloc_upper_bound): Likewise.
2825 (versados_canonicalize_reloc): Likewise.
2827 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2829 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2831 2001-09-17 H.J. Lu <hjl@gnu.org>
2833 * dwarf1.c (parse_die): Take a new arg for the end of the
2834 section. Return false if die is beyond the section.
2835 (parse_functions_in_unit): Pass the end of the section to
2837 (_bfd_dwarf1_find_nearest_line): Likewise.
2839 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2841 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2842 just like R_SPARC_32.
2844 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2846 * configure.bfd: Add arm-openbsd target.
2848 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2850 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2851 Add support for mips64.
2853 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2855 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2857 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2859 * elf.c (prep_headers): Get the machine code from the elf
2861 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2862 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2863 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2864 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2865 * elf-arc.c (arc_elf_final_write_processing): Don't override
2866 e_machine, it's now properly set in prep_headers.
2867 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2869 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2870 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2871 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2872 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2873 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2874 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2875 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2876 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2877 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2878 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2879 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2880 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2882 2001-09-11 Richard Henderson <rth@redhat.com>
2884 * elf64-alpha.c (elf64_alpha_section_flags): New.
2885 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2887 2001-09-11 Richard Henderson <rth@redhat.com>
2889 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2890 apply HINT relocations against dynamic symbols.
2892 2001-09-11 H.J. Lu <hjl@gnu.org>
2894 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2896 2001-09-09 Richard Henderson <rth@redhat.com>
2898 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2900 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2901 following a call to a near function.
2903 2001-09-08 Richard Henderson <rth@redhat.com>
2905 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2906 relocation errors. Fail gp-relative relocations against
2909 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2911 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2912 as well as DEF_DYNAMIC in test for avoided copy relocs.
2913 (allocate_plt_and_got_and_discard_relocs): Likewise.
2914 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2915 (allocate_plt_and_got_and_discard_relocs): Likewise.
2917 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2919 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2922 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2924 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2926 (mips_elf64_howto_table_rel): Likewise.
2928 2001-09-05 Tom Rix <trix@redhat.com>
2930 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2931 and syscall symbols.
2932 (write_global_symbol) : Same.
2933 (bfd_xcoff_export_symbol): Remove unused syscall param.
2934 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2935 bfd_xcoff_import_symbol.
2937 * bfd-in2.h : Regenerate.
2939 2001-09-04 Richard Henderson <rth@redhat.com>
2941 * elf64-alpha.c (SKIP_HOWTO): New.
2942 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2943 Fix sizes of 16-bit mem format relocs.
2944 (elf64_alpha_reloc_map): Update to match.
2945 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2946 (elf64_alpha_relax_without_lituse): Likewise.
2947 (elf64_alpha_check_relocs): Handle GPREL16.
2948 (elf64_alpha_relocate_section): Likewise.
2949 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2950 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2951 * bfd-in2.h, libbfd.h: Rebuild.
2953 2001-09-04 Jeff Law <law@redhat.com>
2955 * elf32-h8300.c (elf32_h8_relax_section): New function.
2956 (elf32_h8_relax_delete_bytes): Likewise.
2957 (elf32_h8_symbol_address_p): Likewise.
2958 (elf32_h8_get_relocated_section_contents): Likewise.
2959 (bfd_elf32_bfd_relax_section): Define.
2960 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2962 * elf32-h8300.c (special): New function.
2963 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2965 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2966 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2967 Fix minor problems with 8bit and 16bit PC relative relocations.
2969 2001-09-01 Andreas Jaeger <aj@suse.de>
2971 * vms-tir.c: Add missing prototypes.
2972 * vms-hdr.c: Likewise.
2973 * vms-gsd.c: Likewise.
2974 * vms-misc.c: Likewise.
2976 2001-08-31 H.J. Lu <hjl@gnu.org>
2978 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2979 with bad relocation.
2981 2001-08-31 Eric Christopher <echristo@redhat.com>
2982 Jason Eckhardt <jle@redhat.com>
2984 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2985 mips32_4k and mips64.
2986 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2987 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2988 * bfd/cpu-mips.c: Ditto.
2989 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2990 * bfd/bfd-in2.h: Regenerate.
2992 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2994 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2995 value into R_ALPHA_RELATIVE's addend.
2996 (elf64_alpha_finish_dynamic_symbol): Likewise.
2998 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
3000 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
3001 recomputed addend during relocatable link if not USE_REL.
3003 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
3006 2001-08-30 H.J. Lu <hjl@gnu.org>
3008 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
3010 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
3011 relocations for weak definitions.
3013 2001-08-30 H.J. Lu <hjl@gnu.org>
3015 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
3016 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
3017 * Makefile.in: Rebuild.
3019 2001-08-30 H.J. Lu <hjl@gnu.org>
3021 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
3022 dynamic relocation for undefined weak symbols when creating
3023 executables. Check h->root.root.type, instead of h->root.type.
3025 2001-08-29 Joel Sherrill <joel@OARcorp.com>
3027 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
3028 default from coff to elf.
3030 2001-08-29 Jeff Law <law@redhat.com>
3032 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
3034 (h8_reloc_map): Similarly.
3035 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
3036 Add support for PC relative relocations.
3038 * elf32-h8300.c: Put all prototypes together.
3039 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
3040 (elf32_h8_final_link_relocate): New function for linker.
3041 (elf32_h8_relocate_section): Similarly.
3042 (elf_backend_relocate_section): Define.
3044 * cpu-h8300.c (h8300_scan, compatible): Prototype.
3045 (h8300_scan): Handle architecture:machine encodings typically
3046 found in linker scripts.
3047 * elf.c (prep_headers): Do not try to do H8 machine recognition
3049 * elf32-h8300.c: Add some missing prototypes.
3050 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
3051 (elf32_h8_object_p): Similarly.
3053 2001-08-29 Tom Rix <trix@redhat.com>
3055 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
3056 does not follow a XTY_SD.
3058 2001-08-29 Alan Modra <amodra@bigpond.net.au>
3060 * targmatch.sed: Delete case statements.
3061 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
3064 2001-08-29 J"orn Rennecke <amylaar@redhat.com>
3066 * Makefile.am (elf32-h8300.lo): New target.
3067 * config.bfd (h8300*-*-elf): New case.
3068 * configure.in (bfd_elf32_h8300_vec): New case.
3069 * elf.c (prep_headers): Add case for bfd_arch_h8300.
3070 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
3071 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
3072 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
3073 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
3074 * elf32-h8300.c: New file.
3075 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
3077 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
3079 * sparclynx.c: Add missing prototypes.
3080 * coff-mcore.c: Add missing prototypes.
3081 * elf32-pj.c: Add missing prototypes.
3082 * nlm32-sparc.c: Add missing prototypes.
3083 * oasys.c: Add missing prototypes.
3084 * pdp11.c: Add missing prototypes.
3085 * pe-mips.c: Add missing prototypes.
3086 * riscix.c: Add missing prototypes.
3088 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
3090 * elf32-i386.c: Add missing prototypes.
3091 * elf32-ppc.c: Likewise.
3092 * elf32-sh-lin.c: Likewise.
3093 * elfarm-nabi.c: Likewise.
3095 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
3097 * elf32-i386.c (elf_i386_grok_prstatus): New function.
3098 (elf_i386_grok_psinfo): New function.
3099 (elf_backend_grok_prstatus): Define.
3100 (elf_backend_grok_psinfo): Likewise.
3101 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
3102 (ppc_elf_grok_psinfo): New function.
3103 (elf_backend_grok_prstatus): Define.
3104 (elf_backend_grok_psinfo): Likewise.
3105 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
3106 (elf32_shlin_grok_psinfo): New function.
3107 (elf_backend_grok_prstatus): Define.
3108 (elf_backend_grok_psinfo): Likewise.
3109 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
3110 (elf32_arm_nabi_grok_psinfo): New function.
3111 (elf_backend_grok_prstatus): Define.
3112 (elf_backend_grok_psinfo): Likewise.
3114 2001-08-27 H.J. Lu <hjl@gnu.org>
3116 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
3118 (mips_elf_calculate_relocation): Create dynamic relocation for
3119 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
3122 2001-08-27 H.J. Lu <hjl@gnu.org>
3124 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
3125 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3126 (_bfd_elf32_mips_grok_prstatus): Likewise.
3127 (_bfd_elf32_mips_grok_psinfo): Likewise.
3128 (_bfd_mips_elf_hide_symbol): Make it static and cast to
3129 `struct mips_elf_link_hash_entry *'.
3130 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
3132 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
3134 * mipsbsd.c: Add missing prototypes.
3135 * hp300hpux.c: Add missing prototypes.
3136 * i386aout.c: Add missing prototypes.
3137 * i386lynx.c: Add missing prototypes.
3138 * i386mach3.c: Add missing prototypes.
3139 * i386msdos.c: Add missing prototypes.
3140 * i386os9k.c: Add missing prototypes.
3142 2001-08-27 Linus Nordberg <linus@swox.se>
3143 Torbjorn Granlund <tege@swox.com>
3144 Staffan Ulfberg <staffanu@swox.se>
3145 Alan Modra <amodra@bigpond.net.au>
3147 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
3148 targ64_selvecs for 32 bit powerpc targets.
3149 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
3150 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
3152 * Makefile.in: Regenerate.
3153 * configure.in: Add elf64_powerpc vecs.
3154 * configure: Regenerate.
3155 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
3156 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
3157 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
3158 * elf64-ppc.c: New file.
3159 * reloc.c: Add powerpc64 relocs.
3160 * libbfd.h: Regenerate.
3161 * bfd-in2.h: Regenerate.
3163 2001-08-27 Andreas Schwab <schwab@suse.de>
3165 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
3166 reloc is against read-only section.
3167 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
3168 looking up section names for DT_TEXTREL.
3169 (elf32_m68k_reloc_type_class): New function.
3170 (elf_backend_reloc_type_class): Define.
3172 2001-08-27 Andreas Jaeger <aj@suse.de>
3174 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
3175 reloc is against read-only section.
3176 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
3177 looking up section names for DT_TEXTREL.
3178 (elf_s390_reloc_type_class): New.
3179 (elf_backend_reloc_type_class): Define.
3181 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
3182 reloc is against read-only section.
3183 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
3184 looking up section names for DT_TEXTREL.
3185 (elf_s390_reloc_type_class): New.
3186 (elf_backend_reloc_type_class): Define.
3188 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
3189 is against read-only section.
3190 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3191 looking up section names for DT_TEXTREL.
3192 (ppc_elf_reloc_type_class): New.
3193 (elf_backend_reloc_type_class): Define.
3195 2001-08-26 Andreas Jaeger <aj@suse.de>
3197 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
3198 reloc is against read-only section.
3199 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
3200 looking up section names for DT_TEXTREL.
3201 (elf_cris_reloc_type_class): New.
3202 (elf_backend_reloc_type_class): Define.
3204 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
3205 against read-only section.
3206 (elf_backend_reloc_type_class): Define.
3207 (sh_elf_reloc_type_class): New.
3208 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3209 looking up section names for DT_TEXTREL.
3211 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
3212 reloc is against read-only section.
3213 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
3214 looking up section names for DT_TEXTREL.
3215 (elf32_arm_reloc_type_class): New.
3216 (elf_backend_reloc_type_class): Define.
3218 2001-08-25 Andreas Jaeger <aj@suse.de>
3220 * oasys.c: Add missing prototypes.
3222 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
3223 attribute for parameter.
3224 * elf.c (_bfd_elf_reloc_type_class): Likewise.
3226 * versados.c (get_4): Make static.
3227 (get_10): Make static.
3228 Add missing prototypes.
3229 (process_esd): Fix call to versados_new_symbol.
3231 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
3233 * coff-a29k.c: Add missing prototypes.
3234 * coff-apollo.c: Add missing prototypes.
3235 * coff-arm.c: Add missing prototypes.
3236 * coff-i860.c: Add missing prototypes.
3237 * coff-rs6000.c: Add missing prototypes.
3238 * coff-tic80.c: Add missing prototypes.
3239 * elf-m10200.c: Add missing prototypes.
3240 * elf-m10300.c: Add missing prototypes.
3241 * elf32-arm.h: Add missing prototypes.
3242 * elf32-d10v.c: Add missing prototypes.
3243 * elf32-m32r.c: Add missing prototypes.
3244 * elf32-mcore.c: Add missing prototypes.
3245 * elf32-openrisc.c: Add missing prototypes.
3246 * elf32-sh.c: Add missing prototypes.
3247 * elf32-sparc.c: Add missing prototypes.
3248 * elf32-v850.c: Add missing prototypes.
3249 * elfarm-nabi.c: Add missing prototypes.
3250 * elfarm-oabi.c: Add missing prototypes.
3252 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3254 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
3255 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
3257 2001-08-24 H.J. Lu <hjl@gnu.org>
3259 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
3262 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
3264 * elf-bfd.h (elf_hash_table): Revert definition.
3265 (is_elf_hash_table): New macro.
3266 * elflink.h (elf_link_add_object_symbols): Test
3267 is_elf_hash_table before accessing ELF only fields in hash
3269 (elf_link_create_dynamic_sections): Fail if not using an ELF
3271 (elf_add_dynamic_entry): Fail if not using an ELF hash
3273 (elf_link_record_local_dynamic_symbol): Fail if not using an
3275 (size_dynamic_sections): Fail if not using an ELF hash
3277 (elf_adjust_dynamic_symbol): Fail if not using an ELF
3279 (elf_bfd_final_link): Fail if not using an ELF hash
3282 2001-08-24 H.J. Lu <hjl@gnu.org>
3284 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
3285 table is not an ELF linker hash table.
3287 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
3288 table type to bfd_link_elf_hash_table.
3290 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
3293 * linker.c (_bfd_link_hash_table_init): Set the linker hash
3294 table type to bfd_link_generic_hash_table.
3296 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
3298 * bfd.c (bfd_alt_mach_code): New function.
3299 * bfd-in2.h: Rebuilt.
3301 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
3303 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
3304 `type' field in the hash entry when deciding whether to follow a
3307 2001-08-24 Jakub Jelinek <jakub@redhat.com>
3309 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
3311 (elf_link_sort_relocs): Adjust accordingly.
3313 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
3314 (elf64_alpha_check_relocs): Set it if section this reloc is against
3315 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
3317 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
3318 is is against read-only section.
3319 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
3320 check section names.
3321 (elf64_alpha_reloc_type_class): New.
3322 (elf_backend_reloc_type_class): Define.
3324 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3326 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
3329 2001-08-23 Andreas Jaeger <aj@suse.de>
3331 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
3332 the reloc is against read-only section.
3333 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
3334 of looking up section names for DT_TEXTREL.
3335 (elf64_x86_64_reloc_type_class): New.
3336 (elf_backend_reloc_type_class): Define.
3338 2001-08-23 H.J. Lu <hjl@gnu.org>
3340 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
3341 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
3343 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
3344 bfd_print_symbol_vandf.
3345 * coffgen.c (coff_print_symbol): Likewise.
3346 * elf.c (bfd_elf_print_symbol): Likewise.
3347 * ieee.c (ieee_print_symbol): Likewise.
3348 * nlmcode.h (nlm_print_symbol): Likewise.
3349 * oasys.c (oasys_print_symbol): Likewise.
3350 * pdp11.c (NAME(aout,print_symbol)): Likewise.
3351 * som.c (som_print_symbol): Likewise.
3352 * srec.c (srec_print_symbol): Likewise.
3353 * tekhex.c (tekhex_print_symbol): Likewise.
3354 * versados.c (versados_print_symbol): Likewise.
3355 * vms.c (vms_print_symbol): Likewise.
3357 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
3358 with bfd_fprintf_vma.
3359 (bfd_elf_print_symbol): Likewise.
3360 * syms.c (bfd_print_symbol_vandf): Likewise.
3362 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3364 * aoutf1.h (sunos_write_object_contents): Silence compile time
3366 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
3368 * bout.c: Add missing function prototypes. Fix formatting.
3369 * coff-z8k.c: Add missing function prototypes. Fix formatting.
3370 * coff-w65.c: Add missing function prototypes. Fix formatting.
3371 * coff-h8500.c: Add missing function prototypes. Fix formatting.
3372 * coff-h8300.c: Add missing function prototypes. Fix formatting.
3373 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
3374 * coff-tic30.c: Add missing function prototypes. Fix formatting.
3375 * coff-m68k.c: Add missing function prototypes. Fix formatting.
3376 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
3377 * coff-sh.c: Add missing function prototypes. Fix formatting.
3379 2001-08-23 Jakub Jelinek <jakub@redhat.com>
3381 * elf-bfd.h (enum elf_reloc_type_class): New.
3382 (struct elf_backend_data): Add elf_backend_reloc_type_class.
3383 (_bfd_elf_reloc_type_class): New.
3384 * elfxx-target.h (elf_backend_reloc_type_class): Define.
3385 (elfNN_bed): Add elf_backend_reloc_type_class.
3386 * elf.c (_bfd_elf_reloc_type_class): New.
3387 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
3388 is against read-only section.
3389 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
3390 looking up section names for DT_TEXTREL.
3391 (elf_i386_reloc_type_class): New.
3392 (elf_backend_reloc_type_class): Define.
3393 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
3394 reloc is against read-only section.
3395 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
3396 looking up section names for DT_TEXTREL.
3397 (elf32_sparc_reloc_type_class): New.
3398 (elf_backend_reloc_type_class): Define.
3399 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
3400 reloc is against read-only section.
3401 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3402 looking up section names for DT_TEXTREL.
3403 (sparc64_elf_reloc_type_class): New.
3404 (elf_backend_reloc_type_class): Define.
3405 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
3406 (elfNN_ia64_hash_table_create): Clear ia64_info.
3407 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
3409 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
3410 instead of looking up section names for DT_TEXTREL.
3411 (elfNN_ia64_reloc_type_class): New.
3412 (elf_backend_reloc_type_class): Define.
3413 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
3414 (struct elf_link_sort_rela): New.
3415 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
3416 (elf_bfd_final_link): Call elf_link_sort_relocs.
3417 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
3420 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3422 * configure.in (x86-bsdi): No corefile support.
3423 * configure: Regenerate.
3425 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
3427 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
3430 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
3432 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
3433 the alignment of dwarf2 linkonce sections to 0.
3434 * coff-sto32.c: Likewise.
3436 2001-08-20 Andreas Jaeger <aj@suse.de>
3438 * coff-sparc.c: Add missing prototypes.
3439 * elf32-s390.c: Likewise.
3440 * elf32-i960.c: Likewise.
3441 * aout-target.h: Likewise.
3443 2001-08-20 H.J. Lu <hjl@gnu.org>
3445 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
3446 (elf_num_section_syms): New for num_section_syms.
3448 * elf.c (elf_map_symbols): Set num_section_syms.
3449 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
3450 the section symbol index.
3452 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
3454 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
3455 select the generic has table creator. All elf backends need elf
3456 specific fields in the hash table.
3458 2001-08-20 Alan Modra <amodra@bigpond.net.au>
3460 * archive.c (offsetof): Remove define.
3463 * sysdep.h (offsetof): Define.
3465 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3467 * bfd.c (bfd_get_gp_size): Return an unsigned int.
3468 (bfd_set_gp_size): Make param unsigned.
3469 * bfd-in2.h: Regenerate.
3470 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
3471 than calling bfd_get_gp_size.
3472 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
3473 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
3475 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3477 * linker.c (default_fill_link_order): Handle four byte fill value.
3479 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3481 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
3483 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
3485 * elf64-mips.c (UNUSED_RELOC): Define.
3486 (mips_elf64_howto_table_rel): Use it.
3487 (mips_elf64_howto_table_rela): Here too.
3488 (mips_elf64_write_relocs): Fix signed/unsigned warning.
3490 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3492 * coffgen.c (coff_print_symbol): Fix warnings.
3493 (coff_find_nearest_line): Likewise.
3494 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3495 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3496 * format.c (bfd_check_format_matches): Likewise.
3497 (bfd_set_format): Likewise.
3498 * coff-ia64.c: Add missing prototypes.
3499 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3500 signed to silence warnings.
3501 (elf64_alpha_relocate_section): Likewise.
3502 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3503 (elf64_alpha_add_symbol_hook): Likewise.
3504 (elf64_alpha_final_link): Likewise.
3505 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3506 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3507 (elf64_alpha_size_got_sections): Likewise.
3508 * elfxx-ia64.c: Add missing prototypes.
3509 (elfNN_ia64_relocate_section): Fix warning.
3510 (elfNN_ia64_unwind_entry_compare): Make params const.
3512 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3514 * config.bfd (targ64_selvecs): New.
3515 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3517 * bfd-in.h (BFD_VERSION): Remove wrong comment.
3518 (BFD_DEFAULT_TARGET_SIZE): New.
3519 (BFD_ARCH_SIZE): Comment.
3520 * configure.in (target_size): New. Set instead of target64 in
3521 selvecs case statement. Set target64 from it.
3522 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
3523 * bfd-in2.h: Regenerate.
3524 * configure: Regenerate.
3526 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3528 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3529 (bfd_errmsgs): Add corresponding message.
3530 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3531 finding an archive that contains different format object files.
3532 Return bfd_error_wrong_object_format for this case.
3533 * format.c: Formatting fixes. s/CONST/const/.
3534 (bfd_check_format_matches): Accept archives that give
3535 bfd_error_wrong_object_format if no full match is found. Tidy
3536 code handling matching_vector. Don't return a pointer to freed
3537 memory in `matching'. Handle ambiguous matches as for partial
3539 * bfd-in2.h: Regenerate.
3541 2001-08-15 Alan Modra <amodra@bigpond.net.au>
3543 * libieee.h (common_header_type): Add last_byte field.
3545 * ieee.c: Add missing prototypes. Some format fixes.
3546 (struct output_buffer_struct): Move for availability to prototypes.
3547 (ieee_part_after): New function.
3548 (ieee_slurp_debug): Use it here.
3549 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
3550 ieee_part_after to set last_byte to one past end of current part.
3552 (ieee_pos): Pass in ieee_data_struct rather than bfd.
3554 (parse_expression): Don't go beyond the end of the current part.
3555 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3556 (ieee_get_symtab_upper_bound, ieee_get_symtab,
3557 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3558 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3559 ieee_set_section_contents, ieee_write_object_contents,
3560 ieee_make_empty_symbol): Make static.
3561 (ieee_archive_p): Correct comments regarding bfd_read.
3562 (ieee_object_p): Similarly.
3563 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
3564 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3565 input_bfd, output_bfd, output_buffer.
3566 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3567 do_with_relocs, ie. as a symbol for relocatable files.
3568 (ieee_vec): Add comments showing functions referenced by macros.
3570 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
3572 * aout-tic30.c: Add missing prototypes. Fix formatting.
3573 * aout-ns32k.c: Add missing prototypes. Fix formatting.
3574 * peXXigen.c: Add missining prototypes. Fix formatting.
3575 * aout-adobe.c: Add missining prototypes. Fix formatting.
3577 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
3579 * elf32-v850.c: Add missing function prototypes.
3580 Fix some formatting.
3582 * cpu-v850.c: Add missing function prototype.
3583 Fix some formatting.
3585 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
3587 * elf-bfd.h (struct elf_backend_data): Add new fields
3588 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3589 (bfd_elf_sprintf_vma): Rename function prototype to
3590 '_bfd_elf_sprintf_vma'.
3591 (bfd_elf_fprintf_vma): Rename function prototype to
3592 '_bfd_elf_fprintf_vma'.
3593 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3594 directly, instead indirect via the elf_backend_data structure.
3595 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3596 instead indirect via the elf_backend_data structure.
3597 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3598 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3599 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3601 (elf_backend_fprintf_vma): Initialise if not already defined.
3602 (struct elf_backend_data): Initialise the
3603 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3605 2001-08-10 Andreas Jaeger <aj@suse.de>
3607 * elf64-sparc.c: Add missing prototypes.
3608 * elf32-cris.c: Likewise.
3609 * elf32-i370.c: Likewise.
3610 * elf64-hppa.c: Likewise.
3611 * elf64-s390.c: Likewise.
3613 2001-08-10 Andreas Jaeger <aj@suse.de>
3615 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3616 Add prototypes where needed.
3618 2001-08-10 H.J. Lu <hjl@gnu.org>
3620 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3621 (bfd_fprintf_vma): Likewise.
3623 2001-08-10 H.J. Lu <hjl@gnu.org>
3625 * bfd.c (bfd_sprintf_vma): Don't return void.
3626 (bfd_fprintf_vma): Likewise.
3628 2001-08-10 Andreas Jaeger <aj@suse.de>
3630 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3632 * configure: Regenerate.
3634 2001-08-10 Alan Modra <amodra@bigpond.net.au>
3636 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3637 warning if not BFD64. Add braces so emacs auto format works.
3638 (bfd_elf_fprintf_vma): Likewise.
3640 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3642 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3643 param to agree with libxcoff.h.
3644 (xcoff_swap_ldhdr_out): Likewise.
3645 (xcoff_swap_ldsym_in): Likewise.
3646 (xcoff_swap_ldsym_out): Likewise.
3647 (xcoff_swap_ldrel_in): Likewise.
3648 (xcoff_swap_ldrel_out): Likewise.
3649 (xcoff_create_csect_from_smclas): Likewise.
3650 * coff64-rs6000.c: Add missing prototypes.
3651 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3653 (xcoff64_swap_ldhdr_out): Likewise.
3654 (xcoff64_swap_ldsym_in): Likewise.
3655 (xcoff64_swap_ldsym_out): Likewise.
3656 (xcoff64_swap_ldrel_in): Likewise.
3657 (xcoff64_swap_ldrel_out): Likewise.
3658 (xcoff64_ppc_relocate_section): Make static.
3659 (xcoff64_slurp_armap): Likewise.
3660 (xcoff64_archive_p): Likewise.
3661 (xcoff64_openr_next_archived_file): Likewise.
3662 (xcoff64_sizeof_headers): Likewise.
3663 (xcoff64_is_lineno_count_overflow): Likewise.
3664 (xcoff64_is_reloc_count_overflow): Likewise.
3665 (xcoff64_loader_symbol_offset): Likewise.
3666 (xcoff64_loader_reloc_offset): Likewise.
3667 * elf64-gen.c: Add missing prototypes.
3669 2001-08-09 H.J. Lu <hjl@gnu.org>
3671 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3672 (bfd_elf_fprintf_vma): Likewise.
3674 2001-08-09 H.J. Lu <hjl@gnu.org>
3676 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3679 * bfd-in2.h: Regenerated.
3681 2001-08-09 H.J. Lu <hjl@gnu.org>
3683 * bfd-in.h (bfd_sprintf_vma): New prototype.
3684 (bfd_fprintf_vma): Likewise.
3685 (bfd_elf_sprintf_vma): Likewise.
3686 (bfd_elf_fprintf_vma): Likewise.
3687 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3688 * bfd-in2.h: Regenerated.
3690 * bfd.c (bfd_sprintf_vma): New. Defined.
3691 (bfd_fprintf_vma): Likewise.
3693 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3694 (bfd_elf_fprintf_vma): Likewise.
3696 2001-08-09 Alan Modra <amodra@bigpond.net.au>
3698 * coff-rs6000.c: Add missing prototypes.
3699 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3700 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3701 xcoff_loader_reloc_offset): Make static.
3702 * dwarf1.c: Add missing prototypes.
3703 * dwarf2.c: Add missing prototypes.
3704 (struct abbrev_info): Move definition.
3705 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3706 * elf.c: Add missing prototypes.
3707 * elf32-gen.c: Likewise.
3708 * elf32-i386.c: Likewise.
3709 * elf32-ppc.c: Likewise.
3710 (ppc_elf_sort_rela): Use PTR instead of "void *".
3711 * elflink.h: Add missing prototypes. Formatting fixes.
3712 * merge.c: Add missing prototypes.
3713 (last4_eq): Use PTR instead of "void *".
3714 (last_eq): Likewise.
3715 * syms.c: Add missing prototypes.
3717 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3719 * bfd.c: Fix formatting.
3720 * bfd-in2.h: Regenerate.
3722 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3724 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3725 true (this target uses REL relocations) and 'pcrel_offset' to
3726 false (the PC is implied, not stored in the offset).
3728 2001-08-08 Alan Modra <amodra@bigpond.net.au>
3730 1999-10-19 Linus Nordberg <linus@swox.se>
3731 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3732 * elfxx-target.h (elf_backend_want_got_sym): Define.
3733 (elfNN_bed): Add elf_backend_want_got_sym.
3734 * elflink.c (_bfd_elf_create_got_section): Define
3735 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3737 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
3739 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3740 (find_rela_addend): New function.
3741 (parse_comp_unit): Call it to find the abbrev offset addend.
3742 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3743 members of dwarf2_debug as debugging information is read.
3745 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3747 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3748 targets as well as sh-pe.
3750 2001-08-03 Ben Harris <bjh21@netbsd.org>
3752 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3753 reloc from start of section when computing value for R_ARM_REL32
3756 2001-08-03 Alan Modra <amodra@bigpond.net.au>
3758 From H.J. Lu <hjl@gnu.org>
3759 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3760 keep relocs for undefined syms if there are no dynamic sections in
3762 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3764 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3766 * cofflink.c (coff_link_check_ar_symbols): also search for
3767 __imp__symbol as well as _symbol.
3768 * linker.c (_bfd_generic_link_add_archive_symbols): also
3769 search for __imp__symbol as well as _symbol.
3771 2001-08-01 Adam Nemet <anemet@lnxw.com>
3773 * elf.c (elf_sort_sections): Return zero only as the last step.
3775 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3777 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3779 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3780 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3783 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3785 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3786 to match corresponding bfd_coff_backend data member.
3788 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3790 * Makefile.am: Update dependencies with "make dep-am".
3791 * Makefile.in: Regenerate
3793 2001-07-15 H.J. Lu <hjl@gnu.org>
3795 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3796 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3797 * Makefile.in: Regenerate.
3799 2001-07-11 H.J. Lu <hjl@gnu.org>
3801 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3802 flags when creating the reloc section if the ALLOC flag in the
3803 source section is set.
3805 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3807 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3808 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3809 * bfd-in2.h: Regenerate.
3810 * libbfd.h: Regenerate.
3811 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3813 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3814 (elfNN_ia64_check_relocs): Likewise.
3815 (elfNN_ia64_install_value): Likewise.
3816 (elfNN_ia64_relocate_section): Likewise.
3818 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3820 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3822 (elf32_sparc_check_relocs): Likewise.
3823 Only create .rela section for alloced sections in shared libraries.
3824 (elf32_sparc_relocate_section): Likewise.
3825 Remove redundant check.
3826 Optimize unaligned reloc usage.
3827 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3830 2001-07-11 H.J. Lu <hjl@gnu.org>
3832 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3833 ALLOC|LOAD flags as the source section for debugging sections
3834 when creating the reloc section.
3836 2001-07-05 Jim Wilson <wilson@redhat.com>
3838 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3839 the section of the bigger symbol.
3841 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3843 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3845 * peicode.h (coff_swap_scnhdr_in): For sections containing
3846 uninitialised data, only set their size to s_paddr if this does
3847 not reset their size to zero. MS's latest compilers will set
3850 2001-07-04 H.J. Lu <hjl@gnu.org>
3852 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3853 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3856 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3858 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3860 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3861 sections being discarded.
3863 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3865 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3866 instead of _bfd_elfcore_section_from_phdr.
3867 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3868 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3869 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3870 (elfcore_grok_prstatus): Likewise.
3871 (elfcore_grok_lwpstatus): Likewise.
3872 (bfd_get_elf_phdr_upper_bound): Likewise.
3873 (elfcore_make_note_pseudosection): Formatting.
3874 (_bfd_elfcore_strndup): Formatting.
3875 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3876 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3878 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3880 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3881 and _bfd_elfcore_strndup.
3882 (struct elf_backend_data): Add elf_backend_grok_prstatus
3883 and elf_backend_grok_psinfo.
3884 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3885 (elfcore_grok_prstatus): Use it.
3886 (elfcore_make_note_pseudosection): Likewise.
3887 (elfcore_strndup): Rename to...
3888 (_bfd_elfcore_strndup): Here, and make global.
3889 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3890 (elfcore_grok_note): Call elf_backend_grok_prstatus
3891 and elf_backend_grok_psinfo if available.
3892 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3893 (_bfd_elf32_mips_grok_psinfo): New function.
3894 (elf_backend_grok_prstatus): Define.
3895 (elf_backend_grok_psinfo): Define.
3896 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3897 (elf_backend_grok_psinfo): Likewise.
3898 (elfNN_bed): Include elf_backend_grok_prstatus and
3899 elf_backend_grok_psinfo.
3901 2001-06-29 H.J. Lu <hjl@gnu.org>
3903 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3904 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3905 is NULL before filling PLT.
3907 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3909 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3911 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3913 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3915 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3916 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3919 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3920 (IS_ABSOLUTE_RELOC): Define.
3921 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3922 (hppa_link_hash_newfunc): Always init it.
3923 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3924 create COPY relocs only when the reloc is in a read-only section.
3925 Instead, allocate space for a dynamic reloc to reference the
3926 library symbol directly. Keep track of space we allocate using
3928 (hppa_discard_copies): Delete, and move code to..
3929 (allocate_plt_and_got): ..here. Rename to
3930 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3931 relocs for non-shared link.
3932 (elf32_hppa_size_dynamic_sections): Update calls to above.
3933 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3934 in lieu of COPY relocs.
3936 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3938 (elf_i386_adjust_dynamic_symbol): ..nor here..
3939 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3941 (elf_i386_size_dynamic_sections): Fix a comment.
3942 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3943 involved in writing reloc out.
3945 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3947 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3948 Ensure syms are dynamic if we might be emitting a reloc.
3949 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3950 for undefweak or undefined syms..
3951 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3953 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3954 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3955 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3956 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3958 2001-06-24 H.J. Lu <hjl@gnu.org>
3960 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3961 strncasecmp/strcasecmp instead of strncmp/strcmp.
3963 2001-06-23 H.J. Lu <hjl@gnu.org>
3965 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3966 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3967 in the regular object file and treat the weak definition as
3970 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3972 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3973 unresolved_reloc test to exclude cases where we use "relocation"
3974 before setting it to point into the .got. Reinstate fudge for
3975 unresolved relocs in debugging sections.
3977 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3978 complicated tests for unresolvable relocs with a simple direct
3979 scheme using "unresolved_reloc" var.
3981 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3982 elf_i386_dyn_relocs. Update comment.
3983 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3985 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3987 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3989 (elf_i386_size_dynamic_sections): Likewise.
3990 (elf_i386_finish_dynamic_symbol): Likewise.
3991 (elf_i386_finish_dynamic_sections): Likewise.
3992 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3995 Avoid creating COPY relocs if possible.
3996 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3997 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3998 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3999 reloc is in a read-only section. Instead, allocate space for a
4000 dynamic reloc to reference the library symbol directly. Keep
4001 track of space we allocate using pcrel_relocs_copied.
4002 (discard_copies): Delete, and move code to ..
4003 (allocate_plt_and_got): ..here. Rename to
4004 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
4005 relocs for non-shared link.
4006 (elf_i386_size_dynamic_sections): Update calls to above functions.
4007 (elf_i386_relocate_section): Write out the dynamic relocs. Add
4008 more ugly logic to avoid "unresolvable relocation" error. Use
4009 htab shortcut in place of elf_hash_table macro.
4010 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
4011 not always be created now.
4013 2001-06-20 Bo Thorsen <bo@suse.co.uk>
4015 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
4018 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4020 * configure.host (mips64-*-linux): Reformat.
4022 2001-06-21 Alan Modra <amodra@bigpond.net.au>
4024 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
4025 allocate local .got space. Use shortcuts from hash table for .got
4026 and .plt rather than comparing section names.
4027 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
4028 adjusting index into local_got_refcounts to document what we are
4030 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
4031 Tidy .got and .plt error checking.
4033 2001-06-20 Catherine Moore <clm@redhat.com>
4035 * elf-bfd.h (struct elf_backend_data):
4036 elf_backend_emit_relocs: New field: Function for emitting
4038 elf_backend_count_relocs: New field: Function for determining
4039 the number of relocs to be emitted.
4040 * elfxx-target.h: Provide default (NULL) values for
4041 elf_backend_emit_relocs and elf_backend_count_relocs.
4042 * elflink.h (elf_link_size_reloc_section): Make the hash table
4043 big enough to hold the relocs counted by either reloc_count or
4045 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
4046 should be emitted, either because of a command line option
4047 stored in the info structure or because the target provides a
4048 special reloc emitting function.
4049 If the target provides a reloc counting function use it,
4050 unless performing a relocatable link or emitting all relocs.
4051 Also set the SEC_RELOC flag on any output section which will
4053 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
4054 should be emitted, either because of a command line option
4055 stored in the info structure or because the target provides a
4056 special reloc emitting function.
4057 If the target provides a reloc emitting function, use it,
4058 unless performing a relocatable link or emitting all relocs.
4060 2001-06-20 H.J. Lu <hjl@gnu.org>
4062 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
4063 allocate local .got space.
4065 2001-06-19 Andreas Jaeger <aj@suse.de>
4067 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
4070 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
4072 * elflink.h (struct elf_assign_sym_version_info): Remove member
4073 export_dynamic. All users changed to use info member.
4074 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
4075 export_dynamic, instead use member in parameter info.
4076 * bfd-in.h (bfd_elf32_size_dynamic_sections,
4077 bfd_elf64_size_dynamic_sections): Update prototype.
4078 * bfd-in2.h: Regenerate.
4080 2001-06-18 H.J. Lu <hjl@gnu.org>
4082 * elflink.h (elf_info_failed): Add a new field, verdefs.
4083 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
4085 (elf_export_symbol): Check eif->verdefs to decide if a symbol
4088 2001-06-17 H.J. Lu <hjl@gnu.org>
4090 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
4091 readonly_reloc, to record if a relocation in the .rel.dyn
4092 section is against a read-only section.
4093 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
4095 (_bfd_mips_elf_check_relocs): Record if there is a relocation
4096 in the .rel.dyn section against a read-only section by setting
4097 DF_TEXTREL or readonly_reloc.
4098 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
4100 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
4101 there is a relocation in the .rel.dyn section against a
4103 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
4106 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
4108 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
4109 function. Move flagword result into parameter list. Remove
4110 comment about setting bfd_error_handler to intercept failure
4112 * coffgen.c (make_a_section_from_file): Examine result of
4113 calling bfd_coff_styp_to_sec_flags and pass a failure back to
4115 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
4116 function. Move flagword result into parameter list.
4117 * libcoff.h: Regenerate.
4118 * libecoff.h: Regenerate.
4120 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
4122 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
4123 section is going to follow it.
4125 2001-06-12 Catherine Moore <clm@redhat.com>
4127 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
4128 with the file_align entry from elf_backend_data.
4129 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4130 (elf_gc_record_vtentry): Likewise.
4132 2001-06-10 Alan Modra <amodra@bigpond.net.au>
4134 * elflink.h: Whitespace changes.
4135 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
4136 rather than "unsigned char".
4137 (elf_link_output_relocs): Likewise.
4138 (elf_link_input_bfd): Likewise.
4139 (elf_reloc_link_order): LIkewise.
4140 * elf.c: s/CONST/const/. Whitespace changes.
4141 * elf32-mips.c: Formatting fix.
4143 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
4144 * Makefile.in: Regenerate.
4145 * po/Make-in: Remove trailing tab.
4147 2001-06-09 Philip Blundell <philb@gnu.org>
4149 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
4151 (elf32_arm_plt_entry): Likewise.
4153 2001-06-08 H.J. Lu <hjl@gnu.org>
4155 * elf.c (swap_out_syms): Keep names for global section symbols.
4157 2001-06-07 H.J. Lu <hjl@gnu.org>
4159 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
4160 MIPS-based machines need it.
4162 2001-06-07 H.J. Lu <hjl@gnu.org>
4164 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
4167 * config.bfd: Remove ecoff from Linux/mips.
4169 2001-06-07 Andreas Jaeger <aj@suse.de>
4171 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
4173 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
4174 alignment of 8 for .rela sections; handle further relocations.
4176 2001-06-06 Christian Groessler <cpg@aladdin.de>
4178 * coff-z8k.c: Fix formatting.
4179 Fix howtos: howto->size was always 1.
4181 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4183 * configure.host (mips64*-*-linux*): Define.
4185 2001-06-05 Alan Modra <amodra@bigpond.net.au>
4187 * elf32-i386.c (elf_i386_discard_copies): Rename to
4188 discard_copies, and use elf_link_hash_entry arg rather than
4189 elf_i386_link_hash_entry.
4190 (elf_i386_link_hash_traverse): Delete.
4191 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
4192 Tidy sizing of dynamic sections.
4193 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
4194 possible .plt entries.
4195 (elf_i386_gc_sweep_hook): Likewise.
4196 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
4197 everything with plt.refcount <= 0.
4199 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
4201 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
4202 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
4204 (allocate_plt_and_got): ..instead do it all here. New function.
4205 (elf_i386_size_dynamic_sections): Allocate local .got space and
4206 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
4207 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
4208 rather than gc variety).
4209 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4210 (elf_i386_relocate_section): Use it here and correct handling of
4211 R_386_GOT32. Provide section and offset for "unresolvable
4212 relocation" error message.
4213 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
4215 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
4216 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
4217 (elf_i386_link_hash_table_create): Init them.
4218 (create_got_section): New function.
4219 (elf_i386_create_dynamic_sections): New function.
4220 (elf_backend_create_dynamic_sections): Set to above.
4221 (elf_i386_check_relocs): Use shortcuts from hash table rather than
4222 calling bfd_get_section_by_name.
4223 (elf_i386_gc_sweep_hook): Likewise.
4224 (elf_i386_adjust_dynamic_symbol): Likewise.
4225 (elf_i386_size_dynamic_sections): Likewise.
4226 (elf_i386_relocate_section): Likewise.
4227 (elf_i386_finish_dynamic_sections): Likewise.
4229 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
4231 2001-06-02 H.J. Lu <hjl@gnu.org>
4233 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
4235 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
4237 2001-06-02 H.J. Lu <hjl@gnu.org>
4239 * aout-cris.c (MACHTYPE_OK): New. Defined.
4241 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
4243 * section.c (_bfd_strip_section_from_output): Handle NULL
4246 2001-06-02 H.J. Lu <hjl@gnu.org>
4248 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
4249 rs6000coff64_vec only if BFD64 is defined.
4250 (powerpc64-*-aix*): Enable only if BFD64 is defined.
4252 2001-06-02 H.J. Lu <hjl@gnu.org>
4254 * coff-ia64.c (ia64coff_object_p): Rewrite with
4255 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
4257 2001-06-01 Andreas Jaeger <aj@suse.de>
4259 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
4260 relocation, small reformatting.
4262 2001-05-29 Andreas Jaeger <aj@suse.de>
4264 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
4265 (elf64_x86_64_relocate_section): Likewise.
4267 2001-05-30 Alan Modra <amodra@one.net.au>
4269 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
4270 millicode. Don't allocate .got and .rela.got space here..
4271 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
4272 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
4274 (hppa_handle_PIC_calls): ..nor here..
4275 (allocate_plt_and_got): ..instead do it all here. New function.
4276 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
4277 call allocate_plt_and_got. No need to zap .got if not dynamic.
4278 (elf32_hppa_final_link): Call regular bfd_final_link instead of
4279 gc_common_final_link.
4280 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4281 (elf32_hppa_relocate_section): Use it here.
4282 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
4283 dynamic_sections_created.
4284 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
4286 2001-05-28 Andreas Jaeger <aj@suse.de>
4288 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
4289 generic version since we want a hashsize of 4.
4290 (elf_backend_size_info): Likewise.
4292 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4294 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
4296 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
4297 (elf_link_input_bfd): Likewise.
4298 (elf_reloc_link_order): Likewise.
4299 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
4300 relocations correctly.
4302 2001-05-28 Nicolas Pitre <nico@cam.org>
4304 * elf32-arm.h: fix PLT generation for big endian ARM
4306 2001-05-28 Alan Modra <amodra@one.net.au>
4308 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
4309 for symbols forced local that need plabels.
4310 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
4311 .plt.rela for local syms if non-shared.
4312 (hppa_build_one_stub): Mask lsb of plt.offset.
4313 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
4314 (clobber_millicode_symbols): Correct comment.
4315 (elf32_hppa_relocate_section): Likewise.
4316 (elf32_hppa_finish_dynamic_symbol): Likewise.
4318 2001-05-28 Jeff Sturm <jsturm@one-point.com>
4320 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
4321 * bfd-in2.h: Regenerate.
4322 * libbfd.h: Regenerate.
4323 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
4324 and BFD_RELOC_SPARC_UA64 mapping
4325 * elf64-sparc.c: Likewise.
4327 2001-05-25 H.J. Lu <hjl@gnu.org>
4329 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
4330 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
4331 (coff-rs6000.lo): Remove the old dependency.
4332 * Makefile.in: Rebuild.
4334 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
4337 2001-05-25 H.J. Lu <hjl@gnu.org>
4339 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4340 rs6000coff_core_file_matches_executable_p,
4341 rs6000coff_core_file_failing_command and
4342 rs6000coff_core_file_failing_signal only if AIX_CORE is
4344 (pmac_xcoff_vec): Likewise.
4345 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4347 2001-05-25 Timothy Wall <twall@redhat.com>
4349 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
4350 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
4352 2001-05-25 H.J. Lu <hjl@gnu.org>
4354 * bfd-in2.h: Regenerated.
4355 * libcoff.h: Likewise.
4357 2001-05-25 Alan Modra <amodra@one.net.au>
4359 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
4360 undefined millicode syms in shared libs.
4361 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
4362 (elf32_hppa_check_relocs): Likewise.
4363 (elf32_hppa_adjust_dynamic_symbol): Likewise.
4364 (elf32_hppa_size_dynamic_sections): Likewise.
4365 (elf32_hppa_relocate_section): Likewise.
4366 (elf32_hppa_finish_dynamic_symbol): Likewise.
4367 (elf32_hppa_finish_dynamic_sections): Likewise.
4369 2001-05-24 Tom Rix <trix@redhat.com>
4371 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
4372 xcoff-target.h not used to define rs6000 or ppc bfd.
4375 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
4378 * coff-rs6000.c : Many changes for 64 bit support. Move common
4379 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
4382 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
4383 linker now supported. Explictly define the rs6000coff64_vec.
4385 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
4386 (coff_print_aux) same
4387 (coff_write_object_contents) same
4388 (coff_slurp_line_table) same
4390 * coffgen.c : (coff_fix_symbol_name) formatting
4391 (coff_mangle_symbols) xcoff 64 bit support
4392 (coff_write_symbol) same
4393 (coff_write_alien_symbol) same
4394 (coff_write_native_symbol) same
4395 (coff_write_symbols) same
4396 (coff_get_symbol_info) same
4397 (bfd_coff_get_syment) same
4398 (coff_print_symbol) same
4400 * config.bfd : add powerpc64-*-aix* target
4402 * libcoff-in.h : formatting
4404 * libcoff.h : move xcoff extern declarations to libxcoff.h
4406 * libxcoff.h : New file
4408 * xcofflink.c : Many changes for xcoff64 support. Move common
4409 structures to include/coff/xcoff.h. Move specific structure to
4410 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
4411 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
4413 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
4416 (xcoff_build_ldsyms) : handle special __rtinit symbol.
4418 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
4420 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
4423 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4425 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
4426 * libbfd.h: Regenerate.
4427 * bfd-in2.h: Regenerate.
4429 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
4430 * archures.c (bfd_mach_mips12000): Define.
4431 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
4432 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
4434 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
4435 * bfd-in2.h: Regenerate.
4436 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
4438 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
4440 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
4441 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
4442 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
4443 that is used by GCC.
4445 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4447 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
4448 of entries in a structured section.
4449 * elf.c: Use new macro.
4450 * elf32-i386.c: Use new macro.
4451 * elf32-mips.c: Use new macro.
4452 * elf64-alpha.c: Use new macro.
4453 * elf64-sparc.c: Use new macro.
4454 * elfcode.h: Use new macro.
4455 * elflink.h: Use new macro.
4457 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4459 * bfdint.texi: Replace -oformat with --oformat.
4461 2001-05-21 Andreas Jaeger <aj@suse.de>
4463 * dwarf2.c (decode_line_info): Fix error message.
4464 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
4465 adjust error message.
4467 2001-05-18 H.J. Lu <hjl@gnu.org>
4469 * elflink.h (elf_link_add_object_symbols): Revert the last
4472 2001-05-17 Alan Modra <amodra@one.net.au>
4474 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
4475 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
4476 (hppa_build_one_stub): Add an assert to check plt.offset.
4478 2001-05-17 H.J. Lu <hjl@gnu.org>
4480 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
4481 version definition to basename of the output filename.
4483 2001-05-17 H.J. Lu <hjl@gnu.org>
4485 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
4486 basename of the bfd filename.
4488 2001-05-16 Alan Modra <amodra@one.net.au>
4490 * section.c (asection): Add linker_has_input field.
4491 (STD_SECTION): Adjust initialization to suit.
4492 * ecoff.c (bfd_debug_section): Likewise.
4493 * bfd-in2.h: Regenerate.
4495 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
4497 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4498 negative 32-bit operands to 16 operands when the operand is
4499 going to be zero-extended by the modified opcode.
4501 2001-05-12 Peter Targett <peter.targett@arccores.com>
4503 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4504 name for 'arc5' core versions.
4505 (bfd_arc_arch): Make bfd_mach_arc_6 default.
4507 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4509 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4511 2001-05-11 Jakub Jelinek <jakub@redhat.com>
4513 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4515 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4516 to .gnu.linkonce.t.FOO text section.
4518 2001-05-11 Jakub Jelinek <jakub@redhat.com>
4520 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4521 fields, change sec into secinfo.
4522 (struct sec_merge_info): Add chain, remove last fields.
4523 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4524 (sec_merge_hash_lookup): If lookup could not use a string only
4525 because it has bad alignment, mark the old string for deletion.
4526 (sec_merge_add): Add secinfo argument. Don't compute entry's
4527 position, instead record the section.
4528 (sec_merge_emit): Update for the sec into secinfo change in
4529 struct sec_merge_hash_entry.
4530 (_bfd_merge_section): Only record the section for merging, defer
4531 putting strings into the hash table.
4532 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4533 _bfd_merge_sections): New functions.
4534 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4536 * libbfd-in.h (_bfd_merge_sections): Add prototype.
4537 (_bfd_nolink_bfd_merge_sections): Define.
4538 * libbfd.h: Likewise.
4539 (bfd_generic_merge_sections): Add prototype.
4540 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4541 (struct bfd_target): Likewise.
4542 * bfd.c (bfd_merge_sections): Define.
4543 * bfd-in2.h: Rebuilt.
4544 * elf.c (_bfd_elf_merge_sections): New function.
4545 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4546 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4547 * reloc.c (bfd_generic_merge_sections): New function.
4548 * vms.c (vms_bfd_merge_sections): New function.
4549 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4550 * aout-target.h (MY_bfd_merge_sections): Define.
4551 * aout-tic30.c (MY_bfd_merge_sections): Define.
4552 * binary.c (binary_bfd_merge_sections): Define.
4553 * bout.c (b_out_bfd_merge_sections): Define.
4554 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4555 * coffcode.c (coff_bfd_merge_sections): Define.
4556 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4557 * i386msdos.c (msdos_bfd_merge_sections): Define.
4558 * i386os9k.c (os9k_bfd_merge_sections): Define.
4559 * ieee.c (ieee_bfd_merge_sections): Define.
4560 * ihex.c (ihex_bfd_merge_sections): Define.
4561 * nlm-target.h (nlm_bfd_merge_sections): Define.
4562 * oasys.c (oasys_bfd_merge_sections): Define.
4563 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4564 * som.c (som_bfd_merge_sections): Define.
4565 * srec.c (srec_bfd_merge_sections): Define.
4566 * tekhex.c (tekhex_bfd_merge_sections): Define.
4567 * versados.c (versados_bfd_merge_sections): Define.
4568 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4570 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
4572 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4573 to be unsigned long, in order to match its use.
4575 2001-05-10 H.J. Lu <hjl@gnu.org>
4577 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4580 2001-05-09 H.J. Lu <hjl@gnu.org>
4582 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4583 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4584 Remove the unused veriable `dynver'.
4586 2001-05-08 Ian Lance Taylor <ian@zembu.com>
4588 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4589 NULL or is not COFF.
4590 (coff_i386_rtype_to_howto): Don't dump core if output section
4593 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4595 * ecoff.c (bfd_debug_section): Fix initialization.
4596 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4597 is always a positive integer. Cast away sign mismatch.
4598 * elf32-mips.c: Fix misleading comment and typo.
4599 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4601 * elflink.c: Fix typo.
4602 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4603 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4605 2001-05-04 Richard Henderson <rth@redhat.com>
4607 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4609 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
4611 * elf32-arm.h (elf32_arm_final_link_relocate): Set
4612 EF_ARM_HASENTRY if the start address is set.
4614 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
4616 * targets.c (_bfd_target_vector_entries): Compute value based on
4617 the size of the _bfd_target_vector and not bfd_target_vector.
4619 2001-05-03 H.J. Lu <hjl@gnu.org>
4621 * elfcode.h: Include "libiberty.h".
4623 * elflink.h (elf_link_add_object_symbols): Set
4624 elf_dt_name (abfd) to basename of the bfd filename.
4625 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4626 of the bfd filename.
4628 2001-05-03 Andreas Jaeger <aj@suse.de>
4630 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4631 (elf_generic_info_to_howto_rel): Likewise.
4632 * coff-alpha.c (reloc_nil): Likewise.
4633 (alpha_ecoff_bad_format_hook): Likewise.
4634 (alpha_adjust_reloc_out): Likewise.
4635 (alpha_bfd_reloc_type_lookup): Likewise.
4636 (alpha_convert_external_reloc): Likewise.
4637 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4638 (elf64_alpha_reloc_bad): Likewise.
4639 (elf64_alpha_reloc_gpdisp): Likewise.
4640 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4641 (elf64_alpha_info_to_howto): Likewise.
4642 (elf64_alpha_add_symbol_hook): Likewise.
4643 (elf64_alpha_create_got_section): Likewise.
4644 (elf64_alpha_is_local_label_name): Likewise.
4645 (elf64_alpha_merge_ind_symbols): Likewise.
4646 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4647 (mips_elf64_get_reloc_upper_bound): Likewise.
4648 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4649 (nlm_alpha_get_public_offset): Likewise.
4651 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
4653 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4654 about overflow in R_OPENRISC_LO_16_IN_INSN and
4655 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4657 2001-04-30 H.J. Lu <hjl@gnu.org>
4659 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4660 only for ELF_LINK_FORCED_LOCAL.
4661 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4662 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4663 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4665 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4666 if the symbol has hidden or internal visibility.
4668 2001-04-30 Alan Modra <amodra@one.net.au>
4670 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4671 calls to undefined weak symbols.
4673 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4675 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4676 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4678 2001-04-27 Andreas Jaeger <aj@suse.de>
4680 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4681 out handled entries.
4682 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4683 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4684 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4687 2001-04-27 Sean McNeil <sean@mcneil.com>
4689 * config.bfd: Add arm-vxworks target.
4690 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4691 addend (fro VXworks targets).
4693 2001-04-26 H.J. Lu <hjl@gnu.org>
4695 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4698 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
4700 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4701 * bfd-in2.h: Regenerated.
4703 2001-04-24 Jakub Jelinek <jakub@redhat.com>
4705 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4706 (struct sec_merge_hash): Remove alignment_power.
4707 (sec_merge_hash_newfunc): Clear alignment.
4708 (sec_merge_hash_lookup): Pass alignment as argument.
4709 Use hashp->root.next, not hashp->next to walk the hash chain.
4710 If a string already in the hashtable does not have required
4711 alignment, create a new hashtable entry.
4712 (sec_merge_init): Remove alignment_power argument.
4713 (sec_merge_add): Add alignment argument.
4714 (sec_merge_emit): Alignment is now a per-entity thing, not per
4716 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4717 for proper alignment.
4718 Pass alignment information to sec_merge_add.
4720 2001-04-24 Christian Groessler <cpg@aladdin.de>
4722 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4723 and R_REL16 reloc types; accept odd values for R_REL16 type
4725 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
4727 * cpu-openrisc.c: New file.
4728 * elf32-openrisc.c: Likewise.
4730 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4731 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4732 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4733 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4734 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4735 * Makefile.in: Regenerated.
4736 * config.bfd: (openrisc-*-elf): New target.
4737 * configure.in (bfd_elf32_openrisc_vec): New vector.
4738 * configure: Regenerated.
4739 * libbfd.h: Regenerated.
4740 * bfd-in2.h: Regenerated.
4741 * reloc.c: Add OpenRISC relocations.
4742 * targets.c (bfd_elf32_openrisc_vec): Declare.
4743 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4744 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4745 (bfd_openrisc_arch): Declare.
4746 (bfd_archures_list): Add bfd_openrisc_arch.
4747 * elf.c (prep_headers): Add bfd_arch_openrisc.
4749 2001-04-23 Bo Thorsen <bo@suse.de>
4751 * elf64-x86-64.c: Add c++ vtable hack.
4752 Small whitespace and comment changes.
4754 2001-04-19 Andreas Jaeger <aj@suse.de>
4756 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4757 (elf64_x86_64_plt_entry): Likewise.
4758 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4759 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4761 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
4763 * elf32-cris.c: Tweak comments related to dynamic linking.
4764 (cris_elf_relocate_section): When not creating shared object, fill
4765 in the .got table for any symbol not in the dynamic symbol table.
4766 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4767 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4769 (cris_elf_check_relocs): Use variable r_type in all places rather
4770 than the original expression. Add default case in switch for
4772 (elf_cris_size_dynamic_sections): Iterate over
4773 elf_cris_discard_excess_program_dynamics when not creating shared
4775 (elf_cris_discard_excess_dso_dynamics): Renamed from
4776 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4777 (elf_cris_discard_excess_program_dynamics): New.
4779 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4781 * coffcode.h (coff_write_object_contents): Use
4782 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4784 2001-04-14 H.J. Lu <hjl@gnu.org>
4786 * bfd-in2.h: Regenerate.
4788 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4790 * section.c (STD_SECTION): Add entsize.
4792 2001-04-13 H.J. Lu <hjl@gnu.org>
4794 * section.c (SEC_MERGE): Define new flag for merging.
4795 (SEC_STRINGS): Likewise.
4796 (entsize): New field.
4798 2001-04-13 Roger Sayle <roger@metaphorics.com>
4800 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4801 flag on pe-i386 targets.
4803 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4805 * libbfd-in.h (_bfd_merge_section): New.
4806 (_bfd_write_merged_section): New.
4807 (_bfd_merged_section_offset): New.
4808 * libbfd.h: Rebuilt.
4809 * linker.c (_bfd_generic_link_output_symbols): Handle
4811 * aoutx.h (aout_link_write_symbols): Likewise.
4812 * pdp11.c (aout_link_write_symbols): Likewise.
4813 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4814 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4816 (elf_link_sec_merge_syms): New.
4817 (elf_link_input_bfd): Call _bfd_merged_section_offset
4818 and _bfd_write_merged_section.
4819 Handle discard_sec_merge.
4820 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4822 (struct bfd_elf_section_data): Likewise.
4823 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4824 SEC_STRINGS section flags and entsize from their ELF counterparts.
4825 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4826 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4827 from their BFD counterparts.
4828 * merge.c: New file.
4829 * Makefile.am: Add strtab.lo.
4830 * Makefile.in: Rebuilt.
4832 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4834 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4835 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4837 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4839 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4840 endian MIPS ELF target.
4841 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4844 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4845 64bit big endian MIPS ELF target.
4846 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4847 endian MIPS ELF target.
4848 * configure: Regenerated.
4850 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4851 little endian targets.
4852 (mips_elf_sym_is_global): Handle traditional targets.
4854 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4855 64bit big endian MIPS ELF target.
4856 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4857 endian MIPS ELF target.
4859 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4860 and bfd_elf64_tradlittlemips_vec.
4862 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4864 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4865 ordinary "progbits" section.
4867 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4869 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4870 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4872 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4874 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4876 2001-03-30 H.J. Lu <hjl@gnu.org>
4878 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4879 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4881 2001-03-26 H.J. Lu <hjl@gnu.org>
4883 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4884 if there are any relocations for generic ELF.
4885 (bfd_elf32_bfd_link_add_symbols): Defined to
4886 elf32_generic_link_add_symbols.
4887 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4888 if there are any relocations for generic ELF.
4889 (bfd_elf64_bfd_link_add_symbols): Defined to
4890 elf64_generic_link_add_symbols.
4892 2001-03-23 Nick Clifton <nickc@redhat.com>
4894 * Makefile.am (BUILD_CFILES): New variable: List of C source
4895 files created in build directory.
4896 (BUILD_HFILES): New variable: List of header files created in
4899 (po/POTFILES.in): Replace rule with empty entry.
4900 (po/SRC-POTFILES.in): New rule: Create a list of source files
4901 in the source directory.
4902 (po/BLD-POTFILES.in): New rule: Create a list of source files
4903 in the build directory.
4904 (MOSTLYCLEAN): Do not delete source files created in build
4906 * Makefile.in: Regenerate.
4907 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4909 * configure: Regenerate.
4911 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4913 Add .. to the search path when building bfd.pot.
4914 Delete POTFILES when performing distclean.
4915 Add comment describing why distclean is broken in maintainer mode.
4916 * po/POTFILES.in: Delete.
4917 * po/SRC-POTFILES.in: New file.
4918 * po/BLD-POTFILES.in: New file.
4919 * po/bfd.pot: Regenerate.
4921 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4923 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4924 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4925 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4926 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4927 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4928 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4930 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4931 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4932 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4933 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4934 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4935 New HOWTO members for new relocs.
4936 (cris_reloc_map): Map new relocs.
4937 (ELF_DYNAMIC_INTERPRETER): Define.
4938 (PLT_ENTRY_SIZE): Define.
4939 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4940 elf_cris_pic_plt_entry): New, PLT templates.
4941 (struct elf_cris_pcrel_relocs_copied, struct
4942 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4943 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4944 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4945 positive values. Adjust PCREL relocs to be relative to location
4947 (cris_elf_relocate_section): Handle relocations to dynamic
4948 objects. Handle new relocations. Call error handler when seeing
4949 non-PIC relocation for read-only sections while generating shared
4951 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4953 (bfd_elf32_bfd_link_hash_table_create,
4954 elf_backend_adjust_dynamic_symbol,
4955 elf_backend_size_dynamic_sections,
4956 elf_backend_finish_dynamic_symbol,
4957 elf_backend_finish_dynamic_sections,
4958 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4959 elf_backend_hide_symbol, elf_backend_want_got_plt,
4960 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4961 elf_backend_got_header_size, elf_backend_plt_header_size):
4964 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4965 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4966 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4967 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4968 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4969 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4970 * bfd-in2.h, libbfd.h: Regenerate.
4972 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4974 (_bfd_mips_elf_relocate_section): Give a better error message when
4975 a relocation is not recognized.
4977 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4979 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4980 non-NULL before attempting to dereference.
4982 2001-03-20 H.J. Lu <hjl@gnu.org>
4984 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4985 * configure: Rebuild.
4987 2001-03-20 Andreas Schwab <schwab@suse.de>
4989 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4990 relocation value when resolving a reference from a debugging
4993 2001-03-16 Scott Thomason <SThomaso@hii.com>
4995 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4996 (xcoff64_swap_sym_out): Fix syntax errors.
4998 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
5000 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
5002 2001-03-15 Alan Modra <alan@linuxcare.com.au>
5004 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
5005 (hppa_link_hash_newfunc): Init it.
5006 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
5007 section appears to be non-PIC.
5008 (final_link_relocate): Likewise.
5009 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
5010 possible candidate function, and set pic_call for those that will
5011 only have a .plt entry for the PIC call stub.
5012 (hppa_handle_PIC_calls): Set maybe_pic_call.
5014 2001-03-12 DJ Delorie <dj@redhat.com>
5016 * elf32-sh.c (sh_elf_relocate_section): Only relocation
5017 R_SH_DIR8WP* relocs if they're against external symbols, else
5018 they're just for relaxing. Validate the reloc values.
5020 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
5022 * binary.c (bfd_external_binary_architecture): Declare.
5023 (binary_object_p): If bfd_external_binary_architecture is defined,
5024 set the architecture to this string.
5026 2001-03-11 Philip Blundell <philb@gnu.org>
5028 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
5029 entries that could serve as a definition for a weak symbol.
5031 2001-03-08 Nick Clifton <nickc@redhat.com>
5033 * Most files: Update copyright notices using Perl script created
5034 by Kevin Buettner <kevinb@redhat.com>.
5036 2001-03-07 Nick Clifton <nickc@redhat.com>
5038 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
5039 prior patch on ! defined OLD_ARM_ABI.
5041 2001-03-07 Andreas Jaeger <aj@suse.de>
5043 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
5044 some relocation values.
5046 2001-03-06 Nick Clifton <nickc@redhat.com>
5048 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
5049 of offset in BLX(1) instruction.
5050 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
5051 offset in BLX(1) instruction.
5054 2001-03-06 Nick Clifton <nickc@redhat.com>
5056 * coff-arm.c (coff_arm_reloc_type_lookup): Add
5057 BFD_RELOC_THUMB_PCREL_BLX.
5059 2001-03-06 Igor Shevlyakov <igor@windriver.com>
5061 * archures.c (bfd_default_scan): Add Coldfire CPUs.
5062 * bfd-in2.h: Regenerate.
5063 * cpu-m68k.c: Add Coldfire CPUs for arch table.
5064 * ieee.c (ieee_write_processor): Set proper id for
5067 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
5069 * configure.in: Add s390 target.
5070 * configure: Regenerate.
5072 2001-02-28 Andreas Jaeger <aj@suse.de>
5074 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
5077 2001-02-28 Philip Blundell <pb@futuretv.com>
5079 * elf32-arm.h: Update mentions of renamed EF_xx constants.
5080 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
5082 2001-02-27 H.J. Lu <hjl@gnu.org>
5084 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
5085 abfd->tdata.aout_data == NULL.
5087 2001-02-27 Alan Modra <alan@linuxcare.com.au>
5089 * elf32-hppa.c: Correct field selector in stub comments.
5090 (clobber_millicode_symbols): Formatting fix.
5092 * configure.in: Bump version to 2.11.90.
5093 * configure: Regenerate.
5094 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
5095 (CFILES): $SOURCE_CFILES + generated C files.
5096 (POTFILES): Include $HFILES not $SOURCE_HFILES.
5098 * Makefile.in: Regenerate.
5099 * doc/Makefile.in: This too.
5101 2001-02-26 Timothy Wall <twall@cygnus.com>
5103 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
5106 2001-02-26 Nick Clifton <nickc@redhat.com>
5108 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
5109 up, replacing multiple if statements with a switch.
5110 (handle_COMDAT): New function.
5112 2001-02-26 H.J. Lu <hjl@gnu.org>
5114 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
5115 a warning for section flags we do not handle instead of
5118 2001-02-26 Andreas Jaeger <aj@suse.de>
5120 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
5122 2001-02-22 Timothy Wall <twall@cygnus.com>
5124 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
5125 * configure.in: Add objects for elf64_ia64_aix vectors.
5126 * configure: Regenerated.
5127 * configure.host: Recognize ia64-*-aix*.
5128 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
5129 for AIX. AIX5 requires most relocations to be dynamic (*all*
5130 binaries are somewhat similar to shared libraries).
5131 * targets.c: Add elf64_ia64_aix vectors.
5133 2001-02-21 David Mosberger <davidm@hpl.hp.com>
5135 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
5136 C8 said "1" instead of "8". Clarify error string for IMM22:
5137 "signed integer" instead of just "integer".
5139 2001-02-20 Andreas Jaeger <aj@suse.de>
5141 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
5142 PLT entries that could serve as a definition for a weak symbol.
5144 2001-02-19 Jakub Jelinek <jakub@redhat.com>
5146 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
5147 entries that could serve as a definition for a weak symbol.
5148 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
5150 2001-02-18 David O'Brien <obrien@FreeBSD>
5152 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
5153 FreeBSD/i386-CURRENT differently until I can figure out the needed
5155 * configure: Regenerate.
5156 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
5157 FreeBSD/PowerPC, and FreeBSD/sparc64.
5159 2001-02-18 lars brinkhoff <lars@nocrew.org>
5161 * Makefile.am: Add PDP-11 a.out target.
5162 * config.bfd: Likewise.
5163 * configure.in: Likewise.
5164 * targets.c: Likewise.
5165 * archures.c: Likewise.
5166 * bfd-in2.h: Likewise. Add PDP-11 relocations.
5167 * libbfd.h: Add PDP-11 relocations.
5168 * reloc.c: Likewise.
5169 * cpu-pdp11.c: New file.
5170 * pdp11.c: New file.
5172 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
5173 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
5174 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
5175 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
5176 (GET_MAGIC): New macro.
5177 (PUT_MAGIC): Likewise.
5178 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
5180 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
5182 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
5183 multiarch needs it).
5185 2001-02-18 H.J. Lu <hjl@gnu.org>
5187 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
5190 2001-02-18 Kazu Hirata <kazu@hxi.com>
5192 * vms-misc.c: Fix formatting.
5194 2001-02-16 Kazu Hirata <kazu@hxi.com>
5196 * vms.c: Fix formatting.
5198 2001-02-14 H.J. Lu <hjl@gnu.org>
5200 * elf.c (elf_find_function): New function.
5201 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
5202 the file name and function name.
5204 2001-02-14 Nick Clifton <nickc@redhat.com>
5206 * ecoff.c (bfd_debug_section): Update to initialise new fields in
5209 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
5210 (BFD64_BACKENDS): Add pepigen.c
5211 Add rules to create peigen.c and pepigen.c from peXXigen.c.
5213 * Makefile.in: Regenerate.
5214 * configure: Regenerate.
5215 * po/POTFILES.in: Regenerate.
5216 * po/bfd.pot: Regenerate.
5218 2001-02-14 H.J. Lu <hjl@gnu.org>
5220 * libcoff-in.h (pe_tdata): Add members target_subsystem and
5221 force_minimum_alignment.
5223 2001-02-14 Bo Thorsen <bo@suse.de>
5225 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
5226 (elf64_86_64_size_info): Struct added to fix a problem
5227 with the hashtable string entries.
5228 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
5229 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
5230 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
5231 remove the FIXME for this.
5232 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
5233 section. Also removed the FIXME for it.
5234 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
5235 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
5236 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
5238 2001-02-13 Richard Henderson <rth@redhat.com>
5240 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
5241 and not user provided.
5243 2001-02-13 Kazu Hirata <kazu@hxi.com>
5245 * vms.c (vms_print_symbol): Remove unreachable code.
5247 * rs6000-core.c: Fix formatting.
5249 2001-02-13 David Mosberger <davidm@hpl.hp.com>
5251 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
5252 as _bfd_XXi_only_swap_filehdr_out.
5253 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
5254 pe->force_minimum_alignment to TRUE.
5255 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
5256 PEI_TARGET_SUBSYSTEM.
5257 (pe_print_private_bfd_data): Call
5258 _bfd_XX_print_private_bfd_data_common() instead of
5259 _bfd_pe_print_private_bfd_data_common().
5260 (pe_bfd_copy_private_bfd_data): Call
5261 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
5262 _bfd_pe_bfd_copy_private_bfd_data_common().
5263 (coff_bfd_copy_private_section_data): Define as
5264 _bfd_XX_bfd_copy_private_section_data instead of
5265 _bfd_pe_bfd_copy_private_section_data.
5266 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
5267 of a _bfd_pe_get_symbol_info.
5271 * peXXigen.c: Renamed from peigen.c.
5272 (COFF_WITH_XX): Define this macro (will get expanded into
5273 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
5274 compiled as peigen.c or pepigen.c.
5275 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
5276 define the canonical PEP structures and definitions.
5277 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
5278 effect, enforce minimum file and section alignments. If
5279 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
5280 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
5281 so, by default, this is a no-op).
5283 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
5284 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
5285 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
5286 _bfd_pefoo if it's not defined. Use these macros to define
5289 * libcoff.h (pe_tdata): Add members target_subsystem and
5290 force_minimum_alignment.
5292 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
5294 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
5296 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
5299 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
5300 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
5303 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
5304 (BFD64_BACKENDS_CFILES): Mention pepigen.c
5305 (peigen.c): Add rule to generate from peXXigen.c.
5307 (pepigen.lo): List dependencies for pepigen.lo.
5309 2001-02-13 Alan Modra <alan@linuxcare.com.au>
5311 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
5312 $global$ referenced but not defined, set its value here.
5314 2001-02-09 Bo Thorsen <bo@suse.de>
5316 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
5318 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
5320 (elf64_x86_64_relocate_section): Fix formatting.
5321 (elf64_x86_64_relocate_section): Fix addend for relocation of
5322 R_X86_64_(8|16|32|PC8|PC16|PC32).
5324 2001-02-12 Jan Hubicka <jh@suse.cz>
5326 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
5328 2001-02-11 H.J. Lu <hjl@gnu.org>
5330 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
5333 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5335 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
5336 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
5337 relocations against dynsym symbols.
5339 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
5340 the R_MIPS_26 relocation.
5341 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
5342 the R_MIPS_26 relocation.
5343 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
5345 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
5346 the R_MIPS_26 relocation.
5347 (mips_elf64_howto_table_rela): Likewise.
5349 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
5350 member to mark symbols that have non-CALL relocations against
5352 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
5353 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
5355 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
5356 non-CALL relocation against it is encountered.
5357 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
5358 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
5359 no_fn_stub is not set.
5361 * elf32-mips.c (mips_elf_output_extsym): Get the output section
5362 information from the real symbol for indirect ones.
5363 Check no_fn_stub to find out if a symbol has a function stub
5366 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5368 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
5369 * Makefile.in: Regenerate.
5371 2001-02-09 David Mosberger <davidm@hpl.hp.com>
5373 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
5374 true if section name is an unwind table section name.
5375 (elfNN_ia64_additional_program_headers): Count each unwind section
5377 (elfNN_ia64_modify_segment_map): Install one unwind program header
5378 for each unwind separate section. Note: normally the linker
5379 script merges the unwind sections that go into a single segment,
5380 so this still generates at most one unwind program header per
5383 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
5384 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
5385 (elfNN_ia64_fake_sections): Mark sections with names that start
5386 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
5389 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
5390 Use it to make sh_info in unwind section point to the text section
5393 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
5395 * Makefile.am: Add linux target for S/390.
5396 * archures.c: Likewise.
5397 * bfd-in2.h: Likewise.
5398 * config.bfd: Likewise.
5399 * configure.in: Likewise.
5401 * libbfd.h: Likewise.
5402 * targets.c: Likewise.
5403 * cpu-s390.c: New file.
5404 * elf32-s390.c: New file.
5405 * elf64-s390.c: New file.
5407 2001-02-09 Nick Clifton <nickc@redhat.com>
5409 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
5410 ImageBase. This has already been done by coff_swap_hdr_in.
5412 2001-02-09 Jakub Jelinek <jakub@redhat.com>
5414 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
5416 2001-02-09 Jakub Jelinek <jakub@redhat.com>
5418 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
5419 (sparc64_elf_relocate_section): Likewise.
5421 2001-02-09 Mark Kettenis <kettenis@gnu.org>
5423 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
5424 similar to R_SPARC_32.
5425 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5427 2001-02-08 H.J. Lu <hjl@gnu.org>
5429 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
5430 relocation entries for weak definitions when building DSO with
5433 2001-02-08 Richard Henderson <rth@redhat.com>
5435 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
5436 before visibility. Locally defined protected symbols are not
5439 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
5441 * config.bfd: Enable coff64 for rs6000-*. Patch from
5442 <hzoli@austin.ibm.com>.
5444 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
5446 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
5447 found, do not attempt to find dwarf2 info before returning.
5449 2001-02-07 Jakub Jelinek <jakub@redhat.com>
5451 * elflink.h (is_global_symbol_definition): Rename to
5452 is_global_data_symbol_definition and have it reject function
5454 (elf_link_is_defined_archive_symbol): Use renamed function.
5456 2001-02-07 Todd Vierling <tv@wasabisystems.com>
5458 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
5459 * libbfd.h (bfd_target_vector): Likewise.
5460 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
5461 make static; create pointer reference named bfd_target_vector.
5462 (_bfd_target_vector_entries): Calculate this based on the array
5463 typed _bfd_target_vector.
5465 2001-02-06 H.J. Lu <hjl@gnu.org>
5467 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
5468 internal symbols are not dynamic.
5469 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
5471 2001-02-06 Nick Clifton <nickc@redhat.com>
5473 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
5474 that it will not be pulled into the list of files that make up
5476 * Makefile.in: Regenerate.
5477 * po/bfd.pot: Regenerate.
5479 2001-02-06 H.J. Lu <hjl@gnu.org>
5481 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
5483 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
5484 external_PEI_IMAGE_hdr.
5486 2001-02-06 Kazu Hirata <kazu@hxi.com>
5488 * elf-m10200.c: Fix formatting.
5490 2001-02-04 Nick Clifton <nickc@redhat.com>
5492 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5493 rel, it will be handled later on.
5495 2001-02-02 Fred Fish <fnf@ninemoons.com>
5497 * Makefile.in: Fix typo.
5499 2001-02-01 Kazu Hirata <kazu@hxi.com>
5501 * elf-m10300.c: Fix formatting.
5503 2001-01-30 Alan Modra <alan@linuxcare.com.au>
5505 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5506 (elf_backend_get_symbol_type): Define.
5507 (elf64_hppa_object_p): Set architecture and machine from elf
5510 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
5512 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5515 2001-01-26 Richard Henderson <rth@redhat.com>
5517 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5518 for non-default visibility.
5519 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5520 delete ugly macro and replace with pretty function.
5522 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
5524 * coff-go32.c: Update copyright.
5525 * coff-stgo32.c: Likewise.
5526 * coff-go32.c (COFF_LONG_FILENAMES): Define.
5527 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5528 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5529 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5531 2001-01-25 Kazu Hirata <kazu@hxi.com>
5533 * bfd-in2.h: Rebuild.
5534 * libbfd.h: Likewise.
5536 2001-01-23 H.J. Lu <hjl@gnu.org>
5538 * bfd-in2.h: Rebuild.
5540 2001-01-23 H.J. Lu <hjl@gnu.org>
5542 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5543 is NULL or PRIV(vms_rec) is outside of the buffer.
5545 2001-01-23 Kazu Hirata <kazu@hxi.com>
5547 * coff64-rs6000.c: Fix formatting.
5548 * coff-arm.c: Likewise.
5549 * coffgen.c: Likewise.
5550 * cofflink.c: Likewise.
5551 * coff-mcore.c: Likewise.
5552 * coff-mips.c: Likewise.
5553 * coff-pmac.c: Likewise.
5554 * coff-ppc.c: Likewise.
5555 * coff-rs6000.c: Likewise.
5556 * elf32.c: Likewise.
5557 * elf32-fr30.c: Likewise.
5558 * elf32-i370.c: Likewise.
5559 * elf32-i860.c: Likewise.
5560 * elf32-m32r.c: Likewise.
5561 * elf32-m68k.c: Likewise.
5562 * elf32-mcore.c: Likewise.
5563 * elf32-ppc.c: Likewise.
5564 * elf32-sh.c: Likewise.
5565 * elf32-v850.c: Likewise.
5566 * elf64-alpha.c: Likewise.
5567 * elf64-sparc.c: Likewise.
5568 * elflink.c: Likewise.
5569 * elflink.h: Likewise.
5570 * elf-m10200.c: Likewise.
5571 * elf-m10300.c: Likewise.
5572 * elfxx-ia64.c: Likewise.
5574 * aoutx.h: Fix formatting.
5576 * bfd-in2.h: Likewise.
5577 * bfd-in.h: Likewise.
5578 * cpu-i386.c: Likewise.
5579 * cpu-m68hc11.c: Likewise.
5580 * dwarf2.c: Likewise.
5581 * elf64-x86-64.c: Likewise.
5582 * format.c: Likewise.
5583 * freebsd.h: Likewise.
5585 * hp300hpux.c: Likewise.
5586 * hppabsd-core.c: Likewise.
5587 * hpux-core.c: Likewise.
5589 2001-01-22 Bo Thorsen <bo@suse.de>
5591 * elf64-x86-64.c: Added PIC support for X86-64.
5592 (elf64_x86_64_link_hash_newfunc): Function added.
5593 (elf64_x86_64_link_hash_table_create): Likewise.
5594 (elf64_x86_64_check_relocs): Likewise.
5595 (elf64_x86_64_gc_mark_hook): Likewise.
5596 (elf64_x86_64_gc_sweep_hook): Likewise.
5597 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5598 (elf64_x86_64_size_dynamic_sections): Likewise.
5599 (elf64_x86_64_discard_copies): Likewise.
5600 (elf64_x86_64_finish_dynamic_symbol): Likewise.
5601 (elf64_x86_64_finish_dynamic_sections): Likewise.
5602 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5604 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5606 * Makefile.am (install-data-local): Make use of $(DESTDIR).
5607 * Makefile.in: Regenerate.
5609 2001-01-21 Kazu Hirata <kazu@hxi.com>
5611 * coff-a29k.c: Fix formatting.
5613 2001-01-19 H.J. Lu <hjl@gnu.org>
5615 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5616 relocation section names.
5617 (elf_i386_relocate_section): Report files with bad relocation
5618 section names and return false.
5620 2001-01-17 Bo Thorsen <bo@suse.de>
5622 * targets.c: Alphabetize list of xvecs.
5624 2001-01-14 Alan Modra <alan@linuxcare.com.au>
5626 * config.bfd: Add linux target variant for elfxx-hppa.
5627 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5628 bfd_elf64_hppa_linux_vec.
5629 * configure: Regenerate.
5630 * elf64-hppa.c: Include elf64-target.h again to support linux
5632 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5633 * elf32-hppa.c: Include elf32-target.h again to support linux
5635 (elf32_hppa_post_process_headers): New function.
5636 (elf_backend_post_process_headers): Define.
5637 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5638 bfd_elf32_hppa_linux_vec.
5640 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5641 and data_segment_base fields.
5642 (elf32_hppa_link_hash_table_create ): Init them.
5643 (elf32_hppa_check_relocs): Update comments.
5644 (hppa_record_segment_addr): New function.
5645 (elf32_hppa_relocate_section): Call it.
5646 (final_link_relocate): Handle R_PARISC_SEGREL32.
5647 (elf32_hppa_final_link): New function.
5648 (bfd_elf32_bfd_final_link): Define to call it.
5649 (hppa_unwind_entry_compare): New function.
5650 * cache.c (bfd_open_file): Create files in write+read mode.
5652 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5653 SEGREL32 and numerous other relocs. Change duplicate
5654 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5656 * opncls.c (bfd_fdopenr): Add parens like the comment says around
5659 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5660 .plt entries for DT_INIT and DT_FINI.
5661 (elf32_hppa_finish_dynamic_sections): Remove special handling of
5662 DT_INIT and DT_FINI.
5664 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5665 offsets for stub .plt access if wide mode. Check offset in range.
5667 2001-01-13 Nick Clifton <nickc@redhat.com>
5669 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5672 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5675 2001-01-12 Alan Modra <alan@linuxcare.com.au>
5677 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5678 * configure: Regenerate.
5680 2001-01-11 Peter Targett <peter.targett@arccores.com>
5682 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5683 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5684 * cpu-arc.c (arch_info_struct): Add entries for variants.
5685 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5686 (arc_get_mach) Don't assume machine names prefixed arc- before
5688 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5690 (arc_elf_final_write_processing) Likewise.
5691 (ELF_MACHINE_CODE) Use EM_ARC.
5693 2001-01-10 Nick Clifton <nickc@redhat.com>
5695 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5697 2001-01-07 Philip Blundell <philb@gnu.org>
5699 * README: Replace `bug-gnu-utils@gnu.org' with
5700 `bug-binutils@gnu.org'.
5702 2001-01-04 Kazu Hirata <kazu@hxi.com>
5704 * som.c: Fix formatting.
5706 2001-01-03 Kazu Hirata <kazu@hxi.com>
5708 * ecoffswap.h: Fix formatting.
5709 * elf-bfd.h: Likewise.
5710 * elfarm-nabi.c: Likewise.
5711 * elfarm-oabi.c: Likewise.
5712 * elfcode.h: Likewise.
5713 * elfcore.h: Likewise.
5714 * elflink.c: Likewise.
5715 * elflink.h: Likewise.
5716 * elfxx-ia64.c: Likewise.
5717 * elfxx-target.h: Likewise.
5718 * libbfd.c: Likewise
5719 * linker.c: Likewise.
5720 * lynx-core.c: Likewise.
5722 2001-01-02 Kazu Hirata <kazu@hxi.com>
5724 * pc532-mach.c: Fix formatting.
5725 * pe-arm.c: Likewise.
5726 * pe-i386.c: Likewise.
5727 * pe-mips.c: Likewise.
5728 * pe-ppc.c: Likewise.
5729 * pe-sh.c: Likewise.
5730 * pei-mips.c: Likewise.
5731 * pei-sh.c: Likewise.
5732 * peicode.h: Likewise.
5733 * ppcboot.c: Likewise.
5734 * ptrace-core.c: Likewise.
5736 2001-01-01 Kazu Hirata <kazu@hxi.com>
5738 * reloc.c: Fix formatting.
5739 * riscix.c: Likewise.
5740 * rs6000-core.c: Likewise.
5741 * xcoff-target.h: Likewise.
5743 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5745 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5746 error, by calling bfd_default_set_arch_mach with incoming
5749 2000-12-26 Kazu Hirata <kazu@hxi.com>
5751 * vaxnetbsd.c: Fix formatting.
5752 * versados.c: Likewise.
5753 * vms-gsd.c: Likewise.
5754 * vms-hdr.c: Likewise.
5755 * vms-misc.c: Likewise.
5757 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
5759 * archive.c (coff_write_armap): Don't write more than symbol_count
5760 `archive_member_file_ptr's.
5762 2000-12-25 Kazu Hirata <kazu@hxi.com>
5764 * vms-tir.c: Fix formatting.
5766 2000-12-23 Kazu Hirata <kazu@hxi.com>
5768 * vms.c: Fix formatting.
5771 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
5773 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5775 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5777 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5780 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5782 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5784 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5786 * libbfd.c (bfd_get_bits): Added
5787 (bfd_put_bits): Likewise
5788 * bfd-in.h: Declared the above.
5789 * bfd-in2.h: Regenerated.
5791 2000-12-20 Kazu Hirata <kazu@hxi.com>
5793 * targets.c: Fix formatting.
5794 * tekhex.c: Likewise.
5795 * trad-core.c: Likewise.
5797 2000-12-19 Kazu Hirata <kazu@hxi.com>
5799 * sco5-core.c: Fix formatting.
5800 * section.c: Likewise.
5801 * sparclinux.c: Likewise.
5802 * sparclynx.c: Likewise.
5803 * sparcnetbsd.c: Likewise.
5805 * stabs.c: Likewise.
5806 * stab-syms.c: Likewise.
5807 * sunos.c: Likewise.
5809 * sysdep.h: Likewise.
5811 2000-12-18 Nick Clifton <nickc@redhat.com>
5813 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5815 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5816 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5818 2000-12-18 Nick Clifton <nickc@redhat.com>
5820 * vms-misc.c (_bfd_vms_get_record): Add default case to
5823 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5825 * elfcore.h (elf_core_file_p): Move to the start of the program
5826 headers before attempting to read them.
5828 2000-12-14 Kazu Hirata <kazu@hxi.com>
5830 * peigen.c: Fix formatting.
5834 2000-12-13 Kazu Hirata <kazu@hxi.com>
5836 * peigen.c: Fix formatting.
5838 2000-12-12 Jim Wilson <wilson@redhat.com>
5840 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5842 2000-12-08 Mark Salter <msalter@redhat.com>
5844 * binary.c (binary_set_section_contents): Ignore sections
5847 2000-12-12 Kazu Hirata <kazu@hxi.com>
5849 * m68klinux.c: Fix formatting.
5850 * m68knetbsd.c: Likewise.
5851 * mipsbsd.c: Likewise.
5852 * netbsd-core.c: Likewise.
5853 * netbsd.h: Likewise.
5854 * newsos3.c: Likewise.
5855 * nlm32-alpha.c: Likewise.
5856 * nlm32-i386.c: Likewise.
5857 * nlm32-ppc.c: Likewise.
5858 * nlm32-sparc.c: Likewise.
5859 * nlmcode.h: Likewise.
5860 * nlmswap.h: Likewise.
5861 * nlm-target.h: Likewise.
5862 * ns32knetbsd.c: Likewise.
5864 2000-12-10 Fred Fish <fnf@be.com>
5866 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5867 symbols in shared objects if allow_shlib_undefined is true.
5869 2000-12-12 Nick Clifton <nickc@redhat.com>
5871 * cpu-sh.c: Fix formattng.
5872 * elf.c: Fix formattng.
5873 * elf32-mips.c: Fix formattng.
5874 * elf32-sh.c: Fix formattng.
5875 * elf64-alpha.c: Fix formattng.
5877 2000-12-09 Nick Clifton <nickc@redhat.com>
5879 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5880 dwarf2_find_line_info as last parameter to invocation of
5881 _bfd_dwarf2_find_nearest_line.
5882 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5883 dwarf2_find_line_info as last parameter to invocation of
5884 _bfd_dwarf2_find_nearest_line.
5886 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5888 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5889 (BFD_LIBS): ...to here.
5890 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5891 (BFD_LIBS_CFILES): ...to here.
5892 * Makefile.in: Regenerate.
5893 * configure.in: Remove dwarf.lo from the elf shell variable.
5894 * configure: Regenerate.
5895 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5896 * libcoff.h: Regenerate.
5897 * coffgen.c (coff_find_nearest_line): Call
5898 _bfd_dwarf2_find_nearest_line.
5899 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5901 (read_abbrevs): Likewise
5902 (decode_line_info): Likewise.
5903 (parse_comp_unit): Likewise.
5904 (comp_unit_find_nearest_line): Likewise.
5905 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5906 * libbfd.h: Regenerate.
5907 * elf.c (_bfd_elf_find_nearest_line): Update call.
5908 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5909 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5910 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5911 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5912 (styp_to_sec_flags): Handle DWARF2 sections.
5913 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5914 to _bfd_find_nearest_line.
5915 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5916 call to _bfd_find_nearest_line.
5918 2000-12-08 Kazu Hirata <kazu@hxi.com>
5920 * coffgen.c: Fix formatting.
5921 * elf-m10300.c: Likewise.
5922 * elf32-i386.c: Likewise.
5923 * elf32-i960.c: Likewise.
5924 * elf32-m68k.c: Likewise.
5925 * elf32-mcore.c: Likewise.
5926 * elf32-ppc.c: Likewise.
5927 * elf32-sh.c: Likewise.
5928 * elf32-sparc.c: Likewise.
5929 * elf32-v850.c: Likewise.
5930 * elf64-alpha.c: Likewise.
5931 * elf64-hppa.c: Likewise.
5932 * elf64-mips.c: Likewise.
5933 * elf64-sparc.c: Likewise.
5935 2000-12-07 Kazu Hirata <kazu@hxi.com>
5937 * elf32-ppc.c: Fix formatting.
5938 * elf64-x86-64.c: Likewise.
5940 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5942 From Ralf Baechle <ralf@gnu.org>
5944 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5945 BFDs containing no sections or empty .text, .data or .bss sections
5946 to be merged, regardless of their flags.
5948 2000-12-06 Kazu Hirata <kazu@hxi.com>
5950 * elf32-m32r.c: Fix formatting.
5951 * elf32-m68hc11.c: Likewise.
5952 * elf32-m68hc12.c: Likewise.
5953 * elf32-m68k.c: Likewise.
5954 * elf32-mcore.c: Likewise.
5955 * elf32-pj.c: Likewise.
5956 * elf32-ppc.c: Likewise.
5958 2000-12-05 Kazu Hirata <kazu@hxi.com>
5960 * elf32-fr30.c: Fix formatting.
5961 * elf32-hppa.c: Likewise.
5962 * elf32-i370.c: Likewise.
5963 * elf32-i386.c: Likewise.
5964 * elf32-i860.c: Likewise.
5965 * elf32-i960.c: Likewise.
5967 2000-12-03 Kazu Hirata <kazu@hxi.com>
5969 * elf32-arm.h: Fix formatting.
5970 * elf32-avr.c: Likewise.
5971 * elf32-cris.c: Likewise.
5972 * elf32-d10v.c: Likewise.
5973 * elf32-d30v.c: Likewise.
5974 * elf-hppa.h: Likewise.
5975 * elf-m10200.c: Likewise.
5976 * elf-m10300.c: Likewise.
5978 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5980 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5981 bfd_mach_mips32_4k. Update FIXME comment.
5982 * archures.c (bfd_mach_mips32): New constant.
5983 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5984 the latter, renumber it.
5985 * bfd-in2.h (bfd_mach_mips32): New constant.
5986 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5987 the latter, renumber it.
5988 * cpu-mips.c (I_mips32): New constant.
5989 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5990 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5991 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5992 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5993 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5994 with E_MIPS_MACH_MIPS32_4K.
5995 (_bfd_mips_elf_final_write_processing): Replace
5996 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5997 bfd_mach_mips32 case.
5998 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5999 comparison with support for MIPS32.
6000 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
6003 * aoutx.h (NAME(aout,machine_type)): Add cases for
6004 bfd_mach_mips5 and bfd_mach_mips64.
6005 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
6006 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
6007 * cpu_mips.c (I_mips5, I_mips64): New definitions.
6008 (arch_info_struct): Add entries for bfd_mach_mips5 and
6010 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
6011 _bfd_mips_elf_print_private_bfd_data): Add cases for
6012 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
6013 (_bfd_mips_elf_final_write_processing): Add cases for
6014 bfd_mach_mips5 and bfd_mach_mips64.
6016 * aoutx.h (NAME(aout,machine_type)): Add a
6017 bfd_mach_mips_sb1 case.
6018 * archures.c (bfd_mach_mips_sb1): New constant.
6019 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
6020 * cpu-mips.c (I_sb1): New constant.
6021 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
6022 * elf32-mips.c (elf_mips_mach): Add case for
6024 (_bfd_mips_elf_final_write_processing): Add case for
6027 2000-12-01 Joel Sherrill <joel@OARcorp.com>
6029 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
6030 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
6031 (sparc*-*-rtems*): Switched from a.out to ELF.
6033 2000-11-30 Jan Hubicka <jh@suse.cz>
6035 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
6036 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
6037 (elf64-x86-64.lo): Add dependencies.
6038 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
6039 bfd_mach_x86_64_intel_syntax.
6040 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
6041 * config.bfd (x86_64): Add.
6042 * configure.in: Add support for bfd_elf64_x86_64_vec.
6043 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
6044 (bfd_i386_arch, i8086_ar): Link in.
6045 * elf64-x86-64.c: New file.
6046 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
6047 * targets.c (bfd_elf64_x86_64_vec): Add.
6048 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
6050 2000-11-30 Kazu Hirata <kazu@hxi.com>
6052 * xcofflink.c: Fix formatting.
6054 2000-11-28 Kazu Hirata <kazu@hxi.com>
6056 * aoutx.h: Fix formatting.
6057 * bfd-in.h: Likewise.
6058 * bfd-in2.h: Likewise.
6059 * cache.c: Likewise.
6060 * cisco-core.c: Likewise.
6061 * coff64-rs6000.c: Likewise.
6062 * coffcode.h: Likewise.
6063 * coffswap.h: Likewise.
6064 * corefile.c: Likewise.
6065 * elf32-mips.c: Likewise.
6067 2000-11-27 Kazu Hirata <kazu@hxi.com>
6069 * aout-adobe.c: Fix formatting.
6070 * coff64-rs6000.c: Likewise.
6071 * coffgen.c: Likewise.
6072 * cofflink.c: Likewise.
6074 2000-11-27 Philip Blundell <pb@futuretv.com>
6076 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
6077 (obj_coff_strings_written): New accessor macro for above.
6078 * libcoff.h: Regenerate.
6079 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
6081 * coffcode.h (coff_write_object_contents): No need to write out
6082 the string table if it's already been done.
6084 2000-11-22 Philip Blundell <pb@futuretv.com>
6086 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
6087 weak undefined symbols.
6089 2000-11-24 Nick Clifton <nickc@redhat.com>
6091 * archures.c (bfd_mach_arm_5TE): Define.
6092 (bfd_mach_arm+XScale): Define.
6093 * bfd-in2.h: Regenerate.
6095 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
6096 BFD_RELOC_ARM_PCREL_BLX.
6098 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
6099 XScale machine numbers.
6101 * config.bfd (xscale-elf): Add target.
6102 (xscale-coff): Add target.
6104 * cpu-arm.c: Add xscale machine name.
6105 Add v5t, v5te and XScale machine numbers.
6107 2000-11-23 Kazu Hirata <kazu@hxi.com>
6109 * aix386-core.c: Fix formatting.
6111 2000-11-22 Jim Wilson <wilson@redhat.com>
6113 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
6114 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
6115 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
6116 (ins_imms_scaled): Initialize sign_bit at function entry.
6117 (elf64_ia64_operands): Add missing initializers.
6118 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
6119 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
6120 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
6121 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
6122 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
6124 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
6125 and free_extsyms at function entry.
6126 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
6127 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
6128 (get_got): Delete unused local srel.
6129 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
6130 (elfNN_ia64_relocate_section): Delete unused local dynindx.
6132 2000-11-21 Kazu Hirata <kazu@hxi.com>
6134 * coff-a29k.c: Fix formatting.
6135 * coff-h8500.c: Likewise.
6136 * coff-i960.c: Likewise.
6137 * coff-ppc.c: Likewise.
6138 * coff-rs6000.c: Likewise.
6139 * coff-stgo32.c: Likewise.
6140 * coff-tic54x.c: Likewise.
6141 * coff-w65.c: Likewise.
6142 * cpu-h8500.c: Likewise.
6143 * cpu-hppa.c: Likewise.
6144 * cpu-ns32k.c: Likewise.
6145 * ecoff.c: Likewise.
6146 * ecofflink.c: Likewise.
6148 2000-11-21 Nick Clifton <nickc@redhat.com>
6150 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
6151 remove possibility of infinite loop.
6153 2000-11-20 Kazu Hirata <kazu@hxi.com>
6155 * aix386-core.c: Fix formatting.
6156 * aout-adobe.c: Likewise.
6157 * aout-arm.c: Likewise.
6158 * aout-encap.c: Likewise.
6159 * aout-ns32k.c: Likewise.
6160 * aout-target.h: Likewise.
6161 * aout-tic30.c: Likewise.
6162 * aoutf1.h: Likewise.
6163 * aoutx.h: Likewise.
6164 * archive.c: Likewise.
6165 * bfd-in.h: Likewise.
6166 * bfd-in2.h: Likewise.
6170 2000-11-17 H.J. Lu <hjl@gnu.org>
6172 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
6173 pltoff entries for DT_INIT and DT_FINI.
6174 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
6175 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
6178 2000-11-16 Richard Henderson <rth@redhat.com>
6180 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
6181 (allocate_dynrel_entries): Likewise.
6182 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
6183 (set_pltoff_entry): Likewise.
6184 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
6185 (elfNN_ia64_reloc_type_lookup): Likewise.
6186 (elfNN_ia64_install_value): Likewise.
6187 (elfNN_ia64_relocate_section): Likewise.
6188 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
6189 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
6191 2000-11-16 Kazu Hirata <kazu@hxi.com>
6193 * cpu-a29k.c: Fix formatting.
6194 * cpu-alpha.c: Likewise.
6195 * cpu-arm.c: Likewise.
6196 * cpu-avr.c: Likewise.
6197 * cpu-d10v.c: Likewise.
6198 * cpu-h8500.c: Likewise.
6199 * cpu-hppa.c: Likewise.
6200 * cpu-i370.c: Likewise.
6201 * cpu-i386.c: Likewise.
6202 * cpu-i960.c: Likewise.
6203 * cpu-ia64-opc.c: Likewise.
6204 * cpu-ia64.c: Likewise.
6205 * cpu-m32r.c: Likewise.
6206 * cpu-m68hc11.c: Likewise.
6207 * cpu-m68hc12.c: Likewise.
6208 * cpu-m68k.c: Likewise.
6209 * cpu-m88k.c: Likewise.
6210 * cpu-mips.c: Likewise.
6211 * cpu-ns32k.c: Likewise.
6212 * cpu-pj.c: Likewise.
6213 * cpu-powerpc.c: Likewise.
6214 * cpu-sh.c: Likewise.
6215 * cpu-sparc.c: Likewise.
6216 * cpu-tic54x.c: Likewise.
6217 * cpu-v850.c: Likewise.
6218 * cpu-vax.c: Likewise.
6219 * cpu-w65.c: Likewise.
6220 * cpu-we32k.c: Likewise.
6221 * cpu-z8k.c: Likewise.
6222 * dwarf1.c: Likewise.
6223 * dwarf2.c: Likewise.
6225 2000-11-15 Kazu Hirata <kazu@hxi.com>
6227 * coff-arm.c: Fix formatting.
6228 * coff-ppc.c: Likewise.
6229 * coff-rs6000.c: Likewise.
6230 * coff-sh.c: Likewise.
6231 * coff-sparc.c: Likewise.
6232 * coff-tic30.c: Likewise.
6233 * coff-tic54x.c: Likewise.
6234 * coff-tic80.c: Likewise.
6235 * coff-w65.c: Likewise.
6236 * coff-we32k.c: Likewise.
6237 * coff-z8k.c: Likewise.
6239 2000-11-15 Richard Henderson <rth@redhat.com>
6241 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
6242 section with the same ALLOC|LOAD flags as the source section.
6244 2000-11-14 Jakub Jelinek <jakub@redhat.com>
6246 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
6247 by STO_ALPHA constants.
6249 2000-11-14 Kazu Hirata <kazu@hxi.com>
6251 * coff-pmac.c: Fix formatting.
6252 * coff-ppc.c: Likewise.
6254 2000-11-13 H.J. Lu <hjl@gnu.org>
6256 * elflink.h (elf_link_add_object_symbols): Also add indirect
6257 symbols for common symbols with the default version.
6259 2000-11-09 Philip Blundell <pb@futuretv.com>
6261 * section.c (STD_SECTION): Set gc_mark flag.
6263 2000-11-11 Kazu Hirata <kazu@hxi.com>
6265 * coff-i960.c: Likewise.
6266 * coff-m68k.c: Likewise.
6267 * coff-m88k.c: Likewise.
6268 * coff-mcore.c: Likewise.
6269 * coff-mips.c: Likewise.
6271 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
6273 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
6275 2000-11-10 Kazu Hirata <kazu@hxi.com>
6277 * coff-h8300.c: Fix formatting.
6278 * coff-h8500.c: Likewise.
6279 * coff-i386.c: Likewise.
6280 * coff-i860.c: Likewise.
6281 * coff-i960.c: Likewise.
6282 * coff-ia64.c: Likewise.
6284 2000-11-09 Kazu Hirata <kazu@hxi.com>
6286 * archive.c: Fix formatting.
6287 * archures.c: Likewise.
6289 2000-11-07 Richard Henderson <rth@redhat.com>
6291 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
6292 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
6293 * section.c (bfd_set_section_contents): Call memcpy if
6294 section->contents set and location not equal to contents plus offset.
6296 2000-11-08 Kazu Hirata <kazu@hxi.com>
6298 * bfd-in.h: Fix formatting.
6299 * bfd-in2.h: Likewise.
6301 * binary.c: Likewise.
6303 * coff-a29k.c: Likewise.
6304 * coff-alpha.c: Likewise.
6305 * coff-apollo.c: Likewise.
6306 * coff-aux.c: Likewise.
6308 2000-11-07 Kazu Hirata <kazu@hxi.com>
6310 * aix386-core.c: Fix formatting.
6311 * aoutf1.h: Likewise.
6312 * aoutx.h: Likewise.
6313 * archures.c: Likewise.
6314 * armnetbsd.c: Likewise.
6316 2000-11-07 Alan Modra <alan@linuxcare.com.au>
6318 * coff-h8300.c (special): Adjust reloc address.
6320 2000-11-06 Steve Ellcey <sje@cup.hp.com>
6322 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
6323 to differentiate elf32 and elf64 on ia64.
6324 * bfd-in2.h: Regenerate.
6325 * config.bfd: Add target for "ia64*-*-hpux*".
6326 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
6327 * configure: Regenerate.
6328 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
6329 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
6331 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
6332 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
6333 * Makefile.in: Regnerate.
6334 * elf64-ia64.c: Deleted.
6335 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
6337 2000-11-06 Kazu Hirata <kazu@hxi.com>
6339 * aout-adobe.c: Fix formatting.
6340 * aout-arm.c: Likewise.
6341 * aout-cris.c: Likewise.
6342 * aout-encap.c: Likewise.
6343 * aout-ns32k.c: Likewise.
6344 * aout-target.h: Likewise.
6345 * aout-tic30.c: Likewise.
6347 2000-11-05 Philip Blundell <philb@gnu.org>
6349 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
6350 BFDs containing no sections to be merged, regardless of their flags.
6352 2000-11-04 Philip Blundell <philb@gnu.org>
6354 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
6355 if a relocation for an undefined symbol also results in an
6358 2000-11-06 Christopher Faylor <cgf@cygnus.com>
6360 * config.bfd: Add support for Sun Chorus.
6362 2000-11-05 David O'Brien <obrien@FreeBSD.org>
6364 * configure.in: Recognize alpha-*-freebsd*.
6365 * configure: Regenerate.
6367 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
6369 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
6370 (Chunk): New global variable set by a parameter in objcopy.c.
6371 (S3Forced): New global variable set by a parameter in
6373 (srec_set_section_contents): If S3Forced is true, always generate
6375 (srec_write_section): Use 'Chunk' to limit maximum length of S
6378 2000-11-02 Per Lundberg <plundis@chaosdev.org>
6380 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
6381 * Makefile.in: Regenerate.
6382 * bfd-in2.h: Regenerate.
6383 * po/bfd.pot: Regenerate.
6385 2000-10-31 Philip Blundell <philb@gnu.org>
6387 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
6388 EF_SOFT_FLOAT if it is defined.
6390 2000-10-27 Philip Blundell <philb@gnu.org>
6392 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
6393 attempts to mix PIC code with non-PIC, just mark the output as
6394 being position dependent.
6395 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
6396 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
6397 all mismatches, not just the first one.
6399 2000-10-25 Chris Demetriou <cgd@sibyte.com>
6401 * ieee.c (ieee_archive_p): Plug one of many possible
6402 memory leaks in error handling.
6404 2000-10-20 Jakub Jelinek <jakub@redhat.com>
6406 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
6407 elf32_sparc_object_p, elf32_sparc_final_write_processing):
6409 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
6410 sparc64_elf_object_p): Support v9b.
6411 * archures.c: Declare v8plusb and v9b machines.
6413 * cpu-sparc.c: Ditto.
6415 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6417 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
6420 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
6421 (SYMBOL_CALLS_LOCAL): New macro.
6422 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
6423 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
6424 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
6425 (ppc_elf_relocate_section): Use flag variable to determine
6426 whether the relocation refers to a local symbol.
6427 Test whether a PLTREL24 reloc will produce a reloc by looking
6428 to see whether a PLT entry was made.
6430 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6432 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
6433 entries that could serve as a definition for a weak symbol.
6435 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
6437 From Ralf Baechle <ralf@gnu.org>
6439 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
6440 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
6441 against local symbols.
6442 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
6444 2000-10-12 Alan Modra <alan@linuxcare.com.au>
6446 * section.c (struct sec): Add kept_section.
6447 (struct bfd_comdat_info): Remove sec, we can use above.
6448 (STD_SECTION): Add initializer.
6449 (bfd_make_section_anyway): Init here too.
6451 * bfd-in2.h: Regenerate.
6453 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
6455 (elf_link_input_bfd): Set all asection->symbol->value's here, and
6456 fudge values for discarded link-once section symbols.
6458 * elf64-hppa.c: Include alloca-conf.h
6460 2000-10-11 Alan Modra <alan@linuxcare.com.au>
6462 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
6464 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6466 2000-10-10 Alan Modra <alan@linuxcare.com.au>
6468 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
6470 2000-10-10 Tom Rix <trix@redhat.com>
6472 * section.c (bfd_make_section_anyway): Release newsect ptr when
6473 newsect->symbol fails to alloc. Use bfd_release instead of free.
6475 2000-10-09 Richard Henderson <rth@cygnus.com
6477 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
6478 (elf64_ia64_unwind_entry_compare): New.
6479 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
6481 2000-10-07 Alan Modra <alan@linuxcare.com.au>
6483 * elflink.h (size_dynamic_sections): Don't create various tags if
6484 .dynstr is excluded from the link. Don't set first dynsym entry
6485 if dynsymcount is zero.
6486 (elf_bfd_final_link): Don't try to swap out dynamic syms if
6487 .dynsym excluded from the link. Don't try to write any dynamic
6488 sections excluded from the link.
6490 * elf.c (swap_out_syms): Handle global section symbols.
6492 2000-10-05 DJ Delorie <dj@redhat.com>
6494 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6495 * coffcode.h (coff_set_alignment_hook): read extended reloc count
6496 (coff_write_relocs): write extended reloc count
6497 (coff_write_object_contents): account for extended relocs
6499 2000-10-05 Jim Wilson <wilson@cygnus.com>
6501 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6503 * elf.c (_bfd_elf_make_section_from_shdr): Call the
6504 elf_backend_section_flags function.
6505 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6507 (elf64_ia64_section_flags): New function containing flag conversion
6509 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6510 * elfxx-target.h (elf_backend_section_flags): Define.
6511 (elfNN_bed): Initialize elf_backend_section_flags field.
6513 2000-10-02 Alan Modra <alan@linuxcare.com.au>
6515 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6516 _bfd_elf32_gc_record_vtable. Correct a comment.
6518 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
6520 From Ralf Baechle <ralf@gnu.org>
6522 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6523 produces binaries with got[1] = 0x80000001 to differenciate them
6524 for the dynamic linker from the broken binaries produced by old
6527 2000-09-30 Petr Sorfa <petrs@sco.com>
6529 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6530 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6531 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6532 * configure: Regenerate.
6534 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
6536 Define two bfd_targets for absence and presence of leading
6537 underscore on symbols. Make sure to only link same kind.
6538 * elf32-cris.c (cris_elf_object_p,
6539 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6540 cris_elf_merge_private_bfd_data): New.
6541 (elf_backend_object_p, elf_backend_final_write_processing,
6542 bfd_elf32_bfd_print_private_bfd_data,
6543 bfd_elf32_bfd_merge_private_bfd_data): Define.
6544 <Target vector definition>: Include elf32-target.h twice with
6545 different macro settings:
6546 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6547 bfd_elf32_us_cris_vec.
6548 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6549 (elf_symbol_leading_char): First as 0, then '_'.
6550 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6551 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6552 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6553 * configure: Regenerate.
6554 * targets.c: Declare bfd_elf32_us_cris_vec.
6555 * po/bfd.pot: Regenerate.
6557 2000-09-29 Momchil Velikov <velco@fadata.bg>
6559 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6560 R_ARM_THM_PC22 relocations.
6562 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
6564 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6566 2000-09-29 Momchil Velikov <velco@fadata.bg>
6568 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6569 is has the SEC_HAS_CONTENTS flag set.
6571 2000-09-28
\81Örjan Friberg <orjanf@axis.com>
6572 Hans-Peter Nilsson <hp@axis.com>
6574 * aout-cris.c (N_TXTADDR): Define.
6576 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
6578 * som.c: Include alloca-conf.h.
6579 * Makefile.am: "make dep-am"
6580 * Makefile.in: Regenerate.
6582 2000-09-27 Alan Modra <alan@linuxcare.com.au>
6584 * elf32-hppa.c (plt_stub): New.
6585 (PLT_STUB_ENTRY): Define.
6586 (elf32_hppa_link_hash_table): Change multi_subspace to packed
6587 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
6588 (elf32_hppa_link_hash_table_create): Init to suit.
6589 (elf32_hppa_check_relocs): Set has_12bit_branch and
6590 has_17bit_branch as appropriate.
6591 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
6592 non-local functions.
6593 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
6594 Add space for plt_stub as needed.
6595 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
6596 functions at plt_stub.
6597 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
6598 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
6600 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
6601 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
6602 of fixed size, and if negative, disable handling of input sections
6603 before stub section. Set up default stub group size depending
6604 on detected branch relocs.
6605 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
6606 ensure different offsets from sym_value aren't rounded to
6607 different 2k blocks. Use lrsel and rrsel for other stubs too for
6608 consistency rather than necessity.
6609 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
6610 (final_link_relocate): Likewise.
6611 (elf32_hppa_relocate_section): Likewise.
6613 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
6614 (_bfd_elf_hppa_gen_reloc_type): Generate them.
6615 (elf_hppa_final_link_relocate): Handle them.
6616 (elf_hppa_relocate_insn): Likewise.
6617 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
6619 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
6621 * elfcode.h (elf_object_p): Preserve and clear abfd section
6622 information. Restore at error.
6624 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
6626 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
6627 is empty, make sure that its rva also 0. NT loader dislikes
6630 2000-09-26 Steve Ellcey <sje@cup.hp.com>
6632 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
6635 2000-09-21 Alan Modra <alan@linuxcare.com.au>
6637 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
6638 currently unused RELATIVE_DYNAMIC_RELOCS code.
6639 (hppa_discard_copies): Likewise.
6640 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
6641 comments. Don't check non-code output sections for stub grouping.
6643 2000-09-20 Alan Modra <alan@linuxcare.com.au>
6645 * section.c (bfd_get_unique_section_name): Return NULL if
6648 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6650 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
6651 instruction sequence to actually work.
6652 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
6655 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
6657 * elf32-sh.c (sh_elf_relocate_section): Use
6658 _bfd_final_link_relocate to apply the relocation against a section
6659 symbol, when doing relocatable links.
6661 2000-09-18 Alan Modra <alan@linuxcare.com.au>
6663 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
6665 (stub_hash_newfunc): Here too.
6666 (hppa_add_stub): And here.
6667 (elf32_hppa_link_hash_table): Remove stub_section_created,
6668 reloc_section_created, first_init_sec and first_fini_sec. Add
6670 (elf32_hppa_link_hash_table_create): Init to suit.
6671 (hppa_get_stub_entry): Add support for grouping stub sections.
6672 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
6673 section code. Index stub vars by section->id.
6674 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
6675 exit paths. Zap allocation of above removed vars. Refine
6678 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6679 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6680 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6681 rather than pointer to bfd_link_info.
6682 (hppa_add_stub): Likewise.
6683 (final_link_relocate): Likewise.
6685 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
6687 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6690 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
6692 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6693 ld/emulparams/shelf.sh.
6695 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6697 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6698 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6699 * bfd-in2.h: Regenerate.
6701 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
6703 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6704 LITUSE relocations incorrectly if -relax is specified on the ld
6705 command line and the displacement field of the load or store
6706 instruction is non-zero. (Patch by paul.winalski@compaq.com)
6708 2000-09-15 Alan Modra <alan@linuxcare.com.au>
6710 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6711 first_fini_sec here.
6712 (elf32_hppa_size_stubs): Instead correctly find the first .init
6713 and .fini section here.
6715 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
6717 * elf32-hppa.c (clobber_millicode_symbols): New function.
6718 (elf32_hppa_size_dynamic_sections): Call it.
6720 2000-09-14 Alan Modra <alan@linuxcare.com.au>
6722 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6723 packed. Add plabel, plt_abs packed booleans.
6724 (hppa_link_hash_newfunc): Init new fields.
6725 (PLABEL_PLT_ENTRY_SIZE): Define.
6726 (hppa_stub_name): Use size_t len vars.
6727 (hppa_add_stub): Likewise.
6728 (elf32_hppa_build_stubs): Likewise.
6729 (hppa_build_one_stub): Kill some compiler warnings.
6730 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6731 if dynamic linking. Munge the local plt offsets into
6732 local_got_refcounts. Set h->plabel for all global PLABELs. Use
6733 size_t len vars. Add assert for plabel addend.
6734 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6735 (elf32_hppa_hide_symbol): New function.
6736 (elf_backend_hide_symbol): Define.
6737 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6738 with h->plabel set. Don't make plt entries to have dynamic syms
6739 when they have been forced local. If plt entry is used by a
6740 plabel, make it PLABEL_PLT_ENTRY_SIZE.
6741 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6742 Set up .plt offsets for local syms.
6743 (elf32_hppa_relocate_section): Initialise plt entries for local
6744 syms. Leave weak undefined plabels zero. Make global plabel
6745 relocs against function symbol, and leave the addend zero.
6746 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6747 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6748 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
6749 relocs instead of SEGREL32 for dynamic got relocs.
6750 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6751 (elf_backend_got_header_size): Adjust.
6752 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6754 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6755 (hppa_type_of_stub): Use it instead of #if 0
6756 (hppa_discard_copies): Use it here too.
6757 (elf32_hppa_size_dynamic_sections): And here.
6759 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6760 (elf32_hppa_link_hash_table_create): And here.
6761 (hppa_build_one_stub): And here. Instead keep track of stub
6762 offset using _raw_size.
6763 (elf32_hppa_size_stubs): Likewise.
6764 (elf32_hppa_build_stubs): Likewise.
6765 (hppa_size_one_stub): Likewise. Resize reloc section too.
6767 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6768 first_fini_sec handling. Don't search for reloc section or set
6769 hplink->reloc_section_created here.
6770 (elf32_hppa_size_stubs): Instead search for reloc sections, and
6771 set reloc_section_created here.
6772 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6773 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6775 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6777 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6778 with `hplink->root.'.
6779 (elf32_hppa_check_relocs): Likewise.
6780 (elf32_hppa_gc_sweep_hook): Likewise.
6781 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6782 (hppa_handle_PIC_calls): Likewise.
6783 (elf32_hppa_size_dynamic_sections): Likewise.
6784 (elf32_hppa_set_gp): Likewise.
6785 (elf32_hppa_relocate_section): Likewise.
6786 (elf32_hppa_finish_dynamic_symbol): Likewise.
6787 (elf32_hppa_finish_dynamic_sections): Likewise.
6789 From David Huggins-Daines <dhd@linuxcare.com>
6790 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6791 defined weak symbols in shared links.
6792 (final_link_relocate): Calls to defined weak symbols in shared
6793 objects must go via import stubs, as the target might not be known
6796 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6798 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6799 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6800 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6801 the original entries with EMPTY_HOWTOs, and added new ones to fill
6803 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6804 (sh_elf_relocate_section): Likewise.
6806 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6808 * cpu-mips.c (arch_info_struct): Add mips:4K
6809 * bfd-in2.h (bfd_mach_mips4K): New define.
6810 * archures.c: Add bfd_mach_mips4K to comment.
6811 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6812 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6814 2000-09-13 Marco Franzen <marcof@thyron.com>
6816 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6817 use size_t as a counter.
6818 (som_write_space_strings): Similarly.
6820 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6822 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6824 (elf32_i860_relocate_section): Invoke new function from here.
6826 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6828 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6831 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6833 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6834 target section name instead of dumping core when the target symbol is
6837 2000-09-09 Kazu Hirata <kazu@hxi.com>
6839 * riscix.c: Remove DEFUN.
6841 2000-09-08 Nick Clifton <nickc@redhat.com>
6843 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6844 initialise flags in output bfd if the input bfd is the default
6845 architecture with the default flags.
6847 2000-09-08 Kazu Hirata <kazu@hxi.com>
6849 * archive.c: Fix formatting.
6850 * coff-arm.c: Likewise.
6851 * doc/chew.c: Likewise.
6853 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6855 * section.c (bfd_get_unique_section_name): Put a dot before the
6858 2000-09-07 Kazu Hirata <kazu@hxi.com>
6860 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6861 * elf.c: Fix formatting.
6863 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6865 * config.bfd (sh-*-linux*): Added.
6866 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6867 * targets.c: Declare them.
6868 * elf32-sh-lin.c: New file.
6869 * Makefile.am: Compile it.
6870 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6871 * configure, Makefile.in: Rebuilt.
6873 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6875 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6876 pseduo-section when determining where the TOC ends.
6878 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6879 output x_tvndx as it is only two bytes wide.
6881 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6882 reloc is 26 or 32 bits wide.
6884 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6885 for relocs that don't change anything. Also look at the full
6888 2000-09-06 Philip Blundell <philb@gnu.org>
6890 * config.bfd (arm*-*-uclinux*): New target.
6892 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6894 * configure: Rebuilt with new libtool.m4.
6896 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6898 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6899 word for variable name.
6900 * bfd-in2.h: Regenerate.
6902 2000-09-05 Nick Clifton <nickc@redhat.com>
6904 * config.in: Regenerate.
6905 * libbfd.h: Regenerate.
6906 * po/bfd.pot: Regenerate.
6907 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6910 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6912 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6914 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6916 Shared library and PIC support.
6917 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6918 (GOT_ENTRY_SIZE): New.
6919 (ELF_DYNAMIC_INTERPRETER): New.
6920 (STUB_SUFFIX): Define.
6921 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6922 (RELATIVE_DYNAMIC_RELOCS): Define.
6923 (enum elf32_hppa_stub_type): New.
6924 (struct elf32_hppa_stub_hash_entry): Rename offset to
6925 stub_offset. Add a number of new fields.
6926 (struct elf32_hppa_link_hash_entry): New.
6927 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6929 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6930 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6931 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6933 (hppa_link_hash_newfunc): New function.
6934 (elf32_hppa_link_hash_table_create): Use above function. Init new
6936 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6937 instead of addend, and remove sym_name from args. Don't use
6938 symbol name for local syms, instead use sym index.
6939 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6940 stub type rather than size. Pass in hash and handle import stub
6941 case. Also pass in reloc instead of offset so we can calculate
6942 PCREL22F and PCREL12F branches properly.
6943 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6944 import and export stubs too.
6945 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6946 import and export stub sizing.
6947 (elf32_hppa_check_relocs): New function.
6948 (elf32_hppa_adjust_dynamic_symbol): New function.
6949 (hppa_discard_copies): New function.
6950 (elf32_hppa_size_dynamic_sections): New function.
6951 (elf_backend_size_dynamic_sections): Define.
6952 (elf32_hppa_finish_dynamic_symbol): New function.
6953 (elf_backend_finish_dynamic_symbol): Define.
6954 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6955 some local vars into the link hash table too. For shared links,
6956 trundle over function syms, generating export stubs. Handle
6957 PCREL22F branches. Break out stub creation code from here..
6958 (hppa_add_stub): .. to here. New function.
6959 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6960 call the bfd linker. Use elf_gp to record global pointer.
6961 Calculate a value from sections if $global$ is missing.
6962 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6963 (elf32_hppa_gc_mark_hook): New function.
6964 (elf_backend_gc_mark_hook): Define.
6965 (elf32_hppa_gc_sweep_hook): New function.
6966 (elf_backend_gc_sweep_hook): Define.
6967 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6968 Add rel to args, and remove howto, input_bfd, offset, addend,
6969 sym_name as we can recalculate these locally. Handle calls to
6970 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6971 handling of undefined weak syms. Check that stubs are in range.
6972 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6973 message on hitting a DPREL21L reloc that needs fixing. Subtract
6974 off PC for PCREL14F. Break out code that does a stub lookup from
6976 (hppa_get_stub_entry): ..to here. New function.
6977 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6978 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6980 (elf32_hppa_finish_dynamic_sections): New function.
6981 (elf_backend_finish_dynamic_sections): Define.
6982 (elf_backend_final_write_processing) Define.
6983 (hppa_handle_PIC_calls): New function.
6984 (elf32_hppa_build_stubs): Call it. Pass link_info to
6985 hppa_build_one_stub.
6986 (elf32_hppa_create_dynamic_sections): New function
6987 to create .plt and .got then set .plt flags correctly.
6988 (elf_backend_create_dynamic_sections): Define.
6989 (elf32_hppa_object_p): New function.
6990 (elf_backend_object_p): Define.
6991 (elf32_hppa_elf_get_symbol_type): New function.
6992 (elf_backend_get_symbol_type): Define.
6993 (elf_backend_can_gc_sections): Define.
6994 (elf_backend_want_got_plt): Define.
6995 (elf_backend_plt_alignment): Set to 2.
6996 (elf_backend_plt_readonly): Define.
6997 (elf_backend_want_plt_sym): Define.
6998 (elf_backend_got_header_size): Reserve one entry.
7000 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
7001 (elf32_hppa_size_stubs): Pass in multi_subspace.
7002 (elf32_hppa_set_gp): Declare.
7004 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
7005 (bfd_get_unique_section_name): New function.
7006 * bfd-in2.h: Regenerate.
7008 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
7009 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
7012 From David Huggins-Daines <dhd@linuxcare.com>
7013 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
7014 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
7015 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
7016 been updated in finish_dynamic_symbol before modifying function
7019 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
7020 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
7021 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
7022 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
7023 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
7024 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
7025 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
7026 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
7028 From David Huggins-Daines <dhd@linuxcare.com>
7029 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
7030 style of local labels as well.
7032 2000-09-03 Philip Blundell <philb@gnu.org>
7034 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
7035 references to undefined symbols in debugging sections.
7037 2000-09-02 H.J. Lu <hjl@gnu.org>
7039 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
7040 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
7041 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
7044 2000-09-02 Jason Eckhardt <jle@cygnus.com>
7046 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
7047 (elf32_i860_is_local_label_name): New function and prototype.
7049 2000-09-02 Nick Clifton <nickc@redhat.com>
7051 * configure.in: Increase version number to 2.10.91.
7052 * configure: Regenerate.
7053 * aclocal.m4: Regenerate.
7054 * config.in: Regenerate.
7055 * po/bfd.pot: Regenerate.
7057 2000-09-02 Daniel Berlin <dberlin@redhat.com>
7059 * elf.c (_bfd_elf_make_section_from_shdr): Add
7060 .gnu.linkobce.wi. to the list of debug section names.
7062 2000-09-02 Nick Clifton <nickc@redhat.com>
7064 * dwarf2.c (find_debug_info): New function: Locate a section
7065 containing dwarf2 debug information.
7066 (bfd_dwarf2_find_nearest_line): Find all sections containing
7067 debug information and include them in the stash.
7069 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
7071 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
7072 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
7073 (sh_reloc_map): Add new relocs.
7074 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
7075 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
7076 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
7077 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
7079 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
7080 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
7081 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
7082 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
7083 New array constants.
7084 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
7086 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
7087 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
7088 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
7089 elf_sh_plt_reloc_offset): Define.
7090 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
7091 elf_sh_link_hash_table): New structs.
7092 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
7093 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
7095 (elf_backend_create_dynamic_sections,
7096 bfd_elf32_bfd_link_hash_table_create,
7097 elf_backend_adjust_dynamic_symbol,
7098 elf_backend_size_dynamic_sections,
7099 elf_backend_finish_dynamic_symbol,
7100 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7101 elf_backend_plt_readonly, elf_backend_want_plt_sym,
7102 elf_backend_got_header_size, elf_backend_plt_header_size):
7104 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
7105 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
7107 * bfd-in2.h, libbfd.h: Rebuilt.
7109 2000-09-01 Alan Modra <alan@linuxcare.com.au>
7111 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
7114 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
7116 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
7117 not initialized, set them to indicate the SH1 instruction set.
7119 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
7121 * acinclude.m4: Include libtool and gettext macros from the
7123 * aclocal.m4, configure: Rebuilt.
7125 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
7127 * elf.c: Eliminate references to __sparcv9 macro; replace with
7128 autoconf variables HAVE_PSINFO32_T etc.
7129 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
7130 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
7132 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
7133 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
7134 * aclocal.m4: Ditto.
7135 * configure: Regenerate.
7137 2000-08-27 Alan Modra <alan@linuxcare.com.au>
7139 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
7140 for any shared link, not just shared -Bsymbolic.
7141 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
7142 any shared link, and pass link info to it.
7143 (elf_i386_size_dynamic_sections): Update comment.
7144 (elf_i386_discard_copies): Modify to discard relocs for symbols
7145 that have been forced local.
7146 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
7147 that have been forced local.
7149 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
7151 * elflink.h (elf_link_add_object_symbols): Allow common
7152 symbols to have an alignment of 1 if explicitly requested, and
7153 not overridden by other definitions.
7155 2000-08-22 Doug Kwan <dkwan@transmeta.com>
7157 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
7158 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
7160 2000-08-22 H.J. Lu <hjl@gnu.org>
7162 * elf-bfd.h (elf_link_hash_table): Add runpath.
7164 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
7165 * bfd-in2.h: Rebuilt.
7167 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
7168 "runpath" field to NULL.
7169 (bfd_elf_get_runpath_list): New function.
7171 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
7174 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
7176 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
7177 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
7178 explicitly. Improve validation of r_type.
7180 2000-08-21 H.J. Lu <hjl@gnu.org>
7182 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
7183 dynamic allocated content space. Add a comment to remind us that
7184 one day this ought to be fixed.
7185 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
7186 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7187 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7189 2000-08-21 Jason Eckhardt <jle@cygnus.com>
7191 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
7192 field with the newly relocated value instead of adding it to the
7193 existing immediate field.
7194 (elf32_i860_relocate_splitn): Likewise.
7195 (elf32_i860_relocate_highadj): Likewise.
7197 2000-08-16 Jason Eckhardt <jle@cygnus.com>
7199 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
7200 was previously just a stub).
7202 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
7204 * elflink.c (_bfd_elf_create_got_section): Don't abort().
7206 (_bfd_elf_create_dynamic_sections): Likewise.
7208 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
7210 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
7211 for undefined symbols to be the beginning of the section.
7213 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
7214 four extra entries at the beginning of the .rela.plt section.
7215 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
7216 section to account for the four reserved entries in the .plt section.
7218 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
7220 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
7221 to the list of NOPs we recognize after a branch-and-link.
7222 Use the ori NOP when one is needed.
7224 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
7227 2000-08-14 Jim Wilson <wilson@cygnus.com>
7229 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
7230 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
7231 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
7234 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
7236 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
7238 2000-08-10 Jason Eckhardt <jle@cygnus.com>
7240 * elf32-i860.c (elf32_i860_relocate_section): New function.
7241 (i860_final_link_relocate): New function.
7242 (elf32_i860_relocate_splitn): New function.
7243 (elf32_i860_relocate_pc16): New function.
7244 (elf32_i860_relocate_highadj): New function.
7245 (elf32_i860_howto): Minor adjustments to some relocations.
7246 (elf_info_to_howto_rel): Define.
7247 (elf_backend_relocate_section): Define.
7249 2000-08-10 Nick Clifton <nickc@cygnus.com>
7251 * elf32-arm.h: Fix formatting.
7253 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
7255 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
7257 2000-08-08 Jason Eckhardt <jle@cygnus.com>
7259 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
7261 2000-08-07 Kazu Hirata <kazu@hxi.com>
7263 * ieee.c (ieee_write_debug_part): Rewrite a comment.
7264 * elf64-ia64.c: Fix a typo.
7266 2000-08-05 Jason Eckhardt <jle@cygnus.com>
7268 * elf32-i860.c (elf32_i860_howto_table): New structure.
7269 (lookup_howto): New function.
7270 (elf32_i860_reloc_type_lookup): New function.
7271 (elf32_i860_info_to_howto_rela): New function.
7272 (elf_code_to_howto_index): New structure.
7273 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
7274 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
7275 elf32_i860_reloc_type_lookup.
7277 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
7279 * som.c (struct fixup_format): Constify `format'.
7280 (som_hppa_howto_table): Use SOM_HOWTO macro.
7281 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
7282 (som_bfd_reloc_type_lookup): Likewise.
7283 (compare_subspaces): Remove unused `count1', `count2'.
7284 (som_begin_writing): Remove unused `total_reloc_size'.
7285 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
7286 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
7287 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
7288 (som_find_nearest_line): Decorate unused parameter(s).
7289 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
7290 (som_bfd_link_split_section): Likewise.
7292 2000-08-03 Nick Clifton <nickc@cygnus.com>
7294 * section.c: Restore backed out code.
7295 * elf.c: Restore backed out code.
7296 (copy_private_bfd_data): Fix bug preventing stipped dynamic
7297 binaries from working.
7298 * bfd-in2.h: Regenerate.
7300 2000-08-03 H.J. Lu <hjl@gnu.org>
7302 * section.c: Back out the change made by Nick Clifton
7303 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
7305 * bfd-in2.h: Likewise.
7308 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
7310 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
7312 2000-07-31 Jason Eckhardt <jle@cygnus.com>
7314 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
7315 * bfd-in2.h, libbfd.h: Regenerate.
7317 2000-07-31 Nick Clifton <nickc@cygnus.com>
7319 * section.c (struct sec): Add new boolean field 'segment_mark'.
7320 (STD_SECTION): Initialise new field to zero.
7322 * bfd-in2.h: Regenerate.
7324 * elf.c (copy_private_bfd_data): Reorganise section to segment
7325 mapping to cope with moved sections requiring new segments,
7326 and overlapping segments.
7327 (SEGMENT_END): New macro: Return the end address of a segment.
7328 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
7329 contains a section by comparing their VMA addresses.
7330 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
7331 contains a section by comparing their LMA addresses.
7332 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
7333 section should be included in a segment.
7334 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
7335 follows another in memory.
7336 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
7339 2000-07-22 Jason Eckhardt <jle@cygnus.com>
7341 * cpu-i860.c: Added comments.
7343 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
7344 bfd_elf32_i860_little_vec.
7345 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
7346 (ELF_MAXPAGESIZE): Changed to 4096.
7348 * targets.c (bfd_elf32_i860_little_vec): Declaration of
7350 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
7352 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
7353 config for little endian elf32 i860.
7354 (targ_defvec): Define for the new config above
7355 as "bfd_elf32_i860_little_vec".
7356 (targ_selvecs): Define for the new config above
7357 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
7359 * configure.in (bfd_elf32_i860_little_vec): Added recognition
7362 * configure: Regenerated.
7364 2000-07-27 H.J. Lu <hjl@gnu.org>
7366 * elflink.h (elf_merge_symbol): Take one more argument,
7367 dt_needed, to indicate if the symbol comes from a DT_NEEDED
7368 entry. Don't overide the existing weak definition if dt_needed
7370 (elf_link_add_object_symbols): Pass dt_needed to
7371 elf_merge_symbol ().
7373 2000-07-27 Nick Clifton <nickc@cygnus.com>
7375 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
7378 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
7380 * configure.host (*-*-aix*): AIX has 'long long' always.
7382 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
7383 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
7384 (xcoff_write_archive_contents_big): Don't update the offset
7385 of the symbol table, xcoff_write_armap will do it.
7387 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
7389 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
7390 of dynobj for SGI_COMPAT checks.
7392 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7394 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
7395 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
7396 * bfd-in2.h: Regenerate.
7398 2000-07-21 Nick Clifton <nickc@cygnus.com>
7400 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
7401 range symbol indices in relocs and issue an error message.
7403 2000-07-20 H.J. Lu <hjl@gnu.org>
7405 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
7406 info->new_dtags when setting DT_FLAGS_1. It will only be set
7407 by the new linker options. It shouldn't break anything.
7409 2000-07-20 H.J. Lu <hjl@gnu.org>
7411 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
7412 only if info->new_dtags is true.
7414 2000-07-20 H.J. Lu <hjl@gnu.org>
7416 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
7417 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
7419 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
7421 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
7422 (ALL_MACHINES_CFILES): Add cpu-cris.c.
7423 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
7424 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
7425 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
7426 * Makefile.in: Rebuild.
7427 * aclocal.m4: Rebuild.
7428 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
7429 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
7430 (bfd_cris_arch): Declare.
7431 (bfd_archures_list): Add bfd_cris_arch.
7432 * bfd-in2.h: Rebuild.
7433 * config.bfd: (cris-*-*): New target.
7434 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
7435 * configure: Rebuild.
7436 * elf.c (prep_headers): Add bfd_arch_cris.
7437 * libbfd.h: Rebuild.
7438 * libaout.h (enum machine_type): Add M_CRIS.
7439 * reloc.c: Add CRIS relocations.
7440 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
7441 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
7442 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
7443 * po/POTFILES.in, po/bfd.pot: Regenerate.
7445 2000-07-19 H.J. Lu <hjl@gnu.org>
7447 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
7448 DF_TEXTREL if DT_TEXTREL is set.
7449 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7450 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7451 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
7452 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
7453 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
7454 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7455 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
7456 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7457 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
7458 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
7460 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
7461 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
7463 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
7465 2000-07-19 H.J. Lu <hjl@gnu.org>
7467 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
7468 * bfd-in2.h: Rebuild.
7470 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
7471 (elf_dt_soname): New.
7473 * elf.c (bfd_elf_set_dt_needed_soname): New.
7475 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
7476 entry if the shared object loaded by DT_NEEDED is used to
7477 resolve the reference in a regular object.
7479 2000-07-19 H.J. Lu <hjl@gnu.org>
7481 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
7482 DT_DEPAUDIT and DT_AUDIT as strings.
7484 2000-07-19 Nick Clifton <nickc@cygnus.com>
7486 * format.c: Fix formatting.
7488 2000-07-19 H.J. Lu <hjl@gnu.org>
7490 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
7492 2000-07-19 H.J. Lu <hjl@gnu.org>
7494 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
7495 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
7496 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
7497 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
7498 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
7499 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
7500 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
7502 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
7504 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
7505 renamed functions from here...
7506 (assign_section_numbers): Use renamed functions.
7507 (prep_headers): Use renamed functions.
7509 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
7510 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
7511 * bfd-in2.h: Regenerate.
7513 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
7515 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
7516 parenthesis in if statement.
7518 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
7520 Enable the support for Traditional MIPS.
7521 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
7522 return ict_none appropriately for traditional mips targets.
7523 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
7524 (STUB_MOVE): Conditionalize for traditonal mips.
7525 (STUB_LI16): Likewise.
7526 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
7527 room for RTPROC header.
7528 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
7529 the permission for the PT_DYNAMIC as read, write and execute.
7530 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
7531 for traditonal mips.
7532 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
7533 _DYNAMIC_LINKING for traditonal mips.
7534 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
7535 in case of traditonal mips.
7536 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
7537 entry is required. For a function if PLT is not required then set the
7538 corresponding hash table entry to 0.
7539 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
7541 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
7542 shared object set the value to 0.
7543 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
7544 _DYNAMIC_LINKING for traditonal mips.
7545 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
7546 for traditonal mips.
7548 2000-07-15 H.J. Lu <hjl@gnu.org>
7550 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
7552 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
7554 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
7555 out a structure that is BFD_IN_MEMORY.
7557 2000-07-11 Alan Modra <alan@linuxcare.com.au>
7559 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
7560 bfd pointer. Print section id instead of bfd pointer for local
7561 syms. Prefix addend with `+' for global syms as well as local.
7562 Correct calculation of name component lengths.
7563 (elf64_hppa_check_relocs): Update call to get_dyn_name.
7565 From David Huggins-Daines <dhd@linuxcare.com>
7566 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
7567 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
7568 (elf64_hppa_modify_segment_map): Likewise.
7570 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7572 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
7573 addresses to be "naturally" sign extended. Return -1 if unknown.
7574 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
7575 * bfd-in2.h: Regenerate.
7577 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7579 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
7580 and ECOF_SIGNED_64 to list ways to extract an offset.
7581 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
7582 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
7584 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
7585 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
7587 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7589 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
7590 bfd_get_start_address.
7591 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
7592 (elf_swap_ehdr_out): Ditto.
7594 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
7596 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
7597 compatibility with older binutils.
7599 2000-07-10 Alan Modra <alan@linuxcare.com.au>
7601 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
7602 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
7604 From Ryan Bradetich <rbradetich@uswest.net>
7605 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
7606 (parse_line_table): Ditto.
7607 (_bfd_dwarf1_find_nearest_line): Ditto.
7608 * syms.c (cmpindexentry): Remove extra `*' from params.
7610 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
7612 * elf32-mips.c (sort_dynamic_relocs): New Function.
7613 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
7614 via qsort to sort the dynamic relocations in increasing r_symndx
7617 2000-07-09 Alan Modra <alan@linuxcare.com.au>
7619 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
7620 ATTRIBUTE_UNUSED to unused args.
7621 (get_opd): Likewise.
7622 (get_plt): Likewise.
7623 (get_dlt): Likewise.
7624 (get_stub): Likewise.
7625 (elf64_hppa_adjust_dynamic_symbol): Likewise.
7626 (elf64_hppa_link_output_symbol_hook): Likewise.
7627 (elf64_hppa_check_relocs): Delete unused var.
7628 (elf64_hppa_size_dynamic_sections): Likewise.
7629 (elf64_hppa_finalize_opd): Likewise.
7630 (elf64_hppa_finalize_dynreloc): Likewise.
7631 (elf64_hppa_modify_segment_map): Likewise.
7632 (elf64_hppa_finish_dynamic_sections): Likewise.
7634 * elf-hppa.h (elf_hppa_final_write_processing): Add
7635 ATTRIBUTE_UNUSED to unused args.
7636 (elf_hppa_final_link_relocate): Likewise.
7637 (elf_hppa_record_segment_addrs): Add paretheses.
7638 (elf_hppa_relocate_section): Constify dyn_name.
7640 From David Huggins-Daines <dhd@linuxcare.com>
7641 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
7642 rearrange case statement so that it gets preferred to 32-bit ones.
7644 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
7645 asection->id instead of address of asection structure.
7646 (elf32_hppa_size_stubs): Likewise.
7648 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
7649 for .init* and .fini*.
7651 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
7652 and addends used in stub names to 32 bits.
7653 (elf32_hppa_size_stubs): Likewise.
7655 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
7656 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
7657 not bfd_put_64. Fix minor comment typo and formatting.
7659 Changes to create multiple linker stubs, positioned immediately
7660 before the section where they are required.
7661 * elf32-hppa.c: Don't include hppa_stubs.h.
7662 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
7663 (elf32_hppa_stub_hash_table): Delete.
7664 (elf32_hppa_link_hash_entry): Delete.
7665 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
7666 stub_hash_table, and store the struct here rather than a pointer.
7667 Delete output_symbol_count. Add offset array. Change
7668 global_value to a bfd_vma.
7669 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
7670 (elf32_hppa_stub_hash_traverse): Delete.
7671 (elf32_hppa_name_of_stub): Delete.
7672 (elf32_hppa_link_hash_lookup): Delete.
7673 (elf32_hppa_link_hash_traverse): Delete.
7674 (elf32_hppa_stub_hash_table_init): Delete.
7675 (elf32_hppa_size_of_stub): Pass input section and offset rather
7676 than location and calculate location here. Don't pass name as all
7677 stubs are now the same size.
7678 (elf32_hppa_stub_hash_newfunc): Init new fields.
7679 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7681 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7682 comparing against ints. Rewrite stub handling code.
7683 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7684 Case enums to int before comparing against ints. Remove
7685 bfd_reloc_dangerous case.
7686 (elf32_hppa_build_one_stub): Rewrite.
7687 (elf32_hppa_size_one_stub): New function.
7688 (elf32_hppa_build_stubs): Rewrite.
7689 (elf32_hppa_size_stubs): Pass in linker call-back functions.
7690 Rewrite stub-handling specific code.
7692 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7694 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7696 * hppa_stubs.h: Delete.
7697 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7698 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7699 * Makefile.in: Regenerate.
7701 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7704 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7706 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7707 and section name for bfd_reloc_notsupported error message.
7708 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7709 bfd_reloc_notsupported.
7710 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7712 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7713 undefined weak symbols for all relocs.
7714 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7715 offsets are relative to one past the delay slot.
7716 (elf32_hppa_size_stubs): Account for reloc addend when calculating
7717 branch destination. Put addend into stub name too.
7718 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7719 adjust by 8 when deciding whether a linker stub is needed. Put
7720 addend into stub name as for above.
7722 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7723 various args and vars.
7724 (elf32_hppa_bfd_final_link_relocate): Here too.
7725 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
7726 inner block var to avoid shadowing.
7728 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
7730 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7731 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7732 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7734 * libhppa.h: Change practically all unsigned ints to plain ints.
7735 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
7738 From Ryan Bradetich <rbradetich@uswest.net>
7739 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7740 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7742 From David Huggins-Daines <dhd@linuxcare.com>
7743 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7744 to the new OP_* ones.
7746 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7747 error exit. Bail out earlier on plabel relocs that we aren't
7748 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
7749 string, and then don't free our copy.
7750 (elf32_hppa_build_one_stub): Make insn unsigned int.
7752 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7753 available with BL, not BE and BLE.
7755 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7756 code for elf arg relocs.
7757 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7758 argument with elf_link_hash_entry h. Handle undefined weak
7759 symbols. Move $global$ lookup from here...
7760 (elf32_hppa_relocate_section): ...to here. Return correct error
7761 message for non-handled relocs.
7762 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
7763 wrong test was -0x3ffff to +0x40000.
7765 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7766 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7767 Handle them as such.
7768 (elf_hppa_relocate_insn): Fix a typo.
7770 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7771 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7772 assemble_17, assemble_21): Delete.
7773 Supply defines for all 64 possible opcodes.
7774 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7775 formats. Handle COMICLR.
7776 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7779 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7780 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7781 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7783 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7784 the local syms - did this code get deleted accidentally? Ignore
7785 undefined and undefweak syms.
7787 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7788 block. Use it instead of elf64_hppa_hash_table (info).
7789 (elf_hppa_final_link_relocate): Use hppa_info instead of
7790 elf64_hppa_hash_table (info).
7792 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7793 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7794 (hppa_rebuild_insn): Mask immediate bits here instead.
7795 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7797 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7799 * section.c (struct sec): Add id field. Tidy comment formatting.
7800 (bfd_make_section_anyway): Set id.
7801 (STD_SECTION): Init id too.
7802 Change CONST to const throughout.
7803 * archures.c (bfd_arch_info): Tidy comment.
7804 (bfd_arch_list): Change a CONST to const.
7805 * libbfd-in.h: Tidy comments and replace CONST with const.
7806 * elf-bfd.h: Likewise.
7807 * libbfd.h: Regenerate.
7808 * bfd-in2.h: Regenerate.
7809 * libcoff.h: Regenerate.
7811 2000-07-07 DJ Delorie <dj@redhat.com>
7813 * archive.c (_bfd_write_archive_contents): Add an informative
7816 2000-07-06 Kazu Hirata <kazu@hxi.com>
7818 * srec.c: Fix formatting.
7820 2000-06-05 DJ Delorie <dj@redhat.com>
7824 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7826 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7827 value of PC-relative offsets.
7829 2000-07-03 Jim Wilson <wilson@cygnus.com>
7831 * elf64-alpha.c (alpha_elf_size_info): New.
7832 (elf_backend_size_info): Define to alpha_elf_size_info.
7833 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7835 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7837 * elf32-mips.c: Include elf32-target.h again for the traditional
7840 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7842 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7843 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7844 (avr_info_to_howto_rela): Likewise.
7845 (elf32_avr_gc_mark_hook): Likewise.
7846 (elf32_avr_gc_sweep_hook): Likewise.
7847 (elf32_avr_relocate_section): Likewise.
7849 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7851 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7852 an external symbol for a non-shared, non-relocatable link.
7854 2000-07-03 Nick Clifton <nickc@redhat.com>
7856 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7857 is an external symbol.
7858 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7861 2000-07-03 Kazu Hirata <kazu@hxi.com>
7863 * reloc16.c: Fix formatting.
7865 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7867 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7868 to add a new target for traditional mips i.e
7869 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7870 * configure.in: Likewise.
7871 * configure: Rebuild.
7872 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7874 (bfd_elf32_tradlittlemips_vec): Likewise.
7875 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7876 to see that elfNN_bed does not get redefined even if the target file
7877 is included twice for a chip. See elf32-mips.c.
7879 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7881 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7882 (CLEANFILES): Add DEPA.
7883 * Makefile.in: Regenerate.
7885 2000-06-30 DJ Delorie <dj@cygnus.com>
7887 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7888 can't assume the PE header is at 0x80.
7890 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7892 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7894 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7896 * go32stub.h: Update stub.
7898 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7900 * archures.c (bfd_mach_avr5): Define.
7901 * bfd-in2.h (bfd_mach_avr5): Define.
7902 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7903 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7904 (compatible): Update comment. Add missing test.
7905 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7906 for avr2 and avr4. Simplify 8K wrap code.
7907 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7908 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7910 2000-06-26 Kazu Hirata <kazu@hxi.com>
7912 * coff-h8300.c: Fix formatting.
7913 * cpu-h8300.c: Likewise.
7915 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7917 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7918 for local symbols whose names are unknown.
7920 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7922 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7924 * Makefile.in: Regenerate.
7925 * doc/Makefile.in: Regenerate.
7927 2000-06-20 H.J. Lu <hjl@gnu.org>
7929 * Makefile.am: Rebuild dependency.
7930 * Makefile.in: Rebuild.
7932 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7934 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7935 (elf_backend_copy_indirect_symbol): Map to the new function.
7937 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7939 * archive.c (normalize): Correct pointer comparison when checking
7941 (bfd_bsd_truncate_arname): Likewise.
7942 (bfd_gnu_truncate_arname): Likewise.
7944 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7946 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7947 sections elf_{text,data}_{section,symbol}.
7948 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7949 (_bfd_mips_elf_hide_symbol): New function.
7950 (elf_backend_hide_symbol): Map to the new function.
7951 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7952 definitions of mips_elf_{text,data}_{section,symbol}.
7953 (mips_elf_local_relocation_p): Try to find the direct symbol
7954 based on new check_forced argument.
7955 (mips_elf_calculate_relocation): Use new version of
7956 mips_elf_local_relocation_p.
7957 (mips_elf_relocate_section): Likewise.
7958 (_bfd_mips_elf_relocate_section): Likewise.
7959 (mips_elf_sort_hash_table): Only assert that have enough GOT
7961 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7962 entry if the relocation based on the new external argument.
7963 (mips_elf_create_dynamic_relocation): Assert that we have a
7964 section contents allocated where we can swap out the dynamic
7966 (mips_elf_calculate_relocation): Find the real hash-table entry
7967 correctly by using h->root.root.type. Only create a dynamic
7968 relocation entry if the symbol is defined in a shared library.
7969 Create an external GOT entry for the GOT16 relocation if the
7970 symbol was forced local.
7971 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7972 dynamic index if the symbol was forced local.
7974 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7976 * elf32-mips.c: Fix typos in comments.
7978 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7980 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7983 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7985 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7986 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7987 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7988 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7989 (bfd_elf32_m68hc11_vec): Likewise.
7990 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7991 Supports 68hc11 & 68hc12 at the same time.
7992 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7994 (bfd_elf32_m68hc11_vec): Likewise.
7995 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7996 * archures.c (bfd_m68hc12_arch): Define and register in global list
7997 (bfd_m68hc11_arch): Likewise.
7998 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7999 BFD_RELOC_M68HC11_3B): Define.
8000 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
8001 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
8003 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
8005 * elf_bfd.h (struct elf_backend_data): Add info argument to
8006 elf_backend_hide_symbol.
8007 (_bfd_elf_link_hash_hide_symbol): Likewise.
8008 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
8009 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
8010 * elflink.h (elf_link_add_object_symbols): Likewise.
8011 (elf_link_assign_sym_version): Likewise.
8013 2000-06-18 H.J. Lu <hjl@gnu.org>
8015 * coff-i386.c (coff_i386_reloc): Don't return in case of
8016 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
8017 Compensate PE relocations when linking with non-PE object
8018 files to generate a non-PE executable.
8020 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
8022 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
8023 GOT entries if we're doing a static link or -Bsymbolic link.
8025 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
8027 * elflink.h (elf_link_adjust_relocs): Check for and call backend
8028 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
8030 (elf_link_output_relocs): Likewise.
8031 (elf_reloc_link_order): Likewise.
8033 2000-06-16 Nicholas Duffek <nsd@redhat.com>
8035 * archures.c (enum bfd_architecture): #define constants for
8036 PowerPc and RS6000 machine numbers.
8037 * bfd-in2.h: Regenerate.
8038 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
8039 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
8040 and RS6000 machine numbers using #defined constants from
8042 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
8043 machine numbers using #defined constants from archures.c. Add
8044 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
8045 64-bit words in 620 entry.
8046 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
8048 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
8050 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
8052 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
8053 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
8054 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
8056 2000-06-16 Nicholas Duffek <nsd@redhat.com>
8058 * bfd-in.h (bfd_family_coff): Define.
8059 * bfd-in2.h: Regenerate.
8060 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
8061 coff_find_nearest_line): Check COFFness using bfd_family_coff()
8062 instead of bfd_target_coff_flavour.
8063 * cofflink.c (_bfd_coff_final_link): Likewise.
8064 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
8065 exclude XCOFF files.
8066 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8068 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
8069 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
8070 * xcofflink.c (XCOFF_XVECP): Delete.
8071 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
8072 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
8073 bfd_xcoff_record_link_assignment,
8074 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
8075 check for bfd_target_xcoff_flavour.
8077 2000-06-16 Nicholas Duffek <nsd@redhat.com>
8079 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
8081 (read_hdr): New function.
8082 (rs6000coff_core_p): Store mstsave or __context64 struct instead
8083 of trying to extract individual registers. Set abfd->arch_info
8084 to match the architecture that created the core file.
8085 (rs6000coff_get_section_contents): Delete.
8086 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
8088 2000-06-14 H.J. Lu <hjl@gnu.org>
8090 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
8093 2000-06-13 H.J. Lu <hjl@gnu.org>
8095 * configure: Regenerate.
8097 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
8099 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
8102 2000-06-08 David O'Brien <obrien@FreeBSD.org>
8104 * configure.in (VERSION): Update to show this is the CVS mainline.
8106 2000-06-07 Alan Modra <alan@linuxcare.com.au>
8108 * elf32-d10v.c: Include elf/d10v.h
8109 (enum reloc_type): Delete.
8110 * elf32-d30v.c: Include elf/d30v.h
8111 (enum reloc_type): Delete.
8113 * Makefile.am: Run "make dep-am" to regenerate dependencies.
8114 * Makefile.in: Regenerate.
8116 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
8117 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
8118 move HOWTOs into elf_howto_table.
8119 (R_386_standard, R_386_ext_offset): Define.
8120 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
8121 (elf_i386_reloc_type_lookup): Modify calculation of index into
8122 elf_howto_table since we've removed the padding.
8123 (elf_i386_info_to_howto_rel): Likewise.
8124 (elf_i386_relocate_section): Likewise.
8126 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
8128 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
8130 2000-06-05 H.J. Lu <hjl@gnu.org>
8132 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
8133 an error when seeing an undefined symbol with hidden/internal
8134 attribute. It is handled in *_relocate_section ().
8136 2000-06-05 H.J. Lu <hjl@gnu.org>
8138 * elflink.h (elf_fix_symbol_flags): Follow the link for the
8139 indirect symbol for the ELF_LINK_NON_ELF bit.
8140 (elf_link_output_extsym): Don't output the indirect symbol even
8141 if the ELF_LINK_NON_ELF bit is set.
8143 2000-06-01 J.T. Conklin <jtc@redback.com>
8145 * config.bfd (i[3456]86-*-netbsdelf*): New target.
8146 (i[3456]86-*-netbsdaout*): New target.
8147 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
8148 (i[3456]86-*-openbsd*): Likewise.
8150 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
8152 * trad-core.c: From hpux-core.c, include <dirent.h> or
8153 <sys/ndir.h> when possible.
8155 2000-05-31 Ulrich Drepper <drepper@redhat.com>
8157 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
8158 definitions. We must not assume they are sorted in the file
8159 according to their index numbers.
8161 2000-05-31 Alan Modra <alan@linuxcare.com.au>
8163 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
8164 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
8165 R_PARISC_DIR17F are for absolute branches; Handle them as such.
8167 2000-05-30 Nick Clifton <nickc@cygnus.com>
8169 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
8170 80960CA, 80960MC as valid machine names.
8172 2000-05-30 H.J. Lu <hjl@gnu.org>
8174 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
8175 visibility bits if the symbol is undefined. Correctly handle
8176 weak undefined symbols with hidden and internal attributes.
8178 * elflink.h (elf_link_add_object_symbols): Always turn the
8179 symbol into local if it has the hidden or internal attribute.
8181 2000-05-29 Philip Blundell <philb@gnu.org>
8183 * ppcboot.c: Add packed attribute if compiling with GCC.
8185 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
8187 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
8189 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
8191 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
8192 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
8193 corefile on a 64-bit (Sparc Solaris) host. Also clean up
8196 2000-05-26 Alan Modra <alan@linuxcare.com.au>
8198 * Makefile.am: Update dependencies with "make dep-am"
8199 * Makefile.in: Regenerate.
8201 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
8202 bindtextdomain): Replace defines with those from intl/libgettext.h
8203 to quieten gcc warnings.
8205 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
8207 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
8209 * archive.c (normalize, bfd_bsd_truncate_arname,
8210 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
8211 file names with backslashes.
8213 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
8216 * sysdep.h: Include filenames.h.
8218 2000-05-26 Alan Modra <alan@linuxcare.com.au>
8220 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
8222 2000-05-26 Jakub Jelinek <jakub@redhat.com>
8224 * elf64-sparc.c (sparc64_elf_relax_section): New.
8225 (sparc64_elf_relocate_section): Optimize tail call into branch always
8227 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8228 (elf32_sparc_relax_section): New.
8230 2000-05-26 Jakub Jelinek <jakub@redhat.com>
8232 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
8233 Remove unusued variables.
8234 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
8235 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
8236 previous fix, so that shared libs really don't influence targets
8237 extension mask and memory model.
8239 2000-05-23 H.J. Lu <hjl@gnu.org>
8241 * elf64-alpha.c (elf64_alpha_relocate_section): Check
8242 h->root.other not h->other.
8243 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8245 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
8247 2000-05-23 H.J. Lu <hjl@gnu.org>
8249 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
8250 undefined symbol with the non-default visibility attributes.
8251 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
8252 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8253 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8254 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8255 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8256 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8257 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8258 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8259 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8260 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
8261 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8263 2000-05-22 Richard Henderson <rth@cygnus.com>
8265 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
8266 PCREL22, PCREL64I. Zero size of special relocs.
8267 (elf64_ia64_reloc_type_lookup): Likewise.
8268 (USE_BRL, oor_brl, oor_ip): New.
8269 (elf64_ia64_relax_section): New.
8270 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
8271 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
8272 (elf64_ia64_relocate_section): Likewise.
8273 (bfd_elf64_bfd_relax_section): New.
8274 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
8275 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
8276 * bfd-in2.h, libbfd.h: Regenerate.
8278 2000-05-22 Nick Clifton <nickc@cygnus.com>
8280 * configure.in : Add peigen.lo to MIPS PE targets.
8281 * configure: Regenerate.
8283 2000-05-22 Momchil Velikov <velco@fadata.bg>
8285 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
8286 only if it is known for both input and output bfds. Separate
8287 error message strings as in some languages, it may be necessary
8288 to change more than one place in the string to change between
8291 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
8292 endianess checks, call _bfd_generic_verify_endian_match() instead.
8294 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
8296 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
8298 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
8299 endianess before checking bfd flavours.
8301 2000-05-22 H.J. Lu <hjl@gnu.org>
8303 * elflink.h (elf_link_output_extsym): Clear the visibility
8304 field for symbols not defined locally.
8306 2000-05-18 Alan Modra <alan@linuxcare.com.au>
8308 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
8309 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
8310 (hppa_rebuild_insn): Mask immediate bits here instead.
8311 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
8313 2000-05-18 Momchil Velikov <velco@fadata.bg>
8315 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
8316 relocs for an executable, ensure that they are virtual addresses.
8318 2000-05-18 Jeffrey A Law (law@cygnus.com)
8320 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
8322 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
8323 Rick Gorton <gorton@scrugs.lkg.dec.com>
8325 * elflink.h: Add emitrelocations support: when enabled, relocation
8326 information and relocation sections are put into final output
8327 executables. If the emitrelocations flag is set, do the following:
8328 (elf_bfd_final_link): Emit relocation sections.
8329 (elf_link_input_bfd): Compute relocation section contents.
8330 (elf_gc_sections): Don't clean relocation sections.
8332 2000-05-16 Catherine Moore <clm@cygnus.com>
8334 * som.c (som_decode_symclass): Recognize weak symbols.
8336 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
8338 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
8339 read idata section only from dataoff.
8340 (pe_print_edata): Correctly check for valid eat_member.
8342 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
8344 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
8346 2000-05-14 Philip Blundell <philb@gnu.org>
8348 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
8350 2000-05-12 Alan Modra <alan@linuxcare.com.au>
8352 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
8354 * peigen.c (pe_print_idata): Look for .idata section and print
8355 info even if data directory has zero entries. Read idata section
8356 starting from dataoff, and adjust all data offsets to suit. Cast
8357 all bfd_vma vars to unsigned long before passing to fprintf.
8358 * peigen.c (pe_print_edata): Similarly, look for .edata section
8359 and print info even if data directory has zero entries. Cast
8360 all bfd_vma vars to unsigned long before passing to fprintf.
8362 From Szabolcs Szakacsits <szaka@F-Secure.com>
8363 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
8364 directory size which may be bogus.
8365 * peigen.c (pe_print_edata): Similarly.
8367 2000-05-09 Alan Modra <alan@linuxcare.com.au>
8369 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
8371 (copy_private_bfd_data): Allow for space possibly taken up by elf
8372 headers when calculating segment physical address from lma.
8374 2000-05-08 Alan Modra <alan@linuxcare.com.au>
8376 * versados.c (versados_scan): Init stringlen and pass_2_done.
8378 * trad-core.c (trad_unix_core_file_p): Return
8379 bfd_error_wrong_format rather than bfd_error_file_truncated.
8381 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
8382 add_data_entry. DataDirectory virtual address is relative.
8383 (pe_print_idata): Account for relative DataDirectory virtual
8384 addresses. Don't trash datasize inside POWERPC_LE_PE code.
8385 (pe_print_edata): Similarly.
8387 From Szabolcs Szakacsits <szaka@F-Secure.com>
8388 * peigen.c (dir_names): Add Delay Import Directory.
8389 (pe_print_idata): Always search for bfd section containing
8390 idata address rather than looking up section name. Print this
8391 section name rather than .idata.
8392 (pe_print_edata): Similarly. Also print some fields as %08lx.
8393 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
8396 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
8398 * xcoff.h: Rename to xcoff-target.h
8399 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
8400 * coff-rs6000.c: Ditto.
8401 * coff64-rs6000.c: Ditto.
8402 * coff-pmac.c: Ditto.
8403 * Makefile.in: Regenerate.
8405 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
8407 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
8408 Change U802TOC64MAGIC to U803XTOCMAGIC.
8410 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
8412 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
8413 * bfd-in.h: Prototype bfd_elf_get_arch_size.
8414 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
8416 2000-05-04 Alan Modra <alan@linuxcare.com.au>
8418 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
8420 2000-05-03 Martin v. L
\81öwis <loewis@informatik.hu-berlin.de>
8422 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
8423 hidden and internal symbols.
8424 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
8426 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
8427 assign a PLT or GOT entry to symbols with hidden and
8428 internal visibility.
8430 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
8432 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
8434 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8436 2000-05-02 H.J. Lu <hjl@gnu.org>
8438 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
8441 2000-05-02 Alan Modra <alan@linuxcare.com.au>
8443 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
8444 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
8446 * Makefile.in: Regenerate.
8448 2000-05-01 Jim Wilson <wilson@cygnus.com>
8450 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
8451 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
8452 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
8453 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
8454 * Makefile.in: Rebuild.
8456 2000-05-02 Alan Modra <alan@linuxcare.com.au>
8458 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
8459 doesn't work very well.
8461 * elf-hppa.h (elf_hppa_internal_shdr): Define.
8462 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
8463 Set hdr->s_type to 1 if ARCH_SIZE == 32.
8464 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
8465 (elf_hppa_info_to_howto): Likewise.
8466 (elf_hppa_info_to_howto_rel): Likewise.
8467 (elf_hppa_reloc_type_lookup): Likewise.
8468 (elf_hppa_is_local_label_name): Likewise.
8469 (elf_hppa_fake_sections): Likewise.
8470 (elf_hppa_final_write_processing): Likewise.
8471 (elf_hppa_howto_table): Fully initialise all entries.
8472 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
8473 (elf_hppa_info_to_howto): Likewise.
8474 (elf_hppa_info_to_howto_rel): Likewise.
8475 (elf_hppa_reloc_type_lookup): Likewise.
8476 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
8477 elf_hppa_unmark_useless_dynamic_symbols,
8478 elf_hppa_remark_useless_dynamic_symbols,
8479 elf_hppa_record_segment_addrs, elf_hppa_final_link,
8480 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
8481 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
8482 elf32-hppa.c mess is cleaned up.
8483 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
8484 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
8485 r_field then call hppa_field_adjust inline func with variable
8486 r_field arg, instead call hppa_field_adjust with fixed arg.
8487 In case R_PARISC_PCREL22F, don't set r_field.
8488 (elf_hppa_relocate_insn): Change args and return type to unsigned
8489 int. Call re_assemble_* funcs to do the work.
8491 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
8494 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
8496 (sign_extend): Mask first before sign extending.
8497 (low_sign_extend): Rewrite without condition expression.
8498 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
8499 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
8500 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
8501 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
8502 result as function return value rather than through pointer arg.
8503 Accept unsigned int args, and return unsigned int.
8504 (re_assemble_3): New. Combines function of dis_assemble_3 with
8505 re-assembly of opcode and immediate.
8506 (re_assemble_12): Likewise.
8507 (re_assemble_16): Likewise.
8508 (re_assemble_17): Likewise.
8509 (re_assemble_21): Likewise.
8510 (re_assemble_22): Likewise.
8511 (hppa_field_adjust): Rewrite and document, paying attention to
8512 size of types and signed/unsigned issues.
8513 (get_opcode): Shift before masking.
8514 (FDLW): Rename to FLDW.
8515 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
8516 (hppa_rebuild_insn): Change args and return value to unsigned
8517 int. Make use of re_assemble_*. Correct case 11.
8519 * dep-in.sed: Handle ../opcodes/.
8520 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
8521 elf64-hppa.h, hppa_stubs.h, xcoff.h.
8522 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
8523 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
8524 elfarm-nabi.lo dependencies outside of auto-dependency area.
8525 Regenerate dependencies.
8526 * Makefile.in: Regenerate.
8528 * configure.in (TRAD_HEADER): Test non-null before
8530 * configure: Regenerate.
8532 * reloc.c: Fix mis-spelling in comment.
8534 2000-05-01 Alan Modra <alan@linuxcare.com.au>
8536 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
8537 * vms.c (vms_openr_next_archived_file): Return NULL.
8539 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8541 * coffcode.h Copy changes mistakenly done to libcoff.h in
8544 2000-04-29 Andreas Jaeger <aj@suse.de>
8546 * libbfd-in.h: Correctly check GCC version.
8547 * bfd-in.h: Likewise.
8548 * libhppa.h: Likewise.
8549 * libbfd.h: Regenerate.
8550 * bfd-in2.h: Regenerate.
8552 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8554 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
8555 coffdu-rs6000.{lo,c}.
8556 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
8558 * Makefile.in: Regenerate.
8559 * xcoff.h: New file.
8560 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
8561 * coff-rs6000.c: Move all declarations and defines that are
8562 common to the xcoff backends into xcoff.h
8563 * coff64-rs6000.c: Ditto,
8565 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8567 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
8568 _bfd_coff_force_symnames in strings and
8569 _bfd_coff_debug_string_prefix_length to their default values.
8570 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
8572 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8574 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
8575 _bfd_coff_force_symnames in strings and
8576 _bfd_coff_debug_string_prefix_length to their default values.
8578 2000-04-27 Alan Modra <alan@linuxcare.com.au>
8580 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
8581 Check local_got_refcounts before dereferencing.
8583 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
8584 before deciding we don't need R_PPC_PLT32 relocation.
8585 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
8588 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
8590 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
8592 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
8593 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
8594 (elf_i386_relocate_section): Allow for .plt to go missing.
8595 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
8596 can use a relative reloc for got as elf_i386_relocate_section.
8597 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
8599 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
8601 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
8603 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
8605 * Makefile.am (coff64-rs6000.lo): New rule.
8606 * Makefile.in: Regenerate.
8607 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
8608 xcoff_is_local_label_name, xcoff_rtype2howto,
8609 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
8610 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
8611 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
8612 (NO_COFF_SYMBOLS): Define.
8613 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
8614 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
8616 (MINUS_ONE): New macro.
8617 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
8619 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
8620 coff_SWAP_aux_out): Map to the new functions.
8621 * coff64-rs6000.c: New file.
8622 * libcoff.h (bfd_coff_backend_data): Add new fields
8623 _bfd_coff_force_symnames_in_strings and
8624 _bfd_coff_debug_string_prefix_length.
8625 (bfd_coff_force_symnames_in_strings,
8626 bfd_coff_debug_string_prefix_length): New macros for above fields.
8627 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
8628 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
8629 of using coff_swap_sym_in directly.
8630 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
8631 (coff_set_flags) Set magic for XCOFF64.
8632 (coff_compute_section_file_positions): Add symbol name length to
8633 string section length if bfd_coff_debug_string_prefix_length is
8635 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
8636 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
8637 using coff_swap_lineno_in directly.
8638 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
8639 and _bfd_coff_debug_string_prefix_length fields.
8640 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
8641 symbol names into strings table when
8642 bfd_coff_force_symnames_in_strings is true.
8643 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
8644 SET_RELOC_VADDR): New macros.
8645 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
8646 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
8648 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
8649 changes within RS6000COFF_C specific code.
8650 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
8651 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
8652 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8653 Extend existing hack on target name.
8654 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
8656 * coff-tic54x.c (ticof): Keep up to date with new fields
8657 in bfd_coff_backend_data.
8658 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
8659 targ_selvecs to include rs6000coff64_vec for rs6000.
8660 * configure.in: Add rs6000coff64_vec case.
8661 * cpu-powerpc.c: New bfd_arch_info_type.
8663 2000-04-24 Jeffrey A Law (law@cygnus.com)
8665 * config.bfd: Only disable elf32-hppa vectors, not all of the
8666 BSD and OSF configuration support. Provide (disabled) clauses
8668 * configure.in: Add clause for PA64 support.
8669 * configure: Rebuilt.
8671 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
8672 (bfd_elf64_hppa_vec): Declare.
8674 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8675 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8676 (elf64-hppa.lo): Add dependencies.
8677 * Makefile.in: Rebuilt.
8679 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8681 2000-04-24 Jason Eckhardt <jle@cygnus.com>
8683 * libhppa.h (dis_assemble_16): New function.
8684 (pa_arch): Added pa20w element.
8686 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
8688 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8689 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8690 bfd_elf64_slurp_reloc_table.
8692 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8693 definitions to get external names.
8694 (elf_write_relocs): Renamed from write_relocs and make global.
8695 (elf_slurp_reloc_table): Make global.
8696 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8698 * archive.c (hpux_uid_gid_encode): New function.
8699 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8700 defined and the ID is greater than 99999.
8701 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8702 special uid/gid fields into 32 bit values.
8704 2000-04-21 Matthew Green <mrg@cygnus.com>
8706 * config.bfd: Add NetBSD/sparc64 support.
8708 2000-04-21 Richard Henderson <rth@cygnus.com>
8709 David Mosberger <davidm@hpl.hp.com>
8710 Timothy Wall <twall@cygnus.com>
8711 Jim Wilson <wilson@cygnus.com>
8713 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8714 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8715 (BFD64_BACKENDS): Add elf64-ia64.lo.
8716 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8717 (cpu-ia64.lo, elf64-ia64.lo): New rules.
8718 * Makefile.in: Rebuild.
8719 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8720 (bfd_ia64_arch): Declare.
8721 (bfd_archures_list): Add bfd_ia64_arch.
8722 * bfd-in2.h: Rebuild.
8723 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8724 * configure: Rebuild.
8725 * configure.host: (ia64-*-linux*): New host.
8726 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8727 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8728 * elf.c (prep_headers): Add bfd_arch_ia64.
8729 * libbfd.h: Rebuild.
8730 * reloc.c: Add IA-64 relocations.
8731 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8733 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8734 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8736 2000-04-21 Richard Henderson <rth@cygnus.com>
8738 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8739 contents when performing a partial link.
8740 (bfd_elf_d30v_reloc_21): Likewise.
8742 2000-04-20 H.J. Lu <hjl@gnu.org>
8744 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8745 patch to symbols defined by a shared object.
8746 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8748 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
8751 * dwarf2.c (concat_filename): Avoid string literal concatenation.
8752 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8754 2000-04-11 David Mosberger <davidm@hpl.hp.com>
8756 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8757 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8758 (coff-ia64.lo): Add dependency.
8759 * Makefile.in: Regenerate.
8760 * coff-ia64.c: New file.
8761 * efi-app-ia32.c: Ditto.
8762 * efi-app-ia64.c: Ditto.
8763 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8764 (coff_set_flags): Ditto.
8765 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8766 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8767 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8768 * configure: Regenerate.
8769 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8770 (PUT_OPTHDR_IMAGE_BASE): Ditto.
8771 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8772 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8773 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8774 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8775 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8776 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8777 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8778 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8779 (GET_PDATA_ENTRY): Ditto.
8780 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8781 data_start. Use above macros to read fields that are 64 bit wide for
8782 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8783 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8784 FileAlignment and SectionAlignment to minimum alignment if they
8786 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8787 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8788 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8789 Use above macros to write fields that are 64 bit wide for
8791 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8792 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8793 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8794 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8795 begin address, end address, and unwind info address only. Use
8796 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8798 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8799 HIGH3ADJ relocation names.
8800 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8801 * targets.c: Declare bfd_efi_app_ia32_vec and
8802 bfd_efi_app_ia64_vec.
8803 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8804 bfd_efi_app_ia64_vec.
8806 2000-04-17 Timothy Wall <twall@cygnus.com>
8808 * bfd-in2.h: Add prototypes for tic54x load page access.
8809 * bfd-in.h: Regenerate.
8810 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8811 in customized _set_arch_mach function.
8812 * coffcode.h (coff_set_alignment_hook): Set section load page if
8813 the appropriate macro is defined.
8814 (write_object_contents): Read section load page.
8816 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8818 * elf32-hppa.h: Update copyright date.
8820 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8821 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8823 * elf32-d30v.c (MAX32): Don't use LL suffix.
8824 (MIN32): Define in terms of MAX32.
8825 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8827 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8830 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8832 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8834 * dep-in.sed: Match space before file name, not after.
8835 * Makefile.am: Regenerate dependencies.
8836 * Makefile.in: Regenerate.
8838 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8839 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8840 extend without an if statement.
8842 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8844 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8846 * elf32-mips.c (gprel16_with_gp): Likewise.
8847 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8848 here using -0x40000, not (int)0xfffc0000.
8849 (elf32_hppa_size_of_stub): Likewise.
8851 2000-04-11 Timothy Wall <twall@cygnus.com>
8853 * coff-tic54x.c: Now builds with all targets.
8854 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8855 * Makefile.in: Regenerate.
8856 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8857 unitialized variable.
8859 2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
8861 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8862 --enable-build-warnings option.
8863 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8864 * Makefile.in, configure: Re-generate.
8866 2000-04-07 Nick Clifton <nickc@cygnus.com>
8868 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8869 BFD_RELOC_THUMB_PCREL_BLX.
8871 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8872 R_ARM_XPC25 and R_ARM_THM_PC22.
8874 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8875 R_ARM_XPC25 and R_ARM_THM_XPC22.
8876 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8877 R_ARM_[XPC25|THM_XPC22].
8879 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8880 elf/arm-oabi.h to elf/arm.h
8882 * Makefile.am: Fix dependency for elfarm-oabi.c
8883 * Makefile.in: Regenerate.
8885 * bfd-in2.h: Regenerate.
8886 * libbfd.h: Regenerate.
8888 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8890 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8891 and restore it on failure. Release newly allocated tdata on
8894 2000-04-07 Jim Wilson <wilson@cygnus.com>
8896 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8897 (decode_line_info): Set it. Report error if unit->line_offset is
8898 equal to or larger than it.
8900 2000-04-07 Timothy Wall <twall@cygnus.com>
8902 * targets.c: Added vecs for tic54x.
8903 * reloc.c: Added relocs for tic54x.
8904 * libbfd.h: Regenerated.
8905 * configure: Add TI COFF vecs for tic54x.
8906 * configure.in: Ditto.
8907 * config.bfd (targ_cpu): Recognize new tic54x target.
8908 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8909 * bfd-in2.h: Add tic54x target and relocations.
8910 * Makefile.am, Makefile.in: Add tic54x target.
8911 * archures.c (bfd_archures_list): Add tic54x target.
8912 * coff-tic54x.c: New.
8913 * cpu-tic54x.c: New.
8915 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8917 * elfcore.h (elf_core_file_p): call backend_object_p which
8918 thereby gets an opportunity to update the arch/machine type.
8920 2000-04-06 Timothy Wall <twall@cygnus.com>
8922 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8923 class. Handle SEC_CLINK and SEC_BLOCK flags.
8924 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8925 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8927 2000-04-06 Nick Clifton <nickc@cygnus.com>
8929 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8930 EF_INTERWORK if this is an unknown EABI.
8931 (elf32_arm_merge_private_bfd_data): Check EABI version
8932 numbers. Only check EF_xxx flags if the EABI version number
8934 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8935 if the EABI version number is unknown.
8936 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8937 if the EABI version number is unknown.
8939 2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
8941 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8942 BFD_RELOC_SH_LOOP_END.
8943 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8944 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8945 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8946 (sh_elf_reloc_loop): New function.
8947 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8949 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8950 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8951 * bfd-in2.h, libbfd.h: Regenerate.
8953 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8955 * po/bfd.pot: Regenerate.
8957 * Makefile.am: Remove extraneous mkdep comment.
8958 (MKDEP): Use gcc -MM rather than mkdep.
8959 (DEP): Quote when passing vars to sub-make. Add warning
8961 (DEP1): Rewrite for "gcc -MM".
8962 (CLEANFILES): Add DEP2.
8963 Update dependencies.
8964 * Makefile.in: Regenerate.
8966 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8968 * configure.in: Added corefile support for AIX 4.3. In particular,
8969 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8970 compiling rs6000-core.c.
8971 * configure: Regenerated.
8973 2000-04-03 H.J. Lu <hjl@gnu.org>
8975 * cache.c (bfd_open_file): Unlink the output file only if
8976 it has non-zero size.
8978 2000-04-01 Ken Block USG <block@zk3.dec.com>
8980 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8981 relative relocations for non-loaded sections in shared objects.
8982 (elf64_alpha_check_relocs): Similarly.
8984 2000-04-03 Hans-Peter Nilsson <hp@axis.com>
8986 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8987 BFD_RELOC_16 to switch for extended relocs.
8988 (MY_swap_ext_reloc_in): New.
8989 (MY_swap_ext_reloc_out): New.
8990 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8991 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8992 (NAME(aout,squirt_out_relocs)): Similarly use
8993 MY_swap_ext_reloc_out.
8994 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8996 2000-04-03 Kazu Hirata <kazu@hxi.com>
8998 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8999 the R_PCRWORD_B case.
9001 2000-03-31 Thomas de Lellis <tdel@wrs.com>
9003 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
9007 2000-03-30 Donald Lindsay <dlindsay@cygnus.com>
9009 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
9010 HOWTO references to bfd_elf_generic_reloc, that have
9011 partial_inplace == true, now use the new function. The function
9012 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
9013 extends its fixes to the R_M32R_{16,24,32} relocs.
9014 The new logic in m32r_elf_lo16_reloc() has been removed, and
9015 it instead calls the new routine to obtain that functionality.
9017 2000-03-27 Alan Modra <alan@linuxcare.com.au>
9019 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
9020 elf32_avr_check_relocs, avr_final_link_relocate,
9021 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
9022 elf32_avr_object_p): Add prototypes.
9023 (elf32_avr_gc_mark_hook): Add default for h->root.type.
9024 (bfd_elf_avr_final_write_processing): Make static.
9026 2000-03-27 Denis Chertykov <denisc@overta.ru>
9028 * cpu-avr.c: New file. BFD support routines for AVR architecture.
9029 * archures.c (bfd_architecture): Add AVR architecture.
9030 (bfd_archures_list): Add reference to AVR architecture info.
9031 * elf.c (prep_headers): Handle bfd_arch_avr.
9032 * reloc.c: Add various AVR relocation enums.
9033 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
9035 * Makefile.am: Add support for AVR elf.
9036 * configure.in: Likewise.
9037 * config.bfd: Likewise.
9038 * Makefile.in: Regenerate.
9039 * configure: This too.
9040 * bfd-in2.h: And this.
9041 * libbfd.h: And this.
9043 2000-03-24 H.J. Lu <hjl@gnu.org>
9045 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
9046 (elf64_alpha_find_reloc_at_ofs): Likewise.
9048 2000-03-17 Alan Modra <alan@linuxcare.com.au>
9050 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
9051 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
9052 allowable range used to be -2**(n-1) to 2**n-1.
9053 * reloc.c (_bfd_relocate_contents): Same here. Also replace
9054 "boolean overflow" with "bfd_reloc_status_type flag".
9056 2000-03-14 Doug Evans <dje@casey.transmeta.com>
9058 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
9060 2000-03-14 Kazu Hirata <kazu@hxi.com>
9062 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
9063 of shrinks properly, including the last reloc.
9065 2000-03-13 Kazu Hirata <kazu@hxi.com>
9067 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
9070 2000-03-11 Alan Modra <alan@linuxcare.com.au>
9072 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
9073 a format mismatch rather than an "error" from bfd_read such as
9074 bfd_error_file_truncated.
9076 2000-03-10 Geoff Keating <geoffk@cygnus.com>
9078 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
9079 sign-extension and big-endian compensation for
9080 R_MIPS_64 even in ld -r.
9082 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
9084 * elf32-mips.c (mips_elf_next_relocation): Rename from
9085 mips_elf_next_lo16_relocation, and generalize to look
9086 for any relocation type.
9087 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
9088 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
9089 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
9090 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
9091 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
9092 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
9093 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
9094 (mips_rtype_to_howto): Likewise.
9095 (mips_elf_calculate_relocation): Handle new relocs.
9096 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
9097 are paired. The addend for R_MIPS_GNU_REL16_S2
9098 is shifted right two bits.
9100 2000-03-10 Alan Modra <alan@linuxcare.com.au>
9102 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
9103 comment, and ensure it doesn't happen again.
9104 (bfd_install_relocation): Same here.
9105 (_bfd_relocate_contents): Don't bother assigning unused signmask
9106 shift result. Fix typos in comments.
9107 Remove trailing whitespace throughout file.
9109 2000-03-07 Doug Evans <dje@casey.transmeta.com>
9111 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
9112 * bfd-in2.h: Rebuild.
9114 2000-03-06 Nick Clifton <nickc@cygnus.com>
9116 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
9118 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
9119 (SIZEOF_ILF_STRINGS): Redefine.
9120 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
9121 relative reloc, as opposed to a section relative reloc.
9122 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
9124 Add length of symbol's prefix to string pointer.
9125 Store a pointer to the symbol in the symbol pointer table.
9126 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
9127 Initialise the symbol pointer table.
9128 Store the hint in the Hint/Name table.
9129 Make the jump reloc be symbol realtive, not section relative.
9130 Create an import symbol for imported code.
9132 2000-03-06 Catherine Moore <clm@cygnus.com>
9134 * elf.c (swap_out_syms): Check for null type_ptr.
9136 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
9138 * aout-target.h (MY(write_object_contents)): Remove unused
9139 and unusable "#if CHOOSE_RELOC_SIZE".
9140 * pc532-mach.c (MY(write_object_contents)): Ditto.
9141 * netbsd.h (MY(write_object_contents)): Ditto.
9142 * hp300hpux.c (MY(write_object_contents)): Ditto.
9143 * freebsd.h (MY(write_object_contents)): Ditto.
9144 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
9146 2000-02-29 H.J. Lu <hjl@gnu.org>
9148 * peicode.h (jtab): Make it static.
9150 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
9151 defined and COFF_IMAGE_WITH_PE is not defined.
9152 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
9153 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
9155 2000-03-01 Nick Clifton <nickc@cygnus.com>
9157 * coff-arm.c (bfd_arm_process_before_allocation): Make
9158 'symndx' signed to prevent compile time warning.
9160 * coff-mcore.c: Remove unused prototype for pe_object_p.
9162 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
9163 functions that are not used when COFF_IMAGE_WITH_PE is
9165 (struct sh_opcode): Change type of 'flags' field to unsigned
9166 long so that it can hold the USESAS flag.
9168 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
9170 * elf-m10300.c (mn10300_elf_relax_section): Initialise
9173 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
9175 Remove unusued variables and code.
9176 (elf_backend_add_symbol_hook): Fix prototype.
9178 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
9181 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
9184 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
9186 Remove unusued variables and code.
9187 (elf_backend_add_symbol_hook): Fix prototype.
9189 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
9191 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
9192 to unused function parameter.
9194 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
9196 Use EMPTY_HOWTO to initialise empty howto slots.
9197 Remove unused variables.
9199 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
9201 2000-03-01 H.J. Lu <hjl@gnu.org>
9203 * aoutx.h (aout_link_input_section_std): Pass "true" to
9204 the undefined_symbol callback.
9205 (aout_link_input_section_ext): Likewise.
9206 * bout.c (get_value): Likewise.
9207 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
9208 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
9210 (alpha_relocate_section): Likewise.
9211 * coff-arm.c (coff_arm_relocate_section): Likewise.
9212 * coff-i960.c (coff_i960_relocate_section): Likewise.
9213 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
9214 * coff-mips.c (mips_relocate_section): Likewise.
9215 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
9216 * coff-sh.c (sh_relocate_section): Likewise.
9217 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
9218 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
9219 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
9220 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
9221 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
9222 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9223 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9224 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9225 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9226 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9227 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9228 * elf32-v850.c (v850_elf_relocate_section): Likewise.
9229 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
9230 * elflink.h (elf_link_output_extsym): Likewise.
9231 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
9232 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
9233 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
9235 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
9236 undefined_symbol callback when building shared library with
9237 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
9239 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
9240 * elf32-i386.c (elf_i386_relocate_section): Likewise.
9241 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9242 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
9243 (elf32_mips_get_relocated_section_content): Likewise.
9244 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9245 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9246 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
9247 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9249 2000-02-28 Nick Clifton <nickc@cygnus.com>
9251 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
9252 * Makefile.in: Regenerate.
9254 * configure.in: Add support for mips and sh pe vectors.
9255 * configure: regenerate.
9257 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
9260 * targets.c: Add mips and sh pe vectors.
9262 * libpei.h (coff_final_link_postscript): Only define if not
9265 * coffcode.h: Add support for WinCE magic numbers.
9267 * peigen.c (pe_print_reloc): Update comment and rearrange
9268 appending of newline character.
9270 * peicode.h: Add support for Image Library Format.
9271 (pe_ILF_vars): Structure containing data used by ILF code.
9272 (pe_ILF_make_a_section): New function. Create a section based
9274 (pe_ILF_make_a_reloc): New function. Create a reloc based on
9276 (pe_ILF_make_a_symbol): New function. Create a symbol based
9278 (pe_ILF_save_relocs): New function. Store the relocs created
9279 by pe_ILF_make_a_reloc in a section.
9280 (pe_ILF_build_a_bfd): New function. Create a BFD describing
9282 (pe_ILF_object_p): New function. Return a bfd_target pointer
9284 (pe_bfd_object_p): If an ILF object is detected call
9285 pe_ILF_object_p on it.
9287 * coff-arm.c: Add support for WinCE relocs which are different
9288 from normal ARM COFF relocs.
9289 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
9291 * coff-sh.c: Add support for sh-pe target.
9292 * pe-sh.c: New file. Support code for sh-pe target.
9293 * pei-sh.c: New file. Support code for sh-pe target.
9295 * pe-mips.c: New file. Support code for mips-pe target.
9296 * pei-mips.c: New file. Support code for mips-pe target.
9298 2000-02-27 Jakub Jelinek <jakub@redhat.com>
9300 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
9301 architecture if the object causing the bump is dynamic.
9302 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
9303 and also don't it for memory ordering.
9304 (sparc64_elf_write_relocs): Take src_rela out of the loop.
9306 2000-02-27 Ian Lance Taylor <ian@zembu.com>
9308 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
9309 calling bfd_get_section_size_before_reloc.
9310 (decode_line_info): Likewise.
9311 (_bfd_dwarf2_find_nearest_line): Likewise.
9313 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
9315 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
9316 name of the libtool directory.
9317 * Makefile.in: Rebuild.
9319 2000-02-25 Rodney Brown (RodneyBrown@pmsc.com)
9321 * som.c (SOM_HOWTO): Define.
9322 (som_hppa_howto_table): Use it.
9324 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
9326 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
9328 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
9330 2000-02-24 Catherine Moore <clm@cygnus.com>
9332 * som.c (som_misc_symbol_info): Add field
9334 (som_bfd_derive_misc_symbol_info): Initialize
9336 (som_build_and_write_symbol_table): Keep track
9337 of secondary_def field.
9338 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
9339 if secondary_def field is set.
9340 (som_bfd_ar_write_symbol_stuff): Initialize
9343 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
9345 * dwarf2.c (read_address): Read 16-bits addresses.
9346 (parse_comp_unit): Accept addr_size == 2.
9348 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
9350 * bfd-in.h: Update copyright date.
9352 2000-02-23 Linas Vepstas <linas@linas.org>
9354 * cpu-i370.c: New file.
9355 * elf32-i370.c: New file.
9356 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
9357 (bfd_i370_arch): New.
9358 (bfd_archures_list): Add bfd_i370_arch.
9359 * elf.c (prep_headers): Add bfd_arch_i370.
9360 * Makefile.am: Add support for IBM 370 elf.
9361 * config.bfd: Likewise.
9362 * configure.in: Likewise.
9363 * libbfd.h (bfd_reloc_code_real_names): Likewise.
9364 * reloc.c (bfd_reloc_code_type): Likewise.
9365 * targets.c: Likewise.
9367 * Makefile.in: Regenerate.
9368 * configure: Regenerate.
9369 * bfd-in2.h: Regenerate.
9371 2000-02-22 Ian Lance Taylor <ian@zembu.com>
9373 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
9374 invalid relocation types, and change them to R_386_NONE.
9376 2000-02-22 H.J. Lu <hjl@gnu.org>
9378 * elflink.h (elf_link_add_object_symbols): If a version symbol is
9379 not defined, don't add a second ELF_VER_CHR.
9381 * elflink.h (elf_bfd_final_link): Call output_extsym for global
9382 symbols converted to local symbols even when stripping all
9384 (elf_link_output_extsym): Process global symbols converted to
9385 local symbols even if they are being stripped.
9387 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
9389 * archures.c (bfd_octets_per_byte): Return unsigned int.
9390 (bfd_arch_mach_octets_per_byte): Ditto.
9391 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
9393 * section.c (bfd_get_section_size_before_reloc): Quell signed
9394 vs. unsigned comparison warning.
9395 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
9396 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
9397 change. What was I thinking?
9398 * bfd-in2.h: Regenerate.
9400 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
9401 (elf_gc_sections): Same here.
9402 (elf_gc_common_finalize_got_offsets): And here.
9404 2000-02-21 Ian Lance Taylor <ian@zembu.com>
9406 ELF HPPA doesn't work at present; remove it until it does.
9407 * config.bfd: Comment out setting targ_defvec to
9409 * Makefile.am: Rebuild dependencies.
9410 (BFD32_BACKENDS): Remove elf32-hppa.lo.
9411 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
9412 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
9413 * Makefile.in: Rebuild.
9414 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
9416 2000-02-18 Geoff Keating <geoffk@cygnus.com>
9418 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
9419 is no bfd_free(). Revert bfd_free part of previous change.
9421 2000-02-18 Geoff Keating <geoffk@cygnus.com>
9423 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
9425 (coff_compute_section_file_positions): Use bfd_free to pair
9427 (coff_write_object_contents): Likewise.
9429 * coff-rs6000.c (xcoff_howto_table_16): New variable.
9430 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
9432 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
9434 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
9435 (xcoff_ar_file_hdr_big): New structure.
9436 (SIZEOF_AR_FILE_HDR_BIG): New macro.
9437 (xcoff_ar_hdr_big): New structure.
9438 (SIZEOF_AR_HDR_BIG): New macro.
9439 (xcoff_big_format_p): New macro.
9440 (xcoff_ardata_big): New macro.
9441 (arch_xhdr_big): New macro.
9442 (xcoff_slurp_armap): Handle large archives.
9443 (xcoff_archive_p): Detect large archives.
9444 (xcoff_read_ar_hdr): Handle large archives.
9445 (xcoff_openr_next_archived_file): Handle large archives.
9446 (xcoff_generic_stat_arch_elt): Handle large archives.
9447 (xcoff_write_armap_old): Rename from xcoff_write_armap.
9448 (xcoff_write_armap_big): New function.
9449 (xcoff_write_armap): New function, dispatch to _old or _big.
9450 (xcoff_write_archive_contents_old): Rename from
9451 xcoff_write_archive_contents.
9452 (xcoff_write_archive_contents_big): New function.
9453 (xcoff_write_archive_contents): New function, dispatch to _old or
9456 2000-02-18 Richard Henderson <rth@cygnus.com>
9458 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
9459 and hide_symbol members.
9460 (elf_link_hash_copy_indirect): Remove.
9461 (elf_link_hash_hide_symbol): Remove.
9462 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
9463 and elf_backend_hide_symbol.
9464 (_bfd_elf_link_hash_copy_indirect): Declare.
9465 (_bfd_elf_link_hash_hide_symbol): Declare.
9466 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
9467 (_bfd_elf_link_hash_hide_symbol): Likewise.
9468 (_bfd_elf_link_hash_table_init): Don't init killed members.
9469 * elflink.h (elf_link_add_object_symbols): Use the bed function
9470 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
9471 (elf_link_assign_sym_version): Likewise.
9472 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
9473 (elf_backend_hide_symbol): Likewise.
9474 (elfNN_bed): Update for new members.
9476 2000-02-17 Kevin Buettner <kevinb@redhat.com>
9478 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
9479 STACK_END_ADDR): Define for new core file format.
9480 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
9481 for handling the vagaries of the various core file structures used
9482 by AIX over the years.
9483 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
9484 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
9485 core_dumpx structure.
9487 2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
9489 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
9490 (bfd_mach_sh3_dsp): Likewise.
9491 (bfd_mach_sh4): Reinstate.
9492 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
9493 * bfd-in2.h: Regenerate.
9494 * coff-sh.c (struct sh_opcode): flags is no longer short.
9495 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
9496 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
9497 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
9498 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
9499 (sh_opcodes): No longer const.
9500 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
9501 (sh_insn_uses_reg): Check for USESAS and USESR8.
9502 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
9503 (_bfd_sh_align_load_span): Return early for SH4.
9504 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
9505 Take into account that field b of a parallel processing insn
9506 could be mistaken for a separate insn.
9507 * cpu-sh.c (arch_info_struct): New array elements for
9508 sh2, sh-dsp and sh3-dsp.
9509 Reinstate element for sh4.
9510 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
9511 (SH4_NEXT): Reinstate.
9512 (SH3_NEXT, SH3E_NEXT): Adjust.
9513 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
9514 * elf32-sh.c (sh_elf_set_private_flags): New function.
9515 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
9516 (sh_elf_merge_private_data): New function.
9517 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
9518 (bfd_elf32_bfd_copy_private_bfd_data): Define.
9519 (bfd_elf32_bfd_merge_private_bfd_data): Change to
9520 sh_elf_merge_private_data.
9522 2000-02-13 Richard Henderson <rth@cygnus.com>
9524 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
9525 hide_symbol members.
9526 (elf_link_hash_copy_indirect): New.
9527 (elf_link_hash_hide_symbol): New.
9528 * elflink.h (elf_link_add_object_symbols): Break out copy from
9529 indirect new new symbol to elf.c.
9530 (elf_link_assign_sym_version): Break out privatization of
9531 non-exported symbol to elf.c.
9532 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
9533 (_bfd_elf_link_hash_hide_symbol): New.
9534 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
9536 2000-02-13 Ian Lance Taylor <ian@zembu.com>
9538 * section.c (_bfd_strip_section_from_output): Add info parameter.
9539 If it passed as non-NULL, use it to check whether any input BFD
9540 has an input section which uses this output section. Change all
9542 * bfd-in2.h: Rebuild.
9544 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
9545 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
9547 * bfd-in2.h: Rebuild.
9549 2000-02-10 Timothy Wall <twall@cygnus.com>
9551 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
9552 allow final modifications of swapped-in symbol.
9553 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
9554 * coffcode.h (coff_write_relocs): Use macro
9555 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
9556 symbol index should be set to -1.
9558 2000-02-10 Toshiyasu Morita (toshi.morita@sega.com)
9560 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
9561 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
9562 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
9563 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
9564 sh_insns_uses_or_sets_freg): New functions.
9565 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
9566 * (sh_insns_conflict): Use new functions and new macros to
9567 detect conflicts when two instructions both set same integer registers,
9568 both set same fp register, and both set special register.
9570 2000-02-09 Timothy Wall <twall@cygnus.com>
9572 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
9573 swapping in sections, so that the swapping routines have access to
9576 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
9578 * coff-go32.c: Update comment. Update copyright.
9580 2000-01-27 Thomas de Lellis <tdel@windriver.com>
9582 * syms.c (bfd_decode_symclass)
9583 Two new class characters were added - 'V' and 'v'. The
9584 meaning of 'W' is now restricted to just weak non-object
9585 symbols. This allows differentiation between, for example,
9586 weak functions vs weak objects. nm for example now dumps:
9588 'w' = weak unresolved
9589 'V' = weak global object
9590 'v' = weak unresolved object
9592 (bfd_is_undefined_symclass): New function. Return true if the
9593 given symbol class represents and undefined/unresolved symbol.
9595 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
9598 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
9600 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
9601 STT_ARM_16BIT flag set, but it is not attached to a data object
9602 return STT_ARM_16BIT so that it will be treated as code by the
9605 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
9607 * coff-i386.c (i3coff_object_p): Remove prototype.
9610 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
9611 to name. Update copyright.
9613 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
9614 assignment to avoid warning. Update copyright.
9616 2000-01-24 Robert Lipe (robertl@sco.com)
9618 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
9619 instead of using GNU C extension.
9621 2000-01-21 Nick Clifton <nickc@cygnus.com>
9623 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
9624 amount from a bfd_in_memory structure.
9625 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
9628 2000-01-14 Nick Clifton <nickc@cygnus.com>
9630 * linker.c (default_indirect_link_order): oops - fix incorrectly
9631 applied patch from Tim Wall.
9633 2000-01-13 Timothy Wall (twall@tiac.net>
9635 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
9636 = scnhsz, filhsz, relsz, aoutsz, etc)
9638 * coffswap.h: Ditto.
9640 2000-01-13 Nick Clifton <nickc@cygnus.com>
9642 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
9643 interwork thumb to arm stub.
9645 2000-01-13 Timothy Wall (twall@tiac.net>
9647 * archures.c (bfd_octets_per_byte): New function: Return
9649 (bfd_arch_mach_octets_per_byte): New function: Return target
9652 * section.c: Distinguish between octets and bytes for usage of
9653 _cooked_size, _raw_size, and output_offset. Clarify
9654 description of bfd_set_section_contents.
9656 * bfd-in2.h: Regenerate.
9658 * coffgen.c: Indicate that the offset parameter is in bytes, not
9661 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
9662 where appropriate to get the octet offset when calling
9663 bfd_set_section_contents.
9664 (bfd_coff_reloc_link_order): Ditto.
9666 * linker.c (bfd_generic_reloc_link_order): Ditto.
9667 (_bfd_default_link_order): Ditto.
9669 * reloc.c (bfd_perform_relocation): Distinguish between octets
9670 and bytes. Use octets when indexing into octet data; use bytes
9671 when calculating target addresses.
9672 (bfd_install_relocation): Ditto.
9674 * srec.c (srec_write_section): Ditto.
9676 2000-01-13 Nick Clifton <nickc@cygnus.com>
9678 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9679 3 to 2. This allows 4 byte sized sections, which is necessary for
9680 dlltool to build functioning DLLs.
9682 2000-01-10 Philip Blundell <pb@futuretv.com>
9684 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9685 (arm*-*-conix*): New target.
9687 2000-01-10 Egor Duda <deo@logos-m.ru>
9689 * config.bfd: Include elf32_i386 vector to target list for cygwin
9692 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9693 * configure.in: Test for structure win32_pstatus_t in
9695 * configure: Regenerate.
9697 * elf.c (elfcore_grok_win32pstatus): New function: process
9698 win32_pstatus_t notes in elf core file.
9699 (elfcore_grok_note): Detect win32_pstatus notes.
9701 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9703 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9705 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9706 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9708 For older changes see ChangeLog-9899
9714 version-control: never