1 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
5 (som_write_space_strings): Change type of tmp_space and p to char *.
6 (som_write_symbol_strings): Likewise. Also change type of comp to
8 (som_begin_writing): Change type of strings_size to unsigned int.
9 (som_finish_writing): Likewise.
10 (som_slurp_reloc_table): Change type of external_relocs to unsigned
12 * som.h (struct som_section_data_struct): Change type of reloc_stream
13 field to unsigned char *.
15 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
17 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
18 copy relocations for VxWorks.
20 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
22 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
24 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
25 (ppc_elf_check_relocs): Set has_sda_refs.
26 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
27 copy relocations. Use has_sda_refs to place variables in .sbss.
28 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
31 2005-05-20 Bob Wilson <bob.wilson@acm.org>
33 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
34 xtensa_default_isa is initialized.
36 2005-05-20 Alan Modra <amodra@bigpond.net.au>
38 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
39 for second and subsequent list entries. Only allocate multiple
40 glink stubs when shared or pie.
41 (ppc_elf_finish_dynamic_symbol): Break out early when only one
44 2005-05-19 Zack Weinberg <zack@codesourcery.com>
46 * Makefile.am: Have 'all' depend on 'info'.
47 * Makefile.in: Regenerate.
49 2005-05-19 Alan Modra <amodra@bigpond.net.au>
51 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
52 init_offset. Add init_got_refcount, init_plt_refcount,
53 init_got_offset and init_plt_offset.
54 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
55 (_bfd_elf_link_hash_hide_symbol): Likewise.
56 (_bfd_elf_link_hash_table_init): Likewise.
57 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
58 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
59 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
60 (bfd_elf_size_dynamic_sections): Likewise.
61 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
62 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
63 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
64 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
65 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
66 (struct plt_entry): New.
67 (ppc_elf_link_hash_table_create): Set new init_plt fields.
68 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
69 use _bfd_elf_link_hash_copy_indirect.
70 (update_plt_info, find_plt_ent): New functions.
71 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
72 and adjust for use of plt list rather than refcount.
73 (ppc_elf_gc_sweep_hook): Likewise.
74 (ppc_elf_tls_optimize): Likewise.
75 (ppc_elf_adjust_dynamic_symbol): Likewise.
76 (allocate_dynrelocs): Likewise.
77 (ppc_elf_relax_section): Likewise.
78 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
79 when performing a relocatable link.
80 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
81 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
84 2005-05-19 Alan Modra <amodra@bigpond.net.au>
86 * elf.c (assign_file_positions_for_segments): Use maximum of
87 maxpagesize and section alignment when adjusting initial
88 segment offset and section offsets.
90 2005-05-18 Zack Weinberg <zack@codesourcery.com>
92 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
95 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
97 * elf.c (group_signature): Undo the last change. Check if the
98 symbol table section is correct.
100 2005-05-17 Zack Weinberg <zack@codesourcery.com>
102 * elf32-arm.c: Wherever possible, use official reloc names
104 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
105 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
106 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
107 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
108 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
109 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
110 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
111 Add many new relocations from AAELF.
112 (elf32_arm_howto_from_type): Update to match.
113 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
114 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
115 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
116 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
117 (elf32_arm_final_link_relocate): Add support for
118 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
119 case entries redundant with default.
121 * reloc.c: Reorganize ARM relocations. Add Thumb
122 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
123 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
124 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
125 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
126 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
127 * bfd-in2.h, libbfd.h: Regenerate.
129 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
131 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
133 * format.c (bfd_check_format_matches): Set output_has_begun
135 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
136 special case for both_direction.
138 2005-05-17 Nick Clifton <nickc@redhat.com>
140 * elf.c (group_signature): Check for a group section which is
141 actually a (corrupt) symbol table section in disguise and prevent
142 an infinite loop from occurring.
144 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
146 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
149 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
151 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
152 predicate on slot 0 only if slot 0 isn't br.
154 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
157 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
158 empty sdynbss section.
159 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
161 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
163 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
166 2005-05-17 Alan Modra <amodra@bigpond.net.au>
168 * elf32-ppc.c (LIS_11. LIS_12): Define.
169 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
170 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
171 for --data-plt when building non-pie executables.
173 2005-05-17 Nick Clifton <nickc@redhat.com>
175 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
176 the situation where a symbols's section is not known but a section
177 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
180 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
181 the presence of a symbol table to just before the symbol table is
184 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
187 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
188 (elfNN_ia64_relax_section): Use it.
190 2005-05-14 Mark Kettenis <kettenis@gnu.org>
192 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
195 2005-05-14 Alan Modra <amodra@bigpond.net.au>
197 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
199 (ppc_elf_finish_dynamic_sections): Likewise.
201 2005-05-13 Fred Fish <fnf@specifixinc.com>
203 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
206 2005-05-13 Bob Wilson <bob.wilson@acm.org>
208 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
209 periods in linkonce_kind values.
211 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
213 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
214 against protected function when building executable.
216 2005-05-12 Alan Modra <amodra@bigpond.net.au>
218 * elf32-ppc.c (LWZU_0_X_11): Delete.
219 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
220 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
221 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
223 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
225 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
226 Generate .glink branch table and updated stubs.
228 2005-05-11 Alan Modra <amodra@bigpond.net.au>
230 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
231 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
232 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
233 (CROR_151515, CROR_313131): Delete.
234 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
235 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
236 LWZU_0_X_11): Define.
237 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
238 and R_PPC_REL16_HA entries.
239 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
240 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
241 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
242 new_plt, and old_plt.
243 (ppc_elf_create_dynamic_sections): Create .glink section.
244 (ppc_elf_check_relocs): Set new_plt and old_plt.
245 (ppc_elf_select_plt_layout): New function.
246 (ppc_elf_tls_setup): Set plt output section elf type and flags.
247 (allocate_got): Handle differences between old and new got layout.
248 (allocate_dynrelocs): Likewise for plt.
249 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
250 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
251 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
252 destination of R_PPC_PLTREL24 relocs.
253 (ppc_elf_relocate_section): Handle new relocs and changed destination
255 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
256 differences in layout.
257 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
258 put a blrl in new got. Write glink contents.
259 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
260 * libbfd.h: Regenerate.
261 * bfd-in2.h: Regenerate.
263 2005-05-11 Andreas Schwab <schwab@suse.de>
265 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
268 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
270 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
271 section if SEC_ALLOC isn't set.
273 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
275 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
276 * acinclude.m4: Don't sinclude accross.m4.
277 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
279 2005-05-09 Alan Modra <amodra@bigpond.net.au>
281 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
282 (ppc64_elf_add_symbol_hook): Set has_dotsym.
283 (ppc64_elf_check_directives): Only process syms when has_dotsym.
284 (func_desc_adjust): Hide fake function descriptors when function
285 code entry is defined.
286 (adjust_opd_syms): Adjust for deleted_section becoming union field.
288 2005-05-09 Alan Modra <amodra@bigpond.net.au>
290 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
292 2005-05-08 Dave Korn <dave.korn@artimi.com>
294 * coff-tic80.c: Undefine _CONST after system headers to prevent
295 clash with tic80-specific definition in include/coff/tic80.h
297 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
300 * elflink.c (elf_link_output_extsym): Use output_bfd if
301 h->root.u.def.section is bfd_abs_section_ptr when reporting
304 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
306 * elf-bfd.h (elf_backend_data): Update special_sections to
307 array of pointer to bfd_elf_special_section.
308 * elf.c (special_sections): Likewise.
309 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
310 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
311 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
312 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
313 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
314 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
315 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
316 * elf32-v850.c (v850_elf_special_sections): Likewise.
317 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
318 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
319 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
320 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
321 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
322 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
323 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
324 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
326 * elf.c (get_special_section): Updated.
328 2005-05-07 Alan Modra <amodra@bigpond.net.au>
330 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
331 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
332 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
334 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
335 * elf32-frv.c (_frv_create_got_section): Likewise.
336 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
337 (elf_backend_got_symbol_offset): Don't define.
338 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
339 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
341 (ppc_elf_create_got): Tidy.
342 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
343 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
344 (ppc_elf_gc_sweep_hook): Likewise.
345 (ppc_elf_relocate_section): Likewise.
346 (ppc_elf_finish_dynamic_symbol): Likewise.
347 (allocate_got): New function.
348 (allocate_dynrelocs): Use allocate_got.
349 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
350 so that local got can refcount it. Set got_header_size.
351 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
353 (ppc_elf_finish_dynamic_sections): Likewise.
354 (elf_backend_got_symbol_offset): Don't define.
355 (elf_backend_got_header_size): Ditto.
357 2005-05-05 Steve Ellcey <sje@cup.hp.com>
359 * configure.in (ACX_HEADER_STRING): New.
360 * configure: Regenerate.
361 * config.in: Regenerate.
362 * sysdep.h (STRING_WITH_STRINGS): Use.
364 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
366 * elf.c (_bfd_elf_close_and_cleanup): Only call
367 _bfd_dwarf2_cleanup_debug_info on bfd_object.
369 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
371 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
372 "__bss_start" instead of "_edata" as fallback.
374 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
376 * bfd-in2.h: Regenerated.
378 2005-05-05 Paul Brook <paul@codesourcery.com>
380 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
381 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
383 * configure: Regenerate.
384 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
385 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
386 (elf32-i386.lo): Depend on elf-vxworks.h.
387 (elf-vxworks.lo): New rule.
388 * Makefile.in: Regenerate.
389 * elf-bfd.h (elf_backend_data): Update type of
390 elf_backend_emit_relocs.
391 (_bfd_elf_link_output_relocs): Update prototype.
392 * elflink.c (_bfd_elf_link_output_relocs): Always use
393 bed->elf_backend_emit_relocs when outputting relocations.
394 * elfxx-target.h (elf_backend_emit_relocs): Default to
395 _bfd_elf_link_output_relocs.
396 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
397 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
398 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
399 (elf_i386_plt0_entry): Remove padding.
400 (elf_i386_pic_plt0_entry): Ditto.
401 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
402 (PLT_NON_JUMP_SLOT_RELOCS): Define.
403 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
404 plt0_pad_byte fields.
405 (elf_i386_link_hash_table_create): Zero them.
406 (elf_i386_create_dynamic_sections): Create static relocation section.
407 (allocate_dynrelocs): Allocate space for static PLT relocations.
408 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
409 symbols. Give PLT symbols function type. Don't strip PLT sections
410 if we have exported symbols from them.
411 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
412 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
414 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
415 Add relocation for GOT location. Fill in PLT static relocations.
416 (elf_i386_vxworks_link_hash_table_create): New function.
417 (elf_i386_vxworks_link_output_symbol_hook): New function.
418 * elf-vxworks.h: New file.
420 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
422 * section.c (bfd_make_section_anyway_with_flags): New.
423 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
424 (bfd_make_section_with_flags): New.
425 (bfd_make_section): Call bfd_make_section_with_flags.
427 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
428 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
429 instead of bfd_make_section/bfd_make_section and don't call
430 bfd_set_section_flags.
431 (mn10300_elf_check_relocs): Likewise.
432 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
433 * elf32-arm.c (create_got_section): Likewise.
434 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
435 (elf32_arm_check_relocs): Likewise.
436 * elf32-cris.c (cris_elf_check_relocs): Likewise.
437 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
438 (_frv_create_got_section): Likewise.
439 (elf32_frvfdpic_create_dynamic_sections): Likewise.
440 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
441 (elf32_hppa_check_relocs): Likewise.
442 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
443 (i370_elf_check_relocs): Likewise.
444 * elf32-i386.c (create_got_section): Likewise.
445 (elf_i386_check_relocs): Likewise.
446 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
447 (create_got_section): Likewise.
448 (m32r_elf_create_dynamic_sections): Likewise.
449 (m32r_elf_check_relocs): Likewise.
450 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
451 * elf32-ppc.c (ppc_elf_create_got): Likewise.
452 (ppc_elf_create_dynamic_sections): Likewise.
453 (ppc_elf_add_symbol_hook): Likewise.
454 (ppc_elf_check_relocs): Likewise.
455 * elf32-s390.c (create_got_section): Likewise.
456 (elf_s390_check_relocs): Likewise.
457 * elf32-sh.c (create_got_section): Likewise.
458 (sh_elf_create_dynamic_sections): Likewise.
459 (sh_elf_check_relocs): Likewise.
460 * elf32-vax.c (elf_vax_check_relocs): Likewise.
461 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
462 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
463 (add_extra_plt_sections): Likewise.
464 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
465 (elf64_alpha_create_got_section): Likewise.
466 (elf64_alpha_create_dynamic_sections): Likewise.
467 (elf64_alpha_check_relocs): Likewise.
468 * elf64-hppa.c (get_reloc_section): Likewise.
472 (get_stub): Likewise.
473 (elf64_hppa_create_dynamic_sectionso): Likewise.
474 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
475 * elf64-ppc.c (create_linkage_sections): Likewise.
476 (ppc64_elf_check_relocs): Likewise.
477 * elf64-s390.c (create_got_section): Likewise.
478 (elf_s390_check_relocs): Likewise.
479 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
480 (sh64_elf64_create_dynamic_sections): Likewise.
481 * elf64-x86-64.c (create_got_section): Likewise.
482 (elf64_x86_64_check_relocs): Likewise.
483 * elflink.c (_bfd_elf_create_got_section): Likewise.
484 (_bfd_elf_link_create_dynamic_sections): Likewise.
485 (elf_link_add_object_symbols): Likewise.
486 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
487 (elfNN_ia64_create_dynamic_sections): Likewise.
488 (get_fptr): Likewise.
489 (get_pltoff): Likewise.
490 (get_reloc_section): Likewise.
491 (elfNN_ia64_object_p): Likewise.
492 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
493 (mips_elf_create_compact_rel_section): Likewise.
494 (mips_elf_create_got_section): Likewise.
495 (_bfd_mips_elf_create_dynamic_sections): Likewise.
496 * elfxx-sparc.c (create_got_section): Likewise.
497 (_bfd_sparc_elf_check_relocs): Likewise.
499 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
500 on linker created sections.
502 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
505 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
506 script on executable.
508 2005-05-05 John Levon <levon@movementarian.org>
510 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
511 allocated memory before returning.
512 (decode_line_info): Likewise.
513 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
514 allocated by functions in this file.
515 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
516 * elf.c (_bfd_elf_close_and_cleanup): Call
517 _bfd_dwarf2_cleanup_debug_info.
519 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
521 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
522 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
523 * configure, config.in, Makefile.in: Regenerate.
524 * sysdep.h (stpcpy): Revert last change.
526 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
528 * sysdep.h (stpcpy): Wrap declaration in parentheses.
530 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
532 * elfxx-ia64.c (ARCH_SIZE): New.
533 (LOG_SECTION_ALIGN): Likewise.
534 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
535 align relocation sections.
536 (get_fptr): Likewise.
537 (get_reloc_section): Likewise.
538 (elfNN_ia64_tprel_base): Likewise.
539 (elfNN_ia64_check_relocs): Support 32bit relocations.
540 (allocate_global_fptr_got): Likewise.
541 (allocate_dynrel_entries): Likewise.
542 (set_got_entry): Likewise.
543 (set_pltoff_entry): Likewise.
544 (elfNN_ia64_relocate_section): Likewise.
546 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
548 * configure.in: Add AC_CHECK_DECLS(stpcpy).
549 * configure: Regenerate.
550 * config.in: Likewise.
552 * sysdep.h (stpcpy): New.
554 2005-05-04 Nick Clifton <nickc@redhat.com>
556 * Update the address and phone number of the FSF organization in
557 the GPL notices in the following files:
558 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
559 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
560 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
561 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
562 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
563 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
564 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
565 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
566 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
567 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
568 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
569 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
570 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
571 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
572 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
573 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
574 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
575 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
576 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
577 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
578 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
579 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
580 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
581 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
582 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
583 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
584 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
585 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
586 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
587 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
588 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
589 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
590 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
591 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
592 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
593 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
594 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
595 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
596 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
597 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
598 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
599 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
600 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
601 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
602 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
603 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
604 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
605 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
606 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
607 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
608 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
609 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
610 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
611 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
612 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
613 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
614 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
615 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
616 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
617 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
618 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
619 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
620 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
621 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
622 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
623 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
624 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
625 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
626 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
627 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
630 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
632 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
633 * bfd-in2.h: Regenerated.
635 * elflink.c (bfd_elf_set_symbol): New.
636 (_bfd_elf_provide_symbol): Call it.
637 (_bfd_elf_provide_section_bound_symbols): New.
639 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
641 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
642 at the end, if a strong definition has already been seen.
644 2005-05-04 Alan Modra <amodra@bigpond.net.au>
646 * section.c (struct bfd_section): Replace link_order_head and
647 link_order_tail with map_head and map_tail union.
648 (STD_SECTION): Update.
649 (_bfd_strip_section_from_output): Delete.
650 * aoutx.h: Update throughout for above changes.
651 * coff-ppc.c: Likewise.
652 * cofflink.c: Likewise.
654 * elf-eh-frame.c: Likewise.
655 * elf-m10300.c: Likewise.
657 * elf32-arm.c: Likewise.
658 * elf32-cris.c: Likewise.
659 * elf32-hppa.c: Likewise.
660 * elf32-i386.c: Likewise.
661 * elf32-m32r.c: Likewise.
662 * elf32-m68hc1x.c: Likewise.
663 * elf32-m68k.c: Likewise.
664 * elf32-ppc.c: Likewise.
665 * elf32-s390.c: Likewise.
666 * elf32-sh.c: Likewise.
667 * elf32-vax.c: Likewise.
668 * elf32-xtensa.c: Likewise.
669 * elf64-alpha.c: Likewise.
670 * elf64-hppa.c: Likewise.
671 * elf64-ppc.c: Likewise.
672 * elf64-s390.c: Likewise.
673 * elf64-sh64.c: Likewise.
674 * elf64-x86-64.c: Likewise.
675 * elflink.c: Likewise.
676 * elfxx-ia64.c: Likewise.
677 * elfxx-mips.c: Likewise.
678 * elfxx-sparc.c: Likewise.
679 * linker.c: Likewise.
682 * xcofflink.c: Likewise.
683 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
684 out from bfd_elf_size_dynamic_sections.
685 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
686 * bfd-in2.h: Regenerate.
688 2005-05-04 Alan Modra <amodra@bigpond.net.au>
690 * section.c (bfd_section_list_remove): Don't clear s->next.
691 (bfd_section_list_append): Always init s->prev.
692 (bfd_section_list_prepend): Define.
693 (bfd_section_list_insert_after): Minor optimization.
694 (bfd_section_removed_from_list): Rewrite.
695 * elf.c (assign_section_numbers): Simplify list traversal now that
696 bfd_section_list_remove doesn't destroy removed section next ptr.
697 * sunos.c (sunos_add_dynamic_symbols): Likewise.
698 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
699 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
700 * bfd-in2.h: Regenerate.
702 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
704 * bfd.c (bfd): Remove section_tail and add section_last.
705 (bfd_preserve): Likewise.
706 (bfd_preserve_save): Likewise.
707 (bfd_preserve_restore): Likewise.
708 * opncls.c (_bfd_new_bfd): Likewise.
710 * coffcode.h (coff_compute_section_file_positions): Updated.
711 (coff_compute_section_file_positions): Likewise.
712 * elf.c (assign_section_numbers): Likewise.
713 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
714 * elf64-mmix.c (mmix_elf_final_link): Likewise.
715 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
716 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
717 * sunos.c (sunos_add_dynamic_symbols): Likewise.
718 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
720 * ecoff.c (bfd_debug_section): Initialize prev.
722 * section.c (bfd_section): Add prev.
723 (bfd_section_list_remove): Updated.
724 (bfd_section_list_append): New.
725 (bfd_section_list_insert_after): New.
726 (bfd_section_list_insert_before): New.
727 (bfd_section_list_insert): Removed.
728 (bfd_section_removed_from_list): Updated.
729 (STD_SECTION): Initialize prev.
730 (bfd_section_init): Updated.
731 (bfd_section_list_clear): Updated.
733 * bfd-in2.h: Regenerated.
735 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
737 * elf.c (_bfd_elf_new_section_hook): Don't call
738 _bfd_elf_get_sec_type_attr on sections from input files.
740 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
742 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
743 hash table size 16699 instead of bfd_hash_table_init.
745 2005-05-01 Paul Brook <paul@codesourcery.com>
747 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
748 definition has already been seen.
750 2005-05-01 Paul Brook <paul@codesourcery.com>
752 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
753 R_ARM_PLT32 the same as R_ARM_PC24.
754 (arm_add_to_rel): Ditto.
756 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
758 * config.bfd: Add h8300*-*-rtemscoff.
759 Switch h8300*-*-rtems* to elf.
761 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
763 * aclocal.m4, Makefile.in: Regnerated.
765 2005-04-28 Paul Brook <paul@codesourcery.com>
767 Merge changes only applied to Makefile.in.
768 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
769 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
770 (elfxx-sparc.lo): New rule.
771 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
772 (elf64-sparc.lo): Likewise.
774 2005-04-28 Julian Brown <julian@codesourcery.com>
776 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
779 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
781 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
783 * elf.c (bfd_elf_sym_name): Updated.
784 (group_signature): Likewise.
785 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
786 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
787 (ppc64_elf_edit_toc): Likewise.
788 (ppc64_elf_relocate_section): Likewise.
789 * elfcode.h (elf_slurp_symbol_table): Likewise.
790 * elflink.c (elf_link_input_bfd): Likewise.
792 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
793 bfd_elf_sym_name to get local symbol name when reporting errors.
795 2005-04-27 Nick Clifton <nickc@redhat.com>
797 * elflink.c (elf_link_input_bfd): Handle the case where a badly
798 formatted input file results in a reloc which has no associated
801 2005-04-26 Jerome Guitton <guitton@gnat.com>
803 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
805 2005-04-25 David S. Miller <davem@davemloft.net>
807 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
808 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
809 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
812 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
815 * elflink.c (elf_link_input_bfd): Make non-debugging reference
816 to discarded section an error.
818 2005-04-21 Jerome Guitton <guitton@gnat.com>
820 * configure.in: Replace BFD_NEED_DECLARATION checks by the
821 corresponding AC_CHECK_DECLS.
822 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
824 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
825 * configure: Regenerate.
828 2005-04-21 Andreas Schwab <schwab@suse.de>
830 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
831 unsigned from type of dynamic_interpreter.
832 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
835 * elf.c (assign_section_numbers): Fix comment.
837 2005-04-21 Jerome Guitton <guitton@gnat.com>
839 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
840 for struct som_exec_auxhdr fields.
842 2005-04-21 Nick Clifton <nickc@redhat.com>
844 * aout-adobe.c: Convert to ISO C and fix formatting.
845 * aout-arm.c: Convert to ISO C and fix formatting.
846 * aout-cris.c: Convert to ISO C and fix formatting.
847 * aout-ns32k.c: Convert to ISO C and fix formatting.
848 * aout-tic30.c: Convert to ISO C and fix formatting.
849 * coffcode.h: Convert to ISO C and fix formatting.
850 * coffswap.h: Convert to ISO C and fix formatting.
851 * i386aout.c: Convert to ISO C and fix formatting.
852 * libaout.h: Convert to ISO C and fix formatting.
853 * libcoff-in.h: Convert to ISO C and fix formatting.
854 * libcoff.h: Convert to ISO C and fix formatting.
855 * libecoff.h: Convert to ISO C and fix formatting.
856 * libnlm.h: Convert to ISO C and fix formatting.
857 * libpei.h: Convert to ISO C and fix formatting.
858 * libxcoff.h: Convert to ISO C and fix formatting.
859 * nlm-target.h: Convert to ISO C and fix formatting.
860 * nlm.c: Convert to ISO C and fix formatting.
861 * nlm32-alpha.c: Convert to ISO C and fix formatting.
862 * nlm32-i386.c: Convert to ISO C and fix formatting.
863 * nlm32-ppc.c: Convert to ISO C and fix formatting.
864 * nlm32-sparc.c: Convert to ISO C and fix formatting.
865 * nlmcode.h: Convert to ISO C and fix formatting.
866 * nlmswap.h: Convert to ISO C and fix formatting.
867 * pe-mips.c: Convert to ISO C and fix formatting.
868 * peXXigen.c: Convert to ISO C and fix formatting.
869 * peicode.h: Convert to ISO C and fix formatting.
870 * vms-gsd.c: Convert to ISO C and fix formatting.
871 * vms-hdr.c: Convert to ISO C and fix formatting.
872 * vms-misc.c: Convert to ISO C and fix formatting.
873 * vms-tir.c: Convert to ISO C and fix formatting.
874 * vms.c: Convert to ISO C and fix formatting.
875 * vms.h: Convert to ISO C and fix formatting.
877 * coffgen.c (coff_print_symbol): Restore correct formatting of
880 2005-04-20 David S. Miller <davem@davemloft.net>
882 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
883 (_bfd_sparc_elf_link_hash_table_create): Likewise.
884 (allocate_dynrelocs): Likewise.
886 2005-04-20 Jerome Guitton <guitton@gnat.com>
888 * configure.in: Fix the check for basename declaration. Add check
889 for declarations of ftello, ftello64, fseeko, fseeko64.
890 * configure: Regenerate.
892 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
894 2005-04-19 David S. Miller <davem@davemloft.net>
896 * elfxx-sparc.c: New file.
897 * elfxx-sparc.h: New file.
898 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
899 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
900 (elfxx-sparc.lo): New rule.
901 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
902 (elf64-sparc.lo): Likewise.
903 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
904 (bfd_elf64_sparc_vec): Likewise.
905 * configure: Regenerate.
906 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
907 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
908 which is more consistent with elf32-sparc.c
910 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
912 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
913 (mips_elf_create_local_got_entry): Check h->root.forced_local.
915 2005-04-19 Alan Modra <amodra@bigpond.net.au>
917 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
918 dynamic relocs in non-SEC_ALLOC sections.
919 (ppc_elf_gc_sweep_hook): Likewise.
920 (ppc_elf_relax_section): Likewise.
921 (ppc_elf_relocate_section): Likewise.
923 2005-04-18 Nick Clifton <nickc@redhat.com>
925 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
926 assigning a value to return_value.
928 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
931 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
934 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
937 * elf.c (setup_group): Properly handle zero group count.
939 2005-04-17 Mark Kettenis <kettenis@gnu.org>
941 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
942 (som_is_subspace, compare_subspaces, som_compute_checksum)
943 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
945 (hppa_som_reloc, compare_syms, compare_subspaces)
946 (som_print_symbol, som_get_section_contents)
947 (som_set_section_contents): Remove space after 'void *'.
948 (som_bfd_print_private_bfd_data): Use %lx to print longs.
949 (som_bfd_merge_private_bfd_data)
950 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
953 2004-04-15 Julian Brown <julian@codesourcery.com>
955 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
956 * bfd-in2.h: Regenerate.
957 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
958 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
959 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
960 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
961 relocations if requested to.
962 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
963 use_blx rather than symbian_p.
964 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
965 use_blx is in effect.
966 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
969 2005-04-15 Nick Clifton <nickc@redhat.com>
971 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
974 2005-04-15 Alan Modra <amodra@bigpond.net.au>
977 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
978 used as a list pointer.
980 2005-04-14 Alan Modra <amodra@bigpond.net.au>
982 * Makefile.am (NO_WERROR): Define.
983 * warning.m4: New file
984 * acinclude.m4: Include warning.m4.
985 * configure.in: Invoke AM_BINUTILS_WARNINGS.
986 * Makefile.in: Regenerate.
987 * configure: Regenerate.
989 2005-04-14 Alan Modra <amodra@bigpond.net.au>
991 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
992 Write trailing padding.
994 * merge.c (merge_strings): Round up section size for alignment.
996 2005-04-14 David S. Miller <davem@davemloft.net>
998 Add TLS support for 64-bit Sparc ELF.
999 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1000 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1001 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1002 sparc64_elf_hash_entry, sparc64_elf_tdata,
1003 sparc64_elf_local_got_tls_type): New defines.
1004 (sparc64_elf_mkobject): New function.
1005 (sparc64_elf_link_hash_table): Add members for dynamic linker
1006 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1007 uion to track TLS GOT references. Add sym_sec to cache
1008 mappings from local sym to section.
1009 (link_hash_newfunc): New function.
1010 (sparc64_elf_bfd_link_hash_table_create): Rename to
1011 sparc64_elf_link_hash_table_create for consistency.
1012 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1013 (sparc64_elf_create_dynamic_sections): Initialize new section
1014 members of sparc64_elf_link_hash_table. Only init srelbss
1016 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1018 (SPARC_NOP): Define.
1019 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1020 sparc64_elf_plt_ptr_offset): Delete.
1021 (sparc64_plt_entry_build): New function to build PLT entries
1022 gradually instread of all at once at the end of linking.
1023 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1024 local vars. Get them from sparc64_elf_hash_table instead.
1025 Check early on if r_symndx is in bounds. Handle TLS transitions.
1026 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1027 For TLS relocs, record the tls_type in either
1028 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1029 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1030 to the __tls_get_addr symbol. For PLT relocs, track references
1031 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1032 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1033 symbol references, count the number of relocations needed for
1034 that symbol. For default switch case, don't error, this lets
1035 the TLS relocs not explicitly handled by this function get
1037 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1038 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1039 it from sparc64_elf_hash_table. Store the real PLT offset
1040 in h->plt.offset, and build PLT entries one at a time. Also
1041 get .dynbss section pointer from htab.
1042 (allocate_dynrelocs, readonly_dynrelocs,
1043 sparc64_omit_section_dynsym): New functions.
1044 (sparc64_elf_omit_section_dynsym): Use these new functions as
1046 (dtpoff_base, tpoff): New functions.
1047 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1048 locals, get them from sparc64_elf_hash_table. Handle TLS
1049 relocations and refcounting in main relocation loop.
1050 (sparc64_elf_finish_dynamic_symbol): Use
1051 sparc64_elf_link_hash_table. Build PLT entries as we see
1052 them. Handle TLS GOT relocations.
1053 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1054 from sparc64_elf_hash_table. Initialize only PLT header
1055 not all entries since we not build PLT entries one by one.
1056 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1057 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1058 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1060 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1062 * elflink.c (elf_link_input_bfd): Update check for removed
1065 2005-04-12 Alan Modra <amodra@bigpond.net.au>
1067 * Makefile.am: Run "make dep-am".
1068 * Makefile.in: Regenerate.
1069 * aclocal.m4: Regenerate.
1070 * libcoff.h: Regenerate.
1072 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1074 * linker.c (_bfd_generic_link_output_symbols): Also check if
1075 the output section of an input section has been removed from
1078 * section.c (bfd_section_list_remove): Clear the next field
1079 of the removed section.
1080 (bfd_section_removed_from_list): New.
1081 * bfd-in2.h: Regenerated.
1083 2005-04-11 David S. Miller <davem@davemloft.net>
1085 * elf32-sparc.c (elf32_sparc_relocate_section,
1086 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1087 R_SPARC_TLS_LE_{HIX22,LOX10}.
1088 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1089 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1090 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1091 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1093 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1095 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1097 2005-04-11 Nick Clifton <nickc@redhat.com>
1099 * aout-target.h: Convert to ISO C.
1100 * aoutf1.h: Convert to ISO C.
1101 * aoutx.h: Convert to ISO C.
1102 * bout.c: Convert to ISO C.
1103 * dwarf1.c: Convert to ISO C.
1104 * ecoffswap.h: Convert to ISO C.
1105 * freebsd.h: Convert to ISO C.
1106 * genlink.h: Convert to ISO C.
1107 * ieee.c: Convert to ISO C.
1108 * ihex.c: Convert to ISO C.
1109 * libcoff-in.h: Convert to ISO C.
1110 * mach-o.c: Convert to ISO C.
1111 * mach-o.h: Convert to ISO C.
1112 * netbsd.h: Convert to ISO C.
1113 * ns32k.h: Convert to ISO C.
1114 * ns32knetbsd.c: Convert to ISO C.
1115 * oasys.c: Convert to ISO C.
1116 * pdp11.c: Convert to ISO C.
1117 * pef-traceback.h: Convert to ISO C.
1118 * pef.c: Convert to ISO C.
1119 * pef.h: Convert to ISO C.
1120 * riscix.c: Convert to ISO C.
1121 * som.c: Convert to ISO C.
1122 * som.h: Convert to ISO C.
1123 * srec.c: Convert to ISO C.
1124 * stabs.c: Convert to ISO C.
1125 * sunos.c: Convert to ISO C.
1126 * tekhex.c: Convert to ISO C.
1127 * versados.c: Convert to ISO C.
1128 * version.h: Convert to ISO C.
1129 * xcoff-target.h: Convert to ISO C.
1130 * xcofflink.c: Convert to ISO C.
1131 * xsym.c: Convert to ISO C.
1132 * xsym.h: Convert to ISO C.
1134 2005-04-08 Paul Brook <paul@codesourcery.com>
1136 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1137 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1138 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1139 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1140 (elf32_arm_to_thumb_stub): Create PIC stubs.
1141 (record_arm_to_thumb_glue): Use different stub size for relocatable
1144 2005-04-05 Alan Modra <amodra@bigpond.net.au>
1146 * elf64-ppc.c (dec_dynrel_count): New function split out from
1147 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1148 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1149 (ppc64_elf_tls_optimize): Likewise.
1151 2005-04-05 Mark Kettenis <kettenis@gnu.org>
1153 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1154 CORE_WCOOKIE_OFFSET.
1155 (SPARC64_WCOOKIE_OFFSET): New.
1156 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1158 2005-04-05 Nick Clifton <nickc@redhat.com>
1160 * po/rw.po: New translation: Kinyarwanda
1161 * configure.in (ALL_LINGUAS): Add rw
1162 * configure: Regenerate.
1164 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1166 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1167 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1168 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1170 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1171 to check for SHT_MIPS_OPTIONS sections.
1172 (_bfd_mips_elf_set_section_contents): Likewise.
1174 2005-04-04 Eric Christopher <echristo@redhat.com>
1176 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1177 Clean up gp handling code.
1179 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1181 * elf.c (bfd_elf_set_group_contents): Ignore linker created
1183 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1184 sections for relocatable files only. Remove the linker created
1186 (_bfd_elf_compute_section_file_positions): Pass link_info to
1187 assign_section_numbers.
1189 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1190 (elf_backend_object_p): Defined.
1192 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1194 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1196 2005-04-03 Fred Fish <fnf@specifixinc.com>
1198 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1199 dwarf_ranges_size members.
1200 (struct comp_unit): Add base_address member.
1201 (struct funcinfo): Replace low/high members with an arange.
1202 (arange_add): Replace incoming "unit" parameter with "abfd" and
1203 "first_arange" pointers. Reorganize/rewrite function body.
1204 (decode_line_info): Change arange_add call to pass bfd and arange
1206 (lookup_address_in_line_info_table): Use arange list instead of
1207 individual low/high members. Walk function's arange list to find
1208 lowest PC in list, to test for overlapping functions.
1209 (read_debug_ranges): New function, reads the debug_ranges section.
1210 (lookup_address_in_function_table): Use arange list instead of
1211 individual low/high members. Rewrite to find smallest range that
1213 (read_rangelist): Read a given rangelist from debug_ranges.
1214 (scan_unit_for_functions): Use arange list instead of individual
1215 low/high members. Handle a DW_AT_ranges attribute.
1216 (parse_comp_unit): Use arange list instead of individual low/high
1217 members. Save comp unit base address. Handle a DW_AT_ranges
1220 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1222 * elf.c (assign_section_numbers): Really use the kept section.
1224 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1226 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1228 * elf.c (assign_section_numbers): When sh_link points to a
1229 discarded section, call _bfd_elf_check_kept_section to see if
1230 the kept section can be used. Otherwise reject sh_link
1231 pointing to discarded section.
1233 * elflink.c (_bfd_elf_check_kept_section): New.
1234 (elf_link_input_bfd): Use it.
1236 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1238 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1239 that we no longer need.
1241 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1243 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1245 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
1247 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1249 * elf.c (assign_section_numbers): Fix a typo.
1251 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1253 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1255 (_bfd_elf_section_already_linked): Likewise.
1257 2005-03-31 Jerome Guitton <guitton@gnat.com>
1259 * config.in: Regenerate.
1261 2005-03-31 Jerome Guitton <guitton@gnat.com>
1263 * config.in (HAVE_DECL_BASENAME): New configure macro.
1264 * configure.in: Check for basename.
1265 * configure: Regenerate.
1267 2005-03-30 Julian Brown <julian@codesourcery.com>
1269 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1270 bfd_elf32_is_arm_mapping_symbol_name.
1271 * bfd-in2.h: Regenerate.
1272 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1273 bfd_elf32_is_arm_mapping_symbol_name.
1274 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1275 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1276 (arm_elf_find_function): Likewise.
1277 (elf32_arm_output_symbol_hook): Likewise.
1279 2005-03-30 Julian Brown <julian@codesourcery.com>
1281 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1282 * bfd-in2.h: Regenerate.
1283 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1284 bfd_elf32_is_arm_mapping_symbol_name.
1285 (elf32_arm_output_symbol_hook): Likewise.
1286 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1288 (is_arm_mapping_symbol_name): Function moved from here...
1289 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1292 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1294 * configure.in: Check for ffs decl and alphabetize.
1295 * config.in: Regenerate.
1296 * configure: Regenerate.
1297 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
1299 2005-03-29 Fred Fish <fnf@specifixinc.com>
1301 * dwarf2.c (struct comp_unit): Fix typo.
1302 (scan_unit_for_functions): Remove unused local variable "name"
1303 and dead code that set it.
1305 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1306 Phil Blundell <philb@gnu.org>
1308 * bfd-in2.h, libbfd.h: Regenerated.
1309 * reloc.c: Add ARM TLS relocations.
1310 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1312 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1313 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1314 (elf32_arm_tls_ie32_howto): New.
1315 (elf32_arm_howto_from_type): Support TLS relocations.
1316 (elf32_arm_reloc_map): Likewise.
1317 (elf32_arm_reloc_type_lookup): Likewise.
1319 (struct elf32_arm_obj_tdata): New.
1320 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1321 (elf32_arm_mkobject): New function.
1322 (struct elf32_arm_relocs_copied): Add pc_count.
1323 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1324 (GOT_TLS_IE): Define.
1325 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1326 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1327 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1328 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1329 (dtpoff_base, tpoff): New functions.
1330 (elf32_arm_final_link_relocate): Handle TLS relocations.
1331 (IS_ARM_TLS_RELOC): Define.
1332 (elf32_arm_relocate_section): Warn about TLS mismatches.
1333 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1334 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1335 TLS relocations and pc_count.
1336 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1337 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1339 (elf32_arm_size_dynamic_sections): Handle TLS.
1340 (elf32_arm_finish_dynamic_symbol): Likewise.
1341 (bfd_elf32_mkobject): Define.
1343 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1345 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1346 relocation types. Don't count relocations which will use a PLT.
1348 2005-03-29 Joel Brobecker <brobecker@gnat.com>
1350 * elf.c (elfcore_grok_nto_status): Print tid as long.
1351 (elfcore_grok_nto_regs): Likewise.
1353 2005-03-29 Joel Brobecker <brobecker@gnat.com>
1355 * irix-core.c: Remove some unnecessary prototypes.
1357 2005-03-28 Joel Brobecker <brobecker@adacore.com>
1359 * irix-core.c: Convert to ISO C.
1361 2005-03-28 Joel Brobecker <brobecker@adacore.com>
1363 * irix-core.c (do_sections): Replace + by | in expression.
1364 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1365 to unused parameters to avoid a compiler warning.
1367 2005-03-28 Mark Kettenis <kettenis@gnu.org>
1369 * netbsd-core.c: Convert to ISO C. Fix formatting.
1371 2005-03-24 Eric Christopher <echristo@redhat.com>
1373 * elfxx-mips.c: Revert previous patch.
1375 2005-03-24 Nick Clifton <nickc@redhat.com>
1377 * targets.c (_bfd_target_vector): Only include the
1378 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1379 all targets enabled.
1381 2005-03-24 James E Wilson <wilson@specifixinc.com>
1383 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1384 (BFD64_BACKENDS): Add elf32-ia64.lo.
1385 * Makefile.in: Regenerate.
1387 2005-03-23 Eric Christopher <echristo@redhat.com>
1389 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1390 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1391 after emitting relocation.
1392 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1393 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1396 2005-03-23 Mike Frysinger <vapier@gentoo.org>
1397 Nick Clifton <nickc@redhat.com>
1399 * config.bfd: Accept any C library to accompany a GNU Linux
1400 implementation, not just the GNU C library.
1401 * configure.in: Likewise.
1402 * configure: Regenerate.
1404 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1406 * bfd-in.h (_bfd_elf_provide_symbol): New.
1407 * bfd-in2.h: Regenerated.
1409 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1410 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1413 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1416 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
1418 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1420 2005-03-22 Bob Wilson <bob.wilson@acm.org>
1422 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1423 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1424 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1425 (xtensa_opcode_decode): Rearrange code.
1427 2005-03-22 Nick Clifton <nickc@redhat.com>
1429 * binary.c: Convert to ISO C90 formatting.
1430 * coff-arm.c: Convert to ISO C90 formatting.
1431 * coffgen.c: Convert to ISO C90 formatting.
1432 * elf32-gen.c: Convert to ISO C90 formatting.
1433 * elf64-gen.c: Convert to ISO C90 formatting.
1434 * hash.c: Convert to ISO C90 formatting.
1435 * ieee.c: Convert to ISO C90 formatting.
1437 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1439 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1440 unresolved symbols in R_ARM_NONE relocations.
1442 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1444 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1445 UNRESOLVED_RELOC_P argument. Set it appropriately.
1446 (elf32_arm_relocate_section): Update call to
1447 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1448 unresolved_reloc instead.
1450 2005-03-23 Alan Modra <amodra@bigpond.net.au>
1452 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1453 .gnu.warning.* sections.
1455 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1457 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1459 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1460 (elf_create_pointer_linker_section): Delete info parm. Don't make
1461 h dynamic. Don't set written_address_p.
1462 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1463 (bfd_put_ptr): Delete.
1464 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1465 Always write section contents. Assert global sym is def_regular.
1466 Use offset bottom bit as a written flag.
1467 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1470 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1472 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1473 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1476 2005-03-21 Nick Clifton <nickc@redhat.com>
1478 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1480 (t2a1_bx_pc_insn): Likewise.
1481 (t2a2_noop_insn): Likewise.
1482 (t2a3_b_insn): Likewise.
1483 (t2a1_push_insn): Likewise.
1484 (t2a2_ldr_insn): Likewise.
1485 (t2a3_mov_insn): Likewise.
1486 (t2a4_bx_insn): Likewise.
1487 (t2a5_pop_insn): Likewise.
1488 (t2a6_bx_insn): Likewise.
1489 (coff_arm_relocate_section): Only declare the high_address
1490 variable for non WINCE targets.
1492 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1494 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1495 SEC_LINKER_CREATED. Attach to dynobj.
1496 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1498 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1500 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1501 sym_offset. Add name, bss_name, sym_name, sym_val.
1502 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1503 Add sdata array of elf_linker_section_t.
1504 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1505 (enum elf_linker_section_enum): Delete.
1506 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1507 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1508 the special sections are needed. Adjust htab->sdata refs.
1509 Ensure dynobj is set in sreloc code.
1510 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1511 (ppc_elf_set_sdata_syms): New function.
1512 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1513 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1514 sym_val instead of sym_hash.
1515 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1517 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1519 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1520 (ppc_elf_merge_private_bfd_data): Likewise.
1522 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1524 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1525 (ppc_elf_create_linker_section): Don't create rel_section.
1526 (elf_create_pointer_linker_section): Don't size relocs.
1527 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1528 Don't generate relocs.
1529 (ppc_elf_relocate_section): Adjust calls to
1530 elf_finish_pointer_linker_section.
1532 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1534 * elf32-ppc.c (is_ppc_elf_target): New function.
1535 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1536 for bfd_target_elf_flavour. Do this test before endian check.
1537 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1538 (ppc_elf_size_dynamic_sections): Likewise.
1540 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1542 * elf-bfd.h (elf_backend_data): Add int to
1543 elf_backend_section_from_shdr.
1544 (bfd_elf_section_data): Update comment for this_idx.
1545 (_bfd_elf_make_section_from_shdr): Add int.
1546 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1548 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1549 and use it to set this_idx in bfd_elf_section_data.
1550 (bfd_section_from_shdr): Pass shindex to
1551 _bfd_elf_make_section_from_shdr.
1552 (_bfd_elf_section_from_bfd_section): Use this_idx in
1553 bfd_elf_section_data to find section index.
1555 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1556 index and pass it to _bfd_elf_make_section_from_shdr.
1557 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1558 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1559 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1560 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1561 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1562 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1563 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1564 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1565 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1567 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1568 Ross Ridge <rridge@csclub.uwaterloo.ca>
1570 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1571 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1574 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1576 * elflink.c (elf_mark_used_section): Remove check for special
1579 2005-03-18 Andreas Schwab <schwab@suse.de>
1581 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1582 from bfd_vma to ia64_insn, remove broken cast.
1584 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1586 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
1587 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1588 elf_m68k_finish_dynamic_sections): Use it.
1590 2005-03-17 Paul Brook <paul@codesourcery.com>
1591 Dan Jacobowitz <dan@codesourcery.com>
1592 Mark Mitchell <mark@codesourcery.com>
1594 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1595 (elf32_arm_additional_program_headers): Likewise.
1596 (elf_backend_modify_segment_map): Define.
1597 (elf_backend_additional_program_headers): Likewise.
1598 (elf32_arm_symbian_modify_segment_map): Use
1599 elf32_arm_modify_segment_map.
1601 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1603 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1604 for special sections.
1606 2005-03-18 Alan Modra <amodra@bigpond.net.au>
1608 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1609 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1610 section_sym_count param, and return number of section symbols.
1611 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1612 .dynsym contents. Don't bother calling swap_symbol_out on the
1613 first all-zero dynsym.
1614 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1615 special sections like bfd_abs_section.
1616 (bfd_elf_gc_sections): Spelling fix.
1618 2005-03-16 Fred Fish <fnf@specifixinc.com>
1621 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1622 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1624 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1626 * elflink.c (elf_mark_used_section): New.
1627 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1628 non-relocatable link if we don't do GC.
1630 2005-03-16 Nick Clifton <nickc@redhat.com>
1631 Ben Elliston <bje@au.ibm.com>
1633 * configure.in (werror): New switch: Add -Werror to the
1634 compiler command line. Enabled by default. Disable via
1636 * configure: Regenerate.
1638 2005-03-16 Nick Clifton <nickc@redhat.com>
1640 * ecoff.c: Convert to ISO C90 formatting.
1642 2005-03-16 Alan Modra <amodra@bigpond.net.au>
1644 * elf32-ppc.c: Divide file into general and linker specific
1645 functions. Sort linker functions into roughly the order in which
1646 they are called by the ELF linker code.
1648 2005-03-16 Alan Modra <amodra@bigpond.net.au>
1650 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1651 on section. Correct comment, and add FIXME.
1652 (ppc_elf_additional_program_headers): Don't bump header count for
1653 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1654 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1655 do allocate memory if they need it.
1657 2005-03-15 Mikkel Krautz <krautz@gmail.com>
1659 * config.bfd (x86_64-elf): Add target.
1661 2005-03-15 Alan Modra <amodra@bigpond.net.au>
1663 * po/es.po: Commit new Spanish translation.
1665 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1667 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1668 for global symbol when reporting overflow.
1670 2005-03-11 Jakub Jelinek <jakub@redhat.com>
1672 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1673 * libbfd.h: Rebuilt.
1674 * archive.c (_bfd_ar_spacepad): New function.
1675 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1676 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1677 coff_write_armap): Use it.
1678 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1680 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1682 2005-03-10 Mark Kettenis <kettenis@gnu.org>
1684 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1685 has_table to the start of the function.
1687 2005-03-10 Ben Elliston <bje@au.ibm.com>
1689 * archive.c: Include hashtab.h.
1690 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1691 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1692 (hash_file_ptr): New function.
1693 (eq_file_ptr): Likewise.
1694 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1695 * libbfd-in.h: Include hashtab.h.
1696 (struct artdata): Change `cache' member type to htab_t.
1697 * libbfd.h: Rebuild.
1699 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1701 * configure.in: Bump version to 2.16.90.
1702 * configure: Regenerated.
1704 2005-03-07 Jakub Jelinek <jakub@redhat.com>
1706 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1707 close is a function like macro in system headers.
1709 2005-03-07 Alan Modra <amodra@bigpond.net.au>
1712 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1713 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1715 2005-03-06 Alan Modra <amodra@bigpond.net.au>
1717 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1719 2005-03-05 Alan Modra <amodra@bigpond.net.au>
1721 * po/bfd.pot: Regenerate.
1723 2005-03-05 Alan Modra <amodra@bigpond.net.au>
1725 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1727 (func_desc_adjust): Force dot-syms local in executables as well
1730 2005-03-04 David Daney <ddaney@avtrex.com>
1732 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1733 '__gnu_local_gp' symbol used by gas -mno-shared.
1735 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
1737 * elf-bfd.h (elf_backend_data): Add "const char *" to
1738 elf_backend_section_from_phdr.
1740 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1741 elf_backend_section_from_phdr hook.
1743 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1744 Joseph Myers <joseph@codesourcery.com>
1746 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1747 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1749 (struct mips_elf_got_per_bfd_arg): Add global_count.
1750 (struct mips_elf_count_tls_arg): New.
1751 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1752 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1753 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1754 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1755 (TLS_RELOC_P): Define.
1756 (TP_OFFSET, DTP_OFFSET): Define.
1757 (dtprel_base, tprel_base): New functions.
1758 (mips_elf_link_hash_newfunc): Initialize tls_type.
1759 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1760 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1762 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1763 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1764 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1765 (mips_tls_got_index): New functions.
1766 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1767 arguments. Pass them to mips_elf_create_local_got_entry. Use
1769 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1771 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1772 mips_elf_create_local_got_entry.
1773 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1774 arguments. Handle TLS entries.
1775 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1776 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1778 (mips_elf_record_global_got_symbol): Likewise.
1779 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1781 (mips_elf_merge_gots): Handle TLS entries when merging.
1782 (mips_elf_initialize_tls_index): New function.
1783 (mips_elf_set_global_got_offset): Handle TLS entries.
1784 (mips_elf_adjust_gp): Handle TLS.
1785 (mips_elf_multi_got): Remove redundant call to
1786 mips_elf_resolve_final_got_entries. Initialize global_count.
1787 Correct a comment. Initialize new TLS members of mips_got_info.
1788 Assign TLS GOT indexes for new GOTs.
1789 (mips_elf_create_got_section): Initialize new TLS members of
1791 (mips_elf_calculate_relocation): Handle TLS relocs.
1792 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1794 (_bfd_mips_elf_always_size_sections): Handle TLS.
1795 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1796 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1798 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1799 (_bfd_mips_elf_hide_symbol): Handle TLS.
1800 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1801 (mips_reloc_map): Add TLS relocs.
1802 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1803 * elf64-mips.c (mips_elf64_howto_table_rel)
1804 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1805 * reloc.c: Define new MIPS TLS relocations.
1806 * libbfd.h, bfd-in2.h: Regenerated.
1808 2005-03-02 Jan Beulich <jbeulich@novell.com>
1810 * Makefile.am: Add dependency of cache.o on libiberty.h.
1811 * cache.c: Include libiberty.h.
1812 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1814 2005-03-01 Zack Weinberg <zack@codesourcery.com>
1816 * elf.c (bfd_section_from_shdr <default case>): Call
1817 elf_backend_section_from_shdr hook unconditionally, and return
1819 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1820 * elfxx-target.h (elf_backend_section_from_shdr)
1821 (elf_backend_section_from_phdr): Default to
1822 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1825 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1827 * targets.h: Typo fix.
1828 * bfd-in2.h: Regenerate.
1830 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1831 structs to size on-disk structures.
1832 (b_out_set_section_contents): Size the external struct, not the
1833 internal one for on-disk size.
1834 (b_out_sizeof_headers): Likewise.
1836 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1838 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1839 entry points with the func descriptor as well as undefweak.
1841 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
1843 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1844 present when IMPORT_NAME_UNDOECRATE is used.
1846 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
1849 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1852 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1853 to _bfd_elf_merge_symbol.
1855 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1856 unsigned int to return the alignment of the old common symbol
1857 in the dynamic object.
1858 (_bfd_elf_add_default_symbol): Pass NULL to
1859 _bfd_elf_merge_symbol.
1860 (elf_link_add_object_symbols): Pass &old_alignment to
1861 _bfd_elf_merge_symbol. Get the alignment of the new common
1862 symbol in the dynamic object.
1864 2005-02-24 Ben Elliston <bje@au.ibm.com>
1866 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1867 * format.c (bfd_check_format_matches): Likewise.
1868 * archive.c (BFD_GNU960_ARMAG): Likewise.
1869 (bfd_generic_archive_p): Likewise.
1870 (_bfd_write_archive_contents): Likewise.
1872 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
1874 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1875 * configure: Regenerate.
1877 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
1879 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1880 COMDAT group sections to have default visibility.
1882 2005-02-24 Alan Modra <amodra@bigpond.net.au>
1884 * coffcode.h (coff_print_aux): Warning fix.
1885 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1886 instead of section pointer to identify.
1887 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
1888 the correct size buffer for local sym mangling too.
1889 (h8300_bfd_link_add_symbols): Likewise.
1890 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
1892 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
1893 * elf32-xtensa.c (literal_value_hash): Warning fix.
1894 * versados.c (process_otr): Warning fix.
1895 (versados_canonicalize_reloc): Likewise.
1896 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
1897 * vms.c (fill_section_ptr): Warning fix.
1899 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
1901 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
1902 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
1904 2005-02-23 Nick Clifton <nickc@redhat.com>
1906 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
1907 the relvaddr field of the Elf32_crinfo structure.
1909 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
1910 variables that are passed by reference to
1911 m68hc11_get_relocation_value in case that function does not
1914 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
1915 return statements and replace with a single return at the end of
1916 the function. This helps pacify the flow analysis code in gcc 4.0.
1918 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
1919 strtab to avoid compile time warning.
1921 2005-02-23 Ben Elliston <bje@au.ibm.com>
1923 * opncls.c (bfd_zalloc): Document this function.
1925 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
1927 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
1928 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
1929 Replace SEC_SHARED with SEC_COFF_SHARED.
1930 (styp_to_sec_flags): Likewise.
1932 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
1933 (TARGET_LITTLE_SYM): Likewise.
1935 * section.c (SEC_ARCH_BIT_0): Removed.
1936 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
1937 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
1938 (SEC_SHARED): Renamed to ...
1939 (SEC_COFF_SHARED): This.
1940 (SEC_BLOCK): Renamed to ...
1941 (SEC_TIC54X_BLOCK): This.
1942 (SEC_CLINK): Renamed to ...
1943 (SEC_TIC54X_CLINK): This.
1944 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
1945 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
1947 * bfd-in2.h: Regenerated.
1949 2005-02-21 Fred Fish <fnf@specifixinc.com>
1951 * dwarf2.c (find_abstract_instance_name): Call recursively
1952 to handle a DW_AT_specification.
1954 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1956 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
1957 mips_elf_create_dynamic_relocation,
1958 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
1959 Remove #if 0'd code.
1961 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1963 * Makefile.am: Run "make dep-am"
1964 * Makefile.in: Regenerate.
1966 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1968 * coffgen.c (bfd_coff_get_comdat_section): Check that
1969 coff_section_data isn't NULL.
1971 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1973 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
1974 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
1975 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
1976 useless assignments.
1977 (xcoff_write_archive_contents_big): Likewise.
1978 (_bfd_xcoff_put_ldsymbol_name): Likewise.
1979 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
1980 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
1981 * cofflink.c (process_embedded_commands): Warning fixes.
1982 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
1984 * dwarf2.c: Warning fixes.
1985 * elf-bfd.h: Likewise.
1986 * elf-eh-frame.c: Likewise.
1987 * elf-strtab.c: Likewise.
1989 * elf32-m68k.c: Likewise.
1990 * elf32-ppc.c: Likewise.
1991 * elf32-sh-symbian.c: Likewise.
1992 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
1993 * elf64-sh64.c: Likewise.
1994 * peicode.h: Likewise.
1995 * elf64-mmix.c: Warning fixes.
1996 * elfcode.h: Likewise.
1997 * elfxx-mips.c: Likewise.
1998 * libbfd-in.h: Likewise.
1999 * libbfd.c: Likewise.
2000 * mach-o.c: Likewise.
2001 * merge.c: Likewise.
2003 * opncls.c: Likewise.
2006 * vms-hdr.c: Likewise.
2007 * vms-tir.c: Likewise.
2008 * xtensa-isa.c: Likewise.
2009 * xtensa-modules.c: Likewise.
2011 (pstrcmp): Use correct choice of string lengths. Fix return value.
2012 (bfd_sym_module_name): Correct string length.
2013 * bfd-in2.h: Regenerate.
2014 * libbfd.h: Regenerate.
2016 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
2018 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
2019 uninitialized check_segment[1] in TLSMOFF case.
2020 Reported by Alan Modra.
2021 (elf32_frv_relocate_section): Improve errors and warnings.
2023 2005-02-17 Alan Modra <amodra@bigpond.net.au>
2025 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2027 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2029 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2030 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2031 * pef.c (bfd_pef_scan): Don't ignore return value of
2032 bfd_pef_scan_start_address.
2033 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2034 bfd_mach_o_scan_start_address.
2035 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2036 * elfxx-mips.c: Remove unnecessary prototypes.
2037 (sort_dynamic_relocs_64): Abort if not BFD64.
2039 2005-02-16 Alan Modra <amodra@bigpond.net.au>
2041 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2042 Skip toc reloc adjust if reloc_count is zero.
2044 2005-02-15 Nigel Stephens <nigel@mips.com>
2045 Maciej W. Rozycki <macro@mips.com>
2047 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2048 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2049 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2050 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2051 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2053 (mips16_gprel_reloc): Remove bit shuffling; call
2054 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2055 and _bfd_mips16_elf_reloc_shuffle() instead.
2056 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2057 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2059 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2060 elf_mips16_howto_table_rel.
2061 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2062 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2063 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2064 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2065 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2067 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2068 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2069 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2071 (mips16_gprel_reloc): Remove bit shuffling; call
2072 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2073 and _bfd_mips16_elf_reloc_shuffle() instead.
2074 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2075 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2077 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2078 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2079 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2080 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2081 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2082 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2083 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2085 (mips16_gprel_reloc): Remove bit shuffling; call
2086 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2087 and _bfd_mips16_elf_reloc_shuffle() instead.
2088 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2089 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2091 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2092 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2093 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2094 handle bit shuffling for MIPS16 relocs.
2095 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2096 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2097 and _bfd_mips16_elf_reloc_shuffle().
2098 (_bfd_mips_elf_generic_reloc): Likewise.
2099 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2101 (mips_elf_obtain_contents): Remove bit shuffling.
2102 (mips_elf_perform_relocation): Likewise; call
2103 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2105 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2107 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2108 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2109 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2110 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2111 (BFD_RELOC_MIPS16_LO16): Likewise.
2112 * bfd-in2.h: Regenerate.
2113 * libbfd.h: Regenerate.
2115 2005-02-15 Jan Beulich <jbeulich@novell.com>
2117 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2118 R_IA64_DTPMOD64[LM]SB.
2120 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2122 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2123 backward branch in the same section.
2124 (elfNN_ia64_relocate_section): Inform users that the input
2125 section is too big to relax br instruction when overflow
2126 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2127 and R_IA64_PCREL21F.
2129 2005-02-14 Orjan Friberg <orjanf@axis.com>
2131 * elfcore.h (elf_core_file_p): Move the call to
2132 elf_backend_object_p to allow the correct machine to be set before
2133 processing the program headers.
2135 2005-02-14 Nick Clifton <nickc@redhat.com>
2138 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2139 aware flag from the input bfd to the output bfd.
2141 2005-02-11 Maciej W. Rozycki <macro@mips.com>
2143 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2144 R_MIPS_LITERAL relocations for external symbols.
2145 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2146 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2148 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2150 * bfd-in2.h: Rebuilt.
2152 2005-02-11 Paul Brook <paul@codesourcery.com>
2154 * elf-bfd.h (struct elf_link_hash_table): Add
2155 is_relocatable_executable.
2156 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2157 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2158 symbols in relocatable executables.
2159 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2160 relocatable executables.
2161 (_bfd_elf_link_renumber_dynsyms): Ditto.
2162 (bfd_elf_final_link): Ditto.
2163 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2164 relocations into relocatable executables.
2165 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2166 executables. Also copy absolute relocations.
2167 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2168 in relocatable executables.
2169 (allocate_dynrelocs): Copy relocations for relocatable executables.
2170 Output dynamic symbols for symbols defined in linker scripts.
2172 2005-02-11 Nick Clifton <nickc@redhat.com>
2174 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2175 to avoid a compile time warning.
2177 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2180 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2181 inclusion of coffcode.h so that it is actually picked up.
2183 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2184 case it is not used.
2186 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2187 structure and macro.
2189 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2192 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2193 to protect the declaration of this array.
2195 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2196 Avoid call to memcpy with a size of 0.
2198 2005-02-12 Alan Modra <amodra@bigpond.net.au>
2200 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2201 old-style branches to undefined dot-symbols which will be
2202 satisfied by a plt call.
2204 2005-02-11 Alan Modra <amodra@bigpond.net.au>
2206 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2207 (ppc64_elf_copy_indirect_symbol): ..here.
2208 (func_desc_adjust): Use move_plt_plist.
2210 2005-02-10 Paul Brook <paul@codesourcery.com>
2212 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2214 2005-02-10 Paul Brook <paul@codesourcery.com>
2216 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2218 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2219 (elf_link_renumber_local_hash_table_dynsyms): New function.
2220 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2222 2005-02-10 Jakub Jelinek <jakub@redhat.com>
2224 * bfd-in.h (BFD_LINKER_CREATED): Define.
2225 * bfd-in2.h: Rebuilt.
2226 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2227 BFD_LINKER_CREATED bfds when determining input bfds without
2228 .note.GNU-stack section.
2230 2005-02-10 Maciej W. Rozycki <macro@mips.com>
2232 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2233 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2234 relocations against external symbols unchanged.
2236 2005-02-08 Paul Brook <paul@codesourcery.com>
2238 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2241 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
2243 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2246 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2248 * elf64-mips.c: Fix formatting throughout.
2250 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2252 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2254 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
2256 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2257 *ABS*/*UND* sections.
2258 (elf32_frv_relocate_section): Move zero-addend-required error...
2259 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2260 missing needed TLS section.
2262 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
2264 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2265 being the last symbol.
2266 (aout_link_add_symbols): Just return TRUE if a warning
2269 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2271 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2272 R_MIPS_GPREL32 relocations against external symbols.
2273 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2276 2005-02-07 Alan Modra <amodra@bigpond.net.au>
2278 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2279 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2280 elf_string_from_elf_strtab.
2281 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2282 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2283 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2284 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2285 looking at cached symtab info first, before iterating over headers.
2286 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2287 * elfcode.h (elf_object_p): Don't load section header stringtab
2290 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2292 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2293 against protected function when building shared library.
2296 * elf64-x86-64.c (is_32bit_relative_branch): New.
2297 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2298 protected function symbol when building shared library for
2299 32bit relative branch instruction.
2301 2005-02-06 Alan Modra <amodra@bigpond.net.au>
2303 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2304 syms when doing a relocatable link.
2305 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2307 (ppc64_elf_tls_setup): Likewise.
2308 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2310 2005-02-04 Alan Modra <amodra@bigpond.net.au>
2312 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2313 (link_hash_newfunc): Clear all locals using memset.
2314 (make_fdh): Remove flags param. Always create fake func desc
2315 weak. Link the descriptor with the code entry sym.
2316 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2317 (add_symbol_adjust): Adjust make_fdh call.
2318 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2319 descriptor to strong undefined if code entry is strong.
2321 2005-02-04 Alan Modra <amodra@bigpond.net.au>
2323 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2324 lookup here. Set to new before calling bfd_link_repair_undef_list.
2325 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2327 2005-02-03 Alan Modra <amodra@bigpond.net.au>
2329 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2331 2005-02-03 Alan Modra <amodra@bigpond.net.au>
2333 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2334 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2335 before the as-needed lib was loaded. Abort on unexpected refs.
2337 2005-02-02 Alan Modra <amodra@bigpond.net.au>
2339 * elflink.c (elf_smash_syms): Expand comments.
2340 (elf_link_add_object_symbols): Only call elf_smash_syms for
2341 as-needed dynamic objects.
2343 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2344 everything, just the field specific to ia64.
2345 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
2347 2005-02-01 Alan Modra <amodra@bigpond.net.au>
2349 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2350 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2352 (struct add_symbol_adjust_data): New.
2353 (add_symbol_adjust): Make an undefweak func desc for old ABI
2354 objects to link with --as-needed shared libs. Return fail status.
2355 Don't adjust old ABI func entry sym to weak if func desc syms
2357 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2360 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
2362 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2365 2005-02-01 Alan Modra <amodra@bigpond.net.au>
2367 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2368 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2369 remove anything but new and undefweak.
2370 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2372 (_bfd_elf_create_dynamic_sections): Formatting.
2373 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2374 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2375 (struct elf_smash_data): New.
2376 (elf_smash_syms): New function.
2377 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2378 unneeded dynamic objects to loaded list.
2379 (elf_link_output_extsym): Don't handle as-needed here. Strip
2380 bfd_link_hash_new symbols.
2381 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2382 delref when dynindx is already -1.
2383 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2385 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2387 2005-02-01 Ben Elliston <bje@au.ibm.com>
2389 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2391 2005-02-01 Ben Elliston <bje@au.ibm.com>
2393 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2394 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2395 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2396 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2397 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2398 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2399 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2400 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2401 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2402 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2403 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
2404 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
2405 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2406 throughout. Similarly, collapse #if 1'd code.
2408 2005-02-01 Ben Elliston <bje@au.ibm.com>
2410 * elf-bfd.h (bfd_elf_discard_group): Remove.
2411 * elf.c (bfd_elf_discard_group): Likewise.
2412 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2414 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
2416 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2417 (_bfd_elf_eh_frame_address_size): Declare.
2418 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2419 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2420 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2421 (elf_backend_eh_frame_address_size): Define.
2422 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2423 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2424 size from the new backend hook.
2425 (_bfd_elf_write_section_eh_frame): Likewise.
2426 (_bfd_elf_eh_frame_address_size): New function.
2428 2005-01-31 Andrew Cagney <cagney@gnu.org>
2430 * configure: Regenerate to track ../gettext.m4.
2432 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2434 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2435 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2437 2005-01-31 Nick Clifton <nickc@redhat.com>
2439 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2440 sparc-lynxos, vax-vms) be obsolete.
2442 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2444 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2445 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2446 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2447 * elfcode.h (elf_object_p): Use minpagesize instead of
2449 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2450 (elfNN_bed): Include ELF_MINPAGESIZE.
2452 2005-01-28 Julian Brown <julian@codesourcery.com>
2454 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2455 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2456 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2457 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
2458 passing flag value from ld. Set flag value in global hash table entry.
2459 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
2462 2005-01-27 Andrew Cagney <cagney@gnu.org>
2464 * configure: Regenerate to track ../gettext.m4 change.
2466 2005-01-25 Mark Mitchell <mark@codesourcery.com>
2468 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
2471 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
2473 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2474 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2476 * reloc.c: Add R_FRV_TLSMOFF.
2477 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2478 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2479 (elf32_frv_relocate_section): Handle it.
2480 (elf32_frv_check_relocs): Likewise.
2481 * libbfd.h, bfd-in2.h: Rebuilt.
2482 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2483 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2484 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2485 such that they return the constant in gr9.
2486 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2488 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2489 too, such that they shrink on relaxation.
2490 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2491 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2492 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2493 if we can guarantee the use of 16-bit constants.
2494 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2495 Introduce TLS support for FR-V FDPIC.
2496 * reloc.c: Add TLS relocations.
2497 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2498 (elf32_frv_rel_tlsdesc_value_howto): New.
2499 (elf32_frv_rel_tlsoff_howto): New.
2500 (frv_reloc_map): Add new mappings.
2501 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2503 (frvfdpic_dynamic_got_plt_info): New.
2504 (frvfdpic_plt_tls_ret_offset): New.
2505 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2506 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2507 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2508 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2510 (struct frvfdpic_relocs_info): Add TLS fields.
2511 (frvfdpic_relocs_info_hash): Warning clean up.
2512 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2513 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2514 (FRVFDPIC_TLS_BIAS): Define.
2515 (tls_biased_base): New.
2516 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2518 (frv_reloc_type_lookup): Likewise.
2519 (frvfdpic_info_to_howto_rel): Likewise.
2520 (elf32_frv_relocate_section): Likewise.
2521 (_frv_create_got_section): Create the PLT section here.
2522 (elf32_frvfdpic_create_dynamic_sections): Not here.
2523 (_frvfdpic_count_nontls_entries): Move out of...
2524 (_frvfdpic_count_got_plt_entries): ... here.
2525 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2526 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2528 (_frvfdpic_relax_tls_entries): New.
2529 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2530 (_frvfdpic_get_tlsdesc_entry): New.
2531 (_frvfdpic_assign_got_entries): Add TLS support.
2532 (_frvfdpic_assign_plt_entries): Likewise.
2533 (_frvfdpic_reset_got_plt_entries): New.
2534 (_frvfdpic_size_got_plt): Move out of...
2535 (elf32_frvfdpic_size_dynamic_sections): ... here.
2536 (_frvfdpic_relax_got_plt_entries): New.
2537 (elf32_frvfdpic_relax_section): New.
2538 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2539 (elf32_frv_check_relocs): Add TLS support.
2540 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2541 * libbfd.h, bfd-in2.h: Rebuilt.
2543 2005-01-25 Alan Modra <amodra@bigpond.net.au>
2545 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2546 loadable reloc sections.
2547 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2548 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2550 2005-01-25 Alan Modra <amodra@bigpond.net.au>
2552 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2553 sections immediately when linking shared libs. Instead, wait until
2554 we know a lib is needed.
2555 (_bfd_elf_link_create_dynstrtab): Extract from..
2556 (_bfd_elf_link_create_dynamic_sections_): ..here.
2557 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2558 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2559 for non-existent .dynamic.
2560 (elf_link_output_extsym): Don't complain about undefined symbols
2561 in as-needed dynamic libs that aren't actually linked.
2563 2005-01-24 Andrew Cagney <cagney@gnu.org>
2565 * configure: Regenerate, ../gettext.m4 was updated.
2567 2005-01-21 Ben Elliston <bje@au.ibm.com>
2569 * aout-encap.c: Remove unused file.
2571 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2574 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2575 non-function symbols are local.
2576 (_bfd_elf_symbol_refs_local_p): Likewise.
2578 2005-01-18 Alan Modra <amodra@bigpond.net.au>
2580 * bfd.c (bfd_link_just_syms): Add abfd param.
2581 * bfd-in2.h: Regenerate.
2583 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2585 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2586 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2587 instructions. If the amount of padding is known, reduce the size
2588 of the CIE or FDE by that amount.
2590 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2592 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2593 augmentation_size. Use bfd_signed_vmas for data_align.
2594 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2595 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2596 functions. Don't read past the end of the enclosing CIE or FDE.
2597 (skip_bytes): New utility function.
2598 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2600 (_bfd_elf_write_section_eh_frame): Use new functions.
2602 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2604 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2605 assert-style REQUIRE() macro to handle sanity checks.
2607 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2609 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2611 (read_unsigned_leb128): Removed.
2612 (read_signed_leb128): Removed.
2613 (find_abstract_instance_name): Updated.
2614 (parse_comp_unit): Accept info_ptr_unit.
2615 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2616 comp unit and pass it to parse_comp_unit.
2618 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2619 (read_signed_leb128): Moved to ...
2622 * libbfd-in.h (read_unsigned_leb128): New prototype.
2623 (read_signed_leb128): Likewise.
2624 * libbfd.h: Regenerated.
2626 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2627 Nick Clifton <nickc@redhat.com>
2629 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2630 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2631 arch_sh4a_nofpu_up in order to match the external names and make the
2632 testsuite's job easier.
2633 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2635 * bfd-in2.h: Regenerate.
2637 2005-01-15 Andrew Cagney <cagney@gnu.org>
2640 * acinclude.m4: Move BFD_NEED_DECLARATION,
2641 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2642 the new file bfd.m4. Include ../bfd/bfd.m4.
2643 * configure: Re-generate.
2645 2005-01-12 Alan Modra <amodra@bigpond.net.au>
2647 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2648 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2650 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2651 R_PPC_RELAX32PC_PLT.
2653 2005-01-11 Alan Modra <amodra@bigpond.net.au>
2655 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2657 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2658 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2659 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2660 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2661 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2662 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2663 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2664 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2665 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2666 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2667 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2668 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2669 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2670 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2672 2005-01-11 Alan Modra <amodra@bigpond.net.au>
2674 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2677 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2679 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2680 * bfd-in2.h: Regenerate.
2681 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2682 to support these new machine values.
2683 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2685 (bfd_maxq_arch): Update values for the maxq20.
2687 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2689 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2690 non-shared object, do not reserve space in .plt and .rela.plt for
2691 regular symbols neither defined nor referenced in shared objects.
2693 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2695 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2696 to zero the structure.
2697 (create_got_section): Use BFD_ASSERT instead of abort.
2698 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2700 (create_got_section): New function.
2701 (sparc64_elf_create_dynamic_sections): Likewise.
2702 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2703 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2704 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2705 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2706 (sparc64_elf_finish_dynamic_symbol): Likewise.
2707 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2708 (elf_backend_create_dynamic_sections): Define to
2709 sparc64_elf_create_dynamic_sections.
2711 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2713 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2714 (elf_backend_omit_section_dynsym): Define to it.
2715 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2716 (elf_backend_omit_section_dynsym): Define to it.
2718 2005-01-07 Jakub Jelinek <jakub@redhat.com>
2720 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2721 PT_DYNAMIC segment, unless .dynamic.
2723 2005-01-06 Paul Brook <paul@codesourcery.com>
2725 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2726 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2727 * configure: Regenerate.
2728 * elf32-arm.c: Add VxWorks target bfd.
2730 (elf32_arm_link_hash_table): Add use_rel.
2731 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2732 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2733 Correct offset calculation for RELA case.
2734 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2735 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2736 (elf32_arm_vxworks_link_hash_table_create): New function.
2737 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2738 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2739 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2741 2005-01-06 Alan Modra <amodra@bigpond.net.au>
2743 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2745 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2746 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2747 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2748 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2749 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2750 (toc_adjusting_stub_needed): Rewrite.
2751 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2752 toc tests. Adjust for toc_adjusting_stub_needed changes.
2753 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2754 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2755 * section.c: Expand comment on backend bits.
2756 * bfd-in2.h: Regenerate.
2757 * libbfd.h: Regenerate.
2759 2005-01-06 Alan Modra <amodra@bigpond.net.au>
2761 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2762 toc adjusting stub, do not test source section flags.
2764 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
2766 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2767 from STABS debugging sections again.
2769 2005-01-05 Fred Fish <fnf@specifixinc.com>
2771 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2772 (find_abstract_instance_name): New function.
2773 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2774 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2775 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2777 2004-12-31 Paul Brook <paul@copdesourcery.com>
2779 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2781 2004-12-31 Alan Modra <amodra@bigpond.net.au>
2783 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2784 Commit missing changes from 2004-12-22.
2785 * bfd-in2.h: Regenerate.
2787 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
2789 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2791 2004-12-21 Kris Warkentin <kewarken@qnx.com>
2793 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2794 Add 'base' argument for constructing register sections. Reformat.
2795 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2796 gp and fp regs. Reformat.
2798 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2800 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2801 * bfd-in2.h: Regenerate.
2802 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2803 (avr_reloc_map): Likewise.
2804 (avr_final_link_relocate): Likewise.
2806 2004-12-22 Alan Modra <amodra@bigpond.net.au>
2808 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2809 as-needed dynamic libs as undefined.
2810 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2811 libs when finding they are needed.
2813 2004-12-20 Alan Modra <amodra@bigpond.net.au>
2815 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2816 (opd_entry_value): Use opd_relocs if available.
2817 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2818 copy .opd relocations to opd_relocs.
2819 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2821 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
2823 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2824 * elf32-v850.c (v850_elf_howto_table): Add entry for
2825 R_V850_LO16_SPLIT_OFFSET.
2826 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2827 (v850_elf_perform_lo16_relocation): New function, extracted from...
2828 (v850_elf_perform_relocation): ...here. Use it to handle
2829 R_V850_LO16_SPLIT_OFFSET.
2830 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2831 R_V850_LO16_SPLIT_OFFSET.
2832 * libbfd.h, bfd-in2.h: Regenerate.
2834 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
2836 * config.bfd: Add s390x-ibm-tpf support.
2838 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
2840 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
2841 to prototype, to make hash info available.
2842 Prevent wrapped symbols from being adjusted twice.
2844 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
2846 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2847 overflow for calls to undefined weak symbols.
2849 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2851 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2852 canonical sections syms have a name.
2854 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2856 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2857 have been adjusted for output.
2858 (ppc64_elf_relocate_section): Mark sections with reloc_done.
2860 2004-12-10 Alan Modra <amodra@bigpond.net.au>
2862 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2863 add symtab_hdr param.
2864 (group_signature): Update calls.
2865 * elf-bfd.h (bfd_elf_sym_name): Update.
2866 * elf32-ppc.c (ppc_elf_relocate_section): Update.
2867 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2868 (ppc64_elf_relocate_section): Update.
2869 * elflink.c (elf_link_input_bfd): Update.
2871 2004-12-10 Jakub Jelinek <jakub@redhat.com>
2873 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2874 st_shndx on STT_SECTION sections.
2876 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
2878 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2879 ELF section symbols.
2881 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
2883 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2884 return a real value, unless it is a PLT symbol.
2885 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2888 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
2889 R_MIPS_JALR entry to 0.
2891 * archures.c: Define bfd_mach_mips9000.
2892 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
2893 (mips_set_isa_flags): Handle bfd_mach_mips9000.
2894 * cpu-mips.c (I_mips9000): Define.
2895 (arch_info_struct): Add case for bfd_mach_mips9000.
2896 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
2897 * bfd-in2.h: Regenerate.
2899 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
2901 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
2904 2004-12-07 Ben Elliston <bje@gnu.org>
2906 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
2908 2004-12-06 Daniel Jacobowitz <dan@debian.org>
2910 Suggested by Fergal Daly <fergal@esatclear.ie>:
2911 * simple.c (simple_dummy_multiple_definition): New function.
2912 (bfd_simple_get_relocated_section_contents): Use it.
2914 2004-12-03 Jan Beulich <jbeulich@novell.com>
2916 * elf.c (elf_find_function): Don't use the last file symbol ever,
2917 seen, but the last one seen prior to the symbol being reported.
2918 Don't report a filename at all for global symbols when that might
2921 2004-12-01 Paul Brook <paul@codesourcery.com>
2923 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
2924 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
2927 2004-12-01 Paul Brook <paul@codesourcery.com>
2929 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
2932 2004-11-30 Paul Brook <paul@codesourcery.com>
2934 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
2935 no_pipeline_knowledge
2936 (elf32_arm_link_hash_table_create): Ditto.
2937 (bfd_elf32_arm_process_before_allocation): Ditto.
2938 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
2940 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2942 * bfd-in2.h: Regenerate.
2944 2004-11-30 Randolph Chung <tausq@debian.org>
2946 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
2947 (elf32_hppa_grok_psinfo): New function.
2948 (elf_backend_grok_prstatus): Define.
2949 (elf_backend_grok_psinfo): Define.
2951 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
2954 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2956 2004-11-24 Paul Brook <paul@codesourcery.com>
2958 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
2960 2004-11-24 Paul Brook <paul@codesourcery.com>
2962 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
2963 (elf32_arm_swap_symbol_out): New function.
2964 (elf32_arm_size_info): Add.
2965 (elf_backend_size_info): Define.
2967 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2969 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
2972 2004-11-19 Alan Modra <amodra@bigpond.net.au>
2974 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
2975 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
2976 * nlmcode.h (nlm_write_object_contents): Warning fix.
2978 2004-11-18 Bob Wilson <bob.wilson@acm.org>
2980 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
2982 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2984 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
2985 (elf32_arm_plt_thumb_stub): New.
2986 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2988 (elf32_arm_link_hash_traverse): Fix typo.
2989 (elf32_arm_link_hash_table): Add obfd.
2990 (elf32_arm_link_hash_newfunc): Initialize new fields.
2991 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2992 (elf32_arm_link_hash_table_create): Initialize obfd.
2993 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2994 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2995 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2996 interworking BFD is not dynamic.
2997 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
2998 not emit glue for PLT references.
2999 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3000 emit glue for PLT references. Support the Thumb PLT prefix.
3001 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3003 (elf32_arm_check_relocs): Likewise.
3004 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3006 (allocate_dynrelocs): Handle Thumb PLT references.
3007 (elf32_arm_finish_dynamic_symbol): Likewise.
3008 (elf32_arm_symbol_processing): New function.
3009 (elf_backend_symbol_processing): Define.
3011 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3013 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3014 add_fde_encoding. Remove need_relative.
3015 * elf-eh-frame.c (extra_augmentation_string_bytes)
3016 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3017 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3018 in cases where the CIE has no existing 'R' augmentation. Use
3019 size_of_output_cie_fde when assigning offsets. Use the final offset
3020 as the new section size.
3021 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3022 Account for any extra augmentation bytes in the returned offset.
3023 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3024 moved before being modified. Pad growing entries with DW_CFA_nops.
3025 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3026 and add_fde_encoding.
3028 2004-11-15 Mark Mitchell <mark@codesourcery.com>
3030 * elf32-arm.c (elf32_arm_relocate_section): Use
3031 arm_real_reloc_type.
3033 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
3035 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3036 for discard relocations; don't add an R_MIPS_NONE to the main body
3039 2004-11-04 Paul Brook <paul@codesourcery.com>
3041 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3042 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3043 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3044 default version definition for unversioned symbols.
3045 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3046 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3047 _bfd_elf_slurp_version_tables. Set default version for unversioned
3050 2004-11-15 Paul Brook <paul@codesourcery.com>
3052 * elflink.c (elf_link_add_object_symbols): Don't assume version
3053 indices are consecutive.
3055 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
3057 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3058 composite relocations against the personality data.
3060 2004-11-13 Paul Brook <paul@codesourcery.com>
3062 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3063 R_ARM_PREL31 relocations to PLT entries.
3064 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3065 (elf32_arm_check_relocs): Ditto.
3067 2004-11-12 Bob Wilson <bob.wilson@acm.org>
3069 * xtensa-isa.c (xtensa_interface_class_id): New.
3071 2004-11-11 Bob Wilson <bob.wilson@acm.org>
3073 * elf32-xtensa.c (property_table_compare): Remove assertion about
3074 entries with the same address and non-zero size.
3075 (xtensa_read_table_entries): Report such entries as errors.
3077 2004-11-11 Mark Mitchell <mark@codesourcery.com>
3079 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3080 R_ARM_RELATIVE on Symbian OS.
3082 2004-11-09 Mark Mitchell <mark@codesourcery.com>
3084 * som.c (som_bfd_print_private_bfd_data): New function.
3085 (som_object_setup): Save the auxiliary header. Don't assume that
3086 zero is an invalid entry point for a shared library.
3087 (som_object_p): Allocate the auxiliary header on the heap.
3089 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3091 (elf32_arm_symbian_modify_segment_map): Likewise.
3093 2004-11-09 Daniel Jacobowitz <dan@debian.org>
3095 From David Poole <daveml@mbuf.com>:
3096 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3097 (elf32_arm_size_dynamic_sections): Call it.
3099 2004-11-09 Alan Modra <amodra@bigpond.net.au>
3101 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3102 (ALL_MACHINES_CFILES): Fix typo.
3103 * Makefile.in: Regenerate.
3104 * po/SRC-POTFILES.in: Regenerate.
3106 2004-11-08 Mark Mitchell <mark@codesourcery.com>
3108 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3109 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3110 symbol in the relocation.
3112 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3113 Vineet Sharma <vineets@noida.hcltech.com>
3115 * coff-maxq.c: New File.
3116 * cpu-maxq.c: New File.
3117 * coffcode.h: Likewise.
3118 * config.bfd: Likewise.
3119 * configure.in (maxqcoff_vec): New target vector.
3120 * Makefile.am: Add support for maxq target.
3121 * configure.in: Likewise.
3122 * archures.c:. Likewise.
3123 * targets.c: Likewise.
3124 * bfd_in2.h : Regenerated.
3125 * Makefile.in: Regenerated.
3126 * configure: Regenerated.
3127 * doc/Makefile.in: Regenerated.
3129 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3131 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3132 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3133 C_NT_WEAK aux entries.
3134 (_bfd_coff_generic_relocate_section): Handle undefined
3137 2004-11-07 Andreas Schwab <schwab@suse.de>
3139 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3140 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3141 non-default visibility.
3143 2004-11-01 Mark Mitchell <mark@codesourcery.com>
3145 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
3147 (elf32_arm_symbian_modify_segment_map): Don't
3148 reset includes_filehdr and includes_phdrs here.
3150 2004-11-04 Daniel Jacobowitz <dan@debian.org>
3152 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3153 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3154 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3156 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3157 to a new removed list. Remove normal configuration stanzas.
3158 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3159 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3160 elfarm-nabi.lo with elf32-arm.lo.
3161 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3162 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3163 * elf32-arm.h: Remove.
3164 * elfarm-oabi.c: Remove.
3165 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3166 and bfd_elf32_littlearm_oabi_vec.
3167 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3169 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
3171 * config.bfd: Support crisv32-*-* like cris-*-*.
3172 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3173 (bfd_mach_cris_v10_v32): New macros.
3174 * cpu-cris.c: Tweak formatting.
3175 (get_compatible): New function.
3177 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3178 bfd_arch_info_type:s.
3179 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3180 get_compatible for member compatible and link bfd_cris_arch_v32 as
3182 * elf32-cris.c (cris_elf_pcrel_reloc)
3183 (cris_elf_set_mach_from_flags): New functions.
3184 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3185 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3186 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3187 numbers for bfd_mach_cris_v32.
3188 (PLT_ENTRY_SIZE_V32): New macro.
3189 (elf_cris_plt0_entry): Drop last comma in initializer.
3190 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3191 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3193 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3195 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3196 (elf_cris_finish_dynamic_sections): Similar.
3197 (elf_cris_adjust_dynamic_symbol): Similar.
3198 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3200 <switch with PIC relocs>: Emit error and return FALSE for
3201 bfd_mach_cris_v10_v32.
3202 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3203 Emit warning when generating textrel reloc.
3204 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3205 (cris_elf_final_write_processing): Set flags according to mach.
3206 (cris_elf_print_private_bfd_data): Display
3207 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3208 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3209 new_flags. Don't call cris_elf_final_write_processing. Don't
3210 look at the actual elf header flags at all; use
3211 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3212 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3214 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3215 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3216 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3217 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3218 * bfd-in2.h, libbfd.h: Regenerate.
3220 2004-11-04 Alan Modra <amodra@bigpond.net.au>
3222 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3223 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3225 (struct adjust_toc_info): New.
3226 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3228 2004-11-03 Bob Wilson <bob.wilson@acm.org>
3230 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3231 if there are no segments.
3233 2004-11-02 Daniel Jacobowitz <dan@debian.org>
3235 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3237 2004-11-02 Nick Clifton <nickc@redhat.com>
3239 * elf32-iq2000.c: Convert to ISO C90 formatting.
3241 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
3243 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
3245 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3247 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3248 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3249 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3251 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3253 * elf32-sh.c (tpoff): Take alignment into account.
3255 2004-10-28 Nick Clifton <nickc@redhat.com>
3257 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
3258 performing a relocatable link.
3259 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3260 for MIPS ports under Irix.
3262 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
3264 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3265 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3266 (elf32_arm_final_link_relocate): Ditto.
3267 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3268 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3269 (elf32_arm_adjust_dynamic_symbol): Ditto.
3270 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3271 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3272 (elf32_arm_r_howto): ... To here.
3273 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3275 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3278 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3279 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3280 and R_IA64_SECREL64LSB.
3282 2004-10-26 Paul Brook <paul@codesourcery.com>
3284 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3285 (bfd_elf_size_dynamic_sections): Create default version definition.
3286 (elf_link_output_extsym): Adjust for default symbol version.
3288 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3290 * mmo.c: Adjust to ISO C.
3292 * mmo.c (mmo_write_section_description): New function broken out
3293 of mmo_internal_write_section.
3294 (mmo_internal_write_section): For each of .text and .data, call
3295 mmo_write_section_description before outputting contents if it has
3296 nontrivially deducible vma or contents.
3297 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3298 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3299 symbols if found within the .data address range.
3301 2004-10-24 Daniel Jacobowitz <dan@debian.org>
3303 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3305 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3307 * mmo.c (File Layout): Correct place of misplaced blurb about
3310 2004-10-22 Mark Kettenis <kettenis@gnu.org>
3312 * config.bfd: Add mips64*-*-openbsd.
3314 2004-10-21 Bob Wilson <bob.wilson@acm.org>
3316 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3319 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3321 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3322 * configure: Regenerate.
3324 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3327 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3328 to linker reloc_overflow callback.
3329 (aout_link_input_section_ext): Likewise.
3330 (aout_link_reloc_link_order): Likewise.
3331 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3332 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3334 (alpha_relocate_section): Likewise.
3335 * coff-arm.c (coff_arm_relocate_section): Likewise.
3336 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3337 * coff-h8500.c (extra_case): Likewise.
3338 * coff-i960.c (coff_i960_relocate_section): Likewise.
3339 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3340 * coff-mips.c (mips_relocate_section): Likewise.
3341 * coff-or32.c (coff_or32_relocate_section): Likewise.
3342 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3343 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3344 * coff-sh.c (sh_relocate_section): Likewise.
3345 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3346 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3347 * coff-z8k.c (extra_case): Likewise.
3348 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3349 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3350 (_bfd_coff_generic_relocate_section): Likewise.
3351 * ecoff.c (ecoff_reloc_link_order): Likewise.
3352 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3353 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3354 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3355 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3356 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3357 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3358 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3359 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3360 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3361 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3362 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3363 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3364 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3365 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3366 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3367 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3368 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3369 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3370 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3371 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3372 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3373 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3374 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3375 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3376 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3377 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3378 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3379 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3380 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3381 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3382 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3383 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3384 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3385 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3386 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3387 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3388 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3389 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3390 * elflink.c (elf_reloc_link_order): Likewise.
3391 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3392 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3393 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3394 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3395 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3396 (aout_link_reloc_link_order): Likewise.
3397 * reloc.c (bfd_generic_get_relocated_section_contents):
3399 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3400 * simple.c (simple_dummy_reloc_overflow): Updated.
3402 2004-10-20 Andreas Schwab <schwab@suse.de>
3404 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3405 (elf_backend_plt_sym_val): Define.
3407 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3409 * config.bfd: Set targ_underscore=yes for PE COFF targets
3411 2004-10-19 Alan Modra <amodra@bigpond.net.au>
3413 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3414 (ppc64_elf_edit_opd): Likewise.
3416 2004-10-18 Mark Mitchell <mark@codesourcery.com>
3418 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3419 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3420 set SEC_ALLOC and SEC_LOAD.
3422 2004-10-18 Nick Clifton <nickc@redhat.com>
3424 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3425 'name' for relocs against both local and global symbols.
3427 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3429 * bfd-in2.h: Regenerate.
3430 * bfd.c (struct bfd): Add no_export.
3431 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3433 2004-10-15 Alan Modra <amodra@bigpond.net.au>
3435 * config.bfd: Whitespace cleanup.
3436 * Makefile.am: Run "make dep-am"
3437 * Makefile.in: Regenerate.
3439 2004-10-15 Jakub Jelinek <jakub@redhat.com>
3441 * elflink.c (struct already_linked_section): Removed.
3442 (try_match_symbols_in_sections, already_linked): Removed.
3443 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3444 prefix of section names when finding already_linked_table
3445 chain. Compare section names. Instead of calling already_linked,
3446 do it inline and only for sections in the same already_linked_list.
3448 2004-10-15 Alan Modra <amodra@bigpond.net.au>
3450 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3451 parameter. If called after _bfd_elf_write_section_eh_frame,
3452 don't allow a -2 return unless need_* bit is already set, and
3453 handle offsets adjusted for output_offset.
3454 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3455 * elf.c (_bfd_elf_section_offset): Update call.
3457 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3460 * coffcode.h (coff_compute_section_file_positions): Cast to
3461 bfd_vma when computing page alignment.
3463 2004-10-13 Mark Mitchell <mark@codesourcery.com>
3465 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3466 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3468 2004-10-12 Mark Mitchell <mark@codesourcery.com>
3470 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3471 relocations use a virtual address, not a section offset.
3473 2004-10-12 Bob Wilson <bob.wilson@acm.org>
3475 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3476 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3477 xtensa_format_encode.
3478 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3479 (ebb_add_proposed_action): Delete.
3481 2004-10-12 Bob Wilson <bob.wilson@acm.org>
3483 * elf32-xtensa.c: Use ISO C90 formatting.
3485 2004-10-12 Paul Brook <paul@codesourcery.com>
3487 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3490 2004-10-12 Paul Brook <paul@codesourcery.com>
3492 * elf32-arm.h: Support EABI version 4 objects.
3494 2004-10-12 Alan Modra <amodra@bigpond.net.au>
3497 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3498 Don't mark as default.
3499 (bfd_x86_64_arch): Don't mark as default.
3501 2004-10-12 Alan Modra <amodra@bigpond.net.au>
3503 * elflink.c (enum action_discarded): New.
3504 (elf_section_complain_discarded): Delete.
3505 (elf_action_discarded): New function subsuming the above and also
3506 controlling reloc behaviour.
3507 (elf_link_input_bfd): Use it.
3509 2004-10-11 Jakub Jelinek <jakub@redhat.com>
3511 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3512 (special_sections): Add .gnu.liblist and .gnu.conflict.
3513 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3515 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3518 * elflink.c (elf_link_input_bfd): Try harder to support
3519 relocations against symbols in removed linkonce sections.
3521 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3523 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3526 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3527 sections do not reference symbols in non-SEC_ALLOC sections.
3529 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3532 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3533 (_bfd_elf_link_omit_section_dynsym): Formatting.
3535 2004-10-10 Alan Modra <amodra@bigpond.net.au>
3537 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3538 * libbfd.h: Regnerate.
3539 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3540 * elf32-frv.c: Likewise.
3541 * elf32-m32r.c: Likewise.
3542 * elf32-ppc.c: Likewise.
3543 * elf64-hppa.c: Likewise.
3544 * elfxx-ia64.c: Likewise.
3545 * opncls.c: Likewise.
3547 2004-10-10 Alan Modra <amodra@bigpond.net.au>
3549 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3550 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3551 offsets stored in struct eh_cie_fde entries before doing other
3554 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3555 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3556 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3557 setting offsets for removed CIEs. Don't set "sec", instead set
3558 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3559 CIE in hdr_info. Only set make_relative and make_lsda_relative
3560 for CIEs. Use pointers rather than array indices.
3561 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3562 make_lsda_relative, need_* on cie_inf for FDEs.
3563 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3564 section output_offset. Delete cie_offset, instead use cie_inf
3565 pointer to CIE entry. Use need_relative and need_lsda_relative on
3566 CIE entry for FDEs. Use pointers rather than array indices.
3568 2004-10-09 Alan Modra <amodra@bigpond.net.au>
3570 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3571 bfd_is_target_special_symbol.
3572 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3573 * som.c (som_bfd_is_target_special_symbol): Define.
3575 2004-10-08 Nick Clifton <nickc@redhat.com>
3577 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3578 * configure: Regenerate.
3579 * bfd-in2.h: Regenerate.
3580 * syms.c (bfd_is_target_special_symbol): New interface function.
3581 Returns true when a symbol should be considered to be special.
3582 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3583 the symbol jump table.
3584 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3585 Return true iff the symbol is a mapping symbol.
3586 (bfd_elf32_bfd_is_target_special_symbol): Define.
3587 * elfxx-target.h: Provide a default definition for
3588 bfd_is_target_special_symbol.
3589 * aout-target.h: Likewise.
3590 * aout-tic30.c: Likewise.
3591 * binary.c: Likewise.
3592 * coffcode.h: Likewise.
3593 * i386msdos.c: Likewise.
3596 * libaout.h: Likewise.
3597 * libbfd-in.h: Likewise
3598 * libecoff.h: Likewise.
3599 * mach-o.c: Likewise.
3601 * nlm-target.h: Likewise.
3602 * oasys.c: Likewise.
3604 * ppcboot.c: Likewise.
3606 * tekhex.c: Likewise.
3607 * versados.c: Likewise.
3609 * xcoff-target.h: Likewise.
3611 * libbfd.h: Regenerate.
3613 2004-10-08 Daniel Jacobowitz <dan@debian.org>
3615 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3616 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3617 (elf_backend_section_from_shdr): Define.
3619 2004-10-08 Alan Modra <amodra@bigpond.net.au>
3621 * syms.c (bfd_is_local_label): Return false for file symbols.
3623 2004-10-07 Bob Wilson <bob.wilson@acm.org>
3624 David Heine <dlheine@tensilica.com>
3626 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3627 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3628 (elf32xtensa_no_literal_movement): New global variable.
3629 (elf_howto_table): Add entries for new relocations.
3630 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3631 (property_table_compare): When addresses are equal, compare sizes and
3632 various property flags.
3633 (property_table_matches): New.
3634 (xtensa_read_table_entries): Extend to read new property tables. Add
3635 output_addr parameter to indicate that output addresses should be used.
3636 Use bfd_get_section_limit.
3637 (elf_xtensa_find_property_entry): New.
3638 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3639 (elf_xtensa_check_relocs): Handle new relocations.
3640 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3641 relocations. Use new xtensa-isa.h functions.
3642 (build_encoding_error_message): Remove encode_result parameter. Add
3643 new target_address parameter used to detect alignment errors.
3644 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3645 error handling. Use new is_operand_relocation function.
3646 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3647 Use underbar macro for error messages. Formatting.
3648 (get_const16_opcode): New.
3649 (get_l32r_opcode): Add a separate flag for initialization.
3650 (get_relocation_opnd): Operand number is no longer explicit in the
3651 relocation. Change to decode the opcode and analyze its operands.
3652 (get_relocation_slot): New.
3653 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3654 Use new xtensa-isa.h functions to handle multislot instructions.
3655 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3656 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3657 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3658 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3659 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3660 get_single_format, init_op_single_format_table): New.
3661 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3662 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3663 (contract_asm_expansion): Add error_message parameter and pass it to
3664 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3665 with R_XTENSA_SLOT0_OP.
3666 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3667 instructions. Use new xtensa-isa.h functions.
3668 (r_reloc struct): Add new virtual_offset field.
3669 (r_reloc_init): Add contents and content_length parameters. Set
3670 virtual_offset field to zero. Add contents to target_offset field for
3671 partial_inplace relocations.
3672 (r_reloc_is_defined): Check for null.
3673 (print_r_reloc): New debug function.
3674 (source_reloc struct): Replace xtensa_operand field with pair of the
3675 opcode and the operand position. Add is_abs_literal field.
3676 (init_source_reloc): Specify operand by opcode/position pair. Set
3677 is_abs_literal field.
3678 (source_reloc_compare): When target_offsets are equal, compare other
3679 fields to make sorting predictable.
3680 (literal_value struct): Add is_abs_literal field.
3681 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3682 (init_literal_value): New.
3683 (is_same_value): Replace with ...
3684 (literal_value_equal): ... this function. Add comparisons of
3685 virtual_offset and is_abs_literal fields.
3686 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3687 failure. Initialize has_last_loc field.
3688 (value_map_hash_table_delete): New.
3689 (hash_literal_value): Rename to ...
3690 (literal_value_hash): ... this. Include is_abs_literal flag and
3691 virtual_offset field in the hash value.
3692 (get_cached_value): Rename to ...
3693 (value_map_get_cached_value): ... this. Update calls to
3694 literal_value_hash and literal_value_equal.
3695 (add_value_map): Check for allocation failure. Update calls to
3696 value_map_get_cached_value and literal_value_hash.
3697 (text_action, text_action_list, text_action_t): New types.
3698 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3699 text_action_add, text_action_add_literal, offset_with_removed_text,
3700 offset_with_removed_text_before_fill, find_insn_action,
3701 print_action_list, print_removed_literals): New.
3702 (offset_with_removed_literals): Delete.
3703 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3704 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3705 allocated_relocs_count fields.
3706 (init_xtensa_relax_info): Initialize new fields.
3707 (reloc_bfd_fix struct): Add new translated field.
3708 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3710 (fix_compare, cache_fix_array): New.
3711 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3712 section via get_xtensa_relax_info. Use cache_fix_array to set up
3713 sorted fix_array and use bsearch instead of linear search.
3714 (section_cache_t): New struct.
3715 (init_section_cache, section_cache_section, clear_section_cache): New.
3716 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3717 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3718 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3719 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3721 (retrieve_contents): Use bfd_get_section_limit.
3722 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3723 to compute_removed_literals. Free value_map_hash_table when no longer
3725 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3726 compute_text_actions for all sections.
3727 (find_relaxable_sections): Mark sections as relaxable if they contain
3728 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3729 call. Increment relax_info src_count field only for appropriate
3730 relocation types. Remove is_literal_section check.
3731 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3732 r_reloc_init and find_associated_l32r_irel. Check
3733 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3734 literals. Pass is_abs_literal flag to init_source_reloc.
3735 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3736 CONST16 instructions. Adjust calls to r_reloc_init and
3737 pcrel_reloc_fits. Handle weak symbols conservatively.
3738 (find_associated_l32r_irel): Add bfd parameter and pass it to
3740 (compute_text_actions, compute_ebb_proposed_actions,
3741 compute_ebb_actions, check_section_ebb_pcrels_fit,
3742 check_section_ebb_reduces, text_action_add_proposed,
3743 compute_fill_extra_space): New.
3744 (remove_literals): Replace with ...
3745 (compute_removed_literals): ... this function. Call
3746 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3747 Call xtensa_read_table_entries to get the property table. Skip
3748 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3749 is_removable_literal, remove_dead_literal, and
3750 identify_literal_placement functions.
3751 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3752 instead of linear search.
3753 (is_removable_literal, remove_dead_literal,
3754 identify_literal_placement): New.
3755 (relocations_reach): Update check for literal not referenced by any
3756 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3757 (coalesce_shared_literal, move_shared_literal): New.
3758 (relax_section): Use bfd_get_section_limit. Call
3759 translate_section_fixes. Update calls to r_reloc_init and
3760 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3761 Add call to pin_internal_relocs. Add special handling for
3762 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3763 info to calculate new addend_displacement variable. Replace code for
3764 deleting literals with more general code to perform the actions
3765 determined by the action_list for the section.
3766 (translate_section_fixes, translate_reloc_bfd_fix): New.
3767 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3768 find_removed_literal only if is_operand_relocation. Update call to
3769 offset_with_removed_text. Use new target_offset and removed_bytes
3771 (move_literal): New.
3772 (relax_property_section): Use bfd_get_section_limit. Set new
3773 is_full_prop_section flag and handle new property tables. Update calls
3774 to r_reloc_init and offset_with_removed_text. Check
3775 is_relaxable_asm_section flag. Handle expansion of zero-sized
3776 unreachable entries, with use of offset_with_removed_text_before_fill.
3777 For relocatable links, combine entries only for literal tables.
3778 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3779 calls to offset_with_removed_text. Translate st_size field for
3781 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3782 failure. Add contents parameter. Update call to get_bfd_fix. Update
3783 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3784 R_XTENSA_ASM_EXPAND relocs.
3785 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3786 call to get_bfd_fix. Include offset from contents for partial_inplace
3788 (is_reloc_sym_weak): New.
3789 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3790 (prop_sec_len): New.
3791 (xtensa_is_property_section): Handle new property sections.
3792 (is_literal_section): Delete.
3793 (internal_reloc_compare): When r_offset matches, compare r_info and
3794 r_addend to make sorting predictable.
3795 (internal_reloc_matches): New.
3796 (xtensa_get_property_section_name): Handle new property sections.
3797 (xtensa_get_property_predef_flags): New.
3798 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3799 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3800 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3801 (xtisa_errno, xtisa_error_msg): New variables.
3802 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3803 (xtensa_insnbuf_alloc): Add error handling.
3804 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3805 use xtensa_format_decode. Add error handling.
3806 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3807 instruction length to find the number of bytes to copy.
3808 (xtensa_isa_init): Add error handling. Replace calls to
3809 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3810 tables in the xtensa_modules structure.
3811 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3812 xtensa_extend_isa): Delete.
3813 (xtensa_isa_free): Change to only free lookup tables.
3814 (opname_lookup_compare): Replace with ...
3815 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3816 (xtensa_insn_maxlength): Rename to ...
3817 (xtensa_isa_maxlength): ... this.
3818 (xtensa_insn_length): Delete.
3819 (xtensa_insn_length_from_first_byte): Replace with ...
3820 (xtensa_isa_length_from_chars): ... this function.
3821 (xtensa_num_opcodes): Rename to ...
3822 (xtensa_isa_num_opcodes): ... this.
3823 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3824 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3825 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3826 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3827 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3828 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3829 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3830 (xtensa_opcode_lookup): Add error handling.
3831 (xtensa_decode_insn): Replace with ...
3832 (xtensa_opcode_decode): ... this function, with new format and
3833 slot parameters. Add error handling.
3834 (xtensa_encode_insn): Replace with ...
3835 (xtensa_opcode_encode): ... this function, which does the encoding via
3836 one of the entries in the "encode_fns" array. Add error handling.
3837 (xtensa_opcode_name): Add error handling.
3838 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3839 xtensa_opcode_is_call): New.
3840 (xtensa_num_operands): Replace with ...
3841 (xtensa_opcode_num_operands): ... this function. Add error handling.
3842 (xtensa_opcode_num_stateOperands,
3843 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3844 xtensa_opcode_funcUnit_use, xtensa_operand_name,
3845 xtensa_operand_is_visible): New.
3846 (xtensa_get_operand, xtensa_operand_kind): Delete.
3847 (xtensa_operand_inout): Add error handling and special-case for
3849 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3850 operate on one slot of an instruction. Added error handling.
3851 (xtensa_operand_encode): Handle default operands with no encoding
3852 functions. Check for success by comparing against decoded value.
3854 (xtensa_operand_decode): Handle default operands. Return decoded value
3855 through argument pointer. Add error handling.
3856 (xtensa_operand_is_register, xtensa_operand_regfile,
3857 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3858 (xtensa_operand_isPCRelative): Rename to ...
3859 (xtensa_operand_is_PCrelative): ... this. Add error handling.
3860 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3861 through argument pointer. Add error handling.
3862 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3863 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3864 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3865 xtensa_regfile_shortname, xtensa_regfile_view_parent,
3866 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3867 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3868 xtensa_state_is_exported, xtensa_sysreg_lookup,
3869 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3870 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3871 xtensa_interface_num_bits, xtensa_interface_inout,
3872 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3873 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3874 * xtensa-modules.c: Rewrite to use new data structures.
3875 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3876 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3877 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3878 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3879 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3880 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3881 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3882 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3883 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3884 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3885 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3886 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3887 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3888 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
3889 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
3890 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
3891 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
3892 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
3893 * Makefile.in: Regenerate.
3894 * bfd-in2.h: Likewise.
3895 * libbfd.h: Likewise.
3897 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
3899 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
3900 against the absolute section.
3901 (mips_elf64_write_rela): Likewise.
3903 2004-10-07 Jan Beulich <jbeulich@novell.com>
3905 * elf.c (elf_find_function): Don't generally check for matching
3906 section, just for non-file symbols. Remove redunant comparison
3908 * elf32-arm.h (arm_elf_find_function): Likewise.
3910 2004-10-07 Jeff Baker <jbaker@qnx.com>
3912 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
3913 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
3916 2004-10-04 Roland McGrath <roland@redhat.com>
3918 * hash.c (bfd_hash_set_default_size): Use const for table.
3919 Use size_t instead of int for variable compared to sizeof results.
3921 2004-10-05 Alan Modra <amodra@bigpond.net.au>
3924 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
3926 2004-10-01 Paul Brook <paul@codesourcery.com>
3928 * elf32-arm.h (elf32_arm_fake_sections,
3929 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
3931 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
3933 2004-10-01 Alan Modra <amodra@bigpond.net.au>
3935 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
3937 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
3938 need_relative or need_lsda_relative if we are processing an
3939 offset for a reloc on a FDE initial loc or LSDA field
3941 (_bfd_elf_write_section_eh_frame): Test need_relative and
3942 need_lsda_relative in place of corresponding make_* field
3943 when deciding to use pc-relative encodings.
3945 2004-09-30 Paul Brook <paul@codesourcery.com>
3947 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
3948 target2 relocation type.
3950 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
3953 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
3955 2004-09-30 Paul Brook <paul@codesourcery.com>
3957 * reloc.c: Add BFD_RELOC_ARM_SMI.
3958 * bfd-in2.h: Regenerate.
3961 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3963 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
3964 vma and output offset to address.
3965 * simple.c (simple_save_output_info): Only set output section
3966 and offset for debug sections, or those not already set up by
3968 (bfd_simple_get_relocated_section_contents): Update comment.
3970 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3972 * elf.c (IS_LOADED): Delete.
3973 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
3974 Restore SEC_HAS_CONTENTS test to the one place it was used prior
3977 2004-09-23 Alan Modra <amodra@bigpond.net.au>
3980 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3981 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
3982 redundant assignment of EM_SPARC.
3984 2004-09-22 Brian Ford <ford@vss.fsi.com>
3986 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3987 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3989 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3991 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3993 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3994 (elf_backend_modify_segment_map): Don't define.
3996 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3998 * elf.c (IS_LOADED): Define.
3999 (assign_file_positions_for_segments): Don't round up file offset of
4000 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4001 Delete code handling link script adjustment of lma. Do the adjust
4002 in later code handling similar ajustments. Remove dead code error
4003 check. Warn if section lma would require a negative offset
4004 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4005 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4006 update voff in section loop. Change voff in segment loop to be an
4007 adjustment on top of "off". Set sec->filepos and update "off" later.
4008 Test for loadable sections consistently using IS_LOADED. Similarly,
4009 test for alloc-only sections other than .tbss consistently.
4010 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4011 Tidy PT_NOTE handling. Use %B and %A in error messages.
4012 (assign_file_positions_except_relocs): Use %B in error message.
4014 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4016 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4017 (CONFIG_STATUS_DEPENDENCIES): New.
4018 (Makefile): Removed.
4019 (config.status): Likewise.
4020 * Makefile.in: Regenerated.
4022 2004-09-17 Paul Brook <paul@codesourcery.com>
4024 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4025 (bfd_elf32_arm_process_before_allocation): Update prototype.
4026 * bfd-in2.h: Regenerate.
4027 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4028 (elf32_arm_link_hash_table_create): Set it.
4029 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4030 (bfd_elf32_arm_set_target_relocs): New function.
4031 (arm_real_reloc_type): New function.
4032 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4033 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4034 (elf32_arm_gc_sweep_hook): Ditto.
4035 (elf32_arm_check_relocs): Ditto.
4036 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4037 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4039 (elf32_arm_got_prel): New variable.
4040 (elf32_arm_howto_from_type): New function.
4041 (elf32_arm_info_to_howto): Use it.
4042 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4043 BFD_RELOC_ARM_TARGET2.
4044 * libbfd.h: Regenerate.
4045 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4047 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4049 * ecoff.c: Update u.undef.next refs.
4050 * elf64-ppc.c: Likewise.
4051 * elflink.c: Likewise.
4052 * linker.c: Likewise.
4053 * xcofflink.c: Likewise.
4055 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4056 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4057 fields to indirect struct.
4058 * elf-m10300.c: Update u.weakdef refs.
4059 * elf32-arm.h: Likewise.
4060 * elf32-cris.c: Likewise.
4061 * elf32-frv.c: Likewise.
4062 * elf32-hppa.c: Likewise.
4063 * elf32-i370.c: Likewise.
4064 * elf32-i386.c: Likewise.
4065 * elf32-m32r.c: Likewise.
4066 * elf32-m68k.c: Likewise.
4067 * elf32-ppc.c: Likewise.
4068 * elf32-s390.c: Likewise.
4069 * elf32-sh.c: Likewise.
4070 * elf32-sparc.c: Likewise.
4071 * elf32-vax.c: Likewise.
4072 * elf32-xtensa.c: Likewise.
4073 * elf64-alpha.c: Likewise.
4074 * elf64-hppa.c: Likewise.
4075 * elf64-ppc.c: Likewise.
4076 * elf64-s390.c: Likewise.
4077 * elf64-sh64.c: Likewise.
4078 * elf64-sparc.c: Likewise.
4079 * elf64-x86-64.c: Likewise.
4080 * elfxx-ia64.c: Likewise.
4081 * elfxx-mips.c: Likewise.
4082 * elflink.c: Likewise. Also u.elf_hash_value.
4083 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4085 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4086 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4087 (bfd_elf_gc_record_vtentry): Likewise.
4088 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4090 2004-09-17 Alan Modra <amodra@bigpond.net.au>
4092 * Makefile.am: Run "make dep-am".
4093 * Makefile.in: Regenerate.
4094 * bfd-in2.h: Regenerate.
4095 * po/SRC-POTFILES.in: Regenerate.
4096 * po/bfd.pot: Regenerate.
4098 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4100 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4101 with bitfields. Make "type" and "other" bitfields too.
4102 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4103 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4104 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4105 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4106 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4107 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4108 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4109 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4110 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4111 * elf-m10300.c: Likewise.
4113 * elf32-arm.h: Likewise.
4114 * elf32-cris.c: Likewise.
4115 * elf32-frv.c: Likewise.
4116 * elf32-hppa.c: Likewise.
4117 * elf32-i370.c: Likewise.
4118 * elf32-i386.c: Likewise.
4119 * elf32-m32r.c: Likewise.
4120 * elf32-m68k.c: Likewise.
4121 * elf32-ppc.c: Likewise.
4122 * elf32-s390.c: Likewise.
4123 * elf32-sh-symbian.c: Likewise.
4124 * elf32-sh.c: Likewise.
4125 * elf32-sh64.c: Likewise.
4126 * elf32-sparc.c: Likewise.
4127 * elf32-vax.c: Likewise.
4128 * elf32-xtensa.c: Likewise.
4129 * elf64-alpha.c: Likewise.
4130 * elf64-hppa.c: Likewise.
4131 * elf64-ppc.c: Likewise.
4132 * elf64-s390.c: Likewise.
4133 * elf64-sh64.c: Likewise.
4134 * elf64-sparc.c: Likewise.
4135 * elf64-x86-64.c: Likewise.
4136 * elflink.c: Likewise.
4137 * elfxx-ia64.c: Likewise.
4138 * elfxx-mips.c: Likewise.
4139 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4140 * configure: Regenerate.
4141 * aclocal.m4: Regenerate.
4143 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4145 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4146 around uses of R_ARM_TARGET1.
4147 (elf32_arm_check_relocs): Likewise.
4149 2004-09-13 Paul Brook <paul@codesourcery.com>
4151 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4153 * bfd-in2.h: Regenerate.
4154 * libbfd.h: Regenerate.
4155 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4156 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4157 (bfd_elf32_arm_process_before_allocation): Ditto.
4158 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4159 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4160 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4163 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4165 * hpux-core.c (thread_section_p): New function.
4166 (hpux_core_core_file_p): Fix computation of offset in call
4167 to bfd_seek. Create a ".reg" section from an arbitrary
4168 ".reg/<id>" section if none was created after having read
4171 2004-09-11 Andreas Schwab <schwab@suse.de>
4173 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4174 * aclocal.m4: Rebuild.
4175 * configure: Rebuild.
4177 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4179 * section.c (bfd_sections_find_if): Fix parameter name in
4180 comment to match code.
4182 2004-09-10 Alan Modra <amodra@bigpond.net.au>
4184 * elf.c (assign_file_positions_except_relocs): Assign relocs
4185 stored in a bfd section.
4187 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
4189 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4190 h->gotplt_refcount to 0, not -1.
4192 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
4194 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4195 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4197 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4198 handle symbol visibility here.
4200 2004-09-07 Alan Modra <amodra@bigpond.net.au>
4202 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4203 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4205 (ppc_stub_name): Remove trailing "+0" on stub name.
4206 (create_linkage_sections): Create relocations for
4207 branch lookup table when --emit-relocs as well as when --shared.
4208 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4209 relbrlt test. For --emit-stub-syms, always output a sym even when
4210 one already exists on a plt call stub. Put stub type in the stub
4212 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4214 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4215 reloc_count in stub sections. Adjust relbrlt test.
4216 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4217 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4218 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4219 for relocs against discarded symbols. Fix comments.
4221 2004-09-06 Mark Mitchell <mark@codesourcery.com>
4223 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4224 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4226 (map_sections_to_segments): ... here. Use it. Assign a file
4227 position to the .dynamic section if it is not loadable, but part
4228 of the PT_DYNAMIC segment.
4229 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4230 offsets, not VMAs, for the BPABI. Do not fill in the header in
4231 the .got.plt section for the BPABI.
4232 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4234 (elf_backend_want_got_plt): Define to zero for Symbian OS.
4236 2004-09-06 Nick Clifton <nickc@redhat.com>
4238 * elflink.c (elf_link_add_object_symbols): Set the error code to
4239 bfd_error_wrong_format when the input format does not match the
4242 2004-09-06 Alan Modra <amodra@bigpond.net.au>
4244 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4245 (ppc64_elf_check_directives): ..here.
4246 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4247 before accessing ppc64_elf_tdata.
4248 (ppc64_elf_finish_dynamic_sections): And here too.
4250 2004-09-04 Alan Modra <amodra@bigpond.net.au>
4252 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4254 2004-09-03 Mark Mitchell <mark@codesourcery.com>
4256 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4257 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4258 (bfd_elf32_littlearm_symbian_vec): Likewise.
4259 * configure: Regenerated.
4260 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4261 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4262 (PLT_ENTRY_SIZE): Likewise.
4263 (bfd_vma_elf32_arm_symbian_plt_entry): New
4265 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4267 (create_got_section): Don't create sections when generating BPABI
4269 (elf32_arm_create_dynamic_sections): Tidy.
4270 (elf32_arm_link_hash_table_create): Set plt_header_size,
4271 plt_entry_size, and symbian_p.
4272 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4273 generating BPABI objects.
4274 (allocate_dynrelocs): Use htab->plt_header_size, not
4275 PLT_HEADER_SIZE. Do not add to .got.plt when
4276 generating BPABI objects.
4277 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4278 * elfarm-nabi.c: Add SymbianOS target vectors.
4279 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4280 (_bfd_elf_link_create_dynamic_sections): Likewise.
4281 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4282 (elfNN_bed): Use it.
4283 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4284 (bfd_elf32_littlearm_symbian_vec): Likewise.
4285 (_bfd_target_vector): Add them.
4287 2004-09-03 Nick Clifton <nickc@redhat.com>
4290 * coffcode.h (handle_COMDAT): Replace abort with an warning
4291 message and allow the scan to continue.
4293 2004-09-02 Alan Modra <amodra@bigpond.net.au>
4295 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4296 in when reading relocs, not our sorted syms. Remove unnecessary
4299 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4301 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4303 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4305 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4306 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4307 replace uses of *_alias with *_noncanonical.
4308 * aclocal.m4: Rebuild with aclocal 1.4p6.
4309 * Makefile.in: Rebuild with automake 1.4p6.
4310 * doc/Makefile.in: Rebuild with automake 1.4p6.
4311 * configure.in: Autoupdate with autoupdate 2.59.
4312 * config.in: Regenerate with autoheader 2.59.
4313 * configure: Regnerate with autoconf 2.59.
4315 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4317 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4318 symbol pointer arrays before modifying.
4320 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4322 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
4323 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4324 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4325 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
4326 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4327 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4328 Use both symbol tables on non-relocatable objects. Use a common
4329 error exit. Fix "mid" warning.
4330 * libbfd.h: Regenerate.
4331 * bfd-in2.h: Regenerate.
4333 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4335 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4337 (struct sfpr_def_parms): Save some space.
4338 (sfpr_define): Here too.
4340 * elf64-ppc.c (compare_symbols): Put section syms first.
4341 (sym_exists_at): New function.
4342 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4343 points only for relocatable files. Use .opd section contents
4344 otherwise. Generally clean up the code.
4346 2004-08-27 Alan Modra <amodra@bigpond.net.au>
4348 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4349 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4350 (struct sfpr_def_parms): New.
4351 (sfpr_define): New function.
4352 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4353 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4354 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4355 (savefpr1_tail, restfpr1_tail): New functions.
4356 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4357 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4358 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4359 code. Define all ABI mandated _save and _rest functions.
4361 2004-08-26 Paul Brook <paul@codesourcery.com>
4363 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
4365 2004-08-26 Alan Modra <amodra@bigpond.net.au>
4367 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4370 2004-08-26 Alan Modra <amodra@bigpond.net.au>
4372 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4373 that pcrel correction is applied for R_386_PC32.
4375 2004-08-25 Alan Modra <amodra@bigpond.net.au>
4377 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4378 for R_386_32 and R_386_PC32 relocs against symbols defined in
4381 2004-08-25 Dmitry Diky <diwil@spec.ru>
4383 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4384 Add new relocations.
4385 * bfd-in2.h: Regenerate.
4386 * libbfd.h: Regenerate.
4387 * elf32-msp430.c: Clean-up code.
4388 (elf_msp430_howto_table): Add new relocation entries.
4389 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4390 (msp430_elf_relax_section): New function.
4391 (msp430_elf_relax_delete_bytes): New function.
4392 (msp430_elf_symbol_address_p): New function.
4394 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4396 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4397 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4399 2004-08-20 Daniel Jacobowitz <dan@debian.org>
4401 * elflink.c (_bfd_elf_section_already_linked): Handle
4402 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4404 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4406 * config.bfd (arm*-*-symbianelf*): New target.
4407 (arm*-*-eabi*): Likewise.
4409 2004-08-19 Alan Modra <amodra@bigpond.net.au>
4411 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4412 "struct ppc_link_hash_entry *".
4413 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4414 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4416 2004-08-19 Jakub Jelinek <jakub@redhat.com>
4418 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4419 entries (where fd_aux overlaps next entry's fd_func).
4420 Add non_overlapping argument, use it.
4421 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4422 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4423 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4424 as indexes into opd_sym_map/opd_adjust array.
4425 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4427 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4429 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4430 if we can look up their function descriptor in a regular file.
4432 2004-08-18 Nick Clifton <nickc@redhat.com>
4435 * cofflink.c (coff_link_add_symbols): Check that the comdat
4436 pointer in the coff_section_data structure has been initialised
4439 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4442 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4443 changing bfd_link_hash_undefined to bfd_link_hash_new.
4445 2004-08-17 Jakub Jelinek <jakub@redhat.com>
4447 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4449 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4450 (synthetic_opd, synthetic_relocatable): New variables.
4451 (compare_symbols, compare_relocs): New helper routines.
4452 (ppc64_elf_get_synthetic_symtab): New function.
4453 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4455 * bfd-in2.h: Regenerated.
4456 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4457 to relsyms. Return 0 if abfd is relocatable.
4459 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4461 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4463 2004-08-17 Nick Clifton <nickc@redhat.com>
4465 * (is_arm_mapping_symbol_name): New function - return true
4466 when a symbol name matches the requirements for an ARM mapping
4468 (arm_elf_find_function): New function based on
4469 elf_find_function in elf.c but skipping ARM mapping symbols
4470 and including thumb function symbols.
4471 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4472 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4474 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4476 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4477 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4478 (ppc64_elf_brtaken_reloc): Here too.
4480 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4482 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4484 (ppc64_elf_check_directives): Check that we have the right hash
4485 table before proceeding.
4487 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4489 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4490 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4491 the sections that will be discarded.
4493 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4495 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4497 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4499 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4500 free space available.
4502 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4504 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
4505 occurrences with bfd_byte * thoughout file.
4507 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4508 (xcoff_write_armap_big): Likewise.
4509 (xcoff_write_archive_contents_old): Likewise.
4510 (xcoff_write_archive_contents_big): Likewise.
4512 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4514 2004-08-13 Nick Clifton <nickc@redhat.com>
4516 * elf32-arm.h: Convert to ISO C90.
4518 2004-08-13 Alan Modra <amodra@bigpond.net.au>
4521 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4524 2004-08-13 Alan Modra <amodra@bigpond.net.au>
4526 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4527 (bfd_archive_filename, bfd_get_section_ident): Delete.
4528 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4529 bfd_archive_filename.
4530 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4531 to warn about symbols in discarded sections. Use _bfd_error_handler.
4532 * aout-adobe.c (aout_adobe_callback): See below.
4533 * aout-cris.c (swap_ext_reloc_in): ..
4534 * coff-arm.c (find_thumb_glue, find_arm_glue,
4535 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4536 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4537 coff_arm_copy_private_bfd_data): ..
4538 * coff-i860.c (i860_reloc_processing): ..
4539 * coff-mcore.c (mcore_coff_unsupported_reloc,
4540 coff_mcore_relocate_section): ..
4541 * coff-ppc.c (coff_ppc_relocate_section): ..
4542 * coff-rs6000.c (xcoff_create_csect_from_smclas
4543 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4544 sh_swap_insns, sh_relocate_section): ..
4545 * coff-tic54x.c (tic54x_reloc_processing): ..
4546 * coff-tic80.c (coff_tic80_relocate_section): ..
4547 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4548 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4549 coff_slurp_symbol_table, coff_classify_symbol,
4550 coff_slurp_reloc_table): ..
4551 * coffgen.c (_bfd_coff_read_string_table): ..
4552 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4553 _bfd_coff_generic_relocate_section): ..
4554 * cpu-arm.c (bfd_arm_merge_machines): ..
4555 * cpu-sh.c (sh_merge_bfd_arch): ..
4556 * elf-hppa.h (elf_hppa_relocate_section): ..
4557 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4558 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4559 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4560 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4561 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4562 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4563 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4564 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4565 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4566 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4567 cris_elf_merge_private_bfd_data
4568 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4569 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4570 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4571 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4572 elf32_hppa_relocate_section): ..
4573 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4574 i370_elf_check_relocs, i370_elf_relocate_section): ..
4575 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4576 elf_i386_relocate_section): ..
4577 * elf32-m32r.c (m32r_elf_relocate_section,
4578 m32r_elf_merge_private_bfd_data): ..
4579 * elf32-m68hc1x.c (m68hc12_add_stub,
4580 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4581 * elf32-m68k.c (elf_m68k_relocate_section): ..
4582 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4583 mcore_elf_relocate_section): ..
4584 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4585 ppc_elf_check_relocs, ppc_elf_relocate_section,
4586 ppc_elf_begin_write_processing): ..
4587 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4588 elf_s390_relocate_section): ..
4589 * elf32-sh-symbian.c (sh_symbian_import_as,
4590 sh_symbian_process_embedded_commands,
4591 sh_symbian_relocate_section): ..
4592 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4593 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4594 sh_elf_merge_private_data): ..
4595 * elf32-sparc.c (elf32_sparc_check_relocs,
4596 elf32_sparc_relocate_section,
4597 elf32_sparc_merge_private_bfd_data): ..
4598 * elf32-v850.c (v850_elf_check_relocs,
4599 v850_elf_merge_private_bfd_data): ..
4600 * elf32-xtensa.c (elf_xtensa_check_relocs,
4601 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4602 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4603 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4604 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4605 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4606 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4607 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4608 ppc64_elf_relocate_section): ..
4609 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4610 elf_s390_relocate_section): ..
4611 * elf64-sh64.c (sh_elf64_relocate_section): ..
4612 * elf64-sparc.c (sparc64_elf_check_relocs,
4613 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4614 sparc64_elf_merge_private_bfd_data): ..
4615 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4616 elf64_x86_64_relocate_section): ..
4617 * elflink.c (_bfd_elf_add_default_symbol,
4618 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4619 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4620 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4621 elf_get_linked_section_vma, elf_fixup_link_order,
4622 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4623 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4624 * elfxx-ia64.c (elfNN_ia64_relax_section,
4625 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4626 * elfxx-mips.c (mips_elf_perform_relocation,
4627 _bfd_mips_elf_check_relocs,
4628 _bfd_mips_elf_merge_private_bfd_data): ..
4629 * ieee.c (ieee_slurp_external_symbols): ..
4630 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4631 * libbfd.c (_bfd_generic_verify_endian_match): ..
4632 * linker.c (_bfd_generic_link_add_one_symbol,
4633 _bfd_generic_section_already_linked): ..
4634 * pdp11.c (translate_to_native_sym_flags): ..
4635 * pe-mips.c (coff_pe_mips_relocate_section): ..
4636 * peicode.h (pe_ILF_build_a_bfd): ..
4637 * srec.c (srec_bad_byte): ..
4638 * stabs.c (_bfd_link_section_stabs): ..
4639 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4640 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4641 with corresponding %B and %A in _bfd_error_handler format string.
4642 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4643 calls to use %A and %B. Fix "against symbol .. from section" and
4644 similar error messages. Combine multiple _bfd_error_handler calls
4645 where they were separated due to bfd_archive_filename deficiencies.
4646 * bfd-in2.h: Regenerate.
4648 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4650 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4653 2004-08-10 Alan Modra <amodra@bigpond.net.au>
4655 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4656 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4657 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4659 (link_hash_newfunc): Init was_undefined.
4660 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4661 Use undefweak instead.
4662 (ppc64_elf_check_directives): Fix undefs chain.
4663 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4665 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4666 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4667 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4669 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4671 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4672 error, test input_section flags rather than sec.
4674 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4676 * elf-bfd.h (struct elf_backend_data): Add
4677 elf_backend_archive_symbol_lookup.
4678 (_bfd_elf_archive_symbol_lookup): Declare.
4679 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4680 (elf_link_add_archive_symbols): ..extracted from here. Call the
4682 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4683 (elfNN_bed): Init new field.
4684 * elf64-ppc.c (elf_backend_check_directives): Define.
4685 (elf_backend_archive_symbol_lookup): Define.
4686 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4687 a ppc_link_hash_entry pointer.
4689 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4690 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4691 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4692 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4693 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4694 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4695 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4698 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4700 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4701 (ppc64_elf_add_symbol_hook): Test for NULL section.
4702 (get_sym_h): Formatting.
4703 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4706 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4707 long branch stubs with code handling plt and r2off branch stubs.
4709 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4711 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4712 * elflink.c (elf_link_input_bfd): Formatting.
4713 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4715 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4716 (link_hash_newfunc): Don't set it.
4717 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4718 (ppc64_elf_mark_entry_syms): Delete.
4719 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4720 sections. Use get_opd_info.
4721 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4723 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4725 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4727 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4728 (func_desc_adjust): Don't set have_undefweak.
4729 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4730 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4732 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4733 "struct ppc_link_hash_entry *". Adjust all references.
4734 (ppc64_elf_hide_symbol): Correct a comment.
4736 * elf64-ppc.c (get_opd_info): New function.
4737 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4738 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4739 before calling get_fdh. Test fdh rather than h before dereferencing
4740 fdh. Mark removed symbols in opd_adjust.
4741 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4742 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4744 (ppc64_elf_output_symbol_hook): Likewise.
4746 2004-08-06 Paul Brook <paul@codesourcery.com>
4748 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4749 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4750 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4751 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4752 and BFD_RELOC_ARM_SBREL32.
4753 * bfd-in2.h, bbfd.h: Regenerate.
4755 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4757 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4758 the dynamic link symbol actually in use.
4760 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
4762 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4764 2004-07-31 Joel Brobecker <brobecker@gnat.com>
4765 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4767 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4768 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4770 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
4771 Nick Clifton <nickc@redhat.com>
4774 * bfd.c (_bfd_default_error_handler): Make it global.
4776 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4778 * elf.c (assign_section_numbers): Cope gracefully with sections
4779 which have SHF_LINK_ORDER set but no sh_link set up.
4780 * elflink.c (elf_get_linked_section_vma): Likewise.
4782 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4785 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4786 Set it to _bfd_default_error_handler.
4787 (elfNN_bed): Add elf_backend_link_order_error_handler.
4789 * libbfd-in.h (_bfd_default_error_handler): New.
4791 * libbfd.h: Regenerated.
4793 2004-07-30 Jakub Jelinek <jakub@redhat.com>
4795 * archures.c (bfd_mach_sparc_64bit_p): Define.
4796 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4797 * bfd-in2.h: Rebuilt.
4799 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
4801 Introduce SH2a support.
4802 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4803 * archures.c (bfd_mach_sh2a_nofpu): New.
4804 * bfd-in2.h: Rebuilt.
4805 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4806 (arch_info_struct): Add sh2a_nofpu.
4807 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4808 2003-12-29 DJ Delorie <dj@redhat.com>
4809 * reloc.c: Add relocs for sh2a.
4810 * bfd-in2.h: Regenerate.
4811 * libbfd.hh: Regenerate.
4812 2003-12-01 Michael Snyder <msnyder@redhat.com>
4813 * archures.c (bfd_mach_sh2a): New.
4814 * bfd-in2.h: Rebuilt.
4815 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4817 (arch_info_struct): Add sh2a.
4818 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4820 2004-07-28 Nick Clifton <nickc@redhat.com>
4821 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4824 * som.c (setup_sections): Improve estimation of space sizes in
4825 relocatable objects.
4827 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
4828 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4829 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4831 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4832 * configure: Regenerate.
4833 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4834 case that accepts OSABI=NetBSD and OSABI=SysV.
4835 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4836 the base of .got or .data (if .got does not exist).
4837 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4839 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4840 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4841 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4842 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4844 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
4847 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4848 (elf_sec_group): Defined.
4849 (bfd_elf_match_symbols_in_sections): New prototype.
4850 (_bfd_elf_setup_group_pointers): Likewise.
4852 * elf.c (bfd_elf_discard_group): Abort.
4853 (bfd_elf_set_group_contents): Also include relocation sections.
4854 Remove zero-fill for ld -r.
4855 (_bfd_elf_setup_group_pointers): New function.
4856 (elf_sort_elf_symbol): Likewise.
4857 (elf_sym_name_compare): Likewise.
4858 (bfd_elf_match_symbols_in_sections): Likewise.
4860 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4862 * elflink.c (match_group_member): New.
4863 (elf_link_input_bfd): Check group member for discarded section.
4864 (try_match_symbols_in_sections): New function.
4865 (already_linked): Likewise.
4866 (_bfd_elf_section_already_linked): Support mixing comdat group
4867 and linkonce section.
4869 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4870 * linker.c (bfd_section_already_linked_table_traverse): New.
4872 * libbfd.h: Regenerated.
4874 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
4876 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4877 BFD_RELOC_CRX_SWITCH32.
4878 * bfd-in2.h: Regenerate.
4879 * libbfd.h: Regenerate.
4880 * elf32-crx.c: Support relocation/relaxation of
4881 BFD_RELOC_CRX_SWITCH* types.
4883 2004-07-27 Alan Modra <amodra@bigpond.net.au>
4885 * elf64-ppc.c: Correct "Linker stubs" comment.
4887 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
4889 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
4891 (elf_linked_to_section): New.
4893 * elf.c (assign_section_numbers): Set up sh_link for
4896 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
4897 to sh_link for SHT_IA_64_UNWIND sections.
4899 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4901 * elflink.c (elf_fixup_link_order): Add _() to error message.
4903 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4905 * elflink.c (elf_fixup_link_order): Issue a warning and flag
4908 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
4910 * aout-adobe.c (aout_32_section_already_linked): Defined.
4911 * aout-target.h (MY_section_already_linked): Likewise.
4912 * aout-tic30.c (MY_section_already_linked): Likewise.
4913 * binary.c (binary_section_already_linked): Likewise.
4914 * bout.c (b_out_section_already_linked): Likewise.
4915 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
4916 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
4917 * coffcode.h (coff_section_already_linked): Likewise.
4918 * i386msdos.c (msdos_section_already_linked): Likewise.
4919 * i386os9k.c (os9k_section_already_linked): Likewise.
4920 * ieee.c (ieee_section_already_linked): Likewise.
4921 * ihex.c (ihex_section_already_linked): Likewise.
4922 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
4923 * mmo.c (mmo_section_already_linked): Likewise.
4924 * nlm-target.h (nlm_section_already_linked): Likewise.
4925 * oasys.c (oasys_section_already_linked): Likewise.
4926 * pef.c (bfd_pef_section_already_linked): Likewise.
4927 * ppcboot.c (ppcboot_section_already_linked): Likewise.
4928 * som.c (som_bfd_discard_group): Likewise.
4929 * srec.c (srec_section_already_linked): Likewise.
4930 * tekhex.c (tekhex_section_already_linked): Likewise.
4931 * versados.c (versados_section_already_linked): Likewise.
4932 * vms.c (vms_section_already_linked): Likewise.
4933 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
4934 * xsym.c (bfd_sym_section_already_linked): Likewise.
4936 * bfd-in.h (bfd_section_already_linked_table_init): New.
4937 (bfd_section_already_linked_table_free): Likewise.
4939 * coff-rs6000.c (rs6000coff_vec): Add
4940 _bfd_generic_section_already_linked.
4941 (pmac_xcoff_vec): Likewise.
4942 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4943 (aix5coff64_vec): Likewise.
4945 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
4946 * elflink.c (_bfd_elf_section_already_linked): New function.
4948 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
4950 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
4951 (_bfd_generic_section_already_linked): New.
4952 (bfd_section_already_linked_hash_entry): Likewise.
4953 (bfd_section_already_linked): Likewise.
4954 (bfd_section_already_linked_table_lookup): Likewise.
4955 (bfd_section_already_linked_table_insert): Likewise.
4957 * linker.c (bfd_section_already_linked): New.
4958 (_bfd_section_already_linked_table): Likewise.
4959 (bfd_section_already_linked_table_lookup): Likewise.
4960 (bfd_section_already_linked_table_insert): Likewise.
4961 (already_linked_newfunc): Likewise.
4962 (bfd_section_already_linked_table_init): Likewise.
4963 (bfd_section_already_linked_table_free): Likewise.
4964 (_bfd_generic_section_already_linked): Likewise.
4966 * section.c (bfd_section): Remove comdat.
4967 (bfd_comdat_info): Moved to ...
4968 * bfd-in.h (coff_comdat_info): Here.
4969 (bfd_coff_get_comdat_section): New.
4970 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
4971 * libcoff-in.h (coff_section_tdata): Add comdat.
4972 * coffcode.h (handle_COMDAT): Updated.
4973 * cofflink.c (coff_link_add_symbols): Likewise.
4974 * ecoff.c (bfd_debug_section): Likewise.
4976 * targets.c (bfd_target): Add _section_already_linked.
4977 (BFD_JUMP_TABLE_LINK): Updated.
4979 * bfd-in2.h: Regenerated.
4980 * libbfd.h: Likewise.
4981 * libcoff.h: Likewise.
4983 2003-07-21 Paul Brook <paul@codesourcery.com>
4985 * elflink.c (elf_get_linked_section_vma, compare_link_order,
4986 elf_fixup_link_order): New functions.
4987 (bfd_elf_final_link): Call elf_fixup_link_order.
4989 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
4991 * elf-bfd.h (ELF_COMMON_DEF_P): New.
4992 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4994 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4995 _bfd_elf_symbol_refs_local_p.
4996 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4999 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5001 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5003 (bfd_elf_get_dyn_lib_class): New prototype.
5004 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5006 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5007 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5008 entry is needed. Issue an error if a DT_NEEDED entry is needed
5009 for a file marked DYN_NO_NEEDED.
5010 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5013 * bfd-in2.h: Regenerated.
5015 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5017 * elflink.c (elf_section_complain_discarded): Don't complain in
5020 2004-07-10 James E Wilson <wilson@specifixinc.com>
5022 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5023 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5024 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5025 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5027 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5028 bfd_put_64 to bfd_putl64.
5029 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
5031 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5034 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5035 .init/.fini sections when trying to relax it.
5037 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5039 * elf.c (assign_file_positions_for_segments): Make sure the
5040 .dynamic section is the first section in the PT_DYNAMIC segment.
5042 2004-07-09 Nick Clifton <nickc@redhat.com>
5044 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5045 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5046 sh_elf_get_flags_from_mach functions so that they do not conflict
5047 when this target is built with other sh-elf targets.
5048 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5049 suppression of this function.
5050 (sh_elf_find_flags): Likewise.
5052 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5054 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5055 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5056 (BFD32_BACKENDS): Add elf32-crx.lo.
5057 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5058 (cpu-crx.lo): New target.
5059 (elf32-crx.lo): New target.
5060 * Makefile.in: Regenerate.
5061 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5062 (bfd_archures_list): Add bfd_crx_arch.
5063 * bfd-in2.h: Regenerate.
5064 * config.bfd: Handle crx-*-elf*, crx*.
5065 * configure.in: Handle bfd_elf32_crx_vec.
5066 * configure: Regenerate.
5067 * cpu-crx.c: New file.
5068 * elf32-crx.c: Likewise.
5069 * libbfd.h: Regenerate.
5070 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5071 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5072 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5073 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5074 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5075 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5076 * targets.c (bfd_elf32_crx_vec): Declare.
5077 (bfd_target_vector): Add bfd_elf32_crx_vec.
5079 2004-07-06 Nick Clifton <nickc@redhat.com>
5081 * config.bfd: Add sh-symbian-elf target.
5082 * configure.in: Add bfd_elf32_shl_symbian_vec.
5083 * configure: Regenerate.
5084 * elf-bfd.h (struct elf_backend_data): Add new field
5086 * elflink.c (elf_link_add_object_symbols): Invoke the
5087 check_directives function, if defined.
5088 * elfxx-target.h: Provide a default, NULL definition for
5090 * targets.c: Add bfd_elf32_shl_symbian_vec.
5091 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
5093 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
5094 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
5095 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
5096 not already been defined.
5097 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5098 * sh-symbian.c: New file. Provide functions to support the
5099 * sh-symbian-elf target.
5100 * Makefile.am: Add elf32-sh-symbian.c
5101 * Makefile.in: Regenerate.
5103 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5105 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5106 * Makefile.am: Ran make dep-am.
5107 * Makefile.in: Ran make dep-in.
5109 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5111 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5114 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5116 * config.bfd: Add want64 to configuration target s390-*-linux*.
5118 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5120 * bfd.c (bfd_get_section_ident): New.
5122 * elflink.c (elf_link_read_relocs_from_section): Call
5123 bfd_get_section_ident to identify the section when reporting
5125 (_bfd_elf_link_output_relocs): Likewise.
5126 (elf_link_output_extsym): Likewise.
5127 (elf_link_input_bfd): Likewise.
5128 (bfd_elf_gc_record_vtinherit): Likewise.
5130 * bfd-in2.h: Regenerated.
5132 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5133 Nick Clifton <nickc@redhat.com>
5136 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5137 of section symbols to mips_elf_sort_hash_table ().
5139 2004-07-01 Alan Modra <amodra@bigpond.net.au>
5141 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5143 (elf_section_complain_discarded): New function. Handle
5144 .gcc_except_table too.
5145 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5146 in discarded sections.
5147 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5149 2004-06-30 James E Wilson <wilson@specifixinc.com>
5151 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5152 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5154 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5157 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5158 local references to discarded sections and report their
5161 2004-06-30 Alan Modra <amodra@bigpond.net.au>
5163 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5164 sec_info_type, test section name instead.
5166 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5169 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5170 in .init/.fini sections.
5172 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5174 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5175 bfd_get_section_limit.
5177 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5179 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5180 output section size.
5182 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5184 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5186 (mmix_elf_perform_relocation): Adjust for above change.
5187 (mmix_elf_relocate_section): Likewise.
5188 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5189 (mmix_elf_get_section_contents): Delete.
5190 (bfd_elf64_get_section_contents): Delete.
5191 (mmix_elf_relocate_section): Zero stub area.
5192 * linker.c (default_indirect_link_order): Alloc max of section size
5194 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5195 * section.c (bfd_malloc_and_get_section): Likewise.
5196 (struct bfd_section): Update rawsize comment.
5197 * bfd-in2.h: Regenerate.
5199 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5201 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5203 * bfd-in.h (bfd_get_section_limit): Define.
5204 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
5205 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5206 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5207 * coff-arm.c (coff_arm_relocate_section): Likewise.
5208 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5209 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5210 (bfd_ns32k_final_link_relocate): Likewise.
5211 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5212 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
5213 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
5214 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
5215 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
5216 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5217 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5218 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5219 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5220 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5221 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5222 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5223 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5224 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5225 * elf32-v850.c (v850_elf_reloc): Likewise.
5226 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5227 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5228 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5229 * elf64-mips.c (mips_elf64_gprel32_reloc)
5230 (mips16_gprel_reloc): Likewise.
5231 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5232 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5233 * elf64-sparc.c (init_insn_reloc): Likewise.
5234 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5235 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5236 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
5237 (_bfd_mips_elf_generic_reloc): Likewise.
5238 * bfd-in2.h: Regenerate.
5240 2004-06-28 Alan Modra <amodra@bigpond.net.au>
5242 * bfd-in.h (struct stab_info): Move from stabs.c.
5243 * stabs.c (struct stab_link_includes_table): Delete.
5244 (stab_link_includes_lookup): Delete.
5245 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5246 level of indirection from sinfo parm.
5247 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5248 stabstr section. Adjust hash table accesses.
5249 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5250 alloc. Adjust stab_info test.
5251 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5252 (_bfd_coff_final_link): Adjust stab_info test.
5253 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5254 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5256 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5257 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5258 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5259 stabstr section. Adjust stab_info test.
5260 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5261 (_bfd_write_stab_strings): Adjust prototypes.
5262 * libbfd.h: Regenerate.
5263 * libcoff.h: Regenerate.
5264 * bfd-in2.h: Regenerate.
5266 2004-06-27 Mark Kettenis <kettenis@gnu.org>
5268 From Miod Vallat <miod@online.fr>:
5269 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5271 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
5273 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5274 (struct elf32_mn10300_link_hash_entry): Remove
5275 pcrel_relocs_copied.
5276 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5277 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5278 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5279 and gotoff relocations if the symbol doesn't bind locally. Use
5280 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5281 relocation for PCREL32.
5282 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5283 to test whether a symbol binds locally.
5284 (elf32_mn10300_link_hash_newfunc): Don't initialize
5285 pcrel_relocs_copied.
5286 (_bfd_mn10300_elf_discard_copies): Delete.
5287 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5289 2004-06-26 Mark Kettenis <kettenis@gnu.org>
5291 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5293 2004-06-25 Joel Brobecker <brobecker@gnat.com>
5295 * som.c (som_set_reloc_info): Correct small typo.
5297 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5299 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5300 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5301 (m32r_elf_gcsweep_hook): Likewise.
5302 (m32r_elf_check_relocs): Likewise.
5303 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5304 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5305 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5306 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
5307 * bfd-in2.h: Regenerated.
5308 * libbfd.h: Regenerated.
5310 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5312 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5314 (elf64_x86_64_relocate_section): Issue an error for
5315 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5316 against global symbols when building shared library.
5318 2004-06-24 Alan Modra <amodra@bigpond.net.au>
5320 * section.c (struct sec): Rename "_cooked_size" to "size".
5321 Rename "_raw_size" to "rawsize".
5322 (STD_SECTION): Adjust comments.
5323 (bfd_set_section_size, bfd_get_section_contents): Use size.
5324 (bfd_malloc_and_get_section): New function.
5325 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5326 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5327 Correctly free reloc and contents memory.
5328 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5329 and fake CIE now that we can shink section size to zero.
5330 (_bfd_elf_write_section_eh_frame): Likewise..
5331 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5332 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5333 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5334 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5335 unneeded indirection.
5336 * elf.c (_bfd_elf_section_offset): .. and update call.
5337 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5338 * libbfd.h: Regenerate.
5339 * bfd-in2.h: Regenerate.
5341 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5342 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5343 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5344 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5345 Similarly use "rawsize", if non-zero, in reloc functions to validate
5346 reloc addresses. Use new bfd_malloc_and_get_section in most places
5347 where bfd_get_section_contents was called. Expand all occurrences of
5348 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5349 grok_prstatus and similar functions to "size".
5350 * aix386-core.c (aix386_core_file_p): ..
5351 * aix5ppc-core.c (xcoff64_core_p): ..
5352 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5353 aout_adobe_set_section_contents): ..
5354 * aout-target.h (callback): ..
5355 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5356 MY_bfd_final_link): ..
5357 * aoutf1.h (sunos4_core_file_p): ..
5358 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5359 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5360 final_link, aout_link_input_section): ..
5361 * binary.c (binary_object_p, binary_canonicalize_symtab,
5362 binary_set_section_contents): ..
5363 * bout.c (b_out_callback, b_out_write_object_contents,
5364 b_out_set_section_contents, b_out_bfd_relax_section,
5365 b_out_bfd_get_relocated_section_contents): ..
5366 * cisco-core.c (cisco_core_file_validate): ..
5367 * coff-alpha.c (alpha_ecoff_object_p,
5368 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5369 * coff-arm.c (coff_arm_relocate_section,
5370 bfd_arm_allocate_interworking_sections): ..
5371 * coff-h8300.c (h8300_reloc16_extra_cases,
5372 h8300_bfd_link_add_symbols): ..
5373 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5374 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5375 ppc_bfd_coff_final_link): ..
5376 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5377 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5378 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5379 * coff64-rs6000.c (xcoff64_write_object_contents,
5380 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5381 * coffcode.h (coff_compute_section_file_positions,
5382 coff_write_object_contents): ..
5383 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5384 coff_section_symbol, build_debug_section): ..
5385 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5386 process_embedded_commands, _bfd_coff_link_input_bfd,
5387 _bfd_coff_write_global_sym): ..
5388 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5389 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5390 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5391 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5392 _bfd_dwarf2_find_nearest_line): ..
5393 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5394 ecoff_compute_section_file_positions,
5395 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5396 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5397 _bfd_elf_discard_section_eh_frame_hdr,
5398 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5399 _bfd_elf_write_section_eh_frame,
5400 _bfd_elf_write_section_eh_frame_hdr): ..
5401 * elf-hppa.h (elf_hppa_sort_unwind): ..
5402 * elf-m10200.c (mn10200_elf_relax_section,
5403 mn10200_elf_relax_delete_bytes,
5404 mn10200_elf_get_relocated_section_contents): ..
5405 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5406 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5407 mn10300_elf_relax_delete_bytes,
5408 mn10300_elf_get_relocated_section_contents,
5409 _bfd_mn10300_elf_adjust_dynamic_symbol,
5410 _bfd_mn10300_elf_discard_copies,
5411 _bfd_mn10300_elf_size_dynamic_sections,
5412 _bfd_mn10300_elf_finish_dynamic_sections): ..
5413 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5414 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5415 bfd_elf_set_group_contents, map_sections_to_segments,
5416 elf_sort_sections, assign_file_positions_for_segments,
5417 SECTION_SIZE, copy_private_bfd_data,
5418 _bfd_elf_get_dynamic_reloc_upper_bound,
5419 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5420 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5421 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5422 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5423 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5424 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5425 bfd_elf32_arm_process_before_allocation,
5426 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5427 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5428 elf32_arm_write_section): ..
5429 * elf32-cris.c (cris_elf_grok_prstatus,
5430 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5431 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5432 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5433 elf_cris_discard_excess_dso_dynamics,
5434 elf_cris_discard_excess_program_dynamics): ..
5435 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5436 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5437 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5438 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5439 elf32_frvfdpic_size_dynamic_sections,
5440 elf32_frvfdpic_modify_segment_map,
5441 elf32_frvfdpic_finish_dynamic_sections): ..
5442 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5443 elf32_h8_get_relocated_section_contents): ..
5444 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5445 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5446 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5447 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5448 elf32_hppa_finish_dynamic_sections): ..
5449 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5450 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5451 i370_elf_finish_dynamic_sections): ..
5452 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5453 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5454 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5455 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5456 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5457 * elf32-ip2k.c (ip2k_is_switch_table_128,
5458 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5459 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5460 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5461 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5462 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5463 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5464 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5465 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5466 m32r_elf_get_relocated_section_contents): ..
5467 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5468 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5469 m68hc11_elf_relax_delete_bytes): ..
5470 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5471 m68hc12_elf_size_one_stub): ..
5472 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5473 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5474 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5475 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5476 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5477 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5478 elf32_mips_grok_prstatus): ..
5479 * elf32-or32.c (or32_elf_consth_reloc): ..
5480 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5481 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5482 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5483 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5484 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5485 ppc_elf_final_write_processing): ..
5486 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5487 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5488 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5489 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5490 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5491 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5492 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5493 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5494 * elf32-sh64-com.c (sh64_address_in_cranges,
5495 sh64_get_contents_type): ..
5496 * elf32-sh64.c (sh64_find_section_for_address,
5497 sh64_elf_final_write_processing): ..
5498 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5499 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5500 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5501 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5502 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5503 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5504 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5505 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5506 elf_vax_finish_dynamic_sections): ..
5507 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5508 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5509 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5510 xstormy16_elf_finish_dynamic_sections): ..
5511 * elf32-xtensa.c (xtensa_read_table_entries,
5512 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5513 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5514 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5515 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5516 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5517 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5518 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5519 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5520 xtensa_callback_required_dependence): ..
5521 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5522 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5523 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5524 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5525 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5526 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5527 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5528 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5529 * elf64-hppa.c (allocate_dynrel_entries,
5530 elf64_hppa_size_dynamic_sections,
5531 elf64_hppa_finish_dynamic_sections): ..
5532 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5533 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5534 elf64_mips_grok_prstatus): ..
5535 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5536 mmix_elf_relocate_section, mmix_elf_final_link,
5537 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5538 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5539 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5540 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5541 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5542 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5543 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5544 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5545 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5546 ppc64_elf_finish_dynamic_sections): ..
5547 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5548 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5549 elf_s390_finish_dynamic_sections): ..
5550 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5551 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5552 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5553 sh64_elf64_finish_dynamic_sections): ..
5554 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5555 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5556 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5557 sparc64_elf_finish_dynamic_symbol,
5558 sparc64_elf_finish_dynamic_sections): ..
5559 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5560 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5561 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5562 elf64_x86_64_finish_dynamic_sections): ..
5563 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5564 * elfcode.h (elf_slurp_reloc_table): ..
5565 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5566 elf_finalize_dynstr, elf_link_add_object_symbols,
5567 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5568 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5569 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5570 elf32_mips_grok_prstatus): ..
5571 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5572 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5573 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5574 elfNN_ia64_finish_dynamic_sections): ..
5575 * elfxx-mips.c (mips_elf_create_procedure_table,
5576 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5577 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5578 mips_elf_global_got_index, mips_elf_multi_got,
5579 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5580 mips_elf_allocate_dynamic_relocations,
5581 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5582 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5583 _bfd_mips_elf_always_size_sections,
5584 _bfd_mips_elf_size_dynamic_sections,
5585 _bfd_mips_elf_finish_dynamic_symbol,
5586 _bfd_mips_elf_finish_dynamic_sections,
5587 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5588 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5589 _bfd_elf_mips_get_relocated_section_contents,
5590 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5591 * hp300hpux.c (callback): ..
5592 * hppabsd-core.c (make_bfd_asection): ..
5593 * hpux-core.c (make_bfd_asection): ..
5594 * i386linux.c (linux_link_create_dynamic_sections,
5595 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5596 * i386msdos.c (msdos_write_object_contents): ..
5597 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5598 os9k_set_section_contents): ..
5599 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5600 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5601 ieee_write_section_part, do_with_relocs, do_as_repeat,
5602 do_without_relocs, ieee_write_debug_part, init_for_output,
5603 ieee_set_section_contents): ..
5604 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5605 * irix-core.c (do_sections, make_bfd_asection): ..
5606 * libaout.h (aout_section_merge_with_text_p): ..
5607 * libbfd.c (_bfd_generic_get_section_contents,
5608 _bfd_generic_get_section_contents_in_window): ..
5609 * linker.c (default_indirect_link_order): ..
5610 * lynx-core.c (make_bfd_asection): ..
5611 * m68klinux.c (linux_link_create_dynamic_sections,
5612 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5613 * mach-o.c (bfd_mach_o_make_bfd_section,
5614 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5615 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5616 bfd_mach_o_scan_read_segment): ..
5617 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5618 _bfd_merge_sections): ..
5619 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5620 mmo_map_set_sizes, mmo_canonicalize_symtab,
5621 mmo_internal_write_section, mmo_write_object_contents): ..
5622 * netbsd-core.c (netbsd_core_file_p): ..
5623 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5624 nlm_alpha_set_public_section): ..
5625 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5626 * nlm32-sparc.c (nlm_sparc_write_import): ..
5627 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5628 nlm_compute_section_file_positions): ..
5629 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5630 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5631 * opncls.c (get_debug_link_info): ..
5632 * osf-core.c (make_bfd_asection): ..
5633 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5634 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5635 final_link, aout_link_input_section): ..
5636 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5637 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5638 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5639 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5640 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5641 * ptrace-core.c (ptrace_unix_core_file_p): ..
5642 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5643 _bfd_final_link_relocate, bfd_generic_relax_section,
5644 bfd_generic_get_relocated_section_contents): ..
5645 * reloc16.c (bfd_coff_reloc16_relax_section,
5646 bfd_coff_reloc16_get_relocated_section_c): ..
5647 * riscix.c (riscix_some_aout_object_p): ..
5648 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5649 * sco5-core.c (make_bfd_asection): ..
5650 * simple.c (bfd_simple_get_relocated_section_contents): ..
5651 * som.c (som_object_setup, setup_sections, som_prep_headers,
5652 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5653 som_set_reloc_info, som_get_section_contents,
5654 som_bfd_link_split_section): ..
5655 * sparclinux.c (linux_link_create_dynamic_sections,
5656 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5657 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5658 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5659 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5660 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5661 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5662 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5663 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5664 sunos_finish_dynamic_link): ..
5665 * syms.c (_bfd_stab_section_find_nearest_line): ..
5666 * tekhex.c (first_phase, tekhex_set_section_contents,
5667 tekhex_write_object_contents): ..
5668 * trad-core.c (trad_unix_core_file_p): ..
5669 * versados.c (process_esd, process_otr, process_otr): ..
5670 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5671 * vms-misc.c (add_new_contents): ..
5672 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5673 * vms.c (vms_set_section_contents): ..
5674 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5675 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5676 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5677 * xsym.c (bfd_sym_scan): .. See above.
5679 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5681 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5682 calling _bfd_merged_section_offset only for section symbols.
5684 2004-06-22 Alan Modra <amodra@bigpond.net.au>
5686 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5687 for handling SEC_MERGE symbols in relax_section.
5689 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
5691 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5692 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5693 linked together. Mark the result as h8300sx code.
5695 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
5697 * elf-bfd.h (struct elf_backend_data): Added
5698 elf_backend_omit_section_dynsym.
5699 (_bfd_elf_link_omit_section_dynsym): Declare.
5700 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5701 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5702 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5703 (_bfd_elf_link_renumber_dynsyms): ... this function.
5704 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5705 _bfd_elf_link_omit_section_dynsym).
5706 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5708 2004-06-21 Nick Clifton <nickc@redhat.com>
5710 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5713 2004-06-17 Jerome Guitton <guitton@gnat.com>
5715 * bfd-in.h (bfd_cache_close_all): New function declaration.
5716 * bfd-in2.h: Regenerate.
5717 * cache.c (bfd_cache_close_all): New function definition.
5719 2004-06-16 Mark Kettenis <kettenis@gnu.org>
5721 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5723 * configure: Regenerate.
5725 2004-06-16 Daniel Jacobowitz <dan@debian.org>
5727 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5728 the pre-existing section.
5730 2004-06-15 Alan Modra <amodra@bigpond.net.au>
5732 * section.c (struct sec): Remove usused flags. Reorganize a little.
5733 (bfd_get_section_size_before_reloc): Delete.
5734 (bfd_get_section_size_after_reloc): Delete.
5735 (STD_SECTION): Update.
5736 (bfd_get_section_size_now): Delete.
5737 (bfd_set_section_contents): Don't referece reloc_done.
5738 (bfd_get_section_contents): Remove reloc_done comment.
5739 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5741 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5742 * ecoff.c (bfd_debug_section): Update initializer.
5743 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5744 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5745 * bfd-in.h (bfd_section_size): Expand.
5746 (bfd_get_section_size): New macro.
5747 * bfd-in2.h: Regenerate.
5748 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5749 bfd_get_section_size_before_reloc with bfd_get_section_size.
5750 * coffcode.h (coff_write_object_contents): Likewise.
5751 * coffgen.c (build_debug_section): Likewise.
5752 * dwarf1.c (parse_line_table): Likewise.
5753 (_bfd_dwarf1_find_nearest_line): Likewise.
5754 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5755 * i386msdos.c (msdos_write_object_contents): Likewise.
5756 * pdp11.c (squirt_out_relocs): Likewise.
5757 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5758 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5760 2004-06-14 Chris Demetriou <cgd@broadcom.com>
5762 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5763 removal) with updated comment.
5764 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5766 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5767 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5769 2004-06-12 Alan Modra <amodra@bigpond.net.au>
5771 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5772 overflow on branches to undefweaks.
5774 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5776 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5777 as ecoff_section_data() does not return a valid lvalue.
5779 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
5781 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5782 (elf_link_add_object_symbols): Likewise.
5784 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5785 (elf_backend_reloc_type_class): New.
5787 2004-06-08 Mark Kettenis <kettenis@gnu.org>
5789 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5791 * configure: Regenerate.
5793 2004-06-07 Daniel Jacobowitz <dan@debian.org>
5795 From: Albert Chin-A-Young <china@thewrittenword.com>
5796 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5799 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5801 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5804 2004-05-28 DJ Delorie <dj@redhat.com>
5806 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5807 for linking, but otherwise adjust reloc for merged sections.
5809 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
5811 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5812 _bfd_merged_section_offset for local symbols.
5814 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
5816 * Makefile.am: Regenerate dependencies.
5817 * Makefile.in: Regenerate.
5818 * archures.c: Add bfd_mach_sh3_nommu .
5819 * bfd-in2.h: Regenerate.
5820 * cpu-sh.c: Add sh3-nommu architecture.
5821 (bfd_to_arch_table): Create new table.
5822 (sh_get_arch_from_bfd_mach): Create new function.
5823 (sh_get_arch_up_from_bfd_mach): Create new function.
5824 (sh_merge_bfd_arch): Create new function.
5825 * elf32-sh.c (sh_ef_bfd_table): Add table.
5826 (sh_elf_check_relocs): Replace switch statement with
5827 use of sh_ef_bfd_table .
5828 (sh_elf_get_flags_from_mach): Add new function.
5829 (sh_find_elf_flags): Likewise.
5830 (sh_elf_copy_private_data): Replace most of non-elf contents
5831 with a call to sh_merge_bfd_arch() .
5833 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
5835 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5836 * Makefile.in: Regenerate.
5838 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5840 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5841 custom calling conventions for dynamic symbols.
5842 (mn10300_elf_relax_section): Avoid relaxing a function as a local
5843 symbol if it's an alias to a global one.
5845 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
5847 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5850 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5852 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5855 2004-05-26 Alan Modra <amodra@bigpond.net.au>
5857 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5858 for SHT_GROUP sections.
5860 2004-05-25 Alan Modra <amodra@bigpond.net.au>
5862 * elflink.c (elf_link_add_object_symbols): Don't set up merge
5864 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5865 * merge.c: Formatting. Remove unnecessary casts. Expand
5866 bfd_get_section_alignment macro.
5867 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
5868 use throughout file.
5869 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
5870 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
5871 section name to determine sinfo group, instead test output section
5873 (_bfd_merge_sections): Add struct bfd_link_info param. Call
5874 _bfd_strip_section_from_output rather than just twiddling flags.
5875 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5876 (_bfd_merge_sections): Update prototype.
5877 * libbfd.h: Regenerate.
5879 2004-05-24 Mark Kettenis <kettenis@gnu.org>
5881 * netbsd-core.c: Correctly indent section that sets architecture
5884 From Miod Vallat <miod@online.fr>:
5885 * m88kopenbsd.c: New file.
5886 * targets.c (m88k_openbsd_vec): New.
5887 * config.bfd: Add m88k-*-openbsd*.
5888 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
5889 (m88kopenbsd_vec): New.
5890 * configure: Regenerate.
5891 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
5892 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
5894 * Makefile.in: Regenerate.
5895 * po/SRC-POTFILES.in: Regenerate.
5897 2004-05-24 Nick Clifton <nickc@redhat.com>
5899 * hash.c: Remove bogus node "Changing the default Hash Table Size"
5900 introduced by hash table size patch.
5902 2004-05-22 Ben Elliston <bje@au.ibm.com>
5904 * configure.in (is_release): Remove.
5905 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
5906 (AC_OUTPUT): Don't output bfdver.h from version.h.
5907 * configure: Regenerate.
5908 * Makefile.am (RELEASE): New variable.
5909 (bfdver.h): New target.
5910 * Makefile.in: Regenerate.
5911 * doc/Makefile.in: Likewise.
5913 2004-05-22 Ben Elliston <bje@au.ibm.com>
5915 * Makefile.am (config.status): Don't depend on version.h.
5916 * Makefile.in: Regenerate.
5918 2004-05-22 Alan Modra <amodra@bigpond.net.au>
5920 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
5921 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
5922 * libbfd.h: Regenerate.
5923 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
5924 (_bfd_elf_rel_local_sym): Likewise.
5925 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
5926 (elf_link_input_bfd): Likewise.
5927 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
5928 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5929 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5930 (elfNN_ia64_relocate_section): Likewise.
5932 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
5934 * hash.c (bfd_default_hash_table_size): New variable.
5935 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
5936 (bfd_hash_set_default_size): New function. Set the default size
5937 to a selected prime number close to the argument. Document new
5939 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
5940 * bfd-in2.h: Regenerate.
5941 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
5942 * Makefile.in: Regenerate.
5944 2004-05-21 Mark Kettenis <kettenis@gnu.org>
5946 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
5947 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
5948 arm, m68k, m88k and hppa core files.
5950 2004-05-21 Nick Clifton <nickc@redhat.com>
5952 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
5953 (bfd_bwrite): Likewise.
5954 (bfd_tell): Likewise.
5955 (bfd_flush): Likewise.
5956 (bfd_stat): Likewise.
5957 (bfd_seek): Likewise.
5958 (bfd_get_mtime): Likewise.
5959 (bfd_get_size): Likewise.
5961 2004-05-19 Ben Elliston <bje@au.ibm.com>
5963 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
5965 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
5967 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
5968 (bfd_generic_openr_next_archived_file): Likewise.
5970 2004-05-17 Bob Wilson <bob.wilson@acm.org>
5972 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
5973 section names by inserting a new substring after .gnu.linkonce, except
5974 for .gnu.linkonce.t.* where the "t." is replaced.
5976 2004-05-17 Adam Nemet <anemet@lnxw.com>
5978 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
5979 (m68-*-lynxos* case): Likewise.
5980 (powerpc-*-lyxnos* case): New case.
5981 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
5983 2004-05-17 David Heine <dlheine@tensilica.com>
5985 * aout-target.h (MY_bfd_copy_private_header_data): Define.
5986 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5987 * bfd.c (bfd_copy_private_header_data): Define.
5988 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5990 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5991 * coffcode.h (coff_bfd_copy_private_header_data): Define.
5992 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5993 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5994 segments by calling copy_private_bfd_data.
5995 (_bfd_elf_copy_private_header_data): Define.
5996 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5997 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5998 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5999 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6000 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6001 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6002 * som.c (som_bfd_copy_private_header_data): Define.
6003 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6004 * vms.c (vms_bfd_copy_private_header_data): Define.
6005 * bfd-in2.h: Regenerate.
6006 * libbfd.h: Regenerate.
6008 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6010 * elfxx-mips.c (MINUS_TWO): Define.
6011 (mips_elf_higher, mips_elf_highest,
6012 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6013 some bfd_vma values.
6014 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6016 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6018 * som.c (log2): Rename to exact_log2. Adjust all callers.
6020 2004-05-13 Paul Brook <paul@codesourcery.com>
6022 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
6023 dwarf3 format CIE entries. Remove comment about the size of the
6024 ra_column field. It is now correctly deduced.
6026 2004-05-13 Joel Sherrill <joel@oarcorp.com>
6028 * config.bfd (or32-*-rtems*): Switch to elf.
6030 2004-05-13 Nick Clifton <nickc@redhat.com>
6032 * po/fr.po: Updated French translation.
6034 2004-05-11 Jakub Jelinek <jakub@redhat.com>
6036 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
6037 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6038 Adjust counting of last_local.
6039 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6040 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6041 created by the linker nor !SHF_ALLOC.
6043 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6044 DT_PLTGOT to the start of the .got.plt section instead of the
6045 .got output section. Set sh_entsize for .got section in addition
6047 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6048 is at sgot->output_section->vma.
6049 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6050 DT_PLTGOT to the start of the .got.plt section instead of the
6051 .got output section.
6052 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6053 is at sgot->output_section->vma. Set sh_entsize for .got section
6054 in addition to .got.plt.
6055 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6056 (bfd_section_from_phdr): Likewise.
6057 (map_sections_to_segments): Likewise.
6058 (assign_file_positions_for_segments): Likewise.
6059 (get_program_header_size): Likewise.
6060 * elflink.c (bfd_elf_size_dynamic_sections): Set
6061 elf_tdata (output_bfd)->relro from info->relro.
6062 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6064 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
6066 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6067 a zero symndx for which we hadn't accounted a dynamic relocation.
6068 (_frvfdpic_add_rofixup): Likewise.
6070 2004-05-07 Brian Ford <ford@vss.fsi.com>
6071 DJ Delorie <dj@redhat.com>
6073 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6074 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6075 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6076 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6078 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
6080 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6081 immediately if there's no link info.
6082 (elf32_frvfdpic_copy_private_bfd_data): New.
6083 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6085 2004-05-06 Zack Weinberg <zack@codesourcery.com>
6087 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6088 filename argument is null; do not call strlen on a null pointer.
6090 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
6092 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6095 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
6097 * configure.in (bfd_elf32_frvfdpic_vec): New.
6098 * configure: Rebuilt.
6099 * targets.c (bfd_elf32_frvfdpic_vec): New.
6100 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6102 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6103 frvfdpic instead of frv. Rearrange elf-target macros such that
6104 the FDPIC-specific ones are only defined for this new target
6106 (bfd_elf32_frvfdpic_vec): Declare.
6108 (elf32_frv_relocate_section): Use it to enable segment checking
6109 and to control rofixup emission. Add output section vma to
6110 applied relocation in non-LOAD non-ALLOC sections. Use
6111 _bfd_error_handler for errors.
6112 (_frv_create_got_section): Create .rel.got and .rofixup only in
6113 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6115 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6116 (elf32_frvfdpic_modify_segment_map): Likewise.
6117 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6118 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6119 error message if we miscompute the rofixup size.
6120 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6121 (frvfdpic_elf_encode_eh_address): Likewise.
6122 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6123 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6124 relocs. Reject unknown relocation types.
6125 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6126 (frv_elf_merge_private_bfd_data): Likewise.
6127 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6128 0x4000 for newly-added elf32-frvfdpic.
6130 2004-05-05 Nick Clifton <nickc@redhat.com>
6133 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6134 returning NULL as most users of this function do not check its
6136 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6137 of bfd_cache_lookup().
6138 * sco5-core.c (sco5_core_file_p): Likewise.
6139 * trad-core.c (trad_unix_core_file_p): Likewise.
6141 2004-05-05 Nick Clifton <nickc@redhat.com>
6143 * cache.c (bfd_cache_lookup): Improve formatting.
6144 * archive.c: Fix formatting.
6146 2004-05-05 Peter Barada <peter@the-baradas.com>
6148 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6149 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6150 * bfd-in2.h(bfd_architecture): Regenerate.
6152 2004-05-03 Alan Modra <amodra@bigpond.net.au>
6154 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6156 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6157 those against discarded link-once and SEC_MERGE section symbols.
6159 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6161 * section.c (bfd_get_section_by_name_if): New.
6162 * bfd-in2.h: Regenerated.
6164 2004-05-02 Alan Modra <amodra@bigpond.net.au>
6166 * som.c (som_bfd_is_group_section): Define.
6168 2004-05-01 Alan Modra <amodra@bigpond.net.au>
6170 * section.c (bfd_make_section_anyway): Copy the whole
6171 bfd_hash_entry, not just "next" from existing entry.
6173 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6175 * elf.c (bfd_section_from_shdr): Maintain the section order in
6177 (special_sections): Add ".note.GNU-stack".
6178 (elf_fake_sections): Handle section group for relocatable
6181 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6183 * section.c (bfd_sections_find_if): New.
6184 * bfd-in2.h: Regenerated.
6186 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6188 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6190 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6191 * elf.c (bfd_elf_is_group_section): New function.
6192 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6193 * section.c (bfd_generic_is_group_section): New function.
6194 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6195 (BFD_JUMP_TABLE_LINK): Adjust.
6196 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6197 * aout-target.h (MY_bfd_is_group_section): Define.
6198 * aout-tic30.c (MY_bfd_is_group_section): Define.
6199 * bfd.c (bfd_is_group_section): Define.
6200 * binary.c (binary_bfd_is_group_section): Define.
6201 * bout.c (b_out_bfd_is_group_section): Define.
6202 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6203 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6204 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6205 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6206 * coffcode.h (coff_bfd_is_group_section): Define.
6207 * i386msdos.c (msdos_bfd_is_group_section): Define.
6208 * i386os9k.c (os9k_bfd_is_group_section): Define.
6209 * ieee.c (ieee_bfd_is_group_section): Define.
6210 * ihex.c (ihex_bfd_is_group_section): Define.
6211 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6212 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6213 * mmo.c (mmo_bfd_is_group_section): Define.
6214 * nlm-target.h (nlm_bfd_is_group_section): Define.
6215 * oasys.c (oasys_bfd_is_group_section): Define.
6216 * pef.c (bfd_pef_bfd_is_group_section): Define.
6217 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6218 * srec.c (srec_bfd_is_group_section): Define.
6219 * tekhex.c (tekhex_bfd_is_group_section): Define.
6220 * versados.c (versados_bfd_is_group_section): Define.
6221 * vms.c (vms_bfd_is_group_section): Define.
6222 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6223 * bfd-in2.h: Regenerate.
6224 * libbfd.h: Regenerate.
6226 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6228 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6230 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
6232 * configure.in: Update version to 2.15.91.
6233 * configure: Regenerate.
6235 2004-04-29 Brian Ford <ford@vss.fsi.com>
6237 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6238 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6239 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6240 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6241 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6242 .gnu.linkonce.wi. sections.
6243 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6244 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6246 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6247 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6249 2004-04-28 Chris Demetriou <cgd@broadcom.com>
6251 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6252 * bfd-in2.h: Regenerate.
6253 * libbfd.h: Likewise.
6255 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6257 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6259 (setup_sections): Use som_subspace_dictionary_record struct instead
6260 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6261 is_comdat, is_common or dup_common.
6262 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6263 is_comdat, is_common and dup_common in section subspace_dict from
6265 (som_begin_writing): Use som_subspace_dictionary_record struct.
6266 (som_finish_writing): Likewise.
6267 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6268 is_common and dup_common flags in info for symbol. Add comment
6269 regarding linker support for these fields. Slightly reorganize
6271 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6272 dup_common fields in symbol table from symbol info.
6273 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6274 arguments. Set corresponding fields in copy_data. Change all callers.
6275 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6277 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6278 * som.h (som_subspace_dictionary_record): Define.
6279 (som_copyable_section_data_struct): Add is_comdat, is_common and
6281 (som_section_data_struct): Use som_subspace_dictionary_record struct
6282 instead of subspace_dictionary_record.
6283 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6285 2004-04-27 Bob Wilson <bob.wilson@acm.org>
6287 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6288 if set. Check reloc_done flag before applying relocations. Use
6289 output addresses, both when applying relocations and when comparing
6290 against the specified section.
6291 (elf_xtensa_relocate_section): Use output address to check if dynamic
6292 reloc is in a literal pool. Set section's reloc_done flag.
6294 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6296 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6297 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6299 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6302 2004-04-27 Alan Modra <amodra@bigpond.net.au>
6304 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6305 structure field removed in 2004-04-24 patch.
6306 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6308 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6310 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6311 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6312 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6313 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6314 field before calling elf_backend_section_flags.
6316 2004-04-24 Chris Demetriou <cgd@broadcom.com>
6318 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6319 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6320 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6321 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6322 and BFD_RELOC_32_PCREL.
6323 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6324 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6325 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6326 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6327 (mips_elf_next_relocation): Move comment about matching HI/LO
6329 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6330 R_MIPS_GNU_REL_HI16.
6332 2004-04-23 Chris Demetriou <cgd@broadcom.com>
6334 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6335 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6336 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6337 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6338 and update comments to reflect current usage.
6339 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6340 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6342 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6343 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6344 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6345 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6346 type number to be MIPS_R_PCREL16.
6347 (mips_relocate_section): Remove support for link-time relaxation
6348 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6349 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6350 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6351 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6352 relaxation of branches used by embedded-PIC.
6353 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6354 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6355 related members, update comment.
6356 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6357 code related to embedded-PIC.
6358 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6359 initialization of now-removed 'adjust' member of
6360 'struct ecoff_debug_info'.
6362 2004-04-23 Chris Demetriou <cgd@broadcom.com>
6364 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6366 2004-04-21 Philip Blundell <pb@nexus.co.uk>
6368 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6369 relocs for locally defined symbols during -shared final link.
6370 (elf32_arm_final_link_relocate): Likewise.
6372 2004-04-22 Jakub Jelinek <jakub@redhat.com>
6374 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6375 ELF_LINK_POINTER_EQUALITY_NEEDED.
6376 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6377 if r_type is not R_X86_64_PC32.
6378 (elf64_x86_64_finish_dynamic_symbol): If
6379 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6382 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6384 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6385 (elf_backend_plt_sym_val): Define.
6387 2004-04-22 Andrew Cagney <cagney@redhat.com>
6389 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6391 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6393 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
6395 * som.c (som_set_section_contents): Constantify second argument.
6396 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6397 (som_object_setup): Rework to avoid warning.
6398 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6401 2004-04-22 Andrew Cagney <cagney@redhat.com>
6403 * cache.c (bfd_cache_close): Check for a previously closed file.
6405 2004-04-22 Jakub Jelinek <jakub@redhat.com>
6407 * bfd.c (bfd_get_synthetic_symtab): Define.
6408 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6409 NAME##_get_synthetic_symtab.
6410 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6411 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6412 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6414 (_bfd_elf_get_synthetic_symtab): New prototype.
6415 * elfcode.h (elf_get_synthetic_symtab): Define.
6416 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6417 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6418 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6419 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6420 * bfd-in2.h: Rebuilt.
6421 * libbfd.h: Rebuilt.
6422 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6423 (elf_backend_plt_sym_val): Define.
6424 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6425 (elf_backend_plt_sym_val): Define.
6426 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6427 (elf_backend_plt_sym_val): Define.
6428 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6429 (elf_backend_plt_sym_val): Define.
6430 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6431 (elf_backend_plt_sym_val): Define.
6432 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6433 (elf_backend_plt_sym_val): Define.
6434 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6435 (elf_backend_plt_sym_val): Define.
6436 * aout-target.h (MY_get_synthetic_symtab): Define.
6437 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6438 * coff-rs6000.c (rs6000coff_vec): Add
6439 _bfd_nodynamic_get_synthetic_symtab.
6440 (pmac_xcoff_vec): Likewise.
6441 * coff64-rs6000.c (rs6000coff64_vec): Add
6442 _bfd_nodynamic_get_synthetic_symtab.
6443 (aix5coff64_vec): Likewise.
6444 * sunos.c (MY_get_synthetic_symtab): Define.
6445 * vms.c (vms_get_synthetic_symtab): Define.
6447 2004-04-22 Nick Clifton <nickc@redhat.com>
6449 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6451 2004-04-22 Peter Barada <peter@the-baradas.com>
6453 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6454 * bfd2-in.h: Regenerate.
6455 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6457 2004-04-21 Chris Demetriou <cgd@broadcom.com>
6459 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6460 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6461 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6462 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6463 * bfd-in2.h: Regenerate.
6465 2004-04-21 Bob Wilson <bob.wilson@acm.org>
6467 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6468 require relocations against a weak symbol to reference the same
6469 symbol hash entry if not a final, static link.
6470 (get_cached_value, add_value_map): Add final_static_link argument.
6471 (remove_literals): Pass final_static_link argument as needed.
6473 2004-04-21 Andrew Cagney <cagney@redhat.com>
6475 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6476 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6477 (opncls_bwrite, opncls_bclose, opncls_bflush)
6478 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6479 bfd iovec that uses function callbacks.
6480 (bfd_close): Use the iovec's bclose.
6481 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6482 (cache_bclose, cache_bflush, cache_bstat)
6483 (cache_iovec): New functions and global variable, implement a
6484 cache "iovec", where applicable set bfd_error.
6485 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6486 * bfdio.c (struct bfd_iovec): Define.
6487 (real_read): Delete function.
6488 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6489 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6490 assume that bread and bwrite set bfd_error.
6491 * bfd.c (struct bfd): Add "iovec", update comments.
6492 * bfd-in2.h, libbfd.h: Re-generate.
6494 2004-04-21 Andrew Cagney <cagney@redhat.com>
6496 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6498 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6500 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6501 (bfd_elf_gc_sections): Fail if a shared object is being created.
6502 Do not fail if dynamic sections have been created. Instead call
6503 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6504 dynamically referenced symbols. Do not mark the whole graph
6505 rooted at .eh_frame, only the section proper.
6507 2004-04-20 DJ Delorie <dj@redhat.com>
6509 * reloc.c: Add BFD_RELOC_32_SECREL.
6510 * bfd-in2.h: Regenerate.
6511 * libbfd.h: Likewise.
6512 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6513 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6514 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6516 2004-04-19 Jakub Jelinek <jakub@redhat.com>
6518 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6519 relocs against hidden/protected undefweak symbols properly.
6520 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6522 2004-04-18 Mark Kettenis <kettenis@gnu.org>
6524 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6525 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6528 2004-04-17 Brian Ford <ford@vss.fsi.com>
6530 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6531 filepos for the SizeOfHeaders field.
6532 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6534 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6536 2004-04-16 Alan Modra <amodra@bigpond.net.au>
6538 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6539 change reloc_done. Set and restore _cooked_size.
6542 2004-04-15 Mark Kettenis <kettenis@gnu.org>
6544 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6547 2004-04-15 Nick Clifton <nickc@redhat.com>
6549 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6551 2004-04-15 Alan Modra <amodra@bigpond.net.au>
6553 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6555 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6557 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6558 when it is a definition.
6560 2004-04-14 Alan Modra <amodra@bigpond.net.au>
6562 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6563 when statically linking PIC code.
6564 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6566 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6568 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6569 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6570 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6571 * configure: Regenerate.
6573 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
6575 * elflink.c: Include libiberty.h.
6576 * Makefile.am (elflink.lo): Depend on libiberty.h.
6577 * Makefile.in: Regenerate.
6579 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
6581 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6584 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6586 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6587 reserve the memory for dynamic linker
6589 2004-04-05 Mark Kettenis <kettenis@gnu.org>
6591 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6592 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6594 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6596 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6597 RELOC_FOR_GLOBAL_SYMBOL.
6598 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6600 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6602 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6603 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6605 2004-04-01 Paul Brook <paul@codesourcery.com>
6607 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6608 * elf32-arm.h (struct elf32_elf_section_map): New.
6609 (struct _arm_elf_section_data): New.
6610 (elf32_arm_section_data): Define.
6611 (struct elf32_arm_link_hash_table): Add byteswap_code.
6612 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6613 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6614 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6615 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6616 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6617 (bfd_elf32_new_section_hook, elf_backend_write_section,
6618 elf_backend_link_output_symbol_hook): Define.
6620 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
6622 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6623 that keeps the characters in a B_INCL..B_EINCL range.
6624 (_bfd_link_section_stabs): When computing the sum of the
6625 characters in a B_INCL..B_EINCL range also keep a copy of those
6626 characters. Use this information to distinguish between
6627 include sections that have the same sum and the same length
6628 but which are nevertheless unique.
6630 2004-03-31 Paul Brook <paul@codesourcery.com>
6632 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6633 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6635 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
6637 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6638 to 'sum_chars' and add field 'num_chars'.
6639 (_bfd_link_section_stabs): When computing the sum of the
6640 characters in a B_INCL..B_EINCL range also keep a count of the
6641 number of characters. Use this information to help distinguish
6642 between include sections when have the same sum but which
6643 nevertheless are still unique.
6645 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
6647 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6649 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
6650 Tomer Levi <Tomer.Levi@nsc.com>
6652 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6653 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6654 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6655 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6656 (cpu-cr16c.lo): New target.
6657 (elf32-cr16c.lo): Likewise.
6658 * Makefile.in: Regenerate.
6659 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6660 (bfd_archures_list): Add bfd_cr16c_arch.
6661 * config.bfd: Handle cr16c-*-elf*.
6662 * configure.in: Handle bfd_elf32_cr16c_vec.
6663 * configure: Regenerate.
6664 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6665 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6666 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6667 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6668 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6669 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6670 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6671 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6672 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6673 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6674 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6675 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6676 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6677 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6678 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6679 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6680 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6681 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6682 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6683 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6684 * targets.c (bfd_elf32_cr16c_vec): Declare.
6685 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6686 * cpu-cr16c.c: New file.
6687 * elf32-cr16c.c: Likewise.
6688 * libbfd.h: Regenerate.
6689 * bfd-in2.h: Likewise.
6691 2004-03-30 Jakub Jelinek <jakub@redhat.com>
6693 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6695 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6697 * Makefile.am: Remove all mention of elflink.h.
6698 * Makefile.in: Regenerate.
6699 * bfd-in.h (bfd_elf_discard_info): Declare.
6700 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6701 * bfd-in2.h: Regenerate.
6702 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6703 bfd_elf32_link_record_dynamic_symbol,
6704 bfd_elf64_link_record_dynamic_symbol,
6705 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6706 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6707 _bfd_elf32_link_record_local_dynamic_symbol,
6708 _bfd_elf64_link_record_local_dynamic_symbol,
6709 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6710 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6711 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6712 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6713 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6714 _bfd_elf32_reloc_symbol_deleted_p,
6715 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6716 (bfd_elf_link_record_dynamic_symbol,
6717 bfd_elf_link_record_local_dynamic_symbol,
6718 bfd_elf_final_link, bfd_elf_gc_sections,
6719 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6720 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6721 bfd_elf_reloc_symbol_deleted_p): Declare.
6722 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6723 * elf32-arm.h: Update for changed function names. Remove local
6724 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6725 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6726 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6727 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6728 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6729 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6730 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6731 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6732 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6733 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6734 (bfd_elfNN_print_symbol): Define.
6735 * elfcode.h: Don't include elflink.h.
6736 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6737 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6738 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6739 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6740 elf_link_record_local_dynamic_symbol): Don't define.
6741 * elflink.c: Update for changed function names. Move elflink.h
6743 * elflink.h: Delete file.
6744 * po/SRC-POTFILES.in: Regenerate.
6745 * po/bfd.pot: Regenerate.
6747 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6749 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6750 "name" for global syms accidentally removed in 2004-03-20 change.
6752 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6754 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6755 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6756 where Elf_External_* is different for 64 and 32 bit, with
6757 corresponding elf_size_info field.
6758 (struct elf_final_link_info): Use "bfd_byte *" instead
6759 of "Elf_External_Sym *" for external_syms and symbuf.
6760 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6761 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6762 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6763 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6764 (elf_link_sort_cmp2): Adjust.
6765 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6766 using ELF_R_SYM macro. Set u.sym_mask.
6767 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6768 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6769 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6770 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6771 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6772 swap_syn_out functions. Rearrange dyn swap in/out switch.
6773 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6774 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6775 (elf_link_flush_output_syms): Add elf_backend_data arg.
6776 (elf_link_check_versioned_symbol): Likewise.
6777 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6778 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6779 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6780 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6781 ELF_R_TYPE and ELF_R_INFO macros.
6782 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6783 based on size rather than using ELF_R_INFO.
6784 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6786 (struct alloc_got_off_arg): New.
6787 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6788 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6789 (elf_gc_allocate_got_offsets): Adjust.
6790 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6791 ELF_R_SYM. Use bfd_section_from_elf_index.
6792 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6793 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6794 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6796 2004-03-26 Stan Shebs <shebs@apple.com>
6798 Remove MPW support, no longer used.
6799 * config.bfd (powerpc-*-mpw*): Remove configuration.
6800 * mpw-config.in, mpw-make.sed: Remove files.
6801 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6803 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6805 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6806 (ppc64_elf_add_symbol_hook): New function.
6807 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6808 const from Elf_Internal_Sym param.
6809 * elflink.c (elf_link_add_object_symbols): Adjust.
6810 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6811 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6812 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6813 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6814 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6815 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6816 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6817 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6818 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6819 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6820 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6821 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6822 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6823 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6824 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6825 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6827 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6829 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6830 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6831 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6832 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6833 (bfd_elf64_bfd_link_add_symbols): Delete.
6834 (bfd_elf_link_add_symbols): Declare.
6835 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6836 * elflink.c: Include safe-ctype.h.
6837 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6839 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6840 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6842 (elf_link_add_archive_symbols): Rename from
6843 _bfd_elf_link_add_archive_symbols, make static.
6844 (elf_link_add_object_symbols): New function. Corresponding
6845 elflink.h function converted to use elf_size_info.
6846 (bfd_elf_link_add_symbols): Likewise.
6847 (bfd_elf_size_dynamic_sections): Adjust.
6848 * elflink.h (elf_bfd_link_add_symbols): Delete.
6849 (elf_link_add_object_symbols): Delete.
6850 * elf32-gen.c (elf32_generic_link_add_symbols): Call
6851 bfd_elf_link_add_symbols.
6852 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6854 2004-03-25 Alan Modra <amodra@bigpond.net.au>
6856 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6857 and chained shared libs only if dynsym. Clear dynsym on forced-local.
6859 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6860 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6861 (_bfd_elf_add_dt_needed_tag): Declare.
6862 (_bfd_elf_sort_symbol): Declare.
6863 (_bfd_elf_finalize_dynstr): Declare.
6864 (RELOC_FOR_GLOBAL_SYM): Formatting.
6865 * elfcode.h (elf_add_dynamic_entry): Delete.
6866 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
6867 elflink.h function converted to use elf_size_info.
6868 (_bfd_elf_add_dt_needed_tag): Likewise.
6869 (_bfd_elf_sort_symbol): Likewise.
6870 (_bfd_elf_finalize_dynstr): Likewise.
6871 (compute_bucket_count): Likewise.
6872 (bfd_elf_size_dynamic_sections): Likewise. Check result of
6873 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6874 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6875 * elflink.h: ..here.
6876 (sort_symbol, add_dt_needed_tag): Delete.
6877 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6878 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6880 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
6881 * elf32-cris.c (add_dynamic_entry): Likewise.
6882 * elf32-hppa.c (add_dynamic_entry): Likewise.
6883 * elf32-i370.c (add_dynamic_entry): Likewise.
6884 * elf32-i386.c (add_dynamic_entry): Likewise.
6885 * elf32-m32r.c (add_dynamic_entry): Likewise.
6886 * elf32-m68k.c (add_dynamic_entry): Likewise.
6887 * elf32-ppc.c (add_dynamic_entry): Likewise.
6888 * elf32-s390.c (add_dynamic_entry): Likewise.
6889 * elf32-sh.c (add_dynamic_entry): Likewise.
6890 * elf32-sparc.c (add_dynamic_entry): Likewise.
6891 * elf32-vax.c (add_dynamic_entry): Likewise.
6892 * elf32-xtensa.c (add_dynamic_entry): Likewise.
6893 * elf64-alpha.c (add_dynamic_entry): Likewise.
6894 * elf64-hppa.c (add_dynamic_entry): Likewise.
6895 * elf64-ppc.c (add_dynamic_entry): Likewise.
6896 * elf64-s390.c (add_dynamic_entry): Likewise.
6897 * elf64-sparc.c (add_dynamic_entry): Likewise.
6898 * elf64-x86-64.c (add_dynamic_entry): Likewise.
6899 * elfxx-ia64.c (add_dynamic_entry): Likewise.
6900 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
6901 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
6902 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
6903 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6905 2004-03-23 Paul Brook <paul@codesourcery.com>
6907 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
6909 2004-03-22 Bob Wilson <bob.wilson@acm.org>
6911 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
6912 literal tables and check for relocs outside of literal pools.
6913 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
6914 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
6916 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
6917 (elf_xtensa_relocate_section): Read literal tables and check for
6918 dynamic relocations in read-only sections and not in literal pools.
6920 2004-03-23 Alan Modra <amodra@bigpond.net.au>
6923 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
6925 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
6927 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6928 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
6929 not defined by the executable, or defined in a DSO.
6930 <eliding run-time relocation of .got>: Initialize GOT entry for a
6931 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
6933 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
6934 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
6935 a PLT reloc to GOT for an executable.
6936 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
6937 .got for a DSO and explain why.
6938 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
6939 and unreferenced symbols for which a PLT is defined. Adjust
6940 dynamic-symbol pruning correspondingly, to make sure we don't lose
6941 a dynamic symbol also defined by a DSO.
6943 2004-03-22 Alan Modra <amodra@bigpond.net.au>
6945 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
6946 and rel args. Group input and output args. Wrap to 80 columns.
6947 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6948 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
6949 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
6950 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
6951 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6952 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
6953 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
6954 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
6955 RELOC_FOR_GLOBAL_SYMBOL invocation.
6957 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
6959 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
6960 unresolved symbols in objects aren't allowed.
6962 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
6964 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6965 (elf_hppa_unmark_useless_dynamic_symbols):
6966 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6967 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6968 (elf32_hppa_relocate_section): Likewise.
6969 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6970 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6971 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6972 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6973 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6975 * elf-m10200.c (mn10200_elf_relocate_section): Use
6976 RELOC_FOR_GLOBAL_SYMBOL.
6977 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6978 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6979 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6980 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6981 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6982 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
6983 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6984 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
6985 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6986 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6987 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6988 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6990 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6992 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6993 (final_link_relocate): Likewise.
6994 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6995 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6997 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6999 * Makefile.am: Run "make dep-am".
7000 * Makefile.in: Regenerate.
7001 * aclocal.m4: Regenerate.
7002 * config.in: Regenerate.
7003 * po/bfd.pot: Regenerate.
7005 2004-03-19 Alan Modra <amodra@bigpond.net.au>
7006 H.J. Lu <hongjiu.lu@intel.com>
7008 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7009 type and size change code to where it was previously. Remove
7010 dt_needed param. Treat old weak syms as strong if new sym is
7011 from a shared lib, even when old sym is from another shared
7012 lib. Remove unnecessary tests of oldweak and newweak. Correct
7014 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7015 _bfd_elf_merge_symbol calls.
7016 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7017 dt_needed local var. Update comments.
7018 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7019 (_bfd_elf_add_default_symbol): Likewise.
7021 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7022 strong syms in one shared object overriding weak syms in another.
7024 2004-03-18 Alan Modra <amodra@bigpond.net.au>
7026 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7027 dyn_lib_class field. Rearrange for better packing.
7028 (elf_dt_soname): Delete.
7029 (elf_dyn_lib_class): Define.
7030 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7031 (bfd_elf_set_dt_needed_soname): Delete.
7032 (bfd_elf_set_dyn_lib_class): New function.
7033 * elflink.h (add_dt_needed_tag): New function. Split out from..
7034 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7035 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7036 initialization of soname.
7037 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7039 * bfd-in.h (enum dynamic_lib_link_class): New.
7040 (bfd_elf_set_dt_needed_soname): Delete.
7041 (bfd_elf_set_dyn_lib_class): Declare.
7042 * bfd-in2.h: Regenerate.
7044 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7045 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7046 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7047 symbol loop. Instead use add_needed to flag tag as written.
7049 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7051 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7052 logic for null_input_bfd detection.
7054 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7056 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7058 2004-03-16 Mark Kettenis <kettenis@gnu.org>
7060 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7063 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7065 * elflink.c (elf_link_read_relocs_from_section): Don't use
7066 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7067 (_bfd_elf_link_read_relocs): ..to here.
7068 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7070 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7072 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7073 values selected in configure.host. Require both to be defined
7074 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7075 corresponding BFD_HOST vars with quotes.
7076 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7077 Always require BFD_HOST_64_BIT_DEFINED.
7078 <file_ptr type>: Find off_t size before emitting message. Combine
7079 off_t and ftello64 conditional.
7080 * configure: Regenerate.
7082 2004-03-16 Alan Modra <amodra@bigpond.net.au>
7084 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7085 aliasing warning. Remove trailing whitespace throughout file.
7087 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7089 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7090 input_section in calls to get_dyn_name.
7091 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
7093 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7095 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7097 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7098 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7099 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7100 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7101 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7102 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7103 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7105 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7106 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7107 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7108 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7109 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7110 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7111 (read_8_bytes, read_indirect_string, read_address): Likewise.
7112 (read_abbrevs, parse_comp_unit): Likewise.
7113 * targets.c (struct bfd_target): Likewise.
7114 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7115 * hppabsd-core.c: Likewise. Formatting.
7116 * hpux-core.c: Likewise.
7117 * irix-core.c: Likewise.
7118 * netbsd-core.c: Likewise.
7119 * osf-core.c: Likewise.
7120 * ptrace-core.c: Likewise.
7121 * sco5-core.c: Likewise.
7122 * trad-core.c: Likewise.
7123 * configure: Regenerate.
7124 * bfd-in2.h: Regenerate.
7126 2004-03-15 Alan Modra <amodra@bigpond.net.au>
7128 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7129 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7130 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7131 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7132 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7133 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7134 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7135 * libbfd.c: Likewise in function definitions.
7136 (bfd_put_8): Mask with 0xff rather than casting to char.
7137 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7138 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7139 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7140 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7141 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7142 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7143 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7144 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7145 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7146 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7147 * archive.c (do_slurp_coff_armap): Update swap prototype.
7148 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7149 (tic54x_getl_signed_32): Likewise.
7150 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7151 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7152 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7153 (bfd_getp_signed_32, bfd_putp32): Likewise.
7154 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7155 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7156 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7157 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7158 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7159 bfd_h_getx_signed_16, bfd_h_putx16.
7160 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7161 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7162 * hpux-core.c: Likewise.
7163 * irix-core.c: Likewise.
7164 * netbsd-core.c: Likewise.
7165 * osf-core.c: Likewise.
7166 * ptrace-core.c: Likewise.
7167 * sco5-core.c: Likewise.
7168 * trad-core.c: Likewise.
7169 * bfd-in2.h: Regenerate.
7171 2004-03-15 Matt Thomas <matt@3am-software.com>
7173 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7176 2004-03-13 Mark Kettenis <kettenis@gnu.org>
7178 * config.bfd: Add x86_64-*-openbsd*.
7179 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7181 * configure: Regenerate.
7183 2004-03-12 Nick Clifton <nickc@redhat.com>
7184 Dave Murphy <wintermute2k4@ntlworld.com>
7186 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7187 if the input bfd does not contain any code.
7189 2004-03-09 Steve Ellcey <sje@cup.hp.com>
7191 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7193 2004-03-05 Fred Fish <fnf@redhat.com>
7195 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7196 mips16 symbols to be even rather than testing first for even/odd.
7197 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7199 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7201 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7204 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
7206 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7207 undefined symbols as hash_new.
7209 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7211 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7213 * elf32-sh.c: Ditto.
7214 * bfd-in2.h: Regenerate.
7216 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
7218 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7220 (_frv_count_got_plt_entries): Initialize them.
7221 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7223 (frv_pic_relocs_info_for_global): Likewise.
7224 (frv_pic_relocs_info_for_local): Likewise.
7225 (frv_pic_merge_early_relocs_info): New.
7226 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7228 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7229 Check that we don't exceed the allocated count for entry.
7230 (_frv_add_rofixup): Likewise.
7231 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7232 (elf32_frv_finish_dynamic_sections): Improve error message in case
7233 we emit too few rofixup entries.
7235 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
7237 * archures.c (bfd_mach_fr450): New.
7238 * bfd-in2.h: Regenerate.
7239 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7240 (arch_info_500): Link to it.
7241 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7242 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7243 (frv_elf_arch_extension_p): New function.
7244 (frv_elf_merge_private_bfd_data): Use it.
7246 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7248 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7250 * elflink.h (is_global_data_symbol_definition): Moved to
7252 (elf_link_is_defined_archive_symbol): Likewise.
7253 (elf_link_add_archive_symbols): Likewise. Renamed to
7254 _bfd_elf_link_add_archive_symbols.
7256 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7257 of ELF symbol table entry from backend.
7258 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7259 instead of elf_link_add_object_symbols.
7261 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7263 * elf-bfd.h (struct elf_backend_data): Added
7264 elf_backend_can_make_relative_eh_frame,
7265 elf_backend_can_make_lsda_relative_eh_frame and
7266 elf_backend_encode_eh_address.
7267 (_bfd_elf_encode_eh_address): Declare.
7268 (_bfd_elf_can_make_relative): Declare.
7269 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7270 hooks to decide whether to attempt to make_relative and
7272 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7273 (_bfd_elf_can_make_relative): New.
7274 (_bfd_elf_encode_eh_address): New.
7275 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7276 (frv_elf_encode_eh_address): New.
7277 (elf_backend_can_make_relative_eh_frame): Define.
7278 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7279 (elf_backend_encode_eh_address): Define.
7281 (elf_backend_can_make_relative_eh_frame): Define.
7282 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7283 (elf_backend_encode_eh_address): Define.
7284 (elfNN_bed): Add them.
7286 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7288 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7289 complain_on_overflow to signed.
7291 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7293 * elflink.h (sort_symbol): New.
7294 (elf_link_add_object_symbols): Use a sorted symbol array for
7297 2004-02-27 Jakub Jelinek <jakub@redhat.com>
7299 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7300 for pc relative relocs.
7301 (elf_s390_relocate_section): Likewise.
7302 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7303 for pc relative relocs.
7304 (elf_s390_relocate_section): Likewise.
7306 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7308 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7311 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7313 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7314 field to track if a relocation is against readonly section.
7315 (count_dyn_reloc): Take a new argument for rent->reltext.
7316 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7317 (get_reloc_section): Don't set ia64_info->reltext here.
7318 (allocate_dynrel_entries): Set ia64_info->reltext here.
7320 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
7322 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7323 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7324 function's descriptor to symbol+offset, and map local undefweak
7325 symbol to NULL function descriptor.
7326 (elf32_frv_relocate_section): Likewise.
7328 2004-02-23 Mark Kettenis <kettenis@gnu.org>
7330 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7332 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7333 (netbsd_core_file_p): Set architecture from machine ID for
7336 2004-02-23 Jakub Jelinek <jakub@redhat.com>
7338 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7339 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7341 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7343 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7344 symbols with non-default visibility.
7346 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7348 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7349 IMAGE_SCN_MEM_WRITE on known sections only.
7351 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7353 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7354 symbols used in PIE relocs.
7356 2004-02-19 Jakub Jelinek <jakub@redhat.com>
7358 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7361 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
7363 * configure.in: Update version to 2.15.90.
7364 * configure: Regenerate.
7366 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
7367 Richard Sandiford <rsandifo@redhat.com>
7369 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7370 _bfd_elf_symbol_refs_local_p to decide whether to decay
7371 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7372 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7373 relocs if the symbol wasn't defined by a regular object file.
7374 Don't check the symbol's dynindx.
7376 2004-02-16 Andrew Cagney <cagney@redhat.com>
7378 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7380 * bfd-in2.h: Re-generate.
7382 2004-02-14 Andrew Cagney <cagney@redhat.com>
7384 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7385 _LARGEFILE64_SOURCE.
7387 2004-02-13 Andrew Cagney <cagney@redhat.com>
7389 * elf.c (vma_page_aligned_bias): New function.
7390 (assign_file_positions_except_relocs)
7391 (assign_file_positions_for_segments): Replace broken modulo
7392 arithmetic with call to vma_page_aligned_bias.
7394 2004-02-11 Andrew Cagney <cagney@redhat.com>
7396 * bfd-in.h: Update copyright.
7397 (bfd_tell): Change return type to file_ptr.
7398 * bfd-in2.h: Re-generate.
7399 * cache.c: Update copyright.
7400 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7402 (close_one): Use real_ftell.
7403 * bfdio.c: Update copyright.
7404 (real_ftell, real_fseek): New functions.
7405 (bfd_tell): Use real_fseek and real_ftell, change return type to
7407 (bfd_seek): Use real_ftell and real_fseek, change type of
7408 file_position to a file_ptr.
7409 * libbfd-in.h: Update copyright.
7410 (real_ftell, real_fseek): Declare.
7411 * libbfd.h: Re-generate.
7413 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7414 fseeko and fseeko64. Determine bfd_file_ptr.
7415 * configure: Re-generate.
7416 * config.in: Re-generate.
7418 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7420 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7421 * elf32-h8300.c: Likewise.
7423 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
7424 Nick Clifton <nickc@redhat.com>
7426 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7427 GOT entries with no associated GOT subsection.
7429 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
7431 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7432 * elf.c (swap_out_syms): Use it to decide whether local section
7433 symbols should be named.
7434 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7435 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7436 (elf_backend_name_local_section_symbols): Define.
7437 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7439 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7441 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7442 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7445 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
7447 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7448 to bfd_link_hash_entry passed by reference to
7449 _bfd_generic_link_add_one_symbol.
7451 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7453 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7454 relocations against dynamic symbols.
7456 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
7458 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7461 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
7463 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7464 * bfd-in2.h, libbfd.h: Rebuilt.
7466 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7468 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7469 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7470 flag has been cleared.
7472 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7474 * coff-h8300.c: Add and adjust comments about relaxation.
7475 * elf32-h8300.c: Likewise.
7477 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7479 * coff-h8300.c: Fix comment typos.
7480 * elf32-h8300.c: Likewise.
7482 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7484 * coff-h8300.c: Add comments about relaxation.
7485 * elf32-h8300.c: Likewise.
7487 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7489 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7491 * aclocal.m4: Regenerate.
7492 * configure: Regenerate.
7494 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7496 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7497 mips_elf64_rtype_to_howto instead of using howto_table.
7499 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
7501 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7503 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7504 relocs which would not use the PLT.
7506 2004-01-13 Alan Modra <amodra@bigpond.net.au>
7508 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7509 (ppc64_elf_gc_sweep_hook): Likewise.
7510 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7512 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7514 Adds linker relaxation support for bit manipulation insns like
7515 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
7517 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
7518 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
7519 * coff-h8300.c: Opcode for bit manipulation insn is checked in
7520 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7522 2004-01-12 Alan Modra <amodra@bigpond.net.au>
7524 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7526 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7528 * elf32-h8300.c: Fix formatting.
7530 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7532 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7533 dynamic object is present. Declare r_symndx and h in an inner
7535 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7537 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
7539 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7540 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7541 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7542 identically. Do not emit PC24 relocations for shared libraries.
7543 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7544 identically. Don't adjust pc_count.
7545 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7546 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7547 adjust count for branch relocations.
7548 (allocate_dynrelocs): Correct typo in call to
7549 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7550 PC24 or PLT32 relocs when linking.
7552 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7554 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7555 relocation howto with ARM_26 one for consistency.
7556 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7557 that will be converted to ARM_26D ones, since we always want 'done'
7558 relocations to be reflected in section's data.
7559 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7561 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7564 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7566 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7567 are not partial_inplace during a relocatable link.
7569 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7571 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
7572 if no dynamic object is present. Declare r_symndx and h in an
7575 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7577 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7578 trampoline if it is known out of range.
7580 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
7582 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7583 * elf32-frv.c (_frv_osec_readonly_p): New.
7584 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7586 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7587 (elf32_frv_relocate_section): Likewise. Error out if attempting
7588 to emit rofixups or dynamic relocs in read-only segments. Use
7589 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7590 dynamic relocations.
7591 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7592 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7593 relocations or fixups involving merged sections correctly. Avoid
7594 crash when undefined symbol is referenced by R_FRV_32 or
7595 R_FRV_FUNCDESC_VALUE.
7596 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7597 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7598 input section holding local symbol to addend of R_FRV_32 or
7599 R_FRV_FUNCDESC_VALUE dynamic relocation.
7600 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7601 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7602 (elf32_frv_always_size_sections): Don't store pointer to
7603 __stacksize symbol in sec_info.
7604 (elf32_frv_modify_segment_map): Look it up here.
7605 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7606 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7607 of the lazy PLT entry, not only its offset, as the low word of a
7608 function descriptor.
7609 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7610 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7611 if a hash table entry already exists but is not a definition.
7612 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7613 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7614 (_frv_add_rofixup): Don't inline.
7615 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7616 for undefweak symbols.
7617 (elf32_frv_relocate_section): Avoid crash while computing
7618 relocation when linking with shared library. Only emit rofixups
7619 and dynamic relocations for alloc&load sections. Mark binaries
7620 with inter-segment relocations for relocation as a unit.
7621 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7622 (DEFAULT_STACK_SIZE): New.
7623 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7624 emit rofixups or dynamic relocs when linking dynamic non-PIE
7626 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7627 shared libs too. Reserve the last entry for the GOT pointer.
7628 (elf32_frv_finish_dynamic_sections): Emit it.
7629 (elf32_frv_always_size_sections): New.
7630 (elf32_frv_modify_segment_map): New.
7631 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7633 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7634 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7635 (elf_backend_always_size_sections): New.
7636 (elf_backend_modify_segment_map): New.
7637 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7638 * config.bfd: Added frv-*-*linux*.
7639 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7640 ABS section, instead of crashing.
7641 (elf32_frv_relocate_section): Don't crash before warning about
7642 different segments in non-PIC relocation.
7643 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7644 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7645 relocs to undefweak symbols.
7646 (elf32_frv_relocate_section): Ditto for undefined symbols.
7647 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7648 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7649 gotfixup section was created.
7650 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7651 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7652 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7653 complain_overflow_signed.
7654 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7655 have not been allocated.
7656 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7657 privfd only if dynamic sections were created.
7658 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7659 for GPREL relocs. When linking relocatable FDPIC executables,
7660 emit warnings for relocations that would be illegal on PIE or
7661 shared libraries. Emit rofixup for R_FRV_32 only if input object
7663 (_frv_create_got_section): Define _gp symbol in the rofixup
7665 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7666 dynamic sections missing, error out requesting -melf32frvfd.
7667 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7668 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7669 computation of addends from section and global or local symbol
7670 value. Change return type to bfd_boolean, and return a failure if
7671 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7672 nonzero addend is required.
7673 (elf32_frv_relocate_section): Likewise. Print error for
7674 unsupported nonzero addends.
7675 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7676 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7677 force everything local.
7678 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7679 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7680 (frv_gotfixup_section): New.
7681 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7682 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7684 (_frv_add_rofixup): New.
7685 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7686 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7687 improve some ugly conditions.
7688 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7689 relocations in fdpic.
7690 (_frv_create_got_section): Create .rofixup.got section.
7691 (struct _frv_dynamic_got_info): Added fixups.
7692 (_frv_count_got_plt_entries): Account in-GOT relocations into
7693 relocs32, relocsfd and relocsfdv. Account them into relocs or
7694 fixups, as appropriate.
7695 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7697 (elf32_frv_finish_dynamic_sections): Verify that the right number
7698 of relocations and fixups was generated.
7699 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7701 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7702 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7703 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7704 descriptor of a (formerly-)global symbol is local.
7705 (struct frv_pic_relocs_info): Adjust comments.
7706 (_frv_emit_got_relocs_plt_entries): Adjust.
7707 (elf32_frv_relocate_section): Likewise.
7708 (_frv_count_got_plt_entries): Likewise.
7709 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7710 symbol's value to addend in the common preamble. Decay dynamic
7711 symbols to section+offset if they bind or call locally, for GOT
7712 and FUNCDESC_VALUE, respectively.
7713 (elf32_frv_relocate_section): Likewise.
7714 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7715 internal or hidden visibility.
7716 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7717 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7718 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7719 (elf32_frv_relocate_section): Pass relocation addend in. Use
7720 original relocation addend to look up the got relocs/plt entries
7721 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7722 processing relocations that reference .scommon symbols.
7723 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
7724 Introduce support for dynamic linking.
7725 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7726 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7727 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7728 (frv_reloc_type_lookup): Return REL howtos for executables and
7730 (frv_info_to_howto_rel): New.
7731 (struct frv_elf_link_hash_table): New.
7732 (frv_hash_table, frv_got_section, frv_gotrel_section,
7733 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7734 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7735 (frv_elf_link_hash_table_create): New.
7736 (struct frv_pic_relocs_info): New.
7737 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7738 (frv_pic_relocs_info_find): New.
7739 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7741 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7742 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7743 (_frv_emit_got_relocs_plt_entries): New.
7744 (elf32_frv_relocate_section): Add support for dynamic linking.
7745 Handle new relocations.
7746 (_frv_create_got_section): New.
7747 (elf32_frv_create_dynamic_sections): New.
7748 (ELF_DYNAMIC_INTERPRETER): New.
7749 (struct _frv_dynamic_got_info): New.
7750 (_frv_count_got_plt_entries): New.
7751 (struct _frv_dynamic_got_plt_info): New.
7752 (_frv_compute_got_alloc_data): New.
7753 (_frv_get_got_entry, _frv_get_fd_entry): New.
7754 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7755 (_frv_resolve_final_relocs_info): New.
7756 (elf32_frv_size_dynamic_sections): New.
7757 (elf32_frv_finish_dynamic_sections): New.
7758 (elf32_frv_adjust_dynamic_symbol): New.
7759 (elf32_frv_finish_dynamic_symbol): New.
7760 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7762 (elf_info_to_howto_rel): Define.
7763 (bfd_elf32_bfd_link_hash_table_create): Define.
7764 (elf_backend_create_dynamic_sections): Define.
7765 (elf_backend_adjust_dynamic_symbol): Define.
7766 (elf_backend_size_dynamic_sections): Define.
7767 (elf_backend_finish_dynamic_symbol): Define.
7768 (elf_backend_finish_dynamic_sections): Define.
7769 (elf_backend_want_got_sym): Define.
7770 (elf_backend_got_header_size): Define.
7771 (elf_backend_want_got_plt): Define.
7772 (elf_backend_plt_readonly): Define.
7773 (elf_backend_want_plt_sym): Define.
7774 (elf_backend_plt_header_size): Define.
7775 (elf_backend_may_use_rel_p): Define.
7776 (elf_backend_may_use_rela_p): Define.
7777 (elf_backend_default_use_rela_p): Define.
7778 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
7779 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7780 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7781 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7782 (frv_reloc_map): Map the corresponding BFD relocs to them.
7783 (frv_reloc_type_lookup): ... and back to BFD relocs.
7784 * reloc.c: New relocs.
7785 * bfd-in2.h, libbfd.h: Rebuilt.
7786 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
7787 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7788 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7789 R_FRV_FUNCDESC_GOTLO): New.
7790 (frv_reloc_map): Map the corresponding BFD relocs to them.
7791 (frv_reloc_type_lookup): ... and back to BFD relocs.
7792 * reloc.c: New relocs.
7793 * bfd-in2.h, libbfd.h: Rebuilt.
7795 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7797 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7798 targets to support pages of up to 64kB.
7799 (elf32_bed): Redefine to get a separate backend data structure for
7800 traditional targets.
7801 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7802 targets to support pages of up to 64kB.
7803 (elf64_bed): Redefine to get a separate backend data structure for
7804 traditional targets.
7805 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7806 targets to support pages of up to 64kB.
7807 (elf32_bed): Redefine to get a separate backend data structure for
7808 traditional targets.
7810 2004-01-04 Mark Kettenis <kettenis@gnu.org>
7812 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7814 2004-01-02 Mark Kettenis <kettenis@gnu.org>
7816 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7817 (elf_i386_grok_psinfo): Likewise.
7819 2004-01-02 Bernardo Innocenti <bernie@develer.com>
7821 * config.bfd: Add m68k-uClinux target.
7823 2004-01-01 Grant Edwards <grante@visi.com>
7825 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7826 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7827 (elf32_h8_gc_sweep_hook): New function.
7828 (elf_backend_gc_mark_hook): Define.
7829 (elf_backend_gc_sweep_hook): Define.
7830 (elf_backend_can_gc_sections): Define.
7832 For older changes see ChangeLog-0203
7838 version-control: never