1 2005-02-16 Alan Modra <amodra@bigpond.net.au>
3 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
4 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
5 * pef.c (bfd_pef_scan): Don't ignore return value of
6 bfd_pef_scan_start_address.
8 2005-02-16 Alan Modra <amodra@bigpond.net.au>
10 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
11 Skip toc reloc adjust if reloc_count is zero.
13 2005-02-15 Nigel Stephens <nigel@mips.com>
14 Maciej W. Rozycki <macro@mips.com>
16 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
17 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
18 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
19 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
20 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
22 (mips16_gprel_reloc): Remove bit shuffling; call
23 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
24 and _bfd_mips16_elf_reloc_shuffle() instead.
25 (mips16_reloc_map): New reloc map for MIPS16 relocs.
26 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
28 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
29 elf_mips16_howto_table_rel.
30 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
31 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
32 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
33 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
34 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
36 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
37 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
38 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
40 (mips16_gprel_reloc): Remove bit shuffling; call
41 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
42 and _bfd_mips16_elf_reloc_shuffle() instead.
43 (mips16_reloc_map): New reloc map for MIPS16 relocs.
44 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
46 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
47 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
48 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
49 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
50 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
51 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
52 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
54 (mips16_gprel_reloc): Remove bit shuffling; call
55 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
56 and _bfd_mips16_elf_reloc_shuffle() instead.
57 (mips16_reloc_map): New reloc map for MIPS16 relocs.
58 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
60 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
61 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
62 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
63 handle bit shuffling for MIPS16 relocs.
64 (_bfd_mips16_elf_reloc_shuffle): Likewise.
65 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
66 and _bfd_mips16_elf_reloc_shuffle().
67 (_bfd_mips_elf_generic_reloc): Likewise.
68 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
70 (mips_elf_obtain_contents): Remove bit shuffling.
71 (mips_elf_perform_relocation): Likewise; call
72 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
74 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
76 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
77 (_bfd_mips16_elf_reloc_shuffle): Likewise.
78 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
79 (BFD_RELOC_MIPS16_HI16_S): Likewise.
80 (BFD_RELOC_MIPS16_LO16): Likewise.
81 * bfd-in2.h: Regenerate.
82 * libbfd.h: Regenerate.
84 2005-02-15 Jan Beulich <jbeulich@novell.com>
86 * elfxx-ia64.c (ia64_howto_table): Correct strings for
87 R_IA64_DTPMOD64[LM]SB.
89 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
91 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
92 backward branch in the same section.
93 (elfNN_ia64_relocate_section): Inform users that the input
94 section is too big to relax br instruction when overflow
95 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
98 2005-02-14 Orjan Friberg <orjanf@axis.com>
100 * elfcore.h (elf_core_file_p): Move the call to
101 elf_backend_object_p to allow the correct machine to be set before
102 processing the program headers.
104 2005-02-14 Nick Clifton <nickc@redhat.com>
107 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
108 aware flag from the input bfd to the output bfd.
110 2005-02-11 Maciej W. Rozycki <macro@mips.com>
112 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
113 R_MIPS_LITERAL relocations for external symbols.
114 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
115 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
117 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
119 * bfd-in2.h: Rebuilt.
121 2005-02-11 Paul Brook <paul@codesourcery.com>
123 * elf-bfd.h (struct elf_link_hash_table): Add
124 is_relocatable_executable.
125 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
126 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
127 symbols in relocatable executables.
128 (bfd_elf_record_link_assignment): Create dynamic section symbols in
129 relocatable executables.
130 (_bfd_elf_link_renumber_dynsyms): Ditto.
131 (bfd_elf_final_link): Ditto.
132 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
133 relocations into relocatable executables.
134 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
135 executables. Also copy absolute relocations.
136 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
137 in relocatable executables.
138 (allocate_dynrelocs): Copy relocations for relocatable executables.
139 Output dynamic symbols for symbols defined in linker scripts.
141 2005-02-11 Nick Clifton <nickc@redhat.com>
143 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
144 to avoid a compile time warning.
146 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
149 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
150 inclusion of coffcode.h so that it is actually picked up.
152 * coffcode.h (coff_std_swap_table): Add an unused attribute in
155 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
158 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
161 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
162 to protect the declaration of this array.
164 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
165 Avoid call to memcpy with a size of 0.
167 2005-02-12 Alan Modra <amodra@bigpond.net.au>
169 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
170 old-style branches to undefined dot-symbols which will be
171 satisfied by a plt call.
173 2005-02-11 Alan Modra <amodra@bigpond.net.au>
175 * elf64-ppc.c (move_plt_plist): New function, extracted from..
176 (ppc64_elf_copy_indirect_symbol): ..here.
177 (func_desc_adjust): Use move_plt_plist.
179 2005-02-10 Paul Brook <paul@codesourcery.com>
181 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
183 2005-02-10 Paul Brook <paul@codesourcery.com>
185 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
187 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
188 (elf_link_renumber_local_hash_table_dynsyms): New function.
189 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
191 2005-02-10 Jakub Jelinek <jakub@redhat.com>
193 * bfd-in.h (BFD_LINKER_CREATED): Define.
194 * bfd-in2.h: Rebuilt.
195 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
196 BFD_LINKER_CREATED bfds when determining input bfds without
197 .note.GNU-stack section.
199 2005-02-10 Maciej W. Rozycki <macro@mips.com>
201 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
202 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
203 relocations against external symbols unchanged.
205 2005-02-08 Paul Brook <paul@codesourcery.com>
207 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
210 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
212 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
215 2005-02-07 Maciej W. Rozycki <macro@mips.com>
217 * elf64-mips.c: Fix formatting throughout.
219 2005-02-07 Maciej W. Rozycki <macro@mips.com>
221 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
223 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
225 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
226 *ABS*/*UND* sections.
227 (elf32_frv_relocate_section): Move zero-addend-required error...
228 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
229 missing needed TLS section.
231 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
233 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
234 being the last symbol.
235 (aout_link_add_symbols): Just return TRUE if a warning
238 2005-02-07 Maciej W. Rozycki <macro@mips.com>
240 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
241 R_MIPS_GPREL32 relocations against external symbols.
242 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
245 2005-02-07 Alan Modra <amodra@bigpond.net.au>
247 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
248 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
249 elf_string_from_elf_strtab.
250 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
251 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
252 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
253 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
254 looking at cached symtab info first, before iterating over headers.
255 For SHT_REL and SHT_RELA, load dynsymtab if needed.
256 * elfcode.h (elf_object_p): Don't load section header stringtab
259 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
261 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
262 against protected function when building shared library.
265 * elf64-x86-64.c (is_32bit_relative_branch): New.
266 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
267 protected function symbol when building shared library for
268 32bit relative branch instruction.
270 2005-02-06 Alan Modra <amodra@bigpond.net.au>
272 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
273 syms when doing a relocatable link.
274 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
276 (ppc64_elf_tls_setup): Likewise.
277 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
279 2005-02-04 Alan Modra <amodra@bigpond.net.au>
281 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
282 (link_hash_newfunc): Clear all locals using memset.
283 (make_fdh): Remove flags param. Always create fake func desc
284 weak. Link the descriptor with the code entry sym.
285 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
286 (add_symbol_adjust): Adjust make_fdh call.
287 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
288 descriptor to strong undefined if code entry is strong.
290 2005-02-04 Alan Modra <amodra@bigpond.net.au>
292 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
293 lookup here. Set to new before calling bfd_link_repair_undef_list.
294 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
296 2005-02-03 Alan Modra <amodra@bigpond.net.au>
298 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
300 2005-02-03 Alan Modra <amodra@bigpond.net.au>
302 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
303 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
304 before the as-needed lib was loaded. Abort on unexpected refs.
306 2005-02-02 Alan Modra <amodra@bigpond.net.au>
308 * elflink.c (elf_smash_syms): Expand comments.
309 (elf_link_add_object_symbols): Only call elf_smash_syms for
310 as-needed dynamic objects.
312 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
313 everything, just the field specific to ia64.
314 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
316 2005-02-01 Alan Modra <amodra@bigpond.net.au>
318 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
319 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
321 (struct add_symbol_adjust_data): New.
322 (add_symbol_adjust): Make an undefweak func desc for old ABI
323 objects to link with --as-needed shared libs. Return fail status.
324 Don't adjust old ABI func entry sym to weak if func desc syms
326 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
329 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
331 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
334 2005-02-01 Alan Modra <amodra@bigpond.net.au>
336 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
337 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
338 remove anything but new and undefweak.
339 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
341 (_bfd_elf_create_dynamic_sections): Formatting.
342 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
343 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
344 (struct elf_smash_data): New.
345 (elf_smash_syms): New function.
346 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
347 unneeded dynamic objects to loaded list.
348 (elf_link_output_extsym): Don't handle as-needed here. Strip
349 bfd_link_hash_new symbols.
350 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
351 delref when dynindx is already -1.
352 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
354 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
356 2005-02-01 Ben Elliston <bje@au.ibm.com>
358 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
360 2005-02-01 Ben Elliston <bje@au.ibm.com>
362 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
363 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
364 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
365 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
366 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
367 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
368 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
369 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
370 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
371 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
372 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
373 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
374 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
375 throughout. Similarly, collapse #if 1'd code.
377 2005-02-01 Ben Elliston <bje@au.ibm.com>
379 * elf-bfd.h (bfd_elf_discard_group): Remove.
380 * elf.c (bfd_elf_discard_group): Likewise.
381 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
383 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
385 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
386 (_bfd_elf_eh_frame_address_size): Declare.
387 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
388 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
389 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
390 (elf_backend_eh_frame_address_size): Define.
391 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
392 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
393 size from the new backend hook.
394 (_bfd_elf_write_section_eh_frame): Likewise.
395 (_bfd_elf_eh_frame_address_size): New function.
397 2005-01-31 Andrew Cagney <cagney@gnu.org>
399 * configure: Regenerate to track ../gettext.m4.
401 2005-01-31 Mark Mitchell <mark@codesourcery.com>
403 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
404 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
406 2005-01-31 Nick Clifton <nickc@redhat.com>
408 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
409 sparc-lynxos, vax-vms) be obsolete.
411 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
413 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
414 * elf32-arm.c (ELF_MINPAGESIZE): Define.
415 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
416 * elfcode.h (elf_object_p): Use minpagesize instead of
418 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
419 (elfNN_bed): Include ELF_MINPAGESIZE.
421 2005-01-28 Julian Brown <julian@codesourcery.com>
423 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
424 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
425 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
426 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
427 passing flag value from ld. Set flag value in global hash table entry.
428 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
431 2005-01-27 Andrew Cagney <cagney@gnu.org>
433 * configure: Regenerate to track ../gettext.m4 change.
435 2005-01-25 Mark Mitchell <mark@codesourcery.com>
437 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
440 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
442 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
443 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
445 * reloc.c: Add R_FRV_TLSMOFF.
446 * elf32-frv.c (elf32_frv_howto_table): Likewise.
447 (frv_reloc_map, frv_reloc_type_lookup): Map it.
448 (elf32_frv_relocate_section): Handle it.
449 (elf32_frv_check_relocs): Likewise.
450 * libbfd.h, bfd-in2.h: Rebuilt.
451 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
452 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
453 when given an undefweak TLS symbol. Fix constant TLS PLT entries
454 such that they return the constant in gr9.
455 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
457 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
458 too, such that they shrink on relaxation.
459 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
460 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
461 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
462 if we can guarantee the use of 16-bit constants.
463 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
464 Introduce TLS support for FR-V FDPIC.
465 * reloc.c: Add TLS relocations.
466 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
467 (elf32_frv_rel_tlsdesc_value_howto): New.
468 (elf32_frv_rel_tlsoff_howto): New.
469 (frv_reloc_map): Add new mappings.
470 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
472 (frvfdpic_dynamic_got_plt_info): New.
473 (frvfdpic_plt_tls_ret_offset): New.
474 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
475 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
476 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
477 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
479 (struct frvfdpic_relocs_info): Add TLS fields.
480 (frvfdpic_relocs_info_hash): Warning clean up.
481 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
482 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
483 (FRVFDPIC_TLS_BIAS): Define.
484 (tls_biased_base): New.
485 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
487 (frv_reloc_type_lookup): Likewise.
488 (frvfdpic_info_to_howto_rel): Likewise.
489 (elf32_frv_relocate_section): Likewise.
490 (_frv_create_got_section): Create the PLT section here.
491 (elf32_frvfdpic_create_dynamic_sections): Not here.
492 (_frvfdpic_count_nontls_entries): Move out of...
493 (_frvfdpic_count_got_plt_entries): ... here.
494 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
495 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
497 (_frvfdpic_relax_tls_entries): New.
498 (_frvfdpic_compute_got_alloc_data): Add TLS support.
499 (_frvfdpic_get_tlsdesc_entry): New.
500 (_frvfdpic_assign_got_entries): Add TLS support.
501 (_frvfdpic_assign_plt_entries): Likewise.
502 (_frvfdpic_reset_got_plt_entries): New.
503 (_frvfdpic_size_got_plt): Move out of...
504 (elf32_frvfdpic_size_dynamic_sections): ... here.
505 (_frvfdpic_relax_got_plt_entries): New.
506 (elf32_frvfdpic_relax_section): New.
507 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
508 (elf32_frv_check_relocs): Add TLS support.
509 (bfd_elf32_bfd_relax_section): Define for FDPIC.
510 * libbfd.h, bfd-in2.h: Rebuilt.
512 2005-01-25 Alan Modra <amodra@bigpond.net.au>
514 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
515 loadable reloc sections.
516 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
517 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
519 2005-01-25 Alan Modra <amodra@bigpond.net.au>
521 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
522 sections immediately when linking shared libs. Instead, wait until
523 we know a lib is needed.
524 (_bfd_elf_link_create_dynstrtab): Extract from..
525 (_bfd_elf_link_create_dynamic_sections_): ..here.
526 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
527 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
528 for non-existent .dynamic.
529 (elf_link_output_extsym): Don't complain about undefined symbols
530 in as-needed dynamic libs that aren't actually linked.
532 2005-01-24 Andrew Cagney <cagney@gnu.org>
534 * configure: Regenerate, ../gettext.m4 was updated.
536 2005-01-21 Ben Elliston <bje@au.ibm.com>
538 * aout-encap.c: Remove unused file.
540 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
543 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
544 non-function symbols are local.
545 (_bfd_elf_symbol_refs_local_p): Likewise.
547 2005-01-18 Alan Modra <amodra@bigpond.net.au>
549 * bfd.c (bfd_link_just_syms): Add abfd param.
550 * bfd-in2.h: Regenerate.
552 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
554 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
555 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
556 instructions. If the amount of padding is known, reduce the size
557 of the CIE or FDE by that amount.
559 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
561 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
562 augmentation_size. Use bfd_signed_vmas for data_align.
563 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
564 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
565 functions. Don't read past the end of the enclosing CIE or FDE.
566 (skip_bytes): New utility function.
567 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
569 (_bfd_elf_write_section_eh_frame): Use new functions.
571 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
573 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
574 assert-style REQUIRE() macro to handle sanity checks.
576 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
578 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
580 (read_unsigned_leb128): Removed.
581 (read_signed_leb128): Removed.
582 (find_abstract_instance_name): Updated.
583 (parse_comp_unit): Accept info_ptr_unit.
584 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
585 comp unit and pass it to parse_comp_unit.
587 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
588 (read_signed_leb128): Moved to ...
591 * libbfd-in.h (read_unsigned_leb128): New prototype.
592 (read_signed_leb128): Likewise.
593 * libbfd.h: Regenerated.
595 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
596 Nick Clifton <nickc@redhat.com>
598 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
599 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
600 arch_sh4a_nofpu_up in order to match the external names and make the
601 testsuite's job easier.
602 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
604 * bfd-in2.h: Regenerate.
606 2005-01-15 Andrew Cagney <cagney@gnu.org>
609 * acinclude.m4: Move BFD_NEED_DECLARATION,
610 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
611 the new file bfd.m4. Include ../bfd/bfd.m4.
612 * configure: Re-generate.
614 2005-01-12 Alan Modra <amodra@bigpond.net.au>
616 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
617 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
619 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
622 2005-01-11 Alan Modra <amodra@bigpond.net.au>
624 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
626 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
627 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
628 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
629 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
630 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
631 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
632 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
633 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
634 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
635 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
636 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
637 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
638 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
639 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
641 2005-01-11 Alan Modra <amodra@bigpond.net.au>
643 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
646 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
648 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
649 * bfd-in2.h: Regenerate.
650 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
651 to support these new machine values.
652 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
654 (bfd_maxq_arch): Update values for the maxq20.
656 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
658 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
659 non-shared object, do not reserve space in .plt and .rela.plt for
660 regular symbols neither defined nor referenced in shared objects.
662 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
664 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
665 to zero the structure.
666 (create_got_section): Use BFD_ASSERT instead of abort.
667 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
669 (create_got_section): New function.
670 (sparc64_elf_create_dynamic_sections): Likewise.
671 (sparc64_elf_check_relocs): Invoke create_got_section instead of
672 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
673 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
674 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
675 (sparc64_elf_finish_dynamic_symbol): Likewise.
676 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
677 (elf_backend_create_dynamic_sections): Define to
678 sparc64_elf_create_dynamic_sections.
680 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
682 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
683 (elf_backend_omit_section_dynsym): Define to it.
684 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
685 (elf_backend_omit_section_dynsym): Define to it.
687 2005-01-07 Jakub Jelinek <jakub@redhat.com>
689 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
690 PT_DYNAMIC segment, unless .dynamic.
692 2005-01-06 Paul Brook <paul@codesourcery.com>
694 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
695 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
696 * configure: Regenerate.
697 * elf32-arm.c: Add VxWorks target bfd.
699 (elf32_arm_link_hash_table): Add use_rel.
700 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
701 elf32_arm_relocate_section): Replace USE_REL with runtime check.
702 Correct offset calculation for RELA case.
703 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
704 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
705 (elf32_arm_vxworks_link_hash_table_create): New function.
706 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
707 (bfd_elf32_littlearm_vxworks_vec): Ditto.
708 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
710 2005-01-06 Alan Modra <amodra@bigpond.net.au>
712 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
714 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
715 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
716 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
717 (ppc64_elf_next_toc_section): Heed no_multi_toc.
718 (ppc64_elf_reinit_toc): Set multi_toc_needed.
719 (toc_adjusting_stub_needed): Rewrite.
720 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
721 toc tests. Adjust for toc_adjusting_stub_needed changes.
722 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
723 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
724 * section.c: Expand comment on backend bits.
725 * bfd-in2.h: Regenerate.
726 * libbfd.h: Regenerate.
728 2005-01-06 Alan Modra <amodra@bigpond.net.au>
730 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
731 toc adjusting stub, do not test source section flags.
733 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
735 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
736 from STABS debugging sections again.
738 2005-01-05 Fred Fish <fnf@specifixinc.com>
740 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
741 (find_abstract_instance_name): New function.
742 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
743 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
744 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
746 2004-12-31 Paul Brook <paul@copdesourcery.com>
748 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
750 2004-12-31 Alan Modra <amodra@bigpond.net.au>
752 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
753 Commit missing changes from 2004-12-22.
754 * bfd-in2.h: Regenerate.
756 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
758 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
760 2004-12-21 Kris Warkentin <kewarken@qnx.com>
762 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
763 Add 'base' argument for constructing register sections. Reformat.
764 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
765 gp and fp regs. Reformat.
767 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
769 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
770 * bfd-in2.h: Regenerate.
771 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
772 (avr_reloc_map): Likewise.
773 (avr_final_link_relocate): Likewise.
775 2004-12-22 Alan Modra <amodra@bigpond.net.au>
777 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
778 as-needed dynamic libs as undefined.
779 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
780 libs when finding they are needed.
782 2004-12-20 Alan Modra <amodra@bigpond.net.au>
784 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
785 (opd_entry_value): Use opd_relocs if available.
786 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
787 copy .opd relocations to opd_relocs.
788 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
790 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
792 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
793 * elf32-v850.c (v850_elf_howto_table): Add entry for
794 R_V850_LO16_SPLIT_OFFSET.
795 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
796 (v850_elf_perform_lo16_relocation): New function, extracted from...
797 (v850_elf_perform_relocation): ...here. Use it to handle
798 R_V850_LO16_SPLIT_OFFSET.
799 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
800 R_V850_LO16_SPLIT_OFFSET.
801 * libbfd.h, bfd-in2.h: Regenerate.
803 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
805 * config.bfd: Add s390x-ibm-tpf support.
807 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
809 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
810 to prototype, to make hash info available.
811 Prevent wrapped symbols from being adjusted twice.
813 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
815 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
816 overflow for calls to undefined weak symbols.
818 2004-12-11 Alan Modra <amodra@bigpond.net.au>
820 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
821 canonical sections syms have a name.
823 2004-12-11 Alan Modra <amodra@bigpond.net.au>
825 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
826 have been adjusted for output.
827 (ppc64_elf_relocate_section): Mark sections with reloc_done.
829 2004-12-10 Alan Modra <amodra@bigpond.net.au>
831 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
832 add symtab_hdr param.
833 (group_signature): Update calls.
834 * elf-bfd.h (bfd_elf_sym_name): Update.
835 * elf32-ppc.c (ppc_elf_relocate_section): Update.
836 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
837 (ppc64_elf_relocate_section): Update.
838 * elflink.c (elf_link_input_bfd): Update.
840 2004-12-10 Jakub Jelinek <jakub@redhat.com>
842 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
843 st_shndx on STT_SECTION sections.
845 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
847 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
850 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
852 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
853 return a real value, unless it is a PLT symbol.
854 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
857 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
858 R_MIPS_JALR entry to 0.
860 * archures.c: Define bfd_mach_mips9000.
861 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
862 (mips_set_isa_flags): Handle bfd_mach_mips9000.
863 * cpu-mips.c (I_mips9000): Define.
864 (arch_info_struct): Add case for bfd_mach_mips9000.
865 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
866 * bfd-in2.h: Regenerate.
868 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
870 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
873 2004-12-07 Ben Elliston <bje@gnu.org>
875 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
877 2004-12-06 Daniel Jacobowitz <dan@debian.org>
879 Suggested by Fergal Daly <fergal@esatclear.ie>:
880 * simple.c (simple_dummy_multiple_definition): New function.
881 (bfd_simple_get_relocated_section_contents): Use it.
883 2004-12-03 Jan Beulich <jbeulich@novell.com>
885 * elf.c (elf_find_function): Don't use the last file symbol ever,
886 seen, but the last one seen prior to the symbol being reported.
887 Don't report a filename at all for global symbols when that might
890 2004-12-01 Paul Brook <paul@codesourcery.com>
892 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
893 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
896 2004-12-01 Paul Brook <paul@codesourcery.com>
898 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
901 2004-11-30 Paul Brook <paul@codesourcery.com>
903 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
904 no_pipeline_knowledge
905 (elf32_arm_link_hash_table_create): Ditto.
906 (bfd_elf32_arm_process_before_allocation): Ditto.
907 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
909 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
911 * bfd-in2.h: Regenerate.
913 2004-11-30 Randolph Chung <tausq@debian.org>
915 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
916 (elf32_hppa_grok_psinfo): New function.
917 (elf_backend_grok_prstatus): Define.
918 (elf_backend_grok_psinfo): Define.
920 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
923 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
925 2004-11-24 Paul Brook <paul@codesourcery.com>
927 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
929 2004-11-24 Paul Brook <paul@codesourcery.com>
931 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
932 (elf32_arm_swap_symbol_out): New function.
933 (elf32_arm_size_info): Add.
934 (elf_backend_size_info): Define.
936 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
938 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
941 2004-11-19 Alan Modra <amodra@bigpond.net.au>
943 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
944 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
945 * nlmcode.h (nlm_write_object_contents): Warning fix.
947 2004-11-18 Bob Wilson <bob.wilson@acm.org>
949 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
951 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
953 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
954 (elf32_arm_plt_thumb_stub): New.
955 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
957 (elf32_arm_link_hash_traverse): Fix typo.
958 (elf32_arm_link_hash_table): Add obfd.
959 (elf32_arm_link_hash_newfunc): Initialize new fields.
960 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
961 (elf32_arm_link_hash_table_create): Initialize obfd.
962 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
963 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
964 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
965 interworking BFD is not dynamic.
966 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
967 not emit glue for PLT references.
968 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
969 emit glue for PLT references. Support the Thumb PLT prefix.
970 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
972 (elf32_arm_check_relocs): Likewise.
973 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
975 (allocate_dynrelocs): Handle Thumb PLT references.
976 (elf32_arm_finish_dynamic_symbol): Likewise.
977 (elf32_arm_symbol_processing): New function.
978 (elf_backend_symbol_processing): Define.
980 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
982 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
983 add_fde_encoding. Remove need_relative.
984 * elf-eh-frame.c (extra_augmentation_string_bytes)
985 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
986 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
987 in cases where the CIE has no existing 'R' augmentation. Use
988 size_of_output_cie_fde when assigning offsets. Use the final offset
989 as the new section size.
990 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
991 Account for any extra augmentation bytes in the returned offset.
992 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
993 moved before being modified. Pad growing entries with DW_CFA_nops.
994 Add 'z' and 'R' augmentations as directed by add_augmentation_size
995 and add_fde_encoding.
997 2004-11-15 Mark Mitchell <mark@codesourcery.com>
999 * elf32-arm.c (elf32_arm_relocate_section): Use
1000 arm_real_reloc_type.
1002 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
1004 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
1005 for discard relocations; don't add an R_MIPS_NONE to the main body
1008 2004-11-04 Paul Brook <paul@codesourcery.com>
1010 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
1011 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
1012 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
1013 default version definition for unversioned symbols.
1014 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
1015 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
1016 _bfd_elf_slurp_version_tables. Set default version for unversioned
1019 2004-11-15 Paul Brook <paul@codesourcery.com>
1021 * elflink.c (elf_link_add_object_symbols): Don't assume version
1022 indices are consecutive.
1024 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
1026 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
1027 composite relocations against the personality data.
1029 2004-11-13 Paul Brook <paul@codesourcery.com>
1031 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
1032 R_ARM_PREL31 relocations to PLT entries.
1033 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
1034 (elf32_arm_check_relocs): Ditto.
1036 2004-11-12 Bob Wilson <bob.wilson@acm.org>
1038 * xtensa-isa.c (xtensa_interface_class_id): New.
1040 2004-11-11 Bob Wilson <bob.wilson@acm.org>
1042 * elf32-xtensa.c (property_table_compare): Remove assertion about
1043 entries with the same address and non-zero size.
1044 (xtensa_read_table_entries): Report such entries as errors.
1046 2004-11-11 Mark Mitchell <mark@codesourcery.com>
1048 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
1049 R_ARM_RELATIVE on Symbian OS.
1051 2004-11-09 Mark Mitchell <mark@codesourcery.com>
1053 * som.c (som_bfd_print_private_bfd_data): New function.
1054 (som_object_setup): Save the auxiliary header. Don't assume that
1055 zero is an invalid entry point for a shared library.
1056 (som_object_p): Allocate the auxiliary header on the heap.
1058 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
1060 (elf32_arm_symbian_modify_segment_map): Likewise.
1062 2004-11-09 Daniel Jacobowitz <dan@debian.org>
1064 From David Poole <daveml@mbuf.com>:
1065 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
1066 (elf32_arm_size_dynamic_sections): Call it.
1068 2004-11-09 Alan Modra <amodra@bigpond.net.au>
1070 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
1071 (ALL_MACHINES_CFILES): Fix typo.
1072 * Makefile.in: Regenerate.
1073 * po/SRC-POTFILES.in: Regenerate.
1075 2004-11-08 Mark Mitchell <mark@codesourcery.com>
1077 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
1078 R_ARM_RELATIVE relocation for Symbian OS, mention the section
1079 symbol in the relocation.
1081 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
1082 Vineet Sharma <vineets@noida.hcltech.com>
1084 * coff-maxq.c: New File.
1085 * cpu-maxq.c: New File.
1086 * coffcode.h: Likewise.
1087 * config.bfd: Likewise.
1088 * configure.in (maxqcoff_vec): New target vector.
1089 * Makefile.am: Add support for maxq target.
1090 * configure.in: Likewise.
1091 * archures.c:. Likewise.
1092 * targets.c: Likewise.
1093 * bfd_in2.h : Regenerated.
1094 * Makefile.in: Regenerated.
1095 * configure: Regenerated.
1096 * doc/Makefile.in: Regenerated.
1098 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1100 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
1101 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
1102 C_NT_WEAK aux entries.
1103 (_bfd_coff_generic_relocate_section): Handle undefined
1106 2004-11-07 Andreas Schwab <schwab@suse.de>
1108 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
1109 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
1110 non-default visibility.
1112 2004-11-01 Mark Mitchell <mark@codesourcery.com>
1114 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
1116 (elf32_arm_symbian_modify_segment_map): Don't
1117 reset includes_filehdr and includes_phdrs here.
1119 2004-11-04 Daniel Jacobowitz <dan@debian.org>
1121 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
1122 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
1123 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
1125 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
1126 to a new removed list. Remove normal configuration stanzas.
1127 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
1128 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
1129 elfarm-nabi.lo with elf32-arm.lo.
1130 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
1131 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
1132 * elf32-arm.h: Remove.
1133 * elfarm-oabi.c: Remove.
1134 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
1135 and bfd_elf32_littlearm_oabi_vec.
1136 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
1138 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
1140 * config.bfd: Support crisv32-*-* like cris-*-*.
1141 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
1142 (bfd_mach_cris_v10_v32): New macros.
1143 * cpu-cris.c: Tweak formatting.
1144 (get_compatible): New function.
1146 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
1147 bfd_arch_info_type:s.
1148 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
1149 get_compatible for member compatible and link bfd_cris_arch_v32 as
1151 * elf32-cris.c (cris_elf_pcrel_reloc)
1152 (cris_elf_set_mach_from_flags): New functions.
1153 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
1154 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
1155 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
1156 numbers for bfd_mach_cris_v32.
1157 (PLT_ENTRY_SIZE_V32): New macro.
1158 (elf_cris_plt0_entry): Drop last comma in initializer.
1159 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
1160 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
1162 (cris_elf_relocate_section): Change all "%B(%A)" messages to
1164 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
1165 (elf_cris_finish_dynamic_sections): Similar.
1166 (elf_cris_adjust_dynamic_symbol): Similar.
1167 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
1169 <switch with PIC relocs>: Emit error and return FALSE for
1170 bfd_mach_cris_v10_v32.
1171 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1172 Emit warning when generating textrel reloc.
1173 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
1174 (cris_elf_final_write_processing): Set flags according to mach.
1175 (cris_elf_print_private_bfd_data): Display
1176 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
1177 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
1178 new_flags. Don't call cris_elf_final_write_processing. Don't
1179 look at the actual elf header flags at all; use
1180 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
1181 in bfd_get_mach for ibfd and obfd and handle merging of compatible
1183 (bfd_elf32_bfd_copy_private_bfd_data): Define.
1184 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
1185 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
1186 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
1187 * bfd-in2.h, libbfd.h: Regenerate.
1189 2004-11-04 Alan Modra <amodra@bigpond.net.au>
1191 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
1192 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
1194 (struct adjust_toc_info): New.
1195 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
1197 2004-11-03 Bob Wilson <bob.wilson@acm.org>
1199 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
1200 if there are no segments.
1202 2004-11-02 Daniel Jacobowitz <dan@debian.org>
1204 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
1206 2004-11-02 Nick Clifton <nickc@redhat.com>
1208 * elf32-iq2000.c: Convert to ISO C90 formatting.
1210 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
1212 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
1214 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
1216 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
1217 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
1218 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
1220 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1222 * elf32-sh.c (tpoff): Take alignment into account.
1224 2004-10-28 Nick Clifton <nickc@redhat.com>
1226 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
1227 performing a relocatable link.
1228 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
1229 for MIPS ports under Irix.
1231 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
1233 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
1234 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
1235 (elf32_arm_final_link_relocate): Ditto.
1236 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
1237 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
1238 (elf32_arm_adjust_dynamic_symbol): Ditto.
1239 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
1240 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
1241 (elf32_arm_r_howto): ... To here.
1242 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
1244 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
1247 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
1248 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
1249 and R_IA64_SECREL64LSB.
1251 2004-10-26 Paul Brook <paul@codesourcery.com>
1253 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
1254 (bfd_elf_size_dynamic_sections): Create default version definition.
1255 (elf_link_output_extsym): Adjust for default symbol version.
1257 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
1259 * mmo.c: Adjust to ISO C.
1261 * mmo.c (mmo_write_section_description): New function broken out
1262 of mmo_internal_write_section.
1263 (mmo_internal_write_section): For each of .text and .data, call
1264 mmo_write_section_description before outputting contents if it has
1265 nontrivially deducible vma or contents.
1266 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
1267 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
1268 symbols if found within the .data address range.
1270 2004-10-24 Daniel Jacobowitz <dan@debian.org>
1272 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
1274 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
1276 * mmo.c (File Layout): Correct place of misplaced blurb about
1279 2004-10-22 Mark Kettenis <kettenis@gnu.org>
1281 * config.bfd: Add mips64*-*-openbsd.
1283 2004-10-21 Bob Wilson <bob.wilson@acm.org>
1285 * elf32-xtensa.c (ebb_propose_action): Put declarations before
1288 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
1290 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
1291 * configure: Regenerate.
1293 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
1296 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
1297 to linker reloc_overflow callback.
1298 (aout_link_input_section_ext): Likewise.
1299 (aout_link_reloc_link_order): Likewise.
1300 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
1301 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
1303 (alpha_relocate_section): Likewise.
1304 * coff-arm.c (coff_arm_relocate_section): Likewise.
1305 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
1306 * coff-h8500.c (extra_case): Likewise.
1307 * coff-i960.c (coff_i960_relocate_section): Likewise.
1308 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1309 * coff-mips.c (mips_relocate_section): Likewise.
1310 * coff-or32.c (coff_or32_relocate_section): Likewise.
1311 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
1312 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
1313 * coff-sh.c (sh_relocate_section): Likewise.
1314 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
1315 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
1316 * coff-z8k.c (extra_case): Likewise.
1317 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
1318 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
1319 (_bfd_coff_generic_relocate_section): Likewise.
1320 * ecoff.c (ecoff_reloc_link_order): Likewise.
1321 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
1322 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
1323 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1324 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1325 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1326 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1327 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1328 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1329 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1330 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1331 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1332 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1333 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1334 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1335 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1336 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1337 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1338 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1339 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1340 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1341 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1342 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1343 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1344 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1345 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1346 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1347 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1348 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1349 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1350 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1351 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1352 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1353 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1354 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1355 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1356 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1357 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1358 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1359 * elflink.c (elf_reloc_link_order): Likewise.
1360 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1361 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1362 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
1363 * linker.c (_bfd_generic_reloc_link_order): Likewise.
1364 * pdp11.c (pdp11_aout_link_input_section): Likewise.
1365 (aout_link_reloc_link_order): Likewise.
1366 * reloc.c (bfd_generic_get_relocated_section_contents):
1368 * xcofflink.c (xcoff_reloc_link_order): Likewise.
1369 * simple.c (simple_dummy_reloc_overflow): Updated.
1371 2004-10-20 Andreas Schwab <schwab@suse.de>
1373 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
1374 (elf_backend_plt_sym_val): Define.
1376 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
1378 * config.bfd: Set targ_underscore=yes for PE COFF targets
1380 2004-10-19 Alan Modra <amodra@bigpond.net.au>
1382 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
1383 (ppc64_elf_edit_opd): Likewise.
1385 2004-10-18 Mark Mitchell <mark@codesourcery.com>
1387 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
1388 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
1389 set SEC_ALLOC and SEC_LOAD.
1391 2004-10-18 Nick Clifton <nickc@redhat.com>
1393 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
1394 'name' for relocs against both local and global symbols.
1396 2004-10-16 Daniel Jacobowitz <dan@debian.org>
1398 * bfd-in2.h: Regenerate.
1399 * bfd.c (struct bfd): Add no_export.
1400 * elflink.c (elf_link_add_object_symbols): Handle no_export.
1402 2004-10-15 Alan Modra <amodra@bigpond.net.au>
1404 * config.bfd: Whitespace cleanup.
1405 * Makefile.am: Run "make dep-am"
1406 * Makefile.in: Regenerate.
1408 2004-10-15 Jakub Jelinek <jakub@redhat.com>
1410 * elflink.c (struct already_linked_section): Removed.
1411 (try_match_symbols_in_sections, already_linked): Removed.
1412 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
1413 prefix of section names when finding already_linked_table
1414 chain. Compare section names. Instead of calling already_linked,
1415 do it inline and only for sections in the same already_linked_list.
1417 2004-10-15 Alan Modra <amodra@bigpond.net.au>
1419 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
1420 parameter. If called after _bfd_elf_write_section_eh_frame,
1421 don't allow a -2 return unless need_* bit is already set, and
1422 handle offsets adjusted for output_offset.
1423 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
1424 * elf.c (_bfd_elf_section_offset): Update call.
1426 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
1429 * coffcode.h (coff_compute_section_file_positions): Cast to
1430 bfd_vma when computing page alignment.
1432 2004-10-13 Mark Mitchell <mark@codesourcery.com>
1434 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
1435 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
1437 2004-10-12 Mark Mitchell <mark@codesourcery.com>
1439 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
1440 relocations use a virtual address, not a section offset.
1442 2004-10-12 Bob Wilson <bob.wilson@acm.org>
1444 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
1445 (narrow_instruction, widen_instruction): Remove unnecessary calls to
1446 xtensa_format_encode.
1447 (ebb_propose_action): Inline call to ebb_add_proposed_action.
1448 (ebb_add_proposed_action): Delete.
1450 2004-10-12 Bob Wilson <bob.wilson@acm.org>
1452 * elf32-xtensa.c: Use ISO C90 formatting.
1454 2004-10-12 Paul Brook <paul@codesourcery.com>
1456 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
1459 2004-10-12 Paul Brook <paul@codesourcery.com>
1461 * elf32-arm.h: Support EABI version 4 objects.
1463 2004-10-12 Alan Modra <amodra@bigpond.net.au>
1466 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
1467 Don't mark as default.
1468 (bfd_x86_64_arch): Don't mark as default.
1470 2004-10-12 Alan Modra <amodra@bigpond.net.au>
1472 * elflink.c (enum action_discarded): New.
1473 (elf_section_complain_discarded): Delete.
1474 (elf_action_discarded): New function subsuming the above and also
1475 controlling reloc behaviour.
1476 (elf_link_input_bfd): Use it.
1478 2004-10-11 Jakub Jelinek <jakub@redhat.com>
1480 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
1481 (special_sections): Add .gnu.liblist and .gnu.conflict.
1482 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
1484 2004-10-11 Alan Modra <amodra@bigpond.net.au>
1487 * elflink.c (elf_link_input_bfd): Try harder to support
1488 relocations against symbols in removed linkonce sections.
1490 2004-10-11 Alan Modra <amodra@bigpond.net.au>
1492 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
1495 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
1496 sections do not reference symbols in non-SEC_ALLOC sections.
1498 2004-10-11 Alan Modra <amodra@bigpond.net.au>
1501 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
1502 (_bfd_elf_link_omit_section_dynsym): Formatting.
1504 2004-10-10 Alan Modra <amodra@bigpond.net.au>
1506 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
1507 * libbfd.h: Regnerate.
1508 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
1509 * elf32-frv.c: Likewise.
1510 * elf32-m32r.c: Likewise.
1511 * elf32-ppc.c: Likewise.
1512 * elf64-hppa.c: Likewise.
1513 * elfxx-ia64.c: Likewise.
1514 * opncls.c: Likewise.
1516 2004-10-10 Alan Modra <amodra@bigpond.net.au>
1518 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
1519 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
1520 offsets stored in struct eh_cie_fde entries before doing other
1523 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
1524 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
1525 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
1526 setting offsets for removed CIEs. Don't set "sec", instead set
1527 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
1528 CIE in hdr_info. Only set make_relative and make_lsda_relative
1529 for CIEs. Use pointers rather than array indices.
1530 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
1531 make_lsda_relative, need_* on cie_inf for FDEs.
1532 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
1533 section output_offset. Delete cie_offset, instead use cie_inf
1534 pointer to CIE entry. Use need_relative and need_lsda_relative on
1535 CIE entry for FDEs. Use pointers rather than array indices.
1537 2004-10-09 Alan Modra <amodra@bigpond.net.au>
1539 * coff-rs6000.c (rs6000coff_vec): Add initializer for
1540 bfd_is_target_special_symbol.
1541 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1542 * som.c (som_bfd_is_target_special_symbol): Define.
1544 2004-10-08 Nick Clifton <nickc@redhat.com>
1546 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
1547 * configure: Regenerate.
1548 * bfd-in2.h: Regenerate.
1549 * syms.c (bfd_is_target_special_symbol): New interface function.
1550 Returns true when a symbol should be considered to be special.
1551 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
1552 the symbol jump table.
1553 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
1554 Return true iff the symbol is a mapping symbol.
1555 (bfd_elf32_bfd_is_target_special_symbol): Define.
1556 * elfxx-target.h: Provide a default definition for
1557 bfd_is_target_special_symbol.
1558 * aout-target.h: Likewise.
1559 * aout-tic30.c: Likewise.
1560 * binary.c: Likewise.
1561 * coffcode.h: Likewise.
1562 * i386msdos.c: Likewise.
1565 * libaout.h: Likewise.
1566 * libbfd-in.h: Likewise
1567 * libecoff.h: Likewise.
1568 * mach-o.c: Likewise.
1570 * nlm-target.h: Likewise.
1571 * oasys.c: Likewise.
1573 * ppcboot.c: Likewise.
1575 * tekhex.c: Likewise.
1576 * versados.c: Likewise.
1578 * xcoff-target.h: Likewise.
1580 * libbfd.h: Regenerate.
1582 2004-10-08 Daniel Jacobowitz <dan@debian.org>
1584 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
1585 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
1586 (elf_backend_section_from_shdr): Define.
1588 2004-10-08 Alan Modra <amodra@bigpond.net.au>
1590 * syms.c (bfd_is_local_label): Return false for file symbols.
1592 2004-10-07 Bob Wilson <bob.wilson@acm.org>
1593 David Heine <dlheine@tensilica.com>
1595 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
1596 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
1597 (elf32xtensa_no_literal_movement): New global variable.
1598 (elf_howto_table): Add entries for new relocations.
1599 (elf_xtensa_reloc_type_lookup): Handle new relocations.
1600 (property_table_compare): When addresses are equal, compare sizes and
1601 various property flags.
1602 (property_table_matches): New.
1603 (xtensa_read_table_entries): Extend to read new property tables. Add
1604 output_addr parameter to indicate that output addresses should be used.
1605 Use bfd_get_section_limit.
1606 (elf_xtensa_find_property_entry): New.
1607 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
1608 (elf_xtensa_check_relocs): Handle new relocations.
1609 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
1610 relocations. Use new xtensa-isa.h functions.
1611 (build_encoding_error_message): Remove encode_result parameter. Add
1612 new target_address parameter used to detect alignment errors.
1613 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
1614 error handling. Use new is_operand_relocation function.
1615 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
1616 Use underbar macro for error messages. Formatting.
1617 (get_const16_opcode): New.
1618 (get_l32r_opcode): Add a separate flag for initialization.
1619 (get_relocation_opnd): Operand number is no longer explicit in the
1620 relocation. Change to decode the opcode and analyze its operands.
1621 (get_relocation_slot): New.
1622 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
1623 Use new xtensa-isa.h functions to handle multislot instructions.
1624 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
1625 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
1626 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
1627 check_loop_aligned, check_branch_target_aligned_address, narrowable,
1628 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
1629 get_single_format, init_op_single_format_table): New.
1630 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
1631 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
1632 (contract_asm_expansion): Add error_message parameter and pass it to
1633 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
1634 with R_XTENSA_SLOT0_OP.
1635 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
1636 instructions. Use new xtensa-isa.h functions.
1637 (r_reloc struct): Add new virtual_offset field.
1638 (r_reloc_init): Add contents and content_length parameters. Set
1639 virtual_offset field to zero. Add contents to target_offset field for
1640 partial_inplace relocations.
1641 (r_reloc_is_defined): Check for null.
1642 (print_r_reloc): New debug function.
1643 (source_reloc struct): Replace xtensa_operand field with pair of the
1644 opcode and the operand position. Add is_abs_literal field.
1645 (init_source_reloc): Specify operand by opcode/position pair. Set
1646 is_abs_literal field.
1647 (source_reloc_compare): When target_offsets are equal, compare other
1648 fields to make sorting predictable.
1649 (literal_value struct): Add is_abs_literal field.
1650 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
1651 (init_literal_value): New.
1652 (is_same_value): Replace with ...
1653 (literal_value_equal): ... this function. Add comparisons of
1654 virtual_offset and is_abs_literal fields.
1655 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
1656 failure. Initialize has_last_loc field.
1657 (value_map_hash_table_delete): New.
1658 (hash_literal_value): Rename to ...
1659 (literal_value_hash): ... this. Include is_abs_literal flag and
1660 virtual_offset field in the hash value.
1661 (get_cached_value): Rename to ...
1662 (value_map_get_cached_value): ... this. Update calls to
1663 literal_value_hash and literal_value_equal.
1664 (add_value_map): Check for allocation failure. Update calls to
1665 value_map_get_cached_value and literal_value_hash.
1666 (text_action, text_action_list, text_action_t): New types.
1667 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
1668 text_action_add, text_action_add_literal, offset_with_removed_text,
1669 offset_with_removed_text_before_fill, find_insn_action,
1670 print_action_list, print_removed_literals): New.
1671 (offset_with_removed_literals): Delete.
1672 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
1673 fix_array, fix_array_count, allocated_relocs, relocs_count, and
1674 allocated_relocs_count fields.
1675 (init_xtensa_relax_info): Initialize new fields.
1676 (reloc_bfd_fix struct): Add new translated field.
1677 (reloc_bfd_fix_init): Add translated parameter and use it to set the
1679 (fix_compare, cache_fix_array): New.
1680 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
1681 section via get_xtensa_relax_info. Use cache_fix_array to set up
1682 sorted fix_array and use bsearch instead of linear search.
1683 (section_cache_t): New struct.
1684 (init_section_cache, section_cache_section, clear_section_cache): New.
1685 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
1686 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
1687 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
1688 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
1690 (retrieve_contents): Use bfd_get_section_limit.
1691 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
1692 to compute_removed_literals. Free value_map_hash_table when no longer
1694 (analyze_relocations): Check is_relaxable_asm_section flag. Call
1695 compute_text_actions for all sections.
1696 (find_relaxable_sections): Mark sections as relaxable if they contain
1697 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
1698 call. Increment relax_info src_count field only for appropriate
1699 relocation types. Remove is_literal_section check.
1700 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
1701 r_reloc_init and find_associated_l32r_irel. Check
1702 is_relaxable_asm_section flag. Handle L32R instructions with absolute
1703 literals. Pass is_abs_literal flag to init_source_reloc.
1704 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
1705 CONST16 instructions. Adjust calls to r_reloc_init and
1706 pcrel_reloc_fits. Handle weak symbols conservatively.
1707 (find_associated_l32r_irel): Add bfd parameter and pass it to
1709 (compute_text_actions, compute_ebb_proposed_actions,
1710 compute_ebb_actions, check_section_ebb_pcrels_fit,
1711 check_section_ebb_reduces, text_action_add_proposed,
1712 compute_fill_extra_space): New.
1713 (remove_literals): Replace with ...
1714 (compute_removed_literals): ... this function. Call
1715 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
1716 Call xtensa_read_table_entries to get the property table. Skip
1717 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
1718 is_removable_literal, remove_dead_literal, and
1719 identify_literal_placement functions.
1720 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
1721 instead of linear search.
1722 (is_removable_literal, remove_dead_literal,
1723 identify_literal_placement): New.
1724 (relocations_reach): Update check for literal not referenced by any
1725 PC-relative relocations. Adjust call to pcrel_reloc_fits.
1726 (coalesce_shared_literal, move_shared_literal): New.
1727 (relax_section): Use bfd_get_section_limit. Call
1728 translate_section_fixes. Update calls to r_reloc_init and
1729 offset_with_removed_text. Check new is_relaxable_asm_section flag.
1730 Add call to pin_internal_relocs. Add special handling for
1731 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
1732 info to calculate new addend_displacement variable. Replace code for
1733 deleting literals with more general code to perform the actions
1734 determined by the action_list for the section.
1735 (translate_section_fixes, translate_reloc_bfd_fix): New.
1736 (translate_reloc): Check new is_relaxable_asm_section flag. Call
1737 find_removed_literal only if is_operand_relocation. Update call to
1738 offset_with_removed_text. Use new target_offset and removed_bytes
1740 (move_literal): New.
1741 (relax_property_section): Use bfd_get_section_limit. Set new
1742 is_full_prop_section flag and handle new property tables. Update calls
1743 to r_reloc_init and offset_with_removed_text. Check
1744 is_relaxable_asm_section flag. Handle expansion of zero-sized
1745 unreachable entries, with use of offset_with_removed_text_before_fill.
1746 For relocatable links, combine entries only for literal tables.
1747 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
1748 calls to offset_with_removed_text. Translate st_size field for
1750 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
1751 failure. Add contents parameter. Update call to get_bfd_fix. Update
1752 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
1753 R_XTENSA_ASM_EXPAND relocs.
1754 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
1755 call to get_bfd_fix. Include offset from contents for partial_inplace
1757 (is_reloc_sym_weak): New.
1758 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
1759 (prop_sec_len): New.
1760 (xtensa_is_property_section): Handle new property sections.
1761 (is_literal_section): Delete.
1762 (internal_reloc_compare): When r_offset matches, compare r_info and
1763 r_addend to make sorting predictable.
1764 (internal_reloc_matches): New.
1765 (xtensa_get_property_section_name): Handle new property sections.
1766 (xtensa_get_property_predef_flags): New.
1767 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
1768 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
1769 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
1770 (xtisa_errno, xtisa_error_msg): New variables.
1771 (xtensa_isa_errno, xtensa_isa_error_msg): New.
1772 (xtensa_insnbuf_alloc): Add error handling.
1773 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
1774 use xtensa_format_decode. Add error handling.
1775 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
1776 instruction length to find the number of bytes to copy.
1777 (xtensa_isa_init): Add error handling. Replace calls to
1778 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
1779 tables in the xtensa_modules structure.
1780 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
1781 xtensa_extend_isa): Delete.
1782 (xtensa_isa_free): Change to only free lookup tables.
1783 (opname_lookup_compare): Replace with ...
1784 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
1785 (xtensa_insn_maxlength): Rename to ...
1786 (xtensa_isa_maxlength): ... this.
1787 (xtensa_insn_length): Delete.
1788 (xtensa_insn_length_from_first_byte): Replace with ...
1789 (xtensa_isa_length_from_chars): ... this function.
1790 (xtensa_num_opcodes): Rename to ...
1791 (xtensa_isa_num_opcodes): ... this.
1792 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
1793 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
1794 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
1795 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
1796 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
1797 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
1798 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
1799 (xtensa_opcode_lookup): Add error handling.
1800 (xtensa_decode_insn): Replace with ...
1801 (xtensa_opcode_decode): ... this function, with new format and
1802 slot parameters. Add error handling.
1803 (xtensa_encode_insn): Replace with ...
1804 (xtensa_opcode_encode): ... this function, which does the encoding via
1805 one of the entries in the "encode_fns" array. Add error handling.
1806 (xtensa_opcode_name): Add error handling.
1807 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
1808 xtensa_opcode_is_call): New.
1809 (xtensa_num_operands): Replace with ...
1810 (xtensa_opcode_num_operands): ... this function. Add error handling.
1811 (xtensa_opcode_num_stateOperands,
1812 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
1813 xtensa_opcode_funcUnit_use, xtensa_operand_name,
1814 xtensa_operand_is_visible): New.
1815 (xtensa_get_operand, xtensa_operand_kind): Delete.
1816 (xtensa_operand_inout): Add error handling and special-case for
1818 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
1819 operate on one slot of an instruction. Added error handling.
1820 (xtensa_operand_encode): Handle default operands with no encoding
1821 functions. Check for success by comparing against decoded value.
1823 (xtensa_operand_decode): Handle default operands. Return decoded value
1824 through argument pointer. Add error handling.
1825 (xtensa_operand_is_register, xtensa_operand_regfile,
1826 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
1827 (xtensa_operand_isPCRelative): Rename to ...
1828 (xtensa_operand_is_PCrelative): ... this. Add error handling.
1829 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
1830 through argument pointer. Add error handling.
1831 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
1832 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
1833 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
1834 xtensa_regfile_shortname, xtensa_regfile_view_parent,
1835 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
1836 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
1837 xtensa_state_is_exported, xtensa_sysreg_lookup,
1838 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
1839 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
1840 xtensa_interface_num_bits, xtensa_interface_inout,
1841 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
1842 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
1843 * xtensa-modules.c: Rewrite to use new data structures.
1844 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
1845 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
1846 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
1847 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
1848 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
1849 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
1850 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
1851 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
1852 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
1853 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
1854 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
1855 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
1856 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
1857 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
1858 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
1859 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
1860 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
1861 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
1862 * Makefile.in: Regenerate.
1863 * bfd-in2.h: Likewise.
1864 * libbfd.h: Likewise.
1866 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
1868 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
1869 against the absolute section.
1870 (mips_elf64_write_rela): Likewise.
1872 2004-10-07 Jan Beulich <jbeulich@novell.com>
1874 * elf.c (elf_find_function): Don't generally check for matching
1875 section, just for non-file symbols. Remove redunant comparison
1877 * elf32-arm.h (arm_elf_find_function): Likewise.
1879 2004-10-07 Jeff Baker <jbaker@qnx.com>
1881 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
1882 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
1885 2004-10-04 Roland McGrath <roland@redhat.com>
1887 * hash.c (bfd_hash_set_default_size): Use const for table.
1888 Use size_t instead of int for variable compared to sizeof results.
1890 2004-10-05 Alan Modra <amodra@bigpond.net.au>
1893 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
1895 2004-10-01 Paul Brook <paul@codesourcery.com>
1897 * elf32-arm.h (elf32_arm_fake_sections,
1898 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
1900 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
1902 2004-10-01 Alan Modra <amodra@bigpond.net.au>
1904 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
1906 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
1907 need_relative or need_lsda_relative if we are processing an
1908 offset for a reloc on a FDE initial loc or LSDA field
1910 (_bfd_elf_write_section_eh_frame): Test need_relative and
1911 need_lsda_relative in place of corresponding make_* field
1912 when deciding to use pc-relative encodings.
1914 2004-09-30 Paul Brook <paul@codesourcery.com>
1916 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
1917 target2 relocation type.
1919 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
1922 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
1924 2004-09-30 Paul Brook <paul@codesourcery.com>
1926 * reloc.c: Add BFD_RELOC_ARM_SMI.
1927 * bfd-in2.h: Regenerate.
1930 2004-09-24 Alan Modra <amodra@bigpond.net.au>
1932 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
1933 vma and output offset to address.
1934 * simple.c (simple_save_output_info): Only set output section
1935 and offset for debug sections, or those not already set up by
1937 (bfd_simple_get_relocated_section_contents): Update comment.
1939 2004-09-24 Alan Modra <amodra@bigpond.net.au>
1941 * elf.c (IS_LOADED): Delete.
1942 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
1943 Restore SEC_HAS_CONTENTS test to the one place it was used prior
1946 2004-09-23 Alan Modra <amodra@bigpond.net.au>
1949 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
1950 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
1951 redundant assignment of EM_SPARC.
1953 2004-09-22 Brian Ford <ford@vss.fsi.com>
1955 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1956 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
1958 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1960 2004-09-22 Alan Modra <amodra@bigpond.net.au>
1962 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
1963 (elf_backend_modify_segment_map): Don't define.
1965 2004-09-22 Alan Modra <amodra@bigpond.net.au>
1967 * elf.c (IS_LOADED): Define.
1968 (assign_file_positions_for_segments): Don't round up file offset of
1969 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
1970 Delete code handling link script adjustment of lma. Do the adjust
1971 in later code handling similar ajustments. Remove dead code error
1972 check. Warn if section lma would require a negative offset
1973 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
1974 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
1975 update voff in section loop. Change voff in segment loop to be an
1976 adjustment on top of "off". Set sec->filepos and update "off" later.
1977 Test for loadable sections consistently using IS_LOADED. Similarly,
1978 test for alloc-only sections other than .tbss consistently.
1979 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
1980 Tidy PT_NOTE handling. Use %B and %A in error messages.
1981 (assign_file_positions_except_relocs): Use %B in error message.
1983 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
1985 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
1986 (CONFIG_STATUS_DEPENDENCIES): New.
1987 (Makefile): Removed.
1988 (config.status): Likewise.
1989 * Makefile.in: Regenerated.
1991 2004-09-17 Paul Brook <paul@codesourcery.com>
1993 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
1994 (bfd_elf32_arm_process_before_allocation): Update prototype.
1995 * bfd-in2.h: Regenerate.
1996 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
1997 (elf32_arm_link_hash_table_create): Set it.
1998 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
1999 (bfd_elf32_arm_set_target_relocs): New function.
2000 (arm_real_reloc_type): New function.
2001 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
2002 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
2003 (elf32_arm_gc_sweep_hook): Ditto.
2004 (elf32_arm_check_relocs): Ditto.
2005 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
2006 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
2008 (elf32_arm_got_prel): New variable.
2009 (elf32_arm_howto_from_type): New function.
2010 (elf32_arm_info_to_howto): Use it.
2011 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
2012 BFD_RELOC_ARM_TARGET2.
2013 * libbfd.h: Regenerate.
2014 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
2016 2004-09-17 Alan Modra <amodra@bigpond.net.au>
2018 * ecoff.c: Update u.undef.next refs.
2019 * elf64-ppc.c: Likewise.
2020 * elflink.c: Likewise.
2021 * linker.c: Likewise.
2022 * xcofflink.c: Likewise.
2024 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
2025 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
2026 fields to indirect struct.
2027 * elf-m10300.c: Update u.weakdef refs.
2028 * elf32-arm.h: Likewise.
2029 * elf32-cris.c: Likewise.
2030 * elf32-frv.c: Likewise.
2031 * elf32-hppa.c: Likewise.
2032 * elf32-i370.c: Likewise.
2033 * elf32-i386.c: Likewise.
2034 * elf32-m32r.c: Likewise.
2035 * elf32-m68k.c: Likewise.
2036 * elf32-ppc.c: Likewise.
2037 * elf32-s390.c: Likewise.
2038 * elf32-sh.c: Likewise.
2039 * elf32-sparc.c: Likewise.
2040 * elf32-vax.c: Likewise.
2041 * elf32-xtensa.c: Likewise.
2042 * elf64-alpha.c: Likewise.
2043 * elf64-hppa.c: Likewise.
2044 * elf64-ppc.c: Likewise.
2045 * elf64-s390.c: Likewise.
2046 * elf64-sh64.c: Likewise.
2047 * elf64-sparc.c: Likewise.
2048 * elf64-x86-64.c: Likewise.
2049 * elfxx-ia64.c: Likewise.
2050 * elfxx-mips.c: Likewise.
2051 * elflink.c: Likewise. Also u.elf_hash_value.
2052 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
2054 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2055 (bfd_elf_gc_record_vtinherit): Alloc vtable.
2056 (bfd_elf_gc_record_vtentry): Likewise.
2057 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
2059 2004-09-17 Alan Modra <amodra@bigpond.net.au>
2061 * Makefile.am: Run "make dep-am".
2062 * Makefile.in: Regenerate.
2063 * bfd-in2.h: Regenerate.
2064 * po/SRC-POTFILES.in: Regenerate.
2065 * po/bfd.pot: Regenerate.
2067 2004-09-16 Alan Modra <amodra@bigpond.net.au>
2069 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
2070 with bitfields. Make "type" and "other" bitfields too.
2071 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
2072 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
2073 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
2074 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
2075 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
2076 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
2077 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
2078 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
2079 * elf-hppa.h: Update all uses of elf_link_hash_flags.
2080 * elf-m10300.c: Likewise.
2082 * elf32-arm.h: Likewise.
2083 * elf32-cris.c: Likewise.
2084 * elf32-frv.c: Likewise.
2085 * elf32-hppa.c: Likewise.
2086 * elf32-i370.c: Likewise.
2087 * elf32-i386.c: Likewise.
2088 * elf32-m32r.c: Likewise.
2089 * elf32-m68k.c: Likewise.
2090 * elf32-ppc.c: Likewise.
2091 * elf32-s390.c: Likewise.
2092 * elf32-sh-symbian.c: Likewise.
2093 * elf32-sh.c: Likewise.
2094 * elf32-sh64.c: Likewise.
2095 * elf32-sparc.c: Likewise.
2096 * elf32-vax.c: Likewise.
2097 * elf32-xtensa.c: Likewise.
2098 * elf64-alpha.c: Likewise.
2099 * elf64-hppa.c: Likewise.
2100 * elf64-ppc.c: Likewise.
2101 * elf64-s390.c: Likewise.
2102 * elf64-sh64.c: Likewise.
2103 * elf64-sparc.c: Likewise.
2104 * elf64-x86-64.c: Likewise.
2105 * elflink.c: Likewise.
2106 * elfxx-ia64.c: Likewise.
2107 * elfxx-mips.c: Likewise.
2108 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
2109 * configure: Regenerate.
2110 * aclocal.m4: Regenerate.
2112 2004-09-16 Alan Modra <amodra@bigpond.net.au>
2114 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
2115 around uses of R_ARM_TARGET1.
2116 (elf32_arm_check_relocs): Likewise.
2118 2004-09-13 Paul Brook <paul@codesourcery.com>
2120 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2122 * bfd-in2.h: Regenerate.
2123 * libbfd.h: Regenerate.
2124 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
2125 (elf32_arm_link_hash_table_create): Set target1_is_rel.
2126 (bfd_elf32_arm_process_before_allocation): Ditto.
2127 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
2128 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
2129 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
2132 2004-09-10 Joel Brobecker <brobecker@gnat.com>
2134 * hpux-core.c (thread_section_p): New function.
2135 (hpux_core_core_file_p): Fix computation of offset in call
2136 to bfd_seek. Create a ".reg" section from an arbitrary
2137 ".reg/<id>" section if none was created after having read
2140 2004-09-11 Andreas Schwab <schwab@suse.de>
2142 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
2143 * aclocal.m4: Rebuild.
2144 * configure: Rebuild.
2146 2004-09-10 Joel Brobecker <brobecker@gnat.com>
2148 * section.c (bfd_sections_find_if): Fix parameter name in
2149 comment to match code.
2151 2004-09-10 Alan Modra <amodra@bigpond.net.au>
2153 * elf.c (assign_file_positions_except_relocs): Assign relocs
2154 stored in a bfd section.
2156 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
2158 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
2159 h->gotplt_refcount to 0, not -1.
2161 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
2163 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
2164 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
2166 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
2167 handle symbol visibility here.
2169 2004-09-07 Alan Modra <amodra@bigpond.net.au>
2171 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
2172 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
2174 (ppc_stub_name): Remove trailing "+0" on stub name.
2175 (create_linkage_sections): Create relocations for
2176 branch lookup table when --emit-relocs as well as when --shared.
2177 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
2178 relbrlt test. For --emit-stub-syms, always output a sym even when
2179 one already exists on a plt call stub. Put stub type in the stub
2181 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
2183 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
2184 reloc_count in stub sections. Adjust relbrlt test.
2185 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
2186 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
2187 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
2188 for relocs against discarded symbols. Fix comments.
2190 2004-09-06 Mark Mitchell <mark@codesourcery.com>
2192 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
2193 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
2195 (map_sections_to_segments): ... here. Use it. Assign a file
2196 position to the .dynamic section if it is not loadable, but part
2197 of the PT_DYNAMIC segment.
2198 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2199 offsets, not VMAs, for the BPABI. Do not fill in the header in
2200 the .got.plt section for the BPABI.
2201 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
2203 (elf_backend_want_got_plt): Define to zero for Symbian OS.
2205 2004-09-06 Nick Clifton <nickc@redhat.com>
2207 * elflink.c (elf_link_add_object_symbols): Set the error code to
2208 bfd_error_wrong_format when the input format does not match the
2211 2004-09-06 Alan Modra <amodra@bigpond.net.au>
2213 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
2214 (ppc64_elf_check_directives): ..here.
2215 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
2216 before accessing ppc64_elf_tdata.
2217 (ppc64_elf_finish_dynamic_sections): And here too.
2219 2004-09-04 Alan Modra <amodra@bigpond.net.au>
2221 * bfd.c (_bfd_default_error_handler): Correct loop exit.
2223 2004-09-03 Mark Mitchell <mark@codesourcery.com>
2225 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
2226 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
2227 (bfd_elf32_littlearm_symbian_vec): Likewise.
2228 * configure: Regenerated.
2229 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
2230 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
2231 (PLT_ENTRY_SIZE): Likewise.
2232 (bfd_vma_elf32_arm_symbian_plt_entry): New
2234 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
2236 (create_got_section): Don't create sections when generating BPABI
2238 (elf32_arm_create_dynamic_sections): Tidy.
2239 (elf32_arm_link_hash_table_create): Set plt_header_size,
2240 plt_entry_size, and symbian_p.
2241 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
2242 generating BPABI objects.
2243 (allocate_dynrelocs): Use htab->plt_header_size, not
2244 PLT_HEADER_SIZE. Do not add to .got.plt when
2245 generating BPABI objects.
2246 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
2247 * elfarm-nabi.c: Add SymbianOS target vectors.
2248 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
2249 (_bfd_elf_link_create_dynamic_sections): Likewise.
2250 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
2251 (elfNN_bed): Use it.
2252 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
2253 (bfd_elf32_littlearm_symbian_vec): Likewise.
2254 (_bfd_target_vector): Add them.
2256 2004-09-03 Nick Clifton <nickc@redhat.com>
2259 * coffcode.h (handle_COMDAT): Replace abort with an warning
2260 message and allow the scan to continue.
2262 2004-09-02 Alan Modra <amodra@bigpond.net.au>
2264 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
2265 in when reading relocs, not our sorted syms. Remove unnecessary
2268 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
2270 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
2272 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
2274 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
2275 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
2276 replace uses of *_alias with *_noncanonical.
2277 * aclocal.m4: Rebuild with aclocal 1.4p6.
2278 * Makefile.in: Rebuild with automake 1.4p6.
2279 * doc/Makefile.in: Rebuild with automake 1.4p6.
2280 * configure.in: Autoupdate with autoupdate 2.59.
2281 * config.in: Regenerate with autoheader 2.59.
2282 * configure: Regnerate with autoconf 2.59.
2284 2004-08-28 Alan Modra <amodra@bigpond.net.au>
2286 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
2287 symbol pointer arrays before modifying.
2289 2004-08-28 Alan Modra <amodra@bigpond.net.au>
2291 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
2292 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
2293 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
2294 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
2295 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
2296 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
2297 Use both symbol tables on non-relocatable objects. Use a common
2298 error exit. Fix "mid" warning.
2299 * libbfd.h: Regenerate.
2300 * bfd-in2.h: Regenerate.
2302 2004-08-28 Alan Modra <amodra@bigpond.net.au>
2304 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
2306 (struct sfpr_def_parms): Save some space.
2307 (sfpr_define): Here too.
2309 * elf64-ppc.c (compare_symbols): Put section syms first.
2310 (sym_exists_at): New function.
2311 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
2312 points only for relocatable files. Use .opd section contents
2313 otherwise. Generally clean up the code.
2315 2004-08-27 Alan Modra <amodra@bigpond.net.au>
2317 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
2318 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
2319 (struct sfpr_def_parms): New.
2320 (sfpr_define): New function.
2321 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
2322 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
2323 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
2324 (savefpr1_tail, restfpr1_tail): New functions.
2325 (savevr, savevr_tail, restvr, restvr_tail): New functions.
2326 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
2327 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
2328 code. Define all ABI mandated _save and _rest functions.
2330 2004-08-26 Paul Brook <paul@codesourcery.com>
2332 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
2334 2004-08-26 Alan Modra <amodra@bigpond.net.au>
2336 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
2339 2004-08-26 Alan Modra <amodra@bigpond.net.au>
2341 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
2342 that pcrel correction is applied for R_386_PC32.
2344 2004-08-25 Alan Modra <amodra@bigpond.net.au>
2346 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
2347 for R_386_32 and R_386_PC32 relocs against symbols defined in
2350 2004-08-25 Dmitry Diky <diwil@spec.ru>
2352 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
2353 Add new relocations.
2354 * bfd-in2.h: Regenerate.
2355 * libbfd.h: Regenerate.
2356 * elf32-msp430.c: Clean-up code.
2357 (elf_msp430_howto_table): Add new relocation entries.
2358 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
2359 (msp430_elf_relax_section): New function.
2360 (msp430_elf_relax_delete_bytes): New function.
2361 (msp430_elf_symbol_address_p): New function.
2363 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2365 * elf32-m32r.c (m32r_elf_relocate_section): Handle
2366 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
2368 2004-08-20 Daniel Jacobowitz <dan@debian.org>
2370 * elflink.c (_bfd_elf_section_already_linked): Handle
2371 SEC_LINK_DUPLICATES_SAME_CONTENTS.
2373 2004-08-19 Mark Mitchell <mark@codesourcery.com>
2375 * config.bfd (arm*-*-symbianelf*): New target.
2376 (arm*-*-eabi*): Likewise.
2378 2004-08-19 Alan Modra <amodra@bigpond.net.au>
2380 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
2381 "struct ppc_link_hash_entry *".
2382 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
2383 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
2385 2004-08-19 Jakub Jelinek <jakub@redhat.com>
2387 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
2388 entries (where fd_aux overlaps next entry's fd_func).
2389 Add non_overlapping argument, use it.
2390 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
2391 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
2392 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
2393 as indexes into opd_sym_map/opd_adjust array.
2394 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
2396 2004-08-18 Alan Modra <amodra@bigpond.net.au>
2398 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
2399 if we can look up their function descriptor in a regular file.
2401 2004-08-18 Nick Clifton <nickc@redhat.com>
2404 * cofflink.c (coff_link_add_symbols): Check that the comdat
2405 pointer in the coff_section_data structure has been initialised
2408 2004-08-18 Alan Modra <amodra@bigpond.net.au>
2411 * elflink.c (bfd_elf_record_link_assignment): Add comment about
2412 changing bfd_link_hash_undefined to bfd_link_hash_new.
2414 2004-08-17 Jakub Jelinek <jakub@redhat.com>
2416 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
2418 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
2419 (synthetic_opd, synthetic_relocatable): New variables.
2420 (compare_symbols, compare_relocs): New helper routines.
2421 (ppc64_elf_get_synthetic_symtab): New function.
2422 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
2424 * bfd-in2.h: Regenerated.
2425 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
2426 to relsyms. Return 0 if abfd is relocatable.
2428 2004-08-17 Alan Modra <amodra@bigpond.net.au>
2430 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
2432 2004-08-17 Nick Clifton <nickc@redhat.com>
2434 * (is_arm_mapping_symbol_name): New function - return true
2435 when a symbol name matches the requirements for an ARM mapping
2437 (arm_elf_find_function): New function based on
2438 elf_find_function in elf.c but skipping ARM mapping symbols
2439 and including thumb function symbols.
2440 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
2441 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
2443 2004-08-17 Alan Modra <amodra@bigpond.net.au>
2445 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
2446 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
2447 (ppc64_elf_brtaken_reloc): Here too.
2449 2004-08-17 Alan Modra <amodra@bigpond.net.au>
2451 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
2453 (ppc64_elf_check_directives): Check that we have the right hash
2454 table before proceeding.
2456 2004-08-17 Alan Modra <amodra@bigpond.net.au>
2458 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
2459 (adjust_opd_syms): Attach opd syms for deleted entries to one of
2460 the sections that will be discarded.
2462 2004-08-16 Alan Modra <amodra@bigpond.net.au>
2464 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
2466 2004-08-16 Alan Modra <amodra@bigpond.net.au>
2468 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
2469 free space available.
2471 2004-08-16 Alan Modra <amodra@bigpond.net.au>
2473 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
2474 occurrences with bfd_byte * thoughout file.
2476 * coff-rs6000.c (do_shared_object_padding): Warning fix.
2477 (xcoff_write_armap_big): Likewise.
2478 (xcoff_write_archive_contents_old): Likewise.
2479 (xcoff_write_archive_contents_big): Likewise.
2481 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
2483 2004-08-13 Nick Clifton <nickc@redhat.com>
2485 * elf32-arm.h: Convert to ISO C90.
2487 2004-08-13 Alan Modra <amodra@bigpond.net.au>
2490 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
2493 2004-08-13 Alan Modra <amodra@bigpond.net.au>
2495 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
2496 (bfd_archive_filename, bfd_get_section_ident): Delete.
2497 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
2498 bfd_archive_filename.
2499 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
2500 to warn about symbols in discarded sections. Use _bfd_error_handler.
2501 * aout-adobe.c (aout_adobe_callback): See below.
2502 * aout-cris.c (swap_ext_reloc_in): ..
2503 * coff-arm.c (find_thumb_glue, find_arm_glue,
2504 coff_arm_relocate_section, bfd_arm_process_before_allocation,
2505 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
2506 coff_arm_copy_private_bfd_data): ..
2507 * coff-i860.c (i860_reloc_processing): ..
2508 * coff-mcore.c (mcore_coff_unsupported_reloc,
2509 coff_mcore_relocate_section): ..
2510 * coff-ppc.c (coff_ppc_relocate_section): ..
2511 * coff-rs6000.c (xcoff_create_csect_from_smclas
2512 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
2513 sh_swap_insns, sh_relocate_section): ..
2514 * coff-tic54x.c (tic54x_reloc_processing): ..
2515 * coff-tic80.c (coff_tic80_relocate_section): ..
2516 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
2517 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
2518 coff_slurp_symbol_table, coff_classify_symbol,
2519 coff_slurp_reloc_table): ..
2520 * coffgen.c (_bfd_coff_read_string_table): ..
2521 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
2522 _bfd_coff_generic_relocate_section): ..
2523 * cpu-arm.c (bfd_arm_merge_machines): ..
2524 * cpu-sh.c (sh_merge_bfd_arch): ..
2525 * elf-hppa.h (elf_hppa_relocate_section): ..
2526 * elf.c (bfd_elf_string_from_elf_section, setup_group,
2527 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
2528 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
2529 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
2530 * elf32-arm.h (find_thumb_glue, find_arm_glue,
2531 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
2532 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
2533 elf32_arm_relocate_section, elf32_arm_set_private_flags,
2534 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
2535 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
2536 cris_elf_merge_private_bfd_data
2537 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
2538 * elf32-gen.c (elf32_generic_link_add_symbols): ..
2539 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
2540 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
2541 elf32_hppa_relocate_section): ..
2542 * elf32-i370.c (i370_elf_merge_private_bfd_data,
2543 i370_elf_check_relocs, i370_elf_relocate_section): ..
2544 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
2545 elf_i386_relocate_section): ..
2546 * elf32-m32r.c (m32r_elf_relocate_section,
2547 m32r_elf_merge_private_bfd_data): ..
2548 * elf32-m68hc1x.c (m68hc12_add_stub,
2549 _bfd_m68hc11_elf_merge_private_bfd_data): ..
2550 * elf32-m68k.c (elf_m68k_relocate_section): ..
2551 * elf32-mcore.c (mcore_elf_unsupported_reloc,
2552 mcore_elf_relocate_section): ..
2553 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
2554 ppc_elf_check_relocs, ppc_elf_relocate_section,
2555 ppc_elf_begin_write_processing): ..
2556 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
2557 elf_s390_relocate_section): ..
2558 * elf32-sh-symbian.c (sh_symbian_import_as,
2559 sh_symbian_process_embedded_commands,
2560 sh_symbian_relocate_section): ..
2561 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
2562 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
2563 sh_elf_merge_private_data): ..
2564 * elf32-sparc.c (elf32_sparc_check_relocs,
2565 elf32_sparc_relocate_section,
2566 elf32_sparc_merge_private_bfd_data): ..
2567 * elf32-v850.c (v850_elf_check_relocs,
2568 v850_elf_merge_private_bfd_data): ..
2569 * elf32-xtensa.c (elf_xtensa_check_relocs,
2570 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
2571 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
2572 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
2573 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
2574 * elf64-gen.c (elf64_generic_link_add_symbols): ..
2575 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
2576 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
2577 ppc64_elf_relocate_section): ..
2578 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
2579 elf_s390_relocate_section): ..
2580 * elf64-sh64.c (sh_elf64_relocate_section): ..
2581 * elf64-sparc.c (sparc64_elf_check_relocs,
2582 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
2583 sparc64_elf_merge_private_bfd_data): ..
2584 * elf64-x86-64.c (elf64_x86_64_check_relocs,
2585 elf64_x86_64_relocate_section): ..
2586 * elflink.c (_bfd_elf_add_default_symbol,
2587 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
2588 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
2589 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
2590 elf_get_linked_section_vma, elf_fixup_link_order,
2591 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
2592 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
2593 * elfxx-ia64.c (elfNN_ia64_relax_section,
2594 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
2595 * elfxx-mips.c (mips_elf_perform_relocation,
2596 _bfd_mips_elf_check_relocs,
2597 _bfd_mips_elf_merge_private_bfd_data): ..
2598 * ieee.c (ieee_slurp_external_symbols): ..
2599 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
2600 * libbfd.c (_bfd_generic_verify_endian_match): ..
2601 * linker.c (_bfd_generic_link_add_one_symbol,
2602 _bfd_generic_section_already_linked): ..
2603 * pdp11.c (translate_to_native_sym_flags): ..
2604 * pe-mips.c (coff_pe_mips_relocate_section): ..
2605 * peicode.h (pe_ILF_build_a_bfd): ..
2606 * srec.c (srec_bad_byte): ..
2607 * stabs.c (_bfd_link_section_stabs): ..
2608 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
2609 Replace all uses of bfd_archive_filename and bfd_get_section_ident
2610 with corresponding %B and %A in _bfd_error_handler format string.
2611 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
2612 calls to use %A and %B. Fix "against symbol .. from section" and
2613 similar error messages. Combine multiple _bfd_error_handler calls
2614 where they were separated due to bfd_archive_filename deficiencies.
2615 * bfd-in2.h: Regenerate.
2617 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
2619 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
2622 2004-08-10 Alan Modra <amodra@bigpond.net.au>
2624 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
2625 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
2626 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
2628 (link_hash_newfunc): Init was_undefined.
2629 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
2630 Use undefweak instead.
2631 (ppc64_elf_check_directives): Fix undefs chain.
2632 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
2634 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
2635 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
2636 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
2638 2004-08-09 Jakub Jelinek <jakub@redhat.com>
2640 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
2641 error, test input_section flags rather than sec.
2643 2004-08-09 Alan Modra <amodra@bigpond.net.au>
2645 * elf-bfd.h (struct elf_backend_data): Add
2646 elf_backend_archive_symbol_lookup.
2647 (_bfd_elf_archive_symbol_lookup): Declare.
2648 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
2649 (elf_link_add_archive_symbols): ..extracted from here. Call the
2651 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
2652 (elfNN_bed): Init new field.
2653 * elf64-ppc.c (elf_backend_check_directives): Define.
2654 (elf_backend_archive_symbol_lookup): Define.
2655 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
2656 a ppc_link_hash_entry pointer.
2658 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
2659 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
2660 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
2661 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
2662 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
2663 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
2664 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
2667 2004-08-09 Alan Modra <amodra@bigpond.net.au>
2669 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
2670 (ppc64_elf_add_symbol_hook): Test for NULL section.
2671 (get_sym_h): Formatting.
2672 (ppc64_elf_size_stubs): Include reloc addend in value stored as
2675 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
2676 long branch stubs with code handling plt and r2off branch stubs.
2678 2004-08-09 Alan Modra <amodra@bigpond.net.au>
2680 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
2681 * elflink.c (elf_link_input_bfd): Formatting.
2682 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
2684 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
2685 (link_hash_newfunc): Don't set it.
2686 (ppc64_elf_copy_indirect_symbol): Nor copy it.
2687 (ppc64_elf_mark_entry_syms): Delete.
2688 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
2689 sections. Use get_opd_info.
2690 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
2692 2004-08-09 Alan Modra <amodra@bigpond.net.au>
2694 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
2696 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
2697 (func_desc_adjust): Don't set have_undefweak.
2698 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
2699 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
2701 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
2702 "struct ppc_link_hash_entry *". Adjust all references.
2703 (ppc64_elf_hide_symbol): Correct a comment.
2705 * elf64-ppc.c (get_opd_info): New function.
2706 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
2707 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
2708 before calling get_fdh. Test fdh rather than h before dereferencing
2709 fdh. Mark removed symbols in opd_adjust.
2710 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
2711 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
2713 (ppc64_elf_output_symbol_hook): Likewise.
2715 2004-08-06 Paul Brook <paul@codesourcery.com>
2717 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
2718 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
2719 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
2720 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
2721 and BFD_RELOC_ARM_SBREL32.
2722 * bfd-in2.h, bbfd.h: Regenerate.
2724 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2726 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
2727 the dynamic link symbol actually in use.
2729 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
2731 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
2733 2004-07-31 Joel Brobecker <brobecker@gnat.com>
2734 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2736 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
2737 SHN_MIPS_TEXT and SHN_MIPS_DATA.
2739 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
2740 Nick Clifton <nickc@redhat.com>
2743 * bfd.c (_bfd_default_error_handler): Make it global.
2745 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
2747 * elf.c (assign_section_numbers): Cope gracefully with sections
2748 which have SHF_LINK_ORDER set but no sh_link set up.
2749 * elflink.c (elf_get_linked_section_vma): Likewise.
2751 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
2754 * elfxx-target.h (elf_backend_link_order_error_handler): New.
2755 Set it to _bfd_default_error_handler.
2756 (elfNN_bed): Add elf_backend_link_order_error_handler.
2758 * libbfd-in.h (_bfd_default_error_handler): New.
2760 * libbfd.h: Regenerated.
2762 2004-07-30 Jakub Jelinek <jakub@redhat.com>
2764 * archures.c (bfd_mach_sparc_64bit_p): Define.
2765 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
2766 * bfd-in2.h: Rebuilt.
2768 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
2770 Introduce SH2a support.
2771 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
2772 * archures.c (bfd_mach_sh2a_nofpu): New.
2773 * bfd-in2.h: Rebuilt.
2774 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
2775 (arch_info_struct): Add sh2a_nofpu.
2776 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
2777 2003-12-29 DJ Delorie <dj@redhat.com>
2778 * reloc.c: Add relocs for sh2a.
2779 * bfd-in2.h: Regenerate.
2780 * libbfd.hh: Regenerate.
2781 2003-12-01 Michael Snyder <msnyder@redhat.com>
2782 * archures.c (bfd_mach_sh2a): New.
2783 * bfd-in2.h: Rebuilt.
2784 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
2786 (arch_info_struct): Add sh2a.
2787 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
2789 2004-07-28 Nick Clifton <nickc@redhat.com>
2790 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2793 * som.c (setup_sections): Improve estimation of space sizes in
2794 relocatable objects.
2796 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
2797 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
2798 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
2800 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
2801 * configure: Regenerate.
2802 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
2803 case that accepts OSABI=NetBSD and OSABI=SysV.
2804 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
2805 the base of .got or .data (if .got does not exist).
2806 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
2808 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
2809 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
2810 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
2811 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
2813 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
2816 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
2817 (elf_sec_group): Defined.
2818 (bfd_elf_match_symbols_in_sections): New prototype.
2819 (_bfd_elf_setup_group_pointers): Likewise.
2821 * elf.c (bfd_elf_discard_group): Abort.
2822 (bfd_elf_set_group_contents): Also include relocation sections.
2823 Remove zero-fill for ld -r.
2824 (_bfd_elf_setup_group_pointers): New function.
2825 (elf_sort_elf_symbol): Likewise.
2826 (elf_sym_name_compare): Likewise.
2827 (bfd_elf_match_symbols_in_sections): Likewise.
2829 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
2831 * elflink.c (match_group_member): New.
2832 (elf_link_input_bfd): Check group member for discarded section.
2833 (try_match_symbols_in_sections): New function.
2834 (already_linked): Likewise.
2835 (_bfd_elf_section_already_linked): Support mixing comdat group
2836 and linkonce section.
2838 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
2839 * linker.c (bfd_section_already_linked_table_traverse): New.
2841 * libbfd.h: Regenerated.
2843 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
2845 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
2846 BFD_RELOC_CRX_SWITCH32.
2847 * bfd-in2.h: Regenerate.
2848 * libbfd.h: Regenerate.
2849 * elf32-crx.c: Support relocation/relaxation of
2850 BFD_RELOC_CRX_SWITCH* types.
2852 2004-07-27 Alan Modra <amodra@bigpond.net.au>
2854 * elf64-ppc.c: Correct "Linker stubs" comment.
2856 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
2858 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
2860 (elf_linked_to_section): New.
2862 * elf.c (assign_section_numbers): Set up sh_link for
2865 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
2866 to sh_link for SHT_IA_64_UNWIND sections.
2868 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
2870 * elflink.c (elf_fixup_link_order): Add _() to error message.
2872 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
2874 * elflink.c (elf_fixup_link_order): Issue a warning and flag
2877 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
2879 * aout-adobe.c (aout_32_section_already_linked): Defined.
2880 * aout-target.h (MY_section_already_linked): Likewise.
2881 * aout-tic30.c (MY_section_already_linked): Likewise.
2882 * binary.c (binary_section_already_linked): Likewise.
2883 * bout.c (b_out_section_already_linked): Likewise.
2884 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
2885 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
2886 * coffcode.h (coff_section_already_linked): Likewise.
2887 * i386msdos.c (msdos_section_already_linked): Likewise.
2888 * i386os9k.c (os9k_section_already_linked): Likewise.
2889 * ieee.c (ieee_section_already_linked): Likewise.
2890 * ihex.c (ihex_section_already_linked): Likewise.
2891 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
2892 * mmo.c (mmo_section_already_linked): Likewise.
2893 * nlm-target.h (nlm_section_already_linked): Likewise.
2894 * oasys.c (oasys_section_already_linked): Likewise.
2895 * pef.c (bfd_pef_section_already_linked): Likewise.
2896 * ppcboot.c (ppcboot_section_already_linked): Likewise.
2897 * som.c (som_bfd_discard_group): Likewise.
2898 * srec.c (srec_section_already_linked): Likewise.
2899 * tekhex.c (tekhex_section_already_linked): Likewise.
2900 * versados.c (versados_section_already_linked): Likewise.
2901 * vms.c (vms_section_already_linked): Likewise.
2902 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
2903 * xsym.c (bfd_sym_section_already_linked): Likewise.
2905 * bfd-in.h (bfd_section_already_linked_table_init): New.
2906 (bfd_section_already_linked_table_free): Likewise.
2908 * coff-rs6000.c (rs6000coff_vec): Add
2909 _bfd_generic_section_already_linked.
2910 (pmac_xcoff_vec): Likewise.
2911 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2912 (aix5coff64_vec): Likewise.
2914 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
2915 * elflink.c (_bfd_elf_section_already_linked): New function.
2917 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
2919 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
2920 (_bfd_generic_section_already_linked): New.
2921 (bfd_section_already_linked_hash_entry): Likewise.
2922 (bfd_section_already_linked): Likewise.
2923 (bfd_section_already_linked_table_lookup): Likewise.
2924 (bfd_section_already_linked_table_insert): Likewise.
2926 * linker.c (bfd_section_already_linked): New.
2927 (_bfd_section_already_linked_table): Likewise.
2928 (bfd_section_already_linked_table_lookup): Likewise.
2929 (bfd_section_already_linked_table_insert): Likewise.
2930 (already_linked_newfunc): Likewise.
2931 (bfd_section_already_linked_table_init): Likewise.
2932 (bfd_section_already_linked_table_free): Likewise.
2933 (_bfd_generic_section_already_linked): Likewise.
2935 * section.c (bfd_section): Remove comdat.
2936 (bfd_comdat_info): Moved to ...
2937 * bfd-in.h (coff_comdat_info): Here.
2938 (bfd_coff_get_comdat_section): New.
2939 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
2940 * libcoff-in.h (coff_section_tdata): Add comdat.
2941 * coffcode.h (handle_COMDAT): Updated.
2942 * cofflink.c (coff_link_add_symbols): Likewise.
2943 * ecoff.c (bfd_debug_section): Likewise.
2945 * targets.c (bfd_target): Add _section_already_linked.
2946 (BFD_JUMP_TABLE_LINK): Updated.
2948 * bfd-in2.h: Regenerated.
2949 * libbfd.h: Likewise.
2950 * libcoff.h: Likewise.
2952 2003-07-21 Paul Brook <paul@codesourcery.com>
2954 * elflink.c (elf_get_linked_section_vma, compare_link_order,
2955 elf_fixup_link_order): New functions.
2956 (bfd_elf_final_link): Call elf_fixup_link_order.
2958 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
2960 * elf-bfd.h (ELF_COMMON_DEF_P): New.
2961 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
2963 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
2964 _bfd_elf_symbol_refs_local_p.
2965 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
2968 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
2970 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
2972 (bfd_elf_get_dyn_lib_class): New prototype.
2973 * elf.c (bfd_elf_get_dyn_lib_class): New function.
2975 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
2976 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
2977 entry is needed. Issue an error if a DT_NEEDED entry is needed
2978 for a file marked DYN_NO_NEEDED.
2979 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
2982 * bfd-in2.h: Regenerated.
2984 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2986 * elflink.c (elf_section_complain_discarded): Don't complain in
2989 2004-07-10 James E Wilson <wilson@specifixinc.com>
2991 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
2992 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
2993 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
2994 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
2996 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
2997 bfd_put_64 to bfd_putl64.
2998 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
3000 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
3003 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
3004 .init/.fini sections when trying to relax it.
3006 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
3008 * elf.c (assign_file_positions_for_segments): Make sure the
3009 .dynamic section is the first section in the PT_DYNAMIC segment.
3011 2004-07-09 Nick Clifton <nickc@redhat.com>
3013 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
3014 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
3015 sh_elf_get_flags_from_mach functions so that they do not conflict
3016 when this target is built with other sh-elf targets.
3017 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
3018 suppression of this function.
3019 (sh_elf_find_flags): Likewise.
3021 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
3023 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
3024 (ALL_MACHINES_CFILES): Add cpu-crx.c.
3025 (BFD32_BACKENDS): Add elf32-crx.lo.
3026 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
3027 (cpu-crx.lo): New target.
3028 (elf32-crx.lo): New target.
3029 * Makefile.in: Regenerate.
3030 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
3031 (bfd_archures_list): Add bfd_crx_arch.
3032 * bfd-in2.h: Regenerate.
3033 * config.bfd: Handle crx-*-elf*, crx*.
3034 * configure.in: Handle bfd_elf32_crx_vec.
3035 * configure: Regenerate.
3036 * cpu-crx.c: New file.
3037 * elf32-crx.c: Likewise.
3038 * libbfd.h: Regenerate.
3039 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
3040 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
3041 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
3042 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
3043 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
3044 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
3045 * targets.c (bfd_elf32_crx_vec): Declare.
3046 (bfd_target_vector): Add bfd_elf32_crx_vec.
3048 2004-07-06 Nick Clifton <nickc@redhat.com>
3050 * config.bfd: Add sh-symbian-elf target.
3051 * configure.in: Add bfd_elf32_shl_symbian_vec.
3052 * configure: Regenerate.
3053 * elf-bfd.h (struct elf_backend_data): Add new field
3055 * elflink.c (elf_link_add_object_symbols): Invoke the
3056 check_directives function, if defined.
3057 * elfxx-target.h: Provide a default, NULL definition for
3059 * targets.c: Add bfd_elf32_shl_symbian_vec.
3060 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
3062 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
3063 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
3064 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
3065 not already been defined.
3066 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
3067 * sh-symbian.c: New file. Provide functions to support the
3068 * sh-symbian-elf target.
3069 * Makefile.am: Add elf32-sh-symbian.c
3070 * Makefile.in: Regenerate.
3072 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
3074 * elf32-sh.c: Include ../opcodes/sh-opc.h.
3075 * Makefile.am: Ran make dep-am.
3076 * Makefile.in: Ran make dep-in.
3078 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3080 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
3083 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
3085 * config.bfd: Add want64 to configuration target s390-*-linux*.
3087 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
3089 * bfd.c (bfd_get_section_ident): New.
3091 * elflink.c (elf_link_read_relocs_from_section): Call
3092 bfd_get_section_ident to identify the section when reporting
3094 (_bfd_elf_link_output_relocs): Likewise.
3095 (elf_link_output_extsym): Likewise.
3096 (elf_link_input_bfd): Likewise.
3097 (bfd_elf_gc_record_vtinherit): Likewise.
3099 * bfd-in2.h: Regenerated.
3101 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
3102 Nick Clifton <nickc@redhat.com>
3105 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
3106 of section symbols to mips_elf_sort_hash_table ().
3108 2004-07-01 Alan Modra <amodra@bigpond.net.au>
3110 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
3112 (elf_section_complain_discarded): New function. Handle
3113 .gcc_except_table too.
3114 (elf_link_input_bfd): Rewrite handling of relocs against symbols
3115 in discarded sections.
3116 * elf-bfd.h (elf_discarded_section): Protect macro arg.
3118 2004-06-30 James E Wilson <wilson@specifixinc.com>
3120 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
3121 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
3123 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
3126 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
3127 local references to discarded sections and report their
3130 2004-06-30 Alan Modra <amodra@bigpond.net.au>
3132 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
3133 sec_info_type, test section name instead.
3135 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
3138 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
3139 in .init/.fini sections.
3141 2004-06-29 Bob Wilson <bob.wilson@acm.org>
3143 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
3144 bfd_get_section_limit.
3146 2004-06-29 Bob Wilson <bob.wilson@acm.org>
3148 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
3149 output section size.
3151 2004-06-29 Alan Modra <amodra@bigpond.net.au>
3153 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
3155 (mmix_elf_perform_relocation): Adjust for above change.
3156 (mmix_elf_relocate_section): Likewise.
3157 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
3158 (mmix_elf_get_section_contents): Delete.
3159 (bfd_elf64_get_section_contents): Delete.
3160 (mmix_elf_relocate_section): Zero stub area.
3161 * linker.c (default_indirect_link_order): Alloc max of section size
3163 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3164 * section.c (bfd_malloc_and_get_section): Likewise.
3165 (struct bfd_section): Update rawsize comment.
3166 * bfd-in2.h: Regenerate.
3168 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
3170 2004-06-29 Alan Modra <amodra@bigpond.net.au>
3172 * bfd-in.h (bfd_get_section_limit): Define.
3173 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
3174 (_bfd_final_link_relocate): Use bfd_get_section_limit.
3175 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
3176 * coff-arm.c (coff_arm_relocate_section): Likewise.
3177 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
3178 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
3179 (bfd_ns32k_final_link_relocate): Likewise.
3180 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
3181 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
3182 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
3183 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
3184 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
3185 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
3186 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
3187 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
3188 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
3189 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
3190 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
3191 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
3192 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
3193 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
3194 * elf32-v850.c (v850_elf_reloc): Likewise.
3195 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
3196 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
3197 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
3198 * elf64-mips.c (mips_elf64_gprel32_reloc)
3199 (mips16_gprel_reloc): Likewise.
3200 * elf64-mmix.c (mmix_elf_reloc): Likewise.
3201 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
3202 * elf64-sparc.c (init_insn_reloc): Likewise.
3203 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
3204 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
3205 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
3206 (_bfd_mips_elf_generic_reloc): Likewise.
3207 * bfd-in2.h: Regenerate.
3209 2004-06-28 Alan Modra <amodra@bigpond.net.au>
3211 * bfd-in.h (struct stab_info): Move from stabs.c.
3212 * stabs.c (struct stab_link_includes_table): Delete.
3213 (stab_link_includes_lookup): Delete.
3214 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
3215 level of indirection from sinfo parm.
3216 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
3217 stabstr section. Adjust hash table accesses.
3218 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
3219 alloc. Adjust stab_info test.
3220 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
3221 (_bfd_coff_final_link): Adjust stab_info test.
3222 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
3223 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
3225 * libcoff-in.h (struct coff_link_hash_table): Likewise.
3226 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
3227 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
3228 stabstr section. Adjust stab_info test.
3229 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
3230 (_bfd_write_stab_strings): Adjust prototypes.
3231 * libbfd.h: Regenerate.
3232 * libcoff.h: Regenerate.
3233 * bfd-in2.h: Regenerate.
3235 2004-06-27 Mark Kettenis <kettenis@gnu.org>
3237 From Miod Vallat <miod@online.fr>:
3238 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
3240 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
3242 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
3243 (struct elf32_mn10300_link_hash_entry): Remove
3244 pcrel_relocs_copied.
3245 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
3246 R_MN10300_32. Don't adjust pcrel_relocs_copied.
3247 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
3248 and gotoff relocations if the symbol doesn't bind locally. Use
3249 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
3250 relocation for PCREL32.
3251 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
3252 to test whether a symbol binds locally.
3253 (elf32_mn10300_link_hash_newfunc): Don't initialize
3254 pcrel_relocs_copied.
3255 (_bfd_mn10300_elf_discard_copies): Delete.
3256 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
3258 2004-06-26 Mark Kettenis <kettenis@gnu.org>
3260 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
3262 2004-06-25 Joel Brobecker <brobecker@gnat.com>
3264 * som.c (som_set_reloc_info): Correct small typo.
3266 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3268 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
3269 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
3270 (m32r_elf_gcsweep_hook): Likewise.
3271 (m32r_elf_check_relocs): Likewise.
3272 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
3273 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
3274 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
3275 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
3276 * bfd-in2.h: Regenerated.
3277 * libbfd.h: Regenerated.
3279 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
3281 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
3283 (elf64_x86_64_relocate_section): Issue an error for
3284 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
3285 against global symbols when building shared library.
3287 2004-06-24 Alan Modra <amodra@bigpond.net.au>
3289 * section.c (struct sec): Rename "_cooked_size" to "size".
3290 Rename "_raw_size" to "rawsize".
3291 (STD_SECTION): Adjust comments.
3292 (bfd_set_section_size, bfd_get_section_contents): Use size.
3293 (bfd_malloc_and_get_section): New function.
3294 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
3295 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
3296 Correctly free reloc and contents memory.
3297 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
3298 and fake CIE now that we can shink section size to zero.
3299 (_bfd_elf_write_section_eh_frame): Likewise..
3300 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
3301 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
3302 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
3303 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
3304 unneeded indirection.
3305 * elf.c (_bfd_elf_section_offset): .. and update call.
3306 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
3307 * libbfd.h: Regenerate.
3308 * bfd-in2.h: Regenerate.
3310 Replace occurrences of "_raw_size" and "_cooked_size" in most places
3311 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
3312 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
3313 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
3314 Similarly use "rawsize", if non-zero, in reloc functions to validate
3315 reloc addresses. Use new bfd_malloc_and_get_section in most places
3316 where bfd_get_section_contents was called. Expand all occurrences of
3317 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
3318 grok_prstatus and similar functions to "size".
3319 * aix386-core.c (aix386_core_file_p): ..
3320 * aix5ppc-core.c (xcoff64_core_p): ..
3321 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
3322 aout_adobe_set_section_contents): ..
3323 * aout-target.h (callback): ..
3324 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
3325 MY_bfd_final_link): ..
3326 * aoutf1.h (sunos4_core_file_p): ..
3327 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
3328 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
3329 final_link, aout_link_input_section): ..
3330 * binary.c (binary_object_p, binary_canonicalize_symtab,
3331 binary_set_section_contents): ..
3332 * bout.c (b_out_callback, b_out_write_object_contents,
3333 b_out_set_section_contents, b_out_bfd_relax_section,
3334 b_out_bfd_get_relocated_section_contents): ..
3335 * cisco-core.c (cisco_core_file_validate): ..
3336 * coff-alpha.c (alpha_ecoff_object_p,
3337 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
3338 * coff-arm.c (coff_arm_relocate_section,
3339 bfd_arm_allocate_interworking_sections): ..
3340 * coff-h8300.c (h8300_reloc16_extra_cases,
3341 h8300_bfd_link_add_symbols): ..
3342 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
3343 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
3344 ppc_bfd_coff_final_link): ..
3345 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
3346 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
3347 sh_align_loads, sh_coff_get_relocated_section_contents): ..
3348 * coff64-rs6000.c (xcoff64_write_object_contents,
3349 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
3350 * coffcode.h (coff_compute_section_file_positions,
3351 coff_write_object_contents): ..
3352 * coffgen.c (make_a_section_from_file, coff_write_symbols,
3353 coff_section_symbol, build_debug_section): ..
3354 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
3355 process_embedded_commands, _bfd_coff_link_input_bfd,
3356 _bfd_coff_write_global_sym): ..
3357 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
3358 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
3359 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
3360 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
3361 _bfd_dwarf2_find_nearest_line): ..
3362 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
3363 ecoff_compute_section_file_positions,
3364 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
3365 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
3366 _bfd_elf_discard_section_eh_frame_hdr,
3367 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
3368 _bfd_elf_write_section_eh_frame,
3369 _bfd_elf_write_section_eh_frame_hdr): ..
3370 * elf-hppa.h (elf_hppa_sort_unwind): ..
3371 * elf-m10200.c (mn10200_elf_relax_section,
3372 mn10200_elf_relax_delete_bytes,
3373 mn10200_elf_get_relocated_section_contents): ..
3374 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
3375 mn10300_elf_check_relocs, mn10300_elf_relax_section,
3376 mn10300_elf_relax_delete_bytes,
3377 mn10300_elf_get_relocated_section_contents,
3378 _bfd_mn10300_elf_adjust_dynamic_symbol,
3379 _bfd_mn10300_elf_discard_copies,
3380 _bfd_mn10300_elf_size_dynamic_sections,
3381 _bfd_mn10300_elf_finish_dynamic_sections): ..
3382 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
3383 _bfd_elf_make_section_from_phdr, elf_fake_sections,
3384 bfd_elf_set_group_contents, map_sections_to_segments,
3385 elf_sort_sections, assign_file_positions_for_segments,
3386 SECTION_SIZE, copy_private_bfd_data,
3387 _bfd_elf_get_dynamic_reloc_upper_bound,
3388 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
3389 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
3390 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
3391 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
3392 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
3393 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
3394 bfd_elf32_arm_process_before_allocation,
3395 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
3396 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
3397 elf32_arm_write_section): ..
3398 * elf32-cris.c (cris_elf_grok_prstatus,
3399 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
3400 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
3401 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
3402 elf_cris_discard_excess_dso_dynamics,
3403 elf_cris_discard_excess_program_dynamics): ..
3404 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
3405 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
3406 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
3407 _frv_create_got_section, _frvfdpic_assign_plt_entries,
3408 elf32_frvfdpic_size_dynamic_sections,
3409 elf32_frvfdpic_modify_segment_map,
3410 elf32_frvfdpic_finish_dynamic_sections): ..
3411 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
3412 elf32_h8_get_relocated_section_contents): ..
3413 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
3414 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
3415 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
3416 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
3417 elf32_hppa_finish_dynamic_sections): ..
3418 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
3419 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
3420 i370_elf_finish_dynamic_sections): ..
3421 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
3422 allocate_dynrelocs, elf_i386_size_dynamic_sections,
3423 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
3424 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
3425 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
3426 * elf32-ip2k.c (ip2k_is_switch_table_128,
3427 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
3428 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
3429 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
3430 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
3431 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
3432 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
3433 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
3434 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
3435 m32r_elf_get_relocated_section_contents): ..
3436 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
3437 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
3438 m68hc11_elf_relax_delete_bytes): ..
3439 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
3440 m68hc12_elf_size_one_stub): ..
3441 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
3442 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
3443 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
3444 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
3445 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
3446 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
3447 elf32_mips_grok_prstatus): ..
3448 * elf32-or32.c (or32_elf_consth_reloc): ..
3449 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
3450 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
3451 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
3452 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
3453 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
3454 ppc_elf_final_write_processing): ..
3455 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
3456 allocate_dynrelocs, elf_s390_size_dynamic_sections,
3457 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
3458 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
3459 sh_elf_relax_delete_bytes, sh_elf_align_loads,
3460 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
3461 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
3462 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
3463 * elf32-sh64-com.c (sh64_address_in_cranges,
3464 sh64_get_contents_type): ..
3465 * elf32-sh64.c (sh64_find_section_for_address,
3466 sh64_elf_final_write_processing): ..
3467 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
3468 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
3469 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
3470 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
3471 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
3472 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
3473 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
3474 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
3475 elf_vax_finish_dynamic_sections): ..
3476 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
3477 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
3478 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
3479 xstormy16_elf_finish_dynamic_sections): ..
3480 * elf32-xtensa.c (xtensa_read_table_entries,
3481 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
3482 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
3483 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
3484 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
3485 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
3486 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
3487 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
3488 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
3489 xtensa_callback_required_dependence): ..
3490 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
3491 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
3492 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
3493 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
3494 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
3495 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
3496 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
3497 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
3498 * elf64-hppa.c (allocate_dynrel_entries,
3499 elf64_hppa_size_dynamic_sections,
3500 elf64_hppa_finish_dynamic_sections): ..
3501 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
3502 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
3503 elf64_mips_grok_prstatus): ..
3504 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
3505 mmix_elf_relocate_section, mmix_elf_final_link,
3506 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
3507 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
3508 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
3509 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
3510 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
3511 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
3512 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
3513 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
3514 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
3515 ppc64_elf_finish_dynamic_sections): ..
3516 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
3517 allocate_dynrelocs, elf_s390_size_dynamic_sections,
3518 elf_s390_finish_dynamic_sections): ..
3519 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
3520 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
3521 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
3522 sh64_elf64_finish_dynamic_sections): ..
3523 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
3524 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
3525 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
3526 sparc64_elf_finish_dynamic_symbol,
3527 sparc64_elf_finish_dynamic_sections): ..
3528 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
3529 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
3530 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
3531 elf64_x86_64_finish_dynamic_sections): ..
3532 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
3533 * elfcode.h (elf_slurp_reloc_table): ..
3534 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
3535 elf_finalize_dynstr, elf_link_add_object_symbols,
3536 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
3537 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
3538 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
3539 elf32_mips_grok_prstatus): ..
3540 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
3541 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
3542 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
3543 elfNN_ia64_finish_dynamic_sections): ..
3544 * elfxx-mips.c (mips_elf_create_procedure_table,
3545 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
3546 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
3547 mips_elf_global_got_index, mips_elf_multi_got,
3548 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
3549 mips_elf_allocate_dynamic_relocations,
3550 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
3551 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
3552 _bfd_mips_elf_always_size_sections,
3553 _bfd_mips_elf_size_dynamic_sections,
3554 _bfd_mips_elf_finish_dynamic_symbol,
3555 _bfd_mips_elf_finish_dynamic_sections,
3556 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
3557 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
3558 _bfd_elf_mips_get_relocated_section_contents,
3559 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
3560 * hp300hpux.c (callback): ..
3561 * hppabsd-core.c (make_bfd_asection): ..
3562 * hpux-core.c (make_bfd_asection): ..
3563 * i386linux.c (linux_link_create_dynamic_sections,
3564 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
3565 * i386msdos.c (msdos_write_object_contents): ..
3566 * i386os9k.c (os9k_callback, os9k_write_object_contents,
3567 os9k_set_section_contents): ..
3568 * ieee.c (parse_expression, ieee_slurp_external_symbols,
3569 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
3570 ieee_write_section_part, do_with_relocs, do_as_repeat,
3571 do_without_relocs, ieee_write_debug_part, init_for_output,
3572 ieee_set_section_contents): ..
3573 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
3574 * irix-core.c (do_sections, make_bfd_asection): ..
3575 * libaout.h (aout_section_merge_with_text_p): ..
3576 * libbfd.c (_bfd_generic_get_section_contents,
3577 _bfd_generic_get_section_contents_in_window): ..
3578 * linker.c (default_indirect_link_order): ..
3579 * lynx-core.c (make_bfd_asection): ..
3580 * m68klinux.c (linux_link_create_dynamic_sections,
3581 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
3582 * mach-o.c (bfd_mach_o_make_bfd_section,
3583 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
3584 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
3585 bfd_mach_o_scan_read_segment): ..
3586 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
3587 _bfd_merge_sections): ..
3588 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
3589 mmo_map_set_sizes, mmo_canonicalize_symtab,
3590 mmo_internal_write_section, mmo_write_object_contents): ..
3591 * netbsd-core.c (netbsd_core_file_p): ..
3592 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
3593 nlm_alpha_set_public_section): ..
3594 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
3595 * nlm32-sparc.c (nlm_sparc_write_import): ..
3596 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
3597 nlm_compute_section_file_positions): ..
3598 * oasys.c (oasys_object_p, oasys_slurp_section_data,
3599 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
3600 * opncls.c (get_debug_link_info): ..
3601 * osf-core.c (make_bfd_asection): ..
3602 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
3603 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
3604 final_link, aout_link_input_section): ..
3605 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
3606 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
3607 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
3608 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
3609 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
3610 * ptrace-core.c (ptrace_unix_core_file_p): ..
3611 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
3612 _bfd_final_link_relocate, bfd_generic_relax_section,
3613 bfd_generic_get_relocated_section_contents): ..
3614 * reloc16.c (bfd_coff_reloc16_relax_section,
3615 bfd_coff_reloc16_get_relocated_section_c): ..
3616 * riscix.c (riscix_some_aout_object_p): ..
3617 * rs6000-core.c (read_hdr, make_bfd_asection): ..
3618 * sco5-core.c (make_bfd_asection): ..
3619 * simple.c (bfd_simple_get_relocated_section_contents): ..
3620 * som.c (som_object_setup, setup_sections, som_prep_headers,
3621 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
3622 som_set_reloc_info, som_get_section_contents,
3623 som_bfd_link_split_section): ..
3624 * sparclinux.c (linux_link_create_dynamic_sections,
3625 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
3626 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
3627 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
3628 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
3629 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
3630 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
3631 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
3632 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
3633 sunos_finish_dynamic_link): ..
3634 * syms.c (_bfd_stab_section_find_nearest_line): ..
3635 * tekhex.c (first_phase, tekhex_set_section_contents,
3636 tekhex_write_object_contents): ..
3637 * trad-core.c (trad_unix_core_file_p): ..
3638 * versados.c (process_esd, process_otr, process_otr): ..
3639 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
3640 * vms-misc.c (add_new_contents): ..
3641 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
3642 * vms.c (vms_set_section_contents): ..
3643 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
3644 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
3645 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
3646 * xsym.c (bfd_sym_scan): .. See above.
3648 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
3650 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
3651 calling _bfd_merged_section_offset only for section symbols.
3653 2004-06-22 Alan Modra <amodra@bigpond.net.au>
3655 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
3656 for handling SEC_MERGE symbols in relax_section.
3658 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
3660 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
3661 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
3662 linked together. Mark the result as h8300sx code.
3664 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
3666 * elf-bfd.h (struct elf_backend_data): Added
3667 elf_backend_omit_section_dynsym.
3668 (_bfd_elf_link_omit_section_dynsym): Declare.
3669 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
3670 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
3671 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
3672 (_bfd_elf_link_renumber_dynsyms): ... this function.
3673 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
3674 _bfd_elf_link_omit_section_dynsym).
3675 (elfNN_bed): Added elf_backend_omit_section_dynsym.
3677 2004-06-21 Nick Clifton <nickc@redhat.com>
3679 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
3682 2004-06-17 Jerome Guitton <guitton@gnat.com>
3684 * bfd-in.h (bfd_cache_close_all): New function declaration.
3685 * bfd-in2.h: Regenerate.
3686 * cache.c (bfd_cache_close_all): New function definition.
3688 2004-06-16 Mark Kettenis <kettenis@gnu.org>
3690 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
3692 * configure: Regenerate.
3694 2004-06-16 Daniel Jacobowitz <dan@debian.org>
3696 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
3697 the pre-existing section.
3699 2004-06-15 Alan Modra <amodra@bigpond.net.au>
3701 * section.c (struct sec): Remove usused flags. Reorganize a little.
3702 (bfd_get_section_size_before_reloc): Delete.
3703 (bfd_get_section_size_after_reloc): Delete.
3704 (STD_SECTION): Update.
3705 (bfd_get_section_size_now): Delete.
3706 (bfd_set_section_contents): Don't referece reloc_done.
3707 (bfd_get_section_contents): Remove reloc_done comment.
3708 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
3710 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
3711 * ecoff.c (bfd_debug_section): Update initializer.
3712 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
3713 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
3714 * bfd-in.h (bfd_section_size): Expand.
3715 (bfd_get_section_size): New macro.
3716 * bfd-in2.h: Regenerate.
3717 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
3718 bfd_get_section_size_before_reloc with bfd_get_section_size.
3719 * coffcode.h (coff_write_object_contents): Likewise.
3720 * coffgen.c (build_debug_section): Likewise.
3721 * dwarf1.c (parse_line_table): Likewise.
3722 (_bfd_dwarf1_find_nearest_line): Likewise.
3723 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
3724 * i386msdos.c (msdos_write_object_contents): Likewise.
3725 * pdp11.c (squirt_out_relocs): Likewise.
3726 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
3727 * elf64-mmix.c (mmix_elf_final_link): Update comment.
3729 2004-06-14 Chris Demetriou <cgd@broadcom.com>
3731 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
3732 removal) with updated comment.
3733 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
3735 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
3736 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
3738 2004-06-12 Alan Modra <amodra@bigpond.net.au>
3740 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
3741 overflow on branches to undefweaks.
3743 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3745 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
3746 as ecoff_section_data() does not return a valid lvalue.
3748 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
3750 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
3751 (elf_link_add_object_symbols): Likewise.
3753 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
3754 (elf_backend_reloc_type_class): New.
3756 2004-06-08 Mark Kettenis <kettenis@gnu.org>
3758 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
3760 * configure: Regenerate.
3762 2004-06-07 Daniel Jacobowitz <dan@debian.org>
3764 From: Albert Chin-A-Young <china@thewrittenword.com>
3765 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
3768 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
3770 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
3773 2004-05-28 DJ Delorie <dj@redhat.com>
3775 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
3776 for linking, but otherwise adjust reloc for merged sections.
3778 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
3780 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
3781 _bfd_merged_section_offset for local symbols.
3783 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
3785 * Makefile.am: Regenerate dependencies.
3786 * Makefile.in: Regenerate.
3787 * archures.c: Add bfd_mach_sh3_nommu .
3788 * bfd-in2.h: Regenerate.
3789 * cpu-sh.c: Add sh3-nommu architecture.
3790 (bfd_to_arch_table): Create new table.
3791 (sh_get_arch_from_bfd_mach): Create new function.
3792 (sh_get_arch_up_from_bfd_mach): Create new function.
3793 (sh_merge_bfd_arch): Create new function.
3794 * elf32-sh.c (sh_ef_bfd_table): Add table.
3795 (sh_elf_check_relocs): Replace switch statement with
3796 use of sh_ef_bfd_table .
3797 (sh_elf_get_flags_from_mach): Add new function.
3798 (sh_find_elf_flags): Likewise.
3799 (sh_elf_copy_private_data): Replace most of non-elf contents
3800 with a call to sh_merge_bfd_arch() .
3802 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
3804 * Makefile.am (bfdver.h): Use explicit filename, not $< .
3805 * Makefile.in: Regenerate.
3807 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
3809 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
3810 custom calling conventions for dynamic symbols.
3811 (mn10300_elf_relax_section): Avoid relaxing a function as a local
3812 symbol if it's an alias to a global one.
3814 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
3816 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
3819 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
3821 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
3824 2004-05-26 Alan Modra <amodra@bigpond.net.au>
3826 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
3827 for SHT_GROUP sections.
3829 2004-05-25 Alan Modra <amodra@bigpond.net.au>
3831 * elflink.c (elf_link_add_object_symbols): Don't set up merge
3833 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
3834 * merge.c: Formatting. Remove unnecessary casts. Expand
3835 bfd_get_section_alignment macro.
3836 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
3837 use throughout file.
3838 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
3839 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
3840 section name to determine sinfo group, instead test output section
3842 (_bfd_merge_sections): Add struct bfd_link_info param. Call
3843 _bfd_strip_section_from_output rather than just twiddling flags.
3844 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
3845 (_bfd_merge_sections): Update prototype.
3846 * libbfd.h: Regenerate.
3848 2004-05-24 Mark Kettenis <kettenis@gnu.org>
3850 * netbsd-core.c: Correctly indent section that sets architecture
3853 From Miod Vallat <miod@online.fr>:
3854 * m88kopenbsd.c: New file.
3855 * targets.c (m88k_openbsd_vec): New.
3856 * config.bfd: Add m88k-*-openbsd*.
3857 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
3858 (m88kopenbsd_vec): New.
3859 * configure: Regenerate.
3860 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
3861 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
3863 * Makefile.in: Regenerate.
3864 * po/SRC-POTFILES.in: Regenerate.
3866 2004-05-24 Nick Clifton <nickc@redhat.com>
3868 * hash.c: Remove bogus node "Changing the default Hash Table Size"
3869 introduced by hash table size patch.
3871 2004-05-22 Ben Elliston <bje@au.ibm.com>
3873 * configure.in (is_release): Remove.
3874 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
3875 (AC_OUTPUT): Don't output bfdver.h from version.h.
3876 * configure: Regenerate.
3877 * Makefile.am (RELEASE): New variable.
3878 (bfdver.h): New target.
3879 * Makefile.in: Regenerate.
3880 * doc/Makefile.in: Likewise.
3882 2004-05-22 Ben Elliston <bje@au.ibm.com>
3884 * Makefile.am (config.status): Don't depend on version.h.
3885 * Makefile.in: Regenerate.
3887 2004-05-22 Alan Modra <amodra@bigpond.net.au>
3889 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
3890 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
3891 * libbfd.h: Regenerate.
3892 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
3893 (_bfd_elf_rel_local_sym): Likewise.
3894 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
3895 (elf_link_input_bfd): Likewise.
3896 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
3897 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3898 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3899 (elfNN_ia64_relocate_section): Likewise.
3901 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
3903 * hash.c (bfd_default_hash_table_size): New variable.
3904 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
3905 (bfd_hash_set_default_size): New function. Set the default size
3906 to a selected prime number close to the argument. Document new
3908 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
3909 * bfd-in2.h: Regenerate.
3910 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
3911 * Makefile.in: Regenerate.
3913 2004-05-21 Mark Kettenis <kettenis@gnu.org>
3915 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
3916 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
3917 arm, m68k, m88k and hppa core files.
3919 2004-05-21 Nick Clifton <nickc@redhat.com>
3921 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
3922 (bfd_bwrite): Likewise.
3923 (bfd_tell): Likewise.
3924 (bfd_flush): Likewise.
3925 (bfd_stat): Likewise.
3926 (bfd_seek): Likewise.
3927 (bfd_get_mtime): Likewise.
3928 (bfd_get_size): Likewise.
3930 2004-05-19 Ben Elliston <bje@au.ibm.com>
3932 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
3934 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
3936 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
3937 (bfd_generic_openr_next_archived_file): Likewise.
3939 2004-05-17 Bob Wilson <bob.wilson@acm.org>
3941 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
3942 section names by inserting a new substring after .gnu.linkonce, except
3943 for .gnu.linkonce.t.* where the "t." is replaced.
3945 2004-05-17 Adam Nemet <anemet@lnxw.com>
3947 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
3948 (m68-*-lynxos* case): Likewise.
3949 (powerpc-*-lyxnos* case): New case.
3950 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
3952 2004-05-17 David Heine <dlheine@tensilica.com>
3954 * aout-target.h (MY_bfd_copy_private_header_data): Define.
3955 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
3956 * bfd.c (bfd_copy_private_header_data): Define.
3957 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
3959 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
3960 * coffcode.h (coff_bfd_copy_private_header_data): Define.
3961 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
3962 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
3963 segments by calling copy_private_bfd_data.
3964 (_bfd_elf_copy_private_header_data): Define.
3965 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
3966 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
3967 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
3968 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
3969 * mmo.c (mmo_bfd_copy_private_header_data): Define.
3970 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
3971 * som.c (som_bfd_copy_private_header_data): Define.
3972 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
3973 * vms.c (vms_bfd_copy_private_header_data): Define.
3974 * bfd-in2.h: Regenerate.
3975 * libbfd.h: Regenerate.
3977 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3979 * elfxx-mips.c (MINUS_TWO): Define.
3980 (mips_elf_higher, mips_elf_highest,
3981 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
3982 some bfd_vma values.
3983 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
3985 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3987 * som.c (log2): Rename to exact_log2. Adjust all callers.
3989 2004-05-13 Paul Brook <paul@codesourcery.com>
3991 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
3992 dwarf3 format CIE entries. Remove comment about the size of the
3993 ra_column field. It is now correctly deduced.
3995 2004-05-13 Joel Sherrill <joel@oarcorp.com>
3997 * config.bfd (or32-*-rtems*): Switch to elf.
3999 2004-05-13 Nick Clifton <nickc@redhat.com>
4001 * po/fr.po: Updated French translation.
4003 2004-05-11 Jakub Jelinek <jakub@redhat.com>
4005 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
4006 into .dynsym if elf_section_data (sec)->dynindx <= 0.
4007 Adjust counting of last_local.
4008 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
4009 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
4010 created by the linker nor !SHF_ALLOC.
4012 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
4013 DT_PLTGOT to the start of the .got.plt section instead of the
4014 .got output section. Set sh_entsize for .got section in addition
4016 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
4017 is at sgot->output_section->vma.
4018 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
4019 DT_PLTGOT to the start of the .got.plt section instead of the
4020 .got output section.
4021 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
4022 is at sgot->output_section->vma. Set sh_entsize for .got section
4023 in addition to .got.plt.
4024 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
4025 (bfd_section_from_phdr): Likewise.
4026 (map_sections_to_segments): Likewise.
4027 (assign_file_positions_for_segments): Likewise.
4028 (get_program_header_size): Likewise.
4029 * elflink.c (bfd_elf_size_dynamic_sections): Set
4030 elf_tdata (output_bfd)->relro from info->relro.
4031 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
4033 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
4035 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
4036 a zero symndx for which we hadn't accounted a dynamic relocation.
4037 (_frvfdpic_add_rofixup): Likewise.
4039 2004-05-07 Brian Ford <ford@vss.fsi.com>
4040 DJ Delorie <dj@redhat.com>
4042 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
4043 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
4044 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
4045 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
4047 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
4049 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
4050 immediately if there's no link info.
4051 (elf32_frvfdpic_copy_private_bfd_data): New.
4052 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
4054 2004-05-06 Zack Weinberg <zack@codesourcery.com>
4056 * dwarf2.c (add_line_info): Also set info->filename to NULL if
4057 filename argument is null; do not call strlen on a null pointer.
4059 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
4061 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
4064 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
4066 * configure.in (bfd_elf32_frvfdpic_vec): New.
4067 * configure: Rebuilt.
4068 * targets.c (bfd_elf32_frvfdpic_vec): New.
4069 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
4071 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
4072 frvfdpic instead of frv. Rearrange elf-target macros such that
4073 the FDPIC-specific ones are only defined for this new target
4075 (bfd_elf32_frvfdpic_vec): Declare.
4077 (elf32_frv_relocate_section): Use it to enable segment checking
4078 and to control rofixup emission. Add output section vma to
4079 applied relocation in non-LOAD non-ALLOC sections. Use
4080 _bfd_error_handler for errors.
4081 (_frv_create_got_section): Create .rel.got and .rofixup only in
4082 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
4084 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
4085 (elf32_frvfdpic_modify_segment_map): Likewise.
4086 (elf32_frv_finish_dynamic_sections): New, do-nothing.
4087 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
4088 error message if we miscompute the rofixup size.
4089 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
4090 (frvfdpic_elf_encode_eh_address): Likewise.
4091 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
4092 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
4093 relocs. Reject unknown relocation types.
4094 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
4095 (frv_elf_merge_private_bfd_data): Likewise.
4096 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
4097 0x4000 for newly-added elf32-frvfdpic.
4099 2004-05-05 Nick Clifton <nickc@redhat.com>
4102 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
4103 returning NULL as most users of this function do not check its
4105 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
4106 of bfd_cache_lookup().
4107 * sco5-core.c (sco5_core_file_p): Likewise.
4108 * trad-core.c (trad_unix_core_file_p): Likewise.
4110 2004-05-05 Nick Clifton <nickc@redhat.com>
4112 * cache.c (bfd_cache_lookup): Improve formatting.
4113 * archive.c: Fix formatting.
4115 2004-05-05 Peter Barada <peter@the-baradas.com>
4117 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
4118 * cpu-m68k.c(bfd_m68k_arch): Likewise.
4119 * bfd-in2.h(bfd_architecture): Regenerate.
4121 2004-05-03 Alan Modra <amodra@bigpond.net.au>
4123 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
4125 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
4126 those against discarded link-once and SEC_MERGE section symbols.
4128 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
4130 * section.c (bfd_get_section_by_name_if): New.
4131 * bfd-in2.h: Regenerated.
4133 2004-05-02 Alan Modra <amodra@bigpond.net.au>
4135 * som.c (som_bfd_is_group_section): Define.
4137 2004-05-01 Alan Modra <amodra@bigpond.net.au>
4139 * section.c (bfd_make_section_anyway): Copy the whole
4140 bfd_hash_entry, not just "next" from existing entry.
4142 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
4144 * elf.c (bfd_section_from_shdr): Maintain the section order in
4146 (special_sections): Add ".note.GNU-stack".
4147 (elf_fake_sections): Handle section group for relocatable
4150 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
4152 * section.c (bfd_sections_find_if): New.
4153 * bfd-in2.h: Regenerated.
4155 2004-04-30 Alan Modra <amodra@bigpond.net.au>
4157 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
4159 * elf-bfd.h (bfd_elf_is_group_section): Declare.
4160 * elf.c (bfd_elf_is_group_section): New function.
4161 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
4162 * section.c (bfd_generic_is_group_section): New function.
4163 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
4164 (BFD_JUMP_TABLE_LINK): Adjust.
4165 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
4166 * aout-target.h (MY_bfd_is_group_section): Define.
4167 * aout-tic30.c (MY_bfd_is_group_section): Define.
4168 * bfd.c (bfd_is_group_section): Define.
4169 * binary.c (binary_bfd_is_group_section): Define.
4170 * bout.c (b_out_bfd_is_group_section): Define.
4171 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
4172 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
4173 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
4174 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
4175 * coffcode.h (coff_bfd_is_group_section): Define.
4176 * i386msdos.c (msdos_bfd_is_group_section): Define.
4177 * i386os9k.c (os9k_bfd_is_group_section): Define.
4178 * ieee.c (ieee_bfd_is_group_section): Define.
4179 * ihex.c (ihex_bfd_is_group_section): Define.
4180 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
4181 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
4182 * mmo.c (mmo_bfd_is_group_section): Define.
4183 * nlm-target.h (nlm_bfd_is_group_section): Define.
4184 * oasys.c (oasys_bfd_is_group_section): Define.
4185 * pef.c (bfd_pef_bfd_is_group_section): Define.
4186 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
4187 * srec.c (srec_bfd_is_group_section): Define.
4188 * tekhex.c (tekhex_bfd_is_group_section): Define.
4189 * versados.c (versados_bfd_is_group_section): Define.
4190 * vms.c (vms_bfd_is_group_section): Define.
4191 * xsym.c (bfd_sym_bfd_is_group_section): Define.
4192 * bfd-in2.h: Regenerate.
4193 * libbfd.h: Regenerate.
4195 2004-04-30 Alan Modra <amodra@bigpond.net.au>
4197 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
4199 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
4201 * configure.in: Update version to 2.15.91.
4202 * configure: Regenerate.
4204 2004-04-29 Brian Ford <ford@vss.fsi.com>
4206 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
4207 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
4208 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
4209 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
4210 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
4211 .gnu.linkonce.wi. sections.
4212 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
4213 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
4215 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
4216 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4218 2004-04-28 Chris Demetriou <cgd@broadcom.com>
4220 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
4221 * bfd-in2.h: Regenerate.
4222 * libbfd.h: Likewise.
4224 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4226 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
4228 (setup_sections): Use som_subspace_dictionary_record struct instead
4229 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
4230 is_comdat, is_common or dup_common.
4231 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
4232 is_comdat, is_common and dup_common in section subspace_dict from
4234 (som_begin_writing): Use som_subspace_dictionary_record struct.
4235 (som_finish_writing): Likewise.
4236 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
4237 is_common and dup_common flags in info for symbol. Add comment
4238 regarding linker support for these fields. Slightly reorganize
4240 (som_build_and_write_symbol_table): Set is_comdat, is_common and
4241 dup_common fields in symbol table from symbol info.
4242 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
4243 arguments. Set corresponding fields in copy_data. Change all callers.
4244 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
4246 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
4247 * som.h (som_subspace_dictionary_record): Define.
4248 (som_copyable_section_data_struct): Add is_comdat, is_common and
4250 (som_section_data_struct): Use som_subspace_dictionary_record struct
4251 instead of subspace_dictionary_record.
4252 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
4254 2004-04-27 Bob Wilson <bob.wilson@acm.org>
4256 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
4257 if set. Check reloc_done flag before applying relocations. Use
4258 output addresses, both when applying relocations and when comparing
4259 against the specified section.
4260 (elf_xtensa_relocate_section): Use output address to check if dynamic
4261 reloc is in a literal pool. Set section's reloc_done flag.
4263 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
4265 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
4266 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
4268 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
4271 2004-04-27 Alan Modra <amodra@bigpond.net.au>
4273 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
4274 structure field removed in 2004-04-24 patch.
4275 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
4277 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
4279 * elf32-arm.h (elf32_arm_section_flags): Likewise.
4280 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
4281 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
4282 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
4283 field before calling elf_backend_section_flags.
4285 2004-04-24 Chris Demetriou <cgd@broadcom.com>
4287 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
4288 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
4289 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
4290 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
4291 and BFD_RELOC_32_PCREL.
4292 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
4293 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
4294 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4295 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
4296 (mips_elf_next_relocation): Move comment about matching HI/LO
4298 (_bfd_mips_elf_relocate_section): Here. Remove handling for
4299 R_MIPS_GNU_REL_HI16.
4301 2004-04-23 Chris Demetriou <cgd@broadcom.com>
4303 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
4304 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
4305 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
4306 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
4307 and update comments to reflect current usage.
4308 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
4309 and MIPS_R_SWITCH, as well as several empty entries. Update comment
4311 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
4312 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
4313 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
4314 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
4315 type number to be MIPS_R_PCREL16.
4316 (mips_relocate_section): Remove support for link-time relaxation
4317 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
4318 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
4319 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
4320 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
4321 relaxation of branches used by embedded-PIC.
4322 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
4323 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
4324 related members, update comment.
4325 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
4326 code related to embedded-PIC.
4327 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
4328 initialization of now-removed 'adjust' member of
4329 'struct ecoff_debug_info'.
4331 2004-04-23 Chris Demetriou <cgd@broadcom.com>
4333 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
4335 2004-04-21 Philip Blundell <pb@nexus.co.uk>
4337 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
4338 relocs for locally defined symbols during -shared final link.
4339 (elf32_arm_final_link_relocate): Likewise.
4341 2004-04-22 Jakub Jelinek <jakub@redhat.com>
4343 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
4344 ELF_LINK_POINTER_EQUALITY_NEEDED.
4345 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
4346 if r_type is not R_X86_64_PC32.
4347 (elf64_x86_64_finish_dynamic_symbol): If
4348 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
4351 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4353 * elf32-sh.c (sh_elf_plt_sym_val): New function.
4354 (elf_backend_plt_sym_val): Define.
4356 2004-04-22 Andrew Cagney <cagney@redhat.com>
4358 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
4360 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4362 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
4364 * som.c (som_set_section_contents): Constantify second argument.
4365 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
4366 (som_object_setup): Rework to avoid warning.
4367 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
4370 2004-04-22 Andrew Cagney <cagney@redhat.com>
4372 * cache.c (bfd_cache_close): Check for a previously closed file.
4374 2004-04-22 Jakub Jelinek <jakub@redhat.com>
4376 * bfd.c (bfd_get_synthetic_symtab): Define.
4377 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
4378 NAME##_get_synthetic_symtab.
4379 (struct bfd_target): Add _bfd_get_synthetic_symtab.
4380 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
4381 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
4383 (_bfd_elf_get_synthetic_symtab): New prototype.
4384 * elfcode.h (elf_get_synthetic_symtab): Define.
4385 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
4386 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
4387 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
4388 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
4389 * bfd-in2.h: Rebuilt.
4390 * libbfd.h: Rebuilt.
4391 * elf32-i386.c (elf_i386_plt_sym_val): New function.
4392 (elf_backend_plt_sym_val): Define.
4393 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
4394 (elf_backend_plt_sym_val): Define.
4395 * elf32-s390.c (elf_s390_plt_sym_val): New function.
4396 (elf_backend_plt_sym_val): Define.
4397 * elf64-s390.c (elf_s390_plt_sym_val): New function.
4398 (elf_backend_plt_sym_val): Define.
4399 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
4400 (elf_backend_plt_sym_val): Define.
4401 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
4402 (elf_backend_plt_sym_val): Define.
4403 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
4404 (elf_backend_plt_sym_val): Define.
4405 * aout-target.h (MY_get_synthetic_symtab): Define.
4406 * aout-tic30.c (MY_get_synthetic_symtab): Define.
4407 * coff-rs6000.c (rs6000coff_vec): Add
4408 _bfd_nodynamic_get_synthetic_symtab.
4409 (pmac_xcoff_vec): Likewise.
4410 * coff64-rs6000.c (rs6000coff64_vec): Add
4411 _bfd_nodynamic_get_synthetic_symtab.
4412 (aix5coff64_vec): Likewise.
4413 * sunos.c (MY_get_synthetic_symtab): Define.
4414 * vms.c (vms_get_synthetic_symtab): Define.
4416 2004-04-22 Nick Clifton <nickc@redhat.com>
4418 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
4420 2004-04-22 Peter Barada <peter@the-baradas.com>
4422 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
4423 * bfd2-in.h: Regenerate.
4424 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
4426 2004-04-21 Chris Demetriou <cgd@broadcom.com>
4428 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
4429 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
4430 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
4431 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
4432 * bfd-in2.h: Regenerate.
4434 2004-04-21 Bob Wilson <bob.wilson@acm.org>
4436 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
4437 require relocations against a weak symbol to reference the same
4438 symbol hash entry if not a final, static link.
4439 (get_cached_value, add_value_map): Add final_static_link argument.
4440 (remove_literals): Pass final_static_link argument as needed.
4442 2004-04-21 Andrew Cagney <cagney@redhat.com>
4444 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
4445 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
4446 (opncls_bwrite, opncls_bclose, opncls_bflush)
4447 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
4448 bfd iovec that uses function callbacks.
4449 (bfd_close): Use the iovec's bclose.
4450 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
4451 (cache_bclose, cache_bflush, cache_bstat)
4452 (cache_iovec): New functions and global variable, implement a
4453 cache "iovec", where applicable set bfd_error.
4454 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
4455 * bfdio.c (struct bfd_iovec): Define.
4456 (real_read): Delete function.
4457 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
4458 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
4459 assume that bread and bwrite set bfd_error.
4460 * bfd.c (struct bfd): Add "iovec", update comments.
4461 * bfd-in2.h, libbfd.h: Re-generate.
4463 2004-04-21 Andrew Cagney <cagney@redhat.com>
4465 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
4467 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
4469 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
4470 (bfd_elf_gc_sections): Fail if a shared object is being created.
4471 Do not fail if dynamic sections have been created. Instead call
4472 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
4473 dynamically referenced symbols. Do not mark the whole graph
4474 rooted at .eh_frame, only the section proper.
4476 2004-04-20 DJ Delorie <dj@redhat.com>
4478 * reloc.c: Add BFD_RELOC_32_SECREL.
4479 * bfd-in2.h: Regenerate.
4480 * libbfd.h: Likewise.
4481 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
4482 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
4483 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
4485 2004-04-19 Jakub Jelinek <jakub@redhat.com>
4487 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
4488 relocs against hidden/protected undefweak symbols properly.
4489 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4491 2004-04-18 Mark Kettenis <kettenis@gnu.org>
4493 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
4494 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
4497 2004-04-17 Brian Ford <ford@vss.fsi.com>
4499 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
4500 filepos for the SizeOfHeaders field.
4501 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
4503 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
4505 2004-04-16 Alan Modra <amodra@bigpond.net.au>
4507 * simple.c (bfd_simple_get_relocated_section_contents): Don't
4508 change reloc_done. Set and restore _cooked_size.
4511 2004-04-15 Mark Kettenis <kettenis@gnu.org>
4513 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
4516 2004-04-15 Nick Clifton <nickc@redhat.com>
4518 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
4520 2004-04-15 Alan Modra <amodra@bigpond.net.au>
4522 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
4524 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
4526 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
4527 when it is a definition.
4529 2004-04-14 Alan Modra <amodra@bigpond.net.au>
4531 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
4532 when statically linking PIC code.
4533 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4535 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4537 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
4538 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
4539 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
4540 * configure: Regenerate.
4542 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
4544 * elflink.c: Include libiberty.h.
4545 * Makefile.am (elflink.lo): Depend on libiberty.h.
4546 * Makefile.in: Regenerate.
4548 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
4550 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
4553 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
4555 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
4556 reserve the memory for dynamic linker
4558 2004-04-05 Mark Kettenis <kettenis@gnu.org>
4560 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
4561 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
4563 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
4565 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
4566 RELOC_FOR_GLOBAL_SYMBOL.
4567 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
4569 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
4571 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4572 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
4574 2004-04-01 Paul Brook <paul@codesourcery.com>
4576 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
4577 * elf32-arm.h (struct elf32_elf_section_map): New.
4578 (struct _arm_elf_section_data): New.
4579 (elf32_arm_section_data): Define.
4580 (struct elf32_arm_link_hash_table): Add byteswap_code.
4581 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
4582 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
4583 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
4584 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
4585 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
4586 (bfd_elf32_new_section_hook, elf_backend_write_section,
4587 elf_backend_link_output_symbol_hook): Define.
4589 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
4591 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
4592 that keeps the characters in a B_INCL..B_EINCL range.
4593 (_bfd_link_section_stabs): When computing the sum of the
4594 characters in a B_INCL..B_EINCL range also keep a copy of those
4595 characters. Use this information to distinguish between
4596 include sections that have the same sum and the same length
4597 but which are nevertheless unique.
4599 2004-03-31 Paul Brook <paul@codesourcery.com>
4601 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
4602 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
4604 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
4606 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
4607 to 'sum_chars' and add field 'num_chars'.
4608 (_bfd_link_section_stabs): When computing the sum of the
4609 characters in a B_INCL..B_EINCL range also keep a count of the
4610 number of characters. Use this information to help distinguish
4611 between include sections when have the same sum but which
4612 nevertheless are still unique.
4614 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
4616 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
4618 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
4619 Tomer Levi <Tomer.Levi@nsc.com>
4621 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
4622 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
4623 (BFD32_BACKENDS): Add elf32-cr16c.lo.
4624 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
4625 (cpu-cr16c.lo): New target.
4626 (elf32-cr16c.lo): Likewise.
4627 * Makefile.in: Regenerate.
4628 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
4629 (bfd_archures_list): Add bfd_cr16c_arch.
4630 * config.bfd: Handle cr16c-*-elf*.
4631 * configure.in: Handle bfd_elf32_cr16c_vec.
4632 * configure: Regenerate.
4633 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
4634 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
4635 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
4636 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
4637 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
4638 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
4639 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
4640 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
4641 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
4642 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
4643 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
4644 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
4645 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
4646 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
4647 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
4648 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
4649 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
4650 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
4651 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
4652 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
4653 * targets.c (bfd_elf32_cr16c_vec): Declare.
4654 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
4655 * cpu-cr16c.c: New file.
4656 * elf32-cr16c.c: Likewise.
4657 * libbfd.h: Regenerate.
4658 * bfd-in2.h: Likewise.
4660 2004-03-30 Jakub Jelinek <jakub@redhat.com>
4662 * elf.c (map_sections_to_segments): Fix handling of .tbss.
4664 2004-03-27 Alan Modra <amodra@bigpond.net.au>
4666 * Makefile.am: Remove all mention of elflink.h.
4667 * Makefile.in: Regenerate.
4668 * bfd-in.h (bfd_elf_discard_info): Declare.
4669 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
4670 * bfd-in2.h: Regenerate.
4671 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
4672 bfd_elf32_link_record_dynamic_symbol,
4673 bfd_elf64_link_record_dynamic_symbol,
4674 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
4675 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
4676 _bfd_elf32_link_record_local_dynamic_symbol,
4677 _bfd_elf64_link_record_local_dynamic_symbol,
4678 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
4679 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
4680 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
4681 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
4682 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
4683 _bfd_elf32_reloc_symbol_deleted_p,
4684 _bfd_elf64_reloc_symbol_deleted_p): Delete.
4685 (bfd_elf_link_record_dynamic_symbol,
4686 bfd_elf_link_record_local_dynamic_symbol,
4687 bfd_elf_final_link, bfd_elf_gc_sections,
4688 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
4689 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
4690 bfd_elf_reloc_symbol_deleted_p): Declare.
4691 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4692 * elf32-arm.h: Update for changed function names. Remove local
4693 WILL_CALL_FINISH_DYNAMIC_SECTION define.
4694 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
4695 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
4696 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
4697 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
4698 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4699 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
4700 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
4701 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
4702 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
4703 (bfd_elfNN_print_symbol): Define.
4704 * elfcode.h: Don't include elflink.h.
4705 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
4706 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
4707 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
4708 elf_gc_record_vtinherit, elf_gc_record_vtentry,
4709 elf_link_record_local_dynamic_symbol): Don't define.
4710 * elflink.c: Update for changed function names. Move elflink.h
4712 * elflink.h: Delete file.
4713 * po/SRC-POTFILES.in: Regenerate.
4714 * po/bfd.pot: Regenerate.
4716 2004-03-27 Alan Modra <amodra@bigpond.net.au>
4718 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
4719 "name" for global syms accidentally removed in 2004-03-20 change.
4721 2004-03-27 Alan Modra <amodra@bigpond.net.au>
4723 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
4724 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
4725 where Elf_External_* is different for 64 and 32 bit, with
4726 corresponding elf_size_info field.
4727 (struct elf_final_link_info): Use "bfd_byte *" instead
4728 of "Elf_External_Sym *" for external_syms and symbuf.
4729 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
4730 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
4731 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
4732 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
4733 (elf_link_sort_cmp2): Adjust.
4734 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
4735 using ELF_R_SYM macro. Set u.sym_mask.
4736 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
4737 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
4738 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
4739 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
4740 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
4741 swap_syn_out functions. Rearrange dyn swap in/out switch.
4742 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
4743 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
4744 (elf_link_flush_output_syms): Add elf_backend_data arg.
4745 (elf_link_check_versioned_symbol): Likewise.
4746 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
4747 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
4748 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
4749 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
4750 ELF_R_TYPE and ELF_R_INFO macros.
4751 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
4752 based on size rather than using ELF_R_INFO.
4753 (elf_gc_mark): Set up r_sym_shift local var and use instead of
4755 (struct alloc_got_off_arg): New.
4756 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
4757 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
4758 (elf_gc_allocate_got_offsets): Adjust.
4759 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
4760 ELF_R_SYM. Use bfd_section_from_elf_index.
4761 (elf_bfd_discard_info): Set cookie.r_sym_shift.
4762 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
4763 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
4765 2004-03-26 Stan Shebs <shebs@apple.com>
4767 Remove MPW support, no longer used.
4768 * config.bfd (powerpc-*-mpw*): Remove configuration.
4769 * mpw-config.in, mpw-make.sed: Remove files.
4770 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
4772 2004-03-26 Alan Modra <amodra@bigpond.net.au>
4774 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
4775 (ppc64_elf_add_symbol_hook): New function.
4776 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
4777 const from Elf_Internal_Sym param.
4778 * elflink.c (elf_link_add_object_symbols): Adjust.
4779 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
4780 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
4781 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
4782 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
4783 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
4784 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
4785 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
4786 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
4787 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
4788 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
4789 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
4790 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
4791 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
4792 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
4793 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
4794 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
4796 2004-03-26 Alan Modra <amodra@bigpond.net.au>
4798 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
4799 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
4800 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
4801 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
4802 (bfd_elf64_bfd_link_add_symbols): Delete.
4803 (bfd_elf_link_add_symbols): Declare.
4804 * elfcode.h (elf_bfd_link_add_symbols): Delete.
4805 * elflink.c: Include safe-ctype.h.
4806 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
4808 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
4809 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
4811 (elf_link_add_archive_symbols): Rename from
4812 _bfd_elf_link_add_archive_symbols, make static.
4813 (elf_link_add_object_symbols): New function. Corresponding
4814 elflink.h function converted to use elf_size_info.
4815 (bfd_elf_link_add_symbols): Likewise.
4816 (bfd_elf_size_dynamic_sections): Adjust.
4817 * elflink.h (elf_bfd_link_add_symbols): Delete.
4818 (elf_link_add_object_symbols): Delete.
4819 * elf32-gen.c (elf32_generic_link_add_symbols): Call
4820 bfd_elf_link_add_symbols.
4821 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
4823 2004-03-25 Alan Modra <amodra@bigpond.net.au>
4825 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
4826 and chained shared libs only if dynsym. Clear dynsym on forced-local.
4828 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
4829 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
4830 (_bfd_elf_add_dt_needed_tag): Declare.
4831 (_bfd_elf_sort_symbol): Declare.
4832 (_bfd_elf_finalize_dynstr): Declare.
4833 (RELOC_FOR_GLOBAL_SYM): Formatting.
4834 * elfcode.h (elf_add_dynamic_entry): Delete.
4835 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
4836 elflink.h function converted to use elf_size_info.
4837 (_bfd_elf_add_dt_needed_tag): Likewise.
4838 (_bfd_elf_sort_symbol): Likewise.
4839 (_bfd_elf_finalize_dynstr): Likewise.
4840 (compute_bucket_count): Likewise.
4841 (bfd_elf_size_dynamic_sections): Likewise. Check result of
4842 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
4843 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
4844 * elflink.h: ..here.
4845 (sort_symbol, add_dt_needed_tag): Delete.
4846 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
4847 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
4849 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
4850 * elf32-cris.c (add_dynamic_entry): Likewise.
4851 * elf32-hppa.c (add_dynamic_entry): Likewise.
4852 * elf32-i370.c (add_dynamic_entry): Likewise.
4853 * elf32-i386.c (add_dynamic_entry): Likewise.
4854 * elf32-m32r.c (add_dynamic_entry): Likewise.
4855 * elf32-m68k.c (add_dynamic_entry): Likewise.
4856 * elf32-ppc.c (add_dynamic_entry): Likewise.
4857 * elf32-s390.c (add_dynamic_entry): Likewise.
4858 * elf32-sh.c (add_dynamic_entry): Likewise.
4859 * elf32-sparc.c (add_dynamic_entry): Likewise.
4860 * elf32-vax.c (add_dynamic_entry): Likewise.
4861 * elf32-xtensa.c (add_dynamic_entry): Likewise.
4862 * elf64-alpha.c (add_dynamic_entry): Likewise.
4863 * elf64-hppa.c (add_dynamic_entry): Likewise.
4864 * elf64-ppc.c (add_dynamic_entry): Likewise.
4865 * elf64-s390.c (add_dynamic_entry): Likewise.
4866 * elf64-sparc.c (add_dynamic_entry): Likewise.
4867 * elf64-x86-64.c (add_dynamic_entry): Likewise.
4868 * elfxx-ia64.c (add_dynamic_entry): Likewise.
4869 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
4870 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
4871 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
4872 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
4874 2004-03-23 Paul Brook <paul@codesourcery.com>
4876 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
4878 2004-03-22 Bob Wilson <bob.wilson@acm.org>
4880 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
4881 literal tables and check for relocs outside of literal pools.
4882 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
4883 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
4885 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
4886 (elf_xtensa_relocate_section): Read literal tables and check for
4887 dynamic relocations in read-only sections and not in literal pools.
4889 2004-03-23 Alan Modra <amodra@bigpond.net.au>
4892 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
4894 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
4896 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4897 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
4898 not defined by the executable, or defined in a DSO.
4899 <eliding run-time relocation of .got>: Initialize GOT entry for a
4900 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
4902 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
4903 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
4904 a PLT reloc to GOT for an executable.
4905 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
4906 .got for a DSO and explain why.
4907 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
4908 and unreferenced symbols for which a PLT is defined. Adjust
4909 dynamic-symbol pruning correspondingly, to make sure we don't lose
4910 a dynamic symbol also defined by a DSO.
4912 2004-03-22 Alan Modra <amodra@bigpond.net.au>
4914 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
4915 and rel args. Group input and output args. Wrap to 80 columns.
4916 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
4917 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
4918 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
4919 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
4920 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
4921 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
4922 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
4923 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
4924 RELOC_FOR_GLOBAL_SYMBOL invocation.
4926 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
4928 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
4929 unresolved symbols in objects aren't allowed.
4931 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
4933 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4934 (elf_hppa_unmark_useless_dynamic_symbols):
4935 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4936 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
4937 (elf32_hppa_relocate_section): Likewise.
4938 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4939 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4940 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4941 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4942 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4944 * elf-m10200.c (mn10200_elf_relocate_section): Use
4945 RELOC_FOR_GLOBAL_SYMBOL.
4946 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4947 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4948 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4949 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4950 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4951 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
4952 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4953 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4954 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4955 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4956 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4957 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4959 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4961 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
4962 (final_link_relocate): Likewise.
4963 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
4964 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
4966 2004-03-19 Alan Modra <amodra@bigpond.net.au>
4968 * Makefile.am: Run "make dep-am".
4969 * Makefile.in: Regenerate.
4970 * aclocal.m4: Regenerate.
4971 * config.in: Regenerate.
4972 * po/bfd.pot: Regenerate.
4974 2004-03-19 Alan Modra <amodra@bigpond.net.au>
4975 H.J. Lu <hongjiu.lu@intel.com>
4977 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
4978 type and size change code to where it was previously. Remove
4979 dt_needed param. Treat old weak syms as strong if new sym is
4980 from a shared lib, even when old sym is from another shared
4981 lib. Remove unnecessary tests of oldweak and newweak. Correct
4983 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
4984 _bfd_elf_merge_symbol calls.
4985 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
4986 dt_needed local var. Update comments.
4987 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
4988 (_bfd_elf_add_default_symbol): Likewise.
4990 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
4991 strong syms in one shared object overriding weak syms in another.
4993 2004-03-18 Alan Modra <amodra@bigpond.net.au>
4995 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
4996 dyn_lib_class field. Rearrange for better packing.
4997 (elf_dt_soname): Delete.
4998 (elf_dyn_lib_class): Define.
4999 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
5000 (bfd_elf_set_dt_needed_soname): Delete.
5001 (bfd_elf_set_dyn_lib_class): New function.
5002 * elflink.h (add_dt_needed_tag): New function. Split out from..
5003 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
5004 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
5005 initialization of soname.
5006 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
5008 * bfd-in.h (enum dynamic_lib_link_class): New.
5009 (bfd_elf_set_dt_needed_soname): Delete.
5010 (bfd_elf_set_dyn_lib_class): Declare.
5011 * bfd-in2.h: Regenerate.
5013 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
5014 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
5015 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
5016 symbol loop. Instead use add_needed to flag tag as written.
5018 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
5020 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
5021 logic for null_input_bfd detection.
5023 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5025 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
5027 2004-03-16 Mark Kettenis <kettenis@gnu.org>
5029 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
5032 2004-03-16 Alan Modra <amodra@bigpond.net.au>
5034 * elflink.c (elf_link_read_relocs_from_section): Don't use
5035 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
5036 (_bfd_elf_link_read_relocs): ..to here.
5037 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
5039 2004-03-16 Alan Modra <amodra@bigpond.net.au>
5041 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
5042 values selected in configure.host. Require both to be defined
5043 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
5044 corresponding BFD_HOST vars with quotes.
5045 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
5046 Always require BFD_HOST_64_BIT_DEFINED.
5047 <file_ptr type>: Find off_t size before emitting message. Combine
5048 off_t and ftello64 conditional.
5049 * configure: Regenerate.
5051 2004-03-16 Alan Modra <amodra@bigpond.net.au>
5053 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
5054 aliasing warning. Remove trailing whitespace throughout file.
5056 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5058 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
5059 input_section in calls to get_dyn_name.
5060 * 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
5062 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
5064 2004-03-15 Alan Modra <amodra@bigpond.net.au>
5066 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
5067 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
5068 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
5069 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
5070 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
5071 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
5072 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
5074 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
5075 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
5076 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
5077 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
5078 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
5079 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
5080 (read_8_bytes, read_indirect_string, read_address): Likewise.
5081 (read_abbrevs, parse_comp_unit): Likewise.
5082 * targets.c (struct bfd_target): Likewise.
5083 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
5084 * hppabsd-core.c: Likewise. Formatting.
5085 * hpux-core.c: Likewise.
5086 * irix-core.c: Likewise.
5087 * netbsd-core.c: Likewise.
5088 * osf-core.c: Likewise.
5089 * ptrace-core.c: Likewise.
5090 * sco5-core.c: Likewise.
5091 * trad-core.c: Likewise.
5092 * configure: Regenerate.
5093 * bfd-in2.h: Regenerate.
5095 2004-03-15 Alan Modra <amodra@bigpond.net.au>
5097 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
5098 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
5099 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
5100 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
5101 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
5102 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
5103 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
5104 * libbfd.c: Likewise in function definitions.
5105 (bfd_put_8): Mask with 0xff rather than casting to char.
5106 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
5107 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
5108 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
5109 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
5110 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
5111 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
5112 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
5113 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
5114 (H_GET_64, H_GET_32, H_GET_16): Likewise.
5115 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
5116 * archive.c (do_slurp_coff_armap): Update swap prototype.
5117 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
5118 (tic54x_getl_signed_32): Likewise.
5119 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
5120 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
5121 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
5122 (bfd_getp_signed_32, bfd_putp32): Likewise.
5123 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
5124 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
5125 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
5126 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
5127 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
5128 bfd_h_getx_signed_16, bfd_h_putx16.
5129 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
5130 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
5131 * hpux-core.c: Likewise.
5132 * irix-core.c: Likewise.
5133 * netbsd-core.c: Likewise.
5134 * osf-core.c: Likewise.
5135 * ptrace-core.c: Likewise.
5136 * sco5-core.c: Likewise.
5137 * trad-core.c: Likewise.
5138 * bfd-in2.h: Regenerate.
5140 2004-03-15 Matt Thomas <matt@3am-software.com>
5142 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
5145 2004-03-13 Mark Kettenis <kettenis@gnu.org>
5147 * config.bfd: Add x86_64-*-openbsd*.
5148 * configure.in (x86_64-*-openbsd*): Set COREFILE to
5150 * configure: Regenerate.
5152 2004-03-12 Nick Clifton <nickc@redhat.com>
5153 Dave Murphy <wintermute2k4@ntlworld.com>
5155 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
5156 if the input bfd does not contain any code.
5158 2004-03-09 Steve Ellcey <sje@cup.hp.com>
5160 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
5162 2004-03-05 Fred Fish <fnf@redhat.com>
5164 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
5165 mips16 symbols to be even rather than testing first for even/odd.
5166 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
5168 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
5170 * elf.c (map_sections_to_segments): Ignore .tbss sections for
5173 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
5175 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
5176 undefined symbols as hash_new.
5178 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
5180 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
5182 * elf32-sh.c: Ditto.
5183 * bfd-in2.h: Regenerate.
5185 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
5187 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
5189 (_frv_count_got_plt_entries): Initialize them.
5190 (frv_pic_relocs_info_find): Add insert argument. Adjust all
5192 (frv_pic_relocs_info_for_global): Likewise.
5193 (frv_pic_relocs_info_for_local): Likewise.
5194 (frv_pic_merge_early_relocs_info): New.
5195 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
5197 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
5198 Check that we don't exceed the allocated count for entry.
5199 (_frv_add_rofixup): Likewise.
5200 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
5201 (elf32_frv_finish_dynamic_sections): Improve error message in case
5202 we emit too few rofixup entries.
5204 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
5206 * archures.c (bfd_mach_fr450): New.
5207 * bfd-in2.h: Regenerate.
5208 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
5209 (arch_info_500): Link to it.
5210 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
5211 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
5212 (frv_elf_arch_extension_p): New function.
5213 (frv_elf_merge_private_bfd_data): Use it.
5215 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
5217 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
5219 * elflink.h (is_global_data_symbol_definition): Moved to
5221 (elf_link_is_defined_archive_symbol): Likewise.
5222 (elf_link_add_archive_symbols): Likewise. Renamed to
5223 _bfd_elf_link_add_archive_symbols.
5225 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
5226 of ELF symbol table entry from backend.
5227 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
5228 instead of elf_link_add_object_symbols.
5230 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
5232 * elf-bfd.h (struct elf_backend_data): Added
5233 elf_backend_can_make_relative_eh_frame,
5234 elf_backend_can_make_lsda_relative_eh_frame and
5235 elf_backend_encode_eh_address.
5236 (_bfd_elf_encode_eh_address): Declare.
5237 (_bfd_elf_can_make_relative): Declare.
5238 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
5239 hooks to decide whether to attempt to make_relative and
5241 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
5242 (_bfd_elf_can_make_relative): New.
5243 (_bfd_elf_encode_eh_address): New.
5244 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
5245 (frv_elf_encode_eh_address): New.
5246 (elf_backend_can_make_relative_eh_frame): Define.
5247 (elf_backend_can_make_lsda_relative_eh_frame): Define.
5248 (elf_backend_encode_eh_address): Define.
5250 (elf_backend_can_make_relative_eh_frame): Define.
5251 (elf_backend_can_make_lsda_relative_eh_frame): Define.
5252 (elf_backend_encode_eh_address): Define.
5253 (elfNN_bed): Add them.
5255 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
5257 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
5258 complain_on_overflow to signed.
5260 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
5262 * elflink.h (sort_symbol): New.
5263 (elf_link_add_object_symbols): Use a sorted symbol array for
5266 2004-02-27 Jakub Jelinek <jakub@redhat.com>
5268 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
5269 for pc relative relocs.
5270 (elf_s390_relocate_section): Likewise.
5271 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
5272 for pc relative relocs.
5273 (elf_s390_relocate_section): Likewise.
5275 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
5277 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
5280 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
5282 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
5283 field to track if a relocation is against readonly section.
5284 (count_dyn_reloc): Take a new argument for rent->reltext.
5285 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
5286 (get_reloc_section): Don't set ia64_info->reltext here.
5287 (allocate_dynrel_entries): Set ia64_info->reltext here.
5289 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
5291 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
5292 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
5293 function's descriptor to symbol+offset, and map local undefweak
5294 symbol to NULL function descriptor.
5295 (elf32_frv_relocate_section): Likewise.
5297 2004-02-23 Mark Kettenis <kettenis@gnu.org>
5299 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
5301 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
5302 (netbsd_core_file_p): Set architecture from machine ID for
5305 2004-02-23 Jakub Jelinek <jakub@redhat.com>
5307 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
5308 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
5310 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
5312 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
5313 symbols with non-default visibility.
5315 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
5317 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
5318 IMAGE_SCN_MEM_WRITE on known sections only.
5320 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5322 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
5323 symbols used in PIE relocs.
5325 2004-02-19 Jakub Jelinek <jakub@redhat.com>
5327 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
5330 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
5332 * configure.in: Update version to 2.15.90.
5333 * configure: Regenerate.
5335 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
5336 Richard Sandiford <rsandifo@redhat.com>
5338 * elfxx-mips.c (mips_elf_calculate_relocation): Use
5339 _bfd_elf_symbol_refs_local_p to decide whether to decay
5340 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
5341 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
5342 relocs if the symbol wasn't defined by a regular object file.
5343 Don't check the symbol's dynindx.
5345 2004-02-16 Andrew Cagney <cagney@redhat.com>
5347 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
5349 * bfd-in2.h: Re-generate.
5351 2004-02-14 Andrew Cagney <cagney@redhat.com>
5353 * configure.host (HDEFINES): When hppa*-*-hpux*, define
5354 _LARGEFILE64_SOURCE.
5356 2004-02-13 Andrew Cagney <cagney@redhat.com>
5358 * elf.c (vma_page_aligned_bias): New function.
5359 (assign_file_positions_except_relocs)
5360 (assign_file_positions_for_segments): Replace broken modulo
5361 arithmetic with call to vma_page_aligned_bias.
5363 2004-02-11 Andrew Cagney <cagney@redhat.com>
5365 * bfd-in.h: Update copyright.
5366 (bfd_tell): Change return type to file_ptr.
5367 * bfd-in2.h: Re-generate.
5368 * cache.c: Update copyright.
5369 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
5371 (close_one): Use real_ftell.
5372 * bfdio.c: Update copyright.
5373 (real_ftell, real_fseek): New functions.
5374 (bfd_tell): Use real_fseek and real_ftell, change return type to
5376 (bfd_seek): Use real_ftell and real_fseek, change type of
5377 file_position to a file_ptr.
5378 * libbfd-in.h: Update copyright.
5379 (real_ftell, real_fseek): Declare.
5380 * libbfd.h: Re-generate.
5382 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
5383 fseeko and fseeko64. Determine bfd_file_ptr.
5384 * configure: Re-generate.
5385 * config.in: Re-generate.
5387 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
5389 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
5390 * elf32-h8300.c: Likewise.
5392 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
5393 Nick Clifton <nickc@redhat.com>
5395 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
5396 GOT entries with no associated GOT subsection.
5398 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
5400 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
5401 * elf.c (swap_out_syms): Use it to decide whether local section
5402 symbols should be named.
5403 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
5404 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
5405 (elf_backend_name_local_section_symbols): Define.
5406 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
5408 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
5410 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
5411 (elfNN_ia64_relax_section): Optimize brl to br during the relax
5414 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
5416 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
5417 to bfd_link_hash_entry passed by reference to
5418 _bfd_generic_link_add_one_symbol.
5420 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
5422 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
5423 relocations against dynamic symbols.
5425 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
5427 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
5430 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
5432 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
5433 * bfd-in2.h, libbfd.h: Rebuilt.
5435 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
5437 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
5438 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
5439 flag has been cleared.
5441 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
5443 * coff-h8300.c: Add and adjust comments about relaxation.
5444 * elf32-h8300.c: Likewise.
5446 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
5448 * coff-h8300.c: Fix comment typos.
5449 * elf32-h8300.c: Likewise.
5451 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
5453 * coff-h8300.c: Add comments about relaxation.
5454 * elf32-h8300.c: Likewise.
5456 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5458 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
5460 * aclocal.m4: Regenerate.
5461 * configure: Regenerate.
5463 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
5465 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
5466 mips_elf64_rtype_to_howto instead of using howto_table.
5468 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
5470 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
5472 (elf32_arm_check_relocs): Don't increment the PLT refcount for
5473 relocs which would not use the PLT.
5475 2004-01-13 Alan Modra <amodra@bigpond.net.au>
5477 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
5478 (ppc64_elf_gc_sweep_hook): Likewise.
5479 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
5481 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
5483 Adds linker relaxation support for bit manipulation insns like
5484 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
5486 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
5487 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
5488 * coff-h8300.c: Opcode for bit manipulation insn is checked in
5489 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
5491 2004-01-12 Alan Modra <amodra@bigpond.net.au>
5493 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
5495 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
5497 * elf32-h8300.c: Fix formatting.
5499 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
5501 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
5502 dynamic object is present. Declare r_symndx and h in an inner
5504 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
5506 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
5508 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
5509 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
5510 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
5511 identically. Do not emit PC24 relocations for shared libraries.
5512 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
5513 identically. Don't adjust pc_count.
5514 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
5515 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
5516 adjust count for branch relocations.
5517 (allocate_dynrelocs): Correct typo in call to
5518 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
5519 PC24 or PLT32 relocs when linking.
5521 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
5523 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
5524 relocation howto with ARM_26 one for consistency.
5525 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
5526 that will be converted to ARM_26D ones, since we always want 'done'
5527 relocations to be reflected in section's data.
5528 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
5530 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
5533 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
5535 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
5536 are not partial_inplace during a relocatable link.
5538 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
5540 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
5541 if no dynamic object is present. Declare r_symndx and h in an
5544 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
5546 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
5547 trampoline if it is known out of range.
5549 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
5551 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
5552 * elf32-frv.c (_frv_osec_readonly_p): New.
5553 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
5555 (_frv_count_got_plt_entries): Adjust expected count accordingly.
5556 (elf32_frv_relocate_section): Likewise. Error out if attempting
5557 to emit rofixups or dynamic relocs in read-only segments. Use
5558 _bfd_elf_section_offset to adjust r_offsets in rofixups and
5559 dynamic relocations.
5560 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
5561 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
5562 relocations or fixups involving merged sections correctly. Avoid
5563 crash when undefined symbol is referenced by R_FRV_32 or
5564 R_FRV_FUNCDESC_VALUE.
5565 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
5566 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
5567 input section holding local symbol to addend of R_FRV_32 or
5568 R_FRV_FUNCDESC_VALUE dynamic relocation.
5569 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
5570 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
5571 (elf32_frv_always_size_sections): Don't store pointer to
5572 __stacksize symbol in sec_info.
5573 (elf32_frv_modify_segment_map): Look it up here.
5574 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
5575 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
5576 of the lazy PLT entry, not only its offset, as the low word of a
5577 function descriptor.
5578 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
5579 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
5580 if a hash table entry already exists but is not a definition.
5581 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
5582 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
5583 (_frv_add_rofixup): Don't inline.
5584 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
5585 for undefweak symbols.
5586 (elf32_frv_relocate_section): Avoid crash while computing
5587 relocation when linking with shared library. Only emit rofixups
5588 and dynamic relocations for alloc&load sections. Mark binaries
5589 with inter-segment relocations for relocation as a unit.
5590 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
5591 (DEFAULT_STACK_SIZE): New.
5592 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
5593 emit rofixups or dynamic relocs when linking dynamic non-PIE
5595 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
5596 shared libs too. Reserve the last entry for the GOT pointer.
5597 (elf32_frv_finish_dynamic_sections): Emit it.
5598 (elf32_frv_always_size_sections): New.
5599 (elf32_frv_modify_segment_map): New.
5600 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
5602 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
5603 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
5604 (elf_backend_always_size_sections): New.
5605 (elf_backend_modify_segment_map): New.
5606 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
5607 * config.bfd: Added frv-*-*linux*.
5608 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
5609 ABS section, instead of crashing.
5610 (elf32_frv_relocate_section): Don't crash before warning about
5611 different segments in non-PIC relocation.
5612 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
5613 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
5614 relocs to undefweak symbols.
5615 (elf32_frv_relocate_section): Ditto for undefined symbols.
5616 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
5617 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
5618 gotfixup section was created.
5619 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
5620 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
5621 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
5622 complain_overflow_signed.
5623 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
5624 have not been allocated.
5625 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
5626 privfd only if dynamic sections were created.
5627 (elf32_frv_relocate_section): Compute gprel_segment, and use it
5628 for GPREL relocs. When linking relocatable FDPIC executables,
5629 emit warnings for relocations that would be illegal on PIE or
5630 shared libraries. Emit rofixup for R_FRV_32 only if input object
5632 (_frv_create_got_section): Define _gp symbol in the rofixup
5634 (elf32_frv_finish_dynamic_sections): If rofixups needed but
5635 dynamic sections missing, error out requesting -melf32frvfd.
5636 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
5637 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
5638 computation of addends from section and global or local symbol
5639 value. Change return type to bfd_boolean, and return a failure if
5640 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
5641 nonzero addend is required.
5642 (elf32_frv_relocate_section): Likewise. Print error for
5643 unsupported nonzero addends.
5644 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
5645 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
5646 force everything local.
5647 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
5648 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
5649 (frv_gotfixup_section): New.
5650 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
5651 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
5653 (_frv_add_rofixup): New.
5654 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
5655 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
5656 improve some ugly conditions.
5657 (elf32_frv_relocate_section): Likewise. Reject inter-segment
5658 relocations in fdpic.
5659 (_frv_create_got_section): Create .rofixup.got section.
5660 (struct _frv_dynamic_got_info): Added fixups.
5661 (_frv_count_got_plt_entries): Account in-GOT relocations into
5662 relocs32, relocsfd and relocsfdv. Account them into relocs or
5663 fixups, as appropriate.
5664 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
5666 (elf32_frv_finish_dynamic_sections): Verify that the right number
5667 of relocations and fixups was generated.
5668 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
5670 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
5671 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
5672 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
5673 descriptor of a (formerly-)global symbol is local.
5674 (struct frv_pic_relocs_info): Adjust comments.
5675 (_frv_emit_got_relocs_plt_entries): Adjust.
5676 (elf32_frv_relocate_section): Likewise.
5677 (_frv_count_got_plt_entries): Likewise.
5678 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
5679 symbol's value to addend in the common preamble. Decay dynamic
5680 symbols to section+offset if they bind or call locally, for GOT
5681 and FUNCDESC_VALUE, respectively.
5682 (elf32_frv_relocate_section): Likewise.
5683 (elf32_frv_check_relocs): Don't register as dynamic symbols of
5684 internal or hidden visibility.
5685 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
5686 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
5687 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
5688 (elf32_frv_relocate_section): Pass relocation addend in. Use
5689 original relocation addend to look up the got relocs/plt entries
5690 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
5691 processing relocations that reference .scommon symbols.
5692 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
5693 Introduce support for dynamic linking.
5694 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
5695 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
5696 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
5697 (frv_reloc_type_lookup): Return REL howtos for executables and
5699 (frv_info_to_howto_rel): New.
5700 (struct frv_elf_link_hash_table): New.
5701 (frv_hash_table, frv_got_section, frv_gotrel_section,
5702 frv_plt_section, frv_pltrel_section, frv_relocs_info,
5703 frv_got_initial_offset, frv_plt_initial_offset): New macros.
5704 (frv_elf_link_hash_table_create): New.
5705 (struct frv_pic_relocs_info): New.
5706 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
5707 (frv_pic_relocs_info_find): New.
5708 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
5710 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
5711 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
5712 (_frv_emit_got_relocs_plt_entries): New.
5713 (elf32_frv_relocate_section): Add support for dynamic linking.
5714 Handle new relocations.
5715 (_frv_create_got_section): New.
5716 (elf32_frv_create_dynamic_sections): New.
5717 (ELF_DYNAMIC_INTERPRETER): New.
5718 (struct _frv_dynamic_got_info): New.
5719 (_frv_count_got_plt_entries): New.
5720 (struct _frv_dynamic_got_plt_info): New.
5721 (_frv_compute_got_alloc_data): New.
5722 (_frv_get_got_entry, _frv_get_fd_entry): New.
5723 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
5724 (_frv_resolve_final_relocs_info): New.
5725 (elf32_frv_size_dynamic_sections): New.
5726 (elf32_frv_finish_dynamic_sections): New.
5727 (elf32_frv_adjust_dynamic_symbol): New.
5728 (elf32_frv_finish_dynamic_symbol): New.
5729 (elf32_frv_check_relocs): Handle new relocs. Explain how the
5731 (elf_info_to_howto_rel): Define.
5732 (bfd_elf32_bfd_link_hash_table_create): Define.
5733 (elf_backend_create_dynamic_sections): Define.
5734 (elf_backend_adjust_dynamic_symbol): Define.
5735 (elf_backend_size_dynamic_sections): Define.
5736 (elf_backend_finish_dynamic_symbol): Define.
5737 (elf_backend_finish_dynamic_sections): Define.
5738 (elf_backend_want_got_sym): Define.
5739 (elf_backend_got_header_size): Define.
5740 (elf_backend_want_got_plt): Define.
5741 (elf_backend_plt_readonly): Define.
5742 (elf_backend_want_plt_sym): Define.
5743 (elf_backend_plt_header_size): Define.
5744 (elf_backend_may_use_rel_p): Define.
5745 (elf_backend_may_use_rela_p): Define.
5746 (elf_backend_default_use_rela_p): Define.
5747 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
5748 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
5749 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
5750 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
5751 (frv_reloc_map): Map the corresponding BFD relocs to them.
5752 (frv_reloc_type_lookup): ... and back to BFD relocs.
5753 * reloc.c: New relocs.
5754 * bfd-in2.h, libbfd.h: Rebuilt.
5755 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
5756 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
5757 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
5758 R_FRV_FUNCDESC_GOTLO): New.
5759 (frv_reloc_map): Map the corresponding BFD relocs to them.
5760 (frv_reloc_type_lookup): ... and back to BFD relocs.
5761 * reloc.c: New relocs.
5762 * bfd-in2.h, libbfd.h: Rebuilt.
5764 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5766 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
5767 targets to support pages of up to 64kB.
5768 (elf32_bed): Redefine to get a separate backend data structure for
5769 traditional targets.
5770 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
5771 targets to support pages of up to 64kB.
5772 (elf64_bed): Redefine to get a separate backend data structure for
5773 traditional targets.
5774 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
5775 targets to support pages of up to 64kB.
5776 (elf32_bed): Redefine to get a separate backend data structure for
5777 traditional targets.
5779 2004-01-04 Mark Kettenis <kettenis@gnu.org>
5781 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
5783 2004-01-02 Mark Kettenis <kettenis@gnu.org>
5785 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
5786 (elf_i386_grok_psinfo): Likewise.
5788 2004-01-02 Bernardo Innocenti <bernie@develer.com>
5790 * config.bfd: Add m68k-uClinux target.
5792 2004-01-01 Grant Edwards <grante@visi.com>
5794 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
5795 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
5796 (elf32_h8_gc_sweep_hook): New function.
5797 (elf_backend_gc_mark_hook): Define.
5798 (elf_backend_gc_sweep_hook): Define.
5799 (elf_backend_can_gc_sections): Define.
5801 For older changes see ChangeLog-0203
5807 version-control: never