1 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
3 * config.bfd (x86_64-*-netbsd*): New target.
4 * configure.in (x86_64-*-netbsd*): Set COREFILE
6 * configure: Regenerated.
8 2002-01-03 Tom Rix <trix@redhat.com>
10 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11 for recent bfd_make_section_anyway change.
13 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
15 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
18 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
20 * configure.in (LINGUAS): Add ja.
21 * configure: Regenerate.
22 * po/ja.po: Import from translation project's web site.
24 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
26 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
27 messages to ease translation into other languages.
29 2001-12-31 Jakub Jelinek <jakub@redhat.com>
31 * elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
32 before looking for .eh_frame_hdr section.
33 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): If
34 .eh_frame_hdr section is being stripped from output, don't do
37 2001-12-27 Tom Rix <trix@redhat.com>
39 * coff-rs6000.c (xcoff_generate_rtinit): Clean data_buffer alloc/free.
40 * coff64-rs6000.c (xcoff64_generate_rtinit): Same.
41 (xcoff_write_archive_contents_big): Rewrite.
42 (xcoff_write_armap_big): Rewrite.
43 (xcoff_write_one_armap_big): Delete.
44 * libxcoff.h : Clean up.
46 2001-12-21 Tom Rix <trix@redhat.com>
48 * xcofflink.c (bfd_xcoff_link_generate_rtinit): New function.
49 Interface to linker for generation of __rtinit.
50 * libxcoff.h (struct xcoff_backend_data_rec): Add new ops to xcoff
51 backend to generate special linker symbol __rtinit.
52 * coff-rs6000.c (bfd_xcoff_backend_data, bfd_pmac_xcoff_backend_data)
54 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data,
55 bfd_xcoff_backend_data): Same.
56 * bfd-in.h: Add bfd_xcoff_link_generate_rtinit.
57 * bfd-in2.h : Regenerate.
59 2001-12-21 Jakub Jelinek <jakub@redhat.com>
61 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
62 R_SPARC_DISP32. Support R_SPARC_PLT32.
63 (sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
64 (elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
65 (elf32_sparc_relocate_section): Likewise.
66 * elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
67 R_SPARC_DISP32. Support R_SPARC_PLT32 and R_SPARC_PLT64.
68 (sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
69 and BFD_RELOC_SPARC_PLT32.
70 (sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
71 (sparc64_elf_relocate_section): Likewise.
72 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
73 * bfd-in2.h, libbfd.h: Rebuilt.
75 2001-12-20 Tom Rix <trix@redhat.com>
77 * coffcode.h (coff_compute_section_file_positions): Add special AIX
78 loader alignment of text section.
80 2001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
82 * config.bfd (mips-dec-netbsd*): Delete alias for mips*el-*-netbsd*.
84 * config.bfd (arm-*-netbsdelf*): Add target.
85 * configure.in: Include netbsd-core.lo for native arm-*-netbsd*.
86 * configure: Regenerate.
88 2001-12-20 Alan Modra <amodra@bigpond.net.au>
90 * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
91 as can happen with a core file, before dereferencing.
93 2001-12-19 Michael Snyder <msnyder@redhat.com>
95 * elf32-i386.c (elf_i386_grok_psinfo): Fix copy-and-paste error:
96 target is i386 (not mips), and size of descdata is 124 (not 128).
98 2001-12-19 Jakub Jelinek <jakub@redhat.com>
100 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
101 is 0, temporarily grow it to minimal CIE size.
102 (_bfd_elf_write_section_eh_frame): If input .eh_frame section would
103 end up empty, build a fake minimal CIE.
105 2001-12-19 Steve Ellcey <sje@cup.hp.com>
107 * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
108 ia64*-*-hpux* target.
109 (bfd_elf64_ia64_hpux_big_vec): Likewise.
111 * configure.in: Ditto.
112 * configure: Regenerate
113 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
114 alloca with bfd_malloc.
115 (get_local_sym_hash): Likewise.
116 (elfNN_hpux_post_process_headers): New function.
117 #include elfNN-target.h again with values for IA64 HP-UX vector.
119 2001-12-18 Michael Snyder <msnyder@redhat.com>
121 * elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
122 sections of corefiles. Also it makes no sense to sort if count == 1.
124 2001-12-18 H.J. Lu <hjl@gnu.org>
126 * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
128 2001-12-18 H.J. Lu <hjl@gnu.org>
130 * elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
132 2001-12-18 H.J. Lu <hjl@gnu.org>
134 * elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
135 (_bfd_mips_elf_copy_private_bfd_data): Removed.
137 * elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
140 * elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
141 (bfd_elf??_bfd_copy_private_bfd_data): Removed.
142 * elf32-m32r.c: Likewise.
143 * elf32-m68k.c: Likewise.
144 * elf32-mcore.c: Likewise.
145 * elf32-mips.c: Likewise.
146 * elf32-ppc.c: Likewise.
147 * elf32-v850.c: Likewise.
148 * elf64-ppc.c: Likewise.
149 * elf64-sparc.c: Likewise.
150 * elfxx-ia64.c: Likewise.
152 * elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
154 * elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
155 to _bfd_elf_copy_private_bfd_data.
157 2001-12-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
159 * elf32-s390 (elf_s390_check_relocs): Pass addend to
161 * elf64-s390 (elf_s390_check_relocs): Likewise.
162 Fix by Andreas Jaeger <aj@suse.de>.
164 2001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
166 * configure.host: Correctly match all NetBSD/mips
169 2001-12-18 matthew green <mrg@eterna.com.au>
171 * config.bfd (m68*-*-netbsdelf*): New target.
172 (m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
173 (m68*-*-netbsdaout*): New alias for m68*-*-netbsd.
175 2001-12-18 Jakub Jelinek <jakub@redhat.com>
177 * elflink.h (size_dynamic_sections): Skip anonymous version tag.
178 (elf_link_assign_sym_version): Don't count anonymous version tag.
180 2001-12-18 Jakub Jelinek <jakub@redhat.com>
182 * elf-eh-frame.c (struct cie): Add make_lsda_relative.
183 (struct eh_cie_fde): Add lsda_encoding, lsda_offset,
185 (read_value, write_value): New.
186 (_bfd_elf_discard_section_eh_frame): Inicialize
187 lsda_encoding, lsda_offset and make_lsda_relative.
188 (_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
189 request no dynamic reloc for LSDA field of FDE.
190 (_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
191 If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
192 or pcrel. Fix address computation for DW_EH_PE_pcrel relocs.
193 Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
194 . might have changed due to deleted FDE or CIEs.
196 2001-12-18 Jakub Jelinek <jakub@redhat.com>
198 * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
200 (_bfd_elf_strtab_finalize): Don't use a hash table for last
201 character chains, instead use an array.
203 2001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
205 * elf.c (elfcore_netbsd_get_lwpid): New function.
206 (elfcore_grok_netbsd_procinfo): New function.
207 (elfcore_grok_netbsd_note): New function.
208 (elfcore_read_notes): Call elfcore_grok_netbsd_note to process
209 NetBSD ELF core file notes.
211 2001-12-18 Alan Modra <amodra@bigpond.net.au>
213 * elfcode.h (struct bfd_preserve): New.
214 (elf_object_p): Replace preserved_* vars with instance of above.
215 Save and restore arch_info pointer rather than arch, mach so that
216 more cases can be restored. Save and restore new section_tail,
217 section_htab structure, and init appropriately. Move "rest of
218 section header" code so that i_shdrp needs no NULL initialisation.
219 Free old section_htab on success.
220 * elfcore.h (elf_core_file_p): Likewise.
222 2001-12-17 Tom Rix <trix@redhat.com>
224 * coffcode.h (sec_to_styp_flags): Add STYP_EXCEPT and STYP_TYPCHK for
227 2001-12-17 Jakub Jelinek <jakub@redhat.com>
229 * elf-bfd.h (elf_discarded_section): Define.
230 * elflink.h (elf_link_input_bfd): Use it.
231 (elf_reloc_symbol_deleted_p): Likewise.
233 * elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
234 overflows for pc relative relocs against discarded sections.
236 2001-12-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
238 * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
239 * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
240 over the last months. Add some code for mips16 handling.
241 (mips_elf64_check_mips16_stubs): New function.
242 (mips_elf64_stub_section_p): Likewise.
243 (mips_elf64_calculate_relocation): Change interface to support mips16.
244 (mips_elf64_perform_relocation): Likewise.
246 2001-12-17 Alan Modra <amodra@bigpond.net.au>
248 Support for more than 64k ELF sections.
249 * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
250 (bfd_elf32_swap_symbol_in): Likewise.
251 (bfd_elf32_swap_symbol_out): Likewise.
252 (bfd_elf64_swap_symbol_in): Likewise.
253 (bfd_elf64_swap_symbol_out): Likewise.
254 (elf_reloc_cookie): Add locsym_shndx field. Make locsyms a PTR.
255 (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
256 symtab_shndx_section.
257 (elf_numsections): Define.
258 (elf_symtab_shndx): Define.
259 * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
260 (bfd_elf_find_section): Likewise.
261 (bfd_section_from_elf_index): Likewise.
262 (bfd_section_from_shdr): Likewise. Handle SHT_SYMTAB_SHNDX.
263 (bfd_section_from_r_symndx): Read symbol shndx extension, and
264 translate st_shndx for > SHN_HIRESERVE.
265 (assign_section_numbers): Skip reserved sections. Assign
266 symtab_shndx_section and elf_numsections. Exclude reserved
267 sections from e_shnum. Set up symtab_shndx_hdr.
268 (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
269 (map_sections_to_segments): Don't map eh_frame_hdr unless required.
270 (assign_file_positions_except_relocs): Use elf_numsections rather
271 than header e_shnum. Skip reserved sections and symtab_shndx_section.
272 (prep_headers): Set name for symtab_shndx_hdr.
273 (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
274 (_bfd_elf_write_object_contents): Likewise. Skip reserved sections.
275 (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
276 first. Use elf_section_data if available. Use elf_numsections.
277 Start scan at index 1.
278 (copy_private_bfd_data ): Comment fixes.
279 (MAP_ONESYMTAB): Define above SHN_HIOS.
280 (MAP_DYNSYMTAB): Likewise.
281 (MAP_STRTAB): Likewise.
282 (MAP_SHSTRTAB): Likewise.
283 (MAP_SYM_SHNDX): New define.
284 (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
285 (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
286 * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
288 (elf_swap_symbol_out): Likewise.
289 (elf_object_p): Set elf_numsections, and use instead of e_shnum.
290 Initialialise reserved elf_elfsections to point at shdr[0]. Remove
291 redundant bfd_release calls.
292 (elf_slurp_symbol_table): Read symbol shndx extension, and use with
293 elf_swap_symbol_in. Translate st_shndx for > SHN_HIRESERVE too.
294 * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
295 extension, and use with elf_swap_symbol_in.
296 (elf_link_record_local_dynamic_symbol): Likewise.
297 (elf_link_add_object_symbols): Likewise. Also translate st_shndx
298 for elf sections > SHN_HIRESERVE.
299 (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
301 (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
302 (elf_bfd_final_link): Allocate the above, and tidy code allocating
303 other buffers. Use elf_numsections instead of e_shnum. Adjust
304 elf_swap_symbol_out calls.
305 (elf_link_output_sym): Swap out symbol shndx extension too.
306 (elf_link_flush_output_syms): And flush them to disk.
307 (elf_link_output_extsym): Use SHN_BAD. Adjust elf_swap_symbol_out
309 (elf_gc_mark): Read symbol shndx extension, and use with
311 (elf_link_input_bfd): Likewise, Translate st_shndx for elf sections
312 > SHN_HIRESERVE too. Use SHN_BAD.
313 (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
314 elf_swap_symbol_in. Translate st_shndx > SHN_HIRESERVE too.
315 (elf_bfd_discard_info): Read symbol shndx extension. Don't attempt
316 to continue after a bfd error.
317 * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
318 Stash them immediately to symtab_hdr->contents rather than later
319 in multiple places. Clean up afterwards. Read symbol shndx
320 extension, and use with swap_symbol_in. Translate SHN_UNDEF,
321 SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
322 sections too. Remove dead code.
323 (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
324 when swapping in symbols. Tidy code adjusting global syms.
325 Don't swap in global syms.
326 (mn10200_elf_symbol_address_p): Likewise. Remove extsyms param.
327 (mn10200_elf_get_relocated_section_contents): Read symbol shndx
328 extension, and use with swap_symbol_in. Rename "size" -> "amt"
329 to maximize code in common with other files. Translate st_shndx
330 for > SHN_HIRESERVE too. Remove dead code.
331 * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
332 Stash them immediately to symtab_hdr->contents rather than later
333 in multiple places. Clean up afterwards. Read symbol shndx
334 extension, and use with swap_symbol_in. Remove dead code.
335 (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
336 (mn10300_elf_symbol_address_p): Likewise.
337 (mn10300_elf_get_relocated_section_contents): Likewise.
338 * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
339 (elf32_h8_relax_delete_bytes): Likewise.
340 (elf32_h8_symbol_address_p): Likewise.
341 (elf32_h8_get_relocated_section_contents): Likewise.
342 * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
343 extension, and use with swap_symbol_in.
344 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
345 * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
346 bfd_elf32_swap_symbol_out.
347 * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
348 elf sections > SHN_HIRESERVE too.
349 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
350 local syms. Read symbol shndx extension, and use with swap_symbol_in.
351 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
352 elf_numsections rather than header e_shnum.
353 * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
354 (sh_elf_relax_delete_bytes): Likewise.
355 (sh_elf_get_relocated_section_contents): Likewise. Only read local
357 * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
358 hold section index. Use elf_numsections rather than e_shnum.
359 Rename "index" -> "indx" to avoid shadowing warning.
360 (v850_elf_add_symbol_hook): Likewise.
361 * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
362 Read symbol shndx extension, and use with swap_symbol_in.
363 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
364 Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
365 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
366 (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
368 * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
369 before calling bfd_section_from_elf_index on local syms.
370 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
371 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
372 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
373 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
374 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
375 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
376 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
377 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
378 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
379 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
380 * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
381 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
382 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
383 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
384 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
385 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
386 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
387 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
388 * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
389 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
390 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
391 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
392 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
394 2001-12-17 Alan Modra <amodra@bigpond.net.au>
396 Hash bfd sections for fast lookup and create.
397 * bfd.c (struct _bfd): Add section_htab, section_tail.
398 * libbfd-in.h (_bfd_delete_bfd): Declare.
399 (bfd_section_hash_newfunc): Declare.
400 * opncls.c (_bfd_new_bfd): Free memory on failure. Init
401 section_htab and section_tail.
402 (_bfd_delete_bfd): New function.
404 (bfd_fdopenr): Likewise.
405 (bfd_openstreamr): Likewise.
406 (bfd_openw): Likewise.
407 (bfd_close): Likewise.
408 (bfd_close_all_done): Likewise.
409 (bfd_release): Comment.
410 * section.c (struct section_hash_entry): New.
411 (bfd_section_hash_newfunc): New function.
412 (section_hash_lookup): Define.
413 (bfd_section_init): New function, split out from
414 bfd_make_section_anyway.
415 (bfd_get_section_by_name): Lookup via hash table.
416 (bfd_get_unique_section_name): Likewise.
417 (bfd_make_section_old_way): Rewrite to use hash table.
418 (bfd_make_section_anyway): Likewise.
419 (bfd_make_section): Likewise. Return NULL for attempts to make
420 BFD_{ABS,COM,UND,IND}_SECTION_NAME.
421 (_bfd_strip_section_from_output): Adjust section_tail if needed.
422 * configure.in: Bump bfd version.
423 * configure: Regenerate.
424 * libbfd.h: Regenerate.
425 * bfd-in2.h: Regenerate.
427 2001-12-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
429 * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
430 (mips_elf64_high): New Function.
431 (mips_elf64_higher): Likewise.
432 (mips_elf64_highest): Likewise.
433 (mips_elf64_info_to_howto_rel): Likewise.
434 (mips_elf64_info_to_howto_rela): Likewise.
435 (mips_elf64_write_rel): Likewise.
436 (mips_elf64_write_rela): Likewise.
437 (mips_elf64_link_hash_newfunc): Likewise.
438 (mips_elf64_hi16_reloc): Likewise.
439 (mips_elf64_higher_reloc): Likewise.
440 (mips_elf64_highest_reloc): Likewise.
441 (mips_elf64_gprel16_reloc): Likewise.
442 (mips_elf64_gprel16_reloca): Likewise.
443 (mips_elf64_literal_reloc): Likewise.
444 (mips_elf64_gprel32_reloc): Likewise.
445 (mips_elf64_shift6_reloc): Likewise.
446 (mips_elf64_got16_reloc): Likewise.
447 (mips_elf64_assign_gp): Likewise.
448 (mips_elf64_final_gp): Likewise.
449 (gprel16_with_gp): Likewise.
450 (mips_elf64_additional_program_headers): Likewise.
451 (mips_elf64_link_hash_table_create): Likewise.
452 (mips_elf64_got_offset_from_index): Likewise.
453 (_mips_elf64_got_info): Likewise.
454 (mips_elf64_sign_extend): Likewise.
455 (mips_elf64_overflow_p): Likewise.
456 (mips_elf64_global_got_index): Likewise.
457 (mips_elf64_sort_hash_table_f): Likewise.
458 (mips_elf64_sort_hash_table): Likewise.
459 (mips_elf64_swap_msym_out): Likewise.
460 (mips_elf64_create_local_got_entry): Likewise.
461 (mips_elf64_local_got_index): Likewise.
462 (mips_elf64_got_page): Likewise.
463 (mips_elf64_got16_entry): Likewise.
464 (mips_elf64_local_relocation_p): Likewise.
465 (mips_elf64_next_relocation): Likewise.
466 (mips_elf64_create_dynamic_relocation): Likewise.
467 (mips_elf64_calculate_relocation): Likewise.
468 (mips_elf64_obtain_contents): Likewise.
469 (mips_elf64_perform_relocation): Likewise.
470 (mips_elf64_relocate_section): Likewise.
471 (mips_elf64_create_dynamic_sections): Likewise.
472 (mips_elf64_adjust_dynamic_symbol): Likewise.
473 (mips_elf64_always_size_sections): Likewise.
474 (mips_elf64_size_dynamic_sections): Likewise.
475 (mips_elf64_finish_dynamic_symbol): Likewise.
476 (mips_elf64_finish_dynamic_sections): Likewise.
477 (mips_elf64_gc_mark_hook): Likewise.
478 (mips_elf64_gc_sweep_hook): Likewise.
479 (mips_elf64_create_got_section): Likewise.
480 (mips_elf64_record_global_got_symbol): Likewise.
481 (mips_elf64_create_msym_section): Likewise.
482 (mips_elf64_allocate_dynamic_relocations): Likewise.
483 (mips_elf64_check_relocs): Likewise.
484 (mips_elf64_output_extsym): Likewise.
485 (mips_elf64_swap_gptab_in): Likewise.
486 (mips_elf64_swap_gptab_out): Likewise.
487 (gptab_compare): Likewise.
488 (mips_elf64_final_link): Likewise.
489 (prev_reloc_addend): Remenber addend of previous parts of a combined
491 (ELF_MIPS_GP_OFFSET): New define.
492 (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
493 (MIPS_FUNCTION_STUB_SIZE): Likewise.
494 (mips_elf64_howto_rel): Fix HOWTO defines.
495 (mips_elf64_howto_rela): Likewise.
496 (mips_elf64_swap_reloca_out): Fix signedness.
497 (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
498 (mips_elf64_be_swap_reloca_in): Likewise.
499 (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
500 (mips_elf64_be_swap_reloca_out): Likewise.
502 2001-12-15 Jakub Jelinek <jakub@redhat.com>
504 * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
505 * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
506 (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
507 sec_info here. Free ehbuf.
508 (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
510 (_bfd_elf_maybe_strip_eh_frame_hdr): New.
511 * elflink.h (size_dynamic_sections): Call it.
513 2001-12-14 Alan Modra <amodra@bigpond.net.au>
515 * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
517 2001-12-13 Jakub Jelinek <jakub@redhat.com>
519 * elf-bfd.h (enum elf_link_info_type): New.
520 (struct bfd_elf_section_data): Remove stab_info and merge_info
521 fields, add sec_info and sec_info_type.
522 (struct elf_obj_tdata): Add eh_frame_hdr field.
523 (_bfd_elf_discard_section_eh_frame): New prototype.
524 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
525 (_bfd_elf_eh_frame_section_offset): Likewise.
526 (_bfd_elf_write_section_eh_frame): Likewise.
527 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
528 * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
529 (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
530 (elf-eh-frame.lo): New.
531 * Makefile.in: Rebuilt.
532 * configure.in (elf): Add elf-eh-frame.lo.
533 * configure: Rebuilt.
534 * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
535 (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
536 (get_program_header_size): Take into account PT_GNU_EH_FRAME
538 (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
539 (_bfd_elf_rel_local_sym): Likewise.
540 (_bfd_elf_section_offset): Likewise. Call
541 _bfd_elf_eh_frame_section_offset too.
542 * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
544 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
545 * elf-eh-frame.c: New file.
546 * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
547 .stab sections. Set sec_info_type, use sec_info instead
548 of merge_info and stab_info.
549 (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
551 (elf_bfd_final_link): Write .eh_frame_hdr section.
552 (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
553 (elf_link_input_bfd): Likewise.
554 Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
555 (elf_bfd_discard_info): Add output_bfd argument.
556 Call _bfd_elf_discard_section_eh_frame and
557 _bfd_elf_discard_section_eh_frame_hdr.
558 (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
560 * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
562 * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
564 2001-12-12 Richard Henderson <rth@redhat.com>
566 * syms.c (_bfd_generic_read_minisymbols): Early return for
567 no symbols. Patch from FreeBSD folk; exact origin unknown.
569 2001-12-11 Alan Modra <amodra@bigpond.net.au>
571 * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
572 and e_shstrndx if out of range.
573 (elf_object_p): Read extended values for e_shnum and e_shstrndx
574 from the first section header. Allocate space in elf_elfsections
575 for reserved sections and set to NULLs.
576 (elf_write_shdrs_and_ehdr): Set overflow fields in first section
577 header. Skip reserved sections in elf_elfsections. Remove
578 duplicate size calculation.
580 2001-12-07 Geoffrey Keating <geoffk@redhat.com>
581 Richard Henderson <rth@redhat.com>
582 Corinna Vinschen <vinschen@redhat.com>
584 * Makefile.am: Add support for xstormy16.
585 * archures.c: Add support for xstormy16.
586 * config.bfd: Add support for xstormy16.
587 * configure.in: Add support for xstormy16.
588 * reloc.c: Add support for xstormy16.
589 * targets.c: Add support for xstormy16.
590 * cpu-xstormy16.c: New file.
591 * elf32-xstormy16.c: New file.
592 * Makefile.in: Regenerated.
593 * bfd-in2.h: Regenerated.
594 * configure: Regenerated.
595 * libbfd.h: Regenerated.
597 2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
599 * elf.c (assign_file_positions_for_segments): Combine sentance
600 fragments into a single sentance in order to permit better
601 translation into foreign languages.
603 2001-12-07 Jim Blandy <jimb@redhat.com>
605 * elf32-s390.c (elf32_s390_grok_prstatus): New function.
606 (elf_backend_grok_prstatus): Define.
608 2001-12-07 Jakub Jelinek <jakub@redhat.com>
610 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
613 2001-12-07 Jakub Jelinek <jakub@redhat.com>
615 * elf.c (_bfd_elf_rela_local_sym): Only call
616 _bfd_merged_section_offset if merge_info is non-NULL.
617 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
618 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
620 * elf32-arm.h (elf32_arm_final_link_relocate): Use
621 _bfd_elf_section_offset.
622 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
623 * elf32-i386.c (elf_i386_relocate_section): Use
624 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
625 * elf32-sh.c (sh_elf_relocate_section): Likewise.
626 * elf32-sparc.c (elf32_sparc_relocate_section): Use
627 _bfd_elf_section_offset.
628 * elf32-cris.c (cris_elf_relocate_section): Likewise.
629 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
630 * elf32-i370.c (i370_elf_relocate_section): Likewise.
631 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
632 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
633 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
634 * elf32-s390.c (elf_s390_relocate_section): Likewise.
635 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
636 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
637 * elf64-s390.c (elf_s390_relocate_section): Likewise.
638 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
639 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
640 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
642 2001-12-07 Alan Modra <amodra@bigpond.net.au>
644 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
645 already forced local.
647 2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
649 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
650 fragmented sentence parts into a whole sentence to permit
651 better translation into foreign languages.
653 2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
655 * configure: Regenerate.
656 * Makefile.in: Regenerate.
658 2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
660 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
661 BFD64_LIBS, make the latter depending on the availability of BFD64.
662 Add archive64.c source file.
663 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
664 and bfd_elf64_archive_write_armap, code from elf64-mips.c
665 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
666 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
667 (mips64*el-*-linux*): Likewise.
668 (mips*el-*-linux*): Likewise. Reorder entries.
669 * configure.in (bfd_libs): Define in dependency of BFD64 and
671 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
672 bfd_elf64_archive_slurp_armap instead.
673 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
676 2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
678 * config.bfd: Remove trailing blanks.
679 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
681 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
683 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
684 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
685 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
686 Disable pointless overflow checking of NONE and 32.
688 2001-12-04 Alan Modra <amodra@bigpond.net.au>
690 * reloc.c (bfd_install_relocation): Correct reloc address test.
691 (bfd_perform_relocation): Formatting fix.
692 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
694 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
696 * configure.in (LINGUAS): Add tr.
697 * configure: Regenerate.
698 * po/tr.po: Import from translation project's web site.
700 2001-12-03 Alan Modra <amodra@bigpond.net.au>
702 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
703 happens to trigger on undefined symbols.
704 (final_link_relocate): Return bfd_reloc_undefined for undefined
706 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
707 if we have already warned about an undefined symbol.
709 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
711 * elf32-mips.c (NEWABI_P): New define.
712 (USE_REL): Remove, replaced by
713 (elf_backend_may_use_rel_p): New define.
714 (elf_backend_may_use_rela_p): Likewise.
715 (elf_backend_default_use_rela_p): Likewise.
716 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
717 Fix some relocation definitions.
718 (elf_mips_howto_table_rela): New RELA relocation definitions for
720 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
721 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
722 (mips_rtype_to_howto): Likewise.
723 (_bfd_mips_elf_relocate_section): Likewise.
724 (_bfd_mips_elf_object_p): Typo.
725 (elf_backend_sign_extend_vma): Reordered together with many other
726 defines nearby to resemble the order of declaration in the header
729 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
731 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
732 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
733 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
734 * elf32-mips.c (mips_reloc_map): Likewise. Replace
735 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
736 * elf64-mips.c (mips_reloc_map): Likewise.
737 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
738 (BFD_RELOC_MIPS_GPREL32): Remove.
740 2001-11-30 H.J. Lu <hjl@gnu.org>
742 * elflink.h (elf_add_default_symbol): New.
743 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
744 to create an indirect symbol from the default for the symbol
745 with the default version if needed.
747 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
749 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
750 if it has already been set by another thread.
752 2001-11-28 Jakub Jelinek <jakub@redhat.com>
754 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
755 (elf64_alpha_relocate_section): Translate local_got_entries
756 for STT_SECTION symbol to SHF_MERGE section the first time
758 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
760 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
761 (get_dyn_sym_info): Use it.
762 (elfNN_ia64_relocate_section): Translate local dyn entries
763 for STT_SECTION symbol to SHF_MERGE section the first time
766 2001-11-27 H.J. Lu <hjl@gnu.org>
768 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
771 2001-11-26 Jeffrey A Law (law@cygnus.com)
773 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
776 2001-11-24 Alan Modra <amodra@bigpond.net.au>
778 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
779 group sizes to accommodate c++.
781 2001-11-23 Jakub Jelinek <jakub@redhat.com>
783 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
784 relocations in non-alloced sections against global symbols
785 defined in shared library being built.
786 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
788 2001-11-23 Jakub Jelinek <jakub@redhat.com>
790 * elf.c (_bfd_elf_rela_local_sym): New.
791 * elflink.h (elf_link_input_bfd): Don't consider empty
792 merged sections as removed in relocation tests.
793 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
794 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
795 against STT_SECTION symbol of SHF_MERGE section.
796 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
797 * elf32-avr.c (elf32_avr_relocate_section): Call
798 _bfd_elf_rela_local_sym.
799 * elf32-cris.c (cris_elf_relocate_section): Likewise.
800 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
801 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
802 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
803 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
804 * elf32-i370.c (i370_elf_relocate_section): Likewise.
805 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
806 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
807 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
808 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
809 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
810 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
811 * elf32-s390.c (elf_s390_relocate_section): Likewise.
812 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
813 * elf32-v850.c (v850_elf_relocate_section): Likewise.
814 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
815 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
816 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
817 * elf64-s390.c (elf_s390_relocate_section): Likewise.
818 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
819 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
820 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
821 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
822 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
823 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
824 * elf32-sh.c (sh_elf_relocate_section): Likewise for
825 !partial_inplace relocs. Handle relocs against STT_SECTION
826 symbol of SHF_MERGE for partial_inplace relocs.
828 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
830 * po/Make-in (distclean): Move SRC-POTFILES.in and
831 BLD-POTFILES.in to maintainer-clean target.
833 2001-11-21 Alan Modra <amodra@bigpond.net.au>
835 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
836 than sym_sec->output_section to detect relocs against discarded
839 2001-11-19 H.J. Lu <hjl@gnu.org>
841 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
842 discarding relocations.
844 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
846 * section.c (bfd_is_const_section): New macro. Return true if the
847 given seciton is one of the special, constant, sections.
848 * bfd-in2.h: Regenerate.
849 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
850 (coff_write_native_symbol): Use bfd_is_const_section.
852 2001-11-19 Alan Modra <amodra@bigpond.net.au>
854 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
856 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
857 millicode syms as candidates for import stubs.
859 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
860 (allocate_PIC_calls): Rename to allocate_plt_static.
861 (allocate_dynrelocs): Move most of code handling .plt entries to..
862 (allocate_plt_static): ..here. Don't drop plabel entries.
864 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
866 * mmo.c: Adjust documentation tags to use texinfo 4 features.
868 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
870 * section.c (bfd_is_const_section): New macro. Return true if the
871 section pointer refers to one of the special, constant sections.
872 * bfd-in2.h: Regenerate.
874 * coffgen.c (coff_count_linenumbers): Only update the line number
875 count in non-special sections.
876 (coff_write_native_symbol): Only update the line number file
877 position in non-special sections.
879 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
881 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
882 local syms from discarded sections. Update comment.
884 2001-11-15 Alan Modra <amodra@bigpond.net.au>
886 * po/SRC-POTFILES.in: Regenerate.
888 * elflink.h (elf_link_input_bfd): Complain about all relocs
889 against local syms from discarded sections. K&R fixes.
890 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
893 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
895 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
896 overflows in the .stab section.
898 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
900 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
901 (bfd_elf64_discard_info): Likewise.
902 * bfd-in2.h: Regenerate.
903 * elf-bfd.h (struct elf_reloc_cookie): New.
904 (struct elf_backend_data): Add elf_backend_discard_info,
905 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
906 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
907 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
908 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
909 (_bfd_elf32_mips_ignore_discarded_relocs): New.
910 (_bfd_elf32_mips_write_section): New.
911 (elf_backend_discard_info): Define.
912 (elf_backend_ignore_discarded_relocs): Define.
913 (elf_backend_write_section): Define.
914 * elfcode.h (elf_bfd_discard_info): Define.
915 (elf_reloc_symbol_deleted_p): Define.
916 * elflink.h (elf_link_input_bfd): Check
917 elf_section_ignore_discarded_relocs. Call
918 bed->elf_backend_write_section if available.
919 (elf_reloc_symbol_deleted_p): New.
920 (elf_bfd_discard_info): New.
921 (elf_section_ignore_discarded_relocs): New.
922 * elfxx-target.h (elf_backend_discard_info): Define.
923 (elf_backend_ignore_discarded_relocs): Define.
924 (elf_backend_write_section): Define.
925 (elfNN_bed): Add elf_backend_discard_info,
926 elf_backend_ignore_discarded_relocs, and
927 elf_backend_write_section.
928 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
929 * libbfd.h: Regenerate.
930 * stabs.c (_bfd_discard_section_stabs): New.
932 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
934 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
935 scheme to get rid of an ugly complicated test.
936 * elf64-s390.c (elf_s390_relocate_section): Likewise.
938 2001-11-14 Andreas Jaeger <aj@suse.de>
940 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
943 2001-11-14 Jakub Jelinek <jakub@redhat.com>
945 * dwarf2.c (struct line_head) [total_length]: Change type to
947 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
948 (struct comp_unit): Add stash and offset_size.
949 (read_8_bytes): Return bfd_vma.
950 (read_indirect_string): New.
951 (read_attribute): Handle DW_FORM_strp.
952 (decode_line_info): Support 64-bit DWARF format.
953 (_bfd_dwarf2_find_nearest_line): Likewise.
954 (parse_comp_unit): Set offset_size and stash.
956 2001-11-13 Keith Walker <keith.walker@arm.com>
958 * dwarf2.c (read_attribute_value): New function to handle
960 (read_attribute): Use it.
962 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
964 * dwarf2.c (decode_line_info): Properly deal with unknown standard
967 2001-11-13 John Marshall <jmarshall@acm.org>
968 Alan Modra <amodra@bigpond.net.au>
970 * section.c (bfd_make_section_anyway): Don't increment section_id
971 and the BFD's section_count if adding the section failed.
972 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
975 2001-11-12 Orjan Friberg <orjanf@axis.com>
977 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
980 2001-11-11 H.J. Lu <hjl@gnu.org>
982 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
983 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
985 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
986 dynstr type to `struct elf_strtab_hash *'.
988 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
990 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
991 size_t. Rename second i to j.
993 2001-11-10 Jeffrey A Law (law@cygnus.com)
995 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
997 2001-11-10 Alan Modra <amodra@bigpond.net.au>
999 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
1000 relocs into shared libs.
1001 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1002 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1003 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1004 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1005 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1006 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1007 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1008 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1009 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1010 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1011 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1012 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1014 * elf.c (bfd_section_from_r_symndx): New function.
1015 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
1016 (struct sym_sec_cache): New.
1017 (bfd_section_from_r_symndx): Declare.
1018 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
1019 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
1020 relocs when relocatable. Don't zero entire reloc, just zero the
1022 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
1023 (elf32_hppa_link_hash_table_create): Init it.
1024 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
1025 syms on a per-section basis as we do for globals.
1026 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
1027 (allocate_dynrelocs): Warning fix.
1028 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
1029 section has been discarded.
1030 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
1032 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
1033 (elf_i386_link_hash_table_create): Init it.
1034 (elf_i386_check_relocs): Track dynamic relocs needed for local
1035 syms on a per-section basis as we do for globals.
1036 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
1038 (allocate_dynrelocs): Warning fix.
1039 (elf_i386_size_dynamic_sections): Don't allocate relocs when
1040 section has been discarded.
1041 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
1043 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
1044 (elf_s390_link_hash_table_create): Init it.
1045 (elf_s390_check_relocs): Track dynamic relocs needed for local
1046 syms on a per-section basis as we do for globals.
1047 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
1049 (allocate_dynrelocs): Warning fix.
1050 (elf_s390_size_dynamic_sections): Don't allocate relocs when
1051 section has been discarded.
1052 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
1054 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
1055 (ppc64_link_hash_table_create): Init it.
1056 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
1057 syms on a per-section basis as we do for globals.
1058 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
1059 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
1060 function. Warning fix.
1061 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
1062 section has been discarded.
1063 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
1065 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
1066 (elf_s390_link_hash_table_create): Init it.
1067 (elf_s390_check_relocs): Track dynamic relocs needed for local
1068 syms on a per-section basis as we do for globals.
1069 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
1071 (allocate_dynrelocs): Warning fix.
1072 (elf_s390_size_dynamic_sections): Don't allocate relocs when
1073 section has been discarded.
1074 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
1077 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
1079 * elf32-s390: Major rework that introduces all recent changes to
1080 the s390 backends. Get a closer match to elf32-i386.
1081 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
1082 Localise vars, and delay setting. Better error reporting, replace
1083 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
1084 symbol is not defined in the regular object file and tread the weak
1085 definition as the normal one. Don't discard relocs for undefweak or
1086 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
1087 test for avoided copy relocs. Reinstate fudge for unresolved relocs
1088 in debugging sections.
1089 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
1090 reloc processing for weakdefs. Remove redundant casts and aborts.
1091 Delay setting of vars until needed. Move creation of dynamic symbols
1092 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
1093 BFD_ASSERT with abort. Discard .plt entries for everything with
1095 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
1096 .got or .relgot here but do it in allocate_dynrelocs. Reference count
1097 possible .plt and .got entries. Don't test input section SEC_READONLY
1098 here to try to avoid copy relocs, and keep dyn_relocs regardless of
1099 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
1100 variables until needed. Remove separate switch stmt for creating .got
1101 section. Initialise local_got_refcounts to 0. Cache pointer to
1102 "sreloc" section in elf_section_data. Tweak condition under which .got
1103 created. Report files with bad relocation section names.
1104 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
1105 have been forced local. Use same test to decide if we can use a
1106 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
1107 comment. Move expressions out of function calls. Replace BFD_ASSERT
1109 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
1110 statement. Replace BFD_ASSERT with abort.
1111 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
1112 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
1113 instead of looking up section names for DT_TEXTREL. Replace
1114 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
1115 Add a comment to remind us that one day this ought to be fixed.
1116 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
1117 (struct elf_s390_link_hash_table): Likewise.
1118 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
1119 rid of unnecessary casts.
1120 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
1121 Remove "section" field.
1122 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1123 Reference count possible .plt entries. Don't deallocate .got and
1125 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
1127 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
1129 (elf_s390_discard_copies): Delete.
1130 (elf_s390_link_hash_traverse): Delete.
1131 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
1132 rather than gc variety).
1133 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
1134 srelplt, sdynbss, srelbss fields.
1135 (elf_s390_link_hash_table_create): Init them.
1136 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1137 (allocate_dynrelocs): New function.
1138 (create_got_section): New function.
1139 (elf_backend_can_refcount): Define.
1140 (elf_backend_copy_indirect_symbol): Define.
1141 (elf_s390_copy_indirect_symbol): New function.
1142 (elf_s390_create_dynamic_sections): New function.
1143 (readonly_dynrelocs): New function.
1144 * elf64-s390.c: Likewise.
1146 2001-11-07 Jakub Jelinek <jakub@redhat.com>
1148 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
1149 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
1150 (elf-strtab.lo): Add rule.
1151 * Makefile.in: Rebuilt.
1152 * configure.in (elf): Add elf-strtab.lo.
1153 * configure: Rebuilt.
1154 * elf-bfd.h (elf_strtab_hash): Forward declare.
1155 (struct elf_link_hash_table): Change dynstr type to
1156 struct elf_strtab_hash *.
1157 (struct elf_obj_tdata): Change strtab_ptr type to
1158 struct elf_strtab_hash *.
1159 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
1160 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
1161 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
1162 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
1163 _bfd_elf_strtab_finalize): New prototypes.
1164 * elf-strtab.c: New file.
1165 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
1166 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
1167 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
1168 when forcing dynamic symbol to local.
1169 (elf_link_create_dynamic_sections): Call
1170 _bfd_elf_strtab_init instead of elf_stringtab_init.
1171 (elf_link_record_local_dynamic_symbol): Likewise, change
1172 dynstr type. Use _bfd_elf_strtab functions instead of
1173 _bfd_stringtab calls.
1174 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
1175 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
1176 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
1177 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
1178 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
1179 dynamic symbol to local.
1180 (elf_link_assign_sym_version): Likewise.
1181 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
1182 _bfd_stringtab_emit.
1183 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
1184 type. Call _bfd_elf_strtab functions instead of
1185 _bfd_stringtab functions.
1186 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1187 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
1188 (elf_fake_sections): Likewise.
1189 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
1190 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
1191 name in the output. Call _bfd_elf_strtab_finalize and
1192 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
1193 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
1194 instead of _bfd_stringtab_size.
1195 (prep_headers): Change shstrtab type.
1196 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
1198 2001-11-07 Alan Modra <amodra@bigpond.net.au>
1200 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
1201 bad symtab segfault. Formatting and warning fixes. Improve
1202 error message for internationalisation.
1204 2001-11-06 H.J. Lu (hjl@gnu.org)
1206 * elflink.h (elf_link_input_bfd): Complain about relocs against
1209 2001-11-03 Alan Modra <amodra@bigpond.net.au>
1211 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
1213 2001-11-02 H.J. Lu <hjl@gnu.org>
1215 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1216 dynamic relocation for symbols defined in regular objects when
1217 creating executables.
1219 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
1221 * configure.in (ALL_LINGUAS): Add "fr".
1222 * configure: Regenerate.
1223 * po/fr.po: New file.
1225 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
1227 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
1229 * som.c (setup_sections): Initialize subspace_sections.
1231 2001-11-02 H.J. Lu (hjl@gnu.org)
1233 * coffgen.c (coff_object_p): Return 0 if the header is too big.
1235 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
1237 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
1238 information. Save bfd arch and mach values. Restore on error.
1240 2001-11-02 Alan Modra <amodra@bigpond.net.au>
1242 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
1243 (allocate_PIC_calls): New function.
1244 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
1245 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
1246 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
1248 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
1250 * elf32-cris.c (cris_elf_grok_prstatus): New function.
1251 (cris_elf_grok_psinfo): New function.
1252 (elf_backend_grok_prstatus): Define.
1253 (elf_backend_grok_psinfo): Define.
1255 2001-11-01 Alan Modra <amodra@bigpond.net.au>
1257 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
1260 2001-10-31 Chris Demetriou <cgd@demetriou.com>
1262 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
1263 relocations properly.
1265 2001-10-31 H.J. Lu <hjl@gnu.org>
1267 * elflink.h (elf_link_output_extsym): Don't clear the visibility
1268 field for relocateable.
1270 2001-11-01 Alan Modra <amodra@bigpond.net.au>
1272 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
1273 .plt relocs in DT_RELASZ.
1275 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
1277 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
1280 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
1282 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
1284 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
1286 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
1287 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
1288 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
1289 Regenerate dependencies.
1290 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
1291 * config.bfd: [BFD64] (mmix-*-*): New case.
1292 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
1293 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
1294 (bfd_mmix_arch): Declare.
1295 (bfd_archures_list): Add bfd_mmix_arch.
1296 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
1297 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
1298 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
1300 * reloc.c: Add MMIX relocations.
1301 * bfd.c (struct _bfd, tdata): Add mmo_data.
1302 * Makefile.in: Regenerate.
1303 * configure: Regenerate.
1304 * libbfd.h: Regenerate.
1305 * bfd-in2.h: Regenerate.
1306 * configure: Rebuild.
1308 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
1310 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
1311 p_paddr of the segment that contains it.
1312 (copy_private_bfd_data): If the LMA for a segment is known, use it
1313 for matching sections to segments.
1314 (assign_file_positions_for_segments): Use the LMA when adjusting
1315 for inter-section alignment padding.
1317 2001-10-29 Kazu Hirata <kazu@hxi.com>
1319 * README: Fix a typo.
1321 2001-10-24 Richard Henderson <rth@redhat.com>
1323 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
1324 timestamp to time_t for ctime.
1326 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
1328 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
1329 unsigned, increasing index.
1331 2001-10-23 H.J. Lu <hjl@gnu.org>
1333 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
1334 m != NULL before accessing it.
1336 2001-10-23 Alan Modra <amodra@bigpond.net.au>
1338 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
1339 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
1340 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
1342 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
1343 (hppa_link_hash_newfunc): Likewise.
1344 (elf32_hppa_finish_dynamic_symbol): Likewise.
1345 (allocate_dynrelocs): Always allocate .got relocs if shared.
1346 (elf32_hppa_relocate_section): Output them too. Similarly
1347 consolidate .plt reloc code, and no longer initialise .plt
1348 when a reloc is output.
1349 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
1350 when no reloc is output.
1352 From Herbert Xu <herbert@gondor.apana.org.au>
1353 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
1354 unreachable branches.
1356 2001-10-22 H.J. Lu <hjl@gnu.org>
1358 * configure.in (WIN32LIBADD): Use -L../libiberty for
1360 * configure: Rebuild.
1362 2001-10-21 H.J. Lu <hjl@gnu.org>
1364 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1365 if shared library is enabled only for Linux hosts.
1366 * configure: Rebuild.
1368 2001-10-21 H.J. Lu <hjl@gnu.org>
1370 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
1371 ../libiberty/Makefile instead of $enable_shared.
1372 * configure: Rebuild.
1374 2001-10-21 H.J. Lu <hjl@gnu.org>
1376 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
1379 2001-10-20 H.J. Lu <hjl@gnu.org>
1381 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
1382 if shared library is enabled.
1383 * configure: Rebuild.
1385 2001-10-20 H.J. Lu <hjl@gnu.org>
1387 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
1389 2001-10-19 H.J. Lu <hjl@gnu.org>
1391 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
1394 2001-10-18 H.J. Lu <hjl@gnu.org>
1396 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
1397 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1399 2001-10-18 Jakub Jelinek <jakub@redhat.com>
1401 * section.c (_bfd_strip_section_from_output): Don't count
1402 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
1404 2001-10-17 Alan Modra <amodra@bigpond.net.au>
1406 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
1407 Elf_Internal_Shdr.contents now that it's no longer a PTR.
1408 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1409 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1410 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1411 * elf32-sh.c (sh_elf_relax_section): Likewise.
1412 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1413 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1414 * elf.c (setup_group): Warning fixes.
1415 * elflink.h (elf_link_sort_relocs): Likewise.
1416 * pdp11.c (slurp_reloc_table): Likewise.
1418 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
1420 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
1423 2001-10-15 H.J. Lu <hjl@gnu.org>
1425 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
1426 for relocations against discarded link-once section.
1428 2001-10-15 Alan Modra <amodra@bigpond.net.au>
1430 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
1431 bfd_reloc_outofrange and similar errors.
1433 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
1434 rather than ind->weakdef.
1435 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1436 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1437 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1438 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1439 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1441 2001-10-15 Alan Modra <amodra@bigpond.net.au>
1442 H.J. Lu <hjl@gnu.org>
1444 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
1445 counts for aliases instead of aborting.
1446 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1447 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1449 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
1450 to -1 for non-function symbols.
1451 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1452 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1453 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1454 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1455 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1456 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
1457 plt.offset instead of plt.refcount when setting to -1.
1459 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
1461 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
1462 like R_ARM_PC24. Include reloc number in error message about
1463 unresolvable relocs.
1465 2001-10-10 Jakub Jelinek <jakub@redhat.com>
1467 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
1468 relocations against the same symbol in .rel{,a}.dyn section.
1470 2001-10-10 Kazu Hirata <kazu@hxi.com>
1472 * aout-encap.c: Fix comment typos.
1473 * aoutx.h: Likewise.
1474 * archive.c: Likewise.
1476 * coff64-rs6000.c: Likewise.
1477 * coffcode.h: Likewise.
1478 * coffgen.c: Likewise.
1479 * cofflink.c: Likewise.
1480 * coff-mips.c: Likewise.
1481 * ecoff.c: Likewise.
1482 * elf32-m32r.c: Likewise.
1483 * libcoff-in.h: Likewise.
1484 * libecoff.h: Likewise.
1485 * libxcoff.h: Likewise.
1486 * nlm32-i386.c: Likewise.
1487 * pdp11.c: Likewise.
1488 * section.c: Likewise.
1491 * bfd-in2.h: Regenerate.
1492 * libcoff.h: Likewise.
1494 2001-10-10 Alan Modra <amodra@bigpond.net.au>
1496 * elf.c (elf_map_symbols): Don't create new section symbols; Use
1497 existing section syms. Update comments.
1498 (copy_private_bfd_data): Formatting fixes.
1499 (elfcore_grok_win32pstatus): Likewise.
1500 (swap_out_syms): Likewise. Remove unnecessary level of braces.
1502 2001-10-09 Alan Modra <amodra@bigpond.net.au>
1504 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1506 (elf_group_name): Define.
1507 (elf_next_in_group): Define.
1508 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1509 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1510 first member section; Instead use elf_next_in_group.
1511 (bfd_section_from_shdr): Likewise.
1512 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
1514 2001-10-09 Alan Modra <amodra@bigpond.net.au>
1516 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1517 "next_in_group". Fix gp and gp_size comments.
1518 * elf.c (union elf_internal_group): New.
1519 (setup_group): New function.
1520 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1521 Call setup_group for SHF_GROUP sections.
1522 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1523 (elf_fake_sections): Set header type for SEC_GROUP, and header
1524 flags for sections in a group.
1525 (set_group_contents): New function.
1526 (_bfd_elf_compute_section_file_positions): Call it.
1527 (assign_section_numbers): Set sh_link for SHT_GROUP.
1529 * elflink.h (gc_mark_hook): Handle section groups.
1530 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1531 * section.c (SEC_GROUP): Define.
1532 (struct sec): Comment fixes.
1533 * bfd-in2.h: Regenerate.
1535 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1536 out of function args.
1537 (_bfd_elf_canonicalize_reloc): Similarly.
1538 (_bfd_elf_get_symtab): Here too.
1539 (_bfd_elf_canonicalize_dynamic_symtab): And here.
1540 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1541 bfd_bread, and remove unnecessary cast.
1543 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
1545 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
1547 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
1549 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1552 2001-10-06 Alan Modra <amodra@bigpond.net.au>
1554 * bfd.c (bfd_assert): Report bfd version.
1555 (_bfd_abort): Likewise.
1557 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1558 section sym values. Instead replace any relocs against them with
1559 relocs against STN_UNDEF, which has a zero value.
1561 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1564 2001-10-05 Jeff Law <law@redhat.com>
1566 * som.h (som_exec_data): New field "version_id".
1567 * som.c (som_object_setup): Record the version_id if it
1569 (som_prep_headers): Do not initialize version_id here.
1570 (som_finish_writing): Initialize version_id here.
1572 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1574 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1575 according to the MIPS/SGI ELF64 ABI Draft.
1576 (mips_elf_sort_hash_table): Typo.
1578 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1580 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1582 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1583 copying flags if this is a weakdef.
1585 2001-10-04 Alan Modra <amodra@bigpond.net.au>
1587 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1590 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1591 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1592 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1594 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
1595 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1596 backends we configure. Run "make dep-am".
1597 (install-data-local): Install symcat.h.
1598 * dep-in.sed: Remove symcat.h from dependencies.
1599 * Makefile.in: Regenerate.
1601 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
1603 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1605 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1607 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1608 (elf_backend_default_use_rela_p): New define.
1610 2001-10-03 Alan Modra <amodra@bigpond.net.au>
1612 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1615 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1616 * configure: Regenerate.
1617 * Makefile.am (BFD_H_FILES): Add version.h.
1618 * Makefile.in: Regenerate.
1619 * po/SRC-POTFILES.in: Regenerate.
1621 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1622 elf_backend_copy_indirect_symbol so that backend has a chance to
1623 copy other necessary fields.
1624 * elf-bfd.h (struct elf_backend_data): Update description of
1625 elf_backend_copy_indirect_symbol.
1626 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1627 copying flags if this is a weakdef.
1628 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1629 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1630 than bfd_link_hash_lookup.
1631 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1632 reloc processing for weakdefs.
1633 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1634 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1636 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1638 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1639 result of ELF64_R_TYPE to enum before using in a switch.
1640 (ppc64_elf_gc_mark_hook): Likewise.
1641 (ppc64_elf_gc_sweep_hook): Likewise.
1642 (ppc64_elf_reloc_type_class): Likewise.
1644 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1646 * version.h: New file.
1647 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1648 (BFD_VERSION_DATE): Define.
1649 (BFD_VERSION_STRING): Define.
1650 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1652 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1653 * bfd-in2.h: Regenerate.
1654 * configure: Regenerate.
1655 * Makefile.am: Run "make dep-am".
1656 * Makefile.in: Regenerate.
1658 * bfd-in.h: Include "symcat.h".
1659 (CONCAT4): Redefine as for old CAT4.
1660 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1661 Add warning regarding whitespace.
1662 * aout-cris.c: Likewise.
1663 * aout-ns32k.c: Likewise.
1664 * aout-sparcle.c: Likewise.
1665 * aout-tic30.c: Likewise.
1666 * aout0.c: Likewise.
1667 * armnetbsd.c: Likewise.
1668 * demo64.c: Likewise.
1669 * elf-bfd.h: Likewise.
1670 * gen-aout.c: Likewise.
1671 * host-aout.c: Likewise.
1672 * hp300bsd.c: Likewise.
1673 * hp300hpux.c: Likewise.
1674 * i386aout.c: Likewise.
1675 * i386bsd.c: Likewise.
1676 * i386dynix.c: Likewise.
1677 * i386freebsd.c: Likewise.
1678 * i386linux.c: Likewise.
1679 * i386lynx.c: Likewise.
1680 * i386mach3.c: Likewise.
1681 * i386netbsd.c: Likewise.
1682 * libaout.h: Likewise.
1683 * m68k4knetbsd.c: Likewise.
1684 * m68klinux.c: Likewise.
1685 * m68klynx.c: Likewise.
1686 * m68knetbsd.c: Likewise.
1687 * m88kmach3.c: Likewise.
1688 * mipsbsd.c: Likewise.
1689 * newsos3.c: Likewise.
1690 * ns32knetbsd.c: Likewise.
1691 * pc532-mach.c: Likewise.
1692 * pdp11.c: Likewise.
1693 * riscix.c: Likewise.
1694 * sparclinux.c: Likewise.
1695 * sparclynx.c: Likewise.
1696 * sparcnetbsd.c: Likewise.
1697 * sunos.c: Likewise.
1698 * targets.c: Likewise.
1699 * vaxnetbsd.c: Likewise.
1700 * vms-hdr.c: Likewise.
1702 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1704 * bfd-in.h: Remove comments regarding generated files.
1705 * libbfd-in.h: Likewise.
1706 * libcoff-in.h: Likewise.
1707 * bfd-in2.h: Regenerate.
1708 * libbfd.h: Likewise.
1709 * libcoff.h: Likewise.
1711 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1712 Hans-Peter Nilsson <hp@bitrange.com>
1714 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1715 partial_inplace, matching assembler output. Set src_mask to
1717 (sh_elf_relocate_section): Delete misplaced comment.
1718 For relocatable linking against section symbol, call
1719 _bfd_relocate_contents for partial_inplace relocs and adjust
1720 rel->r_addend for others.
1721 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1722 bfd_get_32, not at rel->r_addend.
1724 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1726 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1727 the old dir refcount, so we indirectly set them to init_refcount.
1728 Short-circuit asserts when we've just verified they are true.
1730 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1732 * section.c (struct sec): Remove kept_section.
1733 (STD_SECTION): Remove kept_section initialisation.
1734 (bfd_make_section_anyway): Here too.
1735 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1736 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1737 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1738 symbols to zero, and remove all code involved with kept_section
1739 and tracking section symbol values.
1740 * bfd-in2.h: Regenerate.
1741 * configure.in: Bump version number.
1742 * configure: Regenerate.
1744 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1746 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1747 (IS_ABSOLUTE_RELOC): Define.
1748 (struct ppc_link_hash_entry): New.
1749 (struct ppc_link_hash_table): New.
1750 (ppc_hash_table): Define.
1751 (link_hash_newfunc): New function.
1752 (ppc64_elf_link_hash_table_create): New function.
1753 (create_got_section): New function.
1754 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1755 pointers to our dynamic sections in hash table.
1756 (ppc64_elf_copy_indirect_symbol): New function.
1757 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1758 dynamic sections. Localise vars. Modify code for refcounts
1759 starting from zero. Don't allocate here, or force symbols dynamic.
1760 Don't copy all relocs if shared, select ones we need. Add code
1761 to track possible copy relocs for non-shared link.
1762 (ppc64_elf_gc_mark_hook): Update comment.
1763 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1764 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1765 code for reference counting garbage collection. Don't create .plt
1766 entries for functions that don't comply with ABI naming convention,
1767 and don't allocate .plt space here. Use short-cuts to dynamic
1768 sections. If possible, keep dynamic relocations instead of using
1769 copy relocs. Remove confused comments.
1770 (ppc_adjust_dynindx): Delete.
1771 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1772 (allocate_dynrelocs): New function.
1773 (readonly_dynrelocs): New function.
1774 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1775 space here, and call allocate_dynrelocs to allocate space for
1776 global .plt, .got and reloc sections. Use short-cuts to dynamic
1777 sections. Call readonly_dynrelocs to determine whether we need
1778 DT_TEXTREL. Don't generate section symbols here, the generic
1779 ELF linker code does it for us.
1780 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1781 gc variety, since we do our own .got handling.
1782 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1783 dynamic section short-cuts. Localise vars, and delay setting.
1784 Handle unknown relocs in main switch statement. Replace ugly
1785 complicated tests for unresolvable relocs with a simple direct
1786 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1787 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1788 after main switch, when we've set addend. Do non-addend insn
1789 tweaks before main swithc. Ignore input_section->vma when
1790 calculating reloc offsets as it's always zero. Rewrite dynamic
1791 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1792 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1793 of dynamic section short-cuts. Reorganise .plt handling code.
1794 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1795 Move expressions out of swap_reloca_out function calls.
1796 (ppc64_elf_reloc_type_class): New function.
1797 (ppc64_elf_info_to_howto): Move common expression to local var.
1798 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1799 of dynamic section short-cuts. Don't fiddle with section syms
1800 here as the ELF linker does it for us.
1801 (elf_backend_can_refcount): Define.
1802 (bfd_elf64_bfd_link_hash_table_create): Define.
1803 (elf_backend_copy_indirect_symbol): Define.
1804 (elf_backend_reloc_type_class): Define.
1805 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1807 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1809 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1810 (struct elf_backend_data): Add can_refcount.
1811 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1812 got.refcount and plt.refcount from init_refcount.
1813 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1814 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1815 rather than got/plt.offset, and test for <= 0 rather than -1.
1816 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1817 * elfxx-target.h (elf_backend_can_refcount): Define.
1818 (elfNN_bed): Init can_refcount.
1819 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1820 (_bfd_generic_link_hash_newfunc): Likewise.
1821 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1823 (elf_backend_can_refcount): Define.
1824 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1826 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1828 (elf_backend_can_refcount): Define.
1829 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1831 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1832 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1833 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1834 (elf_backend_can_refcount): Define.
1835 (elf_i386_copy_indirect_symbol): Make static to agree with
1836 prototype. Formatting fix.
1837 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1839 (elf_backend_can_refcount): Define.
1840 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1842 (elf_backend_can_refcount): Define.
1843 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1845 (elf_backend_can_refcount): Define.
1846 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1848 (elf_backend_can_refcount): Define.
1849 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1851 (elf_backend_can_refcount): Define.
1853 * som.c (som_write_symbol_strings): Cast current_offset in
1854 bfd_seek call to match param type.
1856 2001-09-28 J. Brobecker <brobecker@gnat.com>
1858 * som.c (som_write_symbol_strings): Fix incorrect type of
1859 current_offset to match the function definition. Fixes a build
1860 failure on HPUX-11.00.
1862 2001-09-28 Richard Henderson <rth@redhat.com>
1864 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1865 SEC_MERGE, SEC_STRINGS.
1867 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1868 * bfd-in2.h: Rebuild.
1870 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1872 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1873 reloc code using x86_64_reloc_map.
1875 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1876 no longer allocate here. Localise some vars to blocks where they
1878 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1879 setting of vars until needed.
1880 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1881 when symbol visibilty makes a function local.
1882 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1883 swap_reloca_out function calls.
1884 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1885 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1888 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1889 no longer allocate here. Localise some vars to blocks where they
1890 are used. Remove separate switch stmt for creating .got sec.
1891 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1892 redundant casts and aborts. Delay setting of vars until needed.
1893 (allocate_dynrelocs): Remove redundant casts and aborts.
1894 (elf_i386_size_dynamic_sections): Move comment.
1895 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1897 (elf_i386_relocate_section): Likewise. Comment typo fix.
1898 (elf_i386_finish_dynamic_sections): Migrate common code out of
1900 (elf_backend_* defines): Sort.
1902 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1903 without a reloc when symbol visibilty makes a function local.
1905 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1907 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1908 conflicting float flags.
1910 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1912 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1913 (elf_backend_copy_indirect_symbol): Define.
1914 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1915 (struct elf_i386_link_hash_table): Likewise.
1916 (link_hash_newfunc): Get rid of unnecessary casts.
1917 (elf_i386_link_hash_table_create): Likewise.
1918 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1919 Don't test input section SEC_READONLY here to try to avoid copy
1920 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1921 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1922 here to properly test whether we need copy relocs. Do so for weak
1925 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1926 (elf_backend_copy_indirect_symbol): Define.
1927 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1928 (stub_hash_newfunc): Get rid of unnecessary casts.
1929 (hppa_link_hash_newfunc): Likewise.
1930 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1931 Don't test input section SEC_READONLY here to try to avoid copy
1932 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1933 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1934 here to properly test whether we need copy relocs. Do so for weak
1937 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1939 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1940 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1941 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1943 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1945 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1948 2001-09-25 H.J. Lu <hjl@gnu.org>
1950 * bfd-in2.h: Regenerated.
1952 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1954 * elf32-i386.c: Add comment re linker function names and ordering.
1955 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1956 (elf_i386_grok_prstatus): Move before linker functions.
1957 (elf_i386_grok_psinfo): Likewise.
1958 (elf_i386_fake_sections): Move so that functions are ordered.
1959 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1961 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1963 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1966 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1967 code handling this option.
1968 (LONG_BRANCH_VIA_PLT): Likewise.
1969 (RELATIVE_DYNRELOCS): Define as zero.
1970 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1971 "pc_count" fields. Remove "section" field.
1972 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1973 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1974 relocs here. Instead, record all needed dynamic relocs via
1975 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1976 in elf_section_data.
1977 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1978 (allocate_plt_and_got_and_discard_relocs): Rename to
1979 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1980 (readonly_dynrelocs): New function.
1981 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1982 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1983 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1984 (elf32_hppa_relocate_section): Make use of cached sreloc.
1985 (elf32_hppa_reloc_type_class): New function.
1986 (elf_backend_reloc_type_class): Define.
1988 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1990 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1991 and "sreloc" fields.
1992 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1993 "pc_count" fields. Remove "section" field.
1994 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1995 allocate space for dynamic relocs here. Instead, record all
1996 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1997 pointer to "sreloc" section in elf_section_data.
1998 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1999 (allocate_plt_and_got_and_discard_relocs): Rename to
2000 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
2001 (readonly_dynrelocs): New function.
2002 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
2003 Rename "i" to "ibfd". Allocate space for local dyn relocs.
2004 (elf_i386_relocate_section): Make use of cached sreloc.
2006 2001-09-24 Alan Modra <amodra@bigpond.net.au>
2008 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
2009 reloc rather than just the type.
2010 (_bfd_elf_reloc_type_class): Likewise.
2011 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2012 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
2013 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
2014 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
2015 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
2016 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
2017 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
2018 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
2019 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
2020 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
2021 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
2022 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
2023 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
2024 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
2025 * elflink.h: Formatting fixes.
2026 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
2027 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
2028 o->contents to PTR. Update call to elf_backend_reloc_type_class.
2030 2001-09-22 John Reiser <jreiser@BitWagon.com>
2032 * elfcode.h (elf_object_p): Allow for no section header at all in
2033 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
2035 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
2037 * elfxx-ia64.c: Fix compile time warning messages.
2038 * coff-mcore.c: Fix compile time warning messages.
2039 * coff-ppc.c: Fix compile time warning messages.
2040 * coffcode.h: Fix compile time warning messages.
2041 * elf32-mips.c: Fix compile time warning messages.
2042 * elf64-alpha.c: Fix compile time warning messages.
2043 * libbfd.c: Fix compile time warning messages.
2044 * bfd-in2.h: Regenerate.
2046 2001-09-21 Alan Modra <amodra@bigpond.net.au>
2048 * Makefile.am: Run "make dep-am".
2049 * Makefile.in: Regenerate.
2051 * aoutx.h: Formatting fixes.
2052 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
2054 * linker.c: Replace bfd_get_filename with bfd_archive_filename
2057 2001-09-21 Alan Modra <amodra@bigpond.net.au>
2059 * bfd.c (bfd_archive_filename): New function.
2060 * bfd-in2.h: Regenerate.
2061 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
2062 in error messages where the bfd is an input bfd.
2063 * aout-cris.c: Likewise.
2064 * coff-arm.c: Likewise.
2065 * coff-mcore.c: Likewise.
2066 * coff-ppc.c: Likewise.
2067 * coff-rs6000.c: Likewise.
2068 * coff-sh.c: Likewise.
2069 * coff-tic54x.c: Likewise.
2070 * coff-tic80.c: Likewise.
2071 * coff64-rs6000.c: Likewise.
2072 * coffcode.h: Likewise.
2073 * coffgen.c: Likewise.
2074 * cofflink.c: Likewise.
2075 * ecofflink.c: Likewise.
2076 * elf-hppa.h: Likewise.
2078 * elf32-arm.h: Likewise.
2079 * elf32-cris.c: Likewise.
2080 * elf32-gen.c: Likewise.
2081 * elf32-hppa.c: Likewise.
2082 * elf32-i370.c: Likewise.
2083 * elf32-i386.c: Likewise.
2084 * elf32-m32r.c: Likewise.
2085 * elf32-mcore.c: Likewise.
2086 * elf32-mips.c: Likewise.
2087 * elf32-ppc.c: Likewise.
2088 * elf32-s390.c: Likewise.
2089 * elf32-sh.c: Likewise.
2090 * elf32-sparc.c: Likewise.
2091 * elf32-v850.c: Likewise.
2092 * elf64-alpha.c: Likewise.
2093 * elf64-gen.c: Likewise.
2094 * elf64-ppc.c: Likewise.
2095 * elf64-s390.c: Likewise.
2096 * elf64-sparc.c: Likewise.
2097 * elf64-x86-64.c: Likewise.
2098 * elflink.h: Likewise.
2099 * elfxx-ia64.c: Likewise.
2102 * libbfd.c: Likewise.
2103 * pdp11.c: Likewise.
2104 * pe-mips.c: Likewise.
2105 * peicode.h: Likewise.
2107 * xcofflink.c: Likewise.
2109 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
2111 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
2114 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
2117 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
2118 Consolidate error messages, and split long messages to two lines.
2120 2001-09-20 John Reiser <jreiser@BitWagon.com>
2122 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
2123 and info->allow_shlib_undefined.
2124 * elf32-cris.c: Likewise.
2125 * elf32-hppa.c: Likewise.
2126 * elf32-m68k.c: Likewise.
2127 * elf32-mips.c: Likewise.
2128 * elf32-ppc.c: Likewise.
2129 * elf32-s390.c: Likewise.
2130 * elf32-sh.c: Likewise.
2131 * elf32-sparc.c: Likewise.
2132 * elf64-alpha.c: Likewise.
2133 * elf64-hppa.c: Likewise.
2134 * elf64-ppc.c: Likewise.
2135 * elf64-s390.c: Likewise.
2136 * elf64-sparc.c: Likewise.
2137 * elf64-x86-64.c: Likewise.
2138 * elfxx-ia64.c: Likewise.
2140 2001-09-18 Bruno Haible <haible@clisp.cons.org>
2142 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
2143 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2144 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
2145 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
2146 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
2147 (bfd_default_scan): Use ISDIGIT instead of isdigit.
2148 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
2149 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
2150 isxdigit/isdigit/islower.
2151 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
2152 (mangle_name): Use ISALNUM instead of isalnum.
2153 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
2154 (scan): Use ISDIGIT instead of isdigit.
2155 * hosts/alphavms.h: Don't include <ctype.h>.
2156 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
2157 (ieee_object_p): Use TOUPPER instead of toupper.
2158 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
2159 (ihex_bad_byte): Use ISPRINT instead of isprint.
2160 * merge.c: Don't include <ctype.h>.
2161 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
2162 (oasys_write_sections): Use ISDIGIT instead of isdigit.
2163 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
2164 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
2165 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
2166 (mangle_name): Use ISALNUM instead of isalnum.
2167 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
2168 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
2169 isupper/islower/isdigit.
2170 (som_decode_symclass): Use TOUPPER instead of toupper.
2171 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
2172 (srec_bad_byte): Use ISPRINT instead of isprint.
2173 (srec_scan): Use ISSPACE instead of isspace.
2174 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
2175 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
2176 * syms.c: Include "safe-ctype.h"
2177 (islower, toupper): Remove macro definitions.
2178 (bfd_decode_symclass): Use TOUPPER instead of toupper.
2179 * vms-gsd.c: Don't include <ctype.h>.
2180 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
2181 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
2183 * vms-tir.c: Don't include <ctype.h>.
2185 2001-09-18 Alan Modra <amodra@bigpond.net.au>
2187 * libbfd.c (bfd_bread): New function replacing bfd_read without
2188 redundant params. Allow reads up to (size_t) -2 in length.
2189 (bfd_bwrite): Similarly for bfd_write.
2190 (real_read): Return a size_t.
2191 (bfd_read): Call bfd_bread.
2192 (bfd_write): Call bfd_bwrite.
2193 (warn_deprecated): New function to annoy everybody.
2194 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
2195 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
2196 (bfd_read, bfd_write): Define as macro.
2197 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
2198 likewise for bfd_write. Ensure function args are correct size by
2199 using casts or local vars. In some cases, remove unnecessary
2200 casts. Formatting fixes, in some cases removing a large expression
2201 from function args by using a local var. Replace CONST with const.
2202 Modify variable types to avoid warings. Use casts to avoid
2203 warnings when using negative numbers in unsigned expressions.
2204 * aout-adobe.c: Likewise.
2205 * aout-arm.c: Likewise.
2206 * aout-cris.c: Likewise.
2207 * aout-encap.c: Likewise.
2208 * aout-ns32k.c: Likewise.
2209 * aout-target.h: Likewise.
2210 * aout-tic30.c: Likewise.
2211 * aoutf1.h: Likewise.
2212 * aoutx.h: Likewise.
2213 * archive.c: Likewise.
2214 * archures.c: Likewise.
2215 * bfd-in.h: Likewise.
2217 * binary.c: Likewise.
2219 * cache.c: Likewise.
2220 * cisco-core.c: Likewise.
2221 * coff-a29k.c: Likewise.
2222 * coff-alpha.c: Likewise.
2223 * coff-arm.c: Likewise.
2224 * coff-h8300.c: Likewise.
2225 * coff-h8500.c: Likewise.
2226 * coff-i386.c: Likewise.
2227 * coff-i860.c: Likewise.
2228 * coff-i960.c: Likewise.
2229 * coff-ia64.c: Likewise.
2230 * coff-m68k.c: Likewise.
2231 * coff-m88k.c: Likewise.
2232 * coff-mcore.c: Likewise.
2233 * coff-mips.c: Likewise.
2234 * coff-ppc.c: Likewise.
2235 * coff-rs6000.c: Likewise.
2236 * coff-sh.c: Likewise.
2237 * coff-sparc.c: Likewise.
2238 * coff-stgo32.c: Likewise.
2239 * coff-tic30.c: Likewise.
2240 * coff-tic54x.c: Likewise.
2241 * coff-tic80.c: Likewise.
2242 * coff-w65.c: Likewise.
2243 * coff-z8k.c: Likewise.
2244 * coff64-rs6000.c: Likewise.
2245 * coffcode.h: Likewise.
2246 * coffgen.c: Likewise.
2247 * cofflink.c: Likewise.
2248 * coffswap.h: Likewise.
2249 * corefile.c: Likewise.
2250 * cpu-arc.c: Likewise.
2251 * cpu-h8300.c: Likewise.
2252 * cpu-h8500.c: Likewise.
2253 * cpu-i960.c: Likewise.
2254 * cpu-ia64-opc.c: Likewise.
2255 * cpu-ns32k.c: Likewise.
2256 * cpu-pdp11.c: Likewise.
2257 * cpu-pj.c: Likewise.
2258 * cpu-sh.c: Likewise.
2259 * cpu-w65.c: Likewise.
2260 * cpu-z8k.c: Likewise.
2261 * dwarf1.c: Likewise.
2262 * dwarf2.c: Likewise.
2263 * ecoff.c: Likewise.
2264 * ecofflink.c: Likewise.
2265 * ecoffswap.h: Likewise.
2266 * elf-bfd.h: Likewise.
2267 * elf-hppa.h: Likewise.
2268 * elf-m10200.c: Likewise.
2269 * elf-m10300.c: Likewise.
2271 * elf32-arc.c: Likewise.
2272 * elf32-arm.h: Likewise.
2273 * elf32-avr.c: Likewise.
2274 * elf32-cris.c: Likewise.
2275 * elf32-fr30.c: Likewise.
2276 * elf32-gen.c: Likewise.
2277 * elf32-h8300.c: Likewise.
2278 * elf32-hppa.c: Likewise.
2279 * elf32-i370.c: Likewise.
2280 * elf32-i386.c: Likewise.
2281 * elf32-i860.c: Likewise.
2282 * elf32-m32r.c: Likewise.
2283 * elf32-m68k.c: Likewise.
2284 * elf32-mcore.c: Likewise.
2285 * elf32-mips.c: Likewise.
2286 * elf32-openrisc.c: Likewise.
2287 * elf32-pj.c: Likewise.
2288 * elf32-ppc.c: Likewise.
2289 * elf32-s390.c: Likewise.
2290 * elf32-sh-lin.c: Likewise.
2291 * elf32-sh.c: Likewise.
2292 * elf32-sparc.c: Likewise.
2293 * elf32-v850.c: Likewise.
2294 * elf64-alpha.c: Likewise.
2295 * elf64-hppa.c: Likewise.
2296 * elf64-mips.c: Likewise.
2297 * elf64-ppc.c: Likewise.
2298 * elf64-s390.c: Likewise.
2299 * elf64-sparc.c: Likewise.
2300 * elf64-x86-64.c: Likewise.
2301 * elfarm-nabi.c: Likewise.
2302 * elfcode.h: Likewise.
2303 * elfcore.h: Likewise.
2304 * elflink.c: Likewise.
2305 * elflink.h: Likewise.
2306 * elfxx-ia64.c: Likewise.
2307 * elfxx-target.h: Likewise.
2308 * format.c: Likewise.
2310 * hp300hpux.c: Likewise.
2311 * hppabsd-core.c: Likewise.
2312 * hpux-core.c: Likewise.
2313 * i386aout.c: Likewise.
2314 * i386dynix.c: Likewise.
2315 * i386linux.c: Likewise.
2316 * i386lynx.c: Likewise.
2317 * i386mach3.c: Likewise.
2318 * i386msdos.c: Likewise.
2319 * i386os9k.c: Likewise.
2322 * irix-core.c: Likewise.
2323 * libaout.h: Likewise.
2324 * libbfd-in.h: Likewise.
2325 * libbfd.c: Likewise.
2326 * libcoff-in.h: Likewise.
2327 * libecoff.h: Likewise.
2328 * libieee.h: Likewise.
2329 * libnlm.h: Likewise.
2330 * libpei.h: Likewise.
2331 * libxcoff.h: Likewise.
2332 * linker.c: Likewise.
2333 * lynx-core.c: Likewise.
2334 * m68klinux.c: Likewise.
2335 * merge.c: Likewise.
2336 * mipsbsd.c: Likewise.
2337 * netbsd-core.c: Likewise.
2339 * nlm32-alpha.c: Likewise.
2340 * nlm32-i386.c: Likewise.
2341 * nlm32-ppc.c: Likewise.
2342 * nlm32-sparc.c: Likewise.
2343 * nlmcode.h: Likewise.
2344 * nlmswap.h: Likewise.
2345 * ns32k.h: Likewise.
2346 * oasys.c: Likewise.
2347 * opncls.c: Likewise.
2348 * osf-core.c: Likewise.
2349 * pc532-mach.c: Likewise.
2350 * pdp11.c: Likewise.
2351 * pe-mips.c: Likewise.
2352 * peXXigen.c: Likewise.
2353 * peicode.h: Likewise.
2354 * ppcboot.c: Likewise.
2355 * ptrace-core.c: Likewise.
2356 * reloc.c: Likewise.
2357 * reloc16.c: Likewise.
2358 * riscix.c: Likewise.
2359 * rs6000-core.c: Likewise.
2360 * sco5-core.c: Likewise.
2361 * section.c: Likewise.
2363 * sparclinux.c: Likewise.
2364 * sparclynx.c: Likewise.
2366 * stabs.c: Likewise.
2367 * sunos.c: Likewise.
2369 * targets.c: Likewise.
2370 * tekhex.c: Likewise.
2371 * trad-core.c: Likewise.
2372 * versados.c: Likewise.
2373 * vms-gsd.c: Likewise.
2374 * vms-hdr.c: Likewise.
2375 * vms-misc.c: Likewise.
2376 * vms-tir.c: Likewise.
2379 * xcofflink.c: Likewise.
2380 * bfd-in2.h: Regenerate.
2381 * libbfd.h: Regenerate.
2382 * libcoff.h: Regenerate.
2384 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
2385 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
2386 (ufile_ptr): Define.
2387 (bfd_tell): Return a ufile_ptr.
2388 * libbfd.c (bfd_tell): Likewise.
2389 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
2391 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
2392 * aoutf1.h: Likewise.
2394 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
2395 larger than unsigned long can represent.
2397 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
2398 size overflows size_t.
2399 (bfd_realloc): Likewise.
2400 (bfd_zmalloc): Likewise.
2401 * opncls.c (bfd_alloc): Likewise.
2402 (bfd_zalloc): Likewise.
2403 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
2404 (bfd_alloc, bfd_zalloc): Update.
2406 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
2408 (bfd_get_signed_8): Likewise.
2409 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
2410 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
2411 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
2412 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
2413 * libaout.h: Likewise define and use here.
2414 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
2415 * aout-arm.c: Likewise.
2416 * aout-encap.c: Likewise.
2417 * aout-ns32k.c: Likewise.
2418 * aout-tic30.c: Likewise.
2419 * aoutf1.h: Likewise.
2420 * aoutx.h: Likewise.
2422 * coff-alpha.c: Likewise.
2423 * coff-h8300.c: Likewise.
2424 * coff-h8500.c: Likewise.
2425 * coff-i960.c: Likewise.
2426 * coff-ia64.c: Likewise.
2427 * coff-m88k.c: Likewise.
2428 * coff-mips.c: Likewise.
2429 * coff-ppc.c: Likewise.
2430 * coff-rs6000.c: Likewise.
2431 * coff-sh.c: Likewise.
2432 * coff-sparc.c: Likewise.
2433 * coff-stgo32.c: Likewise.
2434 * coff-tic30.c: Likewise.
2435 * coff-tic80.c: Likewise.
2436 * coff-w65.c: Likewise.
2437 * coff-z8k.c: Likewise.
2438 * coff64-rs6000.c: Likewise.
2439 * coffgen.c: Likewise.
2440 * cofflink.c: Likewise.
2441 * coffswap.h: Likewise.
2442 * ecoff.c: Likewise.
2443 * ecoffswap.h: Likewise.
2445 * elf32-mips.c: Likewise.
2446 * elf64-mips.c: Likewise.
2447 * hp300hpux.c: Likewise.
2448 * i386dynix.c: Likewise.
2449 * i386lynx.c: Likewise.
2450 * i386msdos.c: Likewise.
2451 * i386os9k.c: Likewise.
2452 * libpei.h: Likewise.
2453 * nlm32-alpha.c: Likewise.
2454 * nlm32-i386.c: Likewise.
2455 * nlm32-ppc.c: Likewise.
2456 * nlmcode.h: Likewise.
2457 * nlmswap.h: Likewise.
2458 * oasys.c: Likewise.
2459 * pdp11.c: Likewise.
2460 * pe-mips.c: Likewise.
2461 * peXXigen.c: Likewise.
2462 * peicode.h: Likewise.
2463 * riscix.c: Likewise.
2464 * sunos.c: Likewise.
2465 * xcofflink.c: Likewise.
2466 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
2467 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
2468 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
2469 equivalent H_PUT_* macro instead.
2470 (GETWORD, GETHALF, GETBYTE): Similarly.
2471 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2472 (GETWORD, GETHALF, GETBYTE): Likewise.
2473 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
2475 * bfd-in.h (struct orl): Change "pos" to a union.
2476 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
2477 (bsd_write_armap): Here too.
2478 (coff_write_armap): And here.
2479 * coff-rs6000.c (xcoff_write_armap_old): And here.
2480 (xcoff_write_one_armap_big): And here.
2481 (xcoff_write_armap_big): And here.
2482 * ecoff.c (_bfd_ecoff_write_armap): And here.
2483 * elf64-mips.c (mips_elf64_write_armap): And here.
2485 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
2486 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
2487 * elf32-h8300.c (elf32_h8_mach): Likewise.
2488 * elf32-mips.c (elf_mips_mach): Likewise.
2489 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
2491 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
2493 (aix386_core_vec): Typo fix.
2495 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
2496 etc. to avoid redefined macro warning.
2497 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
2498 (MY(fix_pcrel_26)): Likewise.
2499 * aout-ns32k.c (MY(put_reloc)): Likewise.
2500 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2501 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2502 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2504 * aout-encap.c: Include "file", not <file> for binutils headers.
2505 (encap_object_p): Half baked attempt to fix compile errors in
2506 code dealing with "magic".
2508 * aout-ns32k.c: Include "file", not <file> for binutils headers.
2509 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2510 bfd_vma's rather than longs.
2511 * cpu-ns32k.c (ns32k_sign_extend): Delete.
2512 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2513 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
2515 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2516 Use unsigned comparisons.
2517 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2518 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2519 (_bfd_do_ns32k_reloc_contents): Likewise.
2520 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2521 (_bfd_ns32k_get_immediate): Likewise.
2522 (_bfd_ns32k_put_displacement): Likewise.
2523 (_bfd_ns32k_put_immediate): Likewise.
2524 (bfd_reloc_status_type): Likewise.
2526 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2528 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2529 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2530 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2532 (record_toc): Use a bfd_signed_vma for our_toc_offset.
2533 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2534 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2536 (_bfd_elfcore_strndup): Likewise for "dup".
2537 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2538 "name" to avoid shadowing.
2539 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2540 definition of "off".
2541 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2542 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2544 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
2546 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2548 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2550 (elf_link_input_bfd): Likewise.
2551 (elf_bfd_final_link): Remove duplicate innermost "off" var.
2552 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2553 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2555 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2556 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2557 (sunos_write_dynamic_symbol): Remove unused vars.
2558 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2559 innermost "directory_name" and "file_name" vars.
2560 * tekhex.c (first_phase): Rename local var "type" to "stype".
2561 (tekhex_write_object_contents): Rename innermost "s" to "sym".
2562 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2563 doing comparison at caller.
2564 (vms_esecflag_by_name): Likewise.
2565 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2566 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2567 (xcoff_write_global_symbol): Rename "p" param to "inf".
2569 * cisco-core.c: Add missing prototypes.
2570 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2571 (cisco_core_file_failing_signal): Likewise.
2572 (cisco_core_file_matches_executable_p): Likewise.
2573 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2574 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2575 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2576 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2578 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2579 thumb_glue_size and arm_glue_size.
2580 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2582 * coff64-rs6000.c: Group prototypes together.
2584 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2585 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
2587 * cpu-arc.c: Add missing prototypes.
2588 * cpu-h8500.c: Likewise.
2589 * cpu-i960.c: Likewise.
2590 * cpu-pj.c: Likewise.
2591 * cpu-sh.c: Likewise.
2592 * cpu-w65.c: Likewise.
2593 * cpu-z8k.c: Likewise.
2594 * elf32-fr30.c: Likewise.
2595 * elf32-h8300.c: Likewise.
2596 * elf32-i370.c: Likewise.
2597 * hpux-core.c: Likewise.
2598 * versados.c: Likewise.
2600 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2601 * cpu-h8500.c: Likewise.
2602 * cpu-i960.c: Likewise.
2603 * cpu-z8k.c: Likewise.
2605 * cpu-ia64-opc.c: Correct comment.
2607 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2609 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2611 (bfd_elf32_write_out_phdrs): Likewise.
2612 (bfd_elf64_write_out_phdrs): Likewise.
2613 (elf_linker_section_pointers): Change addend to bfd_vma.
2614 (_bfd_elf_find_pointer_linker_section): Likewise.
2615 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2616 filepos to unsigned file_ptr.
2617 (_bfd_elfcore_strndup): Change max param to size_t.
2618 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2619 (_bfd_elfcore_strndup): Likewise.
2620 (_bfd_elf_find_pointer_linker_section): Likewise.
2622 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2623 insn and sym_value to ints.
2625 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2627 (elfcore_read_notes): Likewise.
2629 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2630 param from unsigned char to int.
2631 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2632 for info_to_howto call.
2633 (add_dynamic_entry): Define macro.
2634 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2636 * elf32-cris.c (add_dynamic_entry): Define macro.
2637 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2639 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2640 (elf32_h8_object_p): Likewise.
2641 (elf32_h8_merge_private_bfd_data): Likewise.
2642 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2644 * elf32-hppa.c (add_dynamic_entry): Define macro.
2645 (elf32_hppa_size_dynamic_sections): Use it.
2646 * elf32-i370.c (add_dynamic_entry): Define macro.
2647 (i370_elf_size_dynamic_sections): Use it.
2648 (i370_noop): Make static.
2649 * elf32-i386.c (add_dynamic_entry): Define macro.
2650 (elf_i386_size_dynamic_sections): Use it.
2651 * elf32-m68k.c (add_dynamic_entry): Define macro.
2652 (elf_m68k_size_dynamic_sections): Use it.
2653 * elf32-ppc.c (add_dynamic_entry): Define macro.
2654 (ppc_elf_size_dynamic_sections): Use it.
2655 * elf32-s390.c (add_dynamic_entry): Define macro.
2656 (elf_s390_size_dynamic_sections): Use it.
2657 * elf64-alpha.c (add_dynamic_entry): Define macro.
2658 (elf64_alpha_size_dynamic_sections): Use it.
2659 * elf64-hppa.c (add_dynamic_entry): Define macro.
2660 (elf64_hppa_size_dynamic_sections): Use it.
2661 * elf64-ppc.c (add_dynamic_entry): Define macro.
2662 (ppc64_elf_size_dynamic_sections): Use it.
2663 * elf64-s390.c (add_dynamic_entry): Define macro.
2664 (elf_s390_size_dynamic_sections): Use it.
2665 * elf64-sparc.c (add_dynamic_entry): Define macro.
2666 (sparc64_elf_size_dynamic_sections): Use it.
2667 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2668 (elf64_x86_64_size_dynamic_sections): Use it.
2669 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2670 (elfNN_ia64_size_dynamic_sections): Use it.
2672 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2673 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2675 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2676 false if the first malloc fails rather than going via error_return.
2678 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2680 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2682 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2684 * elfxx-ia64.c (global_sym_index): Return a long.
2686 * ieee.c (get_symbol): Use int rather than char param.
2687 (ieee_slurp_sections): Move "section" var to inner blocks.
2688 (copy_expression): Don't init "value" to zero or worry about
2689 clearing to zero after using.
2690 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2693 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2696 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2697 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2699 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2701 * pc532-mach.c (MYNSX): Delete.
2702 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2703 (write_object_contents): Correct prototype.
2705 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2706 than unsigned short.
2708 * section.c (bfd_set_section_contents): Remove redundant
2709 "offset < 0" test. Check that "count" doesn't overflow size_t.
2710 (bfd_get_section_contents): Likewise.
2712 * som.c (som_fixup_formats): Add missing braces.
2713 (som_reloc_addend): Pass a bfd_vma for "addend".
2715 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2716 (srec_write_symbols): Remove an unnecessary var.
2718 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2720 * configure.in: Sort to match. Bump version number.
2721 * configure: Regenerate.
2723 * tekhex.c (move_section_contents): Assert offset == 0.
2725 * versados.c (new_symbol_string): Constify arg.
2726 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2727 (versados_get_symbol_info): Make static.
2728 (versados_print_symbol): Likewise.
2729 (versados_get_reloc_upper_bound): Likewise.
2730 (versados_canonicalize_reloc): Likewise.
2732 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2734 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2736 2001-09-17 H.J. Lu <hjl@gnu.org>
2738 * dwarf1.c (parse_die): Take a new arg for the end of the
2739 section. Return false if die is beyond the section.
2740 (parse_functions_in_unit): Pass the end of the section to
2742 (_bfd_dwarf1_find_nearest_line): Likewise.
2744 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2746 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2747 just like R_SPARC_32.
2749 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2751 * configure.bfd: Add arm-openbsd target.
2753 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2755 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2756 Add support for mips64.
2758 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2760 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2762 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2764 * elf.c (prep_headers): Get the machine code from the elf
2766 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2767 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2768 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2769 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2770 * elf-arc.c (arc_elf_final_write_processing): Don't override
2771 e_machine, it's now properly set in prep_headers.
2772 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2774 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2775 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2776 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2777 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2778 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2779 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2780 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2781 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2782 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2783 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2784 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2785 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2787 2001-09-11 Richard Henderson <rth@redhat.com>
2789 * elf64-alpha.c (elf64_alpha_section_flags): New.
2790 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2792 2001-09-11 Richard Henderson <rth@redhat.com>
2794 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2795 apply HINT relocations against dynamic symbols.
2797 2001-09-11 H.J. Lu <hjl@gnu.org>
2799 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2801 2001-09-09 Richard Henderson <rth@redhat.com>
2803 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2805 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2806 following a call to a near function.
2808 2001-09-08 Richard Henderson <rth@redhat.com>
2810 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2811 relocation errors. Fail gp-relative relocations against
2814 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2816 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2817 as well as DEF_DYNAMIC in test for avoided copy relocs.
2818 (allocate_plt_and_got_and_discard_relocs): Likewise.
2819 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2820 (allocate_plt_and_got_and_discard_relocs): Likewise.
2822 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2824 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2827 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2829 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2831 (mips_elf64_howto_table_rel): Likewise.
2833 2001-09-05 Tom Rix <trix@redhat.com>
2835 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2836 and syscall symbols.
2837 (write_global_symbol) : Same.
2838 (bfd_xcoff_export_symbol): Remove unused syscall param.
2839 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2840 bfd_xcoff_import_symbol.
2842 * bfd-in2.h : Regenerate.
2844 2001-09-04 Richard Henderson <rth@redhat.com>
2846 * elf64-alpha.c (SKIP_HOWTO): New.
2847 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2848 Fix sizes of 16-bit mem format relocs.
2849 (elf64_alpha_reloc_map): Update to match.
2850 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2851 (elf64_alpha_relax_without_lituse): Likewise.
2852 (elf64_alpha_check_relocs): Handle GPREL16.
2853 (elf64_alpha_relocate_section): Likewise.
2854 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2855 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2856 * bfd-in2.h, libbfd.h: Rebuild.
2858 2001-09-04 Jeff Law <law@redhat.com>
2860 * elf32-h8300.c (elf32_h8_relax_section): New function.
2861 (elf32_h8_relax_delete_bytes): Likewise.
2862 (elf32_h8_symbol_address_p): Likewise.
2863 (elf32_h8_get_relocated_section_contents): Likewise.
2864 (bfd_elf32_bfd_relax_section): Define.
2865 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2867 * elf32-h8300.c (special): New function.
2868 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2870 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2871 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2872 Fix minor problems with 8bit and 16bit PC relative relocations.
2874 2001-09-01 Andreas Jaeger <aj@suse.de>
2876 * vms-tir.c: Add missing prototypes.
2877 * vms-hdr.c: Likewise.
2878 * vms-gsd.c: Likewise.
2879 * vms-misc.c: Likewise.
2881 2001-08-31 H.J. Lu <hjl@gnu.org>
2883 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2884 with bad relocation.
2886 2001-08-31 Eric Christopher <echristo@redhat.com>
2887 Jason Eckhardt <jle@redhat.com>
2889 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2890 mips32_4k and mips64.
2891 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2892 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2893 * bfd/cpu-mips.c: Ditto.
2894 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2895 * bfd/bfd-in2.h: Regenerate.
2897 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2899 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2900 value into R_ALPHA_RELATIVE's addend.
2901 (elf64_alpha_finish_dynamic_symbol): Likewise.
2903 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2905 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2906 recomputed addend during relocatable link if not USE_REL.
2908 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2911 2001-08-30 H.J. Lu <hjl@gnu.org>
2913 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2915 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2916 relocations for weak definitions.
2918 2001-08-30 H.J. Lu <hjl@gnu.org>
2920 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2921 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2922 * Makefile.in: Rebuild.
2924 2001-08-30 H.J. Lu <hjl@gnu.org>
2926 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2927 dynamic relocation for undefined weak symbols when creating
2928 executables. Check h->root.root.type, instead of h->root.type.
2930 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2932 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2933 default from coff to elf.
2935 2001-08-29 Jeff Law <law@redhat.com>
2937 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2939 (h8_reloc_map): Similarly.
2940 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2941 Add support for PC relative relocations.
2943 * elf32-h8300.c: Put all prototypes together.
2944 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2945 (elf32_h8_final_link_relocate): New function for linker.
2946 (elf32_h8_relocate_section): Similarly.
2947 (elf_backend_relocate_section): Define.
2949 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2950 (h8300_scan): Handle architecture:machine encodings typically
2951 found in linker scripts.
2952 * elf.c (prep_headers): Do not try to do H8 machine recognition
2954 * elf32-h8300.c: Add some missing prototypes.
2955 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2956 (elf32_h8_object_p): Similarly.
2958 2001-08-29 Tom Rix <trix@redhat.com>
2960 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2961 does not follow a XTY_SD.
2963 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2965 * targmatch.sed: Delete case statements.
2966 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2969 2001-08-29 J"orn Rennecke <amylaar@redhat.com>
2971 * Makefile.am (elf32-h8300.lo): New target.
2972 * config.bfd (h8300*-*-elf): New case.
2973 * configure.in (bfd_elf32_h8300_vec): New case.
2974 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2975 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2976 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2977 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2978 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2979 * elf32-h8300.c: New file.
2980 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2982 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2984 * sparclynx.c: Add missing prototypes.
2985 * coff-mcore.c: Add missing prototypes.
2986 * elf32-pj.c: Add missing prototypes.
2987 * nlm32-sparc.c: Add missing prototypes.
2988 * oasys.c: Add missing prototypes.
2989 * pdp11.c: Add missing prototypes.
2990 * pe-mips.c: Add missing prototypes.
2991 * riscix.c: Add missing prototypes.
2993 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2995 * elf32-i386.c: Add missing prototypes.
2996 * elf32-ppc.c: Likewise.
2997 * elf32-sh-lin.c: Likewise.
2998 * elfarm-nabi.c: Likewise.
3000 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
3002 * elf32-i386.c (elf_i386_grok_prstatus): New function.
3003 (elf_i386_grok_psinfo): New function.
3004 (elf_backend_grok_prstatus): Define.
3005 (elf_backend_grok_psinfo): Likewise.
3006 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
3007 (ppc_elf_grok_psinfo): New function.
3008 (elf_backend_grok_prstatus): Define.
3009 (elf_backend_grok_psinfo): Likewise.
3010 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
3011 (elf32_shlin_grok_psinfo): New function.
3012 (elf_backend_grok_prstatus): Define.
3013 (elf_backend_grok_psinfo): Likewise.
3014 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
3015 (elf32_arm_nabi_grok_psinfo): New function.
3016 (elf_backend_grok_prstatus): Define.
3017 (elf_backend_grok_psinfo): Likewise.
3019 2001-08-27 H.J. Lu <hjl@gnu.org>
3021 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
3023 (mips_elf_calculate_relocation): Create dynamic relocation for
3024 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
3027 2001-08-27 H.J. Lu <hjl@gnu.org>
3029 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
3030 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3031 (_bfd_elf32_mips_grok_prstatus): Likewise.
3032 (_bfd_elf32_mips_grok_psinfo): Likewise.
3033 (_bfd_mips_elf_hide_symbol): Make it static and cast to
3034 `struct mips_elf_link_hash_entry *'.
3035 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
3037 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
3039 * mipsbsd.c: Add missing prototypes.
3040 * hp300hpux.c: Add missing prototypes.
3041 * i386aout.c: Add missing prototypes.
3042 * i386lynx.c: Add missing prototypes.
3043 * i386mach3.c: Add missing prototypes.
3044 * i386msdos.c: Add missing prototypes.
3045 * i386os9k.c: Add missing prototypes.
3047 2001-08-27 Linus Nordberg <linus@swox.se>
3048 Torbjorn Granlund <tege@swox.com>
3049 Staffan Ulfberg <staffanu@swox.se>
3050 Alan Modra <amodra@bigpond.net.au>
3052 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
3053 targ64_selvecs for 32 bit powerpc targets.
3054 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
3055 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
3057 * Makefile.in: Regenerate.
3058 * configure.in: Add elf64_powerpc vecs.
3059 * configure: Regenerate.
3060 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
3061 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
3062 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
3063 * elf64-ppc.c: New file.
3064 * reloc.c: Add powerpc64 relocs.
3065 * libbfd.h: Regenerate.
3066 * bfd-in2.h: Regenerate.
3068 2001-08-27 Andreas Schwab <schwab@suse.de>
3070 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
3071 reloc is against read-only section.
3072 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
3073 looking up section names for DT_TEXTREL.
3074 (elf32_m68k_reloc_type_class): New function.
3075 (elf_backend_reloc_type_class): Define.
3077 2001-08-27 Andreas Jaeger <aj@suse.de>
3079 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
3080 reloc is against read-only section.
3081 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
3082 looking up section names for DT_TEXTREL.
3083 (elf_s390_reloc_type_class): New.
3084 (elf_backend_reloc_type_class): Define.
3086 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
3087 reloc is against read-only section.
3088 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
3089 looking up section names for DT_TEXTREL.
3090 (elf_s390_reloc_type_class): New.
3091 (elf_backend_reloc_type_class): Define.
3093 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
3094 is against read-only section.
3095 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3096 looking up section names for DT_TEXTREL.
3097 (ppc_elf_reloc_type_class): New.
3098 (elf_backend_reloc_type_class): Define.
3100 2001-08-26 Andreas Jaeger <aj@suse.de>
3102 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
3103 reloc is against read-only section.
3104 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
3105 looking up section names for DT_TEXTREL.
3106 (elf_cris_reloc_type_class): New.
3107 (elf_backend_reloc_type_class): Define.
3109 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
3110 against read-only section.
3111 (elf_backend_reloc_type_class): Define.
3112 (sh_elf_reloc_type_class): New.
3113 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3114 looking up section names for DT_TEXTREL.
3116 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
3117 reloc is against read-only section.
3118 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
3119 looking up section names for DT_TEXTREL.
3120 (elf32_arm_reloc_type_class): New.
3121 (elf_backend_reloc_type_class): Define.
3123 2001-08-25 Andreas Jaeger <aj@suse.de>
3125 * oasys.c: Add missing prototypes.
3127 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
3128 attribute for parameter.
3129 * elf.c (_bfd_elf_reloc_type_class): Likewise.
3131 * versados.c (get_4): Make static.
3132 (get_10): Make static.
3133 Add missing prototypes.
3134 (process_esd): Fix call to versados_new_symbol.
3136 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
3138 * coff-a29k.c: Add missing prototypes.
3139 * coff-apollo.c: Add missing prototypes.
3140 * coff-arm.c: Add missing prototypes.
3141 * coff-i860.c: Add missing prototypes.
3142 * coff-rs6000.c: Add missing prototypes.
3143 * coff-tic80.c: Add missing prototypes.
3144 * elf-m10200.c: Add missing prototypes.
3145 * elf-m10300.c: Add missing prototypes.
3146 * elf32-arm.h: Add missing prototypes.
3147 * elf32-d10v.c: Add missing prototypes.
3148 * elf32-m32r.c: Add missing prototypes.
3149 * elf32-mcore.c: Add missing prototypes.
3150 * elf32-openrisc.c: Add missing prototypes.
3151 * elf32-sh.c: Add missing prototypes.
3152 * elf32-sparc.c: Add missing prototypes.
3153 * elf32-v850.c: Add missing prototypes.
3154 * elfarm-nabi.c: Add missing prototypes.
3155 * elfarm-oabi.c: Add missing prototypes.
3157 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3159 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
3160 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
3162 2001-08-24 H.J. Lu <hjl@gnu.org>
3164 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
3167 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
3169 * elf-bfd.h (elf_hash_table): Revert definition.
3170 (is_elf_hash_table): New macro.
3171 * elflink.h (elf_link_add_object_symbols): Test
3172 is_elf_hash_table before accessing ELF only fields in hash
3174 (elf_link_create_dynamic_sections): Fail if not using an ELF
3176 (elf_add_dynamic_entry): Fail if not using an ELF hash
3178 (elf_link_record_local_dynamic_symbol): Fail if not using an
3180 (size_dynamic_sections): Fail if not using an ELF hash
3182 (elf_adjust_dynamic_symbol): Fail if not using an ELF
3184 (elf_bfd_final_link): Fail if not using an ELF hash
3187 2001-08-24 H.J. Lu <hjl@gnu.org>
3189 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
3190 table is not an ELF linker hash table.
3192 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
3193 table type to bfd_link_elf_hash_table.
3195 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
3198 * linker.c (_bfd_link_hash_table_init): Set the linker hash
3199 table type to bfd_link_generic_hash_table.
3201 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
3203 * bfd.c (bfd_alt_mach_code): New function.
3204 * bfd-in2.h: Rebuilt.
3206 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
3208 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
3209 `type' field in the hash entry when deciding whether to follow a
3212 2001-08-24 Jakub Jelinek <jakub@redhat.com>
3214 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
3216 (elf_link_sort_relocs): Adjust accordingly.
3218 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
3219 (elf64_alpha_check_relocs): Set it if section this reloc is against
3220 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
3222 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
3223 is is against read-only section.
3224 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
3225 check section names.
3226 (elf64_alpha_reloc_type_class): New.
3227 (elf_backend_reloc_type_class): Define.
3229 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3231 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
3234 2001-08-23 Andreas Jaeger <aj@suse.de>
3236 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
3237 the reloc is against read-only section.
3238 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
3239 of looking up section names for DT_TEXTREL.
3240 (elf64_x86_64_reloc_type_class): New.
3241 (elf_backend_reloc_type_class): Define.
3243 2001-08-23 H.J. Lu <hjl@gnu.org>
3245 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
3246 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
3248 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
3249 bfd_print_symbol_vandf.
3250 * coffgen.c (coff_print_symbol): Likewise.
3251 * elf.c (bfd_elf_print_symbol): Likewise.
3252 * ieee.c (ieee_print_symbol): Likewise.
3253 * nlmcode.h (nlm_print_symbol): Likewise.
3254 * oasys.c (oasys_print_symbol): Likewise.
3255 * pdp11.c (NAME(aout,print_symbol)): Likewise.
3256 * som.c (som_print_symbol): Likewise.
3257 * srec.c (srec_print_symbol): Likewise.
3258 * tekhex.c (tekhex_print_symbol): Likewise.
3259 * versados.c (versados_print_symbol): Likewise.
3260 * vms.c (vms_print_symbol): Likewise.
3262 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
3263 with bfd_fprintf_vma.
3264 (bfd_elf_print_symbol): Likewise.
3265 * syms.c (bfd_print_symbol_vandf): Likewise.
3267 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3269 * aoutf1.h (sunos_write_object_contents): Silence compile time
3271 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
3273 * bout.c: Add missing function prototypes. Fix formatting.
3274 * coff-z8k.c: Add missing function prototypes. Fix formatting.
3275 * coff-w65.c: Add missing function prototypes. Fix formatting.
3276 * coff-h8500.c: Add missing function prototypes. Fix formatting.
3277 * coff-h8300.c: Add missing function prototypes. Fix formatting.
3278 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
3279 * coff-tic30.c: Add missing function prototypes. Fix formatting.
3280 * coff-m68k.c: Add missing function prototypes. Fix formatting.
3281 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
3282 * coff-sh.c: Add missing function prototypes. Fix formatting.
3284 2001-08-23 Jakub Jelinek <jakub@redhat.com>
3286 * elf-bfd.h (enum elf_reloc_type_class): New.
3287 (struct elf_backend_data): Add elf_backend_reloc_type_class.
3288 (_bfd_elf_reloc_type_class): New.
3289 * elfxx-target.h (elf_backend_reloc_type_class): Define.
3290 (elfNN_bed): Add elf_backend_reloc_type_class.
3291 * elf.c (_bfd_elf_reloc_type_class): New.
3292 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
3293 is against read-only section.
3294 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
3295 looking up section names for DT_TEXTREL.
3296 (elf_i386_reloc_type_class): New.
3297 (elf_backend_reloc_type_class): Define.
3298 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
3299 reloc is against read-only section.
3300 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
3301 looking up section names for DT_TEXTREL.
3302 (elf32_sparc_reloc_type_class): New.
3303 (elf_backend_reloc_type_class): Define.
3304 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
3305 reloc is against read-only section.
3306 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
3307 looking up section names for DT_TEXTREL.
3308 (sparc64_elf_reloc_type_class): New.
3309 (elf_backend_reloc_type_class): Define.
3310 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
3311 (elfNN_ia64_hash_table_create): Clear ia64_info.
3312 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
3314 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
3315 instead of looking up section names for DT_TEXTREL.
3316 (elfNN_ia64_reloc_type_class): New.
3317 (elf_backend_reloc_type_class): Define.
3318 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
3319 (struct elf_link_sort_rela): New.
3320 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
3321 (elf_bfd_final_link): Call elf_link_sort_relocs.
3322 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
3325 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
3327 * configure.in (x86-bsdi): No corefile support.
3328 * configure: Regenerate.
3330 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
3332 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
3335 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
3337 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
3338 the alignment of dwarf2 linkonce sections to 0.
3339 * coff-sto32.c: Likewise.
3341 2001-08-20 Andreas Jaeger <aj@suse.de>
3343 * coff-sparc.c: Add missing prototypes.
3344 * elf32-s390.c: Likewise.
3345 * elf32-i960.c: Likewise.
3346 * aout-target.h: Likewise.
3348 2001-08-20 H.J. Lu <hjl@gnu.org>
3350 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
3351 (elf_num_section_syms): New for num_section_syms.
3353 * elf.c (elf_map_symbols): Set num_section_syms.
3354 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
3355 the section symbol index.
3357 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
3359 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
3360 select the generic has table creator. All elf backends need elf
3361 specific fields in the hash table.
3363 2001-08-20 Alan Modra <amodra@bigpond.net.au>
3365 * archive.c (offsetof): Remove define.
3368 * sysdep.h (offsetof): Define.
3370 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3372 * bfd.c (bfd_get_gp_size): Return an unsigned int.
3373 (bfd_set_gp_size): Make param unsigned.
3374 * bfd-in2.h: Regenerate.
3375 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
3376 than calling bfd_get_gp_size.
3377 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
3378 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
3380 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3382 * linker.c (default_fill_link_order): Handle four byte fill value.
3384 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3386 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
3388 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
3390 * elf64-mips.c (UNUSED_RELOC): Define.
3391 (mips_elf64_howto_table_rel): Use it.
3392 (mips_elf64_howto_table_rela): Here too.
3393 (mips_elf64_write_relocs): Fix signed/unsigned warning.
3395 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
3397 * coffgen.c (coff_print_symbol): Fix warnings.
3398 (coff_find_nearest_line): Likewise.
3399 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
3400 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3401 * format.c (bfd_check_format_matches): Likewise.
3402 (bfd_set_format): Likewise.
3403 * coff-ia64.c: Add missing prototypes.
3404 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
3405 signed to silence warnings.
3406 (elf64_alpha_relocate_section): Likewise.
3407 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
3408 (elf64_alpha_add_symbol_hook): Likewise.
3409 (elf64_alpha_final_link): Likewise.
3410 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
3411 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
3412 (elf64_alpha_size_got_sections): Likewise.
3413 * elfxx-ia64.c: Add missing prototypes.
3414 (elfNN_ia64_relocate_section): Fix warning.
3415 (elfNN_ia64_unwind_entry_compare): Make params const.
3417 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3419 * config.bfd (targ64_selvecs): New.
3420 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
3422 * bfd-in.h (BFD_VERSION): Remove wrong comment.
3423 (BFD_DEFAULT_TARGET_SIZE): New.
3424 (BFD_ARCH_SIZE): Comment.
3425 * configure.in (target_size): New. Set instead of target64 in
3426 selvecs case statement. Set target64 from it.
3427 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
3428 * bfd-in2.h: Regenerate.
3429 * configure: Regenerate.
3431 2001-08-17 Alan Modra <amodra@bigpond.net.au>
3433 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
3434 (bfd_errmsgs): Add corresponding message.
3435 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
3436 finding an archive that contains different format object files.
3437 Return bfd_error_wrong_object_format for this case.
3438 * format.c: Formatting fixes. s/CONST/const/.
3439 (bfd_check_format_matches): Accept archives that give
3440 bfd_error_wrong_object_format if no full match is found. Tidy
3441 code handling matching_vector. Don't return a pointer to freed
3442 memory in `matching'. Handle ambiguous matches as for partial
3444 * bfd-in2.h: Regenerate.
3446 2001-08-15 Alan Modra <amodra@bigpond.net.au>
3448 * libieee.h (common_header_type): Add last_byte field.
3450 * ieee.c: Add missing prototypes. Some format fixes.
3451 (struct output_buffer_struct): Move for availability to prototypes.
3452 (ieee_part_after): New function.
3453 (ieee_slurp_debug): Use it here.
3454 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
3455 ieee_part_after to set last_byte to one past end of current part.
3457 (ieee_pos): Pass in ieee_data_struct rather than bfd.
3459 (parse_expression): Don't go beyond the end of the current part.
3460 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
3461 (ieee_get_symtab_upper_bound, ieee_get_symtab,
3462 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
3463 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
3464 ieee_set_section_contents, ieee_write_object_contents,
3465 ieee_make_empty_symbol): Make static.
3466 (ieee_archive_p): Correct comments regarding bfd_read.
3467 (ieee_object_p): Similarly.
3468 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
3469 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
3470 input_bfd, output_bfd, output_buffer.
3471 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
3472 do_with_relocs, ie. as a symbol for relocatable files.
3473 (ieee_vec): Add comments showing functions referenced by macros.
3475 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
3477 * aout-tic30.c: Add missing prototypes. Fix formatting.
3478 * aout-ns32k.c: Add missing prototypes. Fix formatting.
3479 * peXXigen.c: Add missining prototypes. Fix formatting.
3480 * aout-adobe.c: Add missining prototypes. Fix formatting.
3482 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
3484 * elf32-v850.c: Add missing function prototypes.
3485 Fix some formatting.
3487 * cpu-v850.c: Add missing function prototype.
3488 Fix some formatting.
3490 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
3492 * elf-bfd.h (struct elf_backend_data): Add new fields
3493 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
3494 (bfd_elf_sprintf_vma): Rename function prototype to
3495 '_bfd_elf_sprintf_vma'.
3496 (bfd_elf_fprintf_vma): Rename function prototype to
3497 '_bfd_elf_fprintf_vma'.
3498 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
3499 directly, instead indirect via the elf_backend_data structure.
3500 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3501 instead indirect via the elf_backend_data structure.
3502 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3503 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3504 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3506 (elf_backend_fprintf_vma): Initialise if not already defined.
3507 (struct elf_backend_data): Initialise the
3508 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3510 2001-08-10 Andreas Jaeger <aj@suse.de>
3512 * elf64-sparc.c: Add missing prototypes.
3513 * elf32-cris.c: Likewise.
3514 * elf32-i370.c: Likewise.
3515 * elf64-hppa.c: Likewise.
3516 * elf64-s390.c: Likewise.
3518 2001-08-10 Andreas Jaeger <aj@suse.de>
3520 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3521 Add prototypes where needed.
3523 2001-08-10 H.J. Lu <hjl@gnu.org>
3525 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3526 (bfd_fprintf_vma): Likewise.
3528 2001-08-10 H.J. Lu <hjl@gnu.org>
3530 * bfd.c (bfd_sprintf_vma): Don't return void.
3531 (bfd_fprintf_vma): Likewise.
3533 2001-08-10 Andreas Jaeger <aj@suse.de>
3535 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3537 * configure: Regenerate.
3539 2001-08-10 Alan Modra <amodra@bigpond.net.au>
3541 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3542 warning if not BFD64. Add braces so emacs auto format works.
3543 (bfd_elf_fprintf_vma): Likewise.
3545 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3547 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3548 param to agree with libxcoff.h.
3549 (xcoff_swap_ldhdr_out): Likewise.
3550 (xcoff_swap_ldsym_in): Likewise.
3551 (xcoff_swap_ldsym_out): Likewise.
3552 (xcoff_swap_ldrel_in): Likewise.
3553 (xcoff_swap_ldrel_out): Likewise.
3554 (xcoff_create_csect_from_smclas): Likewise.
3555 * coff64-rs6000.c: Add missing prototypes.
3556 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3558 (xcoff64_swap_ldhdr_out): Likewise.
3559 (xcoff64_swap_ldsym_in): Likewise.
3560 (xcoff64_swap_ldsym_out): Likewise.
3561 (xcoff64_swap_ldrel_in): Likewise.
3562 (xcoff64_swap_ldrel_out): Likewise.
3563 (xcoff64_ppc_relocate_section): Make static.
3564 (xcoff64_slurp_armap): Likewise.
3565 (xcoff64_archive_p): Likewise.
3566 (xcoff64_openr_next_archived_file): Likewise.
3567 (xcoff64_sizeof_headers): Likewise.
3568 (xcoff64_is_lineno_count_overflow): Likewise.
3569 (xcoff64_is_reloc_count_overflow): Likewise.
3570 (xcoff64_loader_symbol_offset): Likewise.
3571 (xcoff64_loader_reloc_offset): Likewise.
3572 * elf64-gen.c: Add missing prototypes.
3574 2001-08-09 H.J. Lu <hjl@gnu.org>
3576 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3577 (bfd_elf_fprintf_vma): Likewise.
3579 2001-08-09 H.J. Lu <hjl@gnu.org>
3581 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3584 * bfd-in2.h: Regenerated.
3586 2001-08-09 H.J. Lu <hjl@gnu.org>
3588 * bfd-in.h (bfd_sprintf_vma): New prototype.
3589 (bfd_fprintf_vma): Likewise.
3590 (bfd_elf_sprintf_vma): Likewise.
3591 (bfd_elf_fprintf_vma): Likewise.
3592 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3593 * bfd-in2.h: Regenerated.
3595 * bfd.c (bfd_sprintf_vma): New. Defined.
3596 (bfd_fprintf_vma): Likewise.
3598 * elf.c (bfd_elf_sprintf_vma): New. Defined.
3599 (bfd_elf_fprintf_vma): Likewise.
3601 2001-08-09 Alan Modra <amodra@bigpond.net.au>
3603 * coff-rs6000.c: Add missing prototypes.
3604 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3605 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3606 xcoff_loader_reloc_offset): Make static.
3607 * dwarf1.c: Add missing prototypes.
3608 * dwarf2.c: Add missing prototypes.
3609 (struct abbrev_info): Move definition.
3610 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3611 * elf.c: Add missing prototypes.
3612 * elf32-gen.c: Likewise.
3613 * elf32-i386.c: Likewise.
3614 * elf32-ppc.c: Likewise.
3615 (ppc_elf_sort_rela): Use PTR instead of "void *".
3616 * elflink.h: Add missing prototypes. Formatting fixes.
3617 * merge.c: Add missing prototypes.
3618 (last4_eq): Use PTR instead of "void *".
3619 (last_eq): Likewise.
3620 * syms.c: Add missing prototypes.
3622 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3624 * bfd.c: Fix formatting.
3625 * bfd-in2.h: Regenerate.
3627 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3629 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3630 true (this target uses REL relocations) and 'pcrel_offset' to
3631 false (the PC is implied, not stored in the offset).
3633 2001-08-08 Alan Modra <amodra@bigpond.net.au>
3635 1999-10-19 Linus Nordberg <linus@swox.se>
3636 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3637 * elfxx-target.h (elf_backend_want_got_sym): Define.
3638 (elfNN_bed): Add elf_backend_want_got_sym.
3639 * elflink.c (_bfd_elf_create_got_section): Define
3640 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3642 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
3644 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3645 (find_rela_addend): New function.
3646 (parse_comp_unit): Call it to find the abbrev offset addend.
3647 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3648 members of dwarf2_debug as debugging information is read.
3650 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3652 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3653 targets as well as sh-pe.
3655 2001-08-03 Ben Harris <bjh21@netbsd.org>
3657 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3658 reloc from start of section when computing value for R_ARM_REL32
3661 2001-08-03 Alan Modra <amodra@bigpond.net.au>
3663 From H.J. Lu <hjl@gnu.org>
3664 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3665 keep relocs for undefined syms if there are no dynamic sections in
3667 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3669 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3671 * cofflink.c (coff_link_check_ar_symbols): also search for
3672 __imp__symbol as well as _symbol.
3673 * linker.c (_bfd_generic_link_add_archive_symbols): also
3674 search for __imp__symbol as well as _symbol.
3676 2001-08-01 Adam Nemet <anemet@lnxw.com>
3678 * elf.c (elf_sort_sections): Return zero only as the last step.
3680 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3682 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3684 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3685 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3688 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3690 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3691 to match corresponding bfd_coff_backend data member.
3693 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3695 * Makefile.am: Update dependencies with "make dep-am".
3696 * Makefile.in: Regenerate
3698 2001-07-15 H.J. Lu <hjl@gnu.org>
3700 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3701 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3702 * Makefile.in: Regenerate.
3704 2001-07-11 H.J. Lu <hjl@gnu.org>
3706 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3707 flags when creating the reloc section if the ALLOC flag in the
3708 source section is set.
3710 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3712 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3713 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3714 * bfd-in2.h: Regenerate.
3715 * libbfd.h: Regenerate.
3716 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3718 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3719 (elfNN_ia64_check_relocs): Likewise.
3720 (elfNN_ia64_install_value): Likewise.
3721 (elfNN_ia64_relocate_section): Likewise.
3723 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3725 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3727 (elf32_sparc_check_relocs): Likewise.
3728 Only create .rela section for alloced sections in shared libraries.
3729 (elf32_sparc_relocate_section): Likewise.
3730 Remove redundant check.
3731 Optimize unaligned reloc usage.
3732 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3735 2001-07-11 H.J. Lu <hjl@gnu.org>
3737 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3738 ALLOC|LOAD flags as the source section for debugging sections
3739 when creating the reloc section.
3741 2001-07-05 Jim Wilson <wilson@redhat.com>
3743 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3744 the section of the bigger symbol.
3746 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3748 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3750 * peicode.h (coff_swap_scnhdr_in): For sections containing
3751 uninitialised data, only set their size to s_paddr if this does
3752 not reset their size to zero. MS's latest compilers will set
3755 2001-07-04 H.J. Lu <hjl@gnu.org>
3757 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3758 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3761 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3763 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3765 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3766 sections being discarded.
3768 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3770 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3771 instead of _bfd_elfcore_section_from_phdr.
3772 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3773 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3774 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3775 (elfcore_grok_prstatus): Likewise.
3776 (elfcore_grok_lwpstatus): Likewise.
3777 (bfd_get_elf_phdr_upper_bound): Likewise.
3778 (elfcore_make_note_pseudosection): Formatting.
3779 (_bfd_elfcore_strndup): Formatting.
3780 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3781 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3783 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3785 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3786 and _bfd_elfcore_strndup.
3787 (struct elf_backend_data): Add elf_backend_grok_prstatus
3788 and elf_backend_grok_psinfo.
3789 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3790 (elfcore_grok_prstatus): Use it.
3791 (elfcore_make_note_pseudosection): Likewise.
3792 (elfcore_strndup): Rename to...
3793 (_bfd_elfcore_strndup): Here, and make global.
3794 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3795 (elfcore_grok_note): Call elf_backend_grok_prstatus
3796 and elf_backend_grok_psinfo if available.
3797 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3798 (_bfd_elf32_mips_grok_psinfo): New function.
3799 (elf_backend_grok_prstatus): Define.
3800 (elf_backend_grok_psinfo): Define.
3801 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3802 (elf_backend_grok_psinfo): Likewise.
3803 (elfNN_bed): Include elf_backend_grok_prstatus and
3804 elf_backend_grok_psinfo.
3806 2001-06-29 H.J. Lu <hjl@gnu.org>
3808 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3809 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3810 is NULL before filling PLT.
3812 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3814 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3816 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3818 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3820 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3821 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3824 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3825 (IS_ABSOLUTE_RELOC): Define.
3826 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3827 (hppa_link_hash_newfunc): Always init it.
3828 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3829 create COPY relocs only when the reloc is in a read-only section.
3830 Instead, allocate space for a dynamic reloc to reference the
3831 library symbol directly. Keep track of space we allocate using
3833 (hppa_discard_copies): Delete, and move code to..
3834 (allocate_plt_and_got): ..here. Rename to
3835 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3836 relocs for non-shared link.
3837 (elf32_hppa_size_dynamic_sections): Update calls to above.
3838 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3839 in lieu of COPY relocs.
3841 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3843 (elf_i386_adjust_dynamic_symbol): ..nor here..
3844 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3846 (elf_i386_size_dynamic_sections): Fix a comment.
3847 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3848 involved in writing reloc out.
3850 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3852 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3853 Ensure syms are dynamic if we might be emitting a reloc.
3854 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3855 for undefweak or undefined syms..
3856 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3858 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3859 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3860 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3861 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3863 2001-06-24 H.J. Lu <hjl@gnu.org>
3865 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3866 strncasecmp/strcasecmp instead of strncmp/strcmp.
3868 2001-06-23 H.J. Lu <hjl@gnu.org>
3870 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3871 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3872 in the regular object file and treat the weak definition as
3875 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3877 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3878 unresolved_reloc test to exclude cases where we use "relocation"
3879 before setting it to point into the .got. Reinstate fudge for
3880 unresolved relocs in debugging sections.
3882 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3883 complicated tests for unresolvable relocs with a simple direct
3884 scheme using "unresolved_reloc" var.
3886 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3887 elf_i386_dyn_relocs. Update comment.
3888 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3890 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3892 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3894 (elf_i386_size_dynamic_sections): Likewise.
3895 (elf_i386_finish_dynamic_symbol): Likewise.
3896 (elf_i386_finish_dynamic_sections): Likewise.
3897 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3900 Avoid creating COPY relocs if possible.
3901 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3902 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3903 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3904 reloc is in a read-only section. Instead, allocate space for a
3905 dynamic reloc to reference the library symbol directly. Keep
3906 track of space we allocate using pcrel_relocs_copied.
3907 (discard_copies): Delete, and move code to ..
3908 (allocate_plt_and_got): ..here. Rename to
3909 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3910 relocs for non-shared link.
3911 (elf_i386_size_dynamic_sections): Update calls to above functions.
3912 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3913 more ugly logic to avoid "unresolvable relocation" error. Use
3914 htab shortcut in place of elf_hash_table macro.
3915 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3916 not always be created now.
3918 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3920 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3923 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3925 * configure.host (mips64-*-linux): Reformat.
3927 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3929 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3930 allocate local .got space. Use shortcuts from hash table for .got
3931 and .plt rather than comparing section names.
3932 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3933 adjusting index into local_got_refcounts to document what we are
3935 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3936 Tidy .got and .plt error checking.
3938 2001-06-20 Catherine Moore <clm@redhat.com>
3940 * elf-bfd.h (struct elf_backend_data):
3941 elf_backend_emit_relocs: New field: Function for emitting
3943 elf_backend_count_relocs: New field: Function for determining
3944 the number of relocs to be emitted.
3945 * elfxx-target.h: Provide default (NULL) values for
3946 elf_backend_emit_relocs and elf_backend_count_relocs.
3947 * elflink.h (elf_link_size_reloc_section): Make the hash table
3948 big enough to hold the relocs counted by either reloc_count or
3950 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3951 should be emitted, either because of a command line option
3952 stored in the info structure or because the target provides a
3953 special reloc emitting function.
3954 If the target provides a reloc counting function use it,
3955 unless performing a relocatable link or emitting all relocs.
3956 Also set the SEC_RELOC flag on any output section which will
3958 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3959 should be emitted, either because of a command line option
3960 stored in the info structure or because the target provides a
3961 special reloc emitting function.
3962 If the target provides a reloc emitting function, use it,
3963 unless performing a relocatable link or emitting all relocs.
3965 2001-06-20 H.J. Lu <hjl@gnu.org>
3967 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3968 allocate local .got space.
3970 2001-06-19 Andreas Jaeger <aj@suse.de>
3972 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3975 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3977 * elflink.h (struct elf_assign_sym_version_info): Remove member
3978 export_dynamic. All users changed to use info member.
3979 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3980 export_dynamic, instead use member in parameter info.
3981 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3982 bfd_elf64_size_dynamic_sections): Update prototype.
3983 * bfd-in2.h: Regenerate.
3985 2001-06-18 H.J. Lu <hjl@gnu.org>
3987 * elflink.h (elf_info_failed): Add a new field, verdefs.
3988 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3990 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3993 2001-06-17 H.J. Lu <hjl@gnu.org>
3995 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3996 readonly_reloc, to record if a relocation in the .rel.dyn
3997 section is against a read-only section.
3998 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
4000 (_bfd_mips_elf_check_relocs): Record if there is a relocation
4001 in the .rel.dyn section against a read-only section by setting
4002 DF_TEXTREL or readonly_reloc.
4003 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
4005 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
4006 there is a relocation in the .rel.dyn section against a
4008 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
4011 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
4013 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
4014 function. Move flagword result into parameter list. Remove
4015 comment about setting bfd_error_handler to intercept failure
4017 * coffgen.c (make_a_section_from_file): Examine result of
4018 calling bfd_coff_styp_to_sec_flags and pass a failure back to
4020 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
4021 function. Move flagword result into parameter list.
4022 * libcoff.h: Regenerate.
4023 * libecoff.h: Regenerate.
4025 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
4027 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
4028 section is going to follow it.
4030 2001-06-12 Catherine Moore <clm@redhat.com>
4032 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
4033 with the file_align entry from elf_backend_data.
4034 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4035 (elf_gc_record_vtentry): Likewise.
4037 2001-06-10 Alan Modra <amodra@bigpond.net.au>
4039 * elflink.h: Whitespace changes.
4040 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
4041 rather than "unsigned char".
4042 (elf_link_output_relocs): Likewise.
4043 (elf_link_input_bfd): Likewise.
4044 (elf_reloc_link_order): LIkewise.
4045 * elf.c: s/CONST/const/. Whitespace changes.
4046 * elf32-mips.c: Formatting fix.
4048 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
4049 * Makefile.in: Regenerate.
4050 * po/Make-in: Remove trailing tab.
4052 2001-06-09 Philip Blundell <philb@gnu.org>
4054 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
4056 (elf32_arm_plt_entry): Likewise.
4058 2001-06-08 H.J. Lu <hjl@gnu.org>
4060 * elf.c (swap_out_syms): Keep names for global section symbols.
4062 2001-06-07 H.J. Lu <hjl@gnu.org>
4064 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
4065 MIPS-based machines need it.
4067 2001-06-07 H.J. Lu <hjl@gnu.org>
4069 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
4072 * config.bfd: Remove ecoff from Linux/mips.
4074 2001-06-07 Andreas Jaeger <aj@suse.de>
4076 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
4078 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
4079 alignment of 8 for .rela sections; handle further relocations.
4081 2001-06-06 Christian Groessler <cpg@aladdin.de>
4083 * coff-z8k.c: Fix formatting.
4084 Fix howtos: howto->size was always 1.
4086 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4088 * configure.host (mips64*-*-linux*): Define.
4090 2001-06-05 Alan Modra <amodra@bigpond.net.au>
4092 * elf32-i386.c (elf_i386_discard_copies): Rename to
4093 discard_copies, and use elf_link_hash_entry arg rather than
4094 elf_i386_link_hash_entry.
4095 (elf_i386_link_hash_traverse): Delete.
4096 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
4097 Tidy sizing of dynamic sections.
4098 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
4099 possible .plt entries.
4100 (elf_i386_gc_sweep_hook): Likewise.
4101 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
4102 everything with plt.refcount <= 0.
4104 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
4106 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
4107 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
4109 (allocate_plt_and_got): ..instead do it all here. New function.
4110 (elf_i386_size_dynamic_sections): Allocate local .got space and
4111 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
4112 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
4113 rather than gc variety).
4114 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4115 (elf_i386_relocate_section): Use it here and correct handling of
4116 R_386_GOT32. Provide section and offset for "unresolvable
4117 relocation" error message.
4118 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
4120 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
4121 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
4122 (elf_i386_link_hash_table_create): Init them.
4123 (create_got_section): New function.
4124 (elf_i386_create_dynamic_sections): New function.
4125 (elf_backend_create_dynamic_sections): Set to above.
4126 (elf_i386_check_relocs): Use shortcuts from hash table rather than
4127 calling bfd_get_section_by_name.
4128 (elf_i386_gc_sweep_hook): Likewise.
4129 (elf_i386_adjust_dynamic_symbol): Likewise.
4130 (elf_i386_size_dynamic_sections): Likewise.
4131 (elf_i386_relocate_section): Likewise.
4132 (elf_i386_finish_dynamic_sections): Likewise.
4134 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
4136 2001-06-02 H.J. Lu <hjl@gnu.org>
4138 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
4140 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
4142 2001-06-02 H.J. Lu <hjl@gnu.org>
4144 * aout-cris.c (MACHTYPE_OK): New. Defined.
4146 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
4148 * section.c (_bfd_strip_section_from_output): Handle NULL
4151 2001-06-02 H.J. Lu <hjl@gnu.org>
4153 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
4154 rs6000coff64_vec only if BFD64 is defined.
4155 (powerpc64-*-aix*): Enable only if BFD64 is defined.
4157 2001-06-02 H.J. Lu <hjl@gnu.org>
4159 * coff-ia64.c (ia64coff_object_p): Rewrite with
4160 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
4162 2001-06-01 Andreas Jaeger <aj@suse.de>
4164 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
4165 relocation, small reformatting.
4167 2001-05-29 Andreas Jaeger <aj@suse.de>
4169 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
4170 (elf64_x86_64_relocate_section): Likewise.
4172 2001-05-30 Alan Modra <amodra@one.net.au>
4174 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
4175 millicode. Don't allocate .got and .rela.got space here..
4176 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
4177 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
4179 (hppa_handle_PIC_calls): ..nor here..
4180 (allocate_plt_and_got): ..instead do it all here. New function.
4181 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
4182 call allocate_plt_and_got. No need to zap .got if not dynamic.
4183 (elf32_hppa_final_link): Call regular bfd_final_link instead of
4184 gc_common_final_link.
4185 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4186 (elf32_hppa_relocate_section): Use it here.
4187 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
4188 dynamic_sections_created.
4189 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
4191 2001-05-28 Andreas Jaeger <aj@suse.de>
4193 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
4194 generic version since we want a hashsize of 4.
4195 (elf_backend_size_info): Likewise.
4197 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4199 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
4201 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
4202 (elf_link_input_bfd): Likewise.
4203 (elf_reloc_link_order): Likewise.
4204 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
4205 relocations correctly.
4207 2001-05-28 Nicolas Pitre <nico@cam.org>
4209 * elf32-arm.h: fix PLT generation for big endian ARM
4211 2001-05-28 Alan Modra <amodra@one.net.au>
4213 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
4214 for symbols forced local that need plabels.
4215 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
4216 .plt.rela for local syms if non-shared.
4217 (hppa_build_one_stub): Mask lsb of plt.offset.
4218 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
4219 (clobber_millicode_symbols): Correct comment.
4220 (elf32_hppa_relocate_section): Likewise.
4221 (elf32_hppa_finish_dynamic_symbol): Likewise.
4223 2001-05-28 Jeff Sturm <jsturm@one-point.com>
4225 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
4226 * bfd-in2.h: Regenerate.
4227 * libbfd.h: Regenerate.
4228 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
4229 and BFD_RELOC_SPARC_UA64 mapping
4230 * elf64-sparc.c: Likewise.
4232 2001-05-25 H.J. Lu <hjl@gnu.org>
4234 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
4235 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
4236 (coff-rs6000.lo): Remove the old dependency.
4237 * Makefile.in: Rebuild.
4239 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
4242 2001-05-25 H.J. Lu <hjl@gnu.org>
4244 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
4245 rs6000coff_core_file_matches_executable_p,
4246 rs6000coff_core_file_failing_command and
4247 rs6000coff_core_file_failing_signal only if AIX_CORE is
4249 (pmac_xcoff_vec): Likewise.
4250 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4252 2001-05-25 Timothy Wall <twall@redhat.com>
4254 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
4255 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
4257 2001-05-25 H.J. Lu <hjl@gnu.org>
4259 * bfd-in2.h: Regenerated.
4260 * libcoff.h: Likewise.
4262 2001-05-25 Alan Modra <amodra@one.net.au>
4264 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
4265 undefined millicode syms in shared libs.
4266 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
4267 (elf32_hppa_check_relocs): Likewise.
4268 (elf32_hppa_adjust_dynamic_symbol): Likewise.
4269 (elf32_hppa_size_dynamic_sections): Likewise.
4270 (elf32_hppa_relocate_section): Likewise.
4271 (elf32_hppa_finish_dynamic_symbol): Likewise.
4272 (elf32_hppa_finish_dynamic_sections): Likewise.
4274 2001-05-24 Tom Rix <trix@redhat.com>
4276 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
4277 xcoff-target.h not used to define rs6000 or ppc bfd.
4280 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
4283 * coff-rs6000.c : Many changes for 64 bit support. Move common
4284 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
4287 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
4288 linker now supported. Explictly define the rs6000coff64_vec.
4290 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
4291 (coff_print_aux) same
4292 (coff_write_object_contents) same
4293 (coff_slurp_line_table) same
4295 * coffgen.c : (coff_fix_symbol_name) formatting
4296 (coff_mangle_symbols) xcoff 64 bit support
4297 (coff_write_symbol) same
4298 (coff_write_alien_symbol) same
4299 (coff_write_native_symbol) same
4300 (coff_write_symbols) same
4301 (coff_get_symbol_info) same
4302 (bfd_coff_get_syment) same
4303 (coff_print_symbol) same
4305 * config.bfd : add powerpc64-*-aix* target
4307 * libcoff-in.h : formatting
4309 * libcoff.h : move xcoff extern declarations to libxcoff.h
4311 * libxcoff.h : New file
4313 * xcofflink.c : Many changes for xcoff64 support. Move common
4314 structures to include/coff/xcoff.h. Move specific structure to
4315 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
4316 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
4318 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
4321 (xcoff_build_ldsyms) : handle special __rtinit symbol.
4323 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
4325 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
4328 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4330 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
4331 * libbfd.h: Regenerate.
4332 * bfd-in2.h: Regenerate.
4334 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
4335 * archures.c (bfd_mach_mips12000): Define.
4336 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
4337 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
4339 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
4340 * bfd-in2.h: Regenerate.
4341 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
4343 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
4345 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
4346 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
4347 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
4348 that is used by GCC.
4350 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4352 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
4353 of entries in a structured section.
4354 * elf.c: Use new macro.
4355 * elf32-i386.c: Use new macro.
4356 * elf32-mips.c: Use new macro.
4357 * elf64-alpha.c: Use new macro.
4358 * elf64-sparc.c: Use new macro.
4359 * elfcode.h: Use new macro.
4360 * elflink.h: Use new macro.
4362 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4364 * bfdint.texi: Replace -oformat with --oformat.
4366 2001-05-21 Andreas Jaeger <aj@suse.de>
4368 * dwarf2.c (decode_line_info): Fix error message.
4369 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
4370 adjust error message.
4372 2001-05-18 H.J. Lu <hjl@gnu.org>
4374 * elflink.h (elf_link_add_object_symbols): Revert the last
4377 2001-05-17 Alan Modra <amodra@one.net.au>
4379 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
4380 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
4381 (hppa_build_one_stub): Add an assert to check plt.offset.
4383 2001-05-17 H.J. Lu <hjl@gnu.org>
4385 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
4386 version definition to basename of the output filename.
4388 2001-05-17 H.J. Lu <hjl@gnu.org>
4390 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
4391 basename of the bfd filename.
4393 2001-05-16 Alan Modra <amodra@one.net.au>
4395 * section.c (asection): Add linker_has_input field.
4396 (STD_SECTION): Adjust initialization to suit.
4397 * ecoff.c (bfd_debug_section): Likewise.
4398 * bfd-in2.h: Regenerate.
4400 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
4402 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
4403 negative 32-bit operands to 16 operands when the operand is
4404 going to be zero-extended by the modified opcode.
4406 2001-05-12 Peter Targett <peter.targett@arccores.com>
4408 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
4409 name for 'arc5' core versions.
4410 (bfd_arc_arch): Make bfd_mach_arc_6 default.
4412 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
4414 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
4416 2001-05-11 Jakub Jelinek <jakub@redhat.com>
4418 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
4420 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
4421 to .gnu.linkonce.t.FOO text section.
4423 2001-05-11 Jakub Jelinek <jakub@redhat.com>
4425 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
4426 fields, change sec into secinfo.
4427 (struct sec_merge_info): Add chain, remove last fields.
4428 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
4429 (sec_merge_hash_lookup): If lookup could not use a string only
4430 because it has bad alignment, mark the old string for deletion.
4431 (sec_merge_add): Add secinfo argument. Don't compute entry's
4432 position, instead record the section.
4433 (sec_merge_emit): Update for the sec into secinfo change in
4434 struct sec_merge_hash_entry.
4435 (_bfd_merge_section): Only record the section for merging, defer
4436 putting strings into the hash table.
4437 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
4438 _bfd_merge_sections): New functions.
4439 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
4441 * libbfd-in.h (_bfd_merge_sections): Add prototype.
4442 (_bfd_nolink_bfd_merge_sections): Define.
4443 * libbfd.h: Likewise.
4444 (bfd_generic_merge_sections): Add prototype.
4445 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
4446 (struct bfd_target): Likewise.
4447 * bfd.c (bfd_merge_sections): Define.
4448 * bfd-in2.h: Rebuilt.
4449 * elf.c (_bfd_elf_merge_sections): New function.
4450 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
4451 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
4452 * reloc.c (bfd_generic_merge_sections): New function.
4453 * vms.c (vms_bfd_merge_sections): New function.
4454 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
4455 * aout-target.h (MY_bfd_merge_sections): Define.
4456 * aout-tic30.c (MY_bfd_merge_sections): Define.
4457 * binary.c (binary_bfd_merge_sections): Define.
4458 * bout.c (b_out_bfd_merge_sections): Define.
4459 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
4460 * coffcode.c (coff_bfd_merge_sections): Define.
4461 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
4462 * i386msdos.c (msdos_bfd_merge_sections): Define.
4463 * i386os9k.c (os9k_bfd_merge_sections): Define.
4464 * ieee.c (ieee_bfd_merge_sections): Define.
4465 * ihex.c (ihex_bfd_merge_sections): Define.
4466 * nlm-target.h (nlm_bfd_merge_sections): Define.
4467 * oasys.c (oasys_bfd_merge_sections): Define.
4468 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
4469 * som.c (som_bfd_merge_sections): Define.
4470 * srec.c (srec_bfd_merge_sections): Define.
4471 * tekhex.c (tekhex_bfd_merge_sections): Define.
4472 * versados.c (versados_bfd_merge_sections): Define.
4473 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
4475 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
4477 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
4478 to be unsigned long, in order to match its use.
4480 2001-05-10 H.J. Lu <hjl@gnu.org>
4482 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
4485 2001-05-09 H.J. Lu <hjl@gnu.org>
4487 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
4488 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
4489 Remove the unused veriable `dynver'.
4491 2001-05-08 Ian Lance Taylor <ian@zembu.com>
4493 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
4494 NULL or is not COFF.
4495 (coff_i386_rtype_to_howto): Don't dump core if output section
4498 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4500 * ecoff.c (bfd_debug_section): Fix initialization.
4501 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4502 is always a positive integer. Cast away sign mismatch.
4503 * elf32-mips.c: Fix misleading comment and typo.
4504 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4506 * elflink.c: Fix typo.
4507 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4508 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4510 2001-05-04 Richard Henderson <rth@redhat.com>
4512 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4514 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
4516 * elf32-arm.h (elf32_arm_final_link_relocate): Set
4517 EF_ARM_HASENTRY if the start address is set.
4519 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
4521 * targets.c (_bfd_target_vector_entries): Compute value based on
4522 the size of the _bfd_target_vector and not bfd_target_vector.
4524 2001-05-03 H.J. Lu <hjl@gnu.org>
4526 * elfcode.h: Include "libiberty.h".
4528 * elflink.h (elf_link_add_object_symbols): Set
4529 elf_dt_name (abfd) to basename of the bfd filename.
4530 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4531 of the bfd filename.
4533 2001-05-03 Andreas Jaeger <aj@suse.de>
4535 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4536 (elf_generic_info_to_howto_rel): Likewise.
4537 * coff-alpha.c (reloc_nil): Likewise.
4538 (alpha_ecoff_bad_format_hook): Likewise.
4539 (alpha_adjust_reloc_out): Likewise.
4540 (alpha_bfd_reloc_type_lookup): Likewise.
4541 (alpha_convert_external_reloc): Likewise.
4542 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4543 (elf64_alpha_reloc_bad): Likewise.
4544 (elf64_alpha_reloc_gpdisp): Likewise.
4545 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4546 (elf64_alpha_info_to_howto): Likewise.
4547 (elf64_alpha_add_symbol_hook): Likewise.
4548 (elf64_alpha_create_got_section): Likewise.
4549 (elf64_alpha_is_local_label_name): Likewise.
4550 (elf64_alpha_merge_ind_symbols): Likewise.
4551 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4552 (mips_elf64_get_reloc_upper_bound): Likewise.
4553 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4554 (nlm_alpha_get_public_offset): Likewise.
4556 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
4558 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4559 about overflow in R_OPENRISC_LO_16_IN_INSN and
4560 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4562 2001-04-30 H.J. Lu <hjl@gnu.org>
4564 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4565 only for ELF_LINK_FORCED_LOCAL.
4566 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4567 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4568 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4570 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4571 if the symbol has hidden or internal visibility.
4573 2001-04-30 Alan Modra <amodra@one.net.au>
4575 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4576 calls to undefined weak symbols.
4578 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4580 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4581 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4583 2001-04-27 Andreas Jaeger <aj@suse.de>
4585 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4586 out handled entries.
4587 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4588 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4589 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4592 2001-04-27 Sean McNeil <sean@mcneil.com>
4594 * config.bfd: Add arm-vxworks target.
4595 * coff-arm (coff_arm_relocate_section): Add in symbol value to
4596 addend (fro VXworks targets).
4598 2001-04-26 H.J. Lu <hjl@gnu.org>
4600 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4603 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
4605 * bfd-in.h (bfd_cache_close): Declare newly exported function.
4606 * bfd-in2.h: Regenerated.
4608 2001-04-24 Jakub Jelinek <jakub@redhat.com>
4610 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4611 (struct sec_merge_hash): Remove alignment_power.
4612 (sec_merge_hash_newfunc): Clear alignment.
4613 (sec_merge_hash_lookup): Pass alignment as argument.
4614 Use hashp->root.next, not hashp->next to walk the hash chain.
4615 If a string already in the hashtable does not have required
4616 alignment, create a new hashtable entry.
4617 (sec_merge_init): Remove alignment_power argument.
4618 (sec_merge_add): Add alignment argument.
4619 (sec_merge_emit): Alignment is now a per-entity thing, not per
4621 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4622 for proper alignment.
4623 Pass alignment information to sec_merge_add.
4625 2001-04-24 Christian Groessler <cpg@aladdin.de>
4627 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4628 and R_REL16 reloc types; accept odd values for R_REL16 type
4630 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
4632 * cpu-openrisc.c: New file.
4633 * elf32-openrisc.c: Likewise.
4635 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4636 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4637 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4638 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4639 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4640 * Makefile.in: Regenerated.
4641 * config.bfd: (openrisc-*-elf): New target.
4642 * configure.in (bfd_elf32_openrisc_vec): New vector.
4643 * configure: Regenerated.
4644 * libbfd.h: Regenerated.
4645 * bfd-in2.h: Regenerated.
4646 * reloc.c: Add OpenRISC relocations.
4647 * targets.c (bfd_elf32_openrisc_vec): Declare.
4648 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4649 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4650 (bfd_openrisc_arch): Declare.
4651 (bfd_archures_list): Add bfd_openrisc_arch.
4652 * elf.c (prep_headers): Add bfd_arch_openrisc.
4654 2001-04-23 Bo Thorsen <bo@suse.de>
4656 * elf64-x86-64.c: Add c++ vtable hack.
4657 Small whitespace and comment changes.
4659 2001-04-19 Andreas Jaeger <aj@suse.de>
4661 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4662 (elf64_x86_64_plt_entry): Likewise.
4663 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4664 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4666 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
4668 * elf32-cris.c: Tweak comments related to dynamic linking.
4669 (cris_elf_relocate_section): When not creating shared object, fill
4670 in the .got table for any symbol not in the dynamic symbol table.
4671 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4672 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4674 (cris_elf_check_relocs): Use variable r_type in all places rather
4675 than the original expression. Add default case in switch for
4677 (elf_cris_size_dynamic_sections): Iterate over
4678 elf_cris_discard_excess_program_dynamics when not creating shared
4680 (elf_cris_discard_excess_dso_dynamics): Renamed from
4681 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4682 (elf_cris_discard_excess_program_dynamics): New.
4684 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4686 * coffcode.h (coff_write_object_contents): Use
4687 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4689 2001-04-14 H.J. Lu <hjl@gnu.org>
4691 * bfd-in2.h: Regenerate.
4693 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4695 * section.c (STD_SECTION): Add entsize.
4697 2001-04-13 H.J. Lu <hjl@gnu.org>
4699 * section.c (SEC_MERGE): Define new flag for merging.
4700 (SEC_STRINGS): Likewise.
4701 (entsize): New field.
4703 2001-04-13 Roger Sayle <roger@metaphorics.com>
4705 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4706 flag on pe-i386 targets.
4708 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4710 * libbfd-in.h (_bfd_merge_section): New.
4711 (_bfd_write_merged_section): New.
4712 (_bfd_merged_section_offset): New.
4713 * libbfd.h: Rebuilt.
4714 * linker.c (_bfd_generic_link_output_symbols): Handle
4716 * aoutx.h (aout_link_write_symbols): Likewise.
4717 * pdp11.c (aout_link_write_symbols): Likewise.
4718 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4719 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4721 (elf_link_sec_merge_syms): New.
4722 (elf_link_input_bfd): Call _bfd_merged_section_offset
4723 and _bfd_write_merged_section.
4724 Handle discard_sec_merge.
4725 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4727 (struct bfd_elf_section_data): Likewise.
4728 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4729 SEC_STRINGS section flags and entsize from their ELF counterparts.
4730 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4731 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4732 from their BFD counterparts.
4733 * merge.c: New file.
4734 * Makefile.am: Add strtab.lo.
4735 * Makefile.in: Rebuilt.
4737 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4739 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4740 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4742 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4744 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4745 endian MIPS ELF target.
4746 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4749 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4750 64bit big endian MIPS ELF target.
4751 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4752 endian MIPS ELF target.
4753 * configure: Regenerated.
4755 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4756 little endian targets.
4757 (mips_elf_sym_is_global): Handle traditional targets.
4759 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4760 64bit big endian MIPS ELF target.
4761 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4762 endian MIPS ELF target.
4764 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4765 and bfd_elf64_tradlittlemips_vec.
4767 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4769 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4770 ordinary "progbits" section.
4772 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4774 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4775 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4777 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4779 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4781 2001-03-30 H.J. Lu <hjl@gnu.org>
4783 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4784 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4786 2001-03-26 H.J. Lu <hjl@gnu.org>
4788 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4789 if there are any relocations for generic ELF.
4790 (bfd_elf32_bfd_link_add_symbols): Defined to
4791 elf32_generic_link_add_symbols.
4792 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4793 if there are any relocations for generic ELF.
4794 (bfd_elf64_bfd_link_add_symbols): Defined to
4795 elf64_generic_link_add_symbols.
4797 2001-03-23 Nick Clifton <nickc@redhat.com>
4799 * Makefile.am (BUILD_CFILES): New variable: List of C source
4800 files created in build directory.
4801 (BUILD_HFILES): New variable: List of header files created in
4804 (po/POTFILES.in): Replace rule with empty entry.
4805 (po/SRC-POTFILES.in): New rule: Create a list of source files
4806 in the source directory.
4807 (po/BLD-POTFILES.in): New rule: Create a list of source files
4808 in the build directory.
4809 (MOSTLYCLEAN): Do not delete source files created in build
4811 * Makefile.in: Regenerate.
4812 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4814 * configure: Regenerate.
4816 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4818 Add .. to the search path when building bfd.pot.
4819 Delete POTFILES when performing distclean.
4820 Add comment describing why distclean is broken in maintainer mode.
4821 * po/POTFILES.in: Delete.
4822 * po/SRC-POTFILES.in: New file.
4823 * po/BLD-POTFILES.in: New file.
4824 * po/bfd.pot: Regenerate.
4826 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4828 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4829 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4830 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4831 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4832 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4833 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4835 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4836 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4837 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4838 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4839 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4840 New HOWTO members for new relocs.
4841 (cris_reloc_map): Map new relocs.
4842 (ELF_DYNAMIC_INTERPRETER): Define.
4843 (PLT_ENTRY_SIZE): Define.
4844 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4845 elf_cris_pic_plt_entry): New, PLT templates.
4846 (struct elf_cris_pcrel_relocs_copied, struct
4847 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4848 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4849 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4850 positive values. Adjust PCREL relocs to be relative to location
4852 (cris_elf_relocate_section): Handle relocations to dynamic
4853 objects. Handle new relocations. Call error handler when seeing
4854 non-PIC relocation for read-only sections while generating shared
4856 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4858 (bfd_elf32_bfd_link_hash_table_create,
4859 elf_backend_adjust_dynamic_symbol,
4860 elf_backend_size_dynamic_sections,
4861 elf_backend_finish_dynamic_symbol,
4862 elf_backend_finish_dynamic_sections,
4863 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4864 elf_backend_hide_symbol, elf_backend_want_got_plt,
4865 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4866 elf_backend_got_header_size, elf_backend_plt_header_size):
4869 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4870 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4871 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4872 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4873 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4874 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4875 * bfd-in2.h, libbfd.h: Regenerate.
4877 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4879 (_bfd_mips_elf_relocate_section): Give a better error message when
4880 a relocation is not recognized.
4882 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4884 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4885 non-NULL before attempting to dereference.
4887 2001-03-20 H.J. Lu <hjl@gnu.org>
4889 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4890 * configure: Rebuild.
4892 2001-03-20 Andreas Schwab <schwab@suse.de>
4894 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4895 relocation value when resolving a reference from a debugging
4898 2001-03-16 Scott Thomason <SThomaso@hii.com>
4900 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4901 (xcoff64_swap_sym_out): Fix syntax errors.
4903 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4905 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4907 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4909 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4910 (hppa_link_hash_newfunc): Init it.
4911 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4912 section appears to be non-PIC.
4913 (final_link_relocate): Likewise.
4914 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4915 possible candidate function, and set pic_call for those that will
4916 only have a .plt entry for the PIC call stub.
4917 (hppa_handle_PIC_calls): Set maybe_pic_call.
4919 2001-03-12 DJ Delorie <dj@redhat.com>
4921 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4922 R_SH_DIR8WP* relocs if they're against external symbols, else
4923 they're just for relaxing. Validate the reloc values.
4925 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4927 * binary.c (bfd_external_binary_architecture): Declare.
4928 (binary_object_p): If bfd_external_binary_architecture is defined,
4929 set the architecture to this string.
4931 2001-03-11 Philip Blundell <philb@gnu.org>
4933 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4934 entries that could serve as a definition for a weak symbol.
4936 2001-03-08 Nick Clifton <nickc@redhat.com>
4938 * Most files: Update copyright notices using Perl script created
4939 by Kevin Buettner <kevinb@redhat.com>.
4941 2001-03-07 Nick Clifton <nickc@redhat.com>
4943 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4944 prior patch on ! defined OLD_ARM_ABI.
4946 2001-03-07 Andreas Jaeger <aj@suse.de>
4948 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4949 some relocation values.
4951 2001-03-06 Nick Clifton <nickc@redhat.com>
4953 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4954 of offset in BLX(1) instruction.
4955 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4956 offset in BLX(1) instruction.
4959 2001-03-06 Nick Clifton <nickc@redhat.com>
4961 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4962 BFD_RELOC_THUMB_PCREL_BLX.
4964 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4966 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4967 * bfd-in2.h: Regenerate.
4968 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4969 * ieee.c (ieee_write_processor): Set proper id for
4972 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4974 * configure.in: Add s390 target.
4975 * configure: Regenerate.
4977 2001-02-28 Andreas Jaeger <aj@suse.de>
4979 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4982 2001-02-28 Philip Blundell <pb@futuretv.com>
4984 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4985 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4987 2001-02-27 H.J. Lu <hjl@gnu.org>
4989 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4990 abfd->tdata.aout_data == NULL.
4992 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4994 * elf32-hppa.c: Correct field selector in stub comments.
4995 (clobber_millicode_symbols): Formatting fix.
4997 * configure.in: Bump version to 2.11.90.
4998 * configure: Regenerate.
4999 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
5000 (CFILES): $SOURCE_CFILES + generated C files.
5001 (POTFILES): Include $HFILES not $SOURCE_HFILES.
5003 * Makefile.in: Regenerate.
5004 * doc/Makefile.in: This too.
5006 2001-02-26 Timothy Wall <twall@cygnus.com>
5008 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
5011 2001-02-26 Nick Clifton <nickc@redhat.com>
5013 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
5014 up, replacing multiple if statements with a switch.
5015 (handle_COMDAT): New function.
5017 2001-02-26 H.J. Lu <hjl@gnu.org>
5019 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
5020 a warning for section flags we do not handle instead of
5023 2001-02-26 Andreas Jaeger <aj@suse.de>
5025 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
5027 2001-02-22 Timothy Wall <twall@cygnus.com>
5029 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
5030 * configure.in: Add objects for elf64_ia64_aix vectors.
5031 * configure: Regenerated.
5032 * configure.host: Recognize ia64-*-aix*.
5033 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
5034 for AIX. AIX5 requires most relocations to be dynamic (*all*
5035 binaries are somewhat similar to shared libraries).
5036 * targets.c: Add elf64_ia64_aix vectors.
5038 2001-02-21 David Mosberger <davidm@hpl.hp.com>
5040 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
5041 C8 said "1" instead of "8". Clarify error string for IMM22:
5042 "signed integer" instead of just "integer".
5044 2001-02-20 Andreas Jaeger <aj@suse.de>
5046 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
5047 PLT entries that could serve as a definition for a weak symbol.
5049 2001-02-19 Jakub Jelinek <jakub@redhat.com>
5051 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
5052 entries that could serve as a definition for a weak symbol.
5053 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
5055 2001-02-18 David O'Brien <obrien@FreeBSD>
5057 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
5058 FreeBSD/i386-CURRENT differently until I can figure out the needed
5060 * configure: Regenerate.
5061 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
5062 FreeBSD/PowerPC, and FreeBSD/sparc64.
5064 2001-02-18 lars brinkhoff <lars@nocrew.org>
5066 * Makefile.am: Add PDP-11 a.out target.
5067 * config.bfd: Likewise.
5068 * configure.in: Likewise.
5069 * targets.c: Likewise.
5070 * archures.c: Likewise.
5071 * bfd-in2.h: Likewise. Add PDP-11 relocations.
5072 * libbfd.h: Add PDP-11 relocations.
5073 * reloc.c: Likewise.
5074 * cpu-pdp11.c: New file.
5075 * pdp11.c: New file.
5077 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
5078 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
5079 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
5080 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
5081 (GET_MAGIC): New macro.
5082 (PUT_MAGIC): Likewise.
5083 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
5085 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
5087 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
5088 multiarch needs it).
5090 2001-02-18 H.J. Lu <hjl@gnu.org>
5092 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
5095 2001-02-18 Kazu Hirata <kazu@hxi.com>
5097 * vms-misc.c: Fix formatting.
5099 2001-02-16 Kazu Hirata <kazu@hxi.com>
5101 * vms.c: Fix formatting.
5103 2001-02-14 H.J. Lu <hjl@gnu.org>
5105 * elf.c (elf_find_function): New function.
5106 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
5107 the file name and function name.
5109 2001-02-14 Nick Clifton <nickc@redhat.com>
5111 * ecoff.c (bfd_debug_section): Update to initialise new fields in
5114 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
5115 (BFD64_BACKENDS): Add pepigen.c
5116 Add rules to create peigen.c and pepigen.c from peXXigen.c.
5118 * Makefile.in: Regenerate.
5119 * configure: Regenerate.
5120 * po/POTFILES.in: Regenerate.
5121 * po/bfd.pot: Regenerate.
5123 2001-02-14 H.J. Lu <hjl@gnu.org>
5125 * libcoff-in.h (pe_tdata): Add members target_subsystem and
5126 force_minimum_alignment.
5128 2001-02-14 Bo Thorsen <bo@suse.de>
5130 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
5131 (elf64_86_64_size_info): Struct added to fix a problem
5132 with the hashtable string entries.
5133 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
5134 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
5135 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
5136 remove the FIXME for this.
5137 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
5138 section. Also removed the FIXME for it.
5139 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
5140 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
5141 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
5143 2001-02-13 Richard Henderson <rth@redhat.com>
5145 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
5146 and not user provided.
5148 2001-02-13 Kazu Hirata <kazu@hxi.com>
5150 * vms.c (vms_print_symbol): Remove unreachable code.
5152 * rs6000-core.c: Fix formatting.
5154 2001-02-13 David Mosberger <davidm@hpl.hp.com>
5156 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
5157 as _bfd_XXi_only_swap_filehdr_out.
5158 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
5159 pe->force_minimum_alignment to TRUE.
5160 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
5161 PEI_TARGET_SUBSYSTEM.
5162 (pe_print_private_bfd_data): Call
5163 _bfd_XX_print_private_bfd_data_common() instead of
5164 _bfd_pe_print_private_bfd_data_common().
5165 (pe_bfd_copy_private_bfd_data): Call
5166 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
5167 _bfd_pe_bfd_copy_private_bfd_data_common().
5168 (coff_bfd_copy_private_section_data): Define as
5169 _bfd_XX_bfd_copy_private_section_data instead of
5170 _bfd_pe_bfd_copy_private_section_data.
5171 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
5172 of a _bfd_pe_get_symbol_info.
5176 * peXXigen.c: Renamed from peigen.c.
5177 (COFF_WITH_XX): Define this macro (will get expanded into
5178 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
5179 compiled as peigen.c or pepigen.c.
5180 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
5181 define the canonical PEP structures and definitions.
5182 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
5183 effect, enforce minimum file and section alignments. If
5184 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
5185 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
5186 so, by default, this is a no-op).
5188 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
5189 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
5190 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
5191 _bfd_pefoo if it's not defined. Use these macros to define
5194 * libcoff.h (pe_tdata): Add members target_subsystem and
5195 force_minimum_alignment.
5197 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
5199 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
5201 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
5204 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
5205 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
5208 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
5209 (BFD64_BACKENDS_CFILES): Mention pepigen.c
5210 (peigen.c): Add rule to generate from peXXigen.c.
5212 (pepigen.lo): List dependencies for pepigen.lo.
5214 2001-02-13 Alan Modra <alan@linuxcare.com.au>
5216 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
5217 $global$ referenced but not defined, set its value here.
5219 2001-02-09 Bo Thorsen <bo@suse.de>
5221 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
5223 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
5225 (elf64_x86_64_relocate_section): Fix formatting.
5226 (elf64_x86_64_relocate_section): Fix addend for relocation of
5227 R_X86_64_(8|16|32|PC8|PC16|PC32).
5229 2001-02-12 Jan Hubicka <jh@suse.cz>
5231 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
5233 2001-02-11 H.J. Lu <hjl@gnu.org>
5235 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
5238 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5240 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
5241 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
5242 relocations against dynsym symbols.
5244 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
5245 the R_MIPS_26 relocation.
5246 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
5247 the R_MIPS_26 relocation.
5248 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
5250 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
5251 the R_MIPS_26 relocation.
5252 (mips_elf64_howto_table_rela): Likewise.
5254 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
5255 member to mark symbols that have non-CALL relocations against
5257 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
5258 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
5260 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
5261 non-CALL relocation against it is encountered.
5262 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
5263 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
5264 no_fn_stub is not set.
5266 * elf32-mips.c (mips_elf_output_extsym): Get the output section
5267 information from the real symbol for indirect ones.
5268 Check no_fn_stub to find out if a symbol has a function stub
5271 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5273 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
5274 * Makefile.in: Regenerate.
5276 2001-02-09 David Mosberger <davidm@hpl.hp.com>
5278 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
5279 true if section name is an unwind table section name.
5280 (elfNN_ia64_additional_program_headers): Count each unwind section
5282 (elfNN_ia64_modify_segment_map): Install one unwind program header
5283 for each unwind separate section. Note: normally the linker
5284 script merges the unwind sections that go into a single segment,
5285 so this still generates at most one unwind program header per
5288 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
5289 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
5290 (elfNN_ia64_fake_sections): Mark sections with names that start
5291 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
5294 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
5295 Use it to make sh_info in unwind section point to the text section
5298 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
5300 * Makefile.am: Add linux target for S/390.
5301 * archures.c: Likewise.
5302 * bfd-in2.h: Likewise.
5303 * config.bfd: Likewise.
5304 * configure.in: Likewise.
5306 * libbfd.h: Likewise.
5307 * targets.c: Likewise.
5308 * cpu-s390.c: New file.
5309 * elf32-s390.c: New file.
5310 * elf64-s390.c: New file.
5312 2001-02-09 Nick Clifton <nickc@redhat.com>
5314 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
5315 ImageBase. This has already been done by coff_swap_hdr_in.
5317 2001-02-09 Jakub Jelinek <jakub@redhat.com>
5319 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
5321 2001-02-09 Jakub Jelinek <jakub@redhat.com>
5323 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
5324 (sparc64_elf_relocate_section): Likewise.
5326 2001-02-09 Mark Kettenis <kettenis@gnu.org>
5328 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
5329 similar to R_SPARC_32.
5330 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
5332 2001-02-08 H.J. Lu <hjl@gnu.org>
5334 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
5335 relocation entries for weak definitions when building DSO with
5338 2001-02-08 Richard Henderson <rth@redhat.com>
5340 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
5341 before visibility. Locally defined protected symbols are not
5344 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
5346 * config.bfd: Enable coff64 for rs6000-*. Patch from
5347 <hzoli@austin.ibm.com>.
5349 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
5351 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
5352 found, do not attempt to find dwarf2 info before returning.
5354 2001-02-07 Jakub Jelinek <jakub@redhat.com>
5356 * elflink.h (is_global_symbol_definition): Rename to
5357 is_global_data_symbol_definition and have it reject function
5359 (elf_link_is_defined_archive_symbol): Use renamed function.
5361 2001-02-07 Todd Vierling <tv@wasabisystems.com>
5363 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
5364 * libbfd.h (bfd_target_vector): Likewise.
5365 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
5366 make static; create pointer reference named bfd_target_vector.
5367 (_bfd_target_vector_entries): Calculate this based on the array
5368 typed _bfd_target_vector.
5370 2001-02-06 H.J. Lu <hjl@gnu.org>
5372 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
5373 internal symbols are not dynamic.
5374 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
5376 2001-02-06 Nick Clifton <nickc@redhat.com>
5378 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
5379 that it will not be pulled into the list of files that make up
5381 * Makefile.in: Regenerate.
5382 * po/bfd.pot: Regenerate.
5384 2001-02-06 H.J. Lu <hjl@gnu.org>
5386 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
5388 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
5389 external_PEI_IMAGE_hdr.
5391 2001-02-06 Kazu Hirata <kazu@hxi.com>
5393 * elf-m10200.c: Fix formatting.
5395 2001-02-04 Nick Clifton <nickc@redhat.com>
5397 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
5398 rel, it will be handled later on.
5400 2001-02-02 Fred Fish <fnf@ninemoons.com>
5402 * Makefile.in: Fix typo.
5404 2001-02-01 Kazu Hirata <kazu@hxi.com>
5406 * elf-m10300.c: Fix formatting.
5408 2001-01-30 Alan Modra <alan@linuxcare.com.au>
5410 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
5411 (elf_backend_get_symbol_type): Define.
5412 (elf64_hppa_object_p): Set architecture and machine from elf
5415 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
5417 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
5420 2001-01-26 Richard Henderson <rth@redhat.com>
5422 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
5423 for non-default visibility.
5424 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
5425 delete ugly macro and replace with pretty function.
5427 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
5429 * coff-go32.c: Update copyright.
5430 * coff-stgo32.c: Likewise.
5431 * coff-go32.c (COFF_LONG_FILENAMES): Define.
5432 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
5433 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
5434 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5436 2001-01-25 Kazu Hirata <kazu@hxi.com>
5438 * bfd-in2.h: Rebuild.
5439 * libbfd.h: Likewise.
5441 2001-01-23 H.J. Lu <hjl@gnu.org>
5443 * bfd-in2.h: Rebuild.
5445 2001-01-23 H.J. Lu <hjl@gnu.org>
5447 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
5448 is NULL or PRIV(vms_rec) is outside of the buffer.
5450 2001-01-23 Kazu Hirata <kazu@hxi.com>
5452 * coff64-rs6000.c: Fix formatting.
5453 * coff-arm.c: Likewise.
5454 * coffgen.c: Likewise.
5455 * cofflink.c: Likewise.
5456 * coff-mcore.c: Likewise.
5457 * coff-mips.c: Likewise.
5458 * coff-pmac.c: Likewise.
5459 * coff-ppc.c: Likewise.
5460 * coff-rs6000.c: Likewise.
5461 * elf32.c: Likewise.
5462 * elf32-fr30.c: Likewise.
5463 * elf32-i370.c: Likewise.
5464 * elf32-i860.c: Likewise.
5465 * elf32-m32r.c: Likewise.
5466 * elf32-m68k.c: Likewise.
5467 * elf32-mcore.c: Likewise.
5468 * elf32-ppc.c: Likewise.
5469 * elf32-sh.c: Likewise.
5470 * elf32-v850.c: Likewise.
5471 * elf64-alpha.c: Likewise.
5472 * elf64-sparc.c: Likewise.
5473 * elflink.c: Likewise.
5474 * elflink.h: Likewise.
5475 * elf-m10200.c: Likewise.
5476 * elf-m10300.c: Likewise.
5477 * elfxx-ia64.c: Likewise.
5479 * aoutx.h: Fix formatting.
5481 * bfd-in2.h: Likewise.
5482 * bfd-in.h: Likewise.
5483 * cpu-i386.c: Likewise.
5484 * cpu-m68hc11.c: Likewise.
5485 * dwarf2.c: Likewise.
5486 * elf64-x86-64.c: Likewise.
5487 * format.c: Likewise.
5488 * freebsd.h: Likewise.
5490 * hp300hpux.c: Likewise.
5491 * hppabsd-core.c: Likewise.
5492 * hpux-core.c: Likewise.
5494 2001-01-22 Bo Thorsen <bo@suse.de>
5496 * elf64-x86-64.c: Added PIC support for X86-64.
5497 (elf64_x86_64_link_hash_newfunc): Function added.
5498 (elf64_x86_64_link_hash_table_create): Likewise.
5499 (elf64_x86_64_check_relocs): Likewise.
5500 (elf64_x86_64_gc_mark_hook): Likewise.
5501 (elf64_x86_64_gc_sweep_hook): Likewise.
5502 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5503 (elf64_x86_64_size_dynamic_sections): Likewise.
5504 (elf64_x86_64_discard_copies): Likewise.
5505 (elf64_x86_64_finish_dynamic_symbol): Likewise.
5506 (elf64_x86_64_finish_dynamic_sections): Likewise.
5507 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5509 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5511 * Makefile.am (install-data-local): Make use of $(DESTDIR).
5512 * Makefile.in: Regenerate.
5514 2001-01-21 Kazu Hirata <kazu@hxi.com>
5516 * coff-a29k.c: Fix formatting.
5518 2001-01-19 H.J. Lu <hjl@gnu.org>
5520 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5521 relocation section names.
5522 (elf_i386_relocate_section): Report files with bad relocation
5523 section names and return false.
5525 2001-01-17 Bo Thorsen <bo@suse.de>
5527 * targets.c: Alphabetize list of xvecs.
5529 2001-01-14 Alan Modra <alan@linuxcare.com.au>
5531 * config.bfd: Add linux target variant for elfxx-hppa.
5532 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5533 bfd_elf64_hppa_linux_vec.
5534 * configure: Regenerate.
5535 * elf64-hppa.c: Include elf64-target.h again to support linux
5537 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5538 * elf32-hppa.c: Include elf32-target.h again to support linux
5540 (elf32_hppa_post_process_headers): New function.
5541 (elf_backend_post_process_headers): Define.
5542 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5543 bfd_elf32_hppa_linux_vec.
5545 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5546 and data_segment_base fields.
5547 (elf32_hppa_link_hash_table_create ): Init them.
5548 (elf32_hppa_check_relocs): Update comments.
5549 (hppa_record_segment_addr): New function.
5550 (elf32_hppa_relocate_section): Call it.
5551 (final_link_relocate): Handle R_PARISC_SEGREL32.
5552 (elf32_hppa_final_link): New function.
5553 (bfd_elf32_bfd_final_link): Define to call it.
5554 (hppa_unwind_entry_compare): New function.
5555 * cache.c (bfd_open_file): Create files in write+read mode.
5557 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5558 SEGREL32 and numerous other relocs. Change duplicate
5559 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5561 * opncls.c (bfd_fdopenr): Add parens like the comment says around
5564 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5565 .plt entries for DT_INIT and DT_FINI.
5566 (elf32_hppa_finish_dynamic_sections): Remove special handling of
5567 DT_INIT and DT_FINI.
5569 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5570 offsets for stub .plt access if wide mode. Check offset in range.
5572 2001-01-13 Nick Clifton <nickc@redhat.com>
5574 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5577 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5580 2001-01-12 Alan Modra <alan@linuxcare.com.au>
5582 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5583 * configure: Regenerate.
5585 2001-01-11 Peter Targett <peter.targett@arccores.com>
5587 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5588 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5589 * cpu-arc.c (arch_info_struct): Add entries for variants.
5590 (bfd_arc_arch) Set default to bfd_mach_arc_5.
5591 (arc_get_mach) Don't assume machine names prefixed arc- before
5593 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5595 (arc_elf_final_write_processing) Likewise.
5596 (ELF_MACHINE_CODE) Use EM_ARC.
5598 2001-01-10 Nick Clifton <nickc@redhat.com>
5600 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5602 2001-01-07 Philip Blundell <philb@gnu.org>
5604 * README: Replace `bug-gnu-utils@gnu.org' with
5605 `bug-binutils@gnu.org'.
5607 2001-01-04 Kazu Hirata <kazu@hxi.com>
5609 * som.c: Fix formatting.
5611 2001-01-03 Kazu Hirata <kazu@hxi.com>
5613 * ecoffswap.h: Fix formatting.
5614 * elf-bfd.h: Likewise.
5615 * elfarm-nabi.c: Likewise.
5616 * elfarm-oabi.c: Likewise.
5617 * elfcode.h: Likewise.
5618 * elfcore.h: Likewise.
5619 * elflink.c: Likewise.
5620 * elflink.h: Likewise.
5621 * elfxx-ia64.c: Likewise.
5622 * elfxx-target.h: Likewise.
5623 * libbfd.c: Likewise
5624 * linker.c: Likewise.
5625 * lynx-core.c: Likewise.
5627 2001-01-02 Kazu Hirata <kazu@hxi.com>
5629 * pc532-mach.c: Fix formatting.
5630 * pe-arm.c: Likewise.
5631 * pe-i386.c: Likewise.
5632 * pe-mips.c: Likewise.
5633 * pe-ppc.c: Likewise.
5634 * pe-sh.c: Likewise.
5635 * pei-mips.c: Likewise.
5636 * pei-sh.c: Likewise.
5637 * peicode.h: Likewise.
5638 * ppcboot.c: Likewise.
5639 * ptrace-core.c: Likewise.
5641 2001-01-01 Kazu Hirata <kazu@hxi.com>
5643 * reloc.c: Fix formatting.
5644 * riscix.c: Likewise.
5645 * rs6000-core.c: Likewise.
5646 * xcoff-target.h: Likewise.
5648 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5650 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5651 error, by calling bfd_default_set_arch_mach with incoming
5654 2000-12-26 Kazu Hirata <kazu@hxi.com>
5656 * vaxnetbsd.c: Fix formatting.
5657 * versados.c: Likewise.
5658 * vms-gsd.c: Likewise.
5659 * vms-hdr.c: Likewise.
5660 * vms-misc.c: Likewise.
5662 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
5664 * archive.c (coff_write_armap): Don't write more than symbol_count
5665 `archive_member_file_ptr's.
5667 2000-12-25 Kazu Hirata <kazu@hxi.com>
5669 * vms-tir.c: Fix formatting.
5671 2000-12-23 Kazu Hirata <kazu@hxi.com>
5673 * vms.c: Fix formatting.
5676 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
5678 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5680 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5682 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5685 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5687 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5689 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5691 * libbfd.c (bfd_get_bits): Added
5692 (bfd_put_bits): Likewise
5693 * bfd-in.h: Declared the above.
5694 * bfd-in2.h: Regenerated.
5696 2000-12-20 Kazu Hirata <kazu@hxi.com>
5698 * targets.c: Fix formatting.
5699 * tekhex.c: Likewise.
5700 * trad-core.c: Likewise.
5702 2000-12-19 Kazu Hirata <kazu@hxi.com>
5704 * sco5-core.c: Fix formatting.
5705 * section.c: Likewise.
5706 * sparclinux.c: Likewise.
5707 * sparclynx.c: Likewise.
5708 * sparcnetbsd.c: Likewise.
5710 * stabs.c: Likewise.
5711 * stab-syms.c: Likewise.
5712 * sunos.c: Likewise.
5714 * sysdep.h: Likewise.
5716 2000-12-18 Nick Clifton <nickc@redhat.com>
5718 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5720 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5721 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5723 2000-12-18 Nick Clifton <nickc@redhat.com>
5725 * vms-misc.c (_bfd_vms_get_record): Add default case to
5728 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5730 * elfcore.h (elf_core_file_p): Move to the start of the program
5731 headers before attempting to read them.
5733 2000-12-14 Kazu Hirata <kazu@hxi.com>
5735 * peigen.c: Fix formatting.
5739 2000-12-13 Kazu Hirata <kazu@hxi.com>
5741 * peigen.c: Fix formatting.
5743 2000-12-12 Jim Wilson <wilson@redhat.com>
5745 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5747 2000-12-08 Mark Salter <msalter@redhat.com>
5749 * binary.c (binary_set_section_contents): Ignore sections
5752 2000-12-12 Kazu Hirata <kazu@hxi.com>
5754 * m68klinux.c: Fix formatting.
5755 * m68knetbsd.c: Likewise.
5756 * mipsbsd.c: Likewise.
5757 * netbsd-core.c: Likewise.
5758 * netbsd.h: Likewise.
5759 * newsos3.c: Likewise.
5760 * nlm32-alpha.c: Likewise.
5761 * nlm32-i386.c: Likewise.
5762 * nlm32-ppc.c: Likewise.
5763 * nlm32-sparc.c: Likewise.
5764 * nlmcode.h: Likewise.
5765 * nlmswap.h: Likewise.
5766 * nlm-target.h: Likewise.
5767 * ns32knetbsd.c: Likewise.
5769 2000-12-10 Fred Fish <fnf@be.com>
5771 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5772 symbols in shared objects if allow_shlib_undefined is true.
5774 2000-12-12 Nick Clifton <nickc@redhat.com>
5776 * cpu-sh.c: Fix formattng.
5777 * elf.c: Fix formattng.
5778 * elf32-mips.c: Fix formattng.
5779 * elf32-sh.c: Fix formattng.
5780 * elf64-alpha.c: Fix formattng.
5782 2000-12-09 Nick Clifton <nickc@redhat.com>
5784 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5785 dwarf2_find_line_info as last parameter to invocation of
5786 _bfd_dwarf2_find_nearest_line.
5787 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5788 dwarf2_find_line_info as last parameter to invocation of
5789 _bfd_dwarf2_find_nearest_line.
5791 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5793 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5794 (BFD_LIBS): ...to here.
5795 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5796 (BFD_LIBS_CFILES): ...to here.
5797 * Makefile.in: Regenerate.
5798 * configure.in: Remove dwarf.lo from the elf shell variable.
5799 * configure: Regenerate.
5800 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5801 * libcoff.h: Regenerate.
5802 * coffgen.c (coff_find_nearest_line): Call
5803 _bfd_dwarf2_find_nearest_line.
5804 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5806 (read_abbrevs): Likewise
5807 (decode_line_info): Likewise.
5808 (parse_comp_unit): Likewise.
5809 (comp_unit_find_nearest_line): Likewise.
5810 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5811 * libbfd.h: Regenerate.
5812 * elf.c (_bfd_elf_find_nearest_line): Update call.
5813 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5814 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5815 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5816 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5817 (styp_to_sec_flags): Handle DWARF2 sections.
5818 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5819 to _bfd_find_nearest_line.
5820 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5821 call to _bfd_find_nearest_line.
5823 2000-12-08 Kazu Hirata <kazu@hxi.com>
5825 * coffgen.c: Fix formatting.
5826 * elf-m10300.c: Likewise.
5827 * elf32-i386.c: Likewise.
5828 * elf32-i960.c: Likewise.
5829 * elf32-m68k.c: Likewise.
5830 * elf32-mcore.c: Likewise.
5831 * elf32-ppc.c: Likewise.
5832 * elf32-sh.c: Likewise.
5833 * elf32-sparc.c: Likewise.
5834 * elf32-v850.c: Likewise.
5835 * elf64-alpha.c: Likewise.
5836 * elf64-hppa.c: Likewise.
5837 * elf64-mips.c: Likewise.
5838 * elf64-sparc.c: Likewise.
5840 2000-12-07 Kazu Hirata <kazu@hxi.com>
5842 * elf32-ppc.c: Fix formatting.
5843 * elf64-x86-64.c: Likewise.
5845 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5847 From Ralf Baechle <ralf@gnu.org>
5849 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5850 BFDs containing no sections or empty .text, .data or .bss sections
5851 to be merged, regardless of their flags.
5853 2000-12-06 Kazu Hirata <kazu@hxi.com>
5855 * elf32-m32r.c: Fix formatting.
5856 * elf32-m68hc11.c: Likewise.
5857 * elf32-m68hc12.c: Likewise.
5858 * elf32-m68k.c: Likewise.
5859 * elf32-mcore.c: Likewise.
5860 * elf32-pj.c: Likewise.
5861 * elf32-ppc.c: Likewise.
5863 2000-12-05 Kazu Hirata <kazu@hxi.com>
5865 * elf32-fr30.c: Fix formatting.
5866 * elf32-hppa.c: Likewise.
5867 * elf32-i370.c: Likewise.
5868 * elf32-i386.c: Likewise.
5869 * elf32-i860.c: Likewise.
5870 * elf32-i960.c: Likewise.
5872 2000-12-03 Kazu Hirata <kazu@hxi.com>
5874 * elf32-arm.h: Fix formatting.
5875 * elf32-avr.c: Likewise.
5876 * elf32-cris.c: Likewise.
5877 * elf32-d10v.c: Likewise.
5878 * elf32-d30v.c: Likewise.
5879 * elf-hppa.h: Likewise.
5880 * elf-m10200.c: Likewise.
5881 * elf-m10300.c: Likewise.
5883 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5885 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5886 bfd_mach_mips32_4k. Update FIXME comment.
5887 * archures.c (bfd_mach_mips32): New constant.
5888 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5889 the latter, renumber it.
5890 * bfd-in2.h (bfd_mach_mips32): New constant.
5891 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5892 the latter, renumber it.
5893 * cpu-mips.c (I_mips32): New constant.
5894 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5895 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5896 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5897 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5898 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5899 with E_MIPS_MACH_MIPS32_4K.
5900 (_bfd_mips_elf_final_write_processing): Replace
5901 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5902 bfd_mach_mips32 case.
5903 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5904 comparison with support for MIPS32.
5905 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5908 * aoutx.h (NAME(aout,machine_type)): Add cases for
5909 bfd_mach_mips5 and bfd_mach_mips64.
5910 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5911 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5912 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5913 (arch_info_struct): Add entries for bfd_mach_mips5 and
5915 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5916 _bfd_mips_elf_print_private_bfd_data): Add cases for
5917 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5918 (_bfd_mips_elf_final_write_processing): Add cases for
5919 bfd_mach_mips5 and bfd_mach_mips64.
5921 * aoutx.h (NAME(aout,machine_type)): Add a
5922 bfd_mach_mips_sb1 case.
5923 * archures.c (bfd_mach_mips_sb1): New constant.
5924 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5925 * cpu-mips.c (I_sb1): New constant.
5926 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5927 * elf32-mips.c (elf_mips_mach): Add case for
5929 (_bfd_mips_elf_final_write_processing): Add case for
5932 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5934 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5935 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5936 (sparc*-*-rtems*): Switched from a.out to ELF.
5938 2000-11-30 Jan Hubicka <jh@suse.cz>
5940 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5941 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5942 (elf64-x86-64.lo): Add dependencies.
5943 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5944 bfd_mach_x86_64_intel_syntax.
5945 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5946 * config.bfd (x86_64): Add.
5947 * configure.in: Add support for bfd_elf64_x86_64_vec.
5948 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5949 (bfd_i386_arch, i8086_ar): Link in.
5950 * elf64-x86-64.c: New file.
5951 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5952 * targets.c (bfd_elf64_x86_64_vec): Add.
5953 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5955 2000-11-30 Kazu Hirata <kazu@hxi.com>
5957 * xcofflink.c: Fix formatting.
5959 2000-11-28 Kazu Hirata <kazu@hxi.com>
5961 * aoutx.h: Fix formatting.
5962 * bfd-in.h: Likewise.
5963 * bfd-in2.h: Likewise.
5964 * cache.c: Likewise.
5965 * cisco-core.c: Likewise.
5966 * coff64-rs6000.c: Likewise.
5967 * coffcode.h: Likewise.
5968 * coffswap.h: Likewise.
5969 * corefile.c: Likewise.
5970 * elf32-mips.c: Likewise.
5972 2000-11-27 Kazu Hirata <kazu@hxi.com>
5974 * aout-adobe.c: Fix formatting.
5975 * coff64-rs6000.c: Likewise.
5976 * coffgen.c: Likewise.
5977 * cofflink.c: Likewise.
5979 2000-11-27 Philip Blundell <pb@futuretv.com>
5981 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5982 (obj_coff_strings_written): New accessor macro for above.
5983 * libcoff.h: Regenerate.
5984 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5986 * coffcode.h (coff_write_object_contents): No need to write out
5987 the string table if it's already been done.
5989 2000-11-22 Philip Blundell <pb@futuretv.com>
5991 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5992 weak undefined symbols.
5994 2000-11-24 Nick Clifton <nickc@redhat.com>
5996 * archures.c (bfd_mach_arm_5TE): Define.
5997 (bfd_mach_arm+XScale): Define.
5998 * bfd-in2.h: Regenerate.
6000 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
6001 BFD_RELOC_ARM_PCREL_BLX.
6003 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
6004 XScale machine numbers.
6006 * config.bfd (xscale-elf): Add target.
6007 (xscale-coff): Add target.
6009 * cpu-arm.c: Add xscale machine name.
6010 Add v5t, v5te and XScale machine numbers.
6012 2000-11-23 Kazu Hirata <kazu@hxi.com>
6014 * aix386-core.c: Fix formatting.
6016 2000-11-22 Jim Wilson <wilson@redhat.com>
6018 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
6019 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
6020 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
6021 (ins_imms_scaled): Initialize sign_bit at function entry.
6022 (elf64_ia64_operands): Add missing initializers.
6023 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
6024 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
6025 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
6026 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
6027 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
6029 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
6030 and free_extsyms at function entry.
6031 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
6032 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
6033 (get_got): Delete unused local srel.
6034 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
6035 (elfNN_ia64_relocate_section): Delete unused local dynindx.
6037 2000-11-21 Kazu Hirata <kazu@hxi.com>
6039 * coff-a29k.c: Fix formatting.
6040 * coff-h8500.c: Likewise.
6041 * coff-i960.c: Likewise.
6042 * coff-ppc.c: Likewise.
6043 * coff-rs6000.c: Likewise.
6044 * coff-stgo32.c: Likewise.
6045 * coff-tic54x.c: Likewise.
6046 * coff-w65.c: Likewise.
6047 * cpu-h8500.c: Likewise.
6048 * cpu-hppa.c: Likewise.
6049 * cpu-ns32k.c: Likewise.
6050 * ecoff.c: Likewise.
6051 * ecofflink.c: Likewise.
6053 2000-11-21 Nick Clifton <nickc@redhat.com>
6055 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
6056 remove possibility of infinite loop.
6058 2000-11-20 Kazu Hirata <kazu@hxi.com>
6060 * aix386-core.c: Fix formatting.
6061 * aout-adobe.c: Likewise.
6062 * aout-arm.c: Likewise.
6063 * aout-encap.c: Likewise.
6064 * aout-ns32k.c: Likewise.
6065 * aout-target.h: Likewise.
6066 * aout-tic30.c: Likewise.
6067 * aoutf1.h: Likewise.
6068 * aoutx.h: Likewise.
6069 * archive.c: Likewise.
6070 * bfd-in.h: Likewise.
6071 * bfd-in2.h: Likewise.
6075 2000-11-17 H.J. Lu <hjl@gnu.org>
6077 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
6078 pltoff entries for DT_INIT and DT_FINI.
6079 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
6080 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
6083 2000-11-16 Richard Henderson <rth@redhat.com>
6085 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
6086 (allocate_dynrel_entries): Likewise.
6087 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
6088 (set_pltoff_entry): Likewise.
6089 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
6090 (elfNN_ia64_reloc_type_lookup): Likewise.
6091 (elfNN_ia64_install_value): Likewise.
6092 (elfNN_ia64_relocate_section): Likewise.
6093 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
6094 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
6096 2000-11-16 Kazu Hirata <kazu@hxi.com>
6098 * cpu-a29k.c: Fix formatting.
6099 * cpu-alpha.c: Likewise.
6100 * cpu-arm.c: Likewise.
6101 * cpu-avr.c: Likewise.
6102 * cpu-d10v.c: Likewise.
6103 * cpu-h8500.c: Likewise.
6104 * cpu-hppa.c: Likewise.
6105 * cpu-i370.c: Likewise.
6106 * cpu-i386.c: Likewise.
6107 * cpu-i960.c: Likewise.
6108 * cpu-ia64-opc.c: Likewise.
6109 * cpu-ia64.c: Likewise.
6110 * cpu-m32r.c: Likewise.
6111 * cpu-m68hc11.c: Likewise.
6112 * cpu-m68hc12.c: Likewise.
6113 * cpu-m68k.c: Likewise.
6114 * cpu-m88k.c: Likewise.
6115 * cpu-mips.c: Likewise.
6116 * cpu-ns32k.c: Likewise.
6117 * cpu-pj.c: Likewise.
6118 * cpu-powerpc.c: Likewise.
6119 * cpu-sh.c: Likewise.
6120 * cpu-sparc.c: Likewise.
6121 * cpu-tic54x.c: Likewise.
6122 * cpu-v850.c: Likewise.
6123 * cpu-vax.c: Likewise.
6124 * cpu-w65.c: Likewise.
6125 * cpu-we32k.c: Likewise.
6126 * cpu-z8k.c: Likewise.
6127 * dwarf1.c: Likewise.
6128 * dwarf2.c: Likewise.
6130 2000-11-15 Kazu Hirata <kazu@hxi.com>
6132 * coff-arm.c: Fix formatting.
6133 * coff-ppc.c: Likewise.
6134 * coff-rs6000.c: Likewise.
6135 * coff-sh.c: Likewise.
6136 * coff-sparc.c: Likewise.
6137 * coff-tic30.c: Likewise.
6138 * coff-tic54x.c: Likewise.
6139 * coff-tic80.c: Likewise.
6140 * coff-w65.c: Likewise.
6141 * coff-we32k.c: Likewise.
6142 * coff-z8k.c: Likewise.
6144 2000-11-15 Richard Henderson <rth@redhat.com>
6146 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
6147 section with the same ALLOC|LOAD flags as the source section.
6149 2000-11-14 Jakub Jelinek <jakub@redhat.com>
6151 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
6152 by STO_ALPHA constants.
6154 2000-11-14 Kazu Hirata <kazu@hxi.com>
6156 * coff-pmac.c: Fix formatting.
6157 * coff-ppc.c: Likewise.
6159 2000-11-13 H.J. Lu <hjl@gnu.org>
6161 * elflink.h (elf_link_add_object_symbols): Also add indirect
6162 symbols for common symbols with the default version.
6164 2000-11-09 Philip Blundell <pb@futuretv.com>
6166 * section.c (STD_SECTION): Set gc_mark flag.
6168 2000-11-11 Kazu Hirata <kazu@hxi.com>
6170 * coff-i960.c: Likewise.
6171 * coff-m68k.c: Likewise.
6172 * coff-m88k.c: Likewise.
6173 * coff-mcore.c: Likewise.
6174 * coff-mips.c: Likewise.
6176 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
6178 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
6180 2000-11-10 Kazu Hirata <kazu@hxi.com>
6182 * coff-h8300.c: Fix formatting.
6183 * coff-h8500.c: Likewise.
6184 * coff-i386.c: Likewise.
6185 * coff-i860.c: Likewise.
6186 * coff-i960.c: Likewise.
6187 * coff-ia64.c: Likewise.
6189 2000-11-09 Kazu Hirata <kazu@hxi.com>
6191 * archive.c: Fix formatting.
6192 * archures.c: Likewise.
6194 2000-11-07 Richard Henderson <rth@redhat.com>
6196 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
6197 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
6198 * section.c (bfd_set_section_contents): Call memcpy if
6199 section->contents set and location not equal to contents plus offset.
6201 2000-11-08 Kazu Hirata <kazu@hxi.com>
6203 * bfd-in.h: Fix formatting.
6204 * bfd-in2.h: Likewise.
6206 * binary.c: Likewise.
6208 * coff-a29k.c: Likewise.
6209 * coff-alpha.c: Likewise.
6210 * coff-apollo.c: Likewise.
6211 * coff-aux.c: Likewise.
6213 2000-11-07 Kazu Hirata <kazu@hxi.com>
6215 * aix386-core.c: Fix formatting.
6216 * aoutf1.h: Likewise.
6217 * aoutx.h: Likewise.
6218 * archures.c: Likewise.
6219 * armnetbsd.c: Likewise.
6221 2000-11-07 Alan Modra <alan@linuxcare.com.au>
6223 * coff-h8300.c (special): Adjust reloc address.
6225 2000-11-06 Steve Ellcey <sje@cup.hp.com>
6227 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
6228 to differentiate elf32 and elf64 on ia64.
6229 * bfd-in2.h: Regenerate.
6230 * config.bfd: Add target for "ia64*-*-hpux*".
6231 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
6232 * configure: Regenerate.
6233 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
6234 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
6236 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
6237 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
6238 * Makefile.in: Regnerate.
6239 * elf64-ia64.c: Deleted.
6240 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
6242 2000-11-06 Kazu Hirata <kazu@hxi.com>
6244 * aout-adobe.c: Fix formatting.
6245 * aout-arm.c: Likewise.
6246 * aout-cris.c: Likewise.
6247 * aout-encap.c: Likewise.
6248 * aout-ns32k.c: Likewise.
6249 * aout-target.h: Likewise.
6250 * aout-tic30.c: Likewise.
6252 2000-11-05 Philip Blundell <philb@gnu.org>
6254 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
6255 BFDs containing no sections to be merged, regardless of their flags.
6257 2000-11-04 Philip Blundell <philb@gnu.org>
6259 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
6260 if a relocation for an undefined symbol also results in an
6263 2000-11-06 Christopher Faylor <cgf@cygnus.com>
6265 * config.bfd: Add support for Sun Chorus.
6267 2000-11-05 David O'Brien <obrien@FreeBSD.org>
6269 * configure.in: Recognize alpha-*-freebsd*.
6270 * configure: Regenerate.
6272 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
6274 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
6275 (Chunk): New global variable set by a parameter in objcopy.c.
6276 (S3Forced): New global variable set by a parameter in
6278 (srec_set_section_contents): If S3Forced is true, always generate
6280 (srec_write_section): Use 'Chunk' to limit maximum length of S
6283 2000-11-02 Per Lundberg <plundis@chaosdev.org>
6285 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
6286 * Makefile.in: Regenerate.
6287 * bfd-in2.h: Regenerate.
6288 * po/bfd.pot: Regenerate.
6290 2000-10-31 Philip Blundell <philb@gnu.org>
6292 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
6293 EF_SOFT_FLOAT if it is defined.
6295 2000-10-27 Philip Blundell <philb@gnu.org>
6297 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
6298 attempts to mix PIC code with non-PIC, just mark the output as
6299 being position dependent.
6300 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
6301 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
6302 all mismatches, not just the first one.
6304 2000-10-25 Chris Demetriou <cgd@sibyte.com>
6306 * ieee.c (ieee_archive_p): Plug one of many possible
6307 memory leaks in error handling.
6309 2000-10-20 Jakub Jelinek <jakub@redhat.com>
6311 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
6312 elf32_sparc_object_p, elf32_sparc_final_write_processing):
6314 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
6315 sparc64_elf_object_p): Support v9b.
6316 * archures.c: Declare v8plusb and v9b machines.
6318 * cpu-sparc.c: Ditto.
6320 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6322 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
6325 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
6326 (SYMBOL_CALLS_LOCAL): New macro.
6327 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
6328 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
6329 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
6330 (ppc_elf_relocate_section): Use flag variable to determine
6331 whether the relocation refers to a local symbol.
6332 Test whether a PLTREL24 reloc will produce a reloc by looking
6333 to see whether a PLT entry was made.
6335 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
6337 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
6338 entries that could serve as a definition for a weak symbol.
6340 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
6342 From Ralf Baechle <ralf@gnu.org>
6344 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
6345 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
6346 against local symbols.
6347 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
6349 2000-10-12 Alan Modra <alan@linuxcare.com.au>
6351 * section.c (struct sec): Add kept_section.
6352 (struct bfd_comdat_info): Remove sec, we can use above.
6353 (STD_SECTION): Add initializer.
6354 (bfd_make_section_anyway): Init here too.
6356 * bfd-in2.h: Regenerate.
6358 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
6360 (elf_link_input_bfd): Set all asection->symbol->value's here, and
6361 fudge values for discarded link-once section symbols.
6363 * elf64-hppa.c: Include alloca-conf.h
6365 2000-10-11 Alan Modra <alan@linuxcare.com.au>
6367 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
6369 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6371 2000-10-10 Alan Modra <alan@linuxcare.com.au>
6373 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
6375 2000-10-10 Tom Rix <trix@redhat.com>
6377 * section.c (bfd_make_section_anyway): Release newsect ptr when
6378 newsect->symbol fails to alloc. Use bfd_release instead of free.
6380 2000-10-09 Richard Henderson <rth@cygnus.com
6382 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
6383 (elf64_ia64_unwind_entry_compare): New.
6384 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
6386 2000-10-07 Alan Modra <alan@linuxcare.com.au>
6388 * elflink.h (size_dynamic_sections): Don't create various tags if
6389 .dynstr is excluded from the link. Don't set first dynsym entry
6390 if dynsymcount is zero.
6391 (elf_bfd_final_link): Don't try to swap out dynamic syms if
6392 .dynsym excluded from the link. Don't try to write any dynamic
6393 sections excluded from the link.
6395 * elf.c (swap_out_syms): Handle global section symbols.
6397 2000-10-05 DJ Delorie <dj@redhat.com>
6399 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
6400 * coffcode.h (coff_set_alignment_hook): read extended reloc count
6401 (coff_write_relocs): write extended reloc count
6402 (coff_write_object_contents): account for extended relocs
6404 2000-10-05 Jim Wilson <wilson@cygnus.com>
6406 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
6408 * elf.c (_bfd_elf_make_section_from_shdr): Call the
6409 elf_backend_section_flags function.
6410 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
6412 (elf64_ia64_section_flags): New function containing flag conversion
6414 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
6415 * elfxx-target.h (elf_backend_section_flags): Define.
6416 (elfNN_bed): Initialize elf_backend_section_flags field.
6418 2000-10-02 Alan Modra <alan@linuxcare.com.au>
6420 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
6421 _bfd_elf32_gc_record_vtable. Correct a comment.
6423 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
6425 From Ralf Baechle <ralf@gnu.org>
6427 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
6428 produces binaries with got[1] = 0x80000001 to differenciate them
6429 for the dynamic linker from the broken binaries produced by old
6432 2000-09-30 Petr Sorfa <petrs@sco.com>
6434 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
6435 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
6436 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
6437 * configure: Regenerate.
6439 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
6441 Define two bfd_targets for absence and presence of leading
6442 underscore on symbols. Make sure to only link same kind.
6443 * elf32-cris.c (cris_elf_object_p,
6444 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
6445 cris_elf_merge_private_bfd_data): New.
6446 (elf_backend_object_p, elf_backend_final_write_processing,
6447 bfd_elf32_bfd_print_private_bfd_data,
6448 bfd_elf32_bfd_merge_private_bfd_data): Define.
6449 <Target vector definition>: Include elf32-target.h twice with
6450 different macro settings:
6451 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
6452 bfd_elf32_us_cris_vec.
6453 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
6454 (elf_symbol_leading_char): First as 0, then '_'.
6455 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
6456 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
6457 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
6458 * configure: Regenerate.
6459 * targets.c: Declare bfd_elf32_us_cris_vec.
6460 * po/bfd.pot: Regenerate.
6462 2000-09-29 Momchil Velikov <velco@fadata.bg>
6464 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
6465 R_ARM_THM_PC22 relocations.
6467 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
6469 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
6471 2000-09-29 Momchil Velikov <velco@fadata.bg>
6473 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
6474 is has the SEC_HAS_CONTENTS flag set.
6476 2000-09-28
\81Örjan Friberg <orjanf@axis.com>
6477 Hans-Peter Nilsson <hp@axis.com>
6479 * aout-cris.c (N_TXTADDR): Define.
6481 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
6483 * som.c: Include alloca-conf.h.
6484 * Makefile.am: "make dep-am"
6485 * Makefile.in: Regenerate.
6487 2000-09-27 Alan Modra <alan@linuxcare.com.au>
6489 * elf32-hppa.c (plt_stub): New.
6490 (PLT_STUB_ENTRY): Define.
6491 (elf32_hppa_link_hash_table): Change multi_subspace to packed
6492 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
6493 (elf32_hppa_link_hash_table_create): Init to suit.
6494 (elf32_hppa_check_relocs): Set has_12bit_branch and
6495 has_17bit_branch as appropriate.
6496 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
6497 non-local functions.
6498 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
6499 Add space for plt_stub as needed.
6500 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
6501 functions at plt_stub.
6502 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
6503 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
6505 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
6506 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
6507 of fixed size, and if negative, disable handling of input sections
6508 before stub section. Set up default stub group size depending
6509 on detected branch relocs.
6510 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
6511 ensure different offsets from sym_value aren't rounded to
6512 different 2k blocks. Use lrsel and rrsel for other stubs too for
6513 consistency rather than necessity.
6514 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
6515 (final_link_relocate): Likewise.
6516 (elf32_hppa_relocate_section): Likewise.
6518 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
6519 (_bfd_elf_hppa_gen_reloc_type): Generate them.
6520 (elf_hppa_final_link_relocate): Handle them.
6521 (elf_hppa_relocate_insn): Likewise.
6522 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
6524 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
6526 * elfcode.h (elf_object_p): Preserve and clear abfd section
6527 information. Restore at error.
6529 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
6531 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
6532 is empty, make sure that its rva also 0. NT loader dislikes
6535 2000-09-26 Steve Ellcey <sje@cup.hp.com>
6537 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
6540 2000-09-21 Alan Modra <alan@linuxcare.com.au>
6542 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
6543 currently unused RELATIVE_DYNAMIC_RELOCS code.
6544 (hppa_discard_copies): Likewise.
6545 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
6546 comments. Don't check non-code output sections for stub grouping.
6548 2000-09-20 Alan Modra <alan@linuxcare.com.au>
6550 * section.c (bfd_get_unique_section_name): Return NULL if
6553 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6555 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
6556 instruction sequence to actually work.
6557 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
6560 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
6562 * elf32-sh.c (sh_elf_relocate_section): Use
6563 _bfd_final_link_relocate to apply the relocation against a section
6564 symbol, when doing relocatable links.
6566 2000-09-18 Alan Modra <alan@linuxcare.com.au>
6568 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
6570 (stub_hash_newfunc): Here too.
6571 (hppa_add_stub): And here.
6572 (elf32_hppa_link_hash_table): Remove stub_section_created,
6573 reloc_section_created, first_init_sec and first_fini_sec. Add
6575 (elf32_hppa_link_hash_table_create): Init to suit.
6576 (hppa_get_stub_entry): Add support for grouping stub sections.
6577 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
6578 section code. Index stub vars by section->id.
6579 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
6580 exit paths. Zap allocation of above removed vars. Refine
6583 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6584 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6585 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6586 rather than pointer to bfd_link_info.
6587 (hppa_add_stub): Likewise.
6588 (final_link_relocate): Likewise.
6590 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
6592 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6595 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
6597 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6598 ld/emulparams/shelf.sh.
6600 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6602 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6603 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6604 * bfd-in2.h: Regenerate.
6606 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
6608 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6609 LITUSE relocations incorrectly if -relax is specified on the ld
6610 command line and the displacement field of the load or store
6611 instruction is non-zero. (Patch by paul.winalski@compaq.com)
6613 2000-09-15 Alan Modra <alan@linuxcare.com.au>
6615 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6616 first_fini_sec here.
6617 (elf32_hppa_size_stubs): Instead correctly find the first .init
6618 and .fini section here.
6620 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
6622 * elf32-hppa.c (clobber_millicode_symbols): New function.
6623 (elf32_hppa_size_dynamic_sections): Call it.
6625 2000-09-14 Alan Modra <alan@linuxcare.com.au>
6627 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6628 packed. Add plabel, plt_abs packed booleans.
6629 (hppa_link_hash_newfunc): Init new fields.
6630 (PLABEL_PLT_ENTRY_SIZE): Define.
6631 (hppa_stub_name): Use size_t len vars.
6632 (hppa_add_stub): Likewise.
6633 (elf32_hppa_build_stubs): Likewise.
6634 (hppa_build_one_stub): Kill some compiler warnings.
6635 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6636 if dynamic linking. Munge the local plt offsets into
6637 local_got_refcounts. Set h->plabel for all global PLABELs. Use
6638 size_t len vars. Add assert for plabel addend.
6639 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6640 (elf32_hppa_hide_symbol): New function.
6641 (elf_backend_hide_symbol): Define.
6642 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6643 with h->plabel set. Don't make plt entries to have dynamic syms
6644 when they have been forced local. If plt entry is used by a
6645 plabel, make it PLABEL_PLT_ENTRY_SIZE.
6646 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6647 Set up .plt offsets for local syms.
6648 (elf32_hppa_relocate_section): Initialise plt entries for local
6649 syms. Leave weak undefined plabels zero. Make global plabel
6650 relocs against function symbol, and leave the addend zero.
6651 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6652 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6653 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
6654 relocs instead of SEGREL32 for dynamic got relocs.
6655 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6656 (elf_backend_got_header_size): Adjust.
6657 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6659 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6660 (hppa_type_of_stub): Use it instead of #if 0
6661 (hppa_discard_copies): Use it here too.
6662 (elf32_hppa_size_dynamic_sections): And here.
6664 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6665 (elf32_hppa_link_hash_table_create): And here.
6666 (hppa_build_one_stub): And here. Instead keep track of stub
6667 offset using _raw_size.
6668 (elf32_hppa_size_stubs): Likewise.
6669 (elf32_hppa_build_stubs): Likewise.
6670 (hppa_size_one_stub): Likewise. Resize reloc section too.
6672 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6673 first_fini_sec handling. Don't search for reloc section or set
6674 hplink->reloc_section_created here.
6675 (elf32_hppa_size_stubs): Instead search for reloc sections, and
6676 set reloc_section_created here.
6677 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6678 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6680 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6682 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6683 with `hplink->root.'.
6684 (elf32_hppa_check_relocs): Likewise.
6685 (elf32_hppa_gc_sweep_hook): Likewise.
6686 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6687 (hppa_handle_PIC_calls): Likewise.
6688 (elf32_hppa_size_dynamic_sections): Likewise.
6689 (elf32_hppa_set_gp): Likewise.
6690 (elf32_hppa_relocate_section): Likewise.
6691 (elf32_hppa_finish_dynamic_symbol): Likewise.
6692 (elf32_hppa_finish_dynamic_sections): Likewise.
6694 From David Huggins-Daines <dhd@linuxcare.com>
6695 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6696 defined weak symbols in shared links.
6697 (final_link_relocate): Calls to defined weak symbols in shared
6698 objects must go via import stubs, as the target might not be known
6701 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6703 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6704 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6705 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6706 the original entries with EMPTY_HOWTOs, and added new ones to fill
6708 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6709 (sh_elf_relocate_section): Likewise.
6711 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6713 * cpu-mips.c (arch_info_struct): Add mips:4K
6714 * bfd-in2.h (bfd_mach_mips4K): New define.
6715 * archures.c: Add bfd_mach_mips4K to comment.
6716 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6717 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6719 2000-09-13 Marco Franzen <marcof@thyron.com>
6721 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6722 use size_t as a counter.
6723 (som_write_space_strings): Similarly.
6725 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6727 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6729 (elf32_i860_relocate_section): Invoke new function from here.
6731 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6733 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6736 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6738 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6739 target section name instead of dumping core when the target symbol is
6742 2000-09-09 Kazu Hirata <kazu@hxi.com>
6744 * riscix.c: Remove DEFUN.
6746 2000-09-08 Nick Clifton <nickc@redhat.com>
6748 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6749 initialise flags in output bfd if the input bfd is the default
6750 architecture with the default flags.
6752 2000-09-08 Kazu Hirata <kazu@hxi.com>
6754 * archive.c: Fix formatting.
6755 * coff-arm.c: Likewise.
6756 * doc/chew.c: Likewise.
6758 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6760 * section.c (bfd_get_unique_section_name): Put a dot before the
6763 2000-09-07 Kazu Hirata <kazu@hxi.com>
6765 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6766 * elf.c: Fix formatting.
6768 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6770 * config.bfd (sh-*-linux*): Added.
6771 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6772 * targets.c: Declare them.
6773 * elf32-sh-lin.c: New file.
6774 * Makefile.am: Compile it.
6775 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6776 * configure, Makefile.in: Rebuilt.
6778 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6780 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6781 pseduo-section when determining where the TOC ends.
6783 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6784 output x_tvndx as it is only two bytes wide.
6786 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6787 reloc is 26 or 32 bits wide.
6789 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6790 for relocs that don't change anything. Also look at the full
6793 2000-09-06 Philip Blundell <philb@gnu.org>
6795 * config.bfd (arm*-*-uclinux*): New target.
6797 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6799 * configure: Rebuilt with new libtool.m4.
6801 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6803 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6804 word for variable name.
6805 * bfd-in2.h: Regenerate.
6807 2000-09-05 Nick Clifton <nickc@redhat.com>
6809 * config.in: Regenerate.
6810 * libbfd.h: Regenerate.
6811 * po/bfd.pot: Regenerate.
6812 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6815 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6817 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6819 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6821 Shared library and PIC support.
6822 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6823 (GOT_ENTRY_SIZE): New.
6824 (ELF_DYNAMIC_INTERPRETER): New.
6825 (STUB_SUFFIX): Define.
6826 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6827 (RELATIVE_DYNAMIC_RELOCS): Define.
6828 (enum elf32_hppa_stub_type): New.
6829 (struct elf32_hppa_stub_hash_entry): Rename offset to
6830 stub_offset. Add a number of new fields.
6831 (struct elf32_hppa_link_hash_entry): New.
6832 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6834 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6835 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6836 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6838 (hppa_link_hash_newfunc): New function.
6839 (elf32_hppa_link_hash_table_create): Use above function. Init new
6841 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6842 instead of addend, and remove sym_name from args. Don't use
6843 symbol name for local syms, instead use sym index.
6844 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6845 stub type rather than size. Pass in hash and handle import stub
6846 case. Also pass in reloc instead of offset so we can calculate
6847 PCREL22F and PCREL12F branches properly.
6848 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6849 import and export stubs too.
6850 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6851 import and export stub sizing.
6852 (elf32_hppa_check_relocs): New function.
6853 (elf32_hppa_adjust_dynamic_symbol): New function.
6854 (hppa_discard_copies): New function.
6855 (elf32_hppa_size_dynamic_sections): New function.
6856 (elf_backend_size_dynamic_sections): Define.
6857 (elf32_hppa_finish_dynamic_symbol): New function.
6858 (elf_backend_finish_dynamic_symbol): Define.
6859 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6860 some local vars into the link hash table too. For shared links,
6861 trundle over function syms, generating export stubs. Handle
6862 PCREL22F branches. Break out stub creation code from here..
6863 (hppa_add_stub): .. to here. New function.
6864 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6865 call the bfd linker. Use elf_gp to record global pointer.
6866 Calculate a value from sections if $global$ is missing.
6867 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6868 (elf32_hppa_gc_mark_hook): New function.
6869 (elf_backend_gc_mark_hook): Define.
6870 (elf32_hppa_gc_sweep_hook): New function.
6871 (elf_backend_gc_sweep_hook): Define.
6872 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6873 Add rel to args, and remove howto, input_bfd, offset, addend,
6874 sym_name as we can recalculate these locally. Handle calls to
6875 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6876 handling of undefined weak syms. Check that stubs are in range.
6877 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6878 message on hitting a DPREL21L reloc that needs fixing. Subtract
6879 off PC for PCREL14F. Break out code that does a stub lookup from
6881 (hppa_get_stub_entry): ..to here. New function.
6882 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6883 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6885 (elf32_hppa_finish_dynamic_sections): New function.
6886 (elf_backend_finish_dynamic_sections): Define.
6887 (elf_backend_final_write_processing) Define.
6888 (hppa_handle_PIC_calls): New function.
6889 (elf32_hppa_build_stubs): Call it. Pass link_info to
6890 hppa_build_one_stub.
6891 (elf32_hppa_create_dynamic_sections): New function
6892 to create .plt and .got then set .plt flags correctly.
6893 (elf_backend_create_dynamic_sections): Define.
6894 (elf32_hppa_object_p): New function.
6895 (elf_backend_object_p): Define.
6896 (elf32_hppa_elf_get_symbol_type): New function.
6897 (elf_backend_get_symbol_type): Define.
6898 (elf_backend_can_gc_sections): Define.
6899 (elf_backend_want_got_plt): Define.
6900 (elf_backend_plt_alignment): Set to 2.
6901 (elf_backend_plt_readonly): Define.
6902 (elf_backend_want_plt_sym): Define.
6903 (elf_backend_got_header_size): Reserve one entry.
6905 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6906 (elf32_hppa_size_stubs): Pass in multi_subspace.
6907 (elf32_hppa_set_gp): Declare.
6909 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6910 (bfd_get_unique_section_name): New function.
6911 * bfd-in2.h: Regenerate.
6913 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6914 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6917 From David Huggins-Daines <dhd@linuxcare.com>
6918 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6919 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6920 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6921 been updated in finish_dynamic_symbol before modifying function
6924 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6925 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6926 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6927 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6928 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6929 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6930 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6931 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6933 From David Huggins-Daines <dhd@linuxcare.com>
6934 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6935 style of local labels as well.
6937 2000-09-03 Philip Blundell <philb@gnu.org>
6939 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6940 references to undefined symbols in debugging sections.
6942 2000-09-02 H.J. Lu <hjl@gnu.org>
6944 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6945 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6946 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6949 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6951 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6952 (elf32_i860_is_local_label_name): New function and prototype.
6954 2000-09-02 Nick Clifton <nickc@redhat.com>
6956 * configure.in: Increase version number to 2.10.91.
6957 * configure: Regenerate.
6958 * aclocal.m4: Regenerate.
6959 * config.in: Regenerate.
6960 * po/bfd.pot: Regenerate.
6962 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6964 * elf.c (_bfd_elf_make_section_from_shdr): Add
6965 .gnu.linkobce.wi. to the list of debug section names.
6967 2000-09-02 Nick Clifton <nickc@redhat.com>
6969 * dwarf2.c (find_debug_info): New function: Locate a section
6970 containing dwarf2 debug information.
6971 (bfd_dwarf2_find_nearest_line): Find all sections containing
6972 debug information and include them in the stash.
6974 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6976 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6977 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6978 (sh_reloc_map): Add new relocs.
6979 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6980 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6981 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6982 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6984 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6985 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6986 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6987 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6988 New array constants.
6989 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6991 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6992 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6993 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6994 elf_sh_plt_reloc_offset): Define.
6995 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6996 elf_sh_link_hash_table): New structs.
6997 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6998 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
7000 (elf_backend_create_dynamic_sections,
7001 bfd_elf32_bfd_link_hash_table_create,
7002 elf_backend_adjust_dynamic_symbol,
7003 elf_backend_size_dynamic_sections,
7004 elf_backend_finish_dynamic_symbol,
7005 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7006 elf_backend_plt_readonly, elf_backend_want_plt_sym,
7007 elf_backend_got_header_size, elf_backend_plt_header_size):
7009 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
7010 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
7012 * bfd-in2.h, libbfd.h: Rebuilt.
7014 2000-09-01 Alan Modra <alan@linuxcare.com.au>
7016 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
7019 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
7021 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
7022 not initialized, set them to indicate the SH1 instruction set.
7024 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
7026 * acinclude.m4: Include libtool and gettext macros from the
7028 * aclocal.m4, configure: Rebuilt.
7030 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
7032 * elf.c: Eliminate references to __sparcv9 macro; replace with
7033 autoconf variables HAVE_PSINFO32_T etc.
7034 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
7035 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
7037 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
7038 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
7039 * aclocal.m4: Ditto.
7040 * configure: Regenerate.
7042 2000-08-27 Alan Modra <alan@linuxcare.com.au>
7044 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
7045 for any shared link, not just shared -Bsymbolic.
7046 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
7047 any shared link, and pass link info to it.
7048 (elf_i386_size_dynamic_sections): Update comment.
7049 (elf_i386_discard_copies): Modify to discard relocs for symbols
7050 that have been forced local.
7051 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
7052 that have been forced local.
7054 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
7056 * elflink.h (elf_link_add_object_symbols): Allow common
7057 symbols to have an alignment of 1 if explicitly requested, and
7058 not overridden by other definitions.
7060 2000-08-22 Doug Kwan <dkwan@transmeta.com>
7062 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
7063 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
7065 2000-08-22 H.J. Lu <hjl@gnu.org>
7067 * elf-bfd.h (elf_link_hash_table): Add runpath.
7069 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
7070 * bfd-in2.h: Rebuilt.
7072 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
7073 "runpath" field to NULL.
7074 (bfd_elf_get_runpath_list): New function.
7076 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
7079 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
7081 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
7082 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
7083 explicitly. Improve validation of r_type.
7085 2000-08-21 H.J. Lu <hjl@gnu.org>
7087 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
7088 dynamic allocated content space. Add a comment to remind us that
7089 one day this ought to be fixed.
7090 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
7091 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7092 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7094 2000-08-21 Jason Eckhardt <jle@cygnus.com>
7096 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
7097 field with the newly relocated value instead of adding it to the
7098 existing immediate field.
7099 (elf32_i860_relocate_splitn): Likewise.
7100 (elf32_i860_relocate_highadj): Likewise.
7102 2000-08-16 Jason Eckhardt <jle@cygnus.com>
7104 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
7105 was previously just a stub).
7107 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
7109 * elflink.c (_bfd_elf_create_got_section): Don't abort().
7111 (_bfd_elf_create_dynamic_sections): Likewise.
7113 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
7115 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
7116 for undefined symbols to be the beginning of the section.
7118 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
7119 four extra entries at the beginning of the .rela.plt section.
7120 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
7121 section to account for the four reserved entries in the .plt section.
7123 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
7125 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
7126 to the list of NOPs we recognize after a branch-and-link.
7127 Use the ori NOP when one is needed.
7129 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
7132 2000-08-14 Jim Wilson <wilson@cygnus.com>
7134 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
7135 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
7136 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
7139 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
7141 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
7143 2000-08-10 Jason Eckhardt <jle@cygnus.com>
7145 * elf32-i860.c (elf32_i860_relocate_section): New function.
7146 (i860_final_link_relocate): New function.
7147 (elf32_i860_relocate_splitn): New function.
7148 (elf32_i860_relocate_pc16): New function.
7149 (elf32_i860_relocate_highadj): New function.
7150 (elf32_i860_howto): Minor adjustments to some relocations.
7151 (elf_info_to_howto_rel): Define.
7152 (elf_backend_relocate_section): Define.
7154 2000-08-10 Nick Clifton <nickc@cygnus.com>
7156 * elf32-arm.h: Fix formatting.
7158 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
7160 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
7162 2000-08-08 Jason Eckhardt <jle@cygnus.com>
7164 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
7166 2000-08-07 Kazu Hirata <kazu@hxi.com>
7168 * ieee.c (ieee_write_debug_part): Rewrite a comment.
7169 * elf64-ia64.c: Fix a typo.
7171 2000-08-05 Jason Eckhardt <jle@cygnus.com>
7173 * elf32-i860.c (elf32_i860_howto_table): New structure.
7174 (lookup_howto): New function.
7175 (elf32_i860_reloc_type_lookup): New function.
7176 (elf32_i860_info_to_howto_rela): New function.
7177 (elf_code_to_howto_index): New structure.
7178 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
7179 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
7180 elf32_i860_reloc_type_lookup.
7182 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
7184 * som.c (struct fixup_format): Constify `format'.
7185 (som_hppa_howto_table): Use SOM_HOWTO macro.
7186 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
7187 (som_bfd_reloc_type_lookup): Likewise.
7188 (compare_subspaces): Remove unused `count1', `count2'.
7189 (som_begin_writing): Remove unused `total_reloc_size'.
7190 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
7191 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
7192 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
7193 (som_find_nearest_line): Decorate unused parameter(s).
7194 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
7195 (som_bfd_link_split_section): Likewise.
7197 2000-08-03 Nick Clifton <nickc@cygnus.com>
7199 * section.c: Restore backed out code.
7200 * elf.c: Restore backed out code.
7201 (copy_private_bfd_data): Fix bug preventing stipped dynamic
7202 binaries from working.
7203 * bfd-in2.h: Regenerate.
7205 2000-08-03 H.J. Lu <hjl@gnu.org>
7207 * section.c: Back out the change made by Nick Clifton
7208 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
7210 * bfd-in2.h: Likewise.
7213 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
7215 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
7217 2000-07-31 Jason Eckhardt <jle@cygnus.com>
7219 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
7220 * bfd-in2.h, libbfd.h: Regenerate.
7222 2000-07-31 Nick Clifton <nickc@cygnus.com>
7224 * section.c (struct sec): Add new boolean field 'segment_mark'.
7225 (STD_SECTION): Initialise new field to zero.
7227 * bfd-in2.h: Regenerate.
7229 * elf.c (copy_private_bfd_data): Reorganise section to segment
7230 mapping to cope with moved sections requiring new segments,
7231 and overlapping segments.
7232 (SEGMENT_END): New macro: Return the end address of a segment.
7233 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
7234 contains a section by comparing their VMA addresses.
7235 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
7236 contains a section by comparing their LMA addresses.
7237 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
7238 section should be included in a segment.
7239 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
7240 follows another in memory.
7241 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
7244 2000-07-22 Jason Eckhardt <jle@cygnus.com>
7246 * cpu-i860.c: Added comments.
7248 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
7249 bfd_elf32_i860_little_vec.
7250 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
7251 (ELF_MAXPAGESIZE): Changed to 4096.
7253 * targets.c (bfd_elf32_i860_little_vec): Declaration of
7255 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
7257 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
7258 config for little endian elf32 i860.
7259 (targ_defvec): Define for the new config above
7260 as "bfd_elf32_i860_little_vec".
7261 (targ_selvecs): Define for the new config above
7262 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
7264 * configure.in (bfd_elf32_i860_little_vec): Added recognition
7267 * configure: Regenerated.
7269 2000-07-27 H.J. Lu <hjl@gnu.org>
7271 * elflink.h (elf_merge_symbol): Take one more argument,
7272 dt_needed, to indicate if the symbol comes from a DT_NEEDED
7273 entry. Don't overide the existing weak definition if dt_needed
7275 (elf_link_add_object_symbols): Pass dt_needed to
7276 elf_merge_symbol ().
7278 2000-07-27 Nick Clifton <nickc@cygnus.com>
7280 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
7283 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
7285 * configure.host (*-*-aix*): AIX has 'long long' always.
7287 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
7288 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
7289 (xcoff_write_archive_contents_big): Don't update the offset
7290 of the symbol table, xcoff_write_armap will do it.
7292 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
7294 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
7295 of dynobj for SGI_COMPAT checks.
7297 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7299 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
7300 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
7301 * bfd-in2.h: Regenerate.
7303 2000-07-21 Nick Clifton <nickc@cygnus.com>
7305 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
7306 range symbol indices in relocs and issue an error message.
7308 2000-07-20 H.J. Lu <hjl@gnu.org>
7310 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
7311 info->new_dtags when setting DT_FLAGS_1. It will only be set
7312 by the new linker options. It shouldn't break anything.
7314 2000-07-20 H.J. Lu <hjl@gnu.org>
7316 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
7317 only if info->new_dtags is true.
7319 2000-07-20 H.J. Lu <hjl@gnu.org>
7321 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
7322 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
7324 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
7326 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
7327 (ALL_MACHINES_CFILES): Add cpu-cris.c.
7328 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
7329 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
7330 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
7331 * Makefile.in: Rebuild.
7332 * aclocal.m4: Rebuild.
7333 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
7334 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
7335 (bfd_cris_arch): Declare.
7336 (bfd_archures_list): Add bfd_cris_arch.
7337 * bfd-in2.h: Rebuild.
7338 * config.bfd: (cris-*-*): New target.
7339 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
7340 * configure: Rebuild.
7341 * elf.c (prep_headers): Add bfd_arch_cris.
7342 * libbfd.h: Rebuild.
7343 * libaout.h (enum machine_type): Add M_CRIS.
7344 * reloc.c: Add CRIS relocations.
7345 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
7346 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
7347 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
7348 * po/POTFILES.in, po/bfd.pot: Regenerate.
7350 2000-07-19 H.J. Lu <hjl@gnu.org>
7352 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
7353 DF_TEXTREL if DT_TEXTREL is set.
7354 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7355 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7356 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
7357 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
7358 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
7359 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
7360 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
7361 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
7362 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
7363 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
7365 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
7366 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
7368 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
7370 2000-07-19 H.J. Lu <hjl@gnu.org>
7372 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
7373 * bfd-in2.h: Rebuild.
7375 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
7376 (elf_dt_soname): New.
7378 * elf.c (bfd_elf_set_dt_needed_soname): New.
7380 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
7381 entry if the shared object loaded by DT_NEEDED is used to
7382 resolve the reference in a regular object.
7384 2000-07-19 H.J. Lu <hjl@gnu.org>
7386 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
7387 DT_DEPAUDIT and DT_AUDIT as strings.
7389 2000-07-19 Nick Clifton <nickc@cygnus.com>
7391 * format.c: Fix formatting.
7393 2000-07-19 H.J. Lu <hjl@gnu.org>
7395 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
7397 2000-07-19 H.J. Lu <hjl@gnu.org>
7399 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
7400 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
7401 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
7402 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
7403 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
7404 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
7405 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
7407 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
7409 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
7410 renamed functions from here...
7411 (assign_section_numbers): Use renamed functions.
7412 (prep_headers): Use renamed functions.
7414 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
7415 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
7416 * bfd-in2.h: Regenerate.
7418 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
7420 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
7421 parenthesis in if statement.
7423 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
7425 Enable the support for Traditional MIPS.
7426 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
7427 return ict_none appropriately for traditional mips targets.
7428 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
7429 (STUB_MOVE): Conditionalize for traditonal mips.
7430 (STUB_LI16): Likewise.
7431 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
7432 room for RTPROC header.
7433 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
7434 the permission for the PT_DYNAMIC as read, write and execute.
7435 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
7436 for traditonal mips.
7437 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
7438 _DYNAMIC_LINKING for traditonal mips.
7439 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
7440 in case of traditonal mips.
7441 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
7442 entry is required. For a function if PLT is not required then set the
7443 corresponding hash table entry to 0.
7444 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
7446 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
7447 shared object set the value to 0.
7448 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
7449 _DYNAMIC_LINKING for traditonal mips.
7450 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
7451 for traditonal mips.
7453 2000-07-15 H.J. Lu <hjl@gnu.org>
7455 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
7457 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
7459 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
7460 out a structure that is BFD_IN_MEMORY.
7462 2000-07-11 Alan Modra <alan@linuxcare.com.au>
7464 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
7465 bfd pointer. Print section id instead of bfd pointer for local
7466 syms. Prefix addend with `+' for global syms as well as local.
7467 Correct calculation of name component lengths.
7468 (elf64_hppa_check_relocs): Update call to get_dyn_name.
7470 From David Huggins-Daines <dhd@linuxcare.com>
7471 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
7472 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
7473 (elf64_hppa_modify_segment_map): Likewise.
7475 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7477 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
7478 addresses to be "naturally" sign extended. Return -1 if unknown.
7479 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
7480 * bfd-in2.h: Regenerate.
7482 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7484 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
7485 and ECOF_SIGNED_64 to list ways to extract an offset.
7486 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
7487 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
7489 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
7490 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
7492 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
7494 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
7495 bfd_get_start_address.
7496 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
7497 (elf_swap_ehdr_out): Ditto.
7499 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
7501 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
7502 compatibility with older binutils.
7504 2000-07-10 Alan Modra <alan@linuxcare.com.au>
7506 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
7507 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
7509 From Ryan Bradetich <rbradetich@uswest.net>
7510 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
7511 (parse_line_table): Ditto.
7512 (_bfd_dwarf1_find_nearest_line): Ditto.
7513 * syms.c (cmpindexentry): Remove extra `*' from params.
7515 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
7517 * elf32-mips.c (sort_dynamic_relocs): New Function.
7518 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
7519 via qsort to sort the dynamic relocations in increasing r_symndx
7522 2000-07-09 Alan Modra <alan@linuxcare.com.au>
7524 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
7525 ATTRIBUTE_UNUSED to unused args.
7526 (get_opd): Likewise.
7527 (get_plt): Likewise.
7528 (get_dlt): Likewise.
7529 (get_stub): Likewise.
7530 (elf64_hppa_adjust_dynamic_symbol): Likewise.
7531 (elf64_hppa_link_output_symbol_hook): Likewise.
7532 (elf64_hppa_check_relocs): Delete unused var.
7533 (elf64_hppa_size_dynamic_sections): Likewise.
7534 (elf64_hppa_finalize_opd): Likewise.
7535 (elf64_hppa_finalize_dynreloc): Likewise.
7536 (elf64_hppa_modify_segment_map): Likewise.
7537 (elf64_hppa_finish_dynamic_sections): Likewise.
7539 * elf-hppa.h (elf_hppa_final_write_processing): Add
7540 ATTRIBUTE_UNUSED to unused args.
7541 (elf_hppa_final_link_relocate): Likewise.
7542 (elf_hppa_record_segment_addrs): Add paretheses.
7543 (elf_hppa_relocate_section): Constify dyn_name.
7545 From David Huggins-Daines <dhd@linuxcare.com>
7546 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
7547 rearrange case statement so that it gets preferred to 32-bit ones.
7549 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
7550 asection->id instead of address of asection structure.
7551 (elf32_hppa_size_stubs): Likewise.
7553 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
7554 for .init* and .fini*.
7556 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
7557 and addends used in stub names to 32 bits.
7558 (elf32_hppa_size_stubs): Likewise.
7560 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
7561 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
7562 not bfd_put_64. Fix minor comment typo and formatting.
7564 Changes to create multiple linker stubs, positioned immediately
7565 before the section where they are required.
7566 * elf32-hppa.c: Don't include hppa_stubs.h.
7567 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
7568 (elf32_hppa_stub_hash_table): Delete.
7569 (elf32_hppa_link_hash_entry): Delete.
7570 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
7571 stub_hash_table, and store the struct here rather than a pointer.
7572 Delete output_symbol_count. Add offset array. Change
7573 global_value to a bfd_vma.
7574 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
7575 (elf32_hppa_stub_hash_traverse): Delete.
7576 (elf32_hppa_name_of_stub): Delete.
7577 (elf32_hppa_link_hash_lookup): Delete.
7578 (elf32_hppa_link_hash_traverse): Delete.
7579 (elf32_hppa_stub_hash_table_init): Delete.
7580 (elf32_hppa_size_of_stub): Pass input section and offset rather
7581 than location and calculate location here. Don't pass name as all
7582 stubs are now the same size.
7583 (elf32_hppa_stub_hash_newfunc): Init new fields.
7584 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7586 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7587 comparing against ints. Rewrite stub handling code.
7588 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7589 Case enums to int before comparing against ints. Remove
7590 bfd_reloc_dangerous case.
7591 (elf32_hppa_build_one_stub): Rewrite.
7592 (elf32_hppa_size_one_stub): New function.
7593 (elf32_hppa_build_stubs): Rewrite.
7594 (elf32_hppa_size_stubs): Pass in linker call-back functions.
7595 Rewrite stub-handling specific code.
7597 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7599 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7601 * hppa_stubs.h: Delete.
7602 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7603 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7604 * Makefile.in: Regenerate.
7606 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7609 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7611 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7612 and section name for bfd_reloc_notsupported error message.
7613 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7614 bfd_reloc_notsupported.
7615 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7617 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7618 undefined weak symbols for all relocs.
7619 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7620 offsets are relative to one past the delay slot.
7621 (elf32_hppa_size_stubs): Account for reloc addend when calculating
7622 branch destination. Put addend into stub name too.
7623 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7624 adjust by 8 when deciding whether a linker stub is needed. Put
7625 addend into stub name as for above.
7627 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7628 various args and vars.
7629 (elf32_hppa_bfd_final_link_relocate): Here too.
7630 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
7631 inner block var to avoid shadowing.
7633 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
7635 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7636 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7637 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7639 * libhppa.h: Change practically all unsigned ints to plain ints.
7640 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
7643 From Ryan Bradetich <rbradetich@uswest.net>
7644 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7645 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7647 From David Huggins-Daines <dhd@linuxcare.com>
7648 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7649 to the new OP_* ones.
7651 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7652 error exit. Bail out earlier on plabel relocs that we aren't
7653 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
7654 string, and then don't free our copy.
7655 (elf32_hppa_build_one_stub): Make insn unsigned int.
7657 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7658 available with BL, not BE and BLE.
7660 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7661 code for elf arg relocs.
7662 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7663 argument with elf_link_hash_entry h. Handle undefined weak
7664 symbols. Move $global$ lookup from here...
7665 (elf32_hppa_relocate_section): ...to here. Return correct error
7666 message for non-handled relocs.
7667 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
7668 wrong test was -0x3ffff to +0x40000.
7670 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7671 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7672 Handle them as such.
7673 (elf_hppa_relocate_insn): Fix a typo.
7675 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7676 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7677 assemble_17, assemble_21): Delete.
7678 Supply defines for all 64 possible opcodes.
7679 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7680 formats. Handle COMICLR.
7681 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7684 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7685 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7686 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7688 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7689 the local syms - did this code get deleted accidentally? Ignore
7690 undefined and undefweak syms.
7692 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7693 block. Use it instead of elf64_hppa_hash_table (info).
7694 (elf_hppa_final_link_relocate): Use hppa_info instead of
7695 elf64_hppa_hash_table (info).
7697 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7698 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7699 (hppa_rebuild_insn): Mask immediate bits here instead.
7700 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7702 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7704 * section.c (struct sec): Add id field. Tidy comment formatting.
7705 (bfd_make_section_anyway): Set id.
7706 (STD_SECTION): Init id too.
7707 Change CONST to const throughout.
7708 * archures.c (bfd_arch_info): Tidy comment.
7709 (bfd_arch_list): Change a CONST to const.
7710 * libbfd-in.h: Tidy comments and replace CONST with const.
7711 * elf-bfd.h: Likewise.
7712 * libbfd.h: Regenerate.
7713 * bfd-in2.h: Regenerate.
7714 * libcoff.h: Regenerate.
7716 2000-07-07 DJ Delorie <dj@redhat.com>
7718 * archive.c (_bfd_write_archive_contents): Add an informative
7721 2000-07-06 Kazu Hirata <kazu@hxi.com>
7723 * srec.c: Fix formatting.
7725 2000-06-05 DJ Delorie <dj@redhat.com>
7729 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7731 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7732 value of PC-relative offsets.
7734 2000-07-03 Jim Wilson <wilson@cygnus.com>
7736 * elf64-alpha.c (alpha_elf_size_info): New.
7737 (elf_backend_size_info): Define to alpha_elf_size_info.
7738 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7740 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7742 * elf32-mips.c: Include elf32-target.h again for the traditional
7745 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7747 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7748 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7749 (avr_info_to_howto_rela): Likewise.
7750 (elf32_avr_gc_mark_hook): Likewise.
7751 (elf32_avr_gc_sweep_hook): Likewise.
7752 (elf32_avr_relocate_section): Likewise.
7754 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7756 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7757 an external symbol for a non-shared, non-relocatable link.
7759 2000-07-03 Nick Clifton <nickc@redhat.com>
7761 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7762 is an external symbol.
7763 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7766 2000-07-03 Kazu Hirata <kazu@hxi.com>
7768 * reloc16.c: Fix formatting.
7770 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7772 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7773 to add a new target for traditional mips i.e
7774 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7775 * configure.in: Likewise.
7776 * configure: Rebuild.
7777 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7779 (bfd_elf32_tradlittlemips_vec): Likewise.
7780 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7781 to see that elfNN_bed does not get redefined even if the target file
7782 is included twice for a chip. See elf32-mips.c.
7784 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7786 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7787 (CLEANFILES): Add DEPA.
7788 * Makefile.in: Regenerate.
7790 2000-06-30 DJ Delorie <dj@cygnus.com>
7792 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7793 can't assume the PE header is at 0x80.
7795 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7797 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7799 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7801 * go32stub.h: Update stub.
7803 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7805 * archures.c (bfd_mach_avr5): Define.
7806 * bfd-in2.h (bfd_mach_avr5): Define.
7807 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7808 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7809 (compatible): Update comment. Add missing test.
7810 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7811 for avr2 and avr4. Simplify 8K wrap code.
7812 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7813 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7815 2000-06-26 Kazu Hirata <kazu@hxi.com>
7817 * coff-h8300.c: Fix formatting.
7818 * cpu-h8300.c: Likewise.
7820 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7822 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7823 for local symbols whose names are unknown.
7825 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7827 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7829 * Makefile.in: Regenerate.
7830 * doc/Makefile.in: Regenerate.
7832 2000-06-20 H.J. Lu <hjl@gnu.org>
7834 * Makefile.am: Rebuild dependency.
7835 * Makefile.in: Rebuild.
7837 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7839 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7840 (elf_backend_copy_indirect_symbol): Map to the new function.
7842 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7844 * archive.c (normalize): Correct pointer comparison when checking
7846 (bfd_bsd_truncate_arname): Likewise.
7847 (bfd_gnu_truncate_arname): Likewise.
7849 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7851 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7852 sections elf_{text,data}_{section,symbol}.
7853 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7854 (_bfd_mips_elf_hide_symbol): New function.
7855 (elf_backend_hide_symbol): Map to the new function.
7856 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7857 definitions of mips_elf_{text,data}_{section,symbol}.
7858 (mips_elf_local_relocation_p): Try to find the direct symbol
7859 based on new check_forced argument.
7860 (mips_elf_calculate_relocation): Use new version of
7861 mips_elf_local_relocation_p.
7862 (mips_elf_relocate_section): Likewise.
7863 (_bfd_mips_elf_relocate_section): Likewise.
7864 (mips_elf_sort_hash_table): Only assert that have enough GOT
7866 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7867 entry if the relocation based on the new external argument.
7868 (mips_elf_create_dynamic_relocation): Assert that we have a
7869 section contents allocated where we can swap out the dynamic
7871 (mips_elf_calculate_relocation): Find the real hash-table entry
7872 correctly by using h->root.root.type. Only create a dynamic
7873 relocation entry if the symbol is defined in a shared library.
7874 Create an external GOT entry for the GOT16 relocation if the
7875 symbol was forced local.
7876 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7877 dynamic index if the symbol was forced local.
7879 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7881 * elf32-mips.c: Fix typos in comments.
7883 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7885 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7888 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7890 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7891 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7892 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7893 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7894 (bfd_elf32_m68hc11_vec): Likewise.
7895 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7896 Supports 68hc11 & 68hc12 at the same time.
7897 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7899 (bfd_elf32_m68hc11_vec): Likewise.
7900 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7901 * archures.c (bfd_m68hc12_arch): Define and register in global list
7902 (bfd_m68hc11_arch): Likewise.
7903 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7904 BFD_RELOC_M68HC11_3B): Define.
7905 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7906 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7908 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7910 * elf_bfd.h (struct elf_backend_data): Add info argument to
7911 elf_backend_hide_symbol.
7912 (_bfd_elf_link_hash_hide_symbol): Likewise.
7913 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7914 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7915 * elflink.h (elf_link_add_object_symbols): Likewise.
7916 (elf_link_assign_sym_version): Likewise.
7918 2000-06-18 H.J. Lu <hjl@gnu.org>
7920 * coff-i386.c (coff_i386_reloc): Don't return in case of
7921 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7922 Compensate PE relocations when linking with non-PE object
7923 files to generate a non-PE executable.
7925 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7927 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7928 GOT entries if we're doing a static link or -Bsymbolic link.
7930 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7932 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7933 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7935 (elf_link_output_relocs): Likewise.
7936 (elf_reloc_link_order): Likewise.
7938 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7940 * archures.c (enum bfd_architecture): #define constants for
7941 PowerPc and RS6000 machine numbers.
7942 * bfd-in2.h: Regenerate.
7943 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7944 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7945 and RS6000 machine numbers using #defined constants from
7947 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7948 machine numbers using #defined constants from archures.c. Add
7949 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7950 64-bit words in 620 entry.
7951 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7953 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7955 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7957 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7958 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7959 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7961 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7963 * bfd-in.h (bfd_family_coff): Define.
7964 * bfd-in2.h: Regenerate.
7965 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7966 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7967 instead of bfd_target_coff_flavour.
7968 * cofflink.c (_bfd_coff_final_link): Likewise.
7969 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7970 exclude XCOFF files.
7971 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7973 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7974 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7975 * xcofflink.c (XCOFF_XVECP): Delete.
7976 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7977 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7978 bfd_xcoff_record_link_assignment,
7979 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7980 check for bfd_target_xcoff_flavour.
7982 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7984 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7986 (read_hdr): New function.
7987 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7988 of trying to extract individual registers. Set abfd->arch_info
7989 to match the architecture that created the core file.
7990 (rs6000coff_get_section_contents): Delete.
7991 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7993 2000-06-14 H.J. Lu <hjl@gnu.org>
7995 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7998 2000-06-13 H.J. Lu <hjl@gnu.org>
8000 * configure: Regenerate.
8002 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
8004 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
8007 2000-06-08 David O'Brien <obrien@FreeBSD.org>
8009 * configure.in (VERSION): Update to show this is the CVS mainline.
8011 2000-06-07 Alan Modra <alan@linuxcare.com.au>
8013 * elf32-d10v.c: Include elf/d10v.h
8014 (enum reloc_type): Delete.
8015 * elf32-d30v.c: Include elf/d30v.h
8016 (enum reloc_type): Delete.
8018 * Makefile.am: Run "make dep-am" to regenerate dependencies.
8019 * Makefile.in: Regenerate.
8021 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
8022 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
8023 move HOWTOs into elf_howto_table.
8024 (R_386_standard, R_386_ext_offset): Define.
8025 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
8026 (elf_i386_reloc_type_lookup): Modify calculation of index into
8027 elf_howto_table since we've removed the padding.
8028 (elf_i386_info_to_howto_rel): Likewise.
8029 (elf_i386_relocate_section): Likewise.
8031 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
8033 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
8035 2000-06-05 H.J. Lu <hjl@gnu.org>
8037 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
8038 an error when seeing an undefined symbol with hidden/internal
8039 attribute. It is handled in *_relocate_section ().
8041 2000-06-05 H.J. Lu <hjl@gnu.org>
8043 * elflink.h (elf_fix_symbol_flags): Follow the link for the
8044 indirect symbol for the ELF_LINK_NON_ELF bit.
8045 (elf_link_output_extsym): Don't output the indirect symbol even
8046 if the ELF_LINK_NON_ELF bit is set.
8048 2000-06-01 J.T. Conklin <jtc@redback.com>
8050 * config.bfd (i[3456]86-*-netbsdelf*): New target.
8051 (i[3456]86-*-netbsdaout*): New target.
8052 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
8053 (i[3456]86-*-openbsd*): Likewise.
8055 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
8057 * trad-core.c: From hpux-core.c, include <dirent.h> or
8058 <sys/ndir.h> when possible.
8060 2000-05-31 Ulrich Drepper <drepper@redhat.com>
8062 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
8063 definitions. We must not assume they are sorted in the file
8064 according to their index numbers.
8066 2000-05-31 Alan Modra <alan@linuxcare.com.au>
8068 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
8069 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
8070 R_PARISC_DIR17F are for absolute branches; Handle them as such.
8072 2000-05-30 Nick Clifton <nickc@cygnus.com>
8074 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
8075 80960CA, 80960MC as valid machine names.
8077 2000-05-30 H.J. Lu <hjl@gnu.org>
8079 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
8080 visibility bits if the symbol is undefined. Correctly handle
8081 weak undefined symbols with hidden and internal attributes.
8083 * elflink.h (elf_link_add_object_symbols): Always turn the
8084 symbol into local if it has the hidden or internal attribute.
8086 2000-05-29 Philip Blundell <philb@gnu.org>
8088 * ppcboot.c: Add packed attribute if compiling with GCC.
8090 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
8092 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
8094 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
8096 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
8097 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
8098 corefile on a 64-bit (Sparc Solaris) host. Also clean up
8101 2000-05-26 Alan Modra <alan@linuxcare.com.au>
8103 * Makefile.am: Update dependencies with "make dep-am"
8104 * Makefile.in: Regenerate.
8106 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
8107 bindtextdomain): Replace defines with those from intl/libgettext.h
8108 to quieten gcc warnings.
8110 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
8112 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
8114 * archive.c (normalize, bfd_bsd_truncate_arname,
8115 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
8116 file names with backslashes.
8118 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
8121 * sysdep.h: Include filenames.h.
8123 2000-05-26 Alan Modra <alan@linuxcare.com.au>
8125 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
8127 2000-05-26 Jakub Jelinek <jakub@redhat.com>
8129 * elf64-sparc.c (sparc64_elf_relax_section): New.
8130 (sparc64_elf_relocate_section): Optimize tail call into branch always
8132 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8133 (elf32_sparc_relax_section): New.
8135 2000-05-26 Jakub Jelinek <jakub@redhat.com>
8137 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
8138 Remove unusued variables.
8139 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
8140 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
8141 previous fix, so that shared libs really don't influence targets
8142 extension mask and memory model.
8144 2000-05-23 H.J. Lu <hjl@gnu.org>
8146 * elf64-alpha.c (elf64_alpha_relocate_section): Check
8147 h->root.other not h->other.
8148 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8150 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
8152 2000-05-23 H.J. Lu <hjl@gnu.org>
8154 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
8155 undefined symbol with the non-default visibility attributes.
8156 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
8157 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8158 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8159 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8160 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8161 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8162 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8163 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8164 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8165 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
8166 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8168 2000-05-22 Richard Henderson <rth@cygnus.com>
8170 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
8171 PCREL22, PCREL64I. Zero size of special relocs.
8172 (elf64_ia64_reloc_type_lookup): Likewise.
8173 (USE_BRL, oor_brl, oor_ip): New.
8174 (elf64_ia64_relax_section): New.
8175 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
8176 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
8177 (elf64_ia64_relocate_section): Likewise.
8178 (bfd_elf64_bfd_relax_section): New.
8179 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
8180 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
8181 * bfd-in2.h, libbfd.h: Regenerate.
8183 2000-05-22 Nick Clifton <nickc@cygnus.com>
8185 * configure.in : Add peigen.lo to MIPS PE targets.
8186 * configure: Regenerate.
8188 2000-05-22 Momchil Velikov <velco@fadata.bg>
8190 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
8191 only if it is known for both input and output bfds. Separate
8192 error message strings as in some languages, it may be necessary
8193 to change more than one place in the string to change between
8196 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
8197 endianess checks, call _bfd_generic_verify_endian_match() instead.
8199 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
8201 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
8203 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
8204 endianess before checking bfd flavours.
8206 2000-05-22 H.J. Lu <hjl@gnu.org>
8208 * elflink.h (elf_link_output_extsym): Clear the visibility
8209 field for symbols not defined locally.
8211 2000-05-18 Alan Modra <alan@linuxcare.com.au>
8213 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
8214 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
8215 (hppa_rebuild_insn): Mask immediate bits here instead.
8216 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
8218 2000-05-18 Momchil Velikov <velco@fadata.bg>
8220 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
8221 relocs for an executable, ensure that they are virtual addresses.
8223 2000-05-18 Jeffrey A Law (law@cygnus.com)
8225 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
8227 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
8228 Rick Gorton <gorton@scrugs.lkg.dec.com>
8230 * elflink.h: Add emitrelocations support: when enabled, relocation
8231 information and relocation sections are put into final output
8232 executables. If the emitrelocations flag is set, do the following:
8233 (elf_bfd_final_link): Emit relocation sections.
8234 (elf_link_input_bfd): Compute relocation section contents.
8235 (elf_gc_sections): Don't clean relocation sections.
8237 2000-05-16 Catherine Moore <clm@cygnus.com>
8239 * som.c (som_decode_symclass): Recognize weak symbols.
8241 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
8243 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
8244 read idata section only from dataoff.
8245 (pe_print_edata): Correctly check for valid eat_member.
8247 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
8249 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
8251 2000-05-14 Philip Blundell <philb@gnu.org>
8253 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
8255 2000-05-12 Alan Modra <alan@linuxcare.com.au>
8257 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
8259 * peigen.c (pe_print_idata): Look for .idata section and print
8260 info even if data directory has zero entries. Read idata section
8261 starting from dataoff, and adjust all data offsets to suit. Cast
8262 all bfd_vma vars to unsigned long before passing to fprintf.
8263 * peigen.c (pe_print_edata): Similarly, look for .edata section
8264 and print info even if data directory has zero entries. Cast
8265 all bfd_vma vars to unsigned long before passing to fprintf.
8267 From Szabolcs Szakacsits <szaka@F-Secure.com>
8268 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
8269 directory size which may be bogus.
8270 * peigen.c (pe_print_edata): Similarly.
8272 2000-05-09 Alan Modra <alan@linuxcare.com.au>
8274 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
8276 (copy_private_bfd_data): Allow for space possibly taken up by elf
8277 headers when calculating segment physical address from lma.
8279 2000-05-08 Alan Modra <alan@linuxcare.com.au>
8281 * versados.c (versados_scan): Init stringlen and pass_2_done.
8283 * trad-core.c (trad_unix_core_file_p): Return
8284 bfd_error_wrong_format rather than bfd_error_file_truncated.
8286 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
8287 add_data_entry. DataDirectory virtual address is relative.
8288 (pe_print_idata): Account for relative DataDirectory virtual
8289 addresses. Don't trash datasize inside POWERPC_LE_PE code.
8290 (pe_print_edata): Similarly.
8292 From Szabolcs Szakacsits <szaka@F-Secure.com>
8293 * peigen.c (dir_names): Add Delay Import Directory.
8294 (pe_print_idata): Always search for bfd section containing
8295 idata address rather than looking up section name. Print this
8296 section name rather than .idata.
8297 (pe_print_edata): Similarly. Also print some fields as %08lx.
8298 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
8301 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
8303 * xcoff.h: Rename to xcoff-target.h
8304 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
8305 * coff-rs6000.c: Ditto.
8306 * coff64-rs6000.c: Ditto.
8307 * coff-pmac.c: Ditto.
8308 * Makefile.in: Regenerate.
8310 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
8312 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
8313 Change U802TOC64MAGIC to U803XTOCMAGIC.
8315 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
8317 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
8318 * bfd-in.h: Prototype bfd_elf_get_arch_size.
8319 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
8321 2000-05-04 Alan Modra <alan@linuxcare.com.au>
8323 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
8325 2000-05-03 Martin v. L
\81öwis <loewis@informatik.hu-berlin.de>
8327 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
8328 hidden and internal symbols.
8329 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
8331 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
8332 assign a PLT or GOT entry to symbols with hidden and
8333 internal visibility.
8335 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
8337 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
8339 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8341 2000-05-02 H.J. Lu <hjl@gnu.org>
8343 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
8346 2000-05-02 Alan Modra <alan@linuxcare.com.au>
8348 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
8349 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
8351 * Makefile.in: Regenerate.
8353 2000-05-01 Jim Wilson <wilson@cygnus.com>
8355 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
8356 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
8357 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
8358 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
8359 * Makefile.in: Rebuild.
8361 2000-05-02 Alan Modra <alan@linuxcare.com.au>
8363 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
8364 doesn't work very well.
8366 * elf-hppa.h (elf_hppa_internal_shdr): Define.
8367 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
8368 Set hdr->s_type to 1 if ARCH_SIZE == 32.
8369 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
8370 (elf_hppa_info_to_howto): Likewise.
8371 (elf_hppa_info_to_howto_rel): Likewise.
8372 (elf_hppa_reloc_type_lookup): Likewise.
8373 (elf_hppa_is_local_label_name): Likewise.
8374 (elf_hppa_fake_sections): Likewise.
8375 (elf_hppa_final_write_processing): Likewise.
8376 (elf_hppa_howto_table): Fully initialise all entries.
8377 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
8378 (elf_hppa_info_to_howto): Likewise.
8379 (elf_hppa_info_to_howto_rel): Likewise.
8380 (elf_hppa_reloc_type_lookup): Likewise.
8381 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
8382 elf_hppa_unmark_useless_dynamic_symbols,
8383 elf_hppa_remark_useless_dynamic_symbols,
8384 elf_hppa_record_segment_addrs, elf_hppa_final_link,
8385 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
8386 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
8387 elf32-hppa.c mess is cleaned up.
8388 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
8389 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
8390 r_field then call hppa_field_adjust inline func with variable
8391 r_field arg, instead call hppa_field_adjust with fixed arg.
8392 In case R_PARISC_PCREL22F, don't set r_field.
8393 (elf_hppa_relocate_insn): Change args and return type to unsigned
8394 int. Call re_assemble_* funcs to do the work.
8396 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
8399 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
8401 (sign_extend): Mask first before sign extending.
8402 (low_sign_extend): Rewrite without condition expression.
8403 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
8404 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
8405 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
8406 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
8407 result as function return value rather than through pointer arg.
8408 Accept unsigned int args, and return unsigned int.
8409 (re_assemble_3): New. Combines function of dis_assemble_3 with
8410 re-assembly of opcode and immediate.
8411 (re_assemble_12): Likewise.
8412 (re_assemble_16): Likewise.
8413 (re_assemble_17): Likewise.
8414 (re_assemble_21): Likewise.
8415 (re_assemble_22): Likewise.
8416 (hppa_field_adjust): Rewrite and document, paying attention to
8417 size of types and signed/unsigned issues.
8418 (get_opcode): Shift before masking.
8419 (FDLW): Rename to FLDW.
8420 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
8421 (hppa_rebuild_insn): Change args and return value to unsigned
8422 int. Make use of re_assemble_*. Correct case 11.
8424 * dep-in.sed: Handle ../opcodes/.
8425 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
8426 elf64-hppa.h, hppa_stubs.h, xcoff.h.
8427 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
8428 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
8429 elfarm-nabi.lo dependencies outside of auto-dependency area.
8430 Regenerate dependencies.
8431 * Makefile.in: Regenerate.
8433 * configure.in (TRAD_HEADER): Test non-null before
8435 * configure: Regenerate.
8437 * reloc.c: Fix mis-spelling in comment.
8439 2000-05-01 Alan Modra <alan@linuxcare.com.au>
8441 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
8442 * vms.c (vms_openr_next_archived_file): Return NULL.
8444 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8446 * coffcode.h Copy changes mistakenly done to libcoff.h in
8449 2000-04-29 Andreas Jaeger <aj@suse.de>
8451 * libbfd-in.h: Correctly check GCC version.
8452 * bfd-in.h: Likewise.
8453 * libhppa.h: Likewise.
8454 * libbfd.h: Regenerate.
8455 * bfd-in2.h: Regenerate.
8457 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8459 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
8460 coffdu-rs6000.{lo,c}.
8461 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
8463 * Makefile.in: Regenerate.
8464 * xcoff.h: New file.
8465 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
8466 * coff-rs6000.c: Move all declarations and defines that are
8467 common to the xcoff backends into xcoff.h
8468 * coff64-rs6000.c: Ditto,
8470 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8472 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
8473 _bfd_coff_force_symnames in strings and
8474 _bfd_coff_debug_string_prefix_length to their default values.
8475 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
8477 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
8479 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
8480 _bfd_coff_force_symnames in strings and
8481 _bfd_coff_debug_string_prefix_length to their default values.
8483 2000-04-27 Alan Modra <alan@linuxcare.com.au>
8485 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
8486 Check local_got_refcounts before dereferencing.
8488 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
8489 before deciding we don't need R_PPC_PLT32 relocation.
8490 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
8493 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
8495 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
8497 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
8498 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
8499 (elf_i386_relocate_section): Allow for .plt to go missing.
8500 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
8501 can use a relative reloc for got as elf_i386_relocate_section.
8502 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
8504 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
8506 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
8508 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
8510 * Makefile.am (coff64-rs6000.lo): New rule.
8511 * Makefile.in: Regenerate.
8512 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
8513 xcoff_is_local_label_name, xcoff_rtype2howto,
8514 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
8515 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
8516 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
8517 (NO_COFF_SYMBOLS): Define.
8518 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
8519 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
8521 (MINUS_ONE): New macro.
8522 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
8524 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
8525 coff_SWAP_aux_out): Map to the new functions.
8526 * coff64-rs6000.c: New file.
8527 * libcoff.h (bfd_coff_backend_data): Add new fields
8528 _bfd_coff_force_symnames_in_strings and
8529 _bfd_coff_debug_string_prefix_length.
8530 (bfd_coff_force_symnames_in_strings,
8531 bfd_coff_debug_string_prefix_length): New macros for above fields.
8532 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
8533 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
8534 of using coff_swap_sym_in directly.
8535 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
8536 (coff_set_flags) Set magic for XCOFF64.
8537 (coff_compute_section_file_positions): Add symbol name length to
8538 string section length if bfd_coff_debug_string_prefix_length is
8540 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
8541 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
8542 using coff_swap_lineno_in directly.
8543 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
8544 and _bfd_coff_debug_string_prefix_length fields.
8545 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
8546 symbol names into strings table when
8547 bfd_coff_force_symnames_in_strings is true.
8548 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
8549 SET_RELOC_VADDR): New macros.
8550 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
8551 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
8553 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
8554 changes within RS6000COFF_C specific code.
8555 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
8556 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
8557 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8558 Extend existing hack on target name.
8559 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
8561 * coff-tic54x.c (ticof): Keep up to date with new fields
8562 in bfd_coff_backend_data.
8563 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
8564 targ_selvecs to include rs6000coff64_vec for rs6000.
8565 * configure.in: Add rs6000coff64_vec case.
8566 * cpu-powerpc.c: New bfd_arch_info_type.
8568 2000-04-24 Jeffrey A Law (law@cygnus.com)
8570 * config.bfd: Only disable elf32-hppa vectors, not all of the
8571 BSD and OSF configuration support. Provide (disabled) clauses
8573 * configure.in: Add clause for PA64 support.
8574 * configure: Rebuilt.
8576 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
8577 (bfd_elf64_hppa_vec): Declare.
8579 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8580 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8581 (elf64-hppa.lo): Add dependencies.
8582 * Makefile.in: Rebuilt.
8584 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8586 2000-04-24 Jason Eckhardt <jle@cygnus.com>
8588 * libhppa.h (dis_assemble_16): New function.
8589 (pa_arch): Added pa20w element.
8591 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
8593 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8594 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8595 bfd_elf64_slurp_reloc_table.
8597 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8598 definitions to get external names.
8599 (elf_write_relocs): Renamed from write_relocs and make global.
8600 (elf_slurp_reloc_table): Make global.
8601 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8603 * archive.c (hpux_uid_gid_encode): New function.
8604 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8605 defined and the ID is greater than 99999.
8606 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8607 special uid/gid fields into 32 bit values.
8609 2000-04-21 Matthew Green <mrg@cygnus.com>
8611 * config.bfd: Add NetBSD/sparc64 support.
8613 2000-04-21 Richard Henderson <rth@cygnus.com>
8614 David Mosberger <davidm@hpl.hp.com>
8615 Timothy Wall <twall@cygnus.com>
8616 Jim Wilson <wilson@cygnus.com>
8618 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8619 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8620 (BFD64_BACKENDS): Add elf64-ia64.lo.
8621 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8622 (cpu-ia64.lo, elf64-ia64.lo): New rules.
8623 * Makefile.in: Rebuild.
8624 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8625 (bfd_ia64_arch): Declare.
8626 (bfd_archures_list): Add bfd_ia64_arch.
8627 * bfd-in2.h: Rebuild.
8628 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8629 * configure: Rebuild.
8630 * configure.host: (ia64-*-linux*): New host.
8631 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8632 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8633 * elf.c (prep_headers): Add bfd_arch_ia64.
8634 * libbfd.h: Rebuild.
8635 * reloc.c: Add IA-64 relocations.
8636 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8638 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8639 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8641 2000-04-21 Richard Henderson <rth@cygnus.com>
8643 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8644 contents when performing a partial link.
8645 (bfd_elf_d30v_reloc_21): Likewise.
8647 2000-04-20 H.J. Lu <hjl@gnu.org>
8649 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8650 patch to symbols defined by a shared object.
8651 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8653 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
8656 * dwarf2.c (concat_filename): Avoid string literal concatenation.
8657 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8659 2000-04-11 David Mosberger <davidm@hpl.hp.com>
8661 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8662 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8663 (coff-ia64.lo): Add dependency.
8664 * Makefile.in: Regenerate.
8665 * coff-ia64.c: New file.
8666 * efi-app-ia32.c: Ditto.
8667 * efi-app-ia64.c: Ditto.
8668 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8669 (coff_set_flags): Ditto.
8670 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8671 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8672 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8673 * configure: Regenerate.
8674 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8675 (PUT_OPTHDR_IMAGE_BASE): Ditto.
8676 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8677 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8678 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8679 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8680 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8681 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8682 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8683 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8684 (GET_PDATA_ENTRY): Ditto.
8685 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8686 data_start. Use above macros to read fields that are 64 bit wide for
8687 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8688 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8689 FileAlignment and SectionAlignment to minimum alignment if they
8691 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8692 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8693 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8694 Use above macros to write fields that are 64 bit wide for
8696 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8697 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8698 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8699 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8700 begin address, end address, and unwind info address only. Use
8701 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8703 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8704 HIGH3ADJ relocation names.
8705 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8706 * targets.c: Declare bfd_efi_app_ia32_vec and
8707 bfd_efi_app_ia64_vec.
8708 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8709 bfd_efi_app_ia64_vec.
8711 2000-04-17 Timothy Wall <twall@cygnus.com>
8713 * bfd-in2.h: Add prototypes for tic54x load page access.
8714 * bfd-in.h: Regenerate.
8715 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8716 in customized _set_arch_mach function.
8717 * coffcode.h (coff_set_alignment_hook): Set section load page if
8718 the appropriate macro is defined.
8719 (write_object_contents): Read section load page.
8721 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8723 * elf32-hppa.h: Update copyright date.
8725 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8726 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8728 * elf32-d30v.c (MAX32): Don't use LL suffix.
8729 (MIN32): Define in terms of MAX32.
8730 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8732 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8735 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8737 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8739 * dep-in.sed: Match space before file name, not after.
8740 * Makefile.am: Regenerate dependencies.
8741 * Makefile.in: Regenerate.
8743 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8744 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8745 extend without an if statement.
8747 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8749 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8751 * elf32-mips.c (gprel16_with_gp): Likewise.
8752 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8753 here using -0x40000, not (int)0xfffc0000.
8754 (elf32_hppa_size_of_stub): Likewise.
8756 2000-04-11 Timothy Wall <twall@cygnus.com>
8758 * coff-tic54x.c: Now builds with all targets.
8759 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8760 * Makefile.in: Regenerate.
8761 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8762 unitialized variable.
8764 2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
8766 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8767 --enable-build-warnings option.
8768 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8769 * Makefile.in, configure: Re-generate.
8771 2000-04-07 Nick Clifton <nickc@cygnus.com>
8773 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8774 BFD_RELOC_THUMB_PCREL_BLX.
8776 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8777 R_ARM_XPC25 and R_ARM_THM_PC22.
8779 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8780 R_ARM_XPC25 and R_ARM_THM_XPC22.
8781 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8782 R_ARM_[XPC25|THM_XPC22].
8784 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8785 elf/arm-oabi.h to elf/arm.h
8787 * Makefile.am: Fix dependency for elfarm-oabi.c
8788 * Makefile.in: Regenerate.
8790 * bfd-in2.h: Regenerate.
8791 * libbfd.h: Regenerate.
8793 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8795 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8796 and restore it on failure. Release newly allocated tdata on
8799 2000-04-07 Jim Wilson <wilson@cygnus.com>
8801 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8802 (decode_line_info): Set it. Report error if unit->line_offset is
8803 equal to or larger than it.
8805 2000-04-07 Timothy Wall <twall@cygnus.com>
8807 * targets.c: Added vecs for tic54x.
8808 * reloc.c: Added relocs for tic54x.
8809 * libbfd.h: Regenerated.
8810 * configure: Add TI COFF vecs for tic54x.
8811 * configure.in: Ditto.
8812 * config.bfd (targ_cpu): Recognize new tic54x target.
8813 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8814 * bfd-in2.h: Add tic54x target and relocations.
8815 * Makefile.am, Makefile.in: Add tic54x target.
8816 * archures.c (bfd_archures_list): Add tic54x target.
8817 * coff-tic54x.c: New.
8818 * cpu-tic54x.c: New.
8820 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8822 * elfcore.h (elf_core_file_p): call backend_object_p which
8823 thereby gets an opportunity to update the arch/machine type.
8825 2000-04-06 Timothy Wall <twall@cygnus.com>
8827 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8828 class. Handle SEC_CLINK and SEC_BLOCK flags.
8829 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8830 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8832 2000-04-06 Nick Clifton <nickc@cygnus.com>
8834 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8835 EF_INTERWORK if this is an unknown EABI.
8836 (elf32_arm_merge_private_bfd_data): Check EABI version
8837 numbers. Only check EF_xxx flags if the EABI version number
8839 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8840 if the EABI version number is unknown.
8841 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8842 if the EABI version number is unknown.
8844 2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
8846 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8847 BFD_RELOC_SH_LOOP_END.
8848 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8849 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8850 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8851 (sh_elf_reloc_loop): New function.
8852 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8854 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8855 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8856 * bfd-in2.h, libbfd.h: Regenerate.
8858 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8860 * po/bfd.pot: Regenerate.
8862 * Makefile.am: Remove extraneous mkdep comment.
8863 (MKDEP): Use gcc -MM rather than mkdep.
8864 (DEP): Quote when passing vars to sub-make. Add warning
8866 (DEP1): Rewrite for "gcc -MM".
8867 (CLEANFILES): Add DEP2.
8868 Update dependencies.
8869 * Makefile.in: Regenerate.
8871 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8873 * configure.in: Added corefile support for AIX 4.3. In particular,
8874 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8875 compiling rs6000-core.c.
8876 * configure: Regenerated.
8878 2000-04-03 H.J. Lu <hjl@gnu.org>
8880 * cache.c (bfd_open_file): Unlink the output file only if
8881 it has non-zero size.
8883 2000-04-01 Ken Block USG <block@zk3.dec.com>
8885 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8886 relative relocations for non-loaded sections in shared objects.
8887 (elf64_alpha_check_relocs): Similarly.
8889 2000-04-03 Hans-Peter Nilsson <hp@axis.com>
8891 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8892 BFD_RELOC_16 to switch for extended relocs.
8893 (MY_swap_ext_reloc_in): New.
8894 (MY_swap_ext_reloc_out): New.
8895 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8896 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8897 (NAME(aout,squirt_out_relocs)): Similarly use
8898 MY_swap_ext_reloc_out.
8899 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8901 2000-04-03 Kazu Hirata <kazu@hxi.com>
8903 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8904 the R_PCRWORD_B case.
8906 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8908 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8912 2000-03-30 Donald Lindsay <dlindsay@cygnus.com>
8914 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8915 HOWTO references to bfd_elf_generic_reloc, that have
8916 partial_inplace == true, now use the new function. The function
8917 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8918 extends its fixes to the R_M32R_{16,24,32} relocs.
8919 The new logic in m32r_elf_lo16_reloc() has been removed, and
8920 it instead calls the new routine to obtain that functionality.
8922 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8924 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8925 elf32_avr_check_relocs, avr_final_link_relocate,
8926 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8927 elf32_avr_object_p): Add prototypes.
8928 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8929 (bfd_elf_avr_final_write_processing): Make static.
8931 2000-03-27 Denis Chertykov <denisc@overta.ru>
8933 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8934 * archures.c (bfd_architecture): Add AVR architecture.
8935 (bfd_archures_list): Add reference to AVR architecture info.
8936 * elf.c (prep_headers): Handle bfd_arch_avr.
8937 * reloc.c: Add various AVR relocation enums.
8938 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8940 * Makefile.am: Add support for AVR elf.
8941 * configure.in: Likewise.
8942 * config.bfd: Likewise.
8943 * Makefile.in: Regenerate.
8944 * configure: This too.
8945 * bfd-in2.h: And this.
8946 * libbfd.h: And this.
8948 2000-03-24 H.J. Lu <hjl@gnu.org>
8950 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8951 (elf64_alpha_find_reloc_at_ofs): Likewise.
8953 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8955 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8956 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8957 allowable range used to be -2**(n-1) to 2**n-1.
8958 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8959 "boolean overflow" with "bfd_reloc_status_type flag".
8961 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8963 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8965 2000-03-14 Kazu Hirata <kazu@hxi.com>
8967 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8968 of shrinks properly, including the last reloc.
8970 2000-03-13 Kazu Hirata <kazu@hxi.com>
8972 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8975 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8977 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8978 a format mismatch rather than an "error" from bfd_read such as
8979 bfd_error_file_truncated.
8981 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8983 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8984 sign-extension and big-endian compensation for
8985 R_MIPS_64 even in ld -r.
8987 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8989 * elf32-mips.c (mips_elf_next_relocation): Rename from
8990 mips_elf_next_lo16_relocation, and generalize to look
8991 for any relocation type.
8992 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8993 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8994 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8995 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8996 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8997 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8998 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8999 (mips_rtype_to_howto): Likewise.
9000 (mips_elf_calculate_relocation): Handle new relocs.
9001 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
9002 are paired. The addend for R_MIPS_GNU_REL16_S2
9003 is shifted right two bits.
9005 2000-03-10 Alan Modra <alan@linuxcare.com.au>
9007 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
9008 comment, and ensure it doesn't happen again.
9009 (bfd_install_relocation): Same here.
9010 (_bfd_relocate_contents): Don't bother assigning unused signmask
9011 shift result. Fix typos in comments.
9012 Remove trailing whitespace throughout file.
9014 2000-03-07 Doug Evans <dje@casey.transmeta.com>
9016 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
9017 * bfd-in2.h: Rebuild.
9019 2000-03-06 Nick Clifton <nickc@cygnus.com>
9021 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
9023 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
9024 (SIZEOF_ILF_STRINGS): Redefine.
9025 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
9026 relative reloc, as opposed to a section relative reloc.
9027 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
9029 Add length of symbol's prefix to string pointer.
9030 Store a pointer to the symbol in the symbol pointer table.
9031 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
9032 Initialise the symbol pointer table.
9033 Store the hint in the Hint/Name table.
9034 Make the jump reloc be symbol realtive, not section relative.
9035 Create an import symbol for imported code.
9037 2000-03-06 Catherine Moore <clm@cygnus.com>
9039 * elf.c (swap_out_syms): Check for null type_ptr.
9041 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
9043 * aout-target.h (MY(write_object_contents)): Remove unused
9044 and unusable "#if CHOOSE_RELOC_SIZE".
9045 * pc532-mach.c (MY(write_object_contents)): Ditto.
9046 * netbsd.h (MY(write_object_contents)): Ditto.
9047 * hp300hpux.c (MY(write_object_contents)): Ditto.
9048 * freebsd.h (MY(write_object_contents)): Ditto.
9049 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
9051 2000-02-29 H.J. Lu <hjl@gnu.org>
9053 * peicode.h (jtab): Make it static.
9055 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
9056 defined and COFF_IMAGE_WITH_PE is not defined.
9057 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
9058 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
9060 2000-03-01 Nick Clifton <nickc@cygnus.com>
9062 * coff-arm.c (bfd_arm_process_before_allocation): Make
9063 'symndx' signed to prevent compile time warning.
9065 * coff-mcore.c: Remove unused prototype for pe_object_p.
9067 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
9068 functions that are not used when COFF_IMAGE_WITH_PE is
9070 (struct sh_opcode): Change type of 'flags' field to unsigned
9071 long so that it can hold the USESAS flag.
9073 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
9075 * elf-m10300.c (mn10300_elf_relax_section): Initialise
9078 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
9080 Remove unusued variables and code.
9081 (elf_backend_add_symbol_hook): Fix prototype.
9083 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
9086 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
9089 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
9091 Remove unusued variables and code.
9092 (elf_backend_add_symbol_hook): Fix prototype.
9094 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
9096 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
9097 to unused function parameter.
9099 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
9101 Use EMPTY_HOWTO to initialise empty howto slots.
9102 Remove unused variables.
9104 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
9106 2000-03-01 H.J. Lu <hjl@gnu.org>
9108 * aoutx.h (aout_link_input_section_std): Pass "true" to
9109 the undefined_symbol callback.
9110 (aout_link_input_section_ext): Likewise.
9111 * bout.c (get_value): Likewise.
9112 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
9113 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
9115 (alpha_relocate_section): Likewise.
9116 * coff-arm.c (coff_arm_relocate_section): Likewise.
9117 * coff-i960.c (coff_i960_relocate_section): Likewise.
9118 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
9119 * coff-mips.c (mips_relocate_section): Likewise.
9120 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
9121 * coff-sh.c (sh_relocate_section): Likewise.
9122 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
9123 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
9124 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
9125 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
9126 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
9127 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9128 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9129 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9130 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9131 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9132 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9133 * elf32-v850.c (v850_elf_relocate_section): Likewise.
9134 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
9135 * elflink.h (elf_link_output_extsym): Likewise.
9136 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
9137 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
9138 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
9140 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
9141 undefined_symbol callback when building shared library with
9142 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
9144 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
9145 * elf32-i386.c (elf_i386_relocate_section): Likewise.
9146 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9147 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
9148 (elf32_mips_get_relocated_section_content): Likewise.
9149 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9150 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9151 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
9152 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9154 2000-02-28 Nick Clifton <nickc@cygnus.com>
9156 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
9157 * Makefile.in: Regenerate.
9159 * configure.in: Add support for mips and sh pe vectors.
9160 * configure: regenerate.
9162 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
9165 * targets.c: Add mips and sh pe vectors.
9167 * libpei.h (coff_final_link_postscript): Only define if not
9170 * coffcode.h: Add support for WinCE magic numbers.
9172 * peigen.c (pe_print_reloc): Update comment and rearrange
9173 appending of newline character.
9175 * peicode.h: Add support for Image Library Format.
9176 (pe_ILF_vars): Structure containing data used by ILF code.
9177 (pe_ILF_make_a_section): New function. Create a section based
9179 (pe_ILF_make_a_reloc): New function. Create a reloc based on
9181 (pe_ILF_make_a_symbol): New function. Create a symbol based
9183 (pe_ILF_save_relocs): New function. Store the relocs created
9184 by pe_ILF_make_a_reloc in a section.
9185 (pe_ILF_build_a_bfd): New function. Create a BFD describing
9187 (pe_ILF_object_p): New function. Return a bfd_target pointer
9189 (pe_bfd_object_p): If an ILF object is detected call
9190 pe_ILF_object_p on it.
9192 * coff-arm.c: Add support for WinCE relocs which are different
9193 from normal ARM COFF relocs.
9194 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
9196 * coff-sh.c: Add support for sh-pe target.
9197 * pe-sh.c: New file. Support code for sh-pe target.
9198 * pei-sh.c: New file. Support code for sh-pe target.
9200 * pe-mips.c: New file. Support code for mips-pe target.
9201 * pei-mips.c: New file. Support code for mips-pe target.
9203 2000-02-27 Jakub Jelinek <jakub@redhat.com>
9205 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
9206 architecture if the object causing the bump is dynamic.
9207 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
9208 and also don't it for memory ordering.
9209 (sparc64_elf_write_relocs): Take src_rela out of the loop.
9211 2000-02-27 Ian Lance Taylor <ian@zembu.com>
9213 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
9214 calling bfd_get_section_size_before_reloc.
9215 (decode_line_info): Likewise.
9216 (_bfd_dwarf2_find_nearest_line): Likewise.
9218 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
9220 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
9221 name of the libtool directory.
9222 * Makefile.in: Rebuild.
9224 2000-02-25 Rodney Brown (RodneyBrown@pmsc.com)
9226 * som.c (SOM_HOWTO): Define.
9227 (som_hppa_howto_table): Use it.
9229 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
9231 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
9233 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
9235 2000-02-24 Catherine Moore <clm@cygnus.com>
9237 * som.c (som_misc_symbol_info): Add field
9239 (som_bfd_derive_misc_symbol_info): Initialize
9241 (som_build_and_write_symbol_table): Keep track
9242 of secondary_def field.
9243 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
9244 if secondary_def field is set.
9245 (som_bfd_ar_write_symbol_stuff): Initialize
9248 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
9250 * dwarf2.c (read_address): Read 16-bits addresses.
9251 (parse_comp_unit): Accept addr_size == 2.
9253 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
9255 * bfd-in.h: Update copyright date.
9257 2000-02-23 Linas Vepstas <linas@linas.org>
9259 * cpu-i370.c: New file.
9260 * elf32-i370.c: New file.
9261 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
9262 (bfd_i370_arch): New.
9263 (bfd_archures_list): Add bfd_i370_arch.
9264 * elf.c (prep_headers): Add bfd_arch_i370.
9265 * Makefile.am: Add support for IBM 370 elf.
9266 * config.bfd: Likewise.
9267 * configure.in: Likewise.
9268 * libbfd.h (bfd_reloc_code_real_names): Likewise.
9269 * reloc.c (bfd_reloc_code_type): Likewise.
9270 * targets.c: Likewise.
9272 * Makefile.in: Regenerate.
9273 * configure: Regenerate.
9274 * bfd-in2.h: Regenerate.
9276 2000-02-22 Ian Lance Taylor <ian@zembu.com>
9278 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
9279 invalid relocation types, and change them to R_386_NONE.
9281 2000-02-22 H.J. Lu <hjl@gnu.org>
9283 * elflink.h (elf_link_add_object_symbols): If a version symbol is
9284 not defined, don't add a second ELF_VER_CHR.
9286 * elflink.h (elf_bfd_final_link): Call output_extsym for global
9287 symbols converted to local symbols even when stripping all
9289 (elf_link_output_extsym): Process global symbols converted to
9290 local symbols even if they are being stripped.
9292 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
9294 * archures.c (bfd_octets_per_byte): Return unsigned int.
9295 (bfd_arch_mach_octets_per_byte): Ditto.
9296 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
9298 * section.c (bfd_get_section_size_before_reloc): Quell signed
9299 vs. unsigned comparison warning.
9300 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
9301 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
9302 change. What was I thinking?
9303 * bfd-in2.h: Regenerate.
9305 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
9306 (elf_gc_sections): Same here.
9307 (elf_gc_common_finalize_got_offsets): And here.
9309 2000-02-21 Ian Lance Taylor <ian@zembu.com>
9311 ELF HPPA doesn't work at present; remove it until it does.
9312 * config.bfd: Comment out setting targ_defvec to
9314 * Makefile.am: Rebuild dependencies.
9315 (BFD32_BACKENDS): Remove elf32-hppa.lo.
9316 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
9317 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
9318 * Makefile.in: Rebuild.
9319 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
9321 2000-02-18 Geoff Keating <geoffk@cygnus.com>
9323 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
9324 is no bfd_free(). Revert bfd_free part of previous change.
9326 2000-02-18 Geoff Keating <geoffk@cygnus.com>
9328 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
9330 (coff_compute_section_file_positions): Use bfd_free to pair
9332 (coff_write_object_contents): Likewise.
9334 * coff-rs6000.c (xcoff_howto_table_16): New variable.
9335 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
9337 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
9339 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
9340 (xcoff_ar_file_hdr_big): New structure.
9341 (SIZEOF_AR_FILE_HDR_BIG): New macro.
9342 (xcoff_ar_hdr_big): New structure.
9343 (SIZEOF_AR_HDR_BIG): New macro.
9344 (xcoff_big_format_p): New macro.
9345 (xcoff_ardata_big): New macro.
9346 (arch_xhdr_big): New macro.
9347 (xcoff_slurp_armap): Handle large archives.
9348 (xcoff_archive_p): Detect large archives.
9349 (xcoff_read_ar_hdr): Handle large archives.
9350 (xcoff_openr_next_archived_file): Handle large archives.
9351 (xcoff_generic_stat_arch_elt): Handle large archives.
9352 (xcoff_write_armap_old): Rename from xcoff_write_armap.
9353 (xcoff_write_armap_big): New function.
9354 (xcoff_write_armap): New function, dispatch to _old or _big.
9355 (xcoff_write_archive_contents_old): Rename from
9356 xcoff_write_archive_contents.
9357 (xcoff_write_archive_contents_big): New function.
9358 (xcoff_write_archive_contents): New function, dispatch to _old or
9361 2000-02-18 Richard Henderson <rth@cygnus.com>
9363 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
9364 and hide_symbol members.
9365 (elf_link_hash_copy_indirect): Remove.
9366 (elf_link_hash_hide_symbol): Remove.
9367 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
9368 and elf_backend_hide_symbol.
9369 (_bfd_elf_link_hash_copy_indirect): Declare.
9370 (_bfd_elf_link_hash_hide_symbol): Declare.
9371 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
9372 (_bfd_elf_link_hash_hide_symbol): Likewise.
9373 (_bfd_elf_link_hash_table_init): Don't init killed members.
9374 * elflink.h (elf_link_add_object_symbols): Use the bed function
9375 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
9376 (elf_link_assign_sym_version): Likewise.
9377 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
9378 (elf_backend_hide_symbol): Likewise.
9379 (elfNN_bed): Update for new members.
9381 2000-02-17 Kevin Buettner <kevinb@redhat.com>
9383 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
9384 STACK_END_ADDR): Define for new core file format.
9385 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
9386 for handling the vagaries of the various core file structures used
9387 by AIX over the years.
9388 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
9389 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
9390 core_dumpx structure.
9392 2000-02-17 J"orn Rennecke <amylaar@cygnus.co.uk>
9394 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
9395 (bfd_mach_sh3_dsp): Likewise.
9396 (bfd_mach_sh4): Reinstate.
9397 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
9398 * bfd-in2.h: Regenerate.
9399 * coff-sh.c (struct sh_opcode): flags is no longer short.
9400 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
9401 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
9402 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
9403 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
9404 (sh_opcodes): No longer const.
9405 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
9406 (sh_insn_uses_reg): Check for USESAS and USESR8.
9407 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
9408 (_bfd_sh_align_load_span): Return early for SH4.
9409 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
9410 Take into account that field b of a parallel processing insn
9411 could be mistaken for a separate insn.
9412 * cpu-sh.c (arch_info_struct): New array elements for
9413 sh2, sh-dsp and sh3-dsp.
9414 Reinstate element for sh4.
9415 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
9416 (SH4_NEXT): Reinstate.
9417 (SH3_NEXT, SH3E_NEXT): Adjust.
9418 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
9419 * elf32-sh.c (sh_elf_set_private_flags): New function.
9420 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
9421 (sh_elf_merge_private_data): New function.
9422 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
9423 (bfd_elf32_bfd_copy_private_bfd_data): Define.
9424 (bfd_elf32_bfd_merge_private_bfd_data): Change to
9425 sh_elf_merge_private_data.
9427 2000-02-13 Richard Henderson <rth@cygnus.com>
9429 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
9430 hide_symbol members.
9431 (elf_link_hash_copy_indirect): New.
9432 (elf_link_hash_hide_symbol): New.
9433 * elflink.h (elf_link_add_object_symbols): Break out copy from
9434 indirect new new symbol to elf.c.
9435 (elf_link_assign_sym_version): Break out privatization of
9436 non-exported symbol to elf.c.
9437 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
9438 (_bfd_elf_link_hash_hide_symbol): New.
9439 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
9441 2000-02-13 Ian Lance Taylor <ian@zembu.com>
9443 * section.c (_bfd_strip_section_from_output): Add info parameter.
9444 If it passed as non-NULL, use it to check whether any input BFD
9445 has an input section which uses this output section. Change all
9447 * bfd-in2.h: Rebuild.
9449 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
9450 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
9452 * bfd-in2.h: Rebuild.
9454 2000-02-10 Timothy Wall <twall@cygnus.com>
9456 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
9457 allow final modifications of swapped-in symbol.
9458 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
9459 * coffcode.h (coff_write_relocs): Use macro
9460 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
9461 symbol index should be set to -1.
9463 2000-02-10 Toshiyasu Morita (toshi.morita@sega.com)
9465 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
9466 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
9467 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
9468 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
9469 sh_insns_uses_or_sets_freg): New functions.
9470 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
9471 * (sh_insns_conflict): Use new functions and new macros to
9472 detect conflicts when two instructions both set same integer registers,
9473 both set same fp register, and both set special register.
9475 2000-02-09 Timothy Wall <twall@cygnus.com>
9477 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
9478 swapping in sections, so that the swapping routines have access to
9481 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
9483 * coff-go32.c: Update comment. Update copyright.
9485 2000-01-27 Thomas de Lellis <tdel@windriver.com>
9487 * syms.c (bfd_decode_symclass)
9488 Two new class characters were added - 'V' and 'v'. The
9489 meaning of 'W' is now restricted to just weak non-object
9490 symbols. This allows differentiation between, for example,
9491 weak functions vs weak objects. nm for example now dumps:
9493 'w' = weak unresolved
9494 'V' = weak global object
9495 'v' = weak unresolved object
9497 (bfd_is_undefined_symclass): New function. Return true if the
9498 given symbol class represents and undefined/unresolved symbol.
9500 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
9503 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
9505 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
9506 STT_ARM_16BIT flag set, but it is not attached to a data object
9507 return STT_ARM_16BIT so that it will be treated as code by the
9510 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
9512 * coff-i386.c (i3coff_object_p): Remove prototype.
9515 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
9516 to name. Update copyright.
9518 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
9519 assignment to avoid warning. Update copyright.
9521 2000-01-24 Robert Lipe (robertl@sco.com)
9523 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
9524 instead of using GNU C extension.
9526 2000-01-21 Nick Clifton <nickc@cygnus.com>
9528 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
9529 amount from a bfd_in_memory structure.
9530 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
9533 2000-01-14 Nick Clifton <nickc@cygnus.com>
9535 * linker.c (default_indirect_link_order): oops - fix incorrectly
9536 applied patch from Tim Wall.
9538 2000-01-13 Timothy Wall (twall@tiac.net>
9540 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
9541 = scnhsz, filhsz, relsz, aoutsz, etc)
9543 * coffswap.h: Ditto.
9545 2000-01-13 Nick Clifton <nickc@cygnus.com>
9547 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
9548 interwork thumb to arm stub.
9550 2000-01-13 Timothy Wall (twall@tiac.net>
9552 * archures.c (bfd_octets_per_byte): New function: Return
9554 (bfd_arch_mach_octets_per_byte): New function: Return target
9557 * section.c: Distinguish between octets and bytes for usage of
9558 _cooked_size, _raw_size, and output_offset. Clarify
9559 description of bfd_set_section_contents.
9561 * bfd-in2.h: Regenerate.
9563 * coffgen.c: Indicate that the offset parameter is in bytes, not
9566 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
9567 where appropriate to get the octet offset when calling
9568 bfd_set_section_contents.
9569 (bfd_coff_reloc_link_order): Ditto.
9571 * linker.c (bfd_generic_reloc_link_order): Ditto.
9572 (_bfd_default_link_order): Ditto.
9574 * reloc.c (bfd_perform_relocation): Distinguish between octets
9575 and bytes. Use octets when indexing into octet data; use bytes
9576 when calculating target addresses.
9577 (bfd_install_relocation): Ditto.
9579 * srec.c (srec_write_section): Ditto.
9581 2000-01-13 Nick Clifton <nickc@cygnus.com>
9583 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9584 3 to 2. This allows 4 byte sized sections, which is necessary for
9585 dlltool to build functioning DLLs.
9587 2000-01-10 Philip Blundell <pb@futuretv.com>
9589 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9590 (arm*-*-conix*): New target.
9592 2000-01-10 Egor Duda <deo@logos-m.ru>
9594 * config.bfd: Include elf32_i386 vector to target list for cygwin
9597 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9598 * configure.in: Test for structure win32_pstatus_t in
9600 * configure: Regenerate.
9602 * elf.c (elfcore_grok_win32pstatus): New function: process
9603 win32_pstatus_t notes in elf core file.
9604 (elfcore_grok_note): Detect win32_pstatus notes.
9606 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
9608 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9610 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9611 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9613 For older changes see ChangeLog-9899
9619 version-control: never