1 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
3 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
6 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
8 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
9 predicate on slot 0 only if slot 0 isn't br.
11 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
14 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
15 empty sdynbss section.
16 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
18 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
20 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
23 2005-05-17 Alan Modra <amodra@bigpond.net.au>
25 * elf32-ppc.c (LIS_11. LIS_12): Define.
26 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
27 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
28 for --data-plt when building non-pie executables.
30 2005-05-17 Nick Clifton <nickc@redhat.com>
32 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
33 the situation where a symbols's section is not known but a section
34 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
37 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
38 the presence of a symbol table to just before the symbol table is
41 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
44 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
45 (elfNN_ia64_relax_section): Use it.
47 2005-05-14 Mark Kettenis <kettenis@gnu.org>
49 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
52 2005-05-14 Alan Modra <amodra@bigpond.net.au>
54 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
56 (ppc_elf_finish_dynamic_sections): Likewise.
58 2005-05-13 Fred Fish <fnf@specifixinc.com>
60 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
63 2005-05-13 Bob Wilson <bob.wilson@acm.org>
65 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
66 periods in linkonce_kind values.
68 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
70 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
71 against protected function when building executable.
73 2005-05-12 Alan Modra <amodra@bigpond.net.au>
75 * elf32-ppc.c (LWZU_0_X_11): Delete.
76 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
77 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
78 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
80 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
82 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
83 Generate .glink branch table and updated stubs.
85 2005-05-11 Alan Modra <amodra@bigpond.net.au>
87 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
88 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
89 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
90 (CROR_151515, CROR_313131): Delete.
91 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
92 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
94 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
95 and R_PPC_REL16_HA entries.
96 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
97 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
98 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
100 (ppc_elf_create_dynamic_sections): Create .glink section.
101 (ppc_elf_check_relocs): Set new_plt and old_plt.
102 (ppc_elf_select_plt_layout): New function.
103 (ppc_elf_tls_setup): Set plt output section elf type and flags.
104 (allocate_got): Handle differences between old and new got layout.
105 (allocate_dynrelocs): Likewise for plt.
106 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
107 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
108 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
109 destination of R_PPC_PLTREL24 relocs.
110 (ppc_elf_relocate_section): Handle new relocs and changed destination
112 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
113 differences in layout.
114 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
115 put a blrl in new got. Write glink contents.
116 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
117 * libbfd.h: Regenerate.
118 * bfd-in2.h: Regenerate.
120 2005-05-11 Andreas Schwab <schwab@suse.de>
122 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
125 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
127 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
128 section if SEC_ALLOC isn't set.
130 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
132 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
133 * acinclude.m4: Don't sinclude accross.m4.
134 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
136 2005-05-09 Alan Modra <amodra@bigpond.net.au>
138 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
139 (ppc64_elf_add_symbol_hook): Set has_dotsym.
140 (ppc64_elf_check_directives): Only process syms when has_dotsym.
141 (func_desc_adjust): Hide fake function descriptors when function
142 code entry is defined.
143 (adjust_opd_syms): Adjust for deleted_section becoming union field.
145 2005-05-09 Alan Modra <amodra@bigpond.net.au>
147 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
149 2005-05-08 Dave Korn <dave.korn@artimi.com>
151 * coff-tic80.c: Undefine _CONST after system headers to prevent
152 clash with tic80-specific definition in include/coff/tic80.h
154 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
157 * elflink.c (elf_link_output_extsym): Use output_bfd if
158 h->root.u.def.section is bfd_abs_section_ptr when reporting
161 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
163 * elf-bfd.h (elf_backend_data): Update special_sections to
164 array of pointer to bfd_elf_special_section.
165 * elf.c (special_sections): Likewise.
166 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
167 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
168 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
169 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
170 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
171 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
172 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
173 * elf32-v850.c (v850_elf_special_sections): Likewise.
174 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
175 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
176 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
177 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
178 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
179 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
180 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
181 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
183 * elf.c (get_special_section): Updated.
185 2005-05-07 Alan Modra <amodra@bigpond.net.au>
187 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
188 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
189 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
191 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
192 * elf32-frv.c (_frv_create_got_section): Likewise.
193 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
194 (elf_backend_got_symbol_offset): Don't define.
195 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
196 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
198 (ppc_elf_create_got): Tidy.
199 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
200 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
201 (ppc_elf_gc_sweep_hook): Likewise.
202 (ppc_elf_relocate_section): Likewise.
203 (ppc_elf_finish_dynamic_symbol): Likewise.
204 (allocate_got): New function.
205 (allocate_dynrelocs): Use allocate_got.
206 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
207 so that local got can refcount it. Set got_header_size.
208 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
210 (ppc_elf_finish_dynamic_sections): Likewise.
211 (elf_backend_got_symbol_offset): Don't define.
212 (elf_backend_got_header_size): Ditto.
214 2005-05-05 Steve Ellcey <sje@cup.hp.com>
216 * configure.in (ACX_HEADER_STRING): New.
217 * configure: Regenerate.
218 * config.in: Regenerate.
219 * sysdep.h (STRING_WITH_STRINGS): Use.
221 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
223 * elf.c (_bfd_elf_close_and_cleanup): Only call
224 _bfd_dwarf2_cleanup_debug_info on bfd_object.
226 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
228 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
229 "__bss_start" instead of "_edata" as fallback.
231 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
233 * bfd-in2.h: Regenerated.
235 2005-05-05 Paul Brook <paul@codesourcery.com>
237 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
238 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
240 * configure: Regenerate.
241 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
242 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
243 (elf32-i386.lo): Depend on elf-vxworks.h.
244 (elf-vxworks.lo): New rule.
245 * Makefile.in: Regenerate.
246 * elf-bfd.h (elf_backend_data): Update type of
247 elf_backend_emit_relocs.
248 (_bfd_elf_link_output_relocs): Update prototype.
249 * elflink.c (_bfd_elf_link_output_relocs): Always use
250 bed->elf_backend_emit_relocs when outputting relocations.
251 * elfxx-target.h (elf_backend_emit_relocs): Default to
252 _bfd_elf_link_output_relocs.
253 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
254 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
255 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
256 (elf_i386_plt0_entry): Remove padding.
257 (elf_i386_pic_plt0_entry): Ditto.
258 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
259 (PLT_NON_JUMP_SLOT_RELOCS): Define.
260 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
261 plt0_pad_byte fields.
262 (elf_i386_link_hash_table_create): Zero them.
263 (elf_i386_create_dynamic_sections): Create static relocation section.
264 (allocate_dynrelocs): Allocate space for static PLT relocations.
265 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
266 symbols. Give PLT symbols function type. Don't strip PLT sections
267 if we have exported symbols from them.
268 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
269 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
271 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
272 Add relocation for GOT location. Fill in PLT static relocations.
273 (elf_i386_vxworks_link_hash_table_create): New function.
274 (elf_i386_vxworks_link_output_symbol_hook): New function.
275 * elf-vxworks.h: New file.
277 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
279 * section.c (bfd_make_section_anyway_with_flags): New.
280 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
281 (bfd_make_section_with_flags): New.
282 (bfd_make_section): Call bfd_make_section_with_flags.
284 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
285 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
286 instead of bfd_make_section/bfd_make_section and don't call
287 bfd_set_section_flags.
288 (mn10300_elf_check_relocs): Likewise.
289 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
290 * elf32-arm.c (create_got_section): Likewise.
291 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
292 (elf32_arm_check_relocs): Likewise.
293 * elf32-cris.c (cris_elf_check_relocs): Likewise.
294 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
295 (_frv_create_got_section): Likewise.
296 (elf32_frvfdpic_create_dynamic_sections): Likewise.
297 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
298 (elf32_hppa_check_relocs): Likewise.
299 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
300 (i370_elf_check_relocs): Likewise.
301 * elf32-i386.c (create_got_section): Likewise.
302 (elf_i386_check_relocs): Likewise.
303 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
304 (create_got_section): Likewise.
305 (m32r_elf_create_dynamic_sections): Likewise.
306 (m32r_elf_check_relocs): Likewise.
307 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
308 * elf32-ppc.c (ppc_elf_create_got): Likewise.
309 (ppc_elf_create_dynamic_sections): Likewise.
310 (ppc_elf_add_symbol_hook): Likewise.
311 (ppc_elf_check_relocs): Likewise.
312 * elf32-s390.c (create_got_section): Likewise.
313 (elf_s390_check_relocs): Likewise.
314 * elf32-sh.c (create_got_section): Likewise.
315 (sh_elf_create_dynamic_sections): Likewise.
316 (sh_elf_check_relocs): Likewise.
317 * elf32-vax.c (elf_vax_check_relocs): Likewise.
318 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
319 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
320 (add_extra_plt_sections): Likewise.
321 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
322 (elf64_alpha_create_got_section): Likewise.
323 (elf64_alpha_create_dynamic_sections): Likewise.
324 (elf64_alpha_check_relocs): Likewise.
325 * elf64-hppa.c (get_reloc_section): Likewise.
329 (get_stub): Likewise.
330 (elf64_hppa_create_dynamic_sectionso): Likewise.
331 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
332 * elf64-ppc.c (create_linkage_sections): Likewise.
333 (ppc64_elf_check_relocs): Likewise.
334 * elf64-s390.c (create_got_section): Likewise.
335 (elf_s390_check_relocs): Likewise.
336 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
337 (sh64_elf64_create_dynamic_sections): Likewise.
338 * elf64-x86-64.c (create_got_section): Likewise.
339 (elf64_x86_64_check_relocs): Likewise.
340 * elflink.c (_bfd_elf_create_got_section): Likewise.
341 (_bfd_elf_link_create_dynamic_sections): Likewise.
342 (elf_link_add_object_symbols): Likewise.
343 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
344 (elfNN_ia64_create_dynamic_sections): Likewise.
345 (get_fptr): Likewise.
346 (get_pltoff): Likewise.
347 (get_reloc_section): Likewise.
348 (elfNN_ia64_object_p): Likewise.
349 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
350 (mips_elf_create_compact_rel_section): Likewise.
351 (mips_elf_create_got_section): Likewise.
352 (_bfd_mips_elf_create_dynamic_sections): Likewise.
353 * elfxx-sparc.c (create_got_section): Likewise.
354 (_bfd_sparc_elf_check_relocs): Likewise.
356 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
357 on linker created sections.
359 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
362 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
363 script on executable.
365 2005-05-05 John Levon <levon@movementarian.org>
367 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
368 allocated memory before returning.
369 (decode_line_info): Likewise.
370 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
371 allocated by functions in this file.
372 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
373 * elf.c (_bfd_elf_close_and_cleanup): Call
374 _bfd_dwarf2_cleanup_debug_info.
376 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
378 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
379 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
380 * configure, config.in, Makefile.in: Regenerate.
381 * sysdep.h (stpcpy): Revert last change.
383 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
385 * sysdep.h (stpcpy): Wrap declaration in parentheses.
387 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
389 * elfxx-ia64.c (ARCH_SIZE): New.
390 (LOG_SECTION_ALIGN): Likewise.
391 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
392 align relocation sections.
393 (get_fptr): Likewise.
394 (get_reloc_section): Likewise.
395 (elfNN_ia64_tprel_base): Likewise.
396 (elfNN_ia64_check_relocs): Support 32bit relocations.
397 (allocate_global_fptr_got): Likewise.
398 (allocate_dynrel_entries): Likewise.
399 (set_got_entry): Likewise.
400 (set_pltoff_entry): Likewise.
401 (elfNN_ia64_relocate_section): Likewise.
403 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
405 * configure.in: Add AC_CHECK_DECLS(stpcpy).
406 * configure: Regenerate.
407 * config.in: Likewise.
409 * sysdep.h (stpcpy): New.
411 2005-05-04 Nick Clifton <nickc@redhat.com>
413 * Update the address and phone number of the FSF organization in
414 the GPL notices in the following files:
415 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
416 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
417 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
418 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
419 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
420 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
421 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
422 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
423 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
424 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
425 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
426 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
427 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
428 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
429 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
430 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
431 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
432 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
433 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
434 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
435 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
436 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
437 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
438 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
439 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
440 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
441 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
442 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
443 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
444 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
445 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
446 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
447 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
448 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
449 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
450 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
451 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
452 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
453 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
454 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
455 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
456 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
457 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
458 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
459 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
460 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
461 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
462 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
463 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
464 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
465 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
466 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
467 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
468 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
469 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
470 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
471 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
472 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
473 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
474 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
475 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
476 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
477 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
478 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
479 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
480 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
481 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
482 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
483 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
484 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
487 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
489 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
490 * bfd-in2.h: Regenerated.
492 * elflink.c (bfd_elf_set_symbol): New.
493 (_bfd_elf_provide_symbol): Call it.
494 (_bfd_elf_provide_section_bound_symbols): New.
496 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
498 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
499 at the end, if a strong definition has already been seen.
501 2005-05-04 Alan Modra <amodra@bigpond.net.au>
503 * section.c (struct bfd_section): Replace link_order_head and
504 link_order_tail with map_head and map_tail union.
505 (STD_SECTION): Update.
506 (_bfd_strip_section_from_output): Delete.
507 * aoutx.h: Update throughout for above changes.
508 * coff-ppc.c: Likewise.
509 * cofflink.c: Likewise.
511 * elf-eh-frame.c: Likewise.
512 * elf-m10300.c: Likewise.
514 * elf32-arm.c: Likewise.
515 * elf32-cris.c: Likewise.
516 * elf32-hppa.c: Likewise.
517 * elf32-i386.c: Likewise.
518 * elf32-m32r.c: Likewise.
519 * elf32-m68hc1x.c: Likewise.
520 * elf32-m68k.c: Likewise.
521 * elf32-ppc.c: Likewise.
522 * elf32-s390.c: Likewise.
523 * elf32-sh.c: Likewise.
524 * elf32-vax.c: Likewise.
525 * elf32-xtensa.c: Likewise.
526 * elf64-alpha.c: Likewise.
527 * elf64-hppa.c: Likewise.
528 * elf64-ppc.c: Likewise.
529 * elf64-s390.c: Likewise.
530 * elf64-sh64.c: Likewise.
531 * elf64-x86-64.c: Likewise.
532 * elflink.c: Likewise.
533 * elfxx-ia64.c: Likewise.
534 * elfxx-mips.c: Likewise.
535 * elfxx-sparc.c: Likewise.
536 * linker.c: Likewise.
539 * xcofflink.c: Likewise.
540 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
541 out from bfd_elf_size_dynamic_sections.
542 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
543 * bfd-in2.h: Regenerate.
545 2005-05-04 Alan Modra <amodra@bigpond.net.au>
547 * section.c (bfd_section_list_remove): Don't clear s->next.
548 (bfd_section_list_append): Always init s->prev.
549 (bfd_section_list_prepend): Define.
550 (bfd_section_list_insert_after): Minor optimization.
551 (bfd_section_removed_from_list): Rewrite.
552 * elf.c (assign_section_numbers): Simplify list traversal now that
553 bfd_section_list_remove doesn't destroy removed section next ptr.
554 * sunos.c (sunos_add_dynamic_symbols): Likewise.
555 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
556 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
557 * bfd-in2.h: Regenerate.
559 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
561 * bfd.c (bfd): Remove section_tail and add section_last.
562 (bfd_preserve): Likewise.
563 (bfd_preserve_save): Likewise.
564 (bfd_preserve_restore): Likewise.
565 * opncls.c (_bfd_new_bfd): Likewise.
567 * coffcode.h (coff_compute_section_file_positions): Updated.
568 (coff_compute_section_file_positions): Likewise.
569 * elf.c (assign_section_numbers): Likewise.
570 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
571 * elf64-mmix.c (mmix_elf_final_link): Likewise.
572 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
573 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
574 * sunos.c (sunos_add_dynamic_symbols): Likewise.
575 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
577 * ecoff.c (bfd_debug_section): Initialize prev.
579 * section.c (bfd_section): Add prev.
580 (bfd_section_list_remove): Updated.
581 (bfd_section_list_append): New.
582 (bfd_section_list_insert_after): New.
583 (bfd_section_list_insert_before): New.
584 (bfd_section_list_insert): Removed.
585 (bfd_section_removed_from_list): Updated.
586 (STD_SECTION): Initialize prev.
587 (bfd_section_init): Updated.
588 (bfd_section_list_clear): Updated.
590 * bfd-in2.h: Regenerated.
592 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
594 * elf.c (_bfd_elf_new_section_hook): Don't call
595 _bfd_elf_get_sec_type_attr on sections from input files.
597 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
599 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
600 hash table size 16699 instead of bfd_hash_table_init.
602 2005-05-01 Paul Brook <paul@codesourcery.com>
604 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
605 definition has already been seen.
607 2005-05-01 Paul Brook <paul@codesourcery.com>
609 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
610 R_ARM_PLT32 the same as R_ARM_PC24.
611 (arm_add_to_rel): Ditto.
613 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
615 * config.bfd: Add h8300*-*-rtemscoff.
616 Switch h8300*-*-rtems* to elf.
618 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
620 * aclocal.m4, Makefile.in: Regnerated.
622 2005-04-28 Paul Brook <paul@codesourcery.com>
624 Merge changes only applied to Makefile.in.
625 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
626 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
627 (elfxx-sparc.lo): New rule.
628 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
629 (elf64-sparc.lo): Likewise.
631 2005-04-28 Julian Brown <julian@codesourcery.com>
633 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
636 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
638 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
640 * elf.c (bfd_elf_sym_name): Updated.
641 (group_signature): Likewise.
642 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
643 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
644 (ppc64_elf_edit_toc): Likewise.
645 (ppc64_elf_relocate_section): Likewise.
646 * elfcode.h (elf_slurp_symbol_table): Likewise.
647 * elflink.c (elf_link_input_bfd): Likewise.
649 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
650 bfd_elf_sym_name to get local symbol name when reporting errors.
652 2005-04-27 Nick Clifton <nickc@redhat.com>
654 * elflink.c (elf_link_input_bfd): Handle the case where a badly
655 formatted input file results in a reloc which has no associated
658 2005-04-26 Jerome Guitton <guitton@gnat.com>
660 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
662 2005-04-25 David S. Miller <davem@davemloft.net>
664 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
665 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
666 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
669 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
672 * elflink.c (elf_link_input_bfd): Make non-debugging reference
673 to discarded section an error.
675 2005-04-21 Jerome Guitton <guitton@gnat.com>
677 * configure.in: Replace BFD_NEED_DECLARATION checks by the
678 corresponding AC_CHECK_DECLS.
679 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
681 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
682 * configure: Regenerate.
685 2005-04-21 Andreas Schwab <schwab@suse.de>
687 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
688 unsigned from type of dynamic_interpreter.
689 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
692 * elf.c (assign_section_numbers): Fix comment.
694 2005-04-21 Jerome Guitton <guitton@gnat.com>
696 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
697 for struct som_exec_auxhdr fields.
699 2005-04-21 Nick Clifton <nickc@redhat.com>
701 * aout-adobe.c: Convert to ISO C and fix formatting.
702 * aout-arm.c: Convert to ISO C and fix formatting.
703 * aout-cris.c: Convert to ISO C and fix formatting.
704 * aout-ns32k.c: Convert to ISO C and fix formatting.
705 * aout-tic30.c: Convert to ISO C and fix formatting.
706 * coffcode.h: Convert to ISO C and fix formatting.
707 * coffswap.h: Convert to ISO C and fix formatting.
708 * i386aout.c: Convert to ISO C and fix formatting.
709 * libaout.h: Convert to ISO C and fix formatting.
710 * libcoff-in.h: Convert to ISO C and fix formatting.
711 * libcoff.h: Convert to ISO C and fix formatting.
712 * libecoff.h: Convert to ISO C and fix formatting.
713 * libnlm.h: Convert to ISO C and fix formatting.
714 * libpei.h: Convert to ISO C and fix formatting.
715 * libxcoff.h: Convert to ISO C and fix formatting.
716 * nlm-target.h: Convert to ISO C and fix formatting.
717 * nlm.c: Convert to ISO C and fix formatting.
718 * nlm32-alpha.c: Convert to ISO C and fix formatting.
719 * nlm32-i386.c: Convert to ISO C and fix formatting.
720 * nlm32-ppc.c: Convert to ISO C and fix formatting.
721 * nlm32-sparc.c: Convert to ISO C and fix formatting.
722 * nlmcode.h: Convert to ISO C and fix formatting.
723 * nlmswap.h: Convert to ISO C and fix formatting.
724 * pe-mips.c: Convert to ISO C and fix formatting.
725 * peXXigen.c: Convert to ISO C and fix formatting.
726 * peicode.h: Convert to ISO C and fix formatting.
727 * vms-gsd.c: Convert to ISO C and fix formatting.
728 * vms-hdr.c: Convert to ISO C and fix formatting.
729 * vms-misc.c: Convert to ISO C and fix formatting.
730 * vms-tir.c: Convert to ISO C and fix formatting.
731 * vms.c: Convert to ISO C and fix formatting.
732 * vms.h: Convert to ISO C and fix formatting.
734 * coffgen.c (coff_print_symbol): Restore correct formatting of
737 2005-04-20 David S. Miller <davem@davemloft.net>
739 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
740 (_bfd_sparc_elf_link_hash_table_create): Likewise.
741 (allocate_dynrelocs): Likewise.
743 2005-04-20 Jerome Guitton <guitton@gnat.com>
745 * configure.in: Fix the check for basename declaration. Add check
746 for declarations of ftello, ftello64, fseeko, fseeko64.
747 * configure: Regenerate.
749 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
751 2005-04-19 David S. Miller <davem@davemloft.net>
753 * elfxx-sparc.c: New file.
754 * elfxx-sparc.h: New file.
755 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
756 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
757 (elfxx-sparc.lo): New rule.
758 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
759 (elf64-sparc.lo): Likewise.
760 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
761 (bfd_elf64_sparc_vec): Likewise.
762 * configure: Regenerate.
763 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
764 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
765 which is more consistent with elf32-sparc.c
767 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
769 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
770 (mips_elf_create_local_got_entry): Check h->root.forced_local.
772 2005-04-19 Alan Modra <amodra@bigpond.net.au>
774 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
775 dynamic relocs in non-SEC_ALLOC sections.
776 (ppc_elf_gc_sweep_hook): Likewise.
777 (ppc_elf_relax_section): Likewise.
778 (ppc_elf_relocate_section): Likewise.
780 2005-04-18 Nick Clifton <nickc@redhat.com>
782 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
783 assigning a value to return_value.
785 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
788 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
791 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
794 * elf.c (setup_group): Properly handle zero group count.
796 2005-04-17 Mark Kettenis <kettenis@gnu.org>
798 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
799 (som_is_subspace, compare_subspaces, som_compute_checksum)
800 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
802 (hppa_som_reloc, compare_syms, compare_subspaces)
803 (som_print_symbol, som_get_section_contents)
804 (som_set_section_contents): Remove space after 'void *'.
805 (som_bfd_print_private_bfd_data): Use %lx to print longs.
806 (som_bfd_merge_private_bfd_data)
807 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
810 2004-04-15 Julian Brown <julian@codesourcery.com>
812 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
813 * bfd-in2.h: Regenerate.
814 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
815 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
816 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
817 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
818 relocations if requested to.
819 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
820 use_blx rather than symbian_p.
821 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
822 use_blx is in effect.
823 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
826 2005-04-15 Nick Clifton <nickc@redhat.com>
828 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
831 2005-04-15 Alan Modra <amodra@bigpond.net.au>
834 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
835 used as a list pointer.
837 2005-04-14 Alan Modra <amodra@bigpond.net.au>
839 * Makefile.am (NO_WERROR): Define.
840 * warning.m4: New file
841 * acinclude.m4: Include warning.m4.
842 * configure.in: Invoke AM_BINUTILS_WARNINGS.
843 * Makefile.in: Regenerate.
844 * configure: Regenerate.
846 2005-04-14 Alan Modra <amodra@bigpond.net.au>
848 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
849 Write trailing padding.
851 * merge.c (merge_strings): Round up section size for alignment.
853 2005-04-14 David S. Miller <davem@davemloft.net>
855 Add TLS support for 64-bit Sparc ELF.
856 * elf64-sparc.c (sparc64_elf_dyn_relocs,
857 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
858 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
859 sparc64_elf_hash_entry, sparc64_elf_tdata,
860 sparc64_elf_local_got_tls_type): New defines.
861 (sparc64_elf_mkobject): New function.
862 (sparc64_elf_link_hash_table): Add members for dynamic linker
863 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
864 uion to track TLS GOT references. Add sym_sec to cache
865 mappings from local sym to section.
866 (link_hash_newfunc): New function.
867 (sparc64_elf_bfd_link_hash_table_create): Rename to
868 sparc64_elf_link_hash_table_create for consistency.
869 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
870 (sparc64_elf_create_dynamic_sections): Initialize new section
871 members of sparc64_elf_link_hash_table. Only init srelbss
873 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
876 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
877 sparc64_elf_plt_ptr_offset): Delete.
878 (sparc64_plt_entry_build): New function to build PLT entries
879 gradually instread of all at once at the end of linking.
880 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
881 local vars. Get them from sparc64_elf_hash_table instead.
882 Check early on if r_symndx is in bounds. Handle TLS transitions.
883 Account for TLS GOT references and DF_STATIC_TLS, as needed.
884 For TLS relocs, record the tls_type in either
885 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
886 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
887 to the __tls_get_addr symbol. For PLT relocs, track references
888 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
889 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
890 symbol references, count the number of relocations needed for
891 that symbol. For default switch case, don't error, this lets
892 the TLS relocs not explicitly handled by this function get
894 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
895 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
896 it from sparc64_elf_hash_table. Store the real PLT offset
897 in h->plt.offset, and build PLT entries one at a time. Also
898 get .dynbss section pointer from htab.
899 (allocate_dynrelocs, readonly_dynrelocs,
900 sparc64_omit_section_dynsym): New functions.
901 (sparc64_elf_omit_section_dynsym): Use these new functions as
903 (dtpoff_base, tpoff): New functions.
904 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
905 locals, get them from sparc64_elf_hash_table. Handle TLS
906 relocations and refcounting in main relocation loop.
907 (sparc64_elf_finish_dynamic_symbol): Use
908 sparc64_elf_link_hash_table. Build PLT entries as we see
909 them. Handle TLS GOT relocations.
910 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
911 from sparc64_elf_hash_table. Initialize only PLT header
912 not all entries since we not build PLT entries one by one.
913 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
914 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
915 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
917 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
919 * elflink.c (elf_link_input_bfd): Update check for removed
922 2005-04-12 Alan Modra <amodra@bigpond.net.au>
924 * Makefile.am: Run "make dep-am".
925 * Makefile.in: Regenerate.
926 * aclocal.m4: Regenerate.
927 * libcoff.h: Regenerate.
929 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
931 * linker.c (_bfd_generic_link_output_symbols): Also check if
932 the output section of an input section has been removed from
935 * section.c (bfd_section_list_remove): Clear the next field
936 of the removed section.
937 (bfd_section_removed_from_list): New.
938 * bfd-in2.h: Regenerated.
940 2005-04-11 David S. Miller <davem@davemloft.net>
942 * elf32-sparc.c (elf32_sparc_relocate_section,
943 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
944 R_SPARC_TLS_LE_{HIX22,LOX10}.
945 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
946 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
947 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
948 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
950 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
952 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
954 2005-04-11 Nick Clifton <nickc@redhat.com>
956 * aout-target.h: Convert to ISO C.
957 * aoutf1.h: Convert to ISO C.
958 * aoutx.h: Convert to ISO C.
959 * bout.c: Convert to ISO C.
960 * dwarf1.c: Convert to ISO C.
961 * ecoffswap.h: Convert to ISO C.
962 * freebsd.h: Convert to ISO C.
963 * genlink.h: Convert to ISO C.
964 * ieee.c: Convert to ISO C.
965 * ihex.c: Convert to ISO C.
966 * libcoff-in.h: Convert to ISO C.
967 * mach-o.c: Convert to ISO C.
968 * mach-o.h: Convert to ISO C.
969 * netbsd.h: Convert to ISO C.
970 * ns32k.h: Convert to ISO C.
971 * ns32knetbsd.c: Convert to ISO C.
972 * oasys.c: Convert to ISO C.
973 * pdp11.c: Convert to ISO C.
974 * pef-traceback.h: Convert to ISO C.
975 * pef.c: Convert to ISO C.
976 * pef.h: Convert to ISO C.
977 * riscix.c: Convert to ISO C.
978 * som.c: Convert to ISO C.
979 * som.h: Convert to ISO C.
980 * srec.c: Convert to ISO C.
981 * stabs.c: Convert to ISO C.
982 * sunos.c: Convert to ISO C.
983 * tekhex.c: Convert to ISO C.
984 * versados.c: Convert to ISO C.
985 * version.h: Convert to ISO C.
986 * xcoff-target.h: Convert to ISO C.
987 * xcofflink.c: Convert to ISO C.
988 * xsym.c: Convert to ISO C.
989 * xsym.h: Convert to ISO C.
991 2005-04-08 Paul Brook <paul@codesourcery.com>
993 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
994 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
995 (ARM2THUMB_PIC_GLUE_SIZE): Define.
996 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
997 (elf32_arm_to_thumb_stub): Create PIC stubs.
998 (record_arm_to_thumb_glue): Use different stub size for relocatable
1001 2005-04-05 Alan Modra <amodra@bigpond.net.au>
1003 * elf64-ppc.c (dec_dynrel_count): New function split out from
1004 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1005 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1006 (ppc64_elf_tls_optimize): Likewise.
1008 2005-04-05 Mark Kettenis <kettenis@gnu.org>
1010 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1011 CORE_WCOOKIE_OFFSET.
1012 (SPARC64_WCOOKIE_OFFSET): New.
1013 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1015 2005-04-05 Nick Clifton <nickc@redhat.com>
1017 * po/rw.po: New translation: Kinyarwanda
1018 * configure.in (ALL_LINGUAS): Add rw
1019 * configure: Regenerate.
1021 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
1023 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1024 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1025 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1027 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1028 to check for SHT_MIPS_OPTIONS sections.
1029 (_bfd_mips_elf_set_section_contents): Likewise.
1031 2005-04-04 Eric Christopher <echristo@redhat.com>
1033 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1034 Clean up gp handling code.
1036 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1038 * elf.c (bfd_elf_set_group_contents): Ignore linker created
1040 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1041 sections for relocatable files only. Remove the linker created
1043 (_bfd_elf_compute_section_file_positions): Pass link_info to
1044 assign_section_numbers.
1046 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1047 (elf_backend_object_p): Defined.
1049 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1051 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1053 2005-04-03 Fred Fish <fnf@specifixinc.com>
1055 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1056 dwarf_ranges_size members.
1057 (struct comp_unit): Add base_address member.
1058 (struct funcinfo): Replace low/high members with an arange.
1059 (arange_add): Replace incoming "unit" parameter with "abfd" and
1060 "first_arange" pointers. Reorganize/rewrite function body.
1061 (decode_line_info): Change arange_add call to pass bfd and arange
1063 (lookup_address_in_line_info_table): Use arange list instead of
1064 individual low/high members. Walk function's arange list to find
1065 lowest PC in list, to test for overlapping functions.
1066 (read_debug_ranges): New function, reads the debug_ranges section.
1067 (lookup_address_in_function_table): Use arange list instead of
1068 individual low/high members. Rewrite to find smallest range that
1070 (read_rangelist): Read a given rangelist from debug_ranges.
1071 (scan_unit_for_functions): Use arange list instead of individual
1072 low/high members. Handle a DW_AT_ranges attribute.
1073 (parse_comp_unit): Use arange list instead of individual low/high
1074 members. Save comp unit base address. Handle a DW_AT_ranges
1077 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1079 * elf.c (assign_section_numbers): Really use the kept section.
1081 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1083 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1085 * elf.c (assign_section_numbers): When sh_link points to a
1086 discarded section, call _bfd_elf_check_kept_section to see if
1087 the kept section can be used. Otherwise reject sh_link
1088 pointing to discarded section.
1090 * elflink.c (_bfd_elf_check_kept_section): New.
1091 (elf_link_input_bfd): Use it.
1093 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1095 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1096 that we no longer need.
1098 2005-04-01 Alan Modra <amodra@bigpond.net.au>
1100 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1102 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
1104 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1106 * elf.c (assign_section_numbers): Fix a typo.
1108 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1110 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1112 (_bfd_elf_section_already_linked): Likewise.
1114 2005-03-31 Jerome Guitton <guitton@gnat.com>
1116 * config.in: Regenerate.
1118 2005-03-31 Jerome Guitton <guitton@gnat.com>
1120 * config.in (HAVE_DECL_BASENAME): New configure macro.
1121 * configure.in: Check for basename.
1122 * configure: Regenerate.
1124 2005-03-30 Julian Brown <julian@codesourcery.com>
1126 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1127 bfd_elf32_is_arm_mapping_symbol_name.
1128 * bfd-in2.h: Regenerate.
1129 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1130 bfd_elf32_is_arm_mapping_symbol_name.
1131 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1132 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1133 (arm_elf_find_function): Likewise.
1134 (elf32_arm_output_symbol_hook): Likewise.
1136 2005-03-30 Julian Brown <julian@codesourcery.com>
1138 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1139 * bfd-in2.h: Regenerate.
1140 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1141 bfd_elf32_is_arm_mapping_symbol_name.
1142 (elf32_arm_output_symbol_hook): Likewise.
1143 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1145 (is_arm_mapping_symbol_name): Function moved from here...
1146 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1149 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1151 * configure.in: Check for ffs decl and alphabetize.
1152 * config.in: Regenerate.
1153 * configure: Regenerate.
1154 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
1156 2005-03-29 Fred Fish <fnf@specifixinc.com>
1158 * dwarf2.c (struct comp_unit): Fix typo.
1159 (scan_unit_for_functions): Remove unused local variable "name"
1160 and dead code that set it.
1162 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1163 Phil Blundell <philb@gnu.org>
1165 * bfd-in2.h, libbfd.h: Regenerated.
1166 * reloc.c: Add ARM TLS relocations.
1167 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1169 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1170 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1171 (elf32_arm_tls_ie32_howto): New.
1172 (elf32_arm_howto_from_type): Support TLS relocations.
1173 (elf32_arm_reloc_map): Likewise.
1174 (elf32_arm_reloc_type_lookup): Likewise.
1176 (struct elf32_arm_obj_tdata): New.
1177 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1178 (elf32_arm_mkobject): New function.
1179 (struct elf32_arm_relocs_copied): Add pc_count.
1180 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1181 (GOT_TLS_IE): Define.
1182 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1183 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1184 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1185 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1186 (dtpoff_base, tpoff): New functions.
1187 (elf32_arm_final_link_relocate): Handle TLS relocations.
1188 (IS_ARM_TLS_RELOC): Define.
1189 (elf32_arm_relocate_section): Warn about TLS mismatches.
1190 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1191 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1192 TLS relocations and pc_count.
1193 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1194 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1196 (elf32_arm_size_dynamic_sections): Handle TLS.
1197 (elf32_arm_finish_dynamic_symbol): Likewise.
1198 (bfd_elf32_mkobject): Define.
1200 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1202 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1203 relocation types. Don't count relocations which will use a PLT.
1205 2005-03-29 Joel Brobecker <brobecker@gnat.com>
1207 * elf.c (elfcore_grok_nto_status): Print tid as long.
1208 (elfcore_grok_nto_regs): Likewise.
1210 2005-03-29 Joel Brobecker <brobecker@gnat.com>
1212 * irix-core.c: Remove some unnecessary prototypes.
1214 2005-03-28 Joel Brobecker <brobecker@adacore.com>
1216 * irix-core.c: Convert to ISO C.
1218 2005-03-28 Joel Brobecker <brobecker@adacore.com>
1220 * irix-core.c (do_sections): Replace + by | in expression.
1221 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1222 to unused parameters to avoid a compiler warning.
1224 2005-03-28 Mark Kettenis <kettenis@gnu.org>
1226 * netbsd-core.c: Convert to ISO C. Fix formatting.
1228 2005-03-24 Eric Christopher <echristo@redhat.com>
1230 * elfxx-mips.c: Revert previous patch.
1232 2005-03-24 Nick Clifton <nickc@redhat.com>
1234 * targets.c (_bfd_target_vector): Only include the
1235 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1236 all targets enabled.
1238 2005-03-24 James E Wilson <wilson@specifixinc.com>
1240 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1241 (BFD64_BACKENDS): Add elf32-ia64.lo.
1242 * Makefile.in: Regenerate.
1244 2005-03-23 Eric Christopher <echristo@redhat.com>
1246 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1247 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1248 after emitting relocation.
1249 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1250 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1253 2005-03-23 Mike Frysinger <vapier@gentoo.org>
1254 Nick Clifton <nickc@redhat.com>
1256 * config.bfd: Accept any C library to accompany a GNU Linux
1257 implementation, not just the GNU C library.
1258 * configure.in: Likewise.
1259 * configure: Regenerate.
1261 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1263 * bfd-in.h (_bfd_elf_provide_symbol): New.
1264 * bfd-in2.h: Regenerated.
1266 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1267 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1270 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1273 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
1275 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1277 2005-03-22 Bob Wilson <bob.wilson@acm.org>
1279 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1280 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1281 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1282 (xtensa_opcode_decode): Rearrange code.
1284 2005-03-22 Nick Clifton <nickc@redhat.com>
1286 * binary.c: Convert to ISO C90 formatting.
1287 * coff-arm.c: Convert to ISO C90 formatting.
1288 * coffgen.c: Convert to ISO C90 formatting.
1289 * elf32-gen.c: Convert to ISO C90 formatting.
1290 * elf64-gen.c: Convert to ISO C90 formatting.
1291 * hash.c: Convert to ISO C90 formatting.
1292 * ieee.c: Convert to ISO C90 formatting.
1294 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1296 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1297 unresolved symbols in R_ARM_NONE relocations.
1299 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1301 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1302 UNRESOLVED_RELOC_P argument. Set it appropriately.
1303 (elf32_arm_relocate_section): Update call to
1304 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1305 unresolved_reloc instead.
1307 2005-03-23 Alan Modra <amodra@bigpond.net.au>
1309 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1310 .gnu.warning.* sections.
1312 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1314 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1316 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1317 (elf_create_pointer_linker_section): Delete info parm. Don't make
1318 h dynamic. Don't set written_address_p.
1319 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1320 (bfd_put_ptr): Delete.
1321 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1322 Always write section contents. Assert global sym is def_regular.
1323 Use offset bottom bit as a written flag.
1324 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1327 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1329 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1330 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1333 2005-03-21 Nick Clifton <nickc@redhat.com>
1335 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1337 (t2a1_bx_pc_insn): Likewise.
1338 (t2a2_noop_insn): Likewise.
1339 (t2a3_b_insn): Likewise.
1340 (t2a1_push_insn): Likewise.
1341 (t2a2_ldr_insn): Likewise.
1342 (t2a3_mov_insn): Likewise.
1343 (t2a4_bx_insn): Likewise.
1344 (t2a5_pop_insn): Likewise.
1345 (t2a6_bx_insn): Likewise.
1346 (coff_arm_relocate_section): Only declare the high_address
1347 variable for non WINCE targets.
1349 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1351 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1352 SEC_LINKER_CREATED. Attach to dynobj.
1353 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1355 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1357 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1358 sym_offset. Add name, bss_name, sym_name, sym_val.
1359 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1360 Add sdata array of elf_linker_section_t.
1361 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1362 (enum elf_linker_section_enum): Delete.
1363 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1364 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1365 the special sections are needed. Adjust htab->sdata refs.
1366 Ensure dynobj is set in sreloc code.
1367 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1368 (ppc_elf_set_sdata_syms): New function.
1369 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1370 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1371 sym_val instead of sym_hash.
1372 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1374 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1376 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1377 (ppc_elf_merge_private_bfd_data): Likewise.
1379 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1381 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1382 (ppc_elf_create_linker_section): Don't create rel_section.
1383 (elf_create_pointer_linker_section): Don't size relocs.
1384 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1385 Don't generate relocs.
1386 (ppc_elf_relocate_section): Adjust calls to
1387 elf_finish_pointer_linker_section.
1389 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1391 * elf32-ppc.c (is_ppc_elf_target): New function.
1392 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1393 for bfd_target_elf_flavour. Do this test before endian check.
1394 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1395 (ppc_elf_size_dynamic_sections): Likewise.
1397 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1399 * elf-bfd.h (elf_backend_data): Add int to
1400 elf_backend_section_from_shdr.
1401 (bfd_elf_section_data): Update comment for this_idx.
1402 (_bfd_elf_make_section_from_shdr): Add int.
1403 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1405 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1406 and use it to set this_idx in bfd_elf_section_data.
1407 (bfd_section_from_shdr): Pass shindex to
1408 _bfd_elf_make_section_from_shdr.
1409 (_bfd_elf_section_from_bfd_section): Use this_idx in
1410 bfd_elf_section_data to find section index.
1412 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1413 index and pass it to _bfd_elf_make_section_from_shdr.
1414 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1415 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1416 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1417 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1418 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1419 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1420 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1421 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1422 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1424 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1425 Ross Ridge <rridge@csclub.uwaterloo.ca>
1427 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1428 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1431 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1433 * elflink.c (elf_mark_used_section): Remove check for special
1436 2005-03-18 Andreas Schwab <schwab@suse.de>
1438 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1439 from bfd_vma to ia64_insn, remove broken cast.
1441 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1443 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
1444 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1445 elf_m68k_finish_dynamic_sections): Use it.
1447 2005-03-17 Paul Brook <paul@codesourcery.com>
1448 Dan Jacobowitz <dan@codesourcery.com>
1449 Mark Mitchell <mark@codesourcery.com>
1451 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1452 (elf32_arm_additional_program_headers): Likewise.
1453 (elf_backend_modify_segment_map): Define.
1454 (elf_backend_additional_program_headers): Likewise.
1455 (elf32_arm_symbian_modify_segment_map): Use
1456 elf32_arm_modify_segment_map.
1458 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1460 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1461 for special sections.
1463 2005-03-18 Alan Modra <amodra@bigpond.net.au>
1465 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1466 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1467 section_sym_count param, and return number of section symbols.
1468 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1469 .dynsym contents. Don't bother calling swap_symbol_out on the
1470 first all-zero dynsym.
1471 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1472 special sections like bfd_abs_section.
1473 (bfd_elf_gc_sections): Spelling fix.
1475 2005-03-16 Fred Fish <fnf@specifixinc.com>
1478 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1479 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1481 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1483 * elflink.c (elf_mark_used_section): New.
1484 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1485 non-relocatable link if we don't do GC.
1487 2005-03-16 Nick Clifton <nickc@redhat.com>
1488 Ben Elliston <bje@au.ibm.com>
1490 * configure.in (werror): New switch: Add -Werror to the
1491 compiler command line. Enabled by default. Disable via
1493 * configure: Regenerate.
1495 2005-03-16 Nick Clifton <nickc@redhat.com>
1497 * ecoff.c: Convert to ISO C90 formatting.
1499 2005-03-16 Alan Modra <amodra@bigpond.net.au>
1501 * elf32-ppc.c: Divide file into general and linker specific
1502 functions. Sort linker functions into roughly the order in which
1503 they are called by the ELF linker code.
1505 2005-03-16 Alan Modra <amodra@bigpond.net.au>
1507 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1508 on section. Correct comment, and add FIXME.
1509 (ppc_elf_additional_program_headers): Don't bump header count for
1510 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1511 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1512 do allocate memory if they need it.
1514 2005-03-15 Mikkel Krautz <krautz@gmail.com>
1516 * config.bfd (x86_64-elf): Add target.
1518 2005-03-15 Alan Modra <amodra@bigpond.net.au>
1520 * po/es.po: Commit new Spanish translation.
1522 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1524 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1525 for global symbol when reporting overflow.
1527 2005-03-11 Jakub Jelinek <jakub@redhat.com>
1529 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1530 * libbfd.h: Rebuilt.
1531 * archive.c (_bfd_ar_spacepad): New function.
1532 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1533 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1534 coff_write_armap): Use it.
1535 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1537 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1539 2005-03-10 Mark Kettenis <kettenis@gnu.org>
1541 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1542 has_table to the start of the function.
1544 2005-03-10 Ben Elliston <bje@au.ibm.com>
1546 * archive.c: Include hashtab.h.
1547 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1548 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1549 (hash_file_ptr): New function.
1550 (eq_file_ptr): Likewise.
1551 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1552 * libbfd-in.h: Include hashtab.h.
1553 (struct artdata): Change `cache' member type to htab_t.
1554 * libbfd.h: Rebuild.
1556 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1558 * configure.in: Bump version to 2.16.90.
1559 * configure: Regenerated.
1561 2005-03-07 Jakub Jelinek <jakub@redhat.com>
1563 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1564 close is a function like macro in system headers.
1566 2005-03-07 Alan Modra <amodra@bigpond.net.au>
1569 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1570 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1572 2005-03-06 Alan Modra <amodra@bigpond.net.au>
1574 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1576 2005-03-05 Alan Modra <amodra@bigpond.net.au>
1578 * po/bfd.pot: Regenerate.
1580 2005-03-05 Alan Modra <amodra@bigpond.net.au>
1582 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1584 (func_desc_adjust): Force dot-syms local in executables as well
1587 2005-03-04 David Daney <ddaney@avtrex.com>
1589 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1590 '__gnu_local_gp' symbol used by gas -mno-shared.
1592 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
1594 * elf-bfd.h (elf_backend_data): Add "const char *" to
1595 elf_backend_section_from_phdr.
1597 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1598 elf_backend_section_from_phdr hook.
1600 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1601 Joseph Myers <joseph@codesourcery.com>
1603 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1604 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1606 (struct mips_elf_got_per_bfd_arg): Add global_count.
1607 (struct mips_elf_count_tls_arg): New.
1608 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1609 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1610 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1611 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1612 (TLS_RELOC_P): Define.
1613 (TP_OFFSET, DTP_OFFSET): Define.
1614 (dtprel_base, tprel_base): New functions.
1615 (mips_elf_link_hash_newfunc): Initialize tls_type.
1616 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1617 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1619 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1620 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1621 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1622 (mips_tls_got_index): New functions.
1623 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1624 arguments. Pass them to mips_elf_create_local_got_entry. Use
1626 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1628 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1629 mips_elf_create_local_got_entry.
1630 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1631 arguments. Handle TLS entries.
1632 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1633 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1635 (mips_elf_record_global_got_symbol): Likewise.
1636 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1638 (mips_elf_merge_gots): Handle TLS entries when merging.
1639 (mips_elf_initialize_tls_index): New function.
1640 (mips_elf_set_global_got_offset): Handle TLS entries.
1641 (mips_elf_adjust_gp): Handle TLS.
1642 (mips_elf_multi_got): Remove redundant call to
1643 mips_elf_resolve_final_got_entries. Initialize global_count.
1644 Correct a comment. Initialize new TLS members of mips_got_info.
1645 Assign TLS GOT indexes for new GOTs.
1646 (mips_elf_create_got_section): Initialize new TLS members of
1648 (mips_elf_calculate_relocation): Handle TLS relocs.
1649 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1651 (_bfd_mips_elf_always_size_sections): Handle TLS.
1652 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1653 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1655 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1656 (_bfd_mips_elf_hide_symbol): Handle TLS.
1657 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1658 (mips_reloc_map): Add TLS relocs.
1659 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1660 * elf64-mips.c (mips_elf64_howto_table_rel)
1661 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1662 * reloc.c: Define new MIPS TLS relocations.
1663 * libbfd.h, bfd-in2.h: Regenerated.
1665 2005-03-02 Jan Beulich <jbeulich@novell.com>
1667 * Makefile.am: Add dependency of cache.o on libiberty.h.
1668 * cache.c: Include libiberty.h.
1669 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1671 2005-03-01 Zack Weinberg <zack@codesourcery.com>
1673 * elf.c (bfd_section_from_shdr <default case>): Call
1674 elf_backend_section_from_shdr hook unconditionally, and return
1676 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1677 * elfxx-target.h (elf_backend_section_from_shdr)
1678 (elf_backend_section_from_phdr): Default to
1679 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1682 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1684 * targets.h: Typo fix.
1685 * bfd-in2.h: Regenerate.
1687 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1688 structs to size on-disk structures.
1689 (b_out_set_section_contents): Size the external struct, not the
1690 internal one for on-disk size.
1691 (b_out_sizeof_headers): Likewise.
1693 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1695 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1696 entry points with the func descriptor as well as undefweak.
1698 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
1700 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1701 present when IMPORT_NAME_UNDOECRATE is used.
1703 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
1706 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1709 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1710 to _bfd_elf_merge_symbol.
1712 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1713 unsigned int to return the alignment of the old common symbol
1714 in the dynamic object.
1715 (_bfd_elf_add_default_symbol): Pass NULL to
1716 _bfd_elf_merge_symbol.
1717 (elf_link_add_object_symbols): Pass &old_alignment to
1718 _bfd_elf_merge_symbol. Get the alignment of the new common
1719 symbol in the dynamic object.
1721 2005-02-24 Ben Elliston <bje@au.ibm.com>
1723 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1724 * format.c (bfd_check_format_matches): Likewise.
1725 * archive.c (BFD_GNU960_ARMAG): Likewise.
1726 (bfd_generic_archive_p): Likewise.
1727 (_bfd_write_archive_contents): Likewise.
1729 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
1731 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1732 * configure: Regenerate.
1734 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
1736 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1737 COMDAT group sections to have default visibility.
1739 2005-02-24 Alan Modra <amodra@bigpond.net.au>
1741 * coffcode.h (coff_print_aux): Warning fix.
1742 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1743 instead of section pointer to identify.
1744 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
1745 the correct size buffer for local sym mangling too.
1746 (h8300_bfd_link_add_symbols): Likewise.
1747 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
1749 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
1750 * elf32-xtensa.c (literal_value_hash): Warning fix.
1751 * versados.c (process_otr): Warning fix.
1752 (versados_canonicalize_reloc): Likewise.
1753 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
1754 * vms.c (fill_section_ptr): Warning fix.
1756 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
1758 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
1759 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
1761 2005-02-23 Nick Clifton <nickc@redhat.com>
1763 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
1764 the relvaddr field of the Elf32_crinfo structure.
1766 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
1767 variables that are passed by reference to
1768 m68hc11_get_relocation_value in case that function does not
1771 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
1772 return statements and replace with a single return at the end of
1773 the function. This helps pacify the flow analysis code in gcc 4.0.
1775 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
1776 strtab to avoid compile time warning.
1778 2005-02-23 Ben Elliston <bje@au.ibm.com>
1780 * opncls.c (bfd_zalloc): Document this function.
1782 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
1784 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
1785 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
1786 Replace SEC_SHARED with SEC_COFF_SHARED.
1787 (styp_to_sec_flags): Likewise.
1789 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
1790 (TARGET_LITTLE_SYM): Likewise.
1792 * section.c (SEC_ARCH_BIT_0): Removed.
1793 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
1794 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
1795 (SEC_SHARED): Renamed to ...
1796 (SEC_COFF_SHARED): This.
1797 (SEC_BLOCK): Renamed to ...
1798 (SEC_TIC54X_BLOCK): This.
1799 (SEC_CLINK): Renamed to ...
1800 (SEC_TIC54X_CLINK): This.
1801 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
1802 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
1804 * bfd-in2.h: Regenerated.
1806 2005-02-21 Fred Fish <fnf@specifixinc.com>
1808 * dwarf2.c (find_abstract_instance_name): Call recursively
1809 to handle a DW_AT_specification.
1811 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1813 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
1814 mips_elf_create_dynamic_relocation,
1815 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
1816 Remove #if 0'd code.
1818 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1820 * Makefile.am: Run "make dep-am"
1821 * Makefile.in: Regenerate.
1823 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1825 * coffgen.c (bfd_coff_get_comdat_section): Check that
1826 coff_section_data isn't NULL.
1828 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1830 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
1831 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
1832 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
1833 useless assignments.
1834 (xcoff_write_archive_contents_big): Likewise.
1835 (_bfd_xcoff_put_ldsymbol_name): Likewise.
1836 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
1837 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
1838 * cofflink.c (process_embedded_commands): Warning fixes.
1839 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
1841 * dwarf2.c: Warning fixes.
1842 * elf-bfd.h: Likewise.
1843 * elf-eh-frame.c: Likewise.
1844 * elf-strtab.c: Likewise.
1846 * elf32-m68k.c: Likewise.
1847 * elf32-ppc.c: Likewise.
1848 * elf32-sh-symbian.c: Likewise.
1849 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
1850 * elf64-sh64.c: Likewise.
1851 * peicode.h: Likewise.
1852 * elf64-mmix.c: Warning fixes.
1853 * elfcode.h: Likewise.
1854 * elfxx-mips.c: Likewise.
1855 * libbfd-in.h: Likewise.
1856 * libbfd.c: Likewise.
1857 * mach-o.c: Likewise.
1858 * merge.c: Likewise.
1860 * opncls.c: Likewise.
1863 * vms-hdr.c: Likewise.
1864 * vms-tir.c: Likewise.
1865 * xtensa-isa.c: Likewise.
1866 * xtensa-modules.c: Likewise.
1868 (pstrcmp): Use correct choice of string lengths. Fix return value.
1869 (bfd_sym_module_name): Correct string length.
1870 * bfd-in2.h: Regenerate.
1871 * libbfd.h: Regenerate.
1873 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1875 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
1876 uninitialized check_segment[1] in TLSMOFF case.
1877 Reported by Alan Modra.
1878 (elf32_frv_relocate_section): Improve errors and warnings.
1880 2005-02-17 Alan Modra <amodra@bigpond.net.au>
1882 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
1884 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1886 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
1887 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
1888 * pef.c (bfd_pef_scan): Don't ignore return value of
1889 bfd_pef_scan_start_address.
1890 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
1891 bfd_mach_o_scan_start_address.
1892 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
1893 * elfxx-mips.c: Remove unnecessary prototypes.
1894 (sort_dynamic_relocs_64): Abort if not BFD64.
1896 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1898 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
1899 Skip toc reloc adjust if reloc_count is zero.
1901 2005-02-15 Nigel Stephens <nigel@mips.com>
1902 Maciej W. Rozycki <macro@mips.com>
1904 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1905 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1906 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1907 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1908 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1910 (mips16_gprel_reloc): Remove bit shuffling; call
1911 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1912 and _bfd_mips16_elf_reloc_shuffle() instead.
1913 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1914 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1916 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
1917 elf_mips16_howto_table_rel.
1918 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
1919 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
1920 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1921 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
1922 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1924 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
1925 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
1926 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
1928 (mips16_gprel_reloc): Remove bit shuffling; call
1929 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1930 and _bfd_mips16_elf_reloc_shuffle() instead.
1931 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1932 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1934 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
1935 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
1936 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1937 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1938 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1939 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1940 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1942 (mips16_gprel_reloc): Remove bit shuffling; call
1943 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1944 and _bfd_mips16_elf_reloc_shuffle() instead.
1945 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1946 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1948 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
1949 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
1950 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
1951 handle bit shuffling for MIPS16 relocs.
1952 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1953 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
1954 and _bfd_mips16_elf_reloc_shuffle().
1955 (_bfd_mips_elf_generic_reloc): Likewise.
1956 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
1958 (mips_elf_obtain_contents): Remove bit shuffling.
1959 (mips_elf_perform_relocation): Likewise; call
1960 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
1962 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
1964 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
1965 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1966 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
1967 (BFD_RELOC_MIPS16_HI16_S): Likewise.
1968 (BFD_RELOC_MIPS16_LO16): Likewise.
1969 * bfd-in2.h: Regenerate.
1970 * libbfd.h: Regenerate.
1972 2005-02-15 Jan Beulich <jbeulich@novell.com>
1974 * elfxx-ia64.c (ia64_howto_table): Correct strings for
1975 R_IA64_DTPMOD64[LM]SB.
1977 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
1979 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
1980 backward branch in the same section.
1981 (elfNN_ia64_relocate_section): Inform users that the input
1982 section is too big to relax br instruction when overflow
1983 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
1984 and R_IA64_PCREL21F.
1986 2005-02-14 Orjan Friberg <orjanf@axis.com>
1988 * elfcore.h (elf_core_file_p): Move the call to
1989 elf_backend_object_p to allow the correct machine to be set before
1990 processing the program headers.
1992 2005-02-14 Nick Clifton <nickc@redhat.com>
1995 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
1996 aware flag from the input bfd to the output bfd.
1998 2005-02-11 Maciej W. Rozycki <macro@mips.com>
2000 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2001 R_MIPS_LITERAL relocations for external symbols.
2002 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2003 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2005 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2007 * bfd-in2.h: Rebuilt.
2009 2005-02-11 Paul Brook <paul@codesourcery.com>
2011 * elf-bfd.h (struct elf_link_hash_table): Add
2012 is_relocatable_executable.
2013 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2014 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2015 symbols in relocatable executables.
2016 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2017 relocatable executables.
2018 (_bfd_elf_link_renumber_dynsyms): Ditto.
2019 (bfd_elf_final_link): Ditto.
2020 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2021 relocations into relocatable executables.
2022 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2023 executables. Also copy absolute relocations.
2024 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2025 in relocatable executables.
2026 (allocate_dynrelocs): Copy relocations for relocatable executables.
2027 Output dynamic symbols for symbols defined in linker scripts.
2029 2005-02-11 Nick Clifton <nickc@redhat.com>
2031 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2032 to avoid a compile time warning.
2034 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2037 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2038 inclusion of coffcode.h so that it is actually picked up.
2040 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2041 case it is not used.
2043 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2044 structure and macro.
2046 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2049 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2050 to protect the declaration of this array.
2052 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2053 Avoid call to memcpy with a size of 0.
2055 2005-02-12 Alan Modra <amodra@bigpond.net.au>
2057 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2058 old-style branches to undefined dot-symbols which will be
2059 satisfied by a plt call.
2061 2005-02-11 Alan Modra <amodra@bigpond.net.au>
2063 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2064 (ppc64_elf_copy_indirect_symbol): ..here.
2065 (func_desc_adjust): Use move_plt_plist.
2067 2005-02-10 Paul Brook <paul@codesourcery.com>
2069 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2071 2005-02-10 Paul Brook <paul@codesourcery.com>
2073 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2075 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2076 (elf_link_renumber_local_hash_table_dynsyms): New function.
2077 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2079 2005-02-10 Jakub Jelinek <jakub@redhat.com>
2081 * bfd-in.h (BFD_LINKER_CREATED): Define.
2082 * bfd-in2.h: Rebuilt.
2083 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2084 BFD_LINKER_CREATED bfds when determining input bfds without
2085 .note.GNU-stack section.
2087 2005-02-10 Maciej W. Rozycki <macro@mips.com>
2089 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2090 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2091 relocations against external symbols unchanged.
2093 2005-02-08 Paul Brook <paul@codesourcery.com>
2095 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2098 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
2100 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2103 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2105 * elf64-mips.c: Fix formatting throughout.
2107 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2109 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2111 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
2113 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2114 *ABS*/*UND* sections.
2115 (elf32_frv_relocate_section): Move zero-addend-required error...
2116 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2117 missing needed TLS section.
2119 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
2121 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2122 being the last symbol.
2123 (aout_link_add_symbols): Just return TRUE if a warning
2126 2005-02-07 Maciej W. Rozycki <macro@mips.com>
2128 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2129 R_MIPS_GPREL32 relocations against external symbols.
2130 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2133 2005-02-07 Alan Modra <amodra@bigpond.net.au>
2135 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2136 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2137 elf_string_from_elf_strtab.
2138 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2139 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2140 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2141 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2142 looking at cached symtab info first, before iterating over headers.
2143 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2144 * elfcode.h (elf_object_p): Don't load section header stringtab
2147 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2149 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2150 against protected function when building shared library.
2153 * elf64-x86-64.c (is_32bit_relative_branch): New.
2154 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2155 protected function symbol when building shared library for
2156 32bit relative branch instruction.
2158 2005-02-06 Alan Modra <amodra@bigpond.net.au>
2160 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2161 syms when doing a relocatable link.
2162 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2164 (ppc64_elf_tls_setup): Likewise.
2165 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2167 2005-02-04 Alan Modra <amodra@bigpond.net.au>
2169 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2170 (link_hash_newfunc): Clear all locals using memset.
2171 (make_fdh): Remove flags param. Always create fake func desc
2172 weak. Link the descriptor with the code entry sym.
2173 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2174 (add_symbol_adjust): Adjust make_fdh call.
2175 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2176 descriptor to strong undefined if code entry is strong.
2178 2005-02-04 Alan Modra <amodra@bigpond.net.au>
2180 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2181 lookup here. Set to new before calling bfd_link_repair_undef_list.
2182 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2184 2005-02-03 Alan Modra <amodra@bigpond.net.au>
2186 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2188 2005-02-03 Alan Modra <amodra@bigpond.net.au>
2190 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2191 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2192 before the as-needed lib was loaded. Abort on unexpected refs.
2194 2005-02-02 Alan Modra <amodra@bigpond.net.au>
2196 * elflink.c (elf_smash_syms): Expand comments.
2197 (elf_link_add_object_symbols): Only call elf_smash_syms for
2198 as-needed dynamic objects.
2200 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2201 everything, just the field specific to ia64.
2202 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
2204 2005-02-01 Alan Modra <amodra@bigpond.net.au>
2206 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2207 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2209 (struct add_symbol_adjust_data): New.
2210 (add_symbol_adjust): Make an undefweak func desc for old ABI
2211 objects to link with --as-needed shared libs. Return fail status.
2212 Don't adjust old ABI func entry sym to weak if func desc syms
2214 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2217 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
2219 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2222 2005-02-01 Alan Modra <amodra@bigpond.net.au>
2224 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2225 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2226 remove anything but new and undefweak.
2227 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2229 (_bfd_elf_create_dynamic_sections): Formatting.
2230 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2231 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2232 (struct elf_smash_data): New.
2233 (elf_smash_syms): New function.
2234 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2235 unneeded dynamic objects to loaded list.
2236 (elf_link_output_extsym): Don't handle as-needed here. Strip
2237 bfd_link_hash_new symbols.
2238 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2239 delref when dynindx is already -1.
2240 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2242 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2244 2005-02-01 Ben Elliston <bje@au.ibm.com>
2246 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2248 2005-02-01 Ben Elliston <bje@au.ibm.com>
2250 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2251 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2252 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2253 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2254 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2255 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2256 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2257 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2258 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2259 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2260 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
2261 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
2262 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2263 throughout. Similarly, collapse #if 1'd code.
2265 2005-02-01 Ben Elliston <bje@au.ibm.com>
2267 * elf-bfd.h (bfd_elf_discard_group): Remove.
2268 * elf.c (bfd_elf_discard_group): Likewise.
2269 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2271 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
2273 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2274 (_bfd_elf_eh_frame_address_size): Declare.
2275 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2276 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2277 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2278 (elf_backend_eh_frame_address_size): Define.
2279 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2280 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2281 size from the new backend hook.
2282 (_bfd_elf_write_section_eh_frame): Likewise.
2283 (_bfd_elf_eh_frame_address_size): New function.
2285 2005-01-31 Andrew Cagney <cagney@gnu.org>
2287 * configure: Regenerate to track ../gettext.m4.
2289 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2291 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2292 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2294 2005-01-31 Nick Clifton <nickc@redhat.com>
2296 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2297 sparc-lynxos, vax-vms) be obsolete.
2299 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2301 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2302 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2303 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2304 * elfcode.h (elf_object_p): Use minpagesize instead of
2306 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2307 (elfNN_bed): Include ELF_MINPAGESIZE.
2309 2005-01-28 Julian Brown <julian@codesourcery.com>
2311 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2312 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2313 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2314 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
2315 passing flag value from ld. Set flag value in global hash table entry.
2316 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
2319 2005-01-27 Andrew Cagney <cagney@gnu.org>
2321 * configure: Regenerate to track ../gettext.m4 change.
2323 2005-01-25 Mark Mitchell <mark@codesourcery.com>
2325 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
2328 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
2330 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2331 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2333 * reloc.c: Add R_FRV_TLSMOFF.
2334 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2335 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2336 (elf32_frv_relocate_section): Handle it.
2337 (elf32_frv_check_relocs): Likewise.
2338 * libbfd.h, bfd-in2.h: Rebuilt.
2339 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2340 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2341 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2342 such that they return the constant in gr9.
2343 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2345 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2346 too, such that they shrink on relaxation.
2347 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2348 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2349 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2350 if we can guarantee the use of 16-bit constants.
2351 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2352 Introduce TLS support for FR-V FDPIC.
2353 * reloc.c: Add TLS relocations.
2354 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2355 (elf32_frv_rel_tlsdesc_value_howto): New.
2356 (elf32_frv_rel_tlsoff_howto): New.
2357 (frv_reloc_map): Add new mappings.
2358 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2360 (frvfdpic_dynamic_got_plt_info): New.
2361 (frvfdpic_plt_tls_ret_offset): New.
2362 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2363 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2364 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2365 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2367 (struct frvfdpic_relocs_info): Add TLS fields.
2368 (frvfdpic_relocs_info_hash): Warning clean up.
2369 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2370 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2371 (FRVFDPIC_TLS_BIAS): Define.
2372 (tls_biased_base): New.
2373 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2375 (frv_reloc_type_lookup): Likewise.
2376 (frvfdpic_info_to_howto_rel): Likewise.
2377 (elf32_frv_relocate_section): Likewise.
2378 (_frv_create_got_section): Create the PLT section here.
2379 (elf32_frvfdpic_create_dynamic_sections): Not here.
2380 (_frvfdpic_count_nontls_entries): Move out of...
2381 (_frvfdpic_count_got_plt_entries): ... here.
2382 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2383 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2385 (_frvfdpic_relax_tls_entries): New.
2386 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2387 (_frvfdpic_get_tlsdesc_entry): New.
2388 (_frvfdpic_assign_got_entries): Add TLS support.
2389 (_frvfdpic_assign_plt_entries): Likewise.
2390 (_frvfdpic_reset_got_plt_entries): New.
2391 (_frvfdpic_size_got_plt): Move out of...
2392 (elf32_frvfdpic_size_dynamic_sections): ... here.
2393 (_frvfdpic_relax_got_plt_entries): New.
2394 (elf32_frvfdpic_relax_section): New.
2395 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2396 (elf32_frv_check_relocs): Add TLS support.
2397 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2398 * libbfd.h, bfd-in2.h: Rebuilt.
2400 2005-01-25 Alan Modra <amodra@bigpond.net.au>
2402 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2403 loadable reloc sections.
2404 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2405 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2407 2005-01-25 Alan Modra <amodra@bigpond.net.au>
2409 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2410 sections immediately when linking shared libs. Instead, wait until
2411 we know a lib is needed.
2412 (_bfd_elf_link_create_dynstrtab): Extract from..
2413 (_bfd_elf_link_create_dynamic_sections_): ..here.
2414 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2415 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2416 for non-existent .dynamic.
2417 (elf_link_output_extsym): Don't complain about undefined symbols
2418 in as-needed dynamic libs that aren't actually linked.
2420 2005-01-24 Andrew Cagney <cagney@gnu.org>
2422 * configure: Regenerate, ../gettext.m4 was updated.
2424 2005-01-21 Ben Elliston <bje@au.ibm.com>
2426 * aout-encap.c: Remove unused file.
2428 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2431 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2432 non-function symbols are local.
2433 (_bfd_elf_symbol_refs_local_p): Likewise.
2435 2005-01-18 Alan Modra <amodra@bigpond.net.au>
2437 * bfd.c (bfd_link_just_syms): Add abfd param.
2438 * bfd-in2.h: Regenerate.
2440 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2442 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2443 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2444 instructions. If the amount of padding is known, reduce the size
2445 of the CIE or FDE by that amount.
2447 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2449 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2450 augmentation_size. Use bfd_signed_vmas for data_align.
2451 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2452 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2453 functions. Don't read past the end of the enclosing CIE or FDE.
2454 (skip_bytes): New utility function.
2455 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2457 (_bfd_elf_write_section_eh_frame): Use new functions.
2459 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2461 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2462 assert-style REQUIRE() macro to handle sanity checks.
2464 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2466 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2468 (read_unsigned_leb128): Removed.
2469 (read_signed_leb128): Removed.
2470 (find_abstract_instance_name): Updated.
2471 (parse_comp_unit): Accept info_ptr_unit.
2472 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2473 comp unit and pass it to parse_comp_unit.
2475 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2476 (read_signed_leb128): Moved to ...
2479 * libbfd-in.h (read_unsigned_leb128): New prototype.
2480 (read_signed_leb128): Likewise.
2481 * libbfd.h: Regenerated.
2483 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2484 Nick Clifton <nickc@redhat.com>
2486 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2487 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2488 arch_sh4a_nofpu_up in order to match the external names and make the
2489 testsuite's job easier.
2490 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2492 * bfd-in2.h: Regenerate.
2494 2005-01-15 Andrew Cagney <cagney@gnu.org>
2497 * acinclude.m4: Move BFD_NEED_DECLARATION,
2498 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2499 the new file bfd.m4. Include ../bfd/bfd.m4.
2500 * configure: Re-generate.
2502 2005-01-12 Alan Modra <amodra@bigpond.net.au>
2504 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2505 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2507 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2508 R_PPC_RELAX32PC_PLT.
2510 2005-01-11 Alan Modra <amodra@bigpond.net.au>
2512 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2514 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2515 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2516 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2517 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2518 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2519 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2520 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2521 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2522 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2523 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2524 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2525 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2526 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2527 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2529 2005-01-11 Alan Modra <amodra@bigpond.net.au>
2531 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2534 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2536 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2537 * bfd-in2.h: Regenerate.
2538 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2539 to support these new machine values.
2540 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2542 (bfd_maxq_arch): Update values for the maxq20.
2544 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2546 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2547 non-shared object, do not reserve space in .plt and .rela.plt for
2548 regular symbols neither defined nor referenced in shared objects.
2550 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2552 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2553 to zero the structure.
2554 (create_got_section): Use BFD_ASSERT instead of abort.
2555 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2557 (create_got_section): New function.
2558 (sparc64_elf_create_dynamic_sections): Likewise.
2559 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2560 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2561 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2562 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2563 (sparc64_elf_finish_dynamic_symbol): Likewise.
2564 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2565 (elf_backend_create_dynamic_sections): Define to
2566 sparc64_elf_create_dynamic_sections.
2568 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2570 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2571 (elf_backend_omit_section_dynsym): Define to it.
2572 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2573 (elf_backend_omit_section_dynsym): Define to it.
2575 2005-01-07 Jakub Jelinek <jakub@redhat.com>
2577 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2578 PT_DYNAMIC segment, unless .dynamic.
2580 2005-01-06 Paul Brook <paul@codesourcery.com>
2582 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2583 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2584 * configure: Regenerate.
2585 * elf32-arm.c: Add VxWorks target bfd.
2587 (elf32_arm_link_hash_table): Add use_rel.
2588 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2589 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2590 Correct offset calculation for RELA case.
2591 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2592 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2593 (elf32_arm_vxworks_link_hash_table_create): New function.
2594 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2595 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2596 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2598 2005-01-06 Alan Modra <amodra@bigpond.net.au>
2600 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2602 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2603 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2604 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2605 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2606 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2607 (toc_adjusting_stub_needed): Rewrite.
2608 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2609 toc tests. Adjust for toc_adjusting_stub_needed changes.
2610 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2611 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2612 * section.c: Expand comment on backend bits.
2613 * bfd-in2.h: Regenerate.
2614 * libbfd.h: Regenerate.
2616 2005-01-06 Alan Modra <amodra@bigpond.net.au>
2618 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2619 toc adjusting stub, do not test source section flags.
2621 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
2623 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2624 from STABS debugging sections again.
2626 2005-01-05 Fred Fish <fnf@specifixinc.com>
2628 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2629 (find_abstract_instance_name): New function.
2630 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2631 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2632 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2634 2004-12-31 Paul Brook <paul@copdesourcery.com>
2636 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2638 2004-12-31 Alan Modra <amodra@bigpond.net.au>
2640 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2641 Commit missing changes from 2004-12-22.
2642 * bfd-in2.h: Regenerate.
2644 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
2646 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2648 2004-12-21 Kris Warkentin <kewarken@qnx.com>
2650 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2651 Add 'base' argument for constructing register sections. Reformat.
2652 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2653 gp and fp regs. Reformat.
2655 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2657 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2658 * bfd-in2.h: Regenerate.
2659 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2660 (avr_reloc_map): Likewise.
2661 (avr_final_link_relocate): Likewise.
2663 2004-12-22 Alan Modra <amodra@bigpond.net.au>
2665 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2666 as-needed dynamic libs as undefined.
2667 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2668 libs when finding they are needed.
2670 2004-12-20 Alan Modra <amodra@bigpond.net.au>
2672 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2673 (opd_entry_value): Use opd_relocs if available.
2674 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2675 copy .opd relocations to opd_relocs.
2676 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2678 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
2680 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2681 * elf32-v850.c (v850_elf_howto_table): Add entry for
2682 R_V850_LO16_SPLIT_OFFSET.
2683 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2684 (v850_elf_perform_lo16_relocation): New function, extracted from...
2685 (v850_elf_perform_relocation): ...here. Use it to handle
2686 R_V850_LO16_SPLIT_OFFSET.
2687 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2688 R_V850_LO16_SPLIT_OFFSET.
2689 * libbfd.h, bfd-in2.h: Regenerate.
2691 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
2693 * config.bfd: Add s390x-ibm-tpf support.
2695 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
2697 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
2698 to prototype, to make hash info available.
2699 Prevent wrapped symbols from being adjusted twice.
2701 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
2703 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2704 overflow for calls to undefined weak symbols.
2706 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2708 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2709 canonical sections syms have a name.
2711 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2713 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2714 have been adjusted for output.
2715 (ppc64_elf_relocate_section): Mark sections with reloc_done.
2717 2004-12-10 Alan Modra <amodra@bigpond.net.au>
2719 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2720 add symtab_hdr param.
2721 (group_signature): Update calls.
2722 * elf-bfd.h (bfd_elf_sym_name): Update.
2723 * elf32-ppc.c (ppc_elf_relocate_section): Update.
2724 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2725 (ppc64_elf_relocate_section): Update.
2726 * elflink.c (elf_link_input_bfd): Update.
2728 2004-12-10 Jakub Jelinek <jakub@redhat.com>
2730 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2731 st_shndx on STT_SECTION sections.
2733 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
2735 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2736 ELF section symbols.
2738 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
2740 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2741 return a real value, unless it is a PLT symbol.
2742 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2745 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
2746 R_MIPS_JALR entry to 0.
2748 * archures.c: Define bfd_mach_mips9000.
2749 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
2750 (mips_set_isa_flags): Handle bfd_mach_mips9000.
2751 * cpu-mips.c (I_mips9000): Define.
2752 (arch_info_struct): Add case for bfd_mach_mips9000.
2753 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
2754 * bfd-in2.h: Regenerate.
2756 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
2758 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
2761 2004-12-07 Ben Elliston <bje@gnu.org>
2763 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
2765 2004-12-06 Daniel Jacobowitz <dan@debian.org>
2767 Suggested by Fergal Daly <fergal@esatclear.ie>:
2768 * simple.c (simple_dummy_multiple_definition): New function.
2769 (bfd_simple_get_relocated_section_contents): Use it.
2771 2004-12-03 Jan Beulich <jbeulich@novell.com>
2773 * elf.c (elf_find_function): Don't use the last file symbol ever,
2774 seen, but the last one seen prior to the symbol being reported.
2775 Don't report a filename at all for global symbols when that might
2778 2004-12-01 Paul Brook <paul@codesourcery.com>
2780 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
2781 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
2784 2004-12-01 Paul Brook <paul@codesourcery.com>
2786 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
2789 2004-11-30 Paul Brook <paul@codesourcery.com>
2791 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
2792 no_pipeline_knowledge
2793 (elf32_arm_link_hash_table_create): Ditto.
2794 (bfd_elf32_arm_process_before_allocation): Ditto.
2795 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
2797 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2799 * bfd-in2.h: Regenerate.
2801 2004-11-30 Randolph Chung <tausq@debian.org>
2803 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
2804 (elf32_hppa_grok_psinfo): New function.
2805 (elf_backend_grok_prstatus): Define.
2806 (elf_backend_grok_psinfo): Define.
2808 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
2811 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2813 2004-11-24 Paul Brook <paul@codesourcery.com>
2815 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
2817 2004-11-24 Paul Brook <paul@codesourcery.com>
2819 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
2820 (elf32_arm_swap_symbol_out): New function.
2821 (elf32_arm_size_info): Add.
2822 (elf_backend_size_info): Define.
2824 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2826 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
2829 2004-11-19 Alan Modra <amodra@bigpond.net.au>
2831 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
2832 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
2833 * nlmcode.h (nlm_write_object_contents): Warning fix.
2835 2004-11-18 Bob Wilson <bob.wilson@acm.org>
2837 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
2839 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2841 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
2842 (elf32_arm_plt_thumb_stub): New.
2843 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2845 (elf32_arm_link_hash_traverse): Fix typo.
2846 (elf32_arm_link_hash_table): Add obfd.
2847 (elf32_arm_link_hash_newfunc): Initialize new fields.
2848 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2849 (elf32_arm_link_hash_table_create): Initialize obfd.
2850 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2851 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2852 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2853 interworking BFD is not dynamic.
2854 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
2855 not emit glue for PLT references.
2856 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
2857 emit glue for PLT references. Support the Thumb PLT prefix.
2858 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
2860 (elf32_arm_check_relocs): Likewise.
2861 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
2863 (allocate_dynrelocs): Handle Thumb PLT references.
2864 (elf32_arm_finish_dynamic_symbol): Likewise.
2865 (elf32_arm_symbol_processing): New function.
2866 (elf_backend_symbol_processing): Define.
2868 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2870 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
2871 add_fde_encoding. Remove need_relative.
2872 * elf-eh-frame.c (extra_augmentation_string_bytes)
2873 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
2874 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
2875 in cases where the CIE has no existing 'R' augmentation. Use
2876 size_of_output_cie_fde when assigning offsets. Use the final offset
2877 as the new section size.
2878 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
2879 Account for any extra augmentation bytes in the returned offset.
2880 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
2881 moved before being modified. Pad growing entries with DW_CFA_nops.
2882 Add 'z' and 'R' augmentations as directed by add_augmentation_size
2883 and add_fde_encoding.
2885 2004-11-15 Mark Mitchell <mark@codesourcery.com>
2887 * elf32-arm.c (elf32_arm_relocate_section): Use
2888 arm_real_reloc_type.
2890 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2892 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
2893 for discard relocations; don't add an R_MIPS_NONE to the main body
2896 2004-11-04 Paul Brook <paul@codesourcery.com>
2898 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
2899 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
2900 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
2901 default version definition for unversioned symbols.
2902 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
2903 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
2904 _bfd_elf_slurp_version_tables. Set default version for unversioned
2907 2004-11-15 Paul Brook <paul@codesourcery.com>
2909 * elflink.c (elf_link_add_object_symbols): Don't assume version
2910 indices are consecutive.
2912 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
2914 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
2915 composite relocations against the personality data.
2917 2004-11-13 Paul Brook <paul@codesourcery.com>
2919 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
2920 R_ARM_PREL31 relocations to PLT entries.
2921 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
2922 (elf32_arm_check_relocs): Ditto.
2924 2004-11-12 Bob Wilson <bob.wilson@acm.org>
2926 * xtensa-isa.c (xtensa_interface_class_id): New.
2928 2004-11-11 Bob Wilson <bob.wilson@acm.org>
2930 * elf32-xtensa.c (property_table_compare): Remove assertion about
2931 entries with the same address and non-zero size.
2932 (xtensa_read_table_entries): Report such entries as errors.
2934 2004-11-11 Mark Mitchell <mark@codesourcery.com>
2936 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
2937 R_ARM_RELATIVE on Symbian OS.
2939 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2941 * som.c (som_bfd_print_private_bfd_data): New function.
2942 (som_object_setup): Save the auxiliary header. Don't assume that
2943 zero is an invalid entry point for a shared library.
2944 (som_object_p): Allocate the auxiliary header on the heap.
2946 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
2948 (elf32_arm_symbian_modify_segment_map): Likewise.
2950 2004-11-09 Daniel Jacobowitz <dan@debian.org>
2952 From David Poole <daveml@mbuf.com>:
2953 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
2954 (elf32_arm_size_dynamic_sections): Call it.
2956 2004-11-09 Alan Modra <amodra@bigpond.net.au>
2958 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
2959 (ALL_MACHINES_CFILES): Fix typo.
2960 * Makefile.in: Regenerate.
2961 * po/SRC-POTFILES.in: Regenerate.
2963 2004-11-08 Mark Mitchell <mark@codesourcery.com>
2965 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
2966 R_ARM_RELATIVE relocation for Symbian OS, mention the section
2967 symbol in the relocation.
2969 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
2970 Vineet Sharma <vineets@noida.hcltech.com>
2972 * coff-maxq.c: New File.
2973 * cpu-maxq.c: New File.
2974 * coffcode.h: Likewise.
2975 * config.bfd: Likewise.
2976 * configure.in (maxqcoff_vec): New target vector.
2977 * Makefile.am: Add support for maxq target.
2978 * configure.in: Likewise.
2979 * archures.c:. Likewise.
2980 * targets.c: Likewise.
2981 * bfd_in2.h : Regenerated.
2982 * Makefile.in: Regenerated.
2983 * configure: Regenerated.
2984 * doc/Makefile.in: Regenerated.
2986 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2988 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
2989 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
2990 C_NT_WEAK aux entries.
2991 (_bfd_coff_generic_relocate_section): Handle undefined
2994 2004-11-07 Andreas Schwab <schwab@suse.de>
2996 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
2997 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
2998 non-default visibility.
3000 2004-11-01 Mark Mitchell <mark@codesourcery.com>
3002 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
3004 (elf32_arm_symbian_modify_segment_map): Don't
3005 reset includes_filehdr and includes_phdrs here.
3007 2004-11-04 Daniel Jacobowitz <dan@debian.org>
3009 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3010 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3011 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3013 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3014 to a new removed list. Remove normal configuration stanzas.
3015 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3016 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3017 elfarm-nabi.lo with elf32-arm.lo.
3018 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3019 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3020 * elf32-arm.h: Remove.
3021 * elfarm-oabi.c: Remove.
3022 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3023 and bfd_elf32_littlearm_oabi_vec.
3024 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3026 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
3028 * config.bfd: Support crisv32-*-* like cris-*-*.
3029 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3030 (bfd_mach_cris_v10_v32): New macros.
3031 * cpu-cris.c: Tweak formatting.
3032 (get_compatible): New function.
3034 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3035 bfd_arch_info_type:s.
3036 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3037 get_compatible for member compatible and link bfd_cris_arch_v32 as
3039 * elf32-cris.c (cris_elf_pcrel_reloc)
3040 (cris_elf_set_mach_from_flags): New functions.
3041 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3042 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3043 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3044 numbers for bfd_mach_cris_v32.
3045 (PLT_ENTRY_SIZE_V32): New macro.
3046 (elf_cris_plt0_entry): Drop last comma in initializer.
3047 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3048 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3050 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3052 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3053 (elf_cris_finish_dynamic_sections): Similar.
3054 (elf_cris_adjust_dynamic_symbol): Similar.
3055 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3057 <switch with PIC relocs>: Emit error and return FALSE for
3058 bfd_mach_cris_v10_v32.
3059 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3060 Emit warning when generating textrel reloc.
3061 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3062 (cris_elf_final_write_processing): Set flags according to mach.
3063 (cris_elf_print_private_bfd_data): Display
3064 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3065 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3066 new_flags. Don't call cris_elf_final_write_processing. Don't
3067 look at the actual elf header flags at all; use
3068 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3069 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3071 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3072 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3073 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3074 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3075 * bfd-in2.h, libbfd.h: Regenerate.
3077 2004-11-04 Alan Modra <amodra@bigpond.net.au>
3079 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3080 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3082 (struct adjust_toc_info): New.
3083 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3085 2004-11-03 Bob Wilson <bob.wilson@acm.org>
3087 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3088 if there are no segments.
3090 2004-11-02 Daniel Jacobowitz <dan@debian.org>
3092 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3094 2004-11-02 Nick Clifton <nickc@redhat.com>
3096 * elf32-iq2000.c: Convert to ISO C90 formatting.
3098 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
3100 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
3102 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3104 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3105 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3106 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3108 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3110 * elf32-sh.c (tpoff): Take alignment into account.
3112 2004-10-28 Nick Clifton <nickc@redhat.com>
3114 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
3115 performing a relocatable link.
3116 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3117 for MIPS ports under Irix.
3119 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
3121 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3122 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3123 (elf32_arm_final_link_relocate): Ditto.
3124 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3125 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3126 (elf32_arm_adjust_dynamic_symbol): Ditto.
3127 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3128 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3129 (elf32_arm_r_howto): ... To here.
3130 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3132 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3135 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3136 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3137 and R_IA64_SECREL64LSB.
3139 2004-10-26 Paul Brook <paul@codesourcery.com>
3141 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3142 (bfd_elf_size_dynamic_sections): Create default version definition.
3143 (elf_link_output_extsym): Adjust for default symbol version.
3145 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3147 * mmo.c: Adjust to ISO C.
3149 * mmo.c (mmo_write_section_description): New function broken out
3150 of mmo_internal_write_section.
3151 (mmo_internal_write_section): For each of .text and .data, call
3152 mmo_write_section_description before outputting contents if it has
3153 nontrivially deducible vma or contents.
3154 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3155 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3156 symbols if found within the .data address range.
3158 2004-10-24 Daniel Jacobowitz <dan@debian.org>
3160 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3162 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3164 * mmo.c (File Layout): Correct place of misplaced blurb about
3167 2004-10-22 Mark Kettenis <kettenis@gnu.org>
3169 * config.bfd: Add mips64*-*-openbsd.
3171 2004-10-21 Bob Wilson <bob.wilson@acm.org>
3173 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3176 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3178 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3179 * configure: Regenerate.
3181 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3184 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3185 to linker reloc_overflow callback.
3186 (aout_link_input_section_ext): Likewise.
3187 (aout_link_reloc_link_order): Likewise.
3188 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3189 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3191 (alpha_relocate_section): Likewise.
3192 * coff-arm.c (coff_arm_relocate_section): Likewise.
3193 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3194 * coff-h8500.c (extra_case): Likewise.
3195 * coff-i960.c (coff_i960_relocate_section): Likewise.
3196 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3197 * coff-mips.c (mips_relocate_section): Likewise.
3198 * coff-or32.c (coff_or32_relocate_section): Likewise.
3199 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3200 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3201 * coff-sh.c (sh_relocate_section): Likewise.
3202 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3203 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3204 * coff-z8k.c (extra_case): Likewise.
3205 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3206 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3207 (_bfd_coff_generic_relocate_section): Likewise.
3208 * ecoff.c (ecoff_reloc_link_order): Likewise.
3209 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3210 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3211 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3212 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3213 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3214 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3215 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3216 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3217 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3218 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3219 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3220 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3221 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3222 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3223 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3224 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3225 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3226 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3227 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3228 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3229 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3230 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3231 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3232 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3233 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3234 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3235 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3236 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3237 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3238 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3239 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3240 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3241 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3242 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3243 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3244 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3245 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3246 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3247 * elflink.c (elf_reloc_link_order): Likewise.
3248 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3249 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3250 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3251 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3252 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3253 (aout_link_reloc_link_order): Likewise.
3254 * reloc.c (bfd_generic_get_relocated_section_contents):
3256 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3257 * simple.c (simple_dummy_reloc_overflow): Updated.
3259 2004-10-20 Andreas Schwab <schwab@suse.de>
3261 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3262 (elf_backend_plt_sym_val): Define.
3264 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3266 * config.bfd: Set targ_underscore=yes for PE COFF targets
3268 2004-10-19 Alan Modra <amodra@bigpond.net.au>
3270 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3271 (ppc64_elf_edit_opd): Likewise.
3273 2004-10-18 Mark Mitchell <mark@codesourcery.com>
3275 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3276 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3277 set SEC_ALLOC and SEC_LOAD.
3279 2004-10-18 Nick Clifton <nickc@redhat.com>
3281 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3282 'name' for relocs against both local and global symbols.
3284 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3286 * bfd-in2.h: Regenerate.
3287 * bfd.c (struct bfd): Add no_export.
3288 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3290 2004-10-15 Alan Modra <amodra@bigpond.net.au>
3292 * config.bfd: Whitespace cleanup.
3293 * Makefile.am: Run "make dep-am"
3294 * Makefile.in: Regenerate.
3296 2004-10-15 Jakub Jelinek <jakub@redhat.com>
3298 * elflink.c (struct already_linked_section): Removed.
3299 (try_match_symbols_in_sections, already_linked): Removed.
3300 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3301 prefix of section names when finding already_linked_table
3302 chain. Compare section names. Instead of calling already_linked,
3303 do it inline and only for sections in the same already_linked_list.
3305 2004-10-15 Alan Modra <amodra@bigpond.net.au>
3307 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3308 parameter. If called after _bfd_elf_write_section_eh_frame,
3309 don't allow a -2 return unless need_* bit is already set, and
3310 handle offsets adjusted for output_offset.
3311 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3312 * elf.c (_bfd_elf_section_offset): Update call.
3314 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3317 * coffcode.h (coff_compute_section_file_positions): Cast to
3318 bfd_vma when computing page alignment.
3320 2004-10-13 Mark Mitchell <mark@codesourcery.com>
3322 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3323 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3325 2004-10-12 Mark Mitchell <mark@codesourcery.com>
3327 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3328 relocations use a virtual address, not a section offset.
3330 2004-10-12 Bob Wilson <bob.wilson@acm.org>
3332 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3333 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3334 xtensa_format_encode.
3335 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3336 (ebb_add_proposed_action): Delete.
3338 2004-10-12 Bob Wilson <bob.wilson@acm.org>
3340 * elf32-xtensa.c: Use ISO C90 formatting.
3342 2004-10-12 Paul Brook <paul@codesourcery.com>
3344 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3347 2004-10-12 Paul Brook <paul@codesourcery.com>
3349 * elf32-arm.h: Support EABI version 4 objects.
3351 2004-10-12 Alan Modra <amodra@bigpond.net.au>
3354 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3355 Don't mark as default.
3356 (bfd_x86_64_arch): Don't mark as default.
3358 2004-10-12 Alan Modra <amodra@bigpond.net.au>
3360 * elflink.c (enum action_discarded): New.
3361 (elf_section_complain_discarded): Delete.
3362 (elf_action_discarded): New function subsuming the above and also
3363 controlling reloc behaviour.
3364 (elf_link_input_bfd): Use it.
3366 2004-10-11 Jakub Jelinek <jakub@redhat.com>
3368 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3369 (special_sections): Add .gnu.liblist and .gnu.conflict.
3370 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3372 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3375 * elflink.c (elf_link_input_bfd): Try harder to support
3376 relocations against symbols in removed linkonce sections.
3378 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3380 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3383 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3384 sections do not reference symbols in non-SEC_ALLOC sections.
3386 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3389 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3390 (_bfd_elf_link_omit_section_dynsym): Formatting.
3392 2004-10-10 Alan Modra <amodra@bigpond.net.au>
3394 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3395 * libbfd.h: Regnerate.
3396 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3397 * elf32-frv.c: Likewise.
3398 * elf32-m32r.c: Likewise.
3399 * elf32-ppc.c: Likewise.
3400 * elf64-hppa.c: Likewise.
3401 * elfxx-ia64.c: Likewise.
3402 * opncls.c: Likewise.
3404 2004-10-10 Alan Modra <amodra@bigpond.net.au>
3406 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3407 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3408 offsets stored in struct eh_cie_fde entries before doing other
3411 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3412 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3413 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3414 setting offsets for removed CIEs. Don't set "sec", instead set
3415 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3416 CIE in hdr_info. Only set make_relative and make_lsda_relative
3417 for CIEs. Use pointers rather than array indices.
3418 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3419 make_lsda_relative, need_* on cie_inf for FDEs.
3420 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3421 section output_offset. Delete cie_offset, instead use cie_inf
3422 pointer to CIE entry. Use need_relative and need_lsda_relative on
3423 CIE entry for FDEs. Use pointers rather than array indices.
3425 2004-10-09 Alan Modra <amodra@bigpond.net.au>
3427 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3428 bfd_is_target_special_symbol.
3429 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3430 * som.c (som_bfd_is_target_special_symbol): Define.
3432 2004-10-08 Nick Clifton <nickc@redhat.com>
3434 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3435 * configure: Regenerate.
3436 * bfd-in2.h: Regenerate.
3437 * syms.c (bfd_is_target_special_symbol): New interface function.
3438 Returns true when a symbol should be considered to be special.
3439 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3440 the symbol jump table.
3441 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3442 Return true iff the symbol is a mapping symbol.
3443 (bfd_elf32_bfd_is_target_special_symbol): Define.
3444 * elfxx-target.h: Provide a default definition for
3445 bfd_is_target_special_symbol.
3446 * aout-target.h: Likewise.
3447 * aout-tic30.c: Likewise.
3448 * binary.c: Likewise.
3449 * coffcode.h: Likewise.
3450 * i386msdos.c: Likewise.
3453 * libaout.h: Likewise.
3454 * libbfd-in.h: Likewise
3455 * libecoff.h: Likewise.
3456 * mach-o.c: Likewise.
3458 * nlm-target.h: Likewise.
3459 * oasys.c: Likewise.
3461 * ppcboot.c: Likewise.
3463 * tekhex.c: Likewise.
3464 * versados.c: Likewise.
3466 * xcoff-target.h: Likewise.
3468 * libbfd.h: Regenerate.
3470 2004-10-08 Daniel Jacobowitz <dan@debian.org>
3472 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3473 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3474 (elf_backend_section_from_shdr): Define.
3476 2004-10-08 Alan Modra <amodra@bigpond.net.au>
3478 * syms.c (bfd_is_local_label): Return false for file symbols.
3480 2004-10-07 Bob Wilson <bob.wilson@acm.org>
3481 David Heine <dlheine@tensilica.com>
3483 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3484 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3485 (elf32xtensa_no_literal_movement): New global variable.
3486 (elf_howto_table): Add entries for new relocations.
3487 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3488 (property_table_compare): When addresses are equal, compare sizes and
3489 various property flags.
3490 (property_table_matches): New.
3491 (xtensa_read_table_entries): Extend to read new property tables. Add
3492 output_addr parameter to indicate that output addresses should be used.
3493 Use bfd_get_section_limit.
3494 (elf_xtensa_find_property_entry): New.
3495 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3496 (elf_xtensa_check_relocs): Handle new relocations.
3497 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3498 relocations. Use new xtensa-isa.h functions.
3499 (build_encoding_error_message): Remove encode_result parameter. Add
3500 new target_address parameter used to detect alignment errors.
3501 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3502 error handling. Use new is_operand_relocation function.
3503 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3504 Use underbar macro for error messages. Formatting.
3505 (get_const16_opcode): New.
3506 (get_l32r_opcode): Add a separate flag for initialization.
3507 (get_relocation_opnd): Operand number is no longer explicit in the
3508 relocation. Change to decode the opcode and analyze its operands.
3509 (get_relocation_slot): New.
3510 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3511 Use new xtensa-isa.h functions to handle multislot instructions.
3512 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3513 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3514 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3515 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3516 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3517 get_single_format, init_op_single_format_table): New.
3518 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3519 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3520 (contract_asm_expansion): Add error_message parameter and pass it to
3521 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3522 with R_XTENSA_SLOT0_OP.
3523 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3524 instructions. Use new xtensa-isa.h functions.
3525 (r_reloc struct): Add new virtual_offset field.
3526 (r_reloc_init): Add contents and content_length parameters. Set
3527 virtual_offset field to zero. Add contents to target_offset field for
3528 partial_inplace relocations.
3529 (r_reloc_is_defined): Check for null.
3530 (print_r_reloc): New debug function.
3531 (source_reloc struct): Replace xtensa_operand field with pair of the
3532 opcode and the operand position. Add is_abs_literal field.
3533 (init_source_reloc): Specify operand by opcode/position pair. Set
3534 is_abs_literal field.
3535 (source_reloc_compare): When target_offsets are equal, compare other
3536 fields to make sorting predictable.
3537 (literal_value struct): Add is_abs_literal field.
3538 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3539 (init_literal_value): New.
3540 (is_same_value): Replace with ...
3541 (literal_value_equal): ... this function. Add comparisons of
3542 virtual_offset and is_abs_literal fields.
3543 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3544 failure. Initialize has_last_loc field.
3545 (value_map_hash_table_delete): New.
3546 (hash_literal_value): Rename to ...
3547 (literal_value_hash): ... this. Include is_abs_literal flag and
3548 virtual_offset field in the hash value.
3549 (get_cached_value): Rename to ...
3550 (value_map_get_cached_value): ... this. Update calls to
3551 literal_value_hash and literal_value_equal.
3552 (add_value_map): Check for allocation failure. Update calls to
3553 value_map_get_cached_value and literal_value_hash.
3554 (text_action, text_action_list, text_action_t): New types.
3555 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3556 text_action_add, text_action_add_literal, offset_with_removed_text,
3557 offset_with_removed_text_before_fill, find_insn_action,
3558 print_action_list, print_removed_literals): New.
3559 (offset_with_removed_literals): Delete.
3560 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3561 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3562 allocated_relocs_count fields.
3563 (init_xtensa_relax_info): Initialize new fields.
3564 (reloc_bfd_fix struct): Add new translated field.
3565 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3567 (fix_compare, cache_fix_array): New.
3568 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3569 section via get_xtensa_relax_info. Use cache_fix_array to set up
3570 sorted fix_array and use bsearch instead of linear search.
3571 (section_cache_t): New struct.
3572 (init_section_cache, section_cache_section, clear_section_cache): New.
3573 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3574 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3575 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3576 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3578 (retrieve_contents): Use bfd_get_section_limit.
3579 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3580 to compute_removed_literals. Free value_map_hash_table when no longer
3582 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3583 compute_text_actions for all sections.
3584 (find_relaxable_sections): Mark sections as relaxable if they contain
3585 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3586 call. Increment relax_info src_count field only for appropriate
3587 relocation types. Remove is_literal_section check.
3588 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3589 r_reloc_init and find_associated_l32r_irel. Check
3590 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3591 literals. Pass is_abs_literal flag to init_source_reloc.
3592 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3593 CONST16 instructions. Adjust calls to r_reloc_init and
3594 pcrel_reloc_fits. Handle weak symbols conservatively.
3595 (find_associated_l32r_irel): Add bfd parameter and pass it to
3597 (compute_text_actions, compute_ebb_proposed_actions,
3598 compute_ebb_actions, check_section_ebb_pcrels_fit,
3599 check_section_ebb_reduces, text_action_add_proposed,
3600 compute_fill_extra_space): New.
3601 (remove_literals): Replace with ...
3602 (compute_removed_literals): ... this function. Call
3603 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3604 Call xtensa_read_table_entries to get the property table. Skip
3605 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3606 is_removable_literal, remove_dead_literal, and
3607 identify_literal_placement functions.
3608 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3609 instead of linear search.
3610 (is_removable_literal, remove_dead_literal,
3611 identify_literal_placement): New.
3612 (relocations_reach): Update check for literal not referenced by any
3613 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3614 (coalesce_shared_literal, move_shared_literal): New.
3615 (relax_section): Use bfd_get_section_limit. Call
3616 translate_section_fixes. Update calls to r_reloc_init and
3617 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3618 Add call to pin_internal_relocs. Add special handling for
3619 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3620 info to calculate new addend_displacement variable. Replace code for
3621 deleting literals with more general code to perform the actions
3622 determined by the action_list for the section.
3623 (translate_section_fixes, translate_reloc_bfd_fix): New.
3624 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3625 find_removed_literal only if is_operand_relocation. Update call to
3626 offset_with_removed_text. Use new target_offset and removed_bytes
3628 (move_literal): New.
3629 (relax_property_section): Use bfd_get_section_limit. Set new
3630 is_full_prop_section flag and handle new property tables. Update calls
3631 to r_reloc_init and offset_with_removed_text. Check
3632 is_relaxable_asm_section flag. Handle expansion of zero-sized
3633 unreachable entries, with use of offset_with_removed_text_before_fill.
3634 For relocatable links, combine entries only for literal tables.
3635 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3636 calls to offset_with_removed_text. Translate st_size field for
3638 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3639 failure. Add contents parameter. Update call to get_bfd_fix. Update
3640 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3641 R_XTENSA_ASM_EXPAND relocs.
3642 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3643 call to get_bfd_fix. Include offset from contents for partial_inplace
3645 (is_reloc_sym_weak): New.
3646 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3647 (prop_sec_len): New.
3648 (xtensa_is_property_section): Handle new property sections.
3649 (is_literal_section): Delete.
3650 (internal_reloc_compare): When r_offset matches, compare r_info and
3651 r_addend to make sorting predictable.
3652 (internal_reloc_matches): New.
3653 (xtensa_get_property_section_name): Handle new property sections.
3654 (xtensa_get_property_predef_flags): New.
3655 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3656 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3657 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3658 (xtisa_errno, xtisa_error_msg): New variables.
3659 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3660 (xtensa_insnbuf_alloc): Add error handling.
3661 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3662 use xtensa_format_decode. Add error handling.
3663 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3664 instruction length to find the number of bytes to copy.
3665 (xtensa_isa_init): Add error handling. Replace calls to
3666 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3667 tables in the xtensa_modules structure.
3668 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3669 xtensa_extend_isa): Delete.
3670 (xtensa_isa_free): Change to only free lookup tables.
3671 (opname_lookup_compare): Replace with ...
3672 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3673 (xtensa_insn_maxlength): Rename to ...
3674 (xtensa_isa_maxlength): ... this.
3675 (xtensa_insn_length): Delete.
3676 (xtensa_insn_length_from_first_byte): Replace with ...
3677 (xtensa_isa_length_from_chars): ... this function.
3678 (xtensa_num_opcodes): Rename to ...
3679 (xtensa_isa_num_opcodes): ... this.
3680 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3681 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3682 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3683 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3684 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3685 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3686 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3687 (xtensa_opcode_lookup): Add error handling.
3688 (xtensa_decode_insn): Replace with ...
3689 (xtensa_opcode_decode): ... this function, with new format and
3690 slot parameters. Add error handling.
3691 (xtensa_encode_insn): Replace with ...
3692 (xtensa_opcode_encode): ... this function, which does the encoding via
3693 one of the entries in the "encode_fns" array. Add error handling.
3694 (xtensa_opcode_name): Add error handling.
3695 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3696 xtensa_opcode_is_call): New.
3697 (xtensa_num_operands): Replace with ...
3698 (xtensa_opcode_num_operands): ... this function. Add error handling.
3699 (xtensa_opcode_num_stateOperands,
3700 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3701 xtensa_opcode_funcUnit_use, xtensa_operand_name,
3702 xtensa_operand_is_visible): New.
3703 (xtensa_get_operand, xtensa_operand_kind): Delete.
3704 (xtensa_operand_inout): Add error handling and special-case for
3706 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3707 operate on one slot of an instruction. Added error handling.
3708 (xtensa_operand_encode): Handle default operands with no encoding
3709 functions. Check for success by comparing against decoded value.
3711 (xtensa_operand_decode): Handle default operands. Return decoded value
3712 through argument pointer. Add error handling.
3713 (xtensa_operand_is_register, xtensa_operand_regfile,
3714 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3715 (xtensa_operand_isPCRelative): Rename to ...
3716 (xtensa_operand_is_PCrelative): ... this. Add error handling.
3717 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3718 through argument pointer. Add error handling.
3719 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3720 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3721 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3722 xtensa_regfile_shortname, xtensa_regfile_view_parent,
3723 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3724 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3725 xtensa_state_is_exported, xtensa_sysreg_lookup,
3726 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3727 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3728 xtensa_interface_num_bits, xtensa_interface_inout,
3729 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3730 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3731 * xtensa-modules.c: Rewrite to use new data structures.
3732 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3733 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3734 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3735 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3736 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3737 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3738 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3739 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3740 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3741 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3742 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3743 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3744 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3745 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
3746 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
3747 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
3748 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
3749 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
3750 * Makefile.in: Regenerate.
3751 * bfd-in2.h: Likewise.
3752 * libbfd.h: Likewise.
3754 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
3756 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
3757 against the absolute section.
3758 (mips_elf64_write_rela): Likewise.
3760 2004-10-07 Jan Beulich <jbeulich@novell.com>
3762 * elf.c (elf_find_function): Don't generally check for matching
3763 section, just for non-file symbols. Remove redunant comparison
3765 * elf32-arm.h (arm_elf_find_function): Likewise.
3767 2004-10-07 Jeff Baker <jbaker@qnx.com>
3769 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
3770 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
3773 2004-10-04 Roland McGrath <roland@redhat.com>
3775 * hash.c (bfd_hash_set_default_size): Use const for table.
3776 Use size_t instead of int for variable compared to sizeof results.
3778 2004-10-05 Alan Modra <amodra@bigpond.net.au>
3781 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
3783 2004-10-01 Paul Brook <paul@codesourcery.com>
3785 * elf32-arm.h (elf32_arm_fake_sections,
3786 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
3788 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
3790 2004-10-01 Alan Modra <amodra@bigpond.net.au>
3792 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
3794 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
3795 need_relative or need_lsda_relative if we are processing an
3796 offset for a reloc on a FDE initial loc or LSDA field
3798 (_bfd_elf_write_section_eh_frame): Test need_relative and
3799 need_lsda_relative in place of corresponding make_* field
3800 when deciding to use pc-relative encodings.
3802 2004-09-30 Paul Brook <paul@codesourcery.com>
3804 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
3805 target2 relocation type.
3807 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
3810 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
3812 2004-09-30 Paul Brook <paul@codesourcery.com>
3814 * reloc.c: Add BFD_RELOC_ARM_SMI.
3815 * bfd-in2.h: Regenerate.
3818 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3820 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
3821 vma and output offset to address.
3822 * simple.c (simple_save_output_info): Only set output section
3823 and offset for debug sections, or those not already set up by
3825 (bfd_simple_get_relocated_section_contents): Update comment.
3827 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3829 * elf.c (IS_LOADED): Delete.
3830 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
3831 Restore SEC_HAS_CONTENTS test to the one place it was used prior
3834 2004-09-23 Alan Modra <amodra@bigpond.net.au>
3837 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3838 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
3839 redundant assignment of EM_SPARC.
3841 2004-09-22 Brian Ford <ford@vss.fsi.com>
3843 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3844 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3846 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3848 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3850 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3851 (elf_backend_modify_segment_map): Don't define.
3853 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3855 * elf.c (IS_LOADED): Define.
3856 (assign_file_positions_for_segments): Don't round up file offset of
3857 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
3858 Delete code handling link script adjustment of lma. Do the adjust
3859 in later code handling similar ajustments. Remove dead code error
3860 check. Warn if section lma would require a negative offset
3861 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
3862 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
3863 update voff in section loop. Change voff in segment loop to be an
3864 adjustment on top of "off". Set sec->filepos and update "off" later.
3865 Test for loadable sections consistently using IS_LOADED. Similarly,
3866 test for alloc-only sections other than .tbss consistently.
3867 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
3868 Tidy PT_NOTE handling. Use %B and %A in error messages.
3869 (assign_file_positions_except_relocs): Use %B in error message.
3871 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
3873 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
3874 (CONFIG_STATUS_DEPENDENCIES): New.
3875 (Makefile): Removed.
3876 (config.status): Likewise.
3877 * Makefile.in: Regenerated.
3879 2004-09-17 Paul Brook <paul@codesourcery.com>
3881 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
3882 (bfd_elf32_arm_process_before_allocation): Update prototype.
3883 * bfd-in2.h: Regenerate.
3884 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
3885 (elf32_arm_link_hash_table_create): Set it.
3886 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
3887 (bfd_elf32_arm_set_target_relocs): New function.
3888 (arm_real_reloc_type): New function.
3889 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
3890 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
3891 (elf32_arm_gc_sweep_hook): Ditto.
3892 (elf32_arm_check_relocs): Ditto.
3893 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
3894 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
3896 (elf32_arm_got_prel): New variable.
3897 (elf32_arm_howto_from_type): New function.
3898 (elf32_arm_info_to_howto): Use it.
3899 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
3900 BFD_RELOC_ARM_TARGET2.
3901 * libbfd.h: Regenerate.
3902 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
3904 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3906 * ecoff.c: Update u.undef.next refs.
3907 * elf64-ppc.c: Likewise.
3908 * elflink.c: Likewise.
3909 * linker.c: Likewise.
3910 * xcofflink.c: Likewise.
3912 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
3913 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
3914 fields to indirect struct.
3915 * elf-m10300.c: Update u.weakdef refs.
3916 * elf32-arm.h: Likewise.
3917 * elf32-cris.c: Likewise.
3918 * elf32-frv.c: Likewise.
3919 * elf32-hppa.c: Likewise.
3920 * elf32-i370.c: Likewise.
3921 * elf32-i386.c: Likewise.
3922 * elf32-m32r.c: Likewise.
3923 * elf32-m68k.c: Likewise.
3924 * elf32-ppc.c: Likewise.
3925 * elf32-s390.c: Likewise.
3926 * elf32-sh.c: Likewise.
3927 * elf32-sparc.c: Likewise.
3928 * elf32-vax.c: Likewise.
3929 * elf32-xtensa.c: Likewise.
3930 * elf64-alpha.c: Likewise.
3931 * elf64-hppa.c: Likewise.
3932 * elf64-ppc.c: Likewise.
3933 * elf64-s390.c: Likewise.
3934 * elf64-sh64.c: Likewise.
3935 * elf64-sparc.c: Likewise.
3936 * elf64-x86-64.c: Likewise.
3937 * elfxx-ia64.c: Likewise.
3938 * elfxx-mips.c: Likewise.
3939 * elflink.c: Likewise. Also u.elf_hash_value.
3940 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
3942 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3943 (bfd_elf_gc_record_vtinherit): Alloc vtable.
3944 (bfd_elf_gc_record_vtentry): Likewise.
3945 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
3947 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3949 * Makefile.am: Run "make dep-am".
3950 * Makefile.in: Regenerate.
3951 * bfd-in2.h: Regenerate.
3952 * po/SRC-POTFILES.in: Regenerate.
3953 * po/bfd.pot: Regenerate.
3955 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3957 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
3958 with bitfields. Make "type" and "other" bitfields too.
3959 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
3960 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
3961 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
3962 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
3963 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
3964 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
3965 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
3966 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
3967 * elf-hppa.h: Update all uses of elf_link_hash_flags.
3968 * elf-m10300.c: Likewise.
3970 * elf32-arm.h: Likewise.
3971 * elf32-cris.c: Likewise.
3972 * elf32-frv.c: Likewise.
3973 * elf32-hppa.c: Likewise.
3974 * elf32-i370.c: Likewise.
3975 * elf32-i386.c: Likewise.
3976 * elf32-m32r.c: Likewise.
3977 * elf32-m68k.c: Likewise.
3978 * elf32-ppc.c: Likewise.
3979 * elf32-s390.c: Likewise.
3980 * elf32-sh-symbian.c: Likewise.
3981 * elf32-sh.c: Likewise.
3982 * elf32-sh64.c: Likewise.
3983 * elf32-sparc.c: Likewise.
3984 * elf32-vax.c: Likewise.
3985 * elf32-xtensa.c: Likewise.
3986 * elf64-alpha.c: Likewise.
3987 * elf64-hppa.c: Likewise.
3988 * elf64-ppc.c: Likewise.
3989 * elf64-s390.c: Likewise.
3990 * elf64-sh64.c: Likewise.
3991 * elf64-sparc.c: Likewise.
3992 * elf64-x86-64.c: Likewise.
3993 * elflink.c: Likewise.
3994 * elfxx-ia64.c: Likewise.
3995 * elfxx-mips.c: Likewise.
3996 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
3997 * configure: Regenerate.
3998 * aclocal.m4: Regenerate.
4000 2004-09-16 Alan Modra <amodra@bigpond.net.au>
4002 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4003 around uses of R_ARM_TARGET1.
4004 (elf32_arm_check_relocs): Likewise.
4006 2004-09-13 Paul Brook <paul@codesourcery.com>
4008 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4010 * bfd-in2.h: Regenerate.
4011 * libbfd.h: Regenerate.
4012 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4013 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4014 (bfd_elf32_arm_process_before_allocation): Ditto.
4015 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4016 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4017 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4020 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4022 * hpux-core.c (thread_section_p): New function.
4023 (hpux_core_core_file_p): Fix computation of offset in call
4024 to bfd_seek. Create a ".reg" section from an arbitrary
4025 ".reg/<id>" section if none was created after having read
4028 2004-09-11 Andreas Schwab <schwab@suse.de>
4030 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4031 * aclocal.m4: Rebuild.
4032 * configure: Rebuild.
4034 2004-09-10 Joel Brobecker <brobecker@gnat.com>
4036 * section.c (bfd_sections_find_if): Fix parameter name in
4037 comment to match code.
4039 2004-09-10 Alan Modra <amodra@bigpond.net.au>
4041 * elf.c (assign_file_positions_except_relocs): Assign relocs
4042 stored in a bfd section.
4044 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
4046 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4047 h->gotplt_refcount to 0, not -1.
4049 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
4051 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4052 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4054 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4055 handle symbol visibility here.
4057 2004-09-07 Alan Modra <amodra@bigpond.net.au>
4059 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4060 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4062 (ppc_stub_name): Remove trailing "+0" on stub name.
4063 (create_linkage_sections): Create relocations for
4064 branch lookup table when --emit-relocs as well as when --shared.
4065 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4066 relbrlt test. For --emit-stub-syms, always output a sym even when
4067 one already exists on a plt call stub. Put stub type in the stub
4069 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4071 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4072 reloc_count in stub sections. Adjust relbrlt test.
4073 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4074 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4075 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4076 for relocs against discarded symbols. Fix comments.
4078 2004-09-06 Mark Mitchell <mark@codesourcery.com>
4080 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4081 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4083 (map_sections_to_segments): ... here. Use it. Assign a file
4084 position to the .dynamic section if it is not loadable, but part
4085 of the PT_DYNAMIC segment.
4086 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4087 offsets, not VMAs, for the BPABI. Do not fill in the header in
4088 the .got.plt section for the BPABI.
4089 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4091 (elf_backend_want_got_plt): Define to zero for Symbian OS.
4093 2004-09-06 Nick Clifton <nickc@redhat.com>
4095 * elflink.c (elf_link_add_object_symbols): Set the error code to
4096 bfd_error_wrong_format when the input format does not match the
4099 2004-09-06 Alan Modra <amodra@bigpond.net.au>
4101 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4102 (ppc64_elf_check_directives): ..here.
4103 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4104 before accessing ppc64_elf_tdata.
4105 (ppc64_elf_finish_dynamic_sections): And here too.
4107 2004-09-04 Alan Modra <amodra@bigpond.net.au>
4109 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4111 2004-09-03 Mark Mitchell <mark@codesourcery.com>
4113 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4114 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4115 (bfd_elf32_littlearm_symbian_vec): Likewise.
4116 * configure: Regenerated.
4117 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4118 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4119 (PLT_ENTRY_SIZE): Likewise.
4120 (bfd_vma_elf32_arm_symbian_plt_entry): New
4122 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4124 (create_got_section): Don't create sections when generating BPABI
4126 (elf32_arm_create_dynamic_sections): Tidy.
4127 (elf32_arm_link_hash_table_create): Set plt_header_size,
4128 plt_entry_size, and symbian_p.
4129 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4130 generating BPABI objects.
4131 (allocate_dynrelocs): Use htab->plt_header_size, not
4132 PLT_HEADER_SIZE. Do not add to .got.plt when
4133 generating BPABI objects.
4134 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4135 * elfarm-nabi.c: Add SymbianOS target vectors.
4136 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4137 (_bfd_elf_link_create_dynamic_sections): Likewise.
4138 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4139 (elfNN_bed): Use it.
4140 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4141 (bfd_elf32_littlearm_symbian_vec): Likewise.
4142 (_bfd_target_vector): Add them.
4144 2004-09-03 Nick Clifton <nickc@redhat.com>
4147 * coffcode.h (handle_COMDAT): Replace abort with an warning
4148 message and allow the scan to continue.
4150 2004-09-02 Alan Modra <amodra@bigpond.net.au>
4152 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4153 in when reading relocs, not our sorted syms. Remove unnecessary
4156 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4158 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4160 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4162 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4163 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4164 replace uses of *_alias with *_noncanonical.
4165 * aclocal.m4: Rebuild with aclocal 1.4p6.
4166 * Makefile.in: Rebuild with automake 1.4p6.
4167 * doc/Makefile.in: Rebuild with automake 1.4p6.
4168 * configure.in: Autoupdate with autoupdate 2.59.
4169 * config.in: Regenerate with autoheader 2.59.
4170 * configure: Regnerate with autoconf 2.59.
4172 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4174 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4175 symbol pointer arrays before modifying.
4177 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4179 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
4180 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4181 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4182 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
4183 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4184 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4185 Use both symbol tables on non-relocatable objects. Use a common
4186 error exit. Fix "mid" warning.
4187 * libbfd.h: Regenerate.
4188 * bfd-in2.h: Regenerate.
4190 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4192 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4194 (struct sfpr_def_parms): Save some space.
4195 (sfpr_define): Here too.
4197 * elf64-ppc.c (compare_symbols): Put section syms first.
4198 (sym_exists_at): New function.
4199 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4200 points only for relocatable files. Use .opd section contents
4201 otherwise. Generally clean up the code.
4203 2004-08-27 Alan Modra <amodra@bigpond.net.au>
4205 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4206 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4207 (struct sfpr_def_parms): New.
4208 (sfpr_define): New function.
4209 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4210 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4211 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4212 (savefpr1_tail, restfpr1_tail): New functions.
4213 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4214 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4215 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4216 code. Define all ABI mandated _save and _rest functions.
4218 2004-08-26 Paul Brook <paul@codesourcery.com>
4220 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
4222 2004-08-26 Alan Modra <amodra@bigpond.net.au>
4224 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4227 2004-08-26 Alan Modra <amodra@bigpond.net.au>
4229 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4230 that pcrel correction is applied for R_386_PC32.
4232 2004-08-25 Alan Modra <amodra@bigpond.net.au>
4234 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4235 for R_386_32 and R_386_PC32 relocs against symbols defined in
4238 2004-08-25 Dmitry Diky <diwil@spec.ru>
4240 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4241 Add new relocations.
4242 * bfd-in2.h: Regenerate.
4243 * libbfd.h: Regenerate.
4244 * elf32-msp430.c: Clean-up code.
4245 (elf_msp430_howto_table): Add new relocation entries.
4246 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4247 (msp430_elf_relax_section): New function.
4248 (msp430_elf_relax_delete_bytes): New function.
4249 (msp430_elf_symbol_address_p): New function.
4251 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4253 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4254 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4256 2004-08-20 Daniel Jacobowitz <dan@debian.org>
4258 * elflink.c (_bfd_elf_section_already_linked): Handle
4259 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4261 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4263 * config.bfd (arm*-*-symbianelf*): New target.
4264 (arm*-*-eabi*): Likewise.
4266 2004-08-19 Alan Modra <amodra@bigpond.net.au>
4268 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4269 "struct ppc_link_hash_entry *".
4270 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4271 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4273 2004-08-19 Jakub Jelinek <jakub@redhat.com>
4275 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4276 entries (where fd_aux overlaps next entry's fd_func).
4277 Add non_overlapping argument, use it.
4278 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4279 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4280 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4281 as indexes into opd_sym_map/opd_adjust array.
4282 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4284 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4286 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4287 if we can look up their function descriptor in a regular file.
4289 2004-08-18 Nick Clifton <nickc@redhat.com>
4292 * cofflink.c (coff_link_add_symbols): Check that the comdat
4293 pointer in the coff_section_data structure has been initialised
4296 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4299 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4300 changing bfd_link_hash_undefined to bfd_link_hash_new.
4302 2004-08-17 Jakub Jelinek <jakub@redhat.com>
4304 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4306 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4307 (synthetic_opd, synthetic_relocatable): New variables.
4308 (compare_symbols, compare_relocs): New helper routines.
4309 (ppc64_elf_get_synthetic_symtab): New function.
4310 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4312 * bfd-in2.h: Regenerated.
4313 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4314 to relsyms. Return 0 if abfd is relocatable.
4316 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4318 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4320 2004-08-17 Nick Clifton <nickc@redhat.com>
4322 * (is_arm_mapping_symbol_name): New function - return true
4323 when a symbol name matches the requirements for an ARM mapping
4325 (arm_elf_find_function): New function based on
4326 elf_find_function in elf.c but skipping ARM mapping symbols
4327 and including thumb function symbols.
4328 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4329 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4331 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4333 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4334 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4335 (ppc64_elf_brtaken_reloc): Here too.
4337 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4339 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4341 (ppc64_elf_check_directives): Check that we have the right hash
4342 table before proceeding.
4344 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4346 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4347 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4348 the sections that will be discarded.
4350 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4352 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4354 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4356 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4357 free space available.
4359 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4361 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
4362 occurrences with bfd_byte * thoughout file.
4364 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4365 (xcoff_write_armap_big): Likewise.
4366 (xcoff_write_archive_contents_old): Likewise.
4367 (xcoff_write_archive_contents_big): Likewise.
4369 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4371 2004-08-13 Nick Clifton <nickc@redhat.com>
4373 * elf32-arm.h: Convert to ISO C90.
4375 2004-08-13 Alan Modra <amodra@bigpond.net.au>
4378 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4381 2004-08-13 Alan Modra <amodra@bigpond.net.au>
4383 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4384 (bfd_archive_filename, bfd_get_section_ident): Delete.
4385 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4386 bfd_archive_filename.
4387 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4388 to warn about symbols in discarded sections. Use _bfd_error_handler.
4389 * aout-adobe.c (aout_adobe_callback): See below.
4390 * aout-cris.c (swap_ext_reloc_in): ..
4391 * coff-arm.c (find_thumb_glue, find_arm_glue,
4392 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4393 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4394 coff_arm_copy_private_bfd_data): ..
4395 * coff-i860.c (i860_reloc_processing): ..
4396 * coff-mcore.c (mcore_coff_unsupported_reloc,
4397 coff_mcore_relocate_section): ..
4398 * coff-ppc.c (coff_ppc_relocate_section): ..
4399 * coff-rs6000.c (xcoff_create_csect_from_smclas
4400 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4401 sh_swap_insns, sh_relocate_section): ..
4402 * coff-tic54x.c (tic54x_reloc_processing): ..
4403 * coff-tic80.c (coff_tic80_relocate_section): ..
4404 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4405 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4406 coff_slurp_symbol_table, coff_classify_symbol,
4407 coff_slurp_reloc_table): ..
4408 * coffgen.c (_bfd_coff_read_string_table): ..
4409 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4410 _bfd_coff_generic_relocate_section): ..
4411 * cpu-arm.c (bfd_arm_merge_machines): ..
4412 * cpu-sh.c (sh_merge_bfd_arch): ..
4413 * elf-hppa.h (elf_hppa_relocate_section): ..
4414 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4415 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4416 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4417 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4418 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4419 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4420 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4421 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4422 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4423 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4424 cris_elf_merge_private_bfd_data
4425 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4426 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4427 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4428 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4429 elf32_hppa_relocate_section): ..
4430 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4431 i370_elf_check_relocs, i370_elf_relocate_section): ..
4432 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4433 elf_i386_relocate_section): ..
4434 * elf32-m32r.c (m32r_elf_relocate_section,
4435 m32r_elf_merge_private_bfd_data): ..
4436 * elf32-m68hc1x.c (m68hc12_add_stub,
4437 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4438 * elf32-m68k.c (elf_m68k_relocate_section): ..
4439 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4440 mcore_elf_relocate_section): ..
4441 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4442 ppc_elf_check_relocs, ppc_elf_relocate_section,
4443 ppc_elf_begin_write_processing): ..
4444 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4445 elf_s390_relocate_section): ..
4446 * elf32-sh-symbian.c (sh_symbian_import_as,
4447 sh_symbian_process_embedded_commands,
4448 sh_symbian_relocate_section): ..
4449 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4450 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4451 sh_elf_merge_private_data): ..
4452 * elf32-sparc.c (elf32_sparc_check_relocs,
4453 elf32_sparc_relocate_section,
4454 elf32_sparc_merge_private_bfd_data): ..
4455 * elf32-v850.c (v850_elf_check_relocs,
4456 v850_elf_merge_private_bfd_data): ..
4457 * elf32-xtensa.c (elf_xtensa_check_relocs,
4458 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4459 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4460 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4461 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4462 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4463 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4464 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4465 ppc64_elf_relocate_section): ..
4466 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4467 elf_s390_relocate_section): ..
4468 * elf64-sh64.c (sh_elf64_relocate_section): ..
4469 * elf64-sparc.c (sparc64_elf_check_relocs,
4470 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4471 sparc64_elf_merge_private_bfd_data): ..
4472 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4473 elf64_x86_64_relocate_section): ..
4474 * elflink.c (_bfd_elf_add_default_symbol,
4475 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4476 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4477 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4478 elf_get_linked_section_vma, elf_fixup_link_order,
4479 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4480 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4481 * elfxx-ia64.c (elfNN_ia64_relax_section,
4482 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4483 * elfxx-mips.c (mips_elf_perform_relocation,
4484 _bfd_mips_elf_check_relocs,
4485 _bfd_mips_elf_merge_private_bfd_data): ..
4486 * ieee.c (ieee_slurp_external_symbols): ..
4487 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4488 * libbfd.c (_bfd_generic_verify_endian_match): ..
4489 * linker.c (_bfd_generic_link_add_one_symbol,
4490 _bfd_generic_section_already_linked): ..
4491 * pdp11.c (translate_to_native_sym_flags): ..
4492 * pe-mips.c (coff_pe_mips_relocate_section): ..
4493 * peicode.h (pe_ILF_build_a_bfd): ..
4494 * srec.c (srec_bad_byte): ..
4495 * stabs.c (_bfd_link_section_stabs): ..
4496 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4497 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4498 with corresponding %B and %A in _bfd_error_handler format string.
4499 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4500 calls to use %A and %B. Fix "against symbol .. from section" and
4501 similar error messages. Combine multiple _bfd_error_handler calls
4502 where they were separated due to bfd_archive_filename deficiencies.
4503 * bfd-in2.h: Regenerate.
4505 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4507 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4510 2004-08-10 Alan Modra <amodra@bigpond.net.au>
4512 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4513 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4514 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4516 (link_hash_newfunc): Init was_undefined.
4517 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4518 Use undefweak instead.
4519 (ppc64_elf_check_directives): Fix undefs chain.
4520 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4522 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4523 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4524 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4526 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4528 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4529 error, test input_section flags rather than sec.
4531 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4533 * elf-bfd.h (struct elf_backend_data): Add
4534 elf_backend_archive_symbol_lookup.
4535 (_bfd_elf_archive_symbol_lookup): Declare.
4536 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4537 (elf_link_add_archive_symbols): ..extracted from here. Call the
4539 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4540 (elfNN_bed): Init new field.
4541 * elf64-ppc.c (elf_backend_check_directives): Define.
4542 (elf_backend_archive_symbol_lookup): Define.
4543 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4544 a ppc_link_hash_entry pointer.
4546 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4547 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4548 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4549 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4550 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4551 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4552 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4555 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4557 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4558 (ppc64_elf_add_symbol_hook): Test for NULL section.
4559 (get_sym_h): Formatting.
4560 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4563 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4564 long branch stubs with code handling plt and r2off branch stubs.
4566 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4568 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4569 * elflink.c (elf_link_input_bfd): Formatting.
4570 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4572 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4573 (link_hash_newfunc): Don't set it.
4574 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4575 (ppc64_elf_mark_entry_syms): Delete.
4576 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4577 sections. Use get_opd_info.
4578 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4580 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4582 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4584 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4585 (func_desc_adjust): Don't set have_undefweak.
4586 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4587 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4589 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4590 "struct ppc_link_hash_entry *". Adjust all references.
4591 (ppc64_elf_hide_symbol): Correct a comment.
4593 * elf64-ppc.c (get_opd_info): New function.
4594 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4595 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4596 before calling get_fdh. Test fdh rather than h before dereferencing
4597 fdh. Mark removed symbols in opd_adjust.
4598 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4599 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4601 (ppc64_elf_output_symbol_hook): Likewise.
4603 2004-08-06 Paul Brook <paul@codesourcery.com>
4605 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4606 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4607 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4608 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4609 and BFD_RELOC_ARM_SBREL32.
4610 * bfd-in2.h, bbfd.h: Regenerate.
4612 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4614 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4615 the dynamic link symbol actually in use.
4617 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
4619 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4621 2004-07-31 Joel Brobecker <brobecker@gnat.com>
4622 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4624 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4625 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4627 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
4628 Nick Clifton <nickc@redhat.com>
4631 * bfd.c (_bfd_default_error_handler): Make it global.
4633 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4635 * elf.c (assign_section_numbers): Cope gracefully with sections
4636 which have SHF_LINK_ORDER set but no sh_link set up.
4637 * elflink.c (elf_get_linked_section_vma): Likewise.
4639 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4642 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4643 Set it to _bfd_default_error_handler.
4644 (elfNN_bed): Add elf_backend_link_order_error_handler.
4646 * libbfd-in.h (_bfd_default_error_handler): New.
4648 * libbfd.h: Regenerated.
4650 2004-07-30 Jakub Jelinek <jakub@redhat.com>
4652 * archures.c (bfd_mach_sparc_64bit_p): Define.
4653 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4654 * bfd-in2.h: Rebuilt.
4656 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
4658 Introduce SH2a support.
4659 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4660 * archures.c (bfd_mach_sh2a_nofpu): New.
4661 * bfd-in2.h: Rebuilt.
4662 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4663 (arch_info_struct): Add sh2a_nofpu.
4664 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4665 2003-12-29 DJ Delorie <dj@redhat.com>
4666 * reloc.c: Add relocs for sh2a.
4667 * bfd-in2.h: Regenerate.
4668 * libbfd.hh: Regenerate.
4669 2003-12-01 Michael Snyder <msnyder@redhat.com>
4670 * archures.c (bfd_mach_sh2a): New.
4671 * bfd-in2.h: Rebuilt.
4672 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4674 (arch_info_struct): Add sh2a.
4675 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4677 2004-07-28 Nick Clifton <nickc@redhat.com>
4678 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4681 * som.c (setup_sections): Improve estimation of space sizes in
4682 relocatable objects.
4684 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
4685 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4686 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4688 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4689 * configure: Regenerate.
4690 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4691 case that accepts OSABI=NetBSD and OSABI=SysV.
4692 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4693 the base of .got or .data (if .got does not exist).
4694 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4696 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4697 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4698 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4699 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4701 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
4704 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4705 (elf_sec_group): Defined.
4706 (bfd_elf_match_symbols_in_sections): New prototype.
4707 (_bfd_elf_setup_group_pointers): Likewise.
4709 * elf.c (bfd_elf_discard_group): Abort.
4710 (bfd_elf_set_group_contents): Also include relocation sections.
4711 Remove zero-fill for ld -r.
4712 (_bfd_elf_setup_group_pointers): New function.
4713 (elf_sort_elf_symbol): Likewise.
4714 (elf_sym_name_compare): Likewise.
4715 (bfd_elf_match_symbols_in_sections): Likewise.
4717 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4719 * elflink.c (match_group_member): New.
4720 (elf_link_input_bfd): Check group member for discarded section.
4721 (try_match_symbols_in_sections): New function.
4722 (already_linked): Likewise.
4723 (_bfd_elf_section_already_linked): Support mixing comdat group
4724 and linkonce section.
4726 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4727 * linker.c (bfd_section_already_linked_table_traverse): New.
4729 * libbfd.h: Regenerated.
4731 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
4733 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4734 BFD_RELOC_CRX_SWITCH32.
4735 * bfd-in2.h: Regenerate.
4736 * libbfd.h: Regenerate.
4737 * elf32-crx.c: Support relocation/relaxation of
4738 BFD_RELOC_CRX_SWITCH* types.
4740 2004-07-27 Alan Modra <amodra@bigpond.net.au>
4742 * elf64-ppc.c: Correct "Linker stubs" comment.
4744 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
4746 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
4748 (elf_linked_to_section): New.
4750 * elf.c (assign_section_numbers): Set up sh_link for
4753 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
4754 to sh_link for SHT_IA_64_UNWIND sections.
4756 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4758 * elflink.c (elf_fixup_link_order): Add _() to error message.
4760 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4762 * elflink.c (elf_fixup_link_order): Issue a warning and flag
4765 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
4767 * aout-adobe.c (aout_32_section_already_linked): Defined.
4768 * aout-target.h (MY_section_already_linked): Likewise.
4769 * aout-tic30.c (MY_section_already_linked): Likewise.
4770 * binary.c (binary_section_already_linked): Likewise.
4771 * bout.c (b_out_section_already_linked): Likewise.
4772 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
4773 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
4774 * coffcode.h (coff_section_already_linked): Likewise.
4775 * i386msdos.c (msdos_section_already_linked): Likewise.
4776 * i386os9k.c (os9k_section_already_linked): Likewise.
4777 * ieee.c (ieee_section_already_linked): Likewise.
4778 * ihex.c (ihex_section_already_linked): Likewise.
4779 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
4780 * mmo.c (mmo_section_already_linked): Likewise.
4781 * nlm-target.h (nlm_section_already_linked): Likewise.
4782 * oasys.c (oasys_section_already_linked): Likewise.
4783 * pef.c (bfd_pef_section_already_linked): Likewise.
4784 * ppcboot.c (ppcboot_section_already_linked): Likewise.
4785 * som.c (som_bfd_discard_group): Likewise.
4786 * srec.c (srec_section_already_linked): Likewise.
4787 * tekhex.c (tekhex_section_already_linked): Likewise.
4788 * versados.c (versados_section_already_linked): Likewise.
4789 * vms.c (vms_section_already_linked): Likewise.
4790 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
4791 * xsym.c (bfd_sym_section_already_linked): Likewise.
4793 * bfd-in.h (bfd_section_already_linked_table_init): New.
4794 (bfd_section_already_linked_table_free): Likewise.
4796 * coff-rs6000.c (rs6000coff_vec): Add
4797 _bfd_generic_section_already_linked.
4798 (pmac_xcoff_vec): Likewise.
4799 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4800 (aix5coff64_vec): Likewise.
4802 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
4803 * elflink.c (_bfd_elf_section_already_linked): New function.
4805 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
4807 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
4808 (_bfd_generic_section_already_linked): New.
4809 (bfd_section_already_linked_hash_entry): Likewise.
4810 (bfd_section_already_linked): Likewise.
4811 (bfd_section_already_linked_table_lookup): Likewise.
4812 (bfd_section_already_linked_table_insert): Likewise.
4814 * linker.c (bfd_section_already_linked): New.
4815 (_bfd_section_already_linked_table): Likewise.
4816 (bfd_section_already_linked_table_lookup): Likewise.
4817 (bfd_section_already_linked_table_insert): Likewise.
4818 (already_linked_newfunc): Likewise.
4819 (bfd_section_already_linked_table_init): Likewise.
4820 (bfd_section_already_linked_table_free): Likewise.
4821 (_bfd_generic_section_already_linked): Likewise.
4823 * section.c (bfd_section): Remove comdat.
4824 (bfd_comdat_info): Moved to ...
4825 * bfd-in.h (coff_comdat_info): Here.
4826 (bfd_coff_get_comdat_section): New.
4827 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
4828 * libcoff-in.h (coff_section_tdata): Add comdat.
4829 * coffcode.h (handle_COMDAT): Updated.
4830 * cofflink.c (coff_link_add_symbols): Likewise.
4831 * ecoff.c (bfd_debug_section): Likewise.
4833 * targets.c (bfd_target): Add _section_already_linked.
4834 (BFD_JUMP_TABLE_LINK): Updated.
4836 * bfd-in2.h: Regenerated.
4837 * libbfd.h: Likewise.
4838 * libcoff.h: Likewise.
4840 2003-07-21 Paul Brook <paul@codesourcery.com>
4842 * elflink.c (elf_get_linked_section_vma, compare_link_order,
4843 elf_fixup_link_order): New functions.
4844 (bfd_elf_final_link): Call elf_fixup_link_order.
4846 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
4848 * elf-bfd.h (ELF_COMMON_DEF_P): New.
4849 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4851 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4852 _bfd_elf_symbol_refs_local_p.
4853 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4856 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
4858 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
4860 (bfd_elf_get_dyn_lib_class): New prototype.
4861 * elf.c (bfd_elf_get_dyn_lib_class): New function.
4863 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
4864 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
4865 entry is needed. Issue an error if a DT_NEEDED entry is needed
4866 for a file marked DYN_NO_NEEDED.
4867 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
4870 * bfd-in2.h: Regenerated.
4872 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4874 * elflink.c (elf_section_complain_discarded): Don't complain in
4877 2004-07-10 James E Wilson <wilson@specifixinc.com>
4879 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
4880 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
4881 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
4882 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
4884 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
4885 bfd_put_64 to bfd_putl64.
4886 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
4888 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
4891 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
4892 .init/.fini sections when trying to relax it.
4894 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
4896 * elf.c (assign_file_positions_for_segments): Make sure the
4897 .dynamic section is the first section in the PT_DYNAMIC segment.
4899 2004-07-09 Nick Clifton <nickc@redhat.com>
4901 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
4902 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
4903 sh_elf_get_flags_from_mach functions so that they do not conflict
4904 when this target is built with other sh-elf targets.
4905 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
4906 suppression of this function.
4907 (sh_elf_find_flags): Likewise.
4909 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
4911 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
4912 (ALL_MACHINES_CFILES): Add cpu-crx.c.
4913 (BFD32_BACKENDS): Add elf32-crx.lo.
4914 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
4915 (cpu-crx.lo): New target.
4916 (elf32-crx.lo): New target.
4917 * Makefile.in: Regenerate.
4918 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
4919 (bfd_archures_list): Add bfd_crx_arch.
4920 * bfd-in2.h: Regenerate.
4921 * config.bfd: Handle crx-*-elf*, crx*.
4922 * configure.in: Handle bfd_elf32_crx_vec.
4923 * configure: Regenerate.
4924 * cpu-crx.c: New file.
4925 * elf32-crx.c: Likewise.
4926 * libbfd.h: Regenerate.
4927 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
4928 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
4929 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
4930 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
4931 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
4932 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
4933 * targets.c (bfd_elf32_crx_vec): Declare.
4934 (bfd_target_vector): Add bfd_elf32_crx_vec.
4936 2004-07-06 Nick Clifton <nickc@redhat.com>
4938 * config.bfd: Add sh-symbian-elf target.
4939 * configure.in: Add bfd_elf32_shl_symbian_vec.
4940 * configure: Regenerate.
4941 * elf-bfd.h (struct elf_backend_data): Add new field
4943 * elflink.c (elf_link_add_object_symbols): Invoke the
4944 check_directives function, if defined.
4945 * elfxx-target.h: Provide a default, NULL definition for
4947 * targets.c: Add bfd_elf32_shl_symbian_vec.
4948 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
4950 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
4951 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
4952 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
4953 not already been defined.
4954 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
4955 * sh-symbian.c: New file. Provide functions to support the
4956 * sh-symbian-elf target.
4957 * Makefile.am: Add elf32-sh-symbian.c
4958 * Makefile.in: Regenerate.
4960 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
4962 * elf32-sh.c: Include ../opcodes/sh-opc.h.
4963 * Makefile.am: Ran make dep-am.
4964 * Makefile.in: Ran make dep-in.
4966 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4968 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
4971 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4973 * config.bfd: Add want64 to configuration target s390-*-linux*.
4975 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
4977 * bfd.c (bfd_get_section_ident): New.
4979 * elflink.c (elf_link_read_relocs_from_section): Call
4980 bfd_get_section_ident to identify the section when reporting
4982 (_bfd_elf_link_output_relocs): Likewise.
4983 (elf_link_output_extsym): Likewise.
4984 (elf_link_input_bfd): Likewise.
4985 (bfd_elf_gc_record_vtinherit): Likewise.
4987 * bfd-in2.h: Regenerated.
4989 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
4990 Nick Clifton <nickc@redhat.com>
4993 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
4994 of section symbols to mips_elf_sort_hash_table ().
4996 2004-07-01 Alan Modra <amodra@bigpond.net.au>
4998 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5000 (elf_section_complain_discarded): New function. Handle
5001 .gcc_except_table too.
5002 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5003 in discarded sections.
5004 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5006 2004-06-30 James E Wilson <wilson@specifixinc.com>
5008 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5009 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5011 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5014 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5015 local references to discarded sections and report their
5018 2004-06-30 Alan Modra <amodra@bigpond.net.au>
5020 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5021 sec_info_type, test section name instead.
5023 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5026 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5027 in .init/.fini sections.
5029 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5031 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5032 bfd_get_section_limit.
5034 2004-06-29 Bob Wilson <bob.wilson@acm.org>
5036 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5037 output section size.
5039 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5041 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5043 (mmix_elf_perform_relocation): Adjust for above change.
5044 (mmix_elf_relocate_section): Likewise.
5045 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5046 (mmix_elf_get_section_contents): Delete.
5047 (bfd_elf64_get_section_contents): Delete.
5048 (mmix_elf_relocate_section): Zero stub area.
5049 * linker.c (default_indirect_link_order): Alloc max of section size
5051 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5052 * section.c (bfd_malloc_and_get_section): Likewise.
5053 (struct bfd_section): Update rawsize comment.
5054 * bfd-in2.h: Regenerate.
5056 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5058 2004-06-29 Alan Modra <amodra@bigpond.net.au>
5060 * bfd-in.h (bfd_get_section_limit): Define.
5061 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
5062 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5063 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5064 * coff-arm.c (coff_arm_relocate_section): Likewise.
5065 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5066 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5067 (bfd_ns32k_final_link_relocate): Likewise.
5068 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5069 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
5070 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
5071 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
5072 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
5073 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5074 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5075 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5076 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5077 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5078 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5079 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5080 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5081 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5082 * elf32-v850.c (v850_elf_reloc): Likewise.
5083 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5084 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5085 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5086 * elf64-mips.c (mips_elf64_gprel32_reloc)
5087 (mips16_gprel_reloc): Likewise.
5088 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5089 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5090 * elf64-sparc.c (init_insn_reloc): Likewise.
5091 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5092 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5093 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
5094 (_bfd_mips_elf_generic_reloc): Likewise.
5095 * bfd-in2.h: Regenerate.
5097 2004-06-28 Alan Modra <amodra@bigpond.net.au>
5099 * bfd-in.h (struct stab_info): Move from stabs.c.
5100 * stabs.c (struct stab_link_includes_table): Delete.
5101 (stab_link_includes_lookup): Delete.
5102 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5103 level of indirection from sinfo parm.
5104 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5105 stabstr section. Adjust hash table accesses.
5106 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5107 alloc. Adjust stab_info test.
5108 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5109 (_bfd_coff_final_link): Adjust stab_info test.
5110 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5111 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5113 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5114 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5115 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5116 stabstr section. Adjust stab_info test.
5117 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5118 (_bfd_write_stab_strings): Adjust prototypes.
5119 * libbfd.h: Regenerate.
5120 * libcoff.h: Regenerate.
5121 * bfd-in2.h: Regenerate.
5123 2004-06-27 Mark Kettenis <kettenis@gnu.org>
5125 From Miod Vallat <miod@online.fr>:
5126 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5128 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
5130 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5131 (struct elf32_mn10300_link_hash_entry): Remove
5132 pcrel_relocs_copied.
5133 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5134 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5135 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5136 and gotoff relocations if the symbol doesn't bind locally. Use
5137 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5138 relocation for PCREL32.
5139 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5140 to test whether a symbol binds locally.
5141 (elf32_mn10300_link_hash_newfunc): Don't initialize
5142 pcrel_relocs_copied.
5143 (_bfd_mn10300_elf_discard_copies): Delete.
5144 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5146 2004-06-26 Mark Kettenis <kettenis@gnu.org>
5148 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5150 2004-06-25 Joel Brobecker <brobecker@gnat.com>
5152 * som.c (som_set_reloc_info): Correct small typo.
5154 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5156 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5157 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5158 (m32r_elf_gcsweep_hook): Likewise.
5159 (m32r_elf_check_relocs): Likewise.
5160 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5161 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5162 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5163 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
5164 * bfd-in2.h: Regenerated.
5165 * libbfd.h: Regenerated.
5167 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5169 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5171 (elf64_x86_64_relocate_section): Issue an error for
5172 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5173 against global symbols when building shared library.
5175 2004-06-24 Alan Modra <amodra@bigpond.net.au>
5177 * section.c (struct sec): Rename "_cooked_size" to "size".
5178 Rename "_raw_size" to "rawsize".
5179 (STD_SECTION): Adjust comments.
5180 (bfd_set_section_size, bfd_get_section_contents): Use size.
5181 (bfd_malloc_and_get_section): New function.
5182 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5183 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5184 Correctly free reloc and contents memory.
5185 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5186 and fake CIE now that we can shink section size to zero.
5187 (_bfd_elf_write_section_eh_frame): Likewise..
5188 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5189 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5190 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5191 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5192 unneeded indirection.
5193 * elf.c (_bfd_elf_section_offset): .. and update call.
5194 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5195 * libbfd.h: Regenerate.
5196 * bfd-in2.h: Regenerate.
5198 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5199 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5200 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5201 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5202 Similarly use "rawsize", if non-zero, in reloc functions to validate
5203 reloc addresses. Use new bfd_malloc_and_get_section in most places
5204 where bfd_get_section_contents was called. Expand all occurrences of
5205 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5206 grok_prstatus and similar functions to "size".
5207 * aix386-core.c (aix386_core_file_p): ..
5208 * aix5ppc-core.c (xcoff64_core_p): ..
5209 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5210 aout_adobe_set_section_contents): ..
5211 * aout-target.h (callback): ..
5212 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5213 MY_bfd_final_link): ..
5214 * aoutf1.h (sunos4_core_file_p): ..
5215 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5216 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5217 final_link, aout_link_input_section): ..
5218 * binary.c (binary_object_p, binary_canonicalize_symtab,
5219 binary_set_section_contents): ..
5220 * bout.c (b_out_callback, b_out_write_object_contents,
5221 b_out_set_section_contents, b_out_bfd_relax_section,
5222 b_out_bfd_get_relocated_section_contents): ..
5223 * cisco-core.c (cisco_core_file_validate): ..
5224 * coff-alpha.c (alpha_ecoff_object_p,
5225 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5226 * coff-arm.c (coff_arm_relocate_section,
5227 bfd_arm_allocate_interworking_sections): ..
5228 * coff-h8300.c (h8300_reloc16_extra_cases,
5229 h8300_bfd_link_add_symbols): ..
5230 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5231 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5232 ppc_bfd_coff_final_link): ..
5233 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5234 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5235 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5236 * coff64-rs6000.c (xcoff64_write_object_contents,
5237 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5238 * coffcode.h (coff_compute_section_file_positions,
5239 coff_write_object_contents): ..
5240 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5241 coff_section_symbol, build_debug_section): ..
5242 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5243 process_embedded_commands, _bfd_coff_link_input_bfd,
5244 _bfd_coff_write_global_sym): ..
5245 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5246 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5247 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5248 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5249 _bfd_dwarf2_find_nearest_line): ..
5250 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5251 ecoff_compute_section_file_positions,
5252 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5253 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5254 _bfd_elf_discard_section_eh_frame_hdr,
5255 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5256 _bfd_elf_write_section_eh_frame,
5257 _bfd_elf_write_section_eh_frame_hdr): ..
5258 * elf-hppa.h (elf_hppa_sort_unwind): ..
5259 * elf-m10200.c (mn10200_elf_relax_section,
5260 mn10200_elf_relax_delete_bytes,
5261 mn10200_elf_get_relocated_section_contents): ..
5262 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5263 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5264 mn10300_elf_relax_delete_bytes,
5265 mn10300_elf_get_relocated_section_contents,
5266 _bfd_mn10300_elf_adjust_dynamic_symbol,
5267 _bfd_mn10300_elf_discard_copies,
5268 _bfd_mn10300_elf_size_dynamic_sections,
5269 _bfd_mn10300_elf_finish_dynamic_sections): ..
5270 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5271 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5272 bfd_elf_set_group_contents, map_sections_to_segments,
5273 elf_sort_sections, assign_file_positions_for_segments,
5274 SECTION_SIZE, copy_private_bfd_data,
5275 _bfd_elf_get_dynamic_reloc_upper_bound,
5276 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5277 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5278 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5279 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5280 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5281 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5282 bfd_elf32_arm_process_before_allocation,
5283 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5284 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5285 elf32_arm_write_section): ..
5286 * elf32-cris.c (cris_elf_grok_prstatus,
5287 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5288 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5289 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5290 elf_cris_discard_excess_dso_dynamics,
5291 elf_cris_discard_excess_program_dynamics): ..
5292 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5293 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5294 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5295 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5296 elf32_frvfdpic_size_dynamic_sections,
5297 elf32_frvfdpic_modify_segment_map,
5298 elf32_frvfdpic_finish_dynamic_sections): ..
5299 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5300 elf32_h8_get_relocated_section_contents): ..
5301 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5302 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5303 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5304 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5305 elf32_hppa_finish_dynamic_sections): ..
5306 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5307 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5308 i370_elf_finish_dynamic_sections): ..
5309 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5310 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5311 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5312 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5313 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5314 * elf32-ip2k.c (ip2k_is_switch_table_128,
5315 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5316 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5317 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5318 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5319 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5320 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5321 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5322 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5323 m32r_elf_get_relocated_section_contents): ..
5324 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5325 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5326 m68hc11_elf_relax_delete_bytes): ..
5327 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5328 m68hc12_elf_size_one_stub): ..
5329 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5330 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5331 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5332 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5333 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5334 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5335 elf32_mips_grok_prstatus): ..
5336 * elf32-or32.c (or32_elf_consth_reloc): ..
5337 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5338 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5339 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5340 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5341 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5342 ppc_elf_final_write_processing): ..
5343 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5344 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5345 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5346 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5347 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5348 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5349 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5350 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5351 * elf32-sh64-com.c (sh64_address_in_cranges,
5352 sh64_get_contents_type): ..
5353 * elf32-sh64.c (sh64_find_section_for_address,
5354 sh64_elf_final_write_processing): ..
5355 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5356 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5357 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5358 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5359 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5360 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5361 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5362 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5363 elf_vax_finish_dynamic_sections): ..
5364 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5365 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5366 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5367 xstormy16_elf_finish_dynamic_sections): ..
5368 * elf32-xtensa.c (xtensa_read_table_entries,
5369 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5370 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5371 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5372 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5373 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5374 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5375 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5376 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5377 xtensa_callback_required_dependence): ..
5378 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5379 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5380 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5381 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5382 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5383 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5384 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5385 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5386 * elf64-hppa.c (allocate_dynrel_entries,
5387 elf64_hppa_size_dynamic_sections,
5388 elf64_hppa_finish_dynamic_sections): ..
5389 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5390 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5391 elf64_mips_grok_prstatus): ..
5392 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5393 mmix_elf_relocate_section, mmix_elf_final_link,
5394 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5395 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5396 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5397 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5398 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5399 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5400 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5401 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5402 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5403 ppc64_elf_finish_dynamic_sections): ..
5404 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5405 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5406 elf_s390_finish_dynamic_sections): ..
5407 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5408 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5409 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5410 sh64_elf64_finish_dynamic_sections): ..
5411 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5412 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5413 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5414 sparc64_elf_finish_dynamic_symbol,
5415 sparc64_elf_finish_dynamic_sections): ..
5416 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5417 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5418 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5419 elf64_x86_64_finish_dynamic_sections): ..
5420 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5421 * elfcode.h (elf_slurp_reloc_table): ..
5422 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5423 elf_finalize_dynstr, elf_link_add_object_symbols,
5424 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5425 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5426 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5427 elf32_mips_grok_prstatus): ..
5428 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5429 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5430 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5431 elfNN_ia64_finish_dynamic_sections): ..
5432 * elfxx-mips.c (mips_elf_create_procedure_table,
5433 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5434 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5435 mips_elf_global_got_index, mips_elf_multi_got,
5436 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5437 mips_elf_allocate_dynamic_relocations,
5438 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5439 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5440 _bfd_mips_elf_always_size_sections,
5441 _bfd_mips_elf_size_dynamic_sections,
5442 _bfd_mips_elf_finish_dynamic_symbol,
5443 _bfd_mips_elf_finish_dynamic_sections,
5444 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5445 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5446 _bfd_elf_mips_get_relocated_section_contents,
5447 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5448 * hp300hpux.c (callback): ..
5449 * hppabsd-core.c (make_bfd_asection): ..
5450 * hpux-core.c (make_bfd_asection): ..
5451 * i386linux.c (linux_link_create_dynamic_sections,
5452 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5453 * i386msdos.c (msdos_write_object_contents): ..
5454 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5455 os9k_set_section_contents): ..
5456 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5457 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5458 ieee_write_section_part, do_with_relocs, do_as_repeat,
5459 do_without_relocs, ieee_write_debug_part, init_for_output,
5460 ieee_set_section_contents): ..
5461 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5462 * irix-core.c (do_sections, make_bfd_asection): ..
5463 * libaout.h (aout_section_merge_with_text_p): ..
5464 * libbfd.c (_bfd_generic_get_section_contents,
5465 _bfd_generic_get_section_contents_in_window): ..
5466 * linker.c (default_indirect_link_order): ..
5467 * lynx-core.c (make_bfd_asection): ..
5468 * m68klinux.c (linux_link_create_dynamic_sections,
5469 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5470 * mach-o.c (bfd_mach_o_make_bfd_section,
5471 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5472 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5473 bfd_mach_o_scan_read_segment): ..
5474 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5475 _bfd_merge_sections): ..
5476 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5477 mmo_map_set_sizes, mmo_canonicalize_symtab,
5478 mmo_internal_write_section, mmo_write_object_contents): ..
5479 * netbsd-core.c (netbsd_core_file_p): ..
5480 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5481 nlm_alpha_set_public_section): ..
5482 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5483 * nlm32-sparc.c (nlm_sparc_write_import): ..
5484 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5485 nlm_compute_section_file_positions): ..
5486 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5487 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5488 * opncls.c (get_debug_link_info): ..
5489 * osf-core.c (make_bfd_asection): ..
5490 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5491 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5492 final_link, aout_link_input_section): ..
5493 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5494 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5495 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5496 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5497 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5498 * ptrace-core.c (ptrace_unix_core_file_p): ..
5499 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5500 _bfd_final_link_relocate, bfd_generic_relax_section,
5501 bfd_generic_get_relocated_section_contents): ..
5502 * reloc16.c (bfd_coff_reloc16_relax_section,
5503 bfd_coff_reloc16_get_relocated_section_c): ..
5504 * riscix.c (riscix_some_aout_object_p): ..
5505 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5506 * sco5-core.c (make_bfd_asection): ..
5507 * simple.c (bfd_simple_get_relocated_section_contents): ..
5508 * som.c (som_object_setup, setup_sections, som_prep_headers,
5509 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5510 som_set_reloc_info, som_get_section_contents,
5511 som_bfd_link_split_section): ..
5512 * sparclinux.c (linux_link_create_dynamic_sections,
5513 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5514 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5515 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5516 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5517 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5518 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5519 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5520 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5521 sunos_finish_dynamic_link): ..
5522 * syms.c (_bfd_stab_section_find_nearest_line): ..
5523 * tekhex.c (first_phase, tekhex_set_section_contents,
5524 tekhex_write_object_contents): ..
5525 * trad-core.c (trad_unix_core_file_p): ..
5526 * versados.c (process_esd, process_otr, process_otr): ..
5527 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5528 * vms-misc.c (add_new_contents): ..
5529 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5530 * vms.c (vms_set_section_contents): ..
5531 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5532 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5533 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5534 * xsym.c (bfd_sym_scan): .. See above.
5536 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5538 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5539 calling _bfd_merged_section_offset only for section symbols.
5541 2004-06-22 Alan Modra <amodra@bigpond.net.au>
5543 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5544 for handling SEC_MERGE symbols in relax_section.
5546 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
5548 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5549 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5550 linked together. Mark the result as h8300sx code.
5552 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
5554 * elf-bfd.h (struct elf_backend_data): Added
5555 elf_backend_omit_section_dynsym.
5556 (_bfd_elf_link_omit_section_dynsym): Declare.
5557 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5558 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5559 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5560 (_bfd_elf_link_renumber_dynsyms): ... this function.
5561 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5562 _bfd_elf_link_omit_section_dynsym).
5563 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5565 2004-06-21 Nick Clifton <nickc@redhat.com>
5567 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5570 2004-06-17 Jerome Guitton <guitton@gnat.com>
5572 * bfd-in.h (bfd_cache_close_all): New function declaration.
5573 * bfd-in2.h: Regenerate.
5574 * cache.c (bfd_cache_close_all): New function definition.
5576 2004-06-16 Mark Kettenis <kettenis@gnu.org>
5578 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5580 * configure: Regenerate.
5582 2004-06-16 Daniel Jacobowitz <dan@debian.org>
5584 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5585 the pre-existing section.
5587 2004-06-15 Alan Modra <amodra@bigpond.net.au>
5589 * section.c (struct sec): Remove usused flags. Reorganize a little.
5590 (bfd_get_section_size_before_reloc): Delete.
5591 (bfd_get_section_size_after_reloc): Delete.
5592 (STD_SECTION): Update.
5593 (bfd_get_section_size_now): Delete.
5594 (bfd_set_section_contents): Don't referece reloc_done.
5595 (bfd_get_section_contents): Remove reloc_done comment.
5596 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5598 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5599 * ecoff.c (bfd_debug_section): Update initializer.
5600 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5601 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5602 * bfd-in.h (bfd_section_size): Expand.
5603 (bfd_get_section_size): New macro.
5604 * bfd-in2.h: Regenerate.
5605 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5606 bfd_get_section_size_before_reloc with bfd_get_section_size.
5607 * coffcode.h (coff_write_object_contents): Likewise.
5608 * coffgen.c (build_debug_section): Likewise.
5609 * dwarf1.c (parse_line_table): Likewise.
5610 (_bfd_dwarf1_find_nearest_line): Likewise.
5611 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5612 * i386msdos.c (msdos_write_object_contents): Likewise.
5613 * pdp11.c (squirt_out_relocs): Likewise.
5614 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5615 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5617 2004-06-14 Chris Demetriou <cgd@broadcom.com>
5619 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5620 removal) with updated comment.
5621 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5623 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5624 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5626 2004-06-12 Alan Modra <amodra@bigpond.net.au>
5628 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5629 overflow on branches to undefweaks.
5631 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5633 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5634 as ecoff_section_data() does not return a valid lvalue.
5636 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
5638 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5639 (elf_link_add_object_symbols): Likewise.
5641 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5642 (elf_backend_reloc_type_class): New.
5644 2004-06-08 Mark Kettenis <kettenis@gnu.org>
5646 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5648 * configure: Regenerate.
5650 2004-06-07 Daniel Jacobowitz <dan@debian.org>
5652 From: Albert Chin-A-Young <china@thewrittenword.com>
5653 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5656 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5658 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5661 2004-05-28 DJ Delorie <dj@redhat.com>
5663 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5664 for linking, but otherwise adjust reloc for merged sections.
5666 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
5668 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5669 _bfd_merged_section_offset for local symbols.
5671 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
5673 * Makefile.am: Regenerate dependencies.
5674 * Makefile.in: Regenerate.
5675 * archures.c: Add bfd_mach_sh3_nommu .
5676 * bfd-in2.h: Regenerate.
5677 * cpu-sh.c: Add sh3-nommu architecture.
5678 (bfd_to_arch_table): Create new table.
5679 (sh_get_arch_from_bfd_mach): Create new function.
5680 (sh_get_arch_up_from_bfd_mach): Create new function.
5681 (sh_merge_bfd_arch): Create new function.
5682 * elf32-sh.c (sh_ef_bfd_table): Add table.
5683 (sh_elf_check_relocs): Replace switch statement with
5684 use of sh_ef_bfd_table .
5685 (sh_elf_get_flags_from_mach): Add new function.
5686 (sh_find_elf_flags): Likewise.
5687 (sh_elf_copy_private_data): Replace most of non-elf contents
5688 with a call to sh_merge_bfd_arch() .
5690 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
5692 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5693 * Makefile.in: Regenerate.
5695 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5697 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5698 custom calling conventions for dynamic symbols.
5699 (mn10300_elf_relax_section): Avoid relaxing a function as a local
5700 symbol if it's an alias to a global one.
5702 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
5704 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5707 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5709 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5712 2004-05-26 Alan Modra <amodra@bigpond.net.au>
5714 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5715 for SHT_GROUP sections.
5717 2004-05-25 Alan Modra <amodra@bigpond.net.au>
5719 * elflink.c (elf_link_add_object_symbols): Don't set up merge
5721 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5722 * merge.c: Formatting. Remove unnecessary casts. Expand
5723 bfd_get_section_alignment macro.
5724 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
5725 use throughout file.
5726 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
5727 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
5728 section name to determine sinfo group, instead test output section
5730 (_bfd_merge_sections): Add struct bfd_link_info param. Call
5731 _bfd_strip_section_from_output rather than just twiddling flags.
5732 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5733 (_bfd_merge_sections): Update prototype.
5734 * libbfd.h: Regenerate.
5736 2004-05-24 Mark Kettenis <kettenis@gnu.org>
5738 * netbsd-core.c: Correctly indent section that sets architecture
5741 From Miod Vallat <miod@online.fr>:
5742 * m88kopenbsd.c: New file.
5743 * targets.c (m88k_openbsd_vec): New.
5744 * config.bfd: Add m88k-*-openbsd*.
5745 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
5746 (m88kopenbsd_vec): New.
5747 * configure: Regenerate.
5748 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
5749 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
5751 * Makefile.in: Regenerate.
5752 * po/SRC-POTFILES.in: Regenerate.
5754 2004-05-24 Nick Clifton <nickc@redhat.com>
5756 * hash.c: Remove bogus node "Changing the default Hash Table Size"
5757 introduced by hash table size patch.
5759 2004-05-22 Ben Elliston <bje@au.ibm.com>
5761 * configure.in (is_release): Remove.
5762 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
5763 (AC_OUTPUT): Don't output bfdver.h from version.h.
5764 * configure: Regenerate.
5765 * Makefile.am (RELEASE): New variable.
5766 (bfdver.h): New target.
5767 * Makefile.in: Regenerate.
5768 * doc/Makefile.in: Likewise.
5770 2004-05-22 Ben Elliston <bje@au.ibm.com>
5772 * Makefile.am (config.status): Don't depend on version.h.
5773 * Makefile.in: Regenerate.
5775 2004-05-22 Alan Modra <amodra@bigpond.net.au>
5777 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
5778 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
5779 * libbfd.h: Regenerate.
5780 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
5781 (_bfd_elf_rel_local_sym): Likewise.
5782 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
5783 (elf_link_input_bfd): Likewise.
5784 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
5785 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5786 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5787 (elfNN_ia64_relocate_section): Likewise.
5789 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
5791 * hash.c (bfd_default_hash_table_size): New variable.
5792 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
5793 (bfd_hash_set_default_size): New function. Set the default size
5794 to a selected prime number close to the argument. Document new
5796 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
5797 * bfd-in2.h: Regenerate.
5798 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
5799 * Makefile.in: Regenerate.
5801 2004-05-21 Mark Kettenis <kettenis@gnu.org>
5803 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
5804 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
5805 arm, m68k, m88k and hppa core files.
5807 2004-05-21 Nick Clifton <nickc@redhat.com>
5809 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
5810 (bfd_bwrite): Likewise.
5811 (bfd_tell): Likewise.
5812 (bfd_flush): Likewise.
5813 (bfd_stat): Likewise.
5814 (bfd_seek): Likewise.
5815 (bfd_get_mtime): Likewise.
5816 (bfd_get_size): Likewise.
5818 2004-05-19 Ben Elliston <bje@au.ibm.com>
5820 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
5822 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
5824 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
5825 (bfd_generic_openr_next_archived_file): Likewise.
5827 2004-05-17 Bob Wilson <bob.wilson@acm.org>
5829 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
5830 section names by inserting a new substring after .gnu.linkonce, except
5831 for .gnu.linkonce.t.* where the "t." is replaced.
5833 2004-05-17 Adam Nemet <anemet@lnxw.com>
5835 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
5836 (m68-*-lynxos* case): Likewise.
5837 (powerpc-*-lyxnos* case): New case.
5838 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
5840 2004-05-17 David Heine <dlheine@tensilica.com>
5842 * aout-target.h (MY_bfd_copy_private_header_data): Define.
5843 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5844 * bfd.c (bfd_copy_private_header_data): Define.
5845 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5847 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5848 * coffcode.h (coff_bfd_copy_private_header_data): Define.
5849 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5850 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5851 segments by calling copy_private_bfd_data.
5852 (_bfd_elf_copy_private_header_data): Define.
5853 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5854 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5855 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5856 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
5857 * mmo.c (mmo_bfd_copy_private_header_data): Define.
5858 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
5859 * som.c (som_bfd_copy_private_header_data): Define.
5860 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
5861 * vms.c (vms_bfd_copy_private_header_data): Define.
5862 * bfd-in2.h: Regenerate.
5863 * libbfd.h: Regenerate.
5865 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5867 * elfxx-mips.c (MINUS_TWO): Define.
5868 (mips_elf_higher, mips_elf_highest,
5869 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
5870 some bfd_vma values.
5871 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
5873 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5875 * som.c (log2): Rename to exact_log2. Adjust all callers.
5877 2004-05-13 Paul Brook <paul@codesourcery.com>
5879 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
5880 dwarf3 format CIE entries. Remove comment about the size of the
5881 ra_column field. It is now correctly deduced.
5883 2004-05-13 Joel Sherrill <joel@oarcorp.com>
5885 * config.bfd (or32-*-rtems*): Switch to elf.
5887 2004-05-13 Nick Clifton <nickc@redhat.com>
5889 * po/fr.po: Updated French translation.
5891 2004-05-11 Jakub Jelinek <jakub@redhat.com>
5893 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
5894 into .dynsym if elf_section_data (sec)->dynindx <= 0.
5895 Adjust counting of last_local.
5896 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
5897 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
5898 created by the linker nor !SHF_ALLOC.
5900 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
5901 DT_PLTGOT to the start of the .got.plt section instead of the
5902 .got output section. Set sh_entsize for .got section in addition
5904 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5905 is at sgot->output_section->vma.
5906 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
5907 DT_PLTGOT to the start of the .got.plt section instead of the
5908 .got output section.
5909 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5910 is at sgot->output_section->vma. Set sh_entsize for .got section
5911 in addition to .got.plt.
5912 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
5913 (bfd_section_from_phdr): Likewise.
5914 (map_sections_to_segments): Likewise.
5915 (assign_file_positions_for_segments): Likewise.
5916 (get_program_header_size): Likewise.
5917 * elflink.c (bfd_elf_size_dynamic_sections): Set
5918 elf_tdata (output_bfd)->relro from info->relro.
5919 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
5921 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
5923 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
5924 a zero symndx for which we hadn't accounted a dynamic relocation.
5925 (_frvfdpic_add_rofixup): Likewise.
5927 2004-05-07 Brian Ford <ford@vss.fsi.com>
5928 DJ Delorie <dj@redhat.com>
5930 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
5931 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
5932 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
5933 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
5935 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
5937 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
5938 immediately if there's no link info.
5939 (elf32_frvfdpic_copy_private_bfd_data): New.
5940 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
5942 2004-05-06 Zack Weinberg <zack@codesourcery.com>
5944 * dwarf2.c (add_line_info): Also set info->filename to NULL if
5945 filename argument is null; do not call strlen on a null pointer.
5947 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
5949 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
5952 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
5954 * configure.in (bfd_elf32_frvfdpic_vec): New.
5955 * configure: Rebuilt.
5956 * targets.c (bfd_elf32_frvfdpic_vec): New.
5957 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
5959 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
5960 frvfdpic instead of frv. Rearrange elf-target macros such that
5961 the FDPIC-specific ones are only defined for this new target
5963 (bfd_elf32_frvfdpic_vec): Declare.
5965 (elf32_frv_relocate_section): Use it to enable segment checking
5966 and to control rofixup emission. Add output section vma to
5967 applied relocation in non-LOAD non-ALLOC sections. Use
5968 _bfd_error_handler for errors.
5969 (_frv_create_got_section): Create .rel.got and .rofixup only in
5970 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
5972 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
5973 (elf32_frvfdpic_modify_segment_map): Likewise.
5974 (elf32_frv_finish_dynamic_sections): New, do-nothing.
5975 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
5976 error message if we miscompute the rofixup size.
5977 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
5978 (frvfdpic_elf_encode_eh_address): Likewise.
5979 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
5980 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
5981 relocs. Reject unknown relocation types.
5982 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
5983 (frv_elf_merge_private_bfd_data): Likewise.
5984 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
5985 0x4000 for newly-added elf32-frvfdpic.
5987 2004-05-05 Nick Clifton <nickc@redhat.com>
5990 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
5991 returning NULL as most users of this function do not check its
5993 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
5994 of bfd_cache_lookup().
5995 * sco5-core.c (sco5_core_file_p): Likewise.
5996 * trad-core.c (trad_unix_core_file_p): Likewise.
5998 2004-05-05 Nick Clifton <nickc@redhat.com>
6000 * cache.c (bfd_cache_lookup): Improve formatting.
6001 * archive.c: Fix formatting.
6003 2004-05-05 Peter Barada <peter@the-baradas.com>
6005 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6006 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6007 * bfd-in2.h(bfd_architecture): Regenerate.
6009 2004-05-03 Alan Modra <amodra@bigpond.net.au>
6011 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6013 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6014 those against discarded link-once and SEC_MERGE section symbols.
6016 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6018 * section.c (bfd_get_section_by_name_if): New.
6019 * bfd-in2.h: Regenerated.
6021 2004-05-02 Alan Modra <amodra@bigpond.net.au>
6023 * som.c (som_bfd_is_group_section): Define.
6025 2004-05-01 Alan Modra <amodra@bigpond.net.au>
6027 * section.c (bfd_make_section_anyway): Copy the whole
6028 bfd_hash_entry, not just "next" from existing entry.
6030 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6032 * elf.c (bfd_section_from_shdr): Maintain the section order in
6034 (special_sections): Add ".note.GNU-stack".
6035 (elf_fake_sections): Handle section group for relocatable
6038 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6040 * section.c (bfd_sections_find_if): New.
6041 * bfd-in2.h: Regenerated.
6043 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6045 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6047 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6048 * elf.c (bfd_elf_is_group_section): New function.
6049 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6050 * section.c (bfd_generic_is_group_section): New function.
6051 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6052 (BFD_JUMP_TABLE_LINK): Adjust.
6053 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6054 * aout-target.h (MY_bfd_is_group_section): Define.
6055 * aout-tic30.c (MY_bfd_is_group_section): Define.
6056 * bfd.c (bfd_is_group_section): Define.
6057 * binary.c (binary_bfd_is_group_section): Define.
6058 * bout.c (b_out_bfd_is_group_section): Define.
6059 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6060 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6061 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6062 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6063 * coffcode.h (coff_bfd_is_group_section): Define.
6064 * i386msdos.c (msdos_bfd_is_group_section): Define.
6065 * i386os9k.c (os9k_bfd_is_group_section): Define.
6066 * ieee.c (ieee_bfd_is_group_section): Define.
6067 * ihex.c (ihex_bfd_is_group_section): Define.
6068 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6069 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6070 * mmo.c (mmo_bfd_is_group_section): Define.
6071 * nlm-target.h (nlm_bfd_is_group_section): Define.
6072 * oasys.c (oasys_bfd_is_group_section): Define.
6073 * pef.c (bfd_pef_bfd_is_group_section): Define.
6074 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6075 * srec.c (srec_bfd_is_group_section): Define.
6076 * tekhex.c (tekhex_bfd_is_group_section): Define.
6077 * versados.c (versados_bfd_is_group_section): Define.
6078 * vms.c (vms_bfd_is_group_section): Define.
6079 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6080 * bfd-in2.h: Regenerate.
6081 * libbfd.h: Regenerate.
6083 2004-04-30 Alan Modra <amodra@bigpond.net.au>
6085 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6087 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
6089 * configure.in: Update version to 2.15.91.
6090 * configure: Regenerate.
6092 2004-04-29 Brian Ford <ford@vss.fsi.com>
6094 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6095 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6096 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6097 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6098 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6099 .gnu.linkonce.wi. sections.
6100 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6101 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6103 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6104 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6106 2004-04-28 Chris Demetriou <cgd@broadcom.com>
6108 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6109 * bfd-in2.h: Regenerate.
6110 * libbfd.h: Likewise.
6112 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6114 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6116 (setup_sections): Use som_subspace_dictionary_record struct instead
6117 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6118 is_comdat, is_common or dup_common.
6119 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6120 is_comdat, is_common and dup_common in section subspace_dict from
6122 (som_begin_writing): Use som_subspace_dictionary_record struct.
6123 (som_finish_writing): Likewise.
6124 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6125 is_common and dup_common flags in info for symbol. Add comment
6126 regarding linker support for these fields. Slightly reorganize
6128 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6129 dup_common fields in symbol table from symbol info.
6130 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6131 arguments. Set corresponding fields in copy_data. Change all callers.
6132 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6134 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6135 * som.h (som_subspace_dictionary_record): Define.
6136 (som_copyable_section_data_struct): Add is_comdat, is_common and
6138 (som_section_data_struct): Use som_subspace_dictionary_record struct
6139 instead of subspace_dictionary_record.
6140 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6142 2004-04-27 Bob Wilson <bob.wilson@acm.org>
6144 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6145 if set. Check reloc_done flag before applying relocations. Use
6146 output addresses, both when applying relocations and when comparing
6147 against the specified section.
6148 (elf_xtensa_relocate_section): Use output address to check if dynamic
6149 reloc is in a literal pool. Set section's reloc_done flag.
6151 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6153 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6154 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6156 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6159 2004-04-27 Alan Modra <amodra@bigpond.net.au>
6161 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6162 structure field removed in 2004-04-24 patch.
6163 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6165 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6167 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6168 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6169 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6170 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6171 field before calling elf_backend_section_flags.
6173 2004-04-24 Chris Demetriou <cgd@broadcom.com>
6175 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6176 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6177 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6178 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6179 and BFD_RELOC_32_PCREL.
6180 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6181 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6182 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6183 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6184 (mips_elf_next_relocation): Move comment about matching HI/LO
6186 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6187 R_MIPS_GNU_REL_HI16.
6189 2004-04-23 Chris Demetriou <cgd@broadcom.com>
6191 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6192 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6193 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6194 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6195 and update comments to reflect current usage.
6196 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6197 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6199 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6200 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6201 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6202 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6203 type number to be MIPS_R_PCREL16.
6204 (mips_relocate_section): Remove support for link-time relaxation
6205 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6206 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6207 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6208 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6209 relaxation of branches used by embedded-PIC.
6210 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6211 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6212 related members, update comment.
6213 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6214 code related to embedded-PIC.
6215 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6216 initialization of now-removed 'adjust' member of
6217 'struct ecoff_debug_info'.
6219 2004-04-23 Chris Demetriou <cgd@broadcom.com>
6221 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6223 2004-04-21 Philip Blundell <pb@nexus.co.uk>
6225 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6226 relocs for locally defined symbols during -shared final link.
6227 (elf32_arm_final_link_relocate): Likewise.
6229 2004-04-22 Jakub Jelinek <jakub@redhat.com>
6231 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6232 ELF_LINK_POINTER_EQUALITY_NEEDED.
6233 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6234 if r_type is not R_X86_64_PC32.
6235 (elf64_x86_64_finish_dynamic_symbol): If
6236 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6239 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6241 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6242 (elf_backend_plt_sym_val): Define.
6244 2004-04-22 Andrew Cagney <cagney@redhat.com>
6246 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6248 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6250 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
6252 * som.c (som_set_section_contents): Constantify second argument.
6253 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6254 (som_object_setup): Rework to avoid warning.
6255 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6258 2004-04-22 Andrew Cagney <cagney@redhat.com>
6260 * cache.c (bfd_cache_close): Check for a previously closed file.
6262 2004-04-22 Jakub Jelinek <jakub@redhat.com>
6264 * bfd.c (bfd_get_synthetic_symtab): Define.
6265 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6266 NAME##_get_synthetic_symtab.
6267 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6268 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6269 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6271 (_bfd_elf_get_synthetic_symtab): New prototype.
6272 * elfcode.h (elf_get_synthetic_symtab): Define.
6273 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6274 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6275 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6276 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6277 * bfd-in2.h: Rebuilt.
6278 * libbfd.h: Rebuilt.
6279 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6280 (elf_backend_plt_sym_val): Define.
6281 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6282 (elf_backend_plt_sym_val): Define.
6283 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6284 (elf_backend_plt_sym_val): Define.
6285 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6286 (elf_backend_plt_sym_val): Define.
6287 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6288 (elf_backend_plt_sym_val): Define.
6289 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6290 (elf_backend_plt_sym_val): Define.
6291 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6292 (elf_backend_plt_sym_val): Define.
6293 * aout-target.h (MY_get_synthetic_symtab): Define.
6294 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6295 * coff-rs6000.c (rs6000coff_vec): Add
6296 _bfd_nodynamic_get_synthetic_symtab.
6297 (pmac_xcoff_vec): Likewise.
6298 * coff64-rs6000.c (rs6000coff64_vec): Add
6299 _bfd_nodynamic_get_synthetic_symtab.
6300 (aix5coff64_vec): Likewise.
6301 * sunos.c (MY_get_synthetic_symtab): Define.
6302 * vms.c (vms_get_synthetic_symtab): Define.
6304 2004-04-22 Nick Clifton <nickc@redhat.com>
6306 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6308 2004-04-22 Peter Barada <peter@the-baradas.com>
6310 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6311 * bfd2-in.h: Regenerate.
6312 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6314 2004-04-21 Chris Demetriou <cgd@broadcom.com>
6316 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6317 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6318 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6319 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6320 * bfd-in2.h: Regenerate.
6322 2004-04-21 Bob Wilson <bob.wilson@acm.org>
6324 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6325 require relocations against a weak symbol to reference the same
6326 symbol hash entry if not a final, static link.
6327 (get_cached_value, add_value_map): Add final_static_link argument.
6328 (remove_literals): Pass final_static_link argument as needed.
6330 2004-04-21 Andrew Cagney <cagney@redhat.com>
6332 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6333 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6334 (opncls_bwrite, opncls_bclose, opncls_bflush)
6335 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6336 bfd iovec that uses function callbacks.
6337 (bfd_close): Use the iovec's bclose.
6338 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6339 (cache_bclose, cache_bflush, cache_bstat)
6340 (cache_iovec): New functions and global variable, implement a
6341 cache "iovec", where applicable set bfd_error.
6342 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6343 * bfdio.c (struct bfd_iovec): Define.
6344 (real_read): Delete function.
6345 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6346 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6347 assume that bread and bwrite set bfd_error.
6348 * bfd.c (struct bfd): Add "iovec", update comments.
6349 * bfd-in2.h, libbfd.h: Re-generate.
6351 2004-04-21 Andrew Cagney <cagney@redhat.com>
6353 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6355 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6357 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6358 (bfd_elf_gc_sections): Fail if a shared object is being created.
6359 Do not fail if dynamic sections have been created. Instead call
6360 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6361 dynamically referenced symbols. Do not mark the whole graph
6362 rooted at .eh_frame, only the section proper.
6364 2004-04-20 DJ Delorie <dj@redhat.com>
6366 * reloc.c: Add BFD_RELOC_32_SECREL.
6367 * bfd-in2.h: Regenerate.
6368 * libbfd.h: Likewise.
6369 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6370 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6371 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6373 2004-04-19 Jakub Jelinek <jakub@redhat.com>
6375 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6376 relocs against hidden/protected undefweak symbols properly.
6377 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6379 2004-04-18 Mark Kettenis <kettenis@gnu.org>
6381 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6382 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6385 2004-04-17 Brian Ford <ford@vss.fsi.com>
6387 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6388 filepos for the SizeOfHeaders field.
6389 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6391 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6393 2004-04-16 Alan Modra <amodra@bigpond.net.au>
6395 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6396 change reloc_done. Set and restore _cooked_size.
6399 2004-04-15 Mark Kettenis <kettenis@gnu.org>
6401 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6404 2004-04-15 Nick Clifton <nickc@redhat.com>
6406 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6408 2004-04-15 Alan Modra <amodra@bigpond.net.au>
6410 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6412 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6414 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6415 when it is a definition.
6417 2004-04-14 Alan Modra <amodra@bigpond.net.au>
6419 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6420 when statically linking PIC code.
6421 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6423 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6425 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6426 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6427 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6428 * configure: Regenerate.
6430 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
6432 * elflink.c: Include libiberty.h.
6433 * Makefile.am (elflink.lo): Depend on libiberty.h.
6434 * Makefile.in: Regenerate.
6436 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
6438 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6441 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6443 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6444 reserve the memory for dynamic linker
6446 2004-04-05 Mark Kettenis <kettenis@gnu.org>
6448 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6449 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6451 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6453 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6454 RELOC_FOR_GLOBAL_SYMBOL.
6455 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6457 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6459 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6460 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6462 2004-04-01 Paul Brook <paul@codesourcery.com>
6464 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6465 * elf32-arm.h (struct elf32_elf_section_map): New.
6466 (struct _arm_elf_section_data): New.
6467 (elf32_arm_section_data): Define.
6468 (struct elf32_arm_link_hash_table): Add byteswap_code.
6469 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6470 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6471 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6472 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6473 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6474 (bfd_elf32_new_section_hook, elf_backend_write_section,
6475 elf_backend_link_output_symbol_hook): Define.
6477 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
6479 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6480 that keeps the characters in a B_INCL..B_EINCL range.
6481 (_bfd_link_section_stabs): When computing the sum of the
6482 characters in a B_INCL..B_EINCL range also keep a copy of those
6483 characters. Use this information to distinguish between
6484 include sections that have the same sum and the same length
6485 but which are nevertheless unique.
6487 2004-03-31 Paul Brook <paul@codesourcery.com>
6489 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6490 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6492 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
6494 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6495 to 'sum_chars' and add field 'num_chars'.
6496 (_bfd_link_section_stabs): When computing the sum of the
6497 characters in a B_INCL..B_EINCL range also keep a count of the
6498 number of characters. Use this information to help distinguish
6499 between include sections when have the same sum but which
6500 nevertheless are still unique.
6502 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
6504 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6506 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
6507 Tomer Levi <Tomer.Levi@nsc.com>
6509 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6510 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6511 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6512 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6513 (cpu-cr16c.lo): New target.
6514 (elf32-cr16c.lo): Likewise.
6515 * Makefile.in: Regenerate.
6516 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6517 (bfd_archures_list): Add bfd_cr16c_arch.
6518 * config.bfd: Handle cr16c-*-elf*.
6519 * configure.in: Handle bfd_elf32_cr16c_vec.
6520 * configure: Regenerate.
6521 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6522 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6523 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6524 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6525 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6526 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6527 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6528 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6529 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6530 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6531 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6532 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6533 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6534 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6535 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6536 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6537 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6538 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6539 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6540 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6541 * targets.c (bfd_elf32_cr16c_vec): Declare.
6542 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6543 * cpu-cr16c.c: New file.
6544 * elf32-cr16c.c: Likewise.
6545 * libbfd.h: Regenerate.
6546 * bfd-in2.h: Likewise.
6548 2004-03-30 Jakub Jelinek <jakub@redhat.com>
6550 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6552 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6554 * Makefile.am: Remove all mention of elflink.h.
6555 * Makefile.in: Regenerate.
6556 * bfd-in.h (bfd_elf_discard_info): Declare.
6557 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6558 * bfd-in2.h: Regenerate.
6559 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6560 bfd_elf32_link_record_dynamic_symbol,
6561 bfd_elf64_link_record_dynamic_symbol,
6562 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6563 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6564 _bfd_elf32_link_record_local_dynamic_symbol,
6565 _bfd_elf64_link_record_local_dynamic_symbol,
6566 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6567 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6568 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6569 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6570 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6571 _bfd_elf32_reloc_symbol_deleted_p,
6572 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6573 (bfd_elf_link_record_dynamic_symbol,
6574 bfd_elf_link_record_local_dynamic_symbol,
6575 bfd_elf_final_link, bfd_elf_gc_sections,
6576 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6577 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6578 bfd_elf_reloc_symbol_deleted_p): Declare.
6579 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6580 * elf32-arm.h: Update for changed function names. Remove local
6581 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6582 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6583 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6584 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6585 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6586 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6587 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6588 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6589 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6590 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6591 (bfd_elfNN_print_symbol): Define.
6592 * elfcode.h: Don't include elflink.h.
6593 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6594 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6595 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6596 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6597 elf_link_record_local_dynamic_symbol): Don't define.
6598 * elflink.c: Update for changed function names. Move elflink.h
6600 * elflink.h: Delete file.
6601 * po/SRC-POTFILES.in: Regenerate.
6602 * po/bfd.pot: Regenerate.
6604 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6606 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6607 "name" for global syms accidentally removed in 2004-03-20 change.
6609 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6611 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6612 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6613 where Elf_External_* is different for 64 and 32 bit, with
6614 corresponding elf_size_info field.
6615 (struct elf_final_link_info): Use "bfd_byte *" instead
6616 of "Elf_External_Sym *" for external_syms and symbuf.
6617 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6618 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6619 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6620 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6621 (elf_link_sort_cmp2): Adjust.
6622 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6623 using ELF_R_SYM macro. Set u.sym_mask.
6624 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6625 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6626 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6627 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6628 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6629 swap_syn_out functions. Rearrange dyn swap in/out switch.
6630 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6631 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6632 (elf_link_flush_output_syms): Add elf_backend_data arg.
6633 (elf_link_check_versioned_symbol): Likewise.
6634 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6635 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6636 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6637 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6638 ELF_R_TYPE and ELF_R_INFO macros.
6639 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6640 based on size rather than using ELF_R_INFO.
6641 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6643 (struct alloc_got_off_arg): New.
6644 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6645 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6646 (elf_gc_allocate_got_offsets): Adjust.
6647 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6648 ELF_R_SYM. Use bfd_section_from_elf_index.
6649 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6650 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6651 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6653 2004-03-26 Stan Shebs <shebs@apple.com>
6655 Remove MPW support, no longer used.
6656 * config.bfd (powerpc-*-mpw*): Remove configuration.
6657 * mpw-config.in, mpw-make.sed: Remove files.
6658 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6660 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6662 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6663 (ppc64_elf_add_symbol_hook): New function.
6664 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6665 const from Elf_Internal_Sym param.
6666 * elflink.c (elf_link_add_object_symbols): Adjust.
6667 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6668 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6669 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6670 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6671 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6672 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6673 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6674 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6675 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6676 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6677 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6678 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6679 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6680 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6681 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6682 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6684 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6686 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6687 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6688 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6689 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6690 (bfd_elf64_bfd_link_add_symbols): Delete.
6691 (bfd_elf_link_add_symbols): Declare.
6692 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6693 * elflink.c: Include safe-ctype.h.
6694 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6696 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6697 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6699 (elf_link_add_archive_symbols): Rename from
6700 _bfd_elf_link_add_archive_symbols, make static.
6701 (elf_link_add_object_symbols): New function. Corresponding
6702 elflink.h function converted to use elf_size_info.
6703 (bfd_elf_link_add_symbols): Likewise.
6704 (bfd_elf_size_dynamic_sections): Adjust.
6705 * elflink.h (elf_bfd_link_add_symbols): Delete.
6706 (elf_link_add_object_symbols): Delete.
6707 * elf32-gen.c (elf32_generic_link_add_symbols): Call
6708 bfd_elf_link_add_symbols.
6709 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6711 2004-03-25 Alan Modra <amodra@bigpond.net.au>
6713 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6714 and chained shared libs only if dynsym. Clear dynsym on forced-local.
6716 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6717 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6718 (_bfd_elf_add_dt_needed_tag): Declare.
6719 (_bfd_elf_sort_symbol): Declare.
6720 (_bfd_elf_finalize_dynstr): Declare.
6721 (RELOC_FOR_GLOBAL_SYM): Formatting.
6722 * elfcode.h (elf_add_dynamic_entry): Delete.
6723 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
6724 elflink.h function converted to use elf_size_info.
6725 (_bfd_elf_add_dt_needed_tag): Likewise.
6726 (_bfd_elf_sort_symbol): Likewise.
6727 (_bfd_elf_finalize_dynstr): Likewise.
6728 (compute_bucket_count): Likewise.
6729 (bfd_elf_size_dynamic_sections): Likewise. Check result of
6730 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6731 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6732 * elflink.h: ..here.
6733 (sort_symbol, add_dt_needed_tag): Delete.
6734 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6735 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6737 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
6738 * elf32-cris.c (add_dynamic_entry): Likewise.
6739 * elf32-hppa.c (add_dynamic_entry): Likewise.
6740 * elf32-i370.c (add_dynamic_entry): Likewise.
6741 * elf32-i386.c (add_dynamic_entry): Likewise.
6742 * elf32-m32r.c (add_dynamic_entry): Likewise.
6743 * elf32-m68k.c (add_dynamic_entry): Likewise.
6744 * elf32-ppc.c (add_dynamic_entry): Likewise.
6745 * elf32-s390.c (add_dynamic_entry): Likewise.
6746 * elf32-sh.c (add_dynamic_entry): Likewise.
6747 * elf32-sparc.c (add_dynamic_entry): Likewise.
6748 * elf32-vax.c (add_dynamic_entry): Likewise.
6749 * elf32-xtensa.c (add_dynamic_entry): Likewise.
6750 * elf64-alpha.c (add_dynamic_entry): Likewise.
6751 * elf64-hppa.c (add_dynamic_entry): Likewise.
6752 * elf64-ppc.c (add_dynamic_entry): Likewise.
6753 * elf64-s390.c (add_dynamic_entry): Likewise.
6754 * elf64-sparc.c (add_dynamic_entry): Likewise.
6755 * elf64-x86-64.c (add_dynamic_entry): Likewise.
6756 * elfxx-ia64.c (add_dynamic_entry): Likewise.
6757 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
6758 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
6759 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
6760 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6762 2004-03-23 Paul Brook <paul@codesourcery.com>
6764 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
6766 2004-03-22 Bob Wilson <bob.wilson@acm.org>
6768 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
6769 literal tables and check for relocs outside of literal pools.
6770 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
6771 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
6773 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
6774 (elf_xtensa_relocate_section): Read literal tables and check for
6775 dynamic relocations in read-only sections and not in literal pools.
6777 2004-03-23 Alan Modra <amodra@bigpond.net.au>
6780 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
6782 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
6784 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6785 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
6786 not defined by the executable, or defined in a DSO.
6787 <eliding run-time relocation of .got>: Initialize GOT entry for a
6788 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
6790 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
6791 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
6792 a PLT reloc to GOT for an executable.
6793 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
6794 .got for a DSO and explain why.
6795 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
6796 and unreferenced symbols for which a PLT is defined. Adjust
6797 dynamic-symbol pruning correspondingly, to make sure we don't lose
6798 a dynamic symbol also defined by a DSO.
6800 2004-03-22 Alan Modra <amodra@bigpond.net.au>
6802 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
6803 and rel args. Group input and output args. Wrap to 80 columns.
6804 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6805 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
6806 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
6807 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
6808 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6809 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
6810 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
6811 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
6812 RELOC_FOR_GLOBAL_SYMBOL invocation.
6814 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
6816 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
6817 unresolved symbols in objects aren't allowed.
6819 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
6821 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6822 (elf_hppa_unmark_useless_dynamic_symbols):
6823 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6824 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6825 (elf32_hppa_relocate_section): Likewise.
6826 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6827 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6828 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6829 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6830 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6832 * elf-m10200.c (mn10200_elf_relocate_section): Use
6833 RELOC_FOR_GLOBAL_SYMBOL.
6834 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6835 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6836 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6837 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6838 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6839 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
6840 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6841 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
6842 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6843 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6844 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6845 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6847 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6849 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6850 (final_link_relocate): Likewise.
6851 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6852 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6854 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6856 * Makefile.am: Run "make dep-am".
6857 * Makefile.in: Regenerate.
6858 * aclocal.m4: Regenerate.
6859 * config.in: Regenerate.
6860 * po/bfd.pot: Regenerate.
6862 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6863 H.J. Lu <hongjiu.lu@intel.com>
6865 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
6866 type and size change code to where it was previously. Remove
6867 dt_needed param. Treat old weak syms as strong if new sym is
6868 from a shared lib, even when old sym is from another shared
6869 lib. Remove unnecessary tests of oldweak and newweak. Correct
6871 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
6872 _bfd_elf_merge_symbol calls.
6873 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
6874 dt_needed local var. Update comments.
6875 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
6876 (_bfd_elf_add_default_symbol): Likewise.
6878 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
6879 strong syms in one shared object overriding weak syms in another.
6881 2004-03-18 Alan Modra <amodra@bigpond.net.au>
6883 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
6884 dyn_lib_class field. Rearrange for better packing.
6885 (elf_dt_soname): Delete.
6886 (elf_dyn_lib_class): Define.
6887 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
6888 (bfd_elf_set_dt_needed_soname): Delete.
6889 (bfd_elf_set_dyn_lib_class): New function.
6890 * elflink.h (add_dt_needed_tag): New function. Split out from..
6891 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
6892 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
6893 initialization of soname.
6894 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
6896 * bfd-in.h (enum dynamic_lib_link_class): New.
6897 (bfd_elf_set_dt_needed_soname): Delete.
6898 (bfd_elf_set_dyn_lib_class): Declare.
6899 * bfd-in2.h: Regenerate.
6901 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
6902 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
6903 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
6904 symbol loop. Instead use add_needed to flag tag as written.
6906 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
6908 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
6909 logic for null_input_bfd detection.
6911 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6913 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
6915 2004-03-16 Mark Kettenis <kettenis@gnu.org>
6917 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
6920 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6922 * elflink.c (elf_link_read_relocs_from_section): Don't use
6923 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
6924 (_bfd_elf_link_read_relocs): ..to here.
6925 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
6927 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6929 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
6930 values selected in configure.host. Require both to be defined
6931 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
6932 corresponding BFD_HOST vars with quotes.
6933 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
6934 Always require BFD_HOST_64_BIT_DEFINED.
6935 <file_ptr type>: Find off_t size before emitting message. Combine
6936 off_t and ftello64 conditional.
6937 * configure: Regenerate.
6939 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6941 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
6942 aliasing warning. Remove trailing whitespace throughout file.
6944 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6946 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
6947 input_section in calls to get_dyn_name.
6948 * 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
6950 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
6952 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6954 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
6955 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
6956 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
6957 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
6958 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
6959 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
6960 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
6962 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
6963 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6964 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6965 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6966 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
6967 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
6968 (read_8_bytes, read_indirect_string, read_address): Likewise.
6969 (read_abbrevs, parse_comp_unit): Likewise.
6970 * targets.c (struct bfd_target): Likewise.
6971 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
6972 * hppabsd-core.c: Likewise. Formatting.
6973 * hpux-core.c: Likewise.
6974 * irix-core.c: Likewise.
6975 * netbsd-core.c: Likewise.
6976 * osf-core.c: Likewise.
6977 * ptrace-core.c: Likewise.
6978 * sco5-core.c: Likewise.
6979 * trad-core.c: Likewise.
6980 * configure: Regenerate.
6981 * bfd-in2.h: Regenerate.
6983 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6985 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
6986 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
6987 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6988 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6989 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
6990 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
6991 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
6992 * libbfd.c: Likewise in function definitions.
6993 (bfd_put_8): Mask with 0xff rather than casting to char.
6994 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
6995 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
6996 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
6997 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
6998 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
6999 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7000 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7001 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7002 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7003 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7004 * archive.c (do_slurp_coff_armap): Update swap prototype.
7005 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7006 (tic54x_getl_signed_32): Likewise.
7007 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7008 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7009 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7010 (bfd_getp_signed_32, bfd_putp32): Likewise.
7011 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7012 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7013 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7014 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7015 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7016 bfd_h_getx_signed_16, bfd_h_putx16.
7017 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7018 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7019 * hpux-core.c: Likewise.
7020 * irix-core.c: Likewise.
7021 * netbsd-core.c: Likewise.
7022 * osf-core.c: Likewise.
7023 * ptrace-core.c: Likewise.
7024 * sco5-core.c: Likewise.
7025 * trad-core.c: Likewise.
7026 * bfd-in2.h: Regenerate.
7028 2004-03-15 Matt Thomas <matt@3am-software.com>
7030 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7033 2004-03-13 Mark Kettenis <kettenis@gnu.org>
7035 * config.bfd: Add x86_64-*-openbsd*.
7036 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7038 * configure: Regenerate.
7040 2004-03-12 Nick Clifton <nickc@redhat.com>
7041 Dave Murphy <wintermute2k4@ntlworld.com>
7043 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7044 if the input bfd does not contain any code.
7046 2004-03-09 Steve Ellcey <sje@cup.hp.com>
7048 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7050 2004-03-05 Fred Fish <fnf@redhat.com>
7052 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7053 mips16 symbols to be even rather than testing first for even/odd.
7054 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7056 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7058 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7061 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
7063 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7064 undefined symbols as hash_new.
7066 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7068 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7070 * elf32-sh.c: Ditto.
7071 * bfd-in2.h: Regenerate.
7073 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
7075 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7077 (_frv_count_got_plt_entries): Initialize them.
7078 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7080 (frv_pic_relocs_info_for_global): Likewise.
7081 (frv_pic_relocs_info_for_local): Likewise.
7082 (frv_pic_merge_early_relocs_info): New.
7083 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7085 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7086 Check that we don't exceed the allocated count for entry.
7087 (_frv_add_rofixup): Likewise.
7088 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7089 (elf32_frv_finish_dynamic_sections): Improve error message in case
7090 we emit too few rofixup entries.
7092 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
7094 * archures.c (bfd_mach_fr450): New.
7095 * bfd-in2.h: Regenerate.
7096 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7097 (arch_info_500): Link to it.
7098 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7099 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7100 (frv_elf_arch_extension_p): New function.
7101 (frv_elf_merge_private_bfd_data): Use it.
7103 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7105 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7107 * elflink.h (is_global_data_symbol_definition): Moved to
7109 (elf_link_is_defined_archive_symbol): Likewise.
7110 (elf_link_add_archive_symbols): Likewise. Renamed to
7111 _bfd_elf_link_add_archive_symbols.
7113 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7114 of ELF symbol table entry from backend.
7115 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7116 instead of elf_link_add_object_symbols.
7118 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7120 * elf-bfd.h (struct elf_backend_data): Added
7121 elf_backend_can_make_relative_eh_frame,
7122 elf_backend_can_make_lsda_relative_eh_frame and
7123 elf_backend_encode_eh_address.
7124 (_bfd_elf_encode_eh_address): Declare.
7125 (_bfd_elf_can_make_relative): Declare.
7126 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7127 hooks to decide whether to attempt to make_relative and
7129 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7130 (_bfd_elf_can_make_relative): New.
7131 (_bfd_elf_encode_eh_address): New.
7132 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7133 (frv_elf_encode_eh_address): New.
7134 (elf_backend_can_make_relative_eh_frame): Define.
7135 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7136 (elf_backend_encode_eh_address): Define.
7138 (elf_backend_can_make_relative_eh_frame): Define.
7139 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7140 (elf_backend_encode_eh_address): Define.
7141 (elfNN_bed): Add them.
7143 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
7145 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7146 complain_on_overflow to signed.
7148 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7150 * elflink.h (sort_symbol): New.
7151 (elf_link_add_object_symbols): Use a sorted symbol array for
7154 2004-02-27 Jakub Jelinek <jakub@redhat.com>
7156 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7157 for pc relative relocs.
7158 (elf_s390_relocate_section): Likewise.
7159 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7160 for pc relative relocs.
7161 (elf_s390_relocate_section): Likewise.
7163 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7165 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7168 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7170 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7171 field to track if a relocation is against readonly section.
7172 (count_dyn_reloc): Take a new argument for rent->reltext.
7173 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7174 (get_reloc_section): Don't set ia64_info->reltext here.
7175 (allocate_dynrel_entries): Set ia64_info->reltext here.
7177 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
7179 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7180 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7181 function's descriptor to symbol+offset, and map local undefweak
7182 symbol to NULL function descriptor.
7183 (elf32_frv_relocate_section): Likewise.
7185 2004-02-23 Mark Kettenis <kettenis@gnu.org>
7187 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7189 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7190 (netbsd_core_file_p): Set architecture from machine ID for
7193 2004-02-23 Jakub Jelinek <jakub@redhat.com>
7195 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7196 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7198 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7200 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7201 symbols with non-default visibility.
7203 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7205 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7206 IMAGE_SCN_MEM_WRITE on known sections only.
7208 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7210 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7211 symbols used in PIE relocs.
7213 2004-02-19 Jakub Jelinek <jakub@redhat.com>
7215 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7218 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
7220 * configure.in: Update version to 2.15.90.
7221 * configure: Regenerate.
7223 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
7224 Richard Sandiford <rsandifo@redhat.com>
7226 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7227 _bfd_elf_symbol_refs_local_p to decide whether to decay
7228 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7229 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7230 relocs if the symbol wasn't defined by a regular object file.
7231 Don't check the symbol's dynindx.
7233 2004-02-16 Andrew Cagney <cagney@redhat.com>
7235 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7237 * bfd-in2.h: Re-generate.
7239 2004-02-14 Andrew Cagney <cagney@redhat.com>
7241 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7242 _LARGEFILE64_SOURCE.
7244 2004-02-13 Andrew Cagney <cagney@redhat.com>
7246 * elf.c (vma_page_aligned_bias): New function.
7247 (assign_file_positions_except_relocs)
7248 (assign_file_positions_for_segments): Replace broken modulo
7249 arithmetic with call to vma_page_aligned_bias.
7251 2004-02-11 Andrew Cagney <cagney@redhat.com>
7253 * bfd-in.h: Update copyright.
7254 (bfd_tell): Change return type to file_ptr.
7255 * bfd-in2.h: Re-generate.
7256 * cache.c: Update copyright.
7257 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7259 (close_one): Use real_ftell.
7260 * bfdio.c: Update copyright.
7261 (real_ftell, real_fseek): New functions.
7262 (bfd_tell): Use real_fseek and real_ftell, change return type to
7264 (bfd_seek): Use real_ftell and real_fseek, change type of
7265 file_position to a file_ptr.
7266 * libbfd-in.h: Update copyright.
7267 (real_ftell, real_fseek): Declare.
7268 * libbfd.h: Re-generate.
7270 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7271 fseeko and fseeko64. Determine bfd_file_ptr.
7272 * configure: Re-generate.
7273 * config.in: Re-generate.
7275 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7277 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7278 * elf32-h8300.c: Likewise.
7280 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
7281 Nick Clifton <nickc@redhat.com>
7283 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7284 GOT entries with no associated GOT subsection.
7286 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
7288 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7289 * elf.c (swap_out_syms): Use it to decide whether local section
7290 symbols should be named.
7291 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7292 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7293 (elf_backend_name_local_section_symbols): Define.
7294 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7296 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7298 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7299 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7302 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
7304 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7305 to bfd_link_hash_entry passed by reference to
7306 _bfd_generic_link_add_one_symbol.
7308 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7310 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7311 relocations against dynamic symbols.
7313 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
7315 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7318 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
7320 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7321 * bfd-in2.h, libbfd.h: Rebuilt.
7323 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7325 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7326 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7327 flag has been cleared.
7329 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7331 * coff-h8300.c: Add and adjust comments about relaxation.
7332 * elf32-h8300.c: Likewise.
7334 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7336 * coff-h8300.c: Fix comment typos.
7337 * elf32-h8300.c: Likewise.
7339 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7341 * coff-h8300.c: Add comments about relaxation.
7342 * elf32-h8300.c: Likewise.
7344 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7346 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7348 * aclocal.m4: Regenerate.
7349 * configure: Regenerate.
7351 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7353 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7354 mips_elf64_rtype_to_howto instead of using howto_table.
7356 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
7358 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7360 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7361 relocs which would not use the PLT.
7363 2004-01-13 Alan Modra <amodra@bigpond.net.au>
7365 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7366 (ppc64_elf_gc_sweep_hook): Likewise.
7367 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7369 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7371 Adds linker relaxation support for bit manipulation insns like
7372 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
7374 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
7375 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
7376 * coff-h8300.c: Opcode for bit manipulation insn is checked in
7377 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7379 2004-01-12 Alan Modra <amodra@bigpond.net.au>
7381 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7383 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7385 * elf32-h8300.c: Fix formatting.
7387 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7389 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7390 dynamic object is present. Declare r_symndx and h in an inner
7392 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7394 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
7396 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7397 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7398 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7399 identically. Do not emit PC24 relocations for shared libraries.
7400 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7401 identically. Don't adjust pc_count.
7402 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7403 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7404 adjust count for branch relocations.
7405 (allocate_dynrelocs): Correct typo in call to
7406 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7407 PC24 or PLT32 relocs when linking.
7409 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7411 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7412 relocation howto with ARM_26 one for consistency.
7413 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7414 that will be converted to ARM_26D ones, since we always want 'done'
7415 relocations to be reflected in section's data.
7416 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7418 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7421 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7423 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7424 are not partial_inplace during a relocatable link.
7426 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7428 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
7429 if no dynamic object is present. Declare r_symndx and h in an
7432 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7434 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7435 trampoline if it is known out of range.
7437 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
7439 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7440 * elf32-frv.c (_frv_osec_readonly_p): New.
7441 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7443 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7444 (elf32_frv_relocate_section): Likewise. Error out if attempting
7445 to emit rofixups or dynamic relocs in read-only segments. Use
7446 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7447 dynamic relocations.
7448 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7449 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7450 relocations or fixups involving merged sections correctly. Avoid
7451 crash when undefined symbol is referenced by R_FRV_32 or
7452 R_FRV_FUNCDESC_VALUE.
7453 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7454 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7455 input section holding local symbol to addend of R_FRV_32 or
7456 R_FRV_FUNCDESC_VALUE dynamic relocation.
7457 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7458 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7459 (elf32_frv_always_size_sections): Don't store pointer to
7460 __stacksize symbol in sec_info.
7461 (elf32_frv_modify_segment_map): Look it up here.
7462 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7463 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7464 of the lazy PLT entry, not only its offset, as the low word of a
7465 function descriptor.
7466 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7467 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7468 if a hash table entry already exists but is not a definition.
7469 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7470 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7471 (_frv_add_rofixup): Don't inline.
7472 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7473 for undefweak symbols.
7474 (elf32_frv_relocate_section): Avoid crash while computing
7475 relocation when linking with shared library. Only emit rofixups
7476 and dynamic relocations for alloc&load sections. Mark binaries
7477 with inter-segment relocations for relocation as a unit.
7478 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7479 (DEFAULT_STACK_SIZE): New.
7480 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7481 emit rofixups or dynamic relocs when linking dynamic non-PIE
7483 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7484 shared libs too. Reserve the last entry for the GOT pointer.
7485 (elf32_frv_finish_dynamic_sections): Emit it.
7486 (elf32_frv_always_size_sections): New.
7487 (elf32_frv_modify_segment_map): New.
7488 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7490 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7491 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7492 (elf_backend_always_size_sections): New.
7493 (elf_backend_modify_segment_map): New.
7494 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7495 * config.bfd: Added frv-*-*linux*.
7496 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7497 ABS section, instead of crashing.
7498 (elf32_frv_relocate_section): Don't crash before warning about
7499 different segments in non-PIC relocation.
7500 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7501 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7502 relocs to undefweak symbols.
7503 (elf32_frv_relocate_section): Ditto for undefined symbols.
7504 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7505 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7506 gotfixup section was created.
7507 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7508 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7509 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7510 complain_overflow_signed.
7511 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7512 have not been allocated.
7513 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7514 privfd only if dynamic sections were created.
7515 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7516 for GPREL relocs. When linking relocatable FDPIC executables,
7517 emit warnings for relocations that would be illegal on PIE or
7518 shared libraries. Emit rofixup for R_FRV_32 only if input object
7520 (_frv_create_got_section): Define _gp symbol in the rofixup
7522 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7523 dynamic sections missing, error out requesting -melf32frvfd.
7524 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7525 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7526 computation of addends from section and global or local symbol
7527 value. Change return type to bfd_boolean, and return a failure if
7528 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7529 nonzero addend is required.
7530 (elf32_frv_relocate_section): Likewise. Print error for
7531 unsupported nonzero addends.
7532 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7533 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7534 force everything local.
7535 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7536 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7537 (frv_gotfixup_section): New.
7538 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7539 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7541 (_frv_add_rofixup): New.
7542 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7543 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7544 improve some ugly conditions.
7545 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7546 relocations in fdpic.
7547 (_frv_create_got_section): Create .rofixup.got section.
7548 (struct _frv_dynamic_got_info): Added fixups.
7549 (_frv_count_got_plt_entries): Account in-GOT relocations into
7550 relocs32, relocsfd and relocsfdv. Account them into relocs or
7551 fixups, as appropriate.
7552 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7554 (elf32_frv_finish_dynamic_sections): Verify that the right number
7555 of relocations and fixups was generated.
7556 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7558 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7559 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7560 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7561 descriptor of a (formerly-)global symbol is local.
7562 (struct frv_pic_relocs_info): Adjust comments.
7563 (_frv_emit_got_relocs_plt_entries): Adjust.
7564 (elf32_frv_relocate_section): Likewise.
7565 (_frv_count_got_plt_entries): Likewise.
7566 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7567 symbol's value to addend in the common preamble. Decay dynamic
7568 symbols to section+offset if they bind or call locally, for GOT
7569 and FUNCDESC_VALUE, respectively.
7570 (elf32_frv_relocate_section): Likewise.
7571 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7572 internal or hidden visibility.
7573 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7574 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7575 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7576 (elf32_frv_relocate_section): Pass relocation addend in. Use
7577 original relocation addend to look up the got relocs/plt entries
7578 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7579 processing relocations that reference .scommon symbols.
7580 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
7581 Introduce support for dynamic linking.
7582 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7583 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7584 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7585 (frv_reloc_type_lookup): Return REL howtos for executables and
7587 (frv_info_to_howto_rel): New.
7588 (struct frv_elf_link_hash_table): New.
7589 (frv_hash_table, frv_got_section, frv_gotrel_section,
7590 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7591 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7592 (frv_elf_link_hash_table_create): New.
7593 (struct frv_pic_relocs_info): New.
7594 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7595 (frv_pic_relocs_info_find): New.
7596 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7598 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7599 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7600 (_frv_emit_got_relocs_plt_entries): New.
7601 (elf32_frv_relocate_section): Add support for dynamic linking.
7602 Handle new relocations.
7603 (_frv_create_got_section): New.
7604 (elf32_frv_create_dynamic_sections): New.
7605 (ELF_DYNAMIC_INTERPRETER): New.
7606 (struct _frv_dynamic_got_info): New.
7607 (_frv_count_got_plt_entries): New.
7608 (struct _frv_dynamic_got_plt_info): New.
7609 (_frv_compute_got_alloc_data): New.
7610 (_frv_get_got_entry, _frv_get_fd_entry): New.
7611 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7612 (_frv_resolve_final_relocs_info): New.
7613 (elf32_frv_size_dynamic_sections): New.
7614 (elf32_frv_finish_dynamic_sections): New.
7615 (elf32_frv_adjust_dynamic_symbol): New.
7616 (elf32_frv_finish_dynamic_symbol): New.
7617 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7619 (elf_info_to_howto_rel): Define.
7620 (bfd_elf32_bfd_link_hash_table_create): Define.
7621 (elf_backend_create_dynamic_sections): Define.
7622 (elf_backend_adjust_dynamic_symbol): Define.
7623 (elf_backend_size_dynamic_sections): Define.
7624 (elf_backend_finish_dynamic_symbol): Define.
7625 (elf_backend_finish_dynamic_sections): Define.
7626 (elf_backend_want_got_sym): Define.
7627 (elf_backend_got_header_size): Define.
7628 (elf_backend_want_got_plt): Define.
7629 (elf_backend_plt_readonly): Define.
7630 (elf_backend_want_plt_sym): Define.
7631 (elf_backend_plt_header_size): Define.
7632 (elf_backend_may_use_rel_p): Define.
7633 (elf_backend_may_use_rela_p): Define.
7634 (elf_backend_default_use_rela_p): Define.
7635 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
7636 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7637 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7638 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7639 (frv_reloc_map): Map the corresponding BFD relocs to them.
7640 (frv_reloc_type_lookup): ... and back to BFD relocs.
7641 * reloc.c: New relocs.
7642 * bfd-in2.h, libbfd.h: Rebuilt.
7643 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
7644 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7645 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7646 R_FRV_FUNCDESC_GOTLO): New.
7647 (frv_reloc_map): Map the corresponding BFD relocs to them.
7648 (frv_reloc_type_lookup): ... and back to BFD relocs.
7649 * reloc.c: New relocs.
7650 * bfd-in2.h, libbfd.h: Rebuilt.
7652 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7654 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7655 targets to support pages of up to 64kB.
7656 (elf32_bed): Redefine to get a separate backend data structure for
7657 traditional targets.
7658 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7659 targets to support pages of up to 64kB.
7660 (elf64_bed): Redefine to get a separate backend data structure for
7661 traditional targets.
7662 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7663 targets to support pages of up to 64kB.
7664 (elf32_bed): Redefine to get a separate backend data structure for
7665 traditional targets.
7667 2004-01-04 Mark Kettenis <kettenis@gnu.org>
7669 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7671 2004-01-02 Mark Kettenis <kettenis@gnu.org>
7673 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7674 (elf_i386_grok_psinfo): Likewise.
7676 2004-01-02 Bernardo Innocenti <bernie@develer.com>
7678 * config.bfd: Add m68k-uClinux target.
7680 2004-01-01 Grant Edwards <grante@visi.com>
7682 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7683 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7684 (elf32_h8_gc_sweep_hook): New function.
7685 (elf_backend_gc_mark_hook): Define.
7686 (elf_backend_gc_sweep_hook): Define.
7687 (elf_backend_can_gc_sections): Define.
7689 For older changes see ChangeLog-0203
7695 version-control: never