1 2005-12-19 David Heine <dlheine@tensilica.com>
3 * elf32-xtensa.c (action_list_count, xlate_map_entry, xlate_map,
4 xlate_offset_with_removed_text, build_xlate_map, free_xlate_map): New.
5 (check_section_ebb_pcrels_fit): Build new xlate_map, use it and free it
8 2005-12-16 Nathan Sidwell <nathan@codesourcery.com>
10 Second part of ms1 to mt renaming.
11 * archures.c (bfd_arch_mt): Renamed.
12 (bfd_mt_arch): Renamed.
13 (bfd_archures_list): Adjusted.
15 * config.bfd (mt): Remove special case targ_archs.
16 (mt-*-elf): Rename bfd_elf32_mt_vec.
18 * configure.in (bfd_elf32_mt_vec): Renamed.
19 (selarchs) Remove mt special case.
20 * cpu-mt.c (arch_info_struct): Adjust.
21 (bfd_mt_arch): Renamed, adjust.
22 * elf32-mt.c (mt_reloc_type_lookup, mt_info_to_howto_rela,
23 mt_elf_relocate_hi16, mt_final_link_relocate, mt_relocate_section,
24 mt_elf_howto_table): Renamed, adjusted.
25 (mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook, mt_elf_check_relocs,
26 elf32_mt_machine, mt_elf_object_p, mt_elf_set_private_flags,
27 mt_elf_copy_private_bfd_data, mt_elf_merge_private_bfd_data,
28 mt_elf_print_private_bfd_data): Renamed, adjusted.
29 (TARGET_BIG_SYM, TARGET_BIG_NAME, ELF_ARCH, ELF_MACHINE_CODE,
30 ELF_MAXPAGESIZE, elf_info_to_howto, elf_backend_relocate_section,
31 bfd_elf32_bfd_reloc_type_lookup, elf_backend_gc_mark_hook,
32 elf_backend_gc_sweep_hook, elf_backend_check_relocs,
33 eld_backend_object_p, bfd_elf32_bfd_set_private_flags,
34 bfd_elf32_bfd_copy_private_bfd_data,
35 bfd_elf32_bfd_merge_private_bfd_data,
36 bfd_elf32_bfd_print_private_bfd_data): Adjusted.
37 * libbfd.h: Regenerated.
38 * reloc.c (BFD_RELOC_MT_PC16, BFD_RELOC_MT_HI16,
39 BFD_RELOC_MT_LO16, BFD_RELOC_MT_GNU_VTINHERIT,
40 BFD_RELOC_MT_GNU_VTENTRY, BFD_RELOC_MT_PCINSN8): Renamed.
41 * targets.c (bfd_elf32_mt_vec): Renamed.
42 (_bfd_target_vector): Adjusted.
44 2005-12-13 H.J. Lu <hongjiu.lu@intel.com>
47 * elf.c (_bfd_elf_setup_sections): Return FALSE if
48 elf_linked_to_section will be set to NULL.
50 * format.c (bfd_check_format_matches): Don't check the default
53 2005-12-13 Alan Modra <amodra@bigpond.net.au>
55 * elf64-ppc.c (ppc64_elf_relocate_section): Force tail calls in
56 shared libs to resolve locally.
58 2005-12-12 Paul Brook <paul@codesourcery.com>
60 * bfd-in2.h: Regenerate.
61 * elf32-arm.c (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PCREL_CALL and
62 BFD_RELOC_ARM_PCREL_JUMP.
63 (check_use_blx): New function.
64 (bfd_elf32_arm_process_before_allocation): Don't allocate glue if
66 (elf32_arm_final_link_relocate): Perform bl<->blx conversion for
67 R_ARM_CALL and R_ARM_THM.
68 (elf32_arm_get_eabi_attr_int): New function.
69 (elf32_arm_size_dynamic_sections): Call check_use_blx.
70 * libbfd.h: Regenerate.
71 * reloc.c: Add BFD_RELOC_ARM_PCREL_CALL and BFD_RELOC_ARM_PCREL_JUMP.
73 2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
75 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES,
76 BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace ms1 with mt.
77 (cpu_mt.lo, elf32-mt.lo): Update target and dependency names.
78 * Makefile.in: Rebuilt.
79 * config.bfd: Replace ms1 arch with mt.
80 * configure.in: Replace ms1 files with mt files.
82 * elf32-mt.c: Renamed from elf32-ms1.c. Update include files.
83 * cpu-mt.c: Renamed from cpu-ms1.c.
85 2005-12-12 Alan Modra <amodra@bigpond.net.au>
87 * elf64-ppc.c (ppc64_elf_size_stubs): Don't consider non-ppc64 input.
89 2005-12-10 Alan Modra <amodra@bigpond.net.au>
91 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Use !info-executable
92 to test for linking shared libs, not info->shared.
94 2005-12-08 Alan Modra <amodra@bigpond.net.au>
96 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add emit_stub_syms.
97 (ppc_elf_select_plt_layout): Add emit_stub_syms param, save to htab.
98 (add_stub_sym): New function.
99 (allocate_dynrelocs): Call add_stub_sym.
100 (ppc_elf_size_dynamic_sections): Emit __glink and __glink_PLTresolve
102 * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
104 2005-12-08 Alan Modra <amodra@bigpond.net.au>
106 * reloc.c (enum complain_overflow): Correct comments.
107 (bfd_check_overflow): Combine complain_overflow_bitfield and
108 complain_overflow_signed code.
109 (_bfd_relocate_contents): Likewise.
110 (bfd_howto_32): Use complain_overflow_dont.
111 * elf32-d10v.c (elf_d10v_howto_table): Revert 2002-06-17 change.
112 * bfd-in2.h: Regenerate.
114 2005-12-07 H.J. Lu <hongjiu.lu@intel.com>
116 * elf.c (assign_section_numbers): Remove extra code in the last
119 2005-12-07 H.J. Lu <hongjiu.lu@intel.com>
120 Andreas Schwab <schwab@suse.de>
123 * elf.c (assign_section_numbers): Always use the output section
124 when setting up sh_link for SHF_LINK_ORDER.
126 2005-12-07 Thiemo Seufer <ths@networkno.de>
127 H.J. Lu <hongjiu.lu@intel.com>
130 * bfd-in.h (bfd_elf_record_link_assignment): Add output_bfd
131 and hidden arguments.
133 * bfd.c (bfd_hide_symbol): Removed.
135 * bfd-in2.h: Regenerated.
137 * elflink.c (bfd_elf_record_link_assignment): Handle hidden
138 symbols which were provided by a linker script.
140 2005-12-06 Paul Gilliam <pgilliam@us.ibm.com>
142 * cpu-powerpc.c (bfd_powerpc_archs): Add ppc 750.
144 2005-11-18 Mark Kettenis <kettenis@gnu.org>
146 * elf64-hppa.c (elf64_hppa_section_from_phdr): Create .kernel
147 pseudo-section. Make sure .reg section comes after the proc
148 section it's generated from.
150 2005-12-01 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
152 * elf32-m32r.c (m32r_elf_sweep_hook): Fix an illegal duplicate check.
153 (m32r_elf_relocate_section): Fix R_M32R_10_PCREL_RELA linkage bug.
154 (m32r_elf_gc_sweep_hook): Likewise.
155 (m32r_elf_check_relocs): Likewise.
157 2005-11-24 Alan Modra <amodra@bigpond.net.au>
159 * elf-bfd.h (_bfd_generic_match_sections_by_type): Don't define.
160 * libbfd-in.h (_bfd_generic_match_sections_by_type): Delete.
161 * libbfd.c (_bfd_generic_match_sections_by_type): Delete.
162 * targets.c (bfd_match_sections_by_type): Don't define.
163 (BFD_JUMP_TABLE_LINK): Remove _bfd_generic_match_sections_by_type.
164 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
165 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
166 * bfd-in2.h: Regenerate.
167 * libbfd.h: Regenerate.
169 2005-11-23 Daniel Jacobowitz <dan@codesourcery.com>
170 Thiemo Seufer <ths@networkno.de>
172 * elf32-mips.c (elf_mips_howto_table_rel): Use rightshift 2 for
174 (mips_reloc_map): Map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16.
175 (bfd_elf32_bfd_reloc_type_lookup): Don't handle
176 BFD_RELOC_16_PCREL_S2.
177 * elf64-mips.c (mips_elf64_howto_table_rel): Use rightshift 2 for
179 (mips_elf64_howto_table_rela): Likewise.
180 (mips_reloc_map): Map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16.
181 (bfd_elf64_bfd_reloc_type_lookup): Don't handle
182 BFD_RELOC_16_PCREL_S2.
183 * elfn32-mips.c (elf_mips_howto_table_rel): Use rightshift 2 for
185 (elf_mips_howto_table_rela): Likewise.
186 (mips_reloc_map): Map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16.
187 (bfd_elf32_bfd_reloc_type_lookup): Don't handle
188 BFD_RELOC_16_PCREL_S2.
189 * elfxx-mips.c: Formatting fixes.
190 (mips_elf_calculate_relocation): Handle R_MIPS_GNU_REL16_S2
191 and R_MIPS_PC16 identically.
193 2005-11-23 Frederic Riss <frederic.riss@st.com>
195 * elfcode.h (elf_object_p): Delay the setting of start_address
196 until we're sure the backend matches the binary.
198 2005-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
200 * som.c (som_decode_symclass): Decode BSF_WEAK symbols in the same
201 manner as bfd_decode_symclass.
203 2005-11-18 Alan Modra <amodra@bigpond.net.au>
205 * elf64-ppc.c (ppc64_elf_check_relocs): Don't set has_14bit_branch
206 on branches to same section.
208 2005-11-17 Randolph Chung <tausq@debian.org>
210 * elf64-hppa.c (elf64_hppa_object_p): Recognize corefiles under
212 (elf64_hppa_section_from_phdr): New function.
213 (elf_backend_section_from_phdr): Define.
215 2005-11-11 Nick Clifton <nickc@redhat.com>
218 * elfxx-mips.c (mips_elf_calculate_relocation): Ignore an
219 undefined symbol if it is optional.
220 (_bfd_mips_elf_merge_symbol_attribute): Make sure that the
221 optional flag is merged as well as the visibility.
222 * elfxx-mips.h (_bfd_mips_elf_merge_symbol_attribute): Prototype.
223 (elf_backend_merge_symbol_attribute): Define.
225 2005-11-08 Nathan Sidwell <nathan@codesourcery.com>
228 * archures.c (bfd_mach_ms2): Define.
229 * cpu-ms1.c (arch_info_struct): Add ms2 stanza.
230 * elf32-ms1.c (elf32_ms1_machine): Add ms2 case.
231 (ms1_elf_merge_private_bfd_data): Remove unused variables. Add
232 correct merging logic, with workaround.
233 (ms1_elf_print_private_bfd_data): Add ms2 case.
234 * reloc.c (BFD_RELOC_MS1_PCINSN8): Add ms2 specific reloc.
235 * libbfd.h: Regenerated.
236 * bfd-in2.h: Regenerated.
238 2005-11-07 Steve Ellcey <sje@cup.hp.com>
240 * warning.m4 (AM_BINUTILS_WARNINGS): Default to empty string
241 if compiler is not GCC.
242 * configure: Regenerate
244 2005-11-07 Steve Ellcey <sje@cup.hp.com>
246 * configure: Regenerate after modifying bfd/warning.m4.
248 2005-11-07 Steve Ellcey <sje@cup.hp.com>
250 * configure.host (ia64-*-hpux*): Set _LARGEFILE64_SOURCE.
252 2005-11-03 Daniel Jacobowitz <dan@codesourcery.com>
254 * configure.in: Check for fopen64.
255 * libbfd-in.h (real_fopen): New prototype.
256 * configure, config.in, libbfd.h: Regenerated.
257 * bfdio.c (real_fopen): New function.
258 * opncls.c (bfd_fopen, bfd_fill_in_gnu_debuglink_section): Use it.
259 * cache.c (bfd_open_file): Likewise.
261 2005-11-03 Thiemo Seufer <ths@networkno.de>
263 * elfxx-mips.c (mips_elf_calculate_relocation): Handle only
264 forced local symbols here.
265 (mips_elf_create_dynamic_relocation): Likewise.
266 (_bfd_mips_elf_finish_dynamic_symbol): Fix typo in comment.
268 2005-11-03 Alan Modra <amodra@bigpond.net.au>
270 * elf.c (elf_fake_sections): When calculating tbss size, just use
272 (assign_file_positions_for_segments): Likewise.
273 * elflink.c (bfd_elf_final_link): Likewise.
274 (elf_reloc_link_order): Correct comment.
276 2005-11-02 Alan Modra <amodra@bigpond.net.au>
279 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Add required
282 2005-10-29 H.J. Lu <hongjiu.lu@intel.com>
284 * Makefile.am: Run "make dep-am".
285 * Makefile.in: Regenerated.
287 * dep-in.sed: Replace " ./" with " ".
289 2005-10-29 H.J. Lu <hongjiu.lu@intel.com>
291 * hpux-core.c: Include <machine/reg.h> only if HPUX_CORE is
293 * osf-core.c: Include <sys/core.h> only if OSF_CORE is defined.
294 * sco5-core.c: Include <sys/paccess.h> and <sys/region.h> only
295 if SCO5_CORE is defined.
297 2005-10-29 Mark Kettenis <kettenis@gnu.org>
299 * Makefile.am: Run "make dep-am".
300 * Makefile.in: Regenerate.
302 2005-10-28 Joel Brobecker <brobecker@adacore.com>
304 From Eric Botcazou <botcazou@adacore.com>
305 * coffcode.h (coff_compute_section_file_positions): Fix small
306 error in preprocessor directives.
308 2005-10-28 Joel Brobecker <brobecker@adacore.com>
310 Mostly from Eric Botcazou <botcazou@adacore.com>
311 * rs6000-core.c: ANSIfy all function definitions.
312 Add missing function prototypes.
313 (ptr_to_uint): New type.
314 (rs6000coff_core_p): Use it as intermediate step in casts.
315 (rs6000coff_core_file_matches_executable_p): Likewise.
316 * xcoff-target.h (rs6000coff_core_p): Fix prototype.
317 (rs6000coff_core_file_matches_executable_p): Likewise.
319 2005-10-28 H.J. Lu <hongjiu.lu@intel.com>
322 * aoutx.h (NAME (aout, machine_type)): Handle
323 bfd_mach_sparc_v8plus, bfd_mach_sparc_v8plusa,
324 bfd_mach_sparc_v8plusb, bfd_mach_sparc_v9, bfd_mach_sparc_v9a
325 and bfd_mach_sparc_v9b.
327 2005-10-28 Hans-Peter Nilsson <hp@axis.com>
330 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_32>: Set
331 complain_on_overflow field to complain_overflow_dont.
333 2005-10-27 Alan Modra <amodra@bigpond.net.au>
336 * cache.c (enum cache_flag): New.
337 (close_one): Save file mtime.
338 (bfd_cache_lookup): Add flag arg, adjust all users.
339 (bfd_cache_lookup_worker): Likewise.
340 (cache_btell): Use CACHE_NO_OPEN and return abfd->where if file
342 (cache_bflush): Similarly, and return success of file not open.
343 (cache_bseek): Use CACHE_NO_SEEK if SEEK_SET or SEEK_END.
344 (cache_bstat): Use CACHE_NO_SEEK_ERROR.
346 * bfdwin.c (bfd_get_file_window): Seek into file in place of
347 using bfd_cache_lookup.
349 * cache.c (BFD_CACHE_MAX_OPEN): Make private to this file.
350 (bfd_last_cache, bfd_cache_lookup, bfd_cache_lookup_worker): Likewise.
351 * libbfd-in.h (bfd_cache_lookup_worker, bfd_last_cache): Delete.
352 * libbfd.h: Regenerate.
354 * hppabsd-core.c (hppabsd_core_core_file_p): Use bfd_stat, not fstat.
355 * sco5-core.c (sco5_core_file_p): Likewise.
356 * trad-core.c (trad_unix_core_file_p): Likewise.
358 * cache.c: Reorganize file to avoid forward reference.
360 2005-10-26 Alan Modra <amodra@bigpond.net.au>
362 * cache.c (bfd_cache_lookup_worker): Don't abort on failing to
364 (cache_btell, cache_bseek, cache_bflush, cache_bstat): Return -1 on
365 bfd_cache_lookup failure.
366 (cache_bread, cache_bwrite): Return 0 on the same.
367 * bfdwin.c (bfd_get_file_window): Likewise.
368 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
369 * sco5-core.c (sco5_core_file_p): Likewise.
370 * trad-core.c (trad_unix_core_file_p): Likewise.
372 2005-10-26 Alan Modra <amodra@bigpond.net.au>
374 * cache.c (bfd_cache_lookup_worker): Use bfd_error_handler
375 rather than bfd_perror. Print file name. Internationalise.
377 2005-10-26 Alan Modra <amodra@bigpond.net.au>
379 * cache.c (bfd_open_file): Set bfd_error_system_call on failure
381 (bfd_cache_lookup_worker): Remove check that file pos is in
382 unsigned long range. Print system error before aborting.
384 2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
386 * Makefile.am: Add rules for coff-z80 and cpu-z80.
387 * Makefile.in: Regenerated.
388 * archures.c: Add bfd_arch_z80 and support for it.
389 * coffcode.h(coff_set_arch_mach_hook): Add case Z80MAGIC.
390 (coff_set_flags): Add case bfd_arch_z80.
391 * config.bfd: Add z80coff_vec.
392 * configure.in: Add z80coff_vec.
393 * reloc.c: Add BFD_RELOC_Z80_DISP8
394 * targets.c: Add z80coff_vec.
395 * coff-z80.c: New file
396 * cpu-z80.c: New file
397 * configure: Regenerated.
398 * libbfd.h: Regenerated.
399 * bfd-in2.h: Regenerated.
401 2005-10-26 Alan Modra <amodra@bigpond.net.au>
404 * elf-bfd.h (elf_backend_copy_indirect_symbol): Replace pointer to
405 elf_backend_data with pointer to bfd_link_info.
406 (_bfd_elf_link_hash_copy_indirect): Likewise.
407 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Handle
408 direct and indirect symbols both having dynamic link info.
409 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Likewise.
410 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
411 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
412 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Likewise.
413 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
414 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
415 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
416 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
417 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
418 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
419 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
420 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
421 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
422 * elflink.c: Adjust all calls to bed->elf_backend_copy_indirect_symbol.
423 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Update prototype.
424 * elfxx-sparc.h (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
426 2005-10-25 Alan Modra <amodra@bigpond.net.au>
428 * po/SRC-POTFILES.in: Regenerate.
429 * po/bfd.pot: Regenerate.
431 2005-10-24 Jie Zhang <jie.zhang@analog.com>
433 * elf32-bfin.c (bfd_bfin_elf32_create_embedded_relocs): Fix signedness
436 2005-10-24 Bernd Schmidt <bernd.schmidt@analog.com>
438 * elf32-bfin.c (bfin_howto_table): Set src_mask to 0 for all relocs.
439 (bfin_imm16_reloc): Always add in the addend. Don't fetch existing
440 contents from section.
441 (bfin_relocate_section): Rework so as to not call special_functions.
442 Handle the relocation stack here. Treat pcrel24 relocs specially.
444 2005-10-24 Alan Modra <amodra@bigpond.net.au>
446 * elflink.c (elf_link_input_bfd): Don't use linker_mark and
447 SEC_EXCLUDE to test for sections dropped from output. Instead,
448 use bfd_section_removed_from_list on normal sections. Don't
449 attempt to handle symbols with unknown reserved section indices.
450 * linker.c (_bfd_generic_link_output_symbols): Don't use
451 linker_mark to test for symbols belonging to dropped sections.
452 Do allow absolute symbols.
454 2005-10-24 Alan Modra <amodra@bigpond.net.au>
456 * elf32-i370.c (i370_elf_fake_sections): Don't set SHF_EXCLUDE on
459 2005-10-24 Jan Beulich <jbeulich@novell.com>
461 * cpu-ia64-opc.c (elf64_ia64_operands): Move memory operand out of
462 set of indirect operands.
464 2005-10-24 Alan Modra <amodra@bigpond.net.au>
466 * elf32-ppc.c (ppc_elf_fake_sections): Don't set SHF_EXCLUDE on
469 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
471 * coff-rs6000.c (rs6000coff_vec): Initialize
472 _bfd_init_private_section_data with
473 _bfd_generic_init_private_section_data.
474 (pmac_xcoff_vec): Likewise.
475 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
476 (aix5coff64_vec): Likewise.
478 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
481 * elf-bfd.h (_bfd_generic_init_private_section_data): New.
482 (_bfd_elf_init_private_section_data): New.
484 * elf.c (elf_fake_sections): Don't set SHF_GROUP for
486 (bfd_elf_set_group_contents): Don't handle relocatable link
488 (assign_section_numbers): If it isn't called by assembler,
489 use the output section of elf_linked_to_section for
491 (_bfd_elf_init_private_section_data): New.
492 (_bfd_elf_copy_private_section_data): Call it.
494 * libbfd-in.h (_bfd_generic_init_private_section_data): New.
496 * libbfd.c (_bfd_generic_init_private_section_data): New.
498 * targets.c (BFD_JUMP_TABLE_COPY): Add
499 _bfd_generic_init_private_section_data.
500 (bfd_init_private_section_data): Likewise.
502 * bfd-in2.h: Regenerated.
503 * libbfd.h: Likewise.
505 2005-10-23 Alan Modra <amodra@bigpond.net.au>
507 * elf64-ppc.c (dec_dynrel_count): Don't report errors for local
508 syms in gc'd sections.
509 (ppc64_elf_edit_opd): Don't adjust reloc counts when NO_OPD_RELOCS.
510 (elf_backend_action_discarded): Define.
511 (ppc64_elf_action_discarded): New function.
513 2005-10-19 Paul Brook <paul@codesourcery.com>
515 * elf32-arm.c (find_arm_elf_section_entry): New function.
516 (get_arm_elf_section_data): Use it.
517 (unrecord_section_with_arm_elf_section_data): Use it.
519 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
521 * coff-rs6000.c (rs6000coff_vec): Initialize
522 _bfd_match_sections_by_type with
523 _bfd_generic_match_sections_by_type.
524 (pmac_xcoff_vec): Likewise.
525 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
526 (aix5coff64_vec): Likewise.
528 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
531 * elf-bfd.h (_bfd_elf_match_sections_by_type): New.
532 (_bfd_generic_match_sections_by_type): New. Defined.
534 * elf.c (_bfd_elf_match_sections_by_type): New.
536 * libbfd-in.h (_bfd_generic_match_sections_by_type): New.
538 * bfd-in2.h: Regenerated.
539 * libbfd.h: Likewise.
541 * libbfd.c (_bfd_generic_match_sections_by_type): New.
543 * targets.c (BFD_JUMP_TABLE_LINK): Initialize
544 _bfd_match_sections_by_type with
545 _bfd_generic_match_sections_by_type.
546 (bfd_target): Add _bfd_match_sections_by_type.
548 2005-10-08 Paul Brook <paul@codesourcery.com>
550 * elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
551 (NUM_KNOWN_ATTRIBUTES): Define.
552 (aeabi_attribute, aeabi_attribute_list): Define.
553 (elf32_arm_obj_tdata): Add known_eabi_attributes and
554 other_eabi_attributes.
555 (uleb128_size, is_default_attr, eabi_attr_size,
556 elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
557 elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
558 elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
559 elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
560 elf32_arm_merge_eabi_attributes): New functions.
561 (elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
562 (elf32_arm_fake_sections): Handle .ARM.attributes.
563 (elf32_arm_parse_attributes): New function.
564 (elf32_arm_section_from_shdr): Use it.
565 (bfd_elf32_bfd_final_link): Define.
567 2005-10-06 Daniel Jacobowitz <dan@codesourcery.com>
569 * elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from
571 (elf32_arm_size_dynamic_sections): Likewise.
572 * ecofflink.c (bfd_ecoff_debug_one_external): Likewise.
573 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
574 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
575 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
576 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
577 * elf32-s390.c (elf_s390_check_relocs): Likewise.
578 (elf_s390_size_dynamic_sections): Likewise.
579 * elf32-sh.c (sh_elf_check_relocs): Likewise.
580 * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count)
581 (ppc64_elf_size_dynamic_sections): Likewise.
582 * elf64-s390.c (elf_s390_check_relocs): Likewise.
583 (elf_s390_size_dynamic_sections): Likewise.
584 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
585 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
586 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
587 * ieee.c (ieee_slurp_section_data): Likewise.
588 * oasys.c (oasys_slurp_section_data): Likewise.
590 2005-10-04 Bob Wilson <bob.wilson@acm.org>
592 * archive.c: Add missing SUBSECTION for documentation.
595 * corefile.c: Likewise.
596 * format.c: Likewise.
598 * libbfd.c: Likewise.
599 * opncls.c: Likewise.
600 * elf.c: Remove blank line after SECTION heading.
601 * reloc.c: Change "howto manager" SECTION to a SUBSECTION.
603 2005-10-04 Nick Clifton <nickc@redhat.com>
605 * elf32-arm.c (get_arm_elf_section_data): Cache the last pointer
606 matched so that the typical case of scanning for the previous
607 section to last one can be handled quickly.
609 2005-10-03 David Heine <dlheine@tensilica.com>
611 * elf32-xtensa.c (relocations_reach): Skip range check for
614 2005-10-03 Alan Modra <amodra@bigpond.net.au>
616 * elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
619 2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
621 * Makefile.am: Run "make dep-am".
622 * Makefile.in: Regenerated.
623 * aclocal.m4: Likewise.
625 2005-09-30 Catherine Moore <clm@cm00re.com>
627 * Makefile.am: Bfin support.
628 * Makefile.in: Regenerated.
629 * aclocal.m4: Regenerated.
630 * archures.c (bfd_mach_bfin): New.
631 (bfd_arch_bfin): New.
632 bfd-in.h (bfd_bfin_elf32_create_embedded_relocs): New.
633 * bfd-in2.h: Regenerated.
634 * config.bfd: Bfin support.
635 * configure: Regenerated.
636 * configure.in: Bfin support.
637 * libbfd.h: Regenerated.
638 * reloc.c: Add BFD relocations for Bfin.
639 * targets.c (bfd_elf32_bfin_vec): New.
640 * cpu-bfin.c: New file.
641 * elf32-bfin.c: New file.
643 2005-09-30 Alan Modra <amodra@bigpond.net.au>
645 * elf64-ppc.c (ppc_type_of_stub): Check both func desc and func
646 entry sym before deciding no stub is needed.
647 (ppc64_elf_size_stubs): When calculating branch destination,
648 don't use func desc sym for old ABI objects unless func entry
651 2005-09-28 H.J. Lu <hongjiu.lu@intel.com>
654 * elf-bfd.h (_bfd_elf_setup_group_pointers): Renamed to ...
655 (_bfd_elf_setup_sections): This.
657 * elfcode.h (elf_object_p): Likewise.
659 * elf.c (_bfd_elf_setup_sections): Process SHF_LINK_ORDER.
660 (_bfd_elf_copy_private_section_data): Likewise.
662 2005-09-28 H.J. Lu <hongjiu.lu@intel.com>
664 * elflink.c (elf_fixup_link_order): Report locations for mixed
665 ordered and unordered input sections.
667 2005-09-22 James E. Wilson <wilson@specifix.com>
669 * dwarf2.c (struct funcinfo): Delete nesting_level field.
670 (lookup_address_in_function_table): Delete code to set funcinfo
671 caller_func field. Delete local curr_func.
672 (scan_unit_for_symbols): New locals nested_funcs, nested_funcs_size.
673 Delete code setting funcinfo nesting_level field. Add code to set
674 funcinfo caller_func field.
676 2005-09-20 James E. Wilson <wilson@specifix.com>
678 * dwarf2.c (find_abstract_instance_name): Don't early exit when name
679 set. For DW_AT_name case, only set name if not already set. Handle
680 DW_AT_MIPS_linkage_name.
682 2005-09-20 Alan Modra <amodra@bigpond.net.au>
684 * elflink.c (_bfd_elf_merge_symbol): Simplify.
686 2005-09-19 Alan Modra <amodra@bigpond.net.au>
688 * elf64-ppc.c (ppc_build_one_stub): Replace assertion that long
689 branch offset is in range with an error. Print full stub name on
691 (ppc_size_one_stub): Print full stub name on errors.
692 (group_sections): Warn if section size exceeds group size.
693 (ppc64_elf_size_stubs): Continue relaxing when stub types change.
695 2005-09-09 Kevin Buettner <kevinb@redhat.com>
697 * elf32-am33lin.c (bfd.h, sysdep.h, elf-bfd.h, elf/mn10300.h):
699 (elf32_am33lin_grok_prstatus, elf32_am33lin_grok_psinfo): New
701 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
703 2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
705 * elf32-arm.c (elf32_arm_section_from_shdr): Accept SHT_ARM_PREEMPTMAP
706 and SHT_ARM_ATTRIBUTES.
708 2005-09-08 H.J. Lu <hongjiu.lu@intel.com>
710 * elflink.c (elf_get_linked_section_vma): Fix a typo in comment.
711 * elfxx-ia64.c (elf_backend_link_order_error_handler): Likewise.
713 2005-09-08 H.J. Lu <hongjiu.lu@intel.com>
716 * elflink.c (elf_link_add_object_symbols): Abort for
717 --just-symbols on DSO.
719 2005-09-08 Paul Brook <paul@codesourcery.com>
721 * reloc.c: Rename BFD_RELOC_ARM_SMI to BFD_RELOC_ARM_SMC.
722 * bfd-in2.h: Regenerate.
723 * libbfd.h: Regenerate.
725 2005-09-06 H.J. Lu <hongjiu.lu@intel.com>
728 * elflink.c (_bfd_elf_merge_symbol): Don't check undefined
729 symbol introduced by "ld -u" for TLS.
731 2005-09-02 Paul Brook <paul@codesourcery.com>
733 * libbdf.h: Regenerate.
734 * bfd-in2.h: Regenerate.
735 * reloc.c: Add BFD_RELOC_ARM_T32_CP_OFF_IMM and
736 BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
738 2005-09-01 Dmitry Diky <diwil@spec.ru>
740 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Do not adjust
741 local symbols and move it to
742 (msp430_elf_relax_adjust_locals): New function - walk over the
743 sections in the bfd and adjust relocations as necessary.
745 2005-08-31 DJ Delorie <dj@redhat.com>
747 * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
748 address operator, as that breaks GCC's strict aliasing rules.
749 (elf_i386_size_dynamic_sections): Avoid the need for type
751 * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
752 & address operator, as that breaks GCC's strict aliasing
754 (elf_x86_64_size_dynamic_sections): Avoid the need for type
757 2005-08-30 Phil Edwards <phil@codesourcery.com>
759 * config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
761 2005-08-29 H.J. Lu <hongjiu.lu@intel.com>
764 * elfxx-ia64.c (allocate_fptr): Check undefined symbol.
766 2005-08-29 Steven J. Hill <sjhill@realitydiluted.com>
768 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Initialise
769 'value' to avoid compile time warning message.
771 2005-08-26 Christian Groessler <chris@groessler.org>
773 * coff-z8k.c: (r_jr, r_disp7, r_callr): Fix src_mask and dst_mask
775 (coff_z8k_select_reloc): Remove.
776 (SELECT_RELOC): Remove.
777 (coff_z8k_reloc_type_lookup): New function.
778 (coff_bfd_reloc_type_lookup): Define.
779 * configure.in: Add cofflink.lo to z8kcoff_vec.
780 * configure: Regenerate.
781 * reloc.c: (bfd_reloc_code_type): Add z8k relocations.
782 (bfd_install_relocation): Don't clear reloc_entry->addend for
784 * bfd-in2.h: Regenerate.
785 * libbfd.h: Regenerate.
787 2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
789 * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
791 2005-08-24 H.J. Lu <hongjiu.lu@intel.com>
794 * elf-hppa.h (elf_hppa_relocate_section): Print out the name
795 of unresolvable relocation.
796 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
797 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
798 * elf32-i386.c (elf_i386_relocate_section): Likewise.
799 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
800 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
801 * elf32-s390.c (elf_s390_relocate_section): Likewise.
802 * elf32-sh.c (sh_elf_relocate_section): Likewise.
803 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
804 * elf64-s390.c (elf_s390_relocate_section): Likewise.
805 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
806 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
807 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
809 2005-08-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
811 * config.bfd: Add bfd_elf32_shnbsd_vec and bfd_elf32_shlnbsd_vec
812 to targ_selvecs for sh5*-*-netbsd* and sh64*-*-netbsd*.
814 2005-08-18 Alan Modra <amodra@bigpond.net.au>
816 * coff-a29k.c: Delete.
817 * cpu-a29k.c: Delete.
818 * Makefile.am: Remove mention of a29k files.
819 * aoutf1.h: Remove a29k support.
821 * archures.c: Likewise.
822 * coffcode.h: Likewise.
823 * config.bfd: Likewise.
824 * configure.in: Likewise.
826 * mipsbsd.c: Likewise.
828 * sparclynx.c: Likewise.
829 * targets.c: Likewise.
830 * Makefile.in: Regenerate.
831 * configure: Regenerate.
832 * bfd-in2.h: Regenerate.
833 * po/SRC-POTFILES.in: Regenerate.
835 2005-08-18 Alan Modra <amodra@bigpond.net.au>
837 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
838 zero size dynamic variables.
839 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
840 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
841 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
842 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
843 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
844 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
845 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
846 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
847 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
848 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
849 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
850 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
851 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
852 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
853 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
854 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
856 2005-08-17 H.J. Lu <hongjiu.lu@intel.com>
859 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section lma
861 (_bfd_dwarf2_find_line): Likewise.
863 2005-08-17 Alan Modra <amodra@bigpond.net.au>
865 * elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
867 (mmix_elf_final_link): Check that section hasn't already been
868 removed before removing.
869 * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
870 (mmo_canonicalize_symtab): Likewise for reg section.
872 2005-08-17 Alan Modra <amodra@bigpond.net.au>
874 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
875 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called
876 without any got section.
878 2005-08-17 Danny Smith <dannysmith@users.sourceforge.net>
880 * cofflink.c (_bfd_coff_generic_relocate_section): Correct
883 2005-08-17 Alan Modra <amodra@bigpond.net.au>
885 * elflink.c (_bfd_elf_define_linkage_sym): Don't call
886 bfd_elf_link_record_dynamic_symbol. Call elf_backend_hide_symbol.
887 (_bfd_elf_link_renumber_dynsyms): Formatting.
888 (struct elf_gc_sweep_symbol_info): New.
889 (elf_gc_sweep_symbol): Rewrite.
890 (elf_gc_sweep): Adjust params and elf_gc_sweep_symbol call.
891 Call _bfd_elf_link_renumber_dynsyms.
892 (bfd_elf_gc_sections): Adjust elf_gc_sweep call.
894 2005-08-16 Alan Modra <amodra@bigpond.net.au>
896 * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
899 2005-08-15 Bob Wilson <bob.wilson@acm.org>
901 * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
902 of EM_XTENSA and EM_XTENSA_OLD.
904 2005-08-16 Alan Modra <amodra@bigpond.net.au>
906 * elf-bfd.h (_bfd_elf_define_linkage_sym): Declare.
907 * elflink.c (_bfd_elf_define_linkage_sym): New function, extracted
909 (_bfd_elf_create_got_section): ..here.
910 (_bfd_elf_link_create_dynamic_sections): Call it for _DYNAMIC.
911 (_bfd_elf_create_dynamic_sections): ..and _PROCEDURE_LINKAGE_TABLE_.
912 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Use
913 _bfd_elf_define_linkage_sym.
914 * elf32-frv.c (_frv_create_got_section): Likewise.
915 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
917 2005-08-15 Paul Brook <paul@codesourcery.com>
919 * elf32-arm.c (elf32_arm_howto_table_1): Make R_ARM_PLT32 the same as
922 2005-08-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
925 * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
926 .plt, .dlt, .sdata, .sbss and .tbss.
928 2005-08-12 Dmitry Diky <diwil@spec.ru>
930 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
931 referenced by .section + DISPLACEMENT.
933 2005-08-10 James E. Wilson <wilson@specifix.com>
935 * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
936 DW_OP_addr is only opcode in location before using it.
938 2005-08-09 H.J. Lu <hongjiu.lu@intel.com>
940 * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
942 2005-08-09 Rodney Brown <rbrown@bravurasolutions.com.au>
943 Nick Clifton <nickc@redhat.com>
945 * aix5ppc-core.c (xcoff64_core_p): Constify return_value
946 variable. Also, do not use core_hdr macro as it evaluates to a
947 cast of an lvalue which is no longer supported by GCC 4.0.
949 2005-08-08 Eric Dönges <Eric.Doenges@betty-tv.com>
951 * archures.c (bfd_mach_msp21): New MSP430 machine number.
952 * bfd-in2.h: Regenerate.
953 * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
956 2005-08-07 Nick Clifton <nickc@redhat.com>
957 Paul Brook <paul@codesourcery.com>
960 * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
961 (elf32_arm_close_and_cleanup): New function - walk over the
962 sections in the bfd that is being closed removing them from the
963 list of recorded sections.
964 (unrecord_section_via_map_over_sections): New helper function.
965 (record_section_with_arm_elf_section_data): Call bfd_malloc
966 instead of bfd_alloc. Remove unneeded abfd parameter.
967 (elf32_arm_new_section_hook): Do not pass bfd to
968 record_section_with_arm_elf_section_data.
970 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
971 already defined by the target.
973 2005-08-05 Fred Fish <fnf@specifix.com>
975 * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
976 to determine how many bytes to read from each rangelist entry.
978 2005-08-05 H.J. Lu <hongjiu.lu@intel.com>
980 * bfd.c (bfd_hide_symbol): New.
981 * bfd-in2.h: Regenerated.
983 2005-08-04 H.J. Lu <hongjiu.lu@intel.com>
985 * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
986 large common symbol and a normal common symbol, always turn
987 the large common symbol into a normal one.
989 2005-08-04 Alan Modra <amodra@bigpond.net.au>
991 * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
993 (ppc_elf_relocate_section): Adjust for above.
994 (create_sdata_sym): New function.
995 (ppc_elf_create_linker_section): Call it.
996 (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
997 Create sdata syms for all SDA relocs.
998 (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
1000 (ppc_elf_set_sdata_syms): Delete.
1001 * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
1002 and DT_FINI tags unless associated section has input.
1003 (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
1004 (_bfd_elf_provide_section_bound_symbols): Delete.
1005 * bfd-in.h (_bfd_elf_provide_symbol): Delete.
1006 (_bfd_elf_provide_section_bound_symbols): Delete.
1007 * bfd-in2.h: Regenerate.
1009 2005-08-04 Alan Modra <amodra@bigpond.net.au>
1011 * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
1012 * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
1013 * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
1014 * bfd-in2.h: Regenerate.
1016 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
1018 * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
1019 only if it isn't NULL.
1021 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
1023 * elf32-i386.c (elf_howto_table): Undo the overflow change for
1024 R_386_PC16 made on 2005-07-18.
1026 * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
1027 change for R_X86_64_PC16 made on 2005-07-18.
1029 2005-08-03 Alan Modra <amodra@bigpond.net.au>
1031 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot. Use
1032 elf.hgot throughout file.
1034 2005-08-03 Alan Modra <amodra@bigpond.net.au>
1036 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
1037 _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
1039 2005-08-02 Andreas Schwab <schwab@suse.de>
1041 * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
1042 (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
1044 (allocate_dynrel_entries): Look only at GOT relocations when
1046 (elfNN_ia64_size_dynamic_sections): Set only_got to false before
1047 calling allocate_dynrel_entries.
1049 2005-08-02 Nick Clifton <nickc@redhat.com>
1052 * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
1053 and make the mapcount field unsigned.
1054 (struct section_list): New: Used to keep track of which sections
1055 have an _arm_elf_section_data structure.
1056 (record_section_with_arm_elf_section_data): New function.
1057 (get_arm_elf_section_data): New function.
1058 (unrecord_section_with_arm_elf_section_data): New function.
1059 (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
1060 (elf32_arm_new_section_hook): Call
1061 record_section_with_arm_elf_section_data.
1062 (elf32_arm_write_section): Use get_arm_elf_section_data and
1063 unrecord_section_with_arm_elf_section_data.
1065 2005-08-01 Richard Sandiford <richard@codesourcery.com>
1067 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
1068 of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
1070 2005-07-30 David Daney <ddaney@avtrex.com>
1072 * elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
1074 2005-07-29 David Daney <ddaney@avtrex.com>
1076 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp
1077 if it is in the *ABS* section.
1079 2005-07-29 Paul Brook <paul@codesourcery.com>
1081 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
1082 * bfd-in2.h: Regenerate.
1083 * libbfd.h: Regenerate.
1085 2005-07-29 Paul Brook <paul@codesourcery.com>
1087 * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
1088 * bfd-in2.h: Regeenrate.
1089 * libbfd.h: Regenerate.
1091 2005-07-29 Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
1093 * peXXigen.c (pe_print_edata): Compute the size of the export
1094 table from the size field in the DataDictionary and not the size
1095 of the section. Some linkers embed the export table inside a
1098 2005-07-29 Alan Modra <amodra@bigpond.net.au>
1100 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
1101 (enum action_discarded): Move from..
1102 * elflink.c (enum action_discarded): ..here.
1103 (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
1104 Remove target specific section checks.
1105 (elf_link_input_bfd): Adjust.
1106 * elfxx-target.h (elf_backend_action_discarded): Define.
1107 (elfNN_bed): Init new field.
1108 * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
1109 * bfd-in2.h: Regenerate.
1110 * elf-hppa.h (elf_hppa_action_discarded): New function.
1111 * elf32-hppa.c (elf_backend_action_discarded): Define.
1112 * elf64-hppa.c (elf_backend_action_discarded): Define.
1113 * elf32-ppc.c (ppc_elf_action_discarded): New function.
1114 (elf_backend_action_discarded): Define.
1116 2005-07-27 Alan Modra <amodra@bigpond.net.au>
1118 * elflink.c (fix_syms): Handle symbols defined in input sections.
1120 2005-07-27 Jan Beulich <jbeulich@novell.com>
1122 * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
1123 (elf64_x86_64_info_to_howto): Use them.
1125 2005-07-27 Alan Modra <amodra@bigpond.net.au>
1127 * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
1128 regardless of strength of previous definition.
1130 2005-07-26 Alan Modra <amodra@bigpond.net.au>
1132 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
1133 (bfd_elf_gc_sections): Allow -gc-sections when -shared.
1134 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
1136 2005-07-26 Alan Modra <amodra@bigpond.net.au>
1138 * elflink.c (elf_gc_sweep): Move gcc_except_table code..
1139 (bfd_elf_gc_sections): ..to here.
1141 2005-07-25 DJ Delorie <dj@redhat.com>
1143 * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
1144 * libbfd.h: Regenerate.
1145 * bfd-in2.h: Regenerate.
1147 * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
1148 R_M32C_HI8, R_M32C_HI16.
1149 (m32c_reloc_map): Likewise.
1150 (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
1152 2005-07-25 Jan Hubicka <jh@suse.cz>
1153 H.J. Lu <hongjiu.lu@intel.com>
1155 * elf-bfd.h (_bfd_elf_large_com_section): New.
1156 * elf.c (_bfd_elf_large_com_section): New. Defined.
1158 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
1159 (elf64_x86_64_elf_section_from_bfd_section): New.
1160 (elf64_x86_64_symbol_processing): New.
1161 (elf64_x86_64_common_definition): New.
1162 (elf64_x86_64_common_section_index): New.
1163 (elf64_x86_64_common_section): New.
1164 (elf64_x86_64_merge_symbol): New.
1165 (elf64_x86_64_additional_program_headers): New.
1166 (elf64_x86_64_special_sections): New.
1167 (elf_backend_section_from_bfd_section): New. Defined.
1168 (elf_backend_add_symbol_hook): Likewise.
1169 (elf_backend_common_section_index): Likewise.
1170 (elf_backend_common_section): Likewise.
1171 (elf_backend_common_definition): Likewise.
1172 (elf_backend_merge_symbol): Likewise.
1173 (elf_backend_special_sections): Likewise.
1174 (elf_backend_additional_program_headers): Likewise.
1176 2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
1178 * elf-bfd.h (elf_backend_data): Add common_definition,
1179 common_section_index, common_section, and merge_symbol.
1180 (_bfd_elf_common_definition): New.
1181 (_bfd_elf_common_section_index): New.
1182 (_bfd_elf_common_section): New.
1184 * elf.c (elf_fake_sections): Don't clear sh_flags.
1186 * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
1188 (is_global_data_symbol_definition): Call backend
1189 common_definition instead of checking SHN_COMMON.
1190 (elf_link_add_object_symbols): Likewise.
1191 (elf_link_output_extsym): Call backend common_section_index
1192 for common section index.
1193 (_bfd_elf_common_definition): New.
1194 (_bfd_elf_common_section_index): New.
1195 (_bfd_elf_common_section): New.
1197 * elfxx-target.h (elf_backend_common_definition): New.
1198 (elf_backend_common_section_index): New.
1199 (elf_backend_common_section): New.
1200 (elf_backend_merge_symbol): New.
1201 (elfNN_bed): Initialize common_definition, common_section_index,
1202 common_section, and merge_symbol.
1204 * section.c (BFD_FAKE_SECTION): New.
1205 (STD_SECTION): Use it.
1206 * bfd-in2.h: Regenerated.
1208 2005-07-23 Olaf Hering <olh@suse.de>
1210 * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
1213 2005-07-21 Ralf Corsepius <ralf.corsepius@rtems.org>
1215 * config.bfd: Remove i[3-7]86-*-rtemself*.
1216 Remove sparc-*-rtemself*.
1218 2005-07-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1220 * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
1223 2005-07-21 Ben Elliston <bje@gnu.org>
1225 * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
1226 (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
1227 (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
1228 (cf-m68klynx.lo, m68klynx.lo): Remove targets.
1229 * Makefile.in: Regenerate.
1230 * cf-m68klynx.c: Remove.
1231 * m68klynx.c: Likewise.
1232 * configure.in (m68klynx_aout_vec): Remove vector.
1233 (m68klynx_coff_vec): Likewise.
1234 * configure: Regenerate.
1235 * targets.c (m68klynx_aout_vec): Remove extern.
1236 (m68klynx_coff_vec): Likewise.
1237 (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
1238 * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
1240 2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1242 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
1243 (m32r_reloc_map): Likewise.
1244 (m32r_elf_relocate_section): Likewise.
1245 (m32r_elf_gc_sweep_hook): Likewise.
1246 (m32r_elf_check_relocs): Likewise.
1248 2005-07-18 Nick Clifton <nickc@redhat.com>
1250 * reloc.c: Add M32C and MS1 relocs.
1251 * bfd-in2.h: Regenerate.
1252 * libbfd.h: Regenerate.
1254 2005-07-18 Nick Clifton <nickc@redhat.com>
1256 * config.bfd: Move m32c entry to correct location.
1257 * archures.c: Likewise.
1258 * configure.in: Likewise.
1259 * configure: Regenerate.
1260 * targets.c: Move ms1 vector to correct location.
1262 2005-07-18 Jan Beulich <jbeulich@novell.com>
1264 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
1266 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
1267 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
1269 2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
1273 * elflink.c (elf_link_add_object_symbols): Also append the version
1274 name to non-hidden absolute symbols that are functions.
1276 2005-07-16 Alan Modra <amodra@bigpond.net.au>
1278 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
1279 for zero size sections. Don't set .sbss syms here.
1280 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
1282 2005-07-16 Alan Modra <amodra@bigpond.net.au>
1284 * Makefile.am: Run "make dep-am".
1285 * Makefile.in: Regenerate.
1287 2005-07-15 Bob Wilson <bob.wilson@acm.org>
1289 * elf32-xtensa.c (vsprint_msg): Add prototype.
1290 (build_encoding_error_message): Delete. Code moved into....
1291 (elf_xtensa_do_reloc): ....here, and changed to give better
1292 error messages for out of range literals.
1294 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1296 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
1297 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
1298 defined in output sections. Call bfd_elf_record_link_assignment.
1299 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
1300 * bfd-in2.h: Regenerate.
1302 2005-07-14 Jim Blandy <jimb@redhat.com>
1304 Add support for m32c-*-elf (Renesas m32c and m16c).
1305 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
1306 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
1307 (BFD32_BACKENDS): Add elf32-m32c.lo.
1308 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
1309 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
1310 * Makefile.in: Regenerated.
1311 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
1312 arch and mach codes.
1313 (bfd_m32c_arch): New arch info object.
1314 (bfd_archures_list): List bfd_m32c_arch.
1315 * bfd-in2.h: Regenerated.
1316 * config.bfd: Add case for the m32c.
1317 * configure.in: Add case for the m32c.
1318 * configure: Regenerated.
1319 * cpu-m32c.c, elf32-m32c.c: New files.
1320 * libbfd.h: Regenerated.
1321 * targets.c (bfd_elf32_m32c_vec): Declare.
1322 (_bfd_target_vector): List bfd_elf32_m32c_vec.
1324 2005-07-14 Alan Modra <amodra@bigpond.net.au>
1326 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
1327 (_bfd_elf_provide_section_bound_symbols): Remove param name.
1329 * bfd-in2.h: Regenerate.
1330 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
1331 (_bfd_elf_provide_symbol): Formatting.
1332 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
1333 create section relative syms.
1334 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
1335 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
1336 _bfd_elf_provide_section_bound_symbols.
1337 * reloc.c (bfd_mark_used_section): Delete.
1338 (bfd_generic_gc_sections): Don't call the above.
1340 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
1343 * cache.c (bfd_last_cache): Initialise to NULL.
1345 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
1346 Nick Clifton <nickc@redhat.com>
1348 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
1349 Alpha binaries and issue a helpful error message.
1350 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
1351 symbol index to 15 to allow for binaries produced by DEC
1354 2005-07-13 Steve Ellcey <sje@cup.hp.com>
1356 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
1358 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1360 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
1363 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1365 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
1367 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1369 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
1371 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
1373 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
1376 2005-07-08 Paul Koning <pkoning@equallogic.com>
1378 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
1379 where addresses are sign extended.
1381 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
1383 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
1384 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
1385 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
1386 sparc*-*-rtemsaout* as removed
1388 2005-07-08 Alan Modra <amodra@bigpond.net.au>
1390 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
1391 of the usual sections are found.
1392 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
1393 Strip .dynbss if it is zero size.
1394 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
1395 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1396 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1397 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
1399 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
1400 when it is zero size.
1401 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
1402 of .dynbss and zero size sections.
1403 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
1405 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
1406 .dynbss if zero size.
1407 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
1409 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1410 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1411 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1412 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
1413 .plt.* and .got.plt.* if zero size.
1414 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
1415 .got* and .dynbss if zero size.
1416 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
1417 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
1418 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
1420 (create_got_section): Always create new .got and .rela.got sections.
1421 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
1422 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1423 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1424 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
1425 dynamic bss sections correctly.
1426 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
1427 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
1428 .dynbss if zero size.
1430 2005-07-08 Ben Elliston <bje@au.ibm.com>
1432 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
1433 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
1435 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
1437 * elf-bfd.h (elf_backend_data): Add special_sections.
1439 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
1442 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
1443 (elf_backend_special_sections): New. Defined.
1444 * elf32-m32r.c: Likewise.
1445 * elf32-m68hc11.c: Likewise.
1446 * elf32-m68hc12.c: Likewise.
1447 * elf32-mcore.c: Likewise.
1448 * elf32-sh64.c: Likewise.
1449 * elf32-v850.c: Likewise.
1450 * elf32-xtensa.c: Likewise.
1451 * elf64-alpha.c: Likewise.
1452 * elf64-hppa.c: Likewise.
1453 * elf64-ppc.c: Likewise.
1454 * elf64-sh64.c: Likewise.
1455 * elfxx-ia64.c: Likewise.
1456 * elfxx-mips.c: Likewise.
1457 * elfxx-mips.h: Likewise.
1459 * elfxx-target.h (elf_backend_special_sections): New.
1460 (elfNN_bed): Initialize special_sections.
1462 2005-07-07 Bob Wilson <bob.wilson@acm.org>
1464 * xtensa-modules.c: Update tables with Xtensa MMU features.
1466 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1468 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
1470 * vms.h (_bfd_vms_debug): Add format attribute.
1471 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
1473 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
1476 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
1477 symbol with default visibility is local.
1479 2005-07-07 Ben Elliston <bje@gnu.org>
1481 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
1483 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
1485 * dwarf2.c (varinfo): Add addr.
1486 (lookup_symbol_in_variable_table): Also check addr.
1487 (scan_unit_for_symbols): Set addr for variable.
1488 (comp_unit_find_line): Updated.
1490 2005-07-06 Nick Clifton <nickc@redhat.com>
1492 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
1493 message if an unknown reloc is encountered.
1494 (alpha_relocate_section): Likewise.
1496 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
1497 with a missing howto field.
1499 2005-07-06 Alan Modra <amodra@bigpond.net.au>
1501 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
1504 2005-07-05 Paul Brook <paul@codesourcery.com>
1506 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
1507 (ppc_elf_vxworks_get_sec_type_attr): New function.
1508 (elf_backend_special_sections): Remove vxwords definition.
1509 (elf_backend_get_sec_type_attr): Define for vxworks.
1511 2005-07-05 Nick Clifton <nickc@redhat.com>
1513 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
1515 2005-07-05 Paul Brook <paul@codesourcery.com>
1517 * config.bfd: Add separate case for ppc-vxworks.
1518 * configure: Regenerate.
1519 * configure.in: Include elf-vxworks.lo on ppc targets.
1520 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
1522 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
1523 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
1524 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
1525 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
1526 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
1527 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
1528 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
1529 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
1530 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
1531 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
1532 (ppc_elf_create_got): Create .got.plt for VxWorks.
1533 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
1534 section for VxWorks.
1535 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
1536 (allocate_got): VxWorks does not need a got header.
1537 (allocate_dynrelocs): Handle VxWorks plt format.
1538 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
1539 VxWorks. Handle VxWorks plt/got.
1540 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
1541 (ppc_elf_vxworks_special_sections): New.
1542 (ppc_elf_vxworks_link_hash_table_create,
1543 ppc_elf_vxworks_add_symbol_hook,
1544 elf_i386_vxworks_link_output_symbol_hook,
1545 ppc_elf_vxworks_final_write_processing): New functions.
1546 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
1547 (_bfd_target_vector): Use it.
1549 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1551 * libbfd-in.h (struct artdata): Add extended_names_size field.
1552 * libbfd.h: Rebuilt.
1553 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
1554 allocated object by bfd_zalloc.
1555 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
1556 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
1557 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
1558 (get_extended_arelt_filename): Fail if index is bigger or equal to
1559 extended_names_size.
1560 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
1561 get_extended_arelt_filename already did that.
1562 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
1563 Allocate one extra byte and clear it, in case extended names table
1566 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
1567 bfd_zalloc2): New prototypes.
1568 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
1569 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
1570 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
1571 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
1572 elf_map_symbols, map_sections_to_segments,
1573 assign_file_positions_for_segments, copy_private_bfd_data,
1574 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
1576 * bfd-in2.h: Rebuilt.
1577 * libbfd.h: Rebuilt.
1579 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
1580 verdef or verneed section.
1581 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
1582 verneed sections gracefully.
1583 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
1584 bogus relocation values.
1585 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1586 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
1587 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1588 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
1589 * elfxx-ia64.c (lookup_howto): Likewise.
1591 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
1592 the end of strtab and clear it.
1595 2005-07-05 Nick Clifton <nickc@redhat.com>
1597 * po/vi.po: New Vietnamese translation.
1598 * configure.in (ALL_LINGUAS): Add vi.
1599 * configure: Regenerate.
1601 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
1603 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
1604 touchup logic like i386/ppc.
1606 2005-07-05 Alan Modra <amodra@bigpond.net.au>
1608 * elf.c (special_sections): Move const qualifier.
1609 (special_sections_b..special_sections_t): Likewise.
1610 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
1612 (elf32_arm_symbian_special_sections): Move const qualifier.
1613 * elf32-m32r.c: Similarly.
1614 * elf32-m68hc11.c: Similarly.
1615 * elf32-m68hc12.c: Similarly.
1616 * elf32-mcore.c: Similarly.
1617 * elf32-ppc.c: Similarly.
1618 * elf32-sh64.c: Similarly.
1619 * elf32-v850.c: Similarly.
1620 * elf32-xtensa.c: Similarly.
1621 * elf64-alpha.c: Similarly.
1622 * elf64-hppa.c: Similarly.
1623 * elf64-ppc.c: Similarly.
1624 * elf64-sh64.c: Similarly.
1625 * elfxx-ia64.c: Similarly.
1626 * elfxx-mips.c: Similarly.
1628 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1630 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
1631 info->executable instead of !info->shared where appropriate.
1633 2005-07-04 Alan Modra <amodra@bigpond.net.au>
1636 * elf.c (assign_file_positions_for_segments): Remove excluded
1637 sections from the segment map.
1639 2005-07-04 Alan Modra <amodra@bigpond.net.au>
1642 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
1644 (_bfd_elf_get_special_section): Declare.
1645 (bfd_elf_special_section): Update prototype.
1646 * elf.c (special_sections): Remove unused outer entries.
1647 (get_special_section): Delete.
1648 (_bfd_elf_get_special_section): New function.
1649 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
1650 special_sections indexing.
1651 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
1652 * elf32-arm.c (symbian_special_sections_d): Delete.
1653 (symbian_special_sections_g, symbian_special_sections_h): Delete.
1654 (symbian_special_sections_i, symbian_special_sections_f): Delete.
1655 (symbian_special_sections_p): Delete.
1656 (elf32_arm_symbian_special_sections): Merge above to here.
1657 (elf32_arm_symbian_get_sec_type_attr): New function.
1658 (elf_backend_special_sections): Don't define.
1659 (elf_backend_get_sec_type_attr): Define.
1660 * elf32-m32r.c: Similarly to elf32-arm.c.
1661 * elf32-m68hc11.c: Likewise.
1662 * elf32-m68hc12.c: Likewise.
1663 * elf32-mcore.c: Likewise.
1664 * elf32-sh64.c: Likewise.
1665 * elf32-v850.c: Likewise.
1666 * elf32-xtensa.c: Likewise.
1667 * elf64-alpha.c: Likewise.
1668 * elf64-hppa.c: Likewise.
1669 * elf64-ppc.c: Likewise.
1670 * elf64-sh64.c: Likewise.
1671 * elfxx-ia64.c: Likewise.
1672 * elfxx-mips.c: Likewise.
1673 * elf32-ppc.c: Likewise.
1674 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
1675 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
1676 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
1677 (elf_backend_get_sec_type_attr): Define.
1678 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
1679 (elf_backend_special_sections): Don't define.
1680 (elfNN_bed): Update.
1682 2005-07-01 Nick Clifton <nickc@redhat.com>
1684 * cpu-d10v.c: Update to ISO C90 style function declarations and
1686 * cpu-d30v.c: Likewsie.
1687 * cpu-i370.c: Likewsie.
1688 * cpu-xstormy16.c: Likewsie.
1689 * elf32-arc.c: Likewsie.
1690 * elf32-d10v.c: Likewsie.
1691 * elf32-d30v.c: Likewsie.
1692 * elf32-dlx.c: Likewsie.
1693 * elf32-i370.c: Likewsie.
1694 * elf32-i960.c: Likewsie.
1695 * elf32-ip2k.c: Likewsie.
1696 * elf32-m32r.c: Likewsie.
1697 * elf32-mcore.c: Likewsie.
1698 * elf32-openrisc.c: Likewsie.
1699 * elf32-or32.c: Likewsie.
1700 * elf32-pj.c: Likewsie.
1701 * elf32-v850.c: Likewsie.
1702 * elf32-xstormy16.c: Likewsie.
1704 2005-07-01 Alan Modra <amodra@bigpond.net.au>
1706 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
1708 (elf64_alpha_create_dynamic_sections): Always make new sections
1709 by using bfd_make_section_anyway_with_flags. Check that .got not
1711 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
1714 2005-06-30 Alan Modra <amodra@bigpond.net.au>
1716 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
1717 _SDA_BASE_ and _SDA2_BASE_ symbols.
1718 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
1719 sym if not def_regular.
1720 (_bfd_elf_provide_section_bound_symbols): Similarly.
1722 2005-06-30 Ben Elliston <bje@gnu.org>
1724 * config.bfd: Mark as obsolete:
1729 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1731 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
1732 .eh_frame specially..
1733 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
1734 Don't recheck sections we have already marked.
1735 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
1736 * section.c (struct bfd_section): Add gc_mark_from_eh.
1737 (STD_SECTION): Adjust.
1738 * ecoff.c (bfd_debug_section): Adjust.
1739 * bfd-in2.h: Regenerate.
1741 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1743 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
1744 not been processed by check_relocs.
1746 2005-06-29 Paul Brook <paul@codesourcery.com>
1748 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
1749 * bfd-in2.h: Regenerate.
1750 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
1752 * elflink.c (bfd_elf_set_symbol): Add section argument.
1753 (_bfd_elf_provide_symbol): Ditto.
1754 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
1756 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
1758 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
1759 Use bh_root, and hh.
1760 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
1761 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
1762 (struct elf32_hppa_link_hash_table): Use etab and bstab.
1763 (stub_hash_newfunc): Use hh.
1764 (hppa_link_hash_newfunc): Use hsh_cache.
1765 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
1766 (elf32_hppa_link_hash_table_free): Use bstab.
1767 (hppa_stub_name): Use eh.
1768 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
1769 (hppa_add_stub): Use bstab.
1770 (hppa_type_of_stub): Use eh.
1771 (hppa_build_one_stub): Use hh and bh_root.
1772 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
1773 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
1774 (elf32_hppa_gc_sweep_hook): Use hdh_next.
1775 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
1776 (allocate_plt_static): Use etab.
1777 (allocate_dynrelocs): Use etab, and hdh_next.
1778 (readonly_dynrelocs): Use hdh_next.
1779 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
1780 (get_local_syms): Use eh, bstab, and hh.
1781 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
1782 (elf32_hppa_set_gp): Use etab.
1783 (elf32_hppa_build_stubs): Use bstab.
1784 (final_link_relocate): Use eh, bh_root.
1785 (elf32_hppa_relocate_section): Use elf, etab.
1786 (elf32_hppa_finish_dynamic_sections): Use etab.
1788 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
1790 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
1793 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
1795 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
1796 (hppa_stub_hash_entry): Define.
1797 (stub_hash_newfunc): Rename variables.
1798 (hppa_link_hash_newfunc): Likewise.
1799 (elf32_hppa_link_hash_table_free): Likewise.
1800 (hppa_stub_name): Likewise.
1801 (hppa_get_stub_entry): Likewise.
1802 (hppa_add_stub): Likewise.
1803 (hppa_type_of_stub): Likewise.
1804 (hppa_build_one_stub): Likewise.
1805 (hppa_size_one_stub): Likewise.
1806 (elf32_hppa_create_dynamic_sections): Likewise.
1807 (elf32_hppa_copy_indirect_symbol): Likewise.
1808 (elf32_hppa_check_relocs): Likewise.
1809 (elf32_hppa_gc_mark_hook): Likewise.
1810 (elf32_hppa_gc_sweep_hook): Likewise.
1811 (elf32_hppa_grok_psinfo): Likewise.
1812 (elf32_hppa_hide_symbol): Likewise.
1813 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1814 (allocate_dynrelocs): Likewise.
1815 (clobber_millicode_symbols): Likewise.
1816 (readonly_dynrelocs): Likewise.
1817 (elf32_hppa_size_dynamic_sections): Likewise.
1818 (get_local_syms): Likewise.
1819 (elf32_hppa_size_stubs): Likewise.
1820 (hppa_record_segment_addr): Likewise.
1821 (final_link_relocate): Likewise.
1822 (elf32_hppa_relocate_section): Likewise.
1823 (elf32_hppa_finish_dynamic_symbol): Likewise.
1825 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1828 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
1830 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1831 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
1832 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1833 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1834 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1835 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1836 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1837 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1838 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1839 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1840 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1841 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1842 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1843 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
1844 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1845 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1846 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1847 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1848 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1849 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1850 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1851 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1852 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1853 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1854 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1855 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1856 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1858 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1861 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
1864 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1867 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
1868 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1870 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
1872 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
1873 BFD_RELOC_X86_64_GOTPC32.
1874 * bfd-in2.h: Regenerated.
1876 2005-06-17 Jakub Jelinek <jakub@redhat.com>
1878 * elf.c (bfd_section_from_shdr): Kill bogus warning.
1880 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
1881 symbol, relocation, group or versym sections.
1883 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
1885 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
1886 doesn't point into the section.
1888 2005-06-17 Jan Beulich <jbeulich@novell.com>
1890 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
1891 and BFD_RELOC_X86_64_GOTPC32.
1892 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1893 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
1894 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1895 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
1896 and R_X86_64_GOTPC32.
1897 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
1898 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
1899 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1900 (elf64_x86_64_relocate_section): Likewise.
1901 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
1903 2005-06-15 Mark Kettenis <kettenis@gnu.org>
1905 * archive.c: Include "libiberty.h".
1907 2005-06-15 Nick Clifton <nickc@redhat.com>
1909 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
1910 produced by the GreenHills toolchain can be assimilated.
1912 2005-06-14 Steve Ellcey <sje@cup.hp.com>
1914 * som.c (som_find_inliner_info): New.
1916 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
1918 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
1920 2005-06-14 Jakub Jelinek <jakub@redhat.com>
1922 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1923 Prevent endless recursion on broken objects.
1925 * archive.c (do_slurp_coff_armap): Check for overflows.
1927 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
1929 * elfcode.h (elf_write_relocs): Do nothing if there are no
1932 2005-06-10 Alan Modra <amodra@bigpond.net.au>
1934 * dwarf2.c (decode_line_info): Revert last change. Instead set
1935 initial low_pc to -1 to avoid need to test whether loc_pc has
1938 2005-06-09 Christopher Faylor <cgf@timesys.com>
1940 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1941 either SEC_ALLOC OR SEC_LOAD.
1943 2005-06-09 Christopher Faylor <cgf@timesys.com>
1945 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1946 section header. Do not add STYP_NOLOAD since it does not appear to be
1949 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
1952 * dwarf2.c (lookup_address_in_line_info_table): Restore code
1953 handling NULL function info, removed with 2005-04-03 change.
1955 2005-06-08 Mark Mitchell <mark@codesourcery.com>
1957 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1959 2005-06-09 Alan Modra <amodra@bigpond.net.au>
1961 * elflink.c (elf_mark_used_section): Delete.
1962 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1963 * reloc.c (bfd_mark_used_section): New function.
1964 (bfd_generic_gc_sections): Call bfd_mark_used_section.
1966 2005-06-08 Alan Modra <amodra@bigpond.net.au>
1968 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1969 (bfd_fdopenr): Same.
1971 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1973 * opncls.c (bfd_fdopenr): Add missing break statements.
1975 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1977 * opncls.c (bfd_fopen): New API.
1978 (bfd_openr): Use it.
1979 (bfd_fdopenr): Likewise.
1980 * bfd-in2.h: Regenerated.
1982 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
1983 Michael Snyder <msnyder@redhat.com>
1984 Stan Cox <scox@redhat.com>
1986 * Makefile.am (ALL_MACHINES): Add ms1 support.
1987 (ALL_MACHINES_CFILES): Same.
1988 (BFD32_BACKENDS): Same.
1989 (BFD32_BACKENDS_CFILES): Same.
1991 * Makefile.in: Regenerate.
1993 * archures.c (bfd_architecture): Add ms1 entries.
1994 Externalize bfd_ms1_arch.
1995 (bfd_archures_list): Add bfd_ms1_arch.
1997 * bfd-in2.h: Regenerate.
1999 * cpu-ms1.c: New file.
2001 * elf32-ms1.c: New file.
2003 * targets.c: Define extern of bfd_elf32_ms1_vec.
2004 Add bfd_elf32_ms1_vec to _bfd_target_vector.
2006 * configure.in: Add bfd_elf32_ms1_vec case.
2008 * configure: Regenerate.
2010 * config.bfd: Add ms1-*-elf to table.
2012 2005-06-07 Zack Weinberg <zack@codesourcery.com>
2014 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
2016 2005-06-07 Alan Modra <amodra@bigpond.net.au>
2018 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
2019 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2021 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
2024 * bfd.c (bfd_find_line): New.
2026 * dwarf2.c (comp_unit): Add variable_table.
2027 (funcinfo): Add file, line, and sec.
2029 (lookup_symbol_in_function_table): New.
2030 (lookup_symbol_in_variable_table): New.
2031 (scan_unit_for_functions): Renamed to ...
2032 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
2034 (comp_unit_find_nearest_line): Updated.
2035 (comp_unit_find_line): New.
2036 (_bfd_dwarf2_find_line): New.
2038 * elf-bfd.h (_bfd_elf_find_line): New.
2039 (_bfd_generic_find_line): New. Defined.
2041 * elf.c (_bfd_elf_find_line): New.
2043 * libbfd-in.h (_bfd_dwarf2_find_line): New.
2044 (_bfd_generic_find_line): New.
2046 * bfd-in2.h: Regenerated.
2047 * libbfd.h: Likewise.
2049 * libbfd.c (_bfd_generic_find_line): New.
2051 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
2052 with _bfd_generic_find_line.
2053 (bfd_target): Add _bfd_find_line.
2055 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
2057 * dwarf2.c (decode_line_info): Properly set low_pc.
2059 2005-06-06 Alan Modra <amodra@bigpond.net.au>
2061 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
2062 case, include addend when indexing .opd section map.
2063 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
2064 clear opd_adjust array if no_opd_opt set. Tidy code.
2065 Ignore zero size .opd. Check bfd_alloc return value.
2066 (ppc_stub_name): Return immediately on bfd_malloc fail.
2067 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
2069 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
2071 * dwarf2.c (comp_unit): Fix a typo in comment.
2073 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
2075 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
2076 (reloc_type_lookup): Dito.
2077 (elf_vax_discard_copies): Dito.
2078 (elf_vax_instantiate_got_entries): Dito.
2079 (elf_vax_link_hash_traverse): Dito.
2080 (elf_vax_link_hash_newfunc): Dito.
2081 (elf_vax_link_hash_table_create): Dito.
2082 (elf32_vax_set_private_flags): Dito.
2083 (elf32_vax_merge_private_bfd_data): Dito.
2084 (elf32_vax_print_private_bfd_data): Dito.
2085 (elf_vax_check_relocs): Dito.
2086 (elf_vax_gc_mark_hook): Dito.
2087 (elf_vax_gc_sweep_hook): Dito.
2088 (elf_vax_size_dynamic_sections): Dito.
2089 (elf_vax_discard_copies): Dito.
2090 (elf_vax_instantiate_got_entries): Dito.
2091 (elf_vax_relocate_section): Dito.
2092 (elf_vax_finish_dynamic_symbol): Dito.
2093 (elf_vax_finish_dynamic_sections): Dito.
2094 (elf_vax_hash_table): Break-up of line isn't needed.
2095 (elf_vax_check_relocs): Remove leading whitespace
2096 (elf_vax_relocate_section): Remove redundant whitespace
2097 (elf_vax_link_hash_newfunc): Don't cast NULL.
2098 (elf_vax_link_hash_table_create): Dito.
2099 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
2101 2005-06-03 Alan Modra <amodra@bigpond.net.au>
2104 * configure.in: Bump version
2105 * configure: Regenerate.
2106 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
2107 discarded section sym refs and kill linker output.
2108 * simple.c (simple_dummy_einfo): New function.
2109 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
2111 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
2112 for all reloc types.
2114 2005-06-02 Alan Modra <amodra@bigpond.net.au>
2116 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
2117 restrictive of func code and func descr for undefined syms as well
2120 2005-05-31 Jim Blandy <jimb@redhat.com>
2122 * Makefile.am: Regenerate dependencies with 'make dep-am'.
2123 * Makefile.in: Regenerate.
2125 2005-05-31 Richard Henderson <rth@redhat.com>
2127 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
2128 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
2129 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
2130 (elf64_alpha_want_plt): Update to match.
2131 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
2132 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
2134 2005-05-31 Zack Weinberg <zack@codesourcery.com>
2136 * elf32-arm.c (elf32_arm_reloc_type_lookup)
2137 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
2138 Use ISO C90 function declaration style.
2140 2005-05-31 James E Wilson <wilson@specifixinc.com>
2142 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
2143 header PF_R flag on PT_LOAD segments.
2145 2005-05-30 Richard Henderson <rth@redhat.com>
2147 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
2148 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
2150 2005-05-29 Richard Henderson <rth@redhat.com>
2152 * configure.in (--enable-secureplt): New.
2153 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
2154 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
2155 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
2156 (elf64_alpha_use_secureplt): New.
2157 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
2158 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
2159 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
2160 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
2161 (struct alpha_elf_link_hash_entry): Add plt_offset.
2162 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
2163 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
2164 (PLT_ENTRY_WORD3): Remove.
2165 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
2166 on .plt and create .got.plt.
2167 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
2168 (get_got_entry): Initialize plt_offset.
2169 (elf64_alpha_want_plt): New.
2170 (elf64_alpha_check_relocs): Use it.
2171 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
2173 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
2174 error as user error.
2175 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
2177 (elf64_alpha_size_plt_section): Size .got.plt section.
2178 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
2180 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
2181 Add PLTRO DYNAMIC entry.
2182 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
2183 (elf64_alpha_finish_dynamic_sections): Likewise.
2185 2005-05-28 David Daney <ddaney@avtrex.com>
2187 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
2188 calculation of DT_RELSZ to occur after all dynamic relocations
2191 2005-05-28 Eli Zaretskii <eliz@gnu.org>
2193 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
2194 * config.in, configure: Regenerate.
2196 2005-05-26 Mark Kettenis <kettenis@gnu.org>
2197 Maciej W. Rozycki <macro@linux-mips.org>
2199 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
2200 stop processing of options if one of invalid size is
2202 (_bfd_mips_elf_section_from_shdr): Likewise.
2203 (_bfd_mips_elf_fake_sections): Reset the type of empty special
2206 2005-05-26 Richard Henderson <rth@redhat.com>
2208 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
2209 plt_old_section, plt_old_value.
2210 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
2211 (elf64_alpha_size_plt_section_1): Don't use it.
2213 2005-05-26 Jakub Jelinek <jakub@redhat.com>
2215 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
2216 first shdr has sh_size == 0. Fail if e_shnum is large to cause
2217 arithmetic overflow when allocating the i_shdr array.
2218 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
2220 2005-05-25 Richard Henderson <rth@redhat.com>
2222 * elf64-alpha.c: Update all function definitions to ISO C. Remove
2223 all function prototypes; rearrange functions into def-use order.
2225 2005-05-25 Richard Henderson <rth@redhat.com>
2227 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
2228 in the presence of deleting elements.
2229 (elf64_alpha_size_got_sections): Zero dead got section size.
2231 2005-05-23 Fred Fish <fnf@specifixinc.com>
2233 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
2234 (struct funcinfo): Add caller_func, caller_file, caller_line.
2235 tag, and nesting_level members.
2236 (lookup_address_in_function_table): Change first passed parameter
2237 from "struct funcinfo *" to "struct comp_unit *".
2238 (lookup_address_in_function_table): Dereference unit to find function
2240 (lookup_address_in_function_table): Traverse the function list to
2241 create a chain of inlined functions back to the first non inlined
2243 (scan_unit_for_functions): Remember tag and nesting level. Handle
2244 DW_AT_call_file and DW_AT_call_line.
2245 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
2246 call to pass unit pointer instead of function table pointer. For
2247 inlined functions, save pointer to the inliner chain.
2248 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
2249 (_bfd_dwarf2_find_inliner_info): New function that returns information
2250 from the inliner chain after a call to bfd_find_nearest_line.
2252 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
2253 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
2254 NAME##_find_inliner_info.
2255 (bfd_target): Add _bfd_find_inliner_info.
2256 * bfd-in2.h: Regenerate.
2258 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
2259 macro that always returns bfd_false.
2260 (_bfd_dwarf2_find_inliner_info): Declare.
2261 * libbfd.h: Regenerate.
2263 * elf32-arm.c (elf32_arm_find_inliner_info): New function
2264 that calls _bfd_dwarf2_find_inliner_info.
2265 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
2267 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
2268 that calls _bfd_dwarf2_find_inliner_info.
2269 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
2270 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
2271 _bfd_mips_elf_find_inliner_info.
2272 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
2273 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
2275 * elf.c (_bfd_elf_find_inliner_info): New function that calls
2276 _bfd_dwarf2_find_inliner_info.
2277 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
2278 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
2279 _bfd_elf_find_inliner_info.
2281 * coffgen.c (coff_find_inliner_info): New function that
2282 calls _bfd_dwarf2_find_inliner_info.
2283 * libcoff-in.h (coff_find_inliner_info): Declare.
2284 * libcoff.h: Regenerate.
2285 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
2286 (pmac_xcoff_vec) Ditto.
2287 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
2288 (aix5coff64_vec): Ditto.
2290 * aout-target.h (MY_find_inliner_info): Define as
2291 _bfd_nosymbols_find_inliner_info.
2292 * aout-tic30.c (MY_find_inliner_info): Ditto.
2293 * binary.c (binary_find_inliner_info): Ditto.
2294 * i386msdos.c (msdos_find_inliner_info): Ditto.
2295 * ihex.c (ihex_find_inliner_info): Ditto.
2296 * libaout.h (aout_32_find_inliner_info): Ditto.
2297 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
2298 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
2299 * mmo.c (mmo_find_inliner_info): Ditto.
2300 * nlm-target.h (nlm_find_inliner_info): Ditto.
2301 * pef.c (bfd_pef_find_inliner_info): Ditto.
2302 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
2303 * srec.c (srec_find_inliner_info): Ditto.
2304 * tekhex.c (tekhex_find_inliner_info): Ditto.
2305 * versados.c (versados_find_inliner_info): Ditto.
2306 * xsym.c (bfd_sym_find_inliner_info): Ditto.
2308 * ieee.c (ieee_find_inliner_info): New function that always
2310 * oasys.c (oasys_find_inliner_info): Ditto.
2311 * vms.c (vms_find_inliner_info): Ditto.
2313 2005-05-24 Alan Modra <amodra@bigpond.net.au>
2315 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
2316 force old plt layout.
2318 2005-05-22 Richard Henderson <rth@redhat.com>
2320 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
2322 (elf64_alpha_check_relocs): Likewise.
2323 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
2324 non-allocated sections.
2326 2005-05-22 Richard Henderson <rth@redhat.com>
2328 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
2329 undefweak to use zero register. Call elf64_alpha_relax_got_load
2330 if not all uses removed.
2331 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
2332 (elf64_alpha_relax_section): Handle undefweak symbols.
2333 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
2334 (elf64_alpha_size_rela_got_1): Likewise.
2335 (elf64_alpha_relocate_section): Likewise.
2337 2005-05-22 Richard Henderson <rth@redhat.com>
2339 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
2340 on SEC_CODE sections.
2342 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2344 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
2346 (som_write_space_strings): Change type of tmp_space and p to char *.
2347 (som_write_symbol_strings): Likewise. Also change type of comp to
2349 (som_begin_writing): Change type of strings_size to unsigned int.
2350 (som_finish_writing): Likewise.
2351 (som_slurp_reloc_table): Change type of external_relocs to unsigned
2353 * som.h (struct som_section_data_struct): Change type of reloc_stream
2354 field to unsigned char *.
2356 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
2358 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
2359 copy relocations for VxWorks.
2361 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
2363 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
2365 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
2366 (ppc_elf_check_relocs): Set has_sda_refs.
2367 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
2368 copy relocations. Use has_sda_refs to place variables in .sbss.
2369 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
2372 2005-05-20 Bob Wilson <bob.wilson@acm.org>
2374 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
2375 xtensa_default_isa is initialized.
2377 2005-05-20 Alan Modra <amodra@bigpond.net.au>
2379 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
2380 for second and subsequent list entries. Only allocate multiple
2381 glink stubs when shared or pie.
2382 (ppc_elf_finish_dynamic_symbol): Break out early when only one
2383 glink stub is needed.
2385 2005-05-19 Zack Weinberg <zack@codesourcery.com>
2387 * Makefile.am: Have 'all' depend on 'info'.
2388 * Makefile.in: Regenerate.
2390 2005-05-19 Alan Modra <amodra@bigpond.net.au>
2392 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
2393 init_offset. Add init_got_refcount, init_plt_refcount,
2394 init_got_offset and init_plt_offset.
2395 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
2396 (_bfd_elf_link_hash_hide_symbol): Likewise.
2397 (_bfd_elf_link_hash_table_init): Likewise.
2398 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2399 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2400 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
2401 (bfd_elf_size_dynamic_sections): Likewise.
2402 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
2403 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
2404 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
2405 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
2406 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
2407 (struct plt_entry): New.
2408 (ppc_elf_link_hash_table_create): Set new init_plt fields.
2409 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
2410 use _bfd_elf_link_hash_copy_indirect.
2411 (update_plt_info, find_plt_ent): New functions.
2412 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
2413 and adjust for use of plt list rather than refcount.
2414 (ppc_elf_gc_sweep_hook): Likewise.
2415 (ppc_elf_tls_optimize): Likewise.
2416 (ppc_elf_adjust_dynamic_symbol): Likewise.
2417 (allocate_dynrelocs): Likewise.
2418 (ppc_elf_relax_section): Likewise.
2419 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
2420 when performing a relocatable link.
2421 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
2422 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
2425 2005-05-19 Alan Modra <amodra@bigpond.net.au>
2427 * elf.c (assign_file_positions_for_segments): Use maximum of
2428 maxpagesize and section alignment when adjusting initial
2429 segment offset and section offsets.
2431 2005-05-18 Zack Weinberg <zack@codesourcery.com>
2433 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
2436 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
2438 * elf.c (group_signature): Undo the last change. Check if the
2439 symbol table section is correct.
2441 2005-05-17 Zack Weinberg <zack@codesourcery.com>
2443 * elf32-arm.c: Wherever possible, use official reloc names
2445 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
2446 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
2447 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
2448 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
2449 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
2450 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
2451 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
2452 Add many new relocations from AAELF.
2453 (elf32_arm_howto_from_type): Update to match.
2454 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
2455 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
2456 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
2457 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
2458 (elf32_arm_final_link_relocate): Add support for
2459 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
2460 case entries redundant with default.
2462 * reloc.c: Reorganize ARM relocations. Add Thumb
2463 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
2464 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
2465 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
2466 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
2467 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
2468 * bfd-in2.h, libbfd.h: Regenerate.
2470 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
2472 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
2474 * format.c (bfd_check_format_matches): Set output_has_begun
2476 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
2477 special case for both_direction.
2479 2005-05-17 Nick Clifton <nickc@redhat.com>
2481 * elf.c (group_signature): Check for a group section which is
2482 actually a (corrupt) symbol table section in disguise and prevent
2483 an infinite loop from occurring.
2485 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2487 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
2490 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2492 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
2493 predicate on slot 0 only if slot 0 isn't br.
2495 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2498 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
2499 empty sdynbss section.
2500 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
2502 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
2504 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
2507 2005-05-17 Alan Modra <amodra@bigpond.net.au>
2509 * elf32-ppc.c (LIS_11. LIS_12): Define.
2510 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
2511 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
2512 for --data-plt when building non-pie executables.
2514 2005-05-17 Nick Clifton <nickc@redhat.com>
2516 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
2517 the situation where a symbols's section is not known but a section
2518 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
2521 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
2522 the presence of a symbol table to just before the symbol table is
2525 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
2528 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
2529 (elfNN_ia64_relax_section): Use it.
2531 2005-05-14 Mark Kettenis <kettenis@gnu.org>
2533 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
2536 2005-05-14 Alan Modra <amodra@bigpond.net.au>
2538 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
2540 (ppc_elf_finish_dynamic_sections): Likewise.
2542 2005-05-13 Fred Fish <fnf@specifixinc.com>
2544 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
2545 * libbfd.h: Rebuilt.
2547 2005-05-13 Bob Wilson <bob.wilson@acm.org>
2549 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
2550 periods in linkonce_kind values.
2552 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
2554 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
2555 against protected function when building executable.
2557 2005-05-12 Alan Modra <amodra@bigpond.net.au>
2559 * elf32-ppc.c (LWZU_0_X_11): Delete.
2560 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
2561 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
2562 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
2564 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
2566 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
2567 Generate .glink branch table and updated stubs.
2569 2005-05-11 Alan Modra <amodra@bigpond.net.au>
2571 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
2572 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
2573 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
2574 (CROR_151515, CROR_313131): Delete.
2575 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
2576 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
2577 LWZU_0_X_11): Define.
2578 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
2579 and R_PPC_REL16_HA entries.
2580 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
2581 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
2582 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
2583 new_plt, and old_plt.
2584 (ppc_elf_create_dynamic_sections): Create .glink section.
2585 (ppc_elf_check_relocs): Set new_plt and old_plt.
2586 (ppc_elf_select_plt_layout): New function.
2587 (ppc_elf_tls_setup): Set plt output section elf type and flags.
2588 (allocate_got): Handle differences between old and new got layout.
2589 (allocate_dynrelocs): Likewise for plt.
2590 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
2591 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
2592 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
2593 destination of R_PPC_PLTREL24 relocs.
2594 (ppc_elf_relocate_section): Handle new relocs and changed destination
2596 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
2597 differences in layout.
2598 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
2599 put a blrl in new got. Write glink contents.
2600 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
2601 * libbfd.h: Regenerate.
2602 * bfd-in2.h: Regenerate.
2604 2005-05-11 Andreas Schwab <schwab@suse.de>
2606 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
2609 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
2611 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
2612 section if SEC_ALLOC isn't set.
2614 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
2616 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
2617 * acinclude.m4: Don't sinclude accross.m4.
2618 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
2620 2005-05-09 Alan Modra <amodra@bigpond.net.au>
2622 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
2623 (ppc64_elf_add_symbol_hook): Set has_dotsym.
2624 (ppc64_elf_check_directives): Only process syms when has_dotsym.
2625 (func_desc_adjust): Hide fake function descriptors when function
2626 code entry is defined.
2627 (adjust_opd_syms): Adjust for deleted_section becoming union field.
2629 2005-05-09 Alan Modra <amodra@bigpond.net.au>
2631 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
2633 2005-05-08 Dave Korn <dave.korn@artimi.com>
2635 * coff-tic80.c: Undefine _CONST after system headers to prevent
2636 clash with tic80-specific definition in include/coff/tic80.h
2638 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
2641 * elflink.c (elf_link_output_extsym): Use output_bfd if
2642 h->root.u.def.section is bfd_abs_section_ptr when reporting
2645 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
2647 * elf-bfd.h (elf_backend_data): Update special_sections to
2648 array of pointer to bfd_elf_special_section.
2649 * elf.c (special_sections): Likewise.
2650 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
2651 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
2652 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
2653 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
2654 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
2655 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
2656 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
2657 * elf32-v850.c (v850_elf_special_sections): Likewise.
2658 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
2659 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
2660 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
2661 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
2662 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
2663 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
2664 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
2665 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
2667 * elf.c (get_special_section): Updated.
2669 2005-05-07 Alan Modra <amodra@bigpond.net.au>
2671 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
2672 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
2673 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
2675 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2676 * elf32-frv.c (_frv_create_got_section): Likewise.
2677 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
2678 (elf_backend_got_symbol_offset): Don't define.
2679 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
2680 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
2682 (ppc_elf_create_got): Tidy.
2683 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
2684 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
2685 (ppc_elf_gc_sweep_hook): Likewise.
2686 (ppc_elf_relocate_section): Likewise.
2687 (ppc_elf_finish_dynamic_symbol): Likewise.
2688 (allocate_got): New function.
2689 (allocate_dynrelocs): Use allocate_got.
2690 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
2691 so that local got can refcount it. Set got_header_size.
2692 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
2694 (ppc_elf_finish_dynamic_sections): Likewise.
2695 (elf_backend_got_symbol_offset): Don't define.
2696 (elf_backend_got_header_size): Ditto.
2698 2005-05-05 Steve Ellcey <sje@cup.hp.com>
2700 * configure.in (ACX_HEADER_STRING): New.
2701 * configure: Regenerate.
2702 * config.in: Regenerate.
2703 * sysdep.h (STRING_WITH_STRINGS): Use.
2705 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2707 * elf.c (_bfd_elf_close_and_cleanup): Only call
2708 _bfd_dwarf2_cleanup_debug_info on bfd_object.
2710 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2712 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
2713 "__bss_start" instead of "_edata" as fallback.
2715 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2717 * bfd-in2.h: Regenerated.
2719 2005-05-05 Paul Brook <paul@codesourcery.com>
2721 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
2722 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
2724 * configure: Regenerate.
2725 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
2726 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
2727 (elf32-i386.lo): Depend on elf-vxworks.h.
2728 (elf-vxworks.lo): New rule.
2729 * Makefile.in: Regenerate.
2730 * elf-bfd.h (elf_backend_data): Update type of
2731 elf_backend_emit_relocs.
2732 (_bfd_elf_link_output_relocs): Update prototype.
2733 * elflink.c (_bfd_elf_link_output_relocs): Always use
2734 bed->elf_backend_emit_relocs when outputting relocations.
2735 * elfxx-target.h (elf_backend_emit_relocs): Default to
2736 _bfd_elf_link_output_relocs.
2737 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
2738 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
2739 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
2740 (elf_i386_plt0_entry): Remove padding.
2741 (elf_i386_pic_plt0_entry): Ditto.
2742 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
2743 (PLT_NON_JUMP_SLOT_RELOCS): Define.
2744 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
2745 plt0_pad_byte fields.
2746 (elf_i386_link_hash_table_create): Zero them.
2747 (elf_i386_create_dynamic_sections): Create static relocation section.
2748 (allocate_dynrelocs): Allocate space for static PLT relocations.
2749 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
2750 symbols. Give PLT symbols function type. Don't strip PLT sections
2751 if we have exported symbols from them.
2752 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
2753 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
2755 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
2756 Add relocation for GOT location. Fill in PLT static relocations.
2757 (elf_i386_vxworks_link_hash_table_create): New function.
2758 (elf_i386_vxworks_link_output_symbol_hook): New function.
2759 * elf-vxworks.h: New file.
2761 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2763 * section.c (bfd_make_section_anyway_with_flags): New.
2764 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
2765 (bfd_make_section_with_flags): New.
2766 (bfd_make_section): Call bfd_make_section_with_flags.
2768 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
2769 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
2770 instead of bfd_make_section/bfd_make_section and don't call
2771 bfd_set_section_flags.
2772 (mn10300_elf_check_relocs): Likewise.
2773 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
2774 * elf32-arm.c (create_got_section): Likewise.
2775 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
2776 (elf32_arm_check_relocs): Likewise.
2777 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2778 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
2779 (_frv_create_got_section): Likewise.
2780 (elf32_frvfdpic_create_dynamic_sections): Likewise.
2781 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2782 (elf32_hppa_check_relocs): Likewise.
2783 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
2784 (i370_elf_check_relocs): Likewise.
2785 * elf32-i386.c (create_got_section): Likewise.
2786 (elf_i386_check_relocs): Likewise.
2787 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2788 (create_got_section): Likewise.
2789 (m32r_elf_create_dynamic_sections): Likewise.
2790 (m32r_elf_check_relocs): Likewise.
2791 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2792 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2793 (ppc_elf_create_dynamic_sections): Likewise.
2794 (ppc_elf_add_symbol_hook): Likewise.
2795 (ppc_elf_check_relocs): Likewise.
2796 * elf32-s390.c (create_got_section): Likewise.
2797 (elf_s390_check_relocs): Likewise.
2798 * elf32-sh.c (create_got_section): Likewise.
2799 (sh_elf_create_dynamic_sections): Likewise.
2800 (sh_elf_check_relocs): Likewise.
2801 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2802 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2803 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2804 (add_extra_plt_sections): Likewise.
2805 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2806 (elf64_alpha_create_got_section): Likewise.
2807 (elf64_alpha_create_dynamic_sections): Likewise.
2808 (elf64_alpha_check_relocs): Likewise.
2809 * elf64-hppa.c (get_reloc_section): Likewise.
2810 (get_opd): Likewise.
2811 (get_plt): Likewise.
2812 (get_dlt): Likewise.
2813 (get_stub): Likewise.
2814 (elf64_hppa_create_dynamic_sectionso): Likewise.
2815 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
2816 * elf64-ppc.c (create_linkage_sections): Likewise.
2817 (ppc64_elf_check_relocs): Likewise.
2818 * elf64-s390.c (create_got_section): Likewise.
2819 (elf_s390_check_relocs): Likewise.
2820 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
2821 (sh64_elf64_create_dynamic_sections): Likewise.
2822 * elf64-x86-64.c (create_got_section): Likewise.
2823 (elf64_x86_64_check_relocs): Likewise.
2824 * elflink.c (_bfd_elf_create_got_section): Likewise.
2825 (_bfd_elf_link_create_dynamic_sections): Likewise.
2826 (elf_link_add_object_symbols): Likewise.
2827 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2828 (elfNN_ia64_create_dynamic_sections): Likewise.
2829 (get_fptr): Likewise.
2830 (get_pltoff): Likewise.
2831 (get_reloc_section): Likewise.
2832 (elfNN_ia64_object_p): Likewise.
2833 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
2834 (mips_elf_create_compact_rel_section): Likewise.
2835 (mips_elf_create_got_section): Likewise.
2836 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2837 * elfxx-sparc.c (create_got_section): Likewise.
2838 (_bfd_sparc_elf_check_relocs): Likewise.
2840 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
2841 on linker created sections.
2843 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2846 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
2847 script on executable.
2849 2005-05-05 John Levon <levon@movementarian.org>
2851 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
2852 allocated memory before returning.
2853 (decode_line_info): Likewise.
2854 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
2855 allocated by functions in this file.
2856 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
2857 * elf.c (_bfd_elf_close_and_cleanup): Call
2858 _bfd_dwarf2_cleanup_debug_info.
2860 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2862 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
2863 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
2864 * configure, config.in, Makefile.in: Regenerate.
2865 * sysdep.h (stpcpy): Revert last change.
2867 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2869 * sysdep.h (stpcpy): Wrap declaration in parentheses.
2871 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2873 * elfxx-ia64.c (ARCH_SIZE): New.
2874 (LOG_SECTION_ALIGN): Likewise.
2875 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
2876 align relocation sections.
2877 (get_fptr): Likewise.
2878 (get_reloc_section): Likewise.
2879 (elfNN_ia64_tprel_base): Likewise.
2880 (elfNN_ia64_check_relocs): Support 32bit relocations.
2881 (allocate_global_fptr_got): Likewise.
2882 (allocate_dynrel_entries): Likewise.
2883 (set_got_entry): Likewise.
2884 (set_pltoff_entry): Likewise.
2885 (elfNN_ia64_relocate_section): Likewise.
2887 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2889 * configure.in: Add AC_CHECK_DECLS(stpcpy).
2890 * configure: Regenerate.
2891 * config.in: Likewise.
2893 * sysdep.h (stpcpy): New.
2895 2005-05-04 Nick Clifton <nickc@redhat.com>
2897 * Update the address and phone number of the FSF organization in
2898 the GPL notices in the following files:
2899 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
2900 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
2901 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
2902 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
2903 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
2904 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
2905 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
2906 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
2907 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
2908 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
2909 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
2910 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
2911 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
2912 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
2913 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
2914 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
2915 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
2916 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
2917 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
2918 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
2919 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
2920 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2921 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2922 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2923 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2924 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2925 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2926 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2927 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2928 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2929 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2930 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2931 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2932 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2933 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2934 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2935 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2936 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2937 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2938 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2939 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2940 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2941 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2942 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2943 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2944 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2945 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2946 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2947 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2948 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2949 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2950 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2951 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2952 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2953 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2954 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2955 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2956 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2957 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2958 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2959 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2960 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2961 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2962 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2963 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2964 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2965 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2966 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2967 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2968 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2971 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2973 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2974 * bfd-in2.h: Regenerated.
2976 * elflink.c (bfd_elf_set_symbol): New.
2977 (_bfd_elf_provide_symbol): Call it.
2978 (_bfd_elf_provide_section_bound_symbols): New.
2980 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2982 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2983 at the end, if a strong definition has already been seen.
2985 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2987 * section.c (struct bfd_section): Replace link_order_head and
2988 link_order_tail with map_head and map_tail union.
2989 (STD_SECTION): Update.
2990 (_bfd_strip_section_from_output): Delete.
2991 * aoutx.h: Update throughout for above changes.
2992 * coff-ppc.c: Likewise.
2993 * cofflink.c: Likewise.
2994 * ecoff.c: Likewise.
2995 * elf-eh-frame.c: Likewise.
2996 * elf-m10300.c: Likewise.
2998 * elf32-arm.c: Likewise.
2999 * elf32-cris.c: Likewise.
3000 * elf32-hppa.c: Likewise.
3001 * elf32-i386.c: Likewise.
3002 * elf32-m32r.c: Likewise.
3003 * elf32-m68hc1x.c: Likewise.
3004 * elf32-m68k.c: Likewise.
3005 * elf32-ppc.c: Likewise.
3006 * elf32-s390.c: Likewise.
3007 * elf32-sh.c: Likewise.
3008 * elf32-vax.c: Likewise.
3009 * elf32-xtensa.c: Likewise.
3010 * elf64-alpha.c: Likewise.
3011 * elf64-hppa.c: Likewise.
3012 * elf64-ppc.c: Likewise.
3013 * elf64-s390.c: Likewise.
3014 * elf64-sh64.c: Likewise.
3015 * elf64-x86-64.c: Likewise.
3016 * elflink.c: Likewise.
3017 * elfxx-ia64.c: Likewise.
3018 * elfxx-mips.c: Likewise.
3019 * elfxx-sparc.c: Likewise.
3020 * linker.c: Likewise.
3021 * merge.c: Likewise.
3022 * pdp11.c: Likewise.
3023 * xcofflink.c: Likewise.
3024 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
3025 out from bfd_elf_size_dynamic_sections.
3026 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
3027 * bfd-in2.h: Regenerate.
3029 2005-05-04 Alan Modra <amodra@bigpond.net.au>
3031 * section.c (bfd_section_list_remove): Don't clear s->next.
3032 (bfd_section_list_append): Always init s->prev.
3033 (bfd_section_list_prepend): Define.
3034 (bfd_section_list_insert_after): Minor optimization.
3035 (bfd_section_removed_from_list): Rewrite.
3036 * elf.c (assign_section_numbers): Simplify list traversal now that
3037 bfd_section_list_remove doesn't destroy removed section next ptr.
3038 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3039 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
3040 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
3041 * bfd-in2.h: Regenerate.
3043 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
3045 * bfd.c (bfd): Remove section_tail and add section_last.
3046 (bfd_preserve): Likewise.
3047 (bfd_preserve_save): Likewise.
3048 (bfd_preserve_restore): Likewise.
3049 * opncls.c (_bfd_new_bfd): Likewise.
3051 * coffcode.h (coff_compute_section_file_positions): Updated.
3052 (coff_compute_section_file_positions): Likewise.
3053 * elf.c (assign_section_numbers): Likewise.
3054 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3055 * elf64-mmix.c (mmix_elf_final_link): Likewise.
3056 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
3057 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
3058 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3059 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3061 * ecoff.c (bfd_debug_section): Initialize prev.
3063 * section.c (bfd_section): Add prev.
3064 (bfd_section_list_remove): Updated.
3065 (bfd_section_list_append): New.
3066 (bfd_section_list_insert_after): New.
3067 (bfd_section_list_insert_before): New.
3068 (bfd_section_list_insert): Removed.
3069 (bfd_section_removed_from_list): Updated.
3070 (STD_SECTION): Initialize prev.
3071 (bfd_section_init): Updated.
3072 (bfd_section_list_clear): Updated.
3074 * bfd-in2.h: Regenerated.
3076 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
3078 * elf.c (_bfd_elf_new_section_hook): Don't call
3079 _bfd_elf_get_sec_type_attr on sections from input files.
3081 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
3083 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
3084 hash table size 16699 instead of bfd_hash_table_init.
3086 2005-05-01 Paul Brook <paul@codesourcery.com>
3088 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
3089 definition has already been seen.
3091 2005-05-01 Paul Brook <paul@codesourcery.com>
3093 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
3094 R_ARM_PLT32 the same as R_ARM_PC24.
3095 (arm_add_to_rel): Ditto.
3097 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
3099 * config.bfd: Add h8300*-*-rtemscoff.
3100 Switch h8300*-*-rtems* to elf.
3102 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
3104 * aclocal.m4, Makefile.in: Regnerated.
3106 2005-04-28 Paul Brook <paul@codesourcery.com>
3108 Merge changes only applied to Makefile.in.
3109 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
3110 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
3111 (elfxx-sparc.lo): New rule.
3112 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
3113 (elf64-sparc.lo): Likewise.
3115 2005-04-28 Julian Brown <julian@codesourcery.com>
3117 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
3120 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
3122 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
3124 * elf.c (bfd_elf_sym_name): Updated.
3125 (group_signature): Likewise.
3126 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3127 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
3128 (ppc64_elf_edit_toc): Likewise.
3129 (ppc64_elf_relocate_section): Likewise.
3130 * elfcode.h (elf_slurp_symbol_table): Likewise.
3131 * elflink.c (elf_link_input_bfd): Likewise.
3133 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
3134 bfd_elf_sym_name to get local symbol name when reporting errors.
3136 2005-04-27 Nick Clifton <nickc@redhat.com>
3138 * elflink.c (elf_link_input_bfd): Handle the case where a badly
3139 formatted input file results in a reloc which has no associated
3142 2005-04-26 Jerome Guitton <guitton@gnat.com>
3144 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
3146 2005-04-25 David S. Miller <davem@davemloft.net>
3148 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
3149 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
3150 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
3153 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
3156 * elflink.c (elf_link_input_bfd): Make non-debugging reference
3157 to discarded section an error.
3159 2005-04-21 Jerome Guitton <guitton@gnat.com>
3161 * configure.in: Replace BFD_NEED_DECLARATION checks by the
3162 corresponding AC_CHECK_DECLS.
3163 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
3165 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
3166 * configure: Regenerate.
3169 2005-04-21 Andreas Schwab <schwab@suse.de>
3171 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
3172 unsigned from type of dynamic_interpreter.
3173 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
3176 * elf.c (assign_section_numbers): Fix comment.
3178 2005-04-21 Jerome Guitton <guitton@gnat.com>
3180 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
3181 for struct som_exec_auxhdr fields.
3183 2005-04-21 Nick Clifton <nickc@redhat.com>
3185 * aout-adobe.c: Convert to ISO C and fix formatting.
3186 * aout-arm.c: Convert to ISO C and fix formatting.
3187 * aout-cris.c: Convert to ISO C and fix formatting.
3188 * aout-ns32k.c: Convert to ISO C and fix formatting.
3189 * aout-tic30.c: Convert to ISO C and fix formatting.
3190 * coffcode.h: Convert to ISO C and fix formatting.
3191 * coffswap.h: Convert to ISO C and fix formatting.
3192 * i386aout.c: Convert to ISO C and fix formatting.
3193 * libaout.h: Convert to ISO C and fix formatting.
3194 * libcoff-in.h: Convert to ISO C and fix formatting.
3195 * libcoff.h: Convert to ISO C and fix formatting.
3196 * libecoff.h: Convert to ISO C and fix formatting.
3197 * libnlm.h: Convert to ISO C and fix formatting.
3198 * libpei.h: Convert to ISO C and fix formatting.
3199 * libxcoff.h: Convert to ISO C and fix formatting.
3200 * nlm-target.h: Convert to ISO C and fix formatting.
3201 * nlm.c: Convert to ISO C and fix formatting.
3202 * nlm32-alpha.c: Convert to ISO C and fix formatting.
3203 * nlm32-i386.c: Convert to ISO C and fix formatting.
3204 * nlm32-ppc.c: Convert to ISO C and fix formatting.
3205 * nlm32-sparc.c: Convert to ISO C and fix formatting.
3206 * nlmcode.h: Convert to ISO C and fix formatting.
3207 * nlmswap.h: Convert to ISO C and fix formatting.
3208 * pe-mips.c: Convert to ISO C and fix formatting.
3209 * peXXigen.c: Convert to ISO C and fix formatting.
3210 * peicode.h: Convert to ISO C and fix formatting.
3211 * vms-gsd.c: Convert to ISO C and fix formatting.
3212 * vms-hdr.c: Convert to ISO C and fix formatting.
3213 * vms-misc.c: Convert to ISO C and fix formatting.
3214 * vms-tir.c: Convert to ISO C and fix formatting.
3215 * vms.c: Convert to ISO C and fix formatting.
3216 * vms.h: Convert to ISO C and fix formatting.
3218 * coffgen.c (coff_print_symbol): Restore correct formatting of
3221 2005-04-20 David S. Miller <davem@davemloft.net>
3223 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
3224 (_bfd_sparc_elf_link_hash_table_create): Likewise.
3225 (allocate_dynrelocs): Likewise.
3227 2005-04-20 Jerome Guitton <guitton@gnat.com>
3229 * configure.in: Fix the check for basename declaration. Add check
3230 for declarations of ftello, ftello64, fseeko, fseeko64.
3231 * configure: Regenerate.
3233 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
3235 2005-04-19 David S. Miller <davem@davemloft.net>
3237 * elfxx-sparc.c: New file.
3238 * elfxx-sparc.h: New file.
3239 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
3240 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
3241 (elfxx-sparc.lo): New rule.
3242 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
3243 (elf64-sparc.lo): Likewise.
3244 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
3245 (bfd_elf64_sparc_vec): Likewise.
3246 * configure: Regenerate.
3247 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
3248 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
3249 which is more consistent with elf32-sparc.c
3251 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
3253 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
3254 (mips_elf_create_local_got_entry): Check h->root.forced_local.
3256 2005-04-19 Alan Modra <amodra@bigpond.net.au>
3258 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
3259 dynamic relocs in non-SEC_ALLOC sections.
3260 (ppc_elf_gc_sweep_hook): Likewise.
3261 (ppc_elf_relax_section): Likewise.
3262 (ppc_elf_relocate_section): Likewise.
3264 2005-04-18 Nick Clifton <nickc@redhat.com>
3266 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
3267 assigning a value to return_value.
3269 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
3272 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
3275 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
3278 * elf.c (setup_group): Properly handle zero group count.
3280 2005-04-17 Mark Kettenis <kettenis@gnu.org>
3282 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
3283 (som_is_subspace, compare_subspaces, som_compute_checksum)
3284 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
3286 (hppa_som_reloc, compare_syms, compare_subspaces)
3287 (som_print_symbol, som_get_section_contents)
3288 (som_set_section_contents): Remove space after 'void *'.
3289 (som_bfd_print_private_bfd_data): Use %lx to print longs.
3290 (som_bfd_merge_private_bfd_data)
3291 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
3294 2004-04-15 Julian Brown <julian@codesourcery.com>
3296 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3297 * bfd-in2.h: Regenerate.
3298 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
3299 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
3300 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
3301 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
3302 relocations if requested to.
3303 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
3304 use_blx rather than symbian_p.
3305 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
3306 use_blx is in effect.
3307 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
3310 2005-04-15 Nick Clifton <nickc@redhat.com>
3312 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
3315 2005-04-15 Alan Modra <amodra@bigpond.net.au>
3318 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
3319 used as a list pointer.
3321 2005-04-14 Alan Modra <amodra@bigpond.net.au>
3323 * Makefile.am (NO_WERROR): Define.
3324 * warning.m4: New file
3325 * acinclude.m4: Include warning.m4.
3326 * configure.in: Invoke AM_BINUTILS_WARNINGS.
3327 * Makefile.in: Regenerate.
3328 * configure: Regenerate.
3330 2005-04-14 Alan Modra <amodra@bigpond.net.au>
3332 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
3333 Write trailing padding.
3335 * merge.c (merge_strings): Round up section size for alignment.
3337 2005-04-14 David S. Miller <davem@davemloft.net>
3339 Add TLS support for 64-bit Sparc ELF.
3340 * elf64-sparc.c (sparc64_elf_dyn_relocs,
3341 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
3342 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
3343 sparc64_elf_hash_entry, sparc64_elf_tdata,
3344 sparc64_elf_local_got_tls_type): New defines.
3345 (sparc64_elf_mkobject): New function.
3346 (sparc64_elf_link_hash_table): Add members for dynamic linker
3347 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
3348 uion to track TLS GOT references. Add sym_sec to cache
3349 mappings from local sym to section.
3350 (link_hash_newfunc): New function.
3351 (sparc64_elf_bfd_link_hash_table_create): Rename to
3352 sparc64_elf_link_hash_table_create for consistency.
3353 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
3354 (sparc64_elf_create_dynamic_sections): Initialize new section
3355 members of sparc64_elf_link_hash_table. Only init srelbss
3357 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
3359 (SPARC_NOP): Define.
3360 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
3361 sparc64_elf_plt_ptr_offset): Delete.
3362 (sparc64_plt_entry_build): New function to build PLT entries
3363 gradually instread of all at once at the end of linking.
3364 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
3365 local vars. Get them from sparc64_elf_hash_table instead.
3366 Check early on if r_symndx is in bounds. Handle TLS transitions.
3367 Account for TLS GOT references and DF_STATIC_TLS, as needed.
3368 For TLS relocs, record the tls_type in either
3369 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
3370 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
3371 to the __tls_get_addr symbol. For PLT relocs, track references
3372 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
3373 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
3374 symbol references, count the number of relocations needed for
3375 that symbol. For default switch case, don't error, this lets
3376 the TLS relocs not explicitly handled by this function get
3378 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
3379 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
3380 it from sparc64_elf_hash_table. Store the real PLT offset
3381 in h->plt.offset, and build PLT entries one at a time. Also
3382 get .dynbss section pointer from htab.
3383 (allocate_dynrelocs, readonly_dynrelocs,
3384 sparc64_omit_section_dynsym): New functions.
3385 (sparc64_elf_omit_section_dynsym): Use these new functions as
3387 (dtpoff_base, tpoff): New functions.
3388 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
3389 locals, get them from sparc64_elf_hash_table. Handle TLS
3390 relocations and refcounting in main relocation loop.
3391 (sparc64_elf_finish_dynamic_symbol): Use
3392 sparc64_elf_link_hash_table. Build PLT entries as we see
3393 them. Handle TLS GOT relocations.
3394 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
3395 from sparc64_elf_hash_table. Initialize only PLT header
3396 not all entries since we not build PLT entries one by one.
3397 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
3398 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
3399 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
3401 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
3403 * elflink.c (elf_link_input_bfd): Update check for removed
3406 2005-04-12 Alan Modra <amodra@bigpond.net.au>
3408 * Makefile.am: Run "make dep-am".
3409 * Makefile.in: Regenerate.
3410 * aclocal.m4: Regenerate.
3411 * libcoff.h: Regenerate.
3413 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
3415 * linker.c (_bfd_generic_link_output_symbols): Also check if
3416 the output section of an input section has been removed from
3419 * section.c (bfd_section_list_remove): Clear the next field
3420 of the removed section.
3421 (bfd_section_removed_from_list): New.
3422 * bfd-in2.h: Regenerated.
3424 2005-04-11 David S. Miller <davem@davemloft.net>
3426 * elf32-sparc.c (elf32_sparc_relocate_section,
3427 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
3428 R_SPARC_TLS_LE_{HIX22,LOX10}.
3429 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
3430 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
3431 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
3432 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
3434 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
3436 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
3438 2005-04-11 Nick Clifton <nickc@redhat.com>
3440 * aout-target.h: Convert to ISO C.
3441 * aoutf1.h: Convert to ISO C.
3442 * aoutx.h: Convert to ISO C.
3443 * bout.c: Convert to ISO C.
3444 * dwarf1.c: Convert to ISO C.
3445 * ecoffswap.h: Convert to ISO C.
3446 * freebsd.h: Convert to ISO C.
3447 * genlink.h: Convert to ISO C.
3448 * ieee.c: Convert to ISO C.
3449 * ihex.c: Convert to ISO C.
3450 * libcoff-in.h: Convert to ISO C.
3451 * mach-o.c: Convert to ISO C.
3452 * mach-o.h: Convert to ISO C.
3453 * netbsd.h: Convert to ISO C.
3454 * ns32k.h: Convert to ISO C.
3455 * ns32knetbsd.c: Convert to ISO C.
3456 * oasys.c: Convert to ISO C.
3457 * pdp11.c: Convert to ISO C.
3458 * pef-traceback.h: Convert to ISO C.
3459 * pef.c: Convert to ISO C.
3460 * pef.h: Convert to ISO C.
3461 * riscix.c: Convert to ISO C.
3462 * som.c: Convert to ISO C.
3463 * som.h: Convert to ISO C.
3464 * srec.c: Convert to ISO C.
3465 * stabs.c: Convert to ISO C.
3466 * sunos.c: Convert to ISO C.
3467 * tekhex.c: Convert to ISO C.
3468 * versados.c: Convert to ISO C.
3469 * version.h: Convert to ISO C.
3470 * xcoff-target.h: Convert to ISO C.
3471 * xcofflink.c: Convert to ISO C.
3472 * xsym.c: Convert to ISO C.
3473 * xsym.h: Convert to ISO C.
3475 2005-04-08 Paul Brook <paul@codesourcery.com>
3477 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
3478 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
3479 (ARM2THUMB_PIC_GLUE_SIZE): Define.
3480 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
3481 (elf32_arm_to_thumb_stub): Create PIC stubs.
3482 (record_arm_to_thumb_glue): Use different stub size for relocatable
3485 2005-04-05 Alan Modra <amodra@bigpond.net.au>
3487 * elf64-ppc.c (dec_dynrel_count): New function split out from
3488 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
3489 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
3490 (ppc64_elf_tls_optimize): Likewise.
3492 2005-04-05 Mark Kettenis <kettenis@gnu.org>
3494 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
3495 CORE_WCOOKIE_OFFSET.
3496 (SPARC64_WCOOKIE_OFFSET): New.
3497 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
3499 2005-04-05 Nick Clifton <nickc@redhat.com>
3501 * po/rw.po: New translation: Kinyarwanda
3502 * configure.in (ALL_LINGUAS): Add rw
3503 * configure: Regenerate.
3505 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
3507 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
3508 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
3509 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
3511 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
3512 to check for SHT_MIPS_OPTIONS sections.
3513 (_bfd_mips_elf_set_section_contents): Likewise.
3515 2005-04-04 Eric Christopher <echristo@redhat.com>
3517 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
3518 Clean up gp handling code.
3520 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
3522 * elf.c (bfd_elf_set_group_contents): Ignore linker created
3524 (assign_section_numbers): Accept link_info. Check SHT_GROUP
3525 sections for relocatable files only. Remove the linker created
3527 (_bfd_elf_compute_section_file_positions): Pass link_info to
3528 assign_section_numbers.
3530 * elfxx-ia64.c (elfNN_ia64_object_p): New.
3531 (elf_backend_object_p): Defined.
3533 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
3535 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
3537 2005-04-03 Fred Fish <fnf@specifixinc.com>
3539 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
3540 dwarf_ranges_size members.
3541 (struct comp_unit): Add base_address member.
3542 (struct funcinfo): Replace low/high members with an arange.
3543 (arange_add): Replace incoming "unit" parameter with "abfd" and
3544 "first_arange" pointers. Reorganize/rewrite function body.
3545 (decode_line_info): Change arange_add call to pass bfd and arange
3547 (lookup_address_in_line_info_table): Use arange list instead of
3548 individual low/high members. Walk function's arange list to find
3549 lowest PC in list, to test for overlapping functions.
3550 (read_debug_ranges): New function, reads the debug_ranges section.
3551 (lookup_address_in_function_table): Use arange list instead of
3552 individual low/high members. Rewrite to find smallest range that
3554 (read_rangelist): Read a given rangelist from debug_ranges.
3555 (scan_unit_for_functions): Use arange list instead of individual
3556 low/high members. Handle a DW_AT_ranges attribute.
3557 (parse_comp_unit): Use arange list instead of individual low/high
3558 members. Save comp unit base address. Handle a DW_AT_ranges
3561 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
3563 * elf.c (assign_section_numbers): Really use the kept section.
3565 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3567 * elf-bfd.h (_bfd_elf_check_kept_section): New.
3569 * elf.c (assign_section_numbers): When sh_link points to a
3570 discarded section, call _bfd_elf_check_kept_section to see if
3571 the kept section can be used. Otherwise reject sh_link
3572 pointing to discarded section.
3574 * elflink.c (_bfd_elf_check_kept_section): New.
3575 (elf_link_input_bfd): Use it.
3577 2005-04-01 Alan Modra <amodra@bigpond.net.au>
3579 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
3580 that we no longer need.
3582 2005-04-01 Alan Modra <amodra@bigpond.net.au>
3584 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
3586 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
3588 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3590 * elf.c (assign_section_numbers): Fix a typo.
3592 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3594 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
3596 (_bfd_elf_section_already_linked): Likewise.
3598 2005-03-31 Jerome Guitton <guitton@gnat.com>
3600 * config.in: Regenerate.
3602 2005-03-31 Jerome Guitton <guitton@gnat.com>
3604 * config.in (HAVE_DECL_BASENAME): New configure macro.
3605 * configure.in: Check for basename.
3606 * configure: Regenerate.
3608 2005-03-30 Julian Brown <julian@codesourcery.com>
3610 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
3611 bfd_elf32_is_arm_mapping_symbol_name.
3612 * bfd-in2.h: Regenerate.
3613 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
3614 bfd_elf32_is_arm_mapping_symbol_name.
3615 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
3616 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
3617 (arm_elf_find_function): Likewise.
3618 (elf32_arm_output_symbol_hook): Likewise.
3620 2005-03-30 Julian Brown <julian@codesourcery.com>
3622 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
3623 * bfd-in2.h: Regenerate.
3624 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
3625 bfd_elf32_is_arm_mapping_symbol_name.
3626 (elf32_arm_output_symbol_hook): Likewise.
3627 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
3629 (is_arm_mapping_symbol_name): Function moved from here...
3630 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
3633 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3635 * configure.in: Check for ffs decl and alphabetize.
3636 * config.in: Regenerate.
3637 * configure: Regenerate.
3638 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
3640 2005-03-29 Fred Fish <fnf@specifixinc.com>
3642 * dwarf2.c (struct comp_unit): Fix typo.
3643 (scan_unit_for_functions): Remove unused local variable "name"
3644 and dead code that set it.
3646 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3647 Phil Blundell <philb@gnu.org>
3649 * bfd-in2.h, libbfd.h: Regenerated.
3650 * reloc.c: Add ARM TLS relocations.
3651 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
3653 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
3654 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
3655 (elf32_arm_tls_ie32_howto): New.
3656 (elf32_arm_howto_from_type): Support TLS relocations.
3657 (elf32_arm_reloc_map): Likewise.
3658 (elf32_arm_reloc_type_lookup): Likewise.
3660 (struct elf32_arm_obj_tdata): New.
3661 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
3662 (elf32_arm_mkobject): New function.
3663 (struct elf32_arm_relocs_copied): Add pc_count.
3664 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
3665 (GOT_TLS_IE): Define.
3666 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
3667 (elf32_arm_link_hash_newfunc): Initialize tls_type.
3668 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
3669 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
3670 (dtpoff_base, tpoff): New functions.
3671 (elf32_arm_final_link_relocate): Handle TLS relocations.
3672 (IS_ARM_TLS_RELOC): Define.
3673 (elf32_arm_relocate_section): Warn about TLS mismatches.
3674 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
3675 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
3676 TLS relocations and pc_count.
3677 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
3678 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
3680 (elf32_arm_size_dynamic_sections): Handle TLS.
3681 (elf32_arm_finish_dynamic_symbol): Likewise.
3682 (bfd_elf32_mkobject): Define.
3684 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3686 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
3687 relocation types. Don't count relocations which will use a PLT.
3689 2005-03-29 Joel Brobecker <brobecker@gnat.com>
3691 * elf.c (elfcore_grok_nto_status): Print tid as long.
3692 (elfcore_grok_nto_regs): Likewise.
3694 2005-03-29 Joel Brobecker <brobecker@gnat.com>
3696 * irix-core.c: Remove some unnecessary prototypes.
3698 2005-03-28 Joel Brobecker <brobecker@adacore.com>
3700 * irix-core.c: Convert to ISO C.
3702 2005-03-28 Joel Brobecker <brobecker@adacore.com>
3704 * irix-core.c (do_sections): Replace + by | in expression.
3705 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
3706 to unused parameters to avoid a compiler warning.
3708 2005-03-28 Mark Kettenis <kettenis@gnu.org>
3710 * netbsd-core.c: Convert to ISO C. Fix formatting.
3712 2005-03-24 Eric Christopher <echristo@redhat.com>
3714 * elfxx-mips.c: Revert previous patch.
3716 2005-03-24 Nick Clifton <nickc@redhat.com>
3718 * targets.c (_bfd_target_vector): Only include the
3719 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
3720 all targets enabled.
3722 2005-03-24 James E Wilson <wilson@specifixinc.com>
3724 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
3725 (BFD64_BACKENDS): Add elf32-ia64.lo.
3726 * Makefile.in: Regenerate.
3728 2005-03-23 Eric Christopher <echristo@redhat.com>
3730 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
3731 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
3732 after emitting relocation.
3733 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
3734 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
3737 2005-03-23 Mike Frysinger <vapier@gentoo.org>
3738 Nick Clifton <nickc@redhat.com>
3740 * config.bfd: Accept any C library to accompany a GNU Linux
3741 implementation, not just the GNU C library.
3742 * configure.in: Likewise.
3743 * configure: Regenerate.
3745 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
3747 * bfd-in.h (_bfd_elf_provide_symbol): New.
3748 * bfd-in2.h: Regenerated.
3750 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
3751 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
3754 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
3757 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
3759 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
3761 2005-03-22 Bob Wilson <bob.wilson@acm.org>
3763 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
3764 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
3765 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
3766 (xtensa_opcode_decode): Rearrange code.
3768 2005-03-22 Nick Clifton <nickc@redhat.com>
3770 * binary.c: Convert to ISO C90 formatting.
3771 * coff-arm.c: Convert to ISO C90 formatting.
3772 * coffgen.c: Convert to ISO C90 formatting.
3773 * elf32-gen.c: Convert to ISO C90 formatting.
3774 * elf64-gen.c: Convert to ISO C90 formatting.
3775 * hash.c: Convert to ISO C90 formatting.
3776 * ieee.c: Convert to ISO C90 formatting.
3778 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3780 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
3781 unresolved symbols in R_ARM_NONE relocations.
3783 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3785 * elf32-arm.c (elf32_arm_final_link_relocate): Add
3786 UNRESOLVED_RELOC_P argument. Set it appropriately.
3787 (elf32_arm_relocate_section): Update call to
3788 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
3789 unresolved_reloc instead.
3791 2005-03-23 Alan Modra <amodra@bigpond.net.au>
3793 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
3794 .gnu.warning.* sections.
3796 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3798 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
3800 (ppc_elf_create_linker_section): Don't try to reuse existing section.
3801 (elf_create_pointer_linker_section): Delete info parm. Don't make
3802 h dynamic. Don't set written_address_p.
3803 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
3804 (bfd_put_ptr): Delete.
3805 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
3806 Always write section contents. Assert global sym is def_regular.
3807 Use offset bottom bit as a written flag.
3808 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
3811 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3813 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
3814 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
3817 2005-03-21 Nick Clifton <nickc@redhat.com>
3819 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
3821 (t2a1_bx_pc_insn): Likewise.
3822 (t2a2_noop_insn): Likewise.
3823 (t2a3_b_insn): Likewise.
3824 (t2a1_push_insn): Likewise.
3825 (t2a2_ldr_insn): Likewise.
3826 (t2a3_mov_insn): Likewise.
3827 (t2a4_bx_insn): Likewise.
3828 (t2a5_pop_insn): Likewise.
3829 (t2a6_bx_insn): Likewise.
3830 (coff_arm_relocate_section): Only declare the high_address
3831 variable for non WINCE targets.
3833 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3835 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
3836 SEC_LINKER_CREATED. Attach to dynobj.
3837 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
3839 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3841 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
3842 sym_offset. Add name, bss_name, sym_name, sym_val.
3843 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
3844 Add sdata array of elf_linker_section_t.
3845 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
3846 (enum elf_linker_section_enum): Delete.
3847 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
3848 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
3849 the special sections are needed. Adjust htab->sdata refs.
3850 Ensure dynobj is set in sreloc code.
3851 (ppc_elf_size_dynamic_sections): Strip sdata sections.
3852 (ppc_elf_set_sdata_syms): New function.
3853 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
3854 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
3855 sym_val instead of sym_hash.
3856 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
3858 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3860 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
3861 (ppc_elf_merge_private_bfd_data): Likewise.
3863 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3865 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
3866 (ppc_elf_create_linker_section): Don't create rel_section.
3867 (elf_create_pointer_linker_section): Don't size relocs.
3868 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
3869 Don't generate relocs.
3870 (ppc_elf_relocate_section): Adjust calls to
3871 elf_finish_pointer_linker_section.
3873 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3875 * elf32-ppc.c (is_ppc_elf_target): New function.
3876 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
3877 for bfd_target_elf_flavour. Do this test before endian check.
3878 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
3879 (ppc_elf_size_dynamic_sections): Likewise.
3881 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
3883 * elf-bfd.h (elf_backend_data): Add int to
3884 elf_backend_section_from_shdr.
3885 (bfd_elf_section_data): Update comment for this_idx.
3886 (_bfd_elf_make_section_from_shdr): Add int.
3887 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3889 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
3890 and use it to set this_idx in bfd_elf_section_data.
3891 (bfd_section_from_shdr): Pass shindex to
3892 _bfd_elf_make_section_from_shdr.
3893 (_bfd_elf_section_from_bfd_section): Use this_idx in
3894 bfd_elf_section_data to find section index.
3896 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
3897 index and pass it to _bfd_elf_make_section_from_shdr.
3898 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
3899 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3900 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3901 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3902 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3903 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3904 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
3905 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3906 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3908 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
3909 Ross Ridge <rridge@csclub.uwaterloo.ca>
3911 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
3912 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
3915 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3917 * elflink.c (elf_mark_used_section): Remove check for special
3920 2005-03-18 Andreas Schwab <schwab@suse.de>
3922 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3923 from bfd_vma to ia64_insn, remove broken cast.
3925 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
3927 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
3928 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3929 elf_m68k_finish_dynamic_sections): Use it.
3931 2005-03-17 Paul Brook <paul@codesourcery.com>
3932 Dan Jacobowitz <dan@codesourcery.com>
3933 Mark Mitchell <mark@codesourcery.com>
3935 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3936 (elf32_arm_additional_program_headers): Likewise.
3937 (elf_backend_modify_segment_map): Define.
3938 (elf_backend_additional_program_headers): Likewise.
3939 (elf32_arm_symbian_modify_segment_map): Use
3940 elf32_arm_modify_segment_map.
3942 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3944 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3945 for special sections.
3947 2005-03-18 Alan Modra <amodra@bigpond.net.au>
3949 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3950 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3951 section_sym_count param, and return number of section symbols.
3952 (bfd_elf_size_dynamic_sections): Clear section symbol area of
3953 .dynsym contents. Don't bother calling swap_symbol_out on the
3954 first all-zero dynsym.
3955 (elf_mark_used_section): Formatting. Avoid twiddling flags in
3956 special sections like bfd_abs_section.
3957 (bfd_elf_gc_sections): Spelling fix.
3959 2005-03-16 Fred Fish <fnf@specifixinc.com>
3962 * dwarf2.c (read_indirect_string): Fix apparent typo, check
3963 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3965 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
3967 * elflink.c (elf_mark_used_section): New.
3968 (bfd_elf_gc_sections): Call elf_gc_mark_section for
3969 non-relocatable link if we don't do GC.
3971 2005-03-16 Nick Clifton <nickc@redhat.com>
3972 Ben Elliston <bje@au.ibm.com>
3974 * configure.in (werror): New switch: Add -Werror to the
3975 compiler command line. Enabled by default. Disable via
3977 * configure: Regenerate.
3979 2005-03-16 Nick Clifton <nickc@redhat.com>
3981 * ecoff.c: Convert to ISO C90 formatting.
3983 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3985 * elf32-ppc.c: Divide file into general and linker specific
3986 functions. Sort linker functions into roughly the order in which
3987 they are called by the ELF linker code.
3989 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3991 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3992 on section. Correct comment, and add FIXME.
3993 (ppc_elf_additional_program_headers): Don't bump header count for
3994 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3995 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3996 do allocate memory if they need it.
3998 2005-03-15 Mikkel Krautz <krautz@gmail.com>
4000 * config.bfd (x86_64-elf): Add target.
4002 2005-03-15 Alan Modra <amodra@bigpond.net.au>
4004 * po/es.po: Commit new Spanish translation.
4006 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
4008 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
4009 for global symbol when reporting overflow.
4011 2005-03-11 Jakub Jelinek <jakub@redhat.com>
4013 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
4014 * libbfd.h: Rebuilt.
4015 * archive.c (_bfd_ar_spacepad): New function.
4016 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
4017 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
4018 coff_write_armap): Use it.
4019 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
4021 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
4023 2005-03-10 Mark Kettenis <kettenis@gnu.org>
4025 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
4026 has_table to the start of the function.
4028 2005-03-10 Ben Elliston <bje@au.ibm.com>
4030 * archive.c: Include hashtab.h.
4031 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
4032 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
4033 (hash_file_ptr): New function.
4034 (eq_file_ptr): Likewise.
4035 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
4036 * libbfd-in.h: Include hashtab.h.
4037 (struct artdata): Change `cache' member type to htab_t.
4038 * libbfd.h: Rebuild.
4040 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
4042 * configure.in: Bump version to 2.16.90.
4043 * configure: Regenerated.
4045 2005-03-07 Jakub Jelinek <jakub@redhat.com>
4047 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
4048 close is a function like macro in system headers.
4050 2005-03-07 Alan Modra <amodra@bigpond.net.au>
4053 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
4054 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
4056 2005-03-06 Alan Modra <amodra@bigpond.net.au>
4058 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
4060 2005-03-05 Alan Modra <amodra@bigpond.net.au>
4062 * po/bfd.pot: Regenerate.
4064 2005-03-05 Alan Modra <amodra@bigpond.net.au>
4066 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
4068 (func_desc_adjust): Force dot-syms local in executables as well
4071 2005-03-04 David Daney <ddaney@avtrex.com>
4073 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
4074 '__gnu_local_gp' symbol used by gas -mno-shared.
4076 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
4078 * elf-bfd.h (elf_backend_data): Add "const char *" to
4079 elf_backend_section_from_phdr.
4081 * elf.c (bfd_section_from_phdr): Pass "proc" to the
4082 elf_backend_section_from_phdr hook.
4084 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
4085 Joseph Myers <joseph@codesourcery.com>
4087 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
4088 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
4090 (struct mips_elf_got_per_bfd_arg): Add global_count.
4091 (struct mips_elf_count_tls_arg): New.
4092 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
4093 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
4094 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
4095 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
4096 (TLS_RELOC_P): Define.
4097 (TP_OFFSET, DTP_OFFSET): Define.
4098 (dtprel_base, tprel_base): New functions.
4099 (mips_elf_link_hash_newfunc): Initialize tls_type.
4100 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
4101 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
4103 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
4104 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
4105 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
4106 (mips_tls_got_index): New functions.
4107 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
4108 arguments. Pass them to mips_elf_create_local_got_entry. Use
4110 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
4112 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
4113 mips_elf_create_local_got_entry.
4114 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
4115 arguments. Handle TLS entries.
4116 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
4117 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
4119 (mips_elf_record_global_got_symbol): Likewise.
4120 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
4122 (mips_elf_merge_gots): Handle TLS entries when merging.
4123 (mips_elf_initialize_tls_index): New function.
4124 (mips_elf_set_global_got_offset): Handle TLS entries.
4125 (mips_elf_adjust_gp): Handle TLS.
4126 (mips_elf_multi_got): Remove redundant call to
4127 mips_elf_resolve_final_got_entries. Initialize global_count.
4128 Correct a comment. Initialize new TLS members of mips_got_info.
4129 Assign TLS GOT indexes for new GOTs.
4130 (mips_elf_create_got_section): Initialize new TLS members of
4132 (mips_elf_calculate_relocation): Handle TLS relocs.
4133 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
4135 (_bfd_mips_elf_always_size_sections): Handle TLS.
4136 (_bfd_mips_elf_size_dynamic_sections): Likewise.
4137 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
4139 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
4140 (_bfd_mips_elf_hide_symbol): Handle TLS.
4141 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
4142 (mips_reloc_map): Add TLS relocs.
4143 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
4144 * elf64-mips.c (mips_elf64_howto_table_rel)
4145 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
4146 * reloc.c: Define new MIPS TLS relocations.
4147 * libbfd.h, bfd-in2.h: Regenerated.
4149 2005-03-02 Jan Beulich <jbeulich@novell.com>
4151 * Makefile.am: Add dependency of cache.o on libiberty.h.
4152 * cache.c: Include libiberty.h.
4153 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
4155 2005-03-01 Zack Weinberg <zack@codesourcery.com>
4157 * elf.c (bfd_section_from_shdr <default case>): Call
4158 elf_backend_section_from_shdr hook unconditionally, and return
4160 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
4161 * elfxx-target.h (elf_backend_section_from_shdr)
4162 (elf_backend_section_from_phdr): Default to
4163 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
4166 2005-03-01 Alan Modra <amodra@bigpond.net.au>
4168 * targets.h: Typo fix.
4169 * bfd-in2.h: Regenerate.
4171 * bout.c (b_out_write_object_contents): Don't use sizeof on host
4172 structs to size on-disk structures.
4173 (b_out_set_section_contents): Size the external struct, not the
4174 internal one for on-disk size.
4175 (b_out_sizeof_headers): Likewise.
4177 2005-03-01 Alan Modra <amodra@bigpond.net.au>
4179 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
4180 entry points with the func descriptor as well as undefweak.
4182 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
4184 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
4185 present when IMPORT_NAME_UNDOECRATE is used.
4187 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
4190 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
4193 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
4194 to _bfd_elf_merge_symbol.
4196 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
4197 unsigned int to return the alignment of the old common symbol
4198 in the dynamic object.
4199 (_bfd_elf_add_default_symbol): Pass NULL to
4200 _bfd_elf_merge_symbol.
4201 (elf_link_add_object_symbols): Pass &old_alignment to
4202 _bfd_elf_merge_symbol. Get the alignment of the new common
4203 symbol in the dynamic object.
4205 2005-02-24 Ben Elliston <bje@au.ibm.com>
4207 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
4208 * format.c (bfd_check_format_matches): Likewise.
4209 * archive.c (BFD_GNU960_ARMAG): Likewise.
4210 (bfd_generic_archive_p): Likewise.
4211 (_bfd_write_archive_contents): Likewise.
4213 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
4215 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
4216 * configure: Regenerate.
4218 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
4220 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
4221 COMDAT group sections to have default visibility.
4223 2005-02-24 Alan Modra <amodra@bigpond.net.au>
4225 * coffcode.h (coff_print_aux): Warning fix.
4226 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
4227 instead of section pointer to identify.
4228 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
4229 the correct size buffer for local sym mangling too.
4230 (h8300_bfd_link_add_symbols): Likewise.
4231 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
4233 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
4234 * elf32-xtensa.c (literal_value_hash): Warning fix.
4235 * versados.c (process_otr): Warning fix.
4236 (versados_canonicalize_reloc): Likewise.
4237 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
4238 * vms.c (fill_section_ptr): Warning fix.
4240 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
4242 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
4243 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
4245 2005-02-23 Nick Clifton <nickc@redhat.com>
4247 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
4248 the relvaddr field of the Elf32_crinfo structure.
4250 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
4251 variables that are passed by reference to
4252 m68hc11_get_relocation_value in case that function does not
4255 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
4256 return statements and replace with a single return at the end of
4257 the function. This helps pacify the flow analysis code in gcc 4.0.
4259 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
4260 strtab to avoid compile time warning.
4262 2005-02-23 Ben Elliston <bje@au.ibm.com>
4264 * opncls.c (bfd_zalloc): Document this function.
4266 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
4268 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
4269 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
4270 Replace SEC_SHARED with SEC_COFF_SHARED.
4271 (styp_to_sec_flags): Likewise.
4273 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
4274 (TARGET_LITTLE_SYM): Likewise.
4276 * section.c (SEC_ARCH_BIT_0): Removed.
4277 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
4278 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
4279 (SEC_SHARED): Renamed to ...
4280 (SEC_COFF_SHARED): This.
4281 (SEC_BLOCK): Renamed to ...
4282 (SEC_TIC54X_BLOCK): This.
4283 (SEC_CLINK): Renamed to ...
4284 (SEC_TIC54X_CLINK): This.
4285 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
4286 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
4288 * bfd-in2.h: Regenerated.
4290 2005-02-21 Fred Fish <fnf@specifixinc.com>
4292 * dwarf2.c (find_abstract_instance_name): Call recursively
4293 to handle a DW_AT_specification.
4295 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4297 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
4298 mips_elf_create_dynamic_relocation,
4299 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
4300 Remove #if 0'd code.
4302 2005-02-21 Alan Modra <amodra@bigpond.net.au>
4304 * Makefile.am: Run "make dep-am"
4305 * Makefile.in: Regenerate.
4307 2005-02-21 Alan Modra <amodra@bigpond.net.au>
4309 * coffgen.c (bfd_coff_get_comdat_section): Check that
4310 coff_section_data isn't NULL.
4312 2005-02-21 Alan Modra <amodra@bigpond.net.au>
4314 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
4315 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
4316 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
4317 useless assignments.
4318 (xcoff_write_archive_contents_big): Likewise.
4319 (_bfd_xcoff_put_ldsymbol_name): Likewise.
4320 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
4321 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
4322 * cofflink.c (process_embedded_commands): Warning fixes.
4323 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
4325 * dwarf2.c: Warning fixes.
4326 * elf-bfd.h: Likewise.
4327 * elf-eh-frame.c: Likewise.
4328 * elf-strtab.c: Likewise.
4330 * elf32-m68k.c: Likewise.
4331 * elf32-ppc.c: Likewise.
4332 * elf32-sh-symbian.c: Likewise.
4333 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
4334 * elf64-sh64.c: Likewise.
4335 * peicode.h: Likewise.
4336 * elf64-mmix.c: Warning fixes.
4337 * elfcode.h: Likewise.
4338 * elfxx-mips.c: Likewise.
4339 * libbfd-in.h: Likewise.
4340 * libbfd.c: Likewise.
4341 * mach-o.c: Likewise.
4342 * merge.c: Likewise.
4344 * opncls.c: Likewise.
4347 * vms-hdr.c: Likewise.
4348 * vms-tir.c: Likewise.
4349 * xtensa-isa.c: Likewise.
4350 * xtensa-modules.c: Likewise.
4352 (pstrcmp): Use correct choice of string lengths. Fix return value.
4353 (bfd_sym_module_name): Correct string length.
4354 * bfd-in2.h: Regenerate.
4355 * libbfd.h: Regenerate.
4357 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
4359 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
4360 uninitialized check_segment[1] in TLSMOFF case.
4361 Reported by Alan Modra.
4362 (elf32_frv_relocate_section): Improve errors and warnings.
4364 2005-02-17 Alan Modra <amodra@bigpond.net.au>
4366 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
4368 2005-02-16 Alan Modra <amodra@bigpond.net.au>
4370 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
4371 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
4372 * pef.c (bfd_pef_scan): Don't ignore return value of
4373 bfd_pef_scan_start_address.
4374 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
4375 bfd_mach_o_scan_start_address.
4376 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
4377 * elfxx-mips.c: Remove unnecessary prototypes.
4378 (sort_dynamic_relocs_64): Abort if not BFD64.
4380 2005-02-16 Alan Modra <amodra@bigpond.net.au>
4382 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
4383 Skip toc reloc adjust if reloc_count is zero.
4385 2005-02-15 Nigel Stephens <nigel@mips.com>
4386 Maciej W. Rozycki <macro@mips.com>
4388 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
4389 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
4390 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4391 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
4392 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4394 (mips16_gprel_reloc): Remove bit shuffling; call
4395 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4396 and _bfd_mips16_elf_reloc_shuffle() instead.
4397 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4398 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4400 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
4401 elf_mips16_howto_table_rel.
4402 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
4403 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
4404 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4405 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
4406 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4408 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
4409 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
4410 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
4412 (mips16_gprel_reloc): Remove bit shuffling; call
4413 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4414 and _bfd_mips16_elf_reloc_shuffle() instead.
4415 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4416 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4418 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
4419 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
4420 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
4421 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
4422 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4423 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
4424 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4426 (mips16_gprel_reloc): Remove bit shuffling; call
4427 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4428 and _bfd_mips16_elf_reloc_shuffle() instead.
4429 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4430 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4432 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
4433 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
4434 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
4435 handle bit shuffling for MIPS16 relocs.
4436 (_bfd_mips16_elf_reloc_shuffle): Likewise.
4437 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
4438 and _bfd_mips16_elf_reloc_shuffle().
4439 (_bfd_mips_elf_generic_reloc): Likewise.
4440 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
4442 (mips_elf_obtain_contents): Remove bit shuffling.
4443 (mips_elf_perform_relocation): Likewise; call
4444 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
4446 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
4448 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
4449 (_bfd_mips16_elf_reloc_shuffle): Likewise.
4450 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
4451 (BFD_RELOC_MIPS16_HI16_S): Likewise.
4452 (BFD_RELOC_MIPS16_LO16): Likewise.
4453 * bfd-in2.h: Regenerate.
4454 * libbfd.h: Regenerate.
4456 2005-02-15 Jan Beulich <jbeulich@novell.com>
4458 * elfxx-ia64.c (ia64_howto_table): Correct strings for
4459 R_IA64_DTPMOD64[LM]SB.
4461 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
4463 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
4464 backward branch in the same section.
4465 (elfNN_ia64_relocate_section): Inform users that the input
4466 section is too big to relax br instruction when overflow
4467 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
4468 and R_IA64_PCREL21F.
4470 2005-02-14 Orjan Friberg <orjanf@axis.com>
4472 * elfcore.h (elf_core_file_p): Move the call to
4473 elf_backend_object_p to allow the correct machine to be set before
4474 processing the program headers.
4476 2005-02-14 Nick Clifton <nickc@redhat.com>
4479 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
4480 aware flag from the input bfd to the output bfd.
4482 2005-02-11 Maciej W. Rozycki <macro@mips.com>
4484 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
4485 R_MIPS_LITERAL relocations for external symbols.
4486 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
4487 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
4489 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
4491 * bfd-in2.h: Rebuilt.
4493 2005-02-11 Paul Brook <paul@codesourcery.com>
4495 * elf-bfd.h (struct elf_link_hash_table): Add
4496 is_relocatable_executable.
4497 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
4498 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
4499 symbols in relocatable executables.
4500 (bfd_elf_record_link_assignment): Create dynamic section symbols in
4501 relocatable executables.
4502 (_bfd_elf_link_renumber_dynsyms): Ditto.
4503 (bfd_elf_final_link): Ditto.
4504 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
4505 relocations into relocatable executables.
4506 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
4507 executables. Also copy absolute relocations.
4508 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
4509 in relocatable executables.
4510 (allocate_dynrelocs): Copy relocations for relocatable executables.
4511 Output dynamic symbols for symbols defined in linker scripts.
4513 2005-02-11 Nick Clifton <nickc@redhat.com>
4515 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
4516 to avoid a compile time warning.
4518 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
4521 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
4522 inclusion of coffcode.h so that it is actually picked up.
4524 * coffcode.h (coff_std_swap_table): Add an unused attribute in
4525 case it is not used.
4527 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
4528 structure and macro.
4530 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
4533 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
4534 to protect the declaration of this array.
4536 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
4537 Avoid call to memcpy with a size of 0.
4539 2005-02-12 Alan Modra <amodra@bigpond.net.au>
4541 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
4542 old-style branches to undefined dot-symbols which will be
4543 satisfied by a plt call.
4545 2005-02-11 Alan Modra <amodra@bigpond.net.au>
4547 * elf64-ppc.c (move_plt_plist): New function, extracted from..
4548 (ppc64_elf_copy_indirect_symbol): ..here.
4549 (func_desc_adjust): Use move_plt_plist.
4551 2005-02-10 Paul Brook <paul@codesourcery.com>
4553 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
4555 2005-02-10 Paul Brook <paul@codesourcery.com>
4557 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
4559 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
4560 (elf_link_renumber_local_hash_table_dynsyms): New function.
4561 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
4563 2005-02-10 Jakub Jelinek <jakub@redhat.com>
4565 * bfd-in.h (BFD_LINKER_CREATED): Define.
4566 * bfd-in2.h: Rebuilt.
4567 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
4568 BFD_LINKER_CREATED bfds when determining input bfds without
4569 .note.GNU-stack section.
4571 2005-02-10 Maciej W. Rozycki <macro@mips.com>
4573 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
4574 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
4575 relocations against external symbols unchanged.
4577 2005-02-08 Paul Brook <paul@codesourcery.com>
4579 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
4582 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
4584 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
4587 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4589 * elf64-mips.c: Fix formatting throughout.
4591 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4593 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
4595 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
4597 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
4598 *ABS*/*UND* sections.
4599 (elf32_frv_relocate_section): Move zero-addend-required error...
4600 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
4601 missing needed TLS section.
4603 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
4605 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
4606 being the last symbol.
4607 (aout_link_add_symbols): Just return TRUE if a warning
4610 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4612 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
4613 R_MIPS_GPREL32 relocations against external symbols.
4614 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
4617 2005-02-07 Alan Modra <amodra@bigpond.net.au>
4619 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
4620 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
4621 elf_string_from_elf_strtab.
4622 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
4623 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
4624 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
4625 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
4626 looking at cached symtab info first, before iterating over headers.
4627 For SHT_REL and SHT_RELA, load dynsymtab if needed.
4628 * elfcode.h (elf_object_p): Don't load section header stringtab
4631 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
4633 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
4634 against protected function when building shared library.
4637 * elf64-x86-64.c (is_32bit_relative_branch): New.
4638 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
4639 protected function symbol when building shared library for
4640 32bit relative branch instruction.
4642 2005-02-06 Alan Modra <amodra@bigpond.net.au>
4644 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
4645 syms when doing a relocatable link.
4646 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
4648 (ppc64_elf_tls_setup): Likewise.
4649 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
4651 2005-02-04 Alan Modra <amodra@bigpond.net.au>
4653 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
4654 (link_hash_newfunc): Clear all locals using memset.
4655 (make_fdh): Remove flags param. Always create fake func desc
4656 weak. Link the descriptor with the code entry sym.
4657 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
4658 (add_symbol_adjust): Adjust make_fdh call.
4659 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
4660 descriptor to strong undefined if code entry is strong.
4662 2005-02-04 Alan Modra <amodra@bigpond.net.au>
4664 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
4665 lookup here. Set to new before calling bfd_link_repair_undef_list.
4666 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
4668 2005-02-03 Alan Modra <amodra@bigpond.net.au>
4670 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
4672 2005-02-03 Alan Modra <amodra@bigpond.net.au>
4674 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
4675 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
4676 before the as-needed lib was loaded. Abort on unexpected refs.
4678 2005-02-02 Alan Modra <amodra@bigpond.net.au>
4680 * elflink.c (elf_smash_syms): Expand comments.
4681 (elf_link_add_object_symbols): Only call elf_smash_syms for
4682 as-needed dynamic objects.
4684 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
4685 everything, just the field specific to ia64.
4686 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4688 2005-02-01 Alan Modra <amodra@bigpond.net.au>
4690 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
4691 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
4693 (struct add_symbol_adjust_data): New.
4694 (add_symbol_adjust): Make an undefweak func desc for old ABI
4695 objects to link with --as-needed shared libs. Return fail status.
4696 Don't adjust old ABI func entry sym to weak if func desc syms
4698 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
4701 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
4703 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
4706 2005-02-01 Alan Modra <amodra@bigpond.net.au>
4708 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
4709 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
4710 remove anything but new and undefweak.
4711 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
4713 (_bfd_elf_create_dynamic_sections): Formatting.
4714 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
4715 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
4716 (struct elf_smash_data): New.
4717 (elf_smash_syms): New function.
4718 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
4719 unneeded dynamic objects to loaded list.
4720 (elf_link_output_extsym): Don't handle as-needed here. Strip
4721 bfd_link_hash_new symbols.
4722 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4723 delref when dynindx is already -1.
4724 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
4726 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
4728 2005-02-01 Ben Elliston <bje@au.ibm.com>
4730 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
4732 2005-02-01 Ben Elliston <bje@au.ibm.com>
4734 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
4735 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
4736 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
4737 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
4738 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
4739 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
4740 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
4741 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
4742 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
4743 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
4744 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
4745 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
4746 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
4747 throughout. Similarly, collapse #if 1'd code.
4749 2005-02-01 Ben Elliston <bje@au.ibm.com>
4751 * elf-bfd.h (bfd_elf_discard_group): Remove.
4752 * elf.c (bfd_elf_discard_group): Likewise.
4753 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
4755 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
4757 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
4758 (_bfd_elf_eh_frame_address_size): Declare.
4759 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
4760 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
4761 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
4762 (elf_backend_eh_frame_address_size): Define.
4763 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
4764 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
4765 size from the new backend hook.
4766 (_bfd_elf_write_section_eh_frame): Likewise.
4767 (_bfd_elf_eh_frame_address_size): New function.
4769 2005-01-31 Andrew Cagney <cagney@gnu.org>
4771 * configure: Regenerate to track ../gettext.m4.
4773 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4775 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
4776 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
4778 2005-01-31 Nick Clifton <nickc@redhat.com>
4780 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
4781 sparc-lynxos, vax-vms) be obsolete.
4783 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
4785 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
4786 * elf32-arm.c (ELF_MINPAGESIZE): Define.
4787 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
4788 * elfcode.h (elf_object_p): Use minpagesize instead of
4790 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
4791 (elfNN_bed): Include ELF_MINPAGESIZE.
4793 2005-01-28 Julian Brown <julian@codesourcery.com>
4795 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4796 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4797 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
4798 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
4799 passing flag value from ld. Set flag value in global hash table entry.
4800 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
4803 2005-01-27 Andrew Cagney <cagney@gnu.org>
4805 * configure: Regenerate to track ../gettext.m4 change.
4807 2005-01-25 Mark Mitchell <mark@codesourcery.com>
4809 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
4812 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
4814 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
4815 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
4817 * reloc.c: Add R_FRV_TLSMOFF.
4818 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4819 (frv_reloc_map, frv_reloc_type_lookup): Map it.
4820 (elf32_frv_relocate_section): Handle it.
4821 (elf32_frv_check_relocs): Likewise.
4822 * libbfd.h, bfd-in2.h: Rebuilt.
4823 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
4824 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
4825 when given an undefweak TLS symbol. Fix constant TLS PLT entries
4826 such that they return the constant in gr9.
4827 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
4829 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
4830 too, such that they shrink on relaxation.
4831 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
4832 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
4833 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
4834 if we can guarantee the use of 16-bit constants.
4835 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
4836 Introduce TLS support for FR-V FDPIC.
4837 * reloc.c: Add TLS relocations.
4838 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
4839 (elf32_frv_rel_tlsdesc_value_howto): New.
4840 (elf32_frv_rel_tlsoff_howto): New.
4841 (frv_reloc_map): Add new mappings.
4842 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
4844 (frvfdpic_dynamic_got_plt_info): New.
4845 (frvfdpic_plt_tls_ret_offset): New.
4846 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
4847 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
4848 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
4849 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
4851 (struct frvfdpic_relocs_info): Add TLS fields.
4852 (frvfdpic_relocs_info_hash): Warning clean up.
4853 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
4854 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
4855 (FRVFDPIC_TLS_BIAS): Define.
4856 (tls_biased_base): New.
4857 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
4859 (frv_reloc_type_lookup): Likewise.
4860 (frvfdpic_info_to_howto_rel): Likewise.
4861 (elf32_frv_relocate_section): Likewise.
4862 (_frv_create_got_section): Create the PLT section here.
4863 (elf32_frvfdpic_create_dynamic_sections): Not here.
4864 (_frvfdpic_count_nontls_entries): Move out of...
4865 (_frvfdpic_count_got_plt_entries): ... here.
4866 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
4867 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
4869 (_frvfdpic_relax_tls_entries): New.
4870 (_frvfdpic_compute_got_alloc_data): Add TLS support.
4871 (_frvfdpic_get_tlsdesc_entry): New.
4872 (_frvfdpic_assign_got_entries): Add TLS support.
4873 (_frvfdpic_assign_plt_entries): Likewise.
4874 (_frvfdpic_reset_got_plt_entries): New.
4875 (_frvfdpic_size_got_plt): Move out of...
4876 (elf32_frvfdpic_size_dynamic_sections): ... here.
4877 (_frvfdpic_relax_got_plt_entries): New.
4878 (elf32_frvfdpic_relax_section): New.
4879 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
4880 (elf32_frv_check_relocs): Add TLS support.
4881 (bfd_elf32_bfd_relax_section): Define for FDPIC.
4882 * libbfd.h, bfd-in2.h: Rebuilt.
4884 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4886 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
4887 loadable reloc sections.
4888 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
4889 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
4891 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4893 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
4894 sections immediately when linking shared libs. Instead, wait until
4895 we know a lib is needed.
4896 (_bfd_elf_link_create_dynstrtab): Extract from..
4897 (_bfd_elf_link_create_dynamic_sections_): ..here.
4898 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
4899 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
4900 for non-existent .dynamic.
4901 (elf_link_output_extsym): Don't complain about undefined symbols
4902 in as-needed dynamic libs that aren't actually linked.
4904 2005-01-24 Andrew Cagney <cagney@gnu.org>
4906 * configure: Regenerate, ../gettext.m4 was updated.
4908 2005-01-21 Ben Elliston <bje@au.ibm.com>
4910 * aout-encap.c: Remove unused file.
4912 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
4915 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
4916 non-function symbols are local.
4917 (_bfd_elf_symbol_refs_local_p): Likewise.
4919 2005-01-18 Alan Modra <amodra@bigpond.net.au>
4921 * bfd.c (bfd_link_just_syms): Add abfd param.
4922 * bfd-in2.h: Regenerate.
4924 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4926 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4927 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4928 instructions. If the amount of padding is known, reduce the size
4929 of the CIE or FDE by that amount.
4931 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4933 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4934 augmentation_size. Use bfd_signed_vmas for data_align.
4935 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4936 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4937 functions. Don't read past the end of the enclosing CIE or FDE.
4938 (skip_bytes): New utility function.
4939 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4941 (_bfd_elf_write_section_eh_frame): Use new functions.
4943 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4945 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4946 assert-style REQUIRE() macro to handle sanity checks.
4948 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
4950 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4952 (read_unsigned_leb128): Removed.
4953 (read_signed_leb128): Removed.
4954 (find_abstract_instance_name): Updated.
4955 (parse_comp_unit): Accept info_ptr_unit.
4956 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4957 comp unit and pass it to parse_comp_unit.
4959 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4960 (read_signed_leb128): Moved to ...
4963 * libbfd-in.h (read_unsigned_leb128): New prototype.
4964 (read_signed_leb128): Likewise.
4965 * libbfd.h: Regenerated.
4967 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
4968 Nick Clifton <nickc@redhat.com>
4970 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4971 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4972 arch_sh4a_nofpu_up in order to match the external names and make the
4973 testsuite's job easier.
4974 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4976 * bfd-in2.h: Regenerate.
4978 2005-01-15 Andrew Cagney <cagney@gnu.org>
4981 * acinclude.m4: Move BFD_NEED_DECLARATION,
4982 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4983 the new file bfd.m4. Include ../bfd/bfd.m4.
4984 * configure: Re-generate.
4986 2005-01-12 Alan Modra <amodra@bigpond.net.au>
4988 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4989 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4991 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4992 R_PPC_RELAX32PC_PLT.
4994 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4996 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4998 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4999 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
5000 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
5001 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
5002 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
5003 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
5004 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
5005 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
5006 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
5007 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
5008 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
5009 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
5010 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
5011 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
5013 2005-01-11 Alan Modra <amodra@bigpond.net.au>
5015 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
5018 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
5020 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
5021 * bfd-in2.h: Regenerate.
5022 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
5023 to support these new machine values.
5024 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
5026 (bfd_maxq_arch): Update values for the maxq20.
5028 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
5030 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
5031 non-shared object, do not reserve space in .plt and .rela.plt for
5032 regular symbols neither defined nor referenced in shared objects.
5034 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
5036 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
5037 to zero the structure.
5038 (create_got_section): Use BFD_ASSERT instead of abort.
5039 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
5041 (create_got_section): New function.
5042 (sparc64_elf_create_dynamic_sections): Likewise.
5043 (sparc64_elf_check_relocs): Invoke create_got_section instead of
5044 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
5045 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
5046 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
5047 (sparc64_elf_finish_dynamic_symbol): Likewise.
5048 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
5049 (elf_backend_create_dynamic_sections): Define to
5050 sparc64_elf_create_dynamic_sections.
5052 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
5054 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
5055 (elf_backend_omit_section_dynsym): Define to it.
5056 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
5057 (elf_backend_omit_section_dynsym): Define to it.
5059 2005-01-07 Jakub Jelinek <jakub@redhat.com>
5061 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
5062 PT_DYNAMIC segment, unless .dynamic.
5064 2005-01-06 Paul Brook <paul@codesourcery.com>
5066 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
5067 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
5068 * configure: Regenerate.
5069 * elf32-arm.c: Add VxWorks target bfd.
5071 (elf32_arm_link_hash_table): Add use_rel.
5072 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
5073 elf32_arm_relocate_section): Replace USE_REL with runtime check.
5074 Correct offset calculation for RELA case.
5075 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
5076 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
5077 (elf32_arm_vxworks_link_hash_table_create): New function.
5078 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
5079 (bfd_elf32_littlearm_vxworks_vec): Ditto.
5080 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
5082 2005-01-06 Alan Modra <amodra@bigpond.net.au>
5084 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
5086 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
5087 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
5088 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
5089 (ppc64_elf_next_toc_section): Heed no_multi_toc.
5090 (ppc64_elf_reinit_toc): Set multi_toc_needed.
5091 (toc_adjusting_stub_needed): Rewrite.
5092 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
5093 toc tests. Adjust for toc_adjusting_stub_needed changes.
5094 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
5095 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
5096 * section.c: Expand comment on backend bits.
5097 * bfd-in2.h: Regenerate.
5098 * libbfd.h: Regenerate.
5100 2005-01-06 Alan Modra <amodra@bigpond.net.au>
5102 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
5103 toc adjusting stub, do not test source section flags.
5105 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
5107 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5108 from STABS debugging sections again.
5110 2005-01-05 Fred Fish <fnf@specifixinc.com>
5112 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
5113 (find_abstract_instance_name): New function.
5114 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
5115 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
5116 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
5118 2004-12-31 Paul Brook <paul@copdesourcery.com>
5120 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
5122 2004-12-31 Alan Modra <amodra@bigpond.net.au>
5124 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
5125 Commit missing changes from 2004-12-22.
5126 * bfd-in2.h: Regenerate.
5128 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
5130 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
5132 2004-12-21 Kris Warkentin <kewarken@qnx.com>
5134 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
5135 Add 'base' argument for constructing register sections. Reformat.
5136 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
5137 gp and fp regs. Reformat.
5139 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
5141 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
5142 * bfd-in2.h: Regenerate.
5143 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
5144 (avr_reloc_map): Likewise.
5145 (avr_final_link_relocate): Likewise.
5147 2004-12-22 Alan Modra <amodra@bigpond.net.au>
5149 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
5150 as-needed dynamic libs as undefined.
5151 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
5152 libs when finding they are needed.
5154 2004-12-20 Alan Modra <amodra@bigpond.net.au>
5156 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
5157 (opd_entry_value): Use opd_relocs if available.
5158 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
5159 copy .opd relocations to opd_relocs.
5160 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
5162 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
5164 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
5165 * elf32-v850.c (v850_elf_howto_table): Add entry for
5166 R_V850_LO16_SPLIT_OFFSET.
5167 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
5168 (v850_elf_perform_lo16_relocation): New function, extracted from...
5169 (v850_elf_perform_relocation): ...here. Use it to handle
5170 R_V850_LO16_SPLIT_OFFSET.
5171 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
5172 R_V850_LO16_SPLIT_OFFSET.
5173 * libbfd.h, bfd-in2.h: Regenerate.
5175 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
5177 * config.bfd: Add s390x-ibm-tpf support.
5179 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
5181 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
5182 to prototype, to make hash info available.
5183 Prevent wrapped symbols from being adjusted twice.
5185 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
5187 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
5188 overflow for calls to undefined weak symbols.
5190 2004-12-11 Alan Modra <amodra@bigpond.net.au>
5192 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
5193 canonical sections syms have a name.
5195 2004-12-11 Alan Modra <amodra@bigpond.net.au>
5197 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
5198 have been adjusted for output.
5199 (ppc64_elf_relocate_section): Mark sections with reloc_done.
5201 2004-12-10 Alan Modra <amodra@bigpond.net.au>
5203 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
5204 add symtab_hdr param.
5205 (group_signature): Update calls.
5206 * elf-bfd.h (bfd_elf_sym_name): Update.
5207 * elf32-ppc.c (ppc_elf_relocate_section): Update.
5208 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
5209 (ppc64_elf_relocate_section): Update.
5210 * elflink.c (elf_link_input_bfd): Update.
5212 2004-12-10 Jakub Jelinek <jakub@redhat.com>
5214 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
5215 st_shndx on STT_SECTION sections.
5217 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
5219 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
5220 ELF section symbols.
5222 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
5224 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
5225 return a real value, unless it is a PLT symbol.
5226 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
5229 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
5230 R_MIPS_JALR entry to 0.
5232 * archures.c: Define bfd_mach_mips9000.
5233 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
5234 (mips_set_isa_flags): Handle bfd_mach_mips9000.
5235 * cpu-mips.c (I_mips9000): Define.
5236 (arch_info_struct): Add case for bfd_mach_mips9000.
5237 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
5238 * bfd-in2.h: Regenerate.
5240 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
5242 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
5245 2004-12-07 Ben Elliston <bje@gnu.org>
5247 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
5249 2004-12-06 Daniel Jacobowitz <dan@debian.org>
5251 Suggested by Fergal Daly <fergal@esatclear.ie>:
5252 * simple.c (simple_dummy_multiple_definition): New function.
5253 (bfd_simple_get_relocated_section_contents): Use it.
5255 2004-12-03 Jan Beulich <jbeulich@novell.com>
5257 * elf.c (elf_find_function): Don't use the last file symbol ever,
5258 seen, but the last one seen prior to the symbol being reported.
5259 Don't report a filename at all for global symbols when that might
5262 2004-12-01 Paul Brook <paul@codesourcery.com>
5264 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
5265 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
5268 2004-12-01 Paul Brook <paul@codesourcery.com>
5270 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
5273 2004-11-30 Paul Brook <paul@codesourcery.com>
5275 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
5276 no_pipeline_knowledge
5277 (elf32_arm_link_hash_table_create): Ditto.
5278 (bfd_elf32_arm_process_before_allocation): Ditto.
5279 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
5281 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5283 * bfd-in2.h: Regenerate.
5285 2004-11-30 Randolph Chung <tausq@debian.org>
5287 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
5288 (elf32_hppa_grok_psinfo): New function.
5289 (elf_backend_grok_prstatus): Define.
5290 (elf_backend_grok_psinfo): Define.
5292 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
5295 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
5297 2004-11-24 Paul Brook <paul@codesourcery.com>
5299 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
5301 2004-11-24 Paul Brook <paul@codesourcery.com>
5303 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
5304 (elf32_arm_swap_symbol_out): New function.
5305 (elf32_arm_size_info): Add.
5306 (elf_backend_size_info): Define.
5308 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5310 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
5313 2004-11-19 Alan Modra <amodra@bigpond.net.au>
5315 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
5316 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
5317 * nlmcode.h (nlm_write_object_contents): Warning fix.
5319 2004-11-18 Bob Wilson <bob.wilson@acm.org>
5321 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
5323 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5325 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
5326 (elf32_arm_plt_thumb_stub): New.
5327 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
5329 (elf32_arm_link_hash_traverse): Fix typo.
5330 (elf32_arm_link_hash_table): Add obfd.
5331 (elf32_arm_link_hash_newfunc): Initialize new fields.
5332 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
5333 (elf32_arm_link_hash_table_create): Initialize obfd.
5334 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
5335 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
5336 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
5337 interworking BFD is not dynamic.
5338 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
5339 not emit glue for PLT references.
5340 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
5341 emit glue for PLT references. Support the Thumb PLT prefix.
5342 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
5344 (elf32_arm_check_relocs): Likewise.
5345 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
5347 (allocate_dynrelocs): Handle Thumb PLT references.
5348 (elf32_arm_finish_dynamic_symbol): Likewise.
5349 (elf32_arm_symbol_processing): New function.
5350 (elf_backend_symbol_processing): Define.
5352 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
5354 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
5355 add_fde_encoding. Remove need_relative.
5356 * elf-eh-frame.c (extra_augmentation_string_bytes)
5357 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
5358 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
5359 in cases where the CIE has no existing 'R' augmentation. Use
5360 size_of_output_cie_fde when assigning offsets. Use the final offset
5361 as the new section size.
5362 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
5363 Account for any extra augmentation bytes in the returned offset.
5364 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
5365 moved before being modified. Pad growing entries with DW_CFA_nops.
5366 Add 'z' and 'R' augmentations as directed by add_augmentation_size
5367 and add_fde_encoding.
5369 2004-11-15 Mark Mitchell <mark@codesourcery.com>
5371 * elf32-arm.c (elf32_arm_relocate_section): Use
5372 arm_real_reloc_type.
5374 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
5376 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
5377 for discard relocations; don't add an R_MIPS_NONE to the main body
5380 2004-11-04 Paul Brook <paul@codesourcery.com>
5382 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
5383 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
5384 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
5385 default version definition for unversioned symbols.
5386 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
5387 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
5388 _bfd_elf_slurp_version_tables. Set default version for unversioned
5391 2004-11-15 Paul Brook <paul@codesourcery.com>
5393 * elflink.c (elf_link_add_object_symbols): Don't assume version
5394 indices are consecutive.
5396 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
5398 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
5399 composite relocations against the personality data.
5401 2004-11-13 Paul Brook <paul@codesourcery.com>
5403 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
5404 R_ARM_PREL31 relocations to PLT entries.
5405 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
5406 (elf32_arm_check_relocs): Ditto.
5408 2004-11-12 Bob Wilson <bob.wilson@acm.org>
5410 * xtensa-isa.c (xtensa_interface_class_id): New.
5412 2004-11-11 Bob Wilson <bob.wilson@acm.org>
5414 * elf32-xtensa.c (property_table_compare): Remove assertion about
5415 entries with the same address and non-zero size.
5416 (xtensa_read_table_entries): Report such entries as errors.
5418 2004-11-11 Mark Mitchell <mark@codesourcery.com>
5420 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
5421 R_ARM_RELATIVE on Symbian OS.
5423 2004-11-09 Mark Mitchell <mark@codesourcery.com>
5425 * som.c (som_bfd_print_private_bfd_data): New function.
5426 (som_object_setup): Save the auxiliary header. Don't assume that
5427 zero is an invalid entry point for a shared library.
5428 (som_object_p): Allocate the auxiliary header on the heap.
5430 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
5432 (elf32_arm_symbian_modify_segment_map): Likewise.
5434 2004-11-09 Daniel Jacobowitz <dan@debian.org>
5436 From David Poole <daveml@mbuf.com>:
5437 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
5438 (elf32_arm_size_dynamic_sections): Call it.
5440 2004-11-09 Alan Modra <amodra@bigpond.net.au>
5442 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
5443 (ALL_MACHINES_CFILES): Fix typo.
5444 * Makefile.in: Regenerate.
5445 * po/SRC-POTFILES.in: Regenerate.
5447 2004-11-08 Mark Mitchell <mark@codesourcery.com>
5449 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
5450 R_ARM_RELATIVE relocation for Symbian OS, mention the section
5451 symbol in the relocation.
5453 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
5454 Vineet Sharma <vineets@noida.hcltech.com>
5456 * coff-maxq.c: New File.
5457 * cpu-maxq.c: New File.
5458 * coffcode.h: Likewise.
5459 * config.bfd: Likewise.
5460 * configure.in (maxqcoff_vec): New target vector.
5461 * Makefile.am: Add support for maxq target.
5462 * configure.in: Likewise.
5463 * archures.c:. Likewise.
5464 * targets.c: Likewise.
5465 * bfd_in2.h : Regenerated.
5466 * Makefile.in: Regenerated.
5467 * configure: Regenerated.
5468 * doc/Makefile.in: Regenerated.
5470 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5472 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
5473 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
5474 C_NT_WEAK aux entries.
5475 (_bfd_coff_generic_relocate_section): Handle undefined
5478 2004-11-07 Andreas Schwab <schwab@suse.de>
5480 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
5481 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
5482 non-default visibility.
5484 2004-11-01 Mark Mitchell <mark@codesourcery.com>
5486 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
5488 (elf32_arm_symbian_modify_segment_map): Don't
5489 reset includes_filehdr and includes_phdrs here.
5491 2004-11-04 Daniel Jacobowitz <dan@debian.org>
5493 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
5494 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
5495 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
5497 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
5498 to a new removed list. Remove normal configuration stanzas.
5499 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
5500 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
5501 elfarm-nabi.lo with elf32-arm.lo.
5502 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
5503 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
5504 * elf32-arm.h: Remove.
5505 * elfarm-oabi.c: Remove.
5506 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
5507 and bfd_elf32_littlearm_oabi_vec.
5508 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
5510 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
5512 * config.bfd: Support crisv32-*-* like cris-*-*.
5513 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
5514 (bfd_mach_cris_v10_v32): New macros.
5515 * cpu-cris.c: Tweak formatting.
5516 (get_compatible): New function.
5518 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
5519 bfd_arch_info_type:s.
5520 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
5521 get_compatible for member compatible and link bfd_cris_arch_v32 as
5523 * elf32-cris.c (cris_elf_pcrel_reloc)
5524 (cris_elf_set_mach_from_flags): New functions.
5525 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
5526 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
5527 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
5528 numbers for bfd_mach_cris_v32.
5529 (PLT_ENTRY_SIZE_V32): New macro.
5530 (elf_cris_plt0_entry): Drop last comma in initializer.
5531 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
5532 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
5534 (cris_elf_relocate_section): Change all "%B(%A)" messages to
5536 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
5537 (elf_cris_finish_dynamic_sections): Similar.
5538 (elf_cris_adjust_dynamic_symbol): Similar.
5539 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
5541 <switch with PIC relocs>: Emit error and return FALSE for
5542 bfd_mach_cris_v10_v32.
5543 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5544 Emit warning when generating textrel reloc.
5545 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
5546 (cris_elf_final_write_processing): Set flags according to mach.
5547 (cris_elf_print_private_bfd_data): Display
5548 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
5549 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
5550 new_flags. Don't call cris_elf_final_write_processing. Don't
5551 look at the actual elf header flags at all; use
5552 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
5553 in bfd_get_mach for ibfd and obfd and handle merging of compatible
5555 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5556 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
5557 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
5558 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
5559 * bfd-in2.h, libbfd.h: Regenerate.
5561 2004-11-04 Alan Modra <amodra@bigpond.net.au>
5563 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
5564 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
5566 (struct adjust_toc_info): New.
5567 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
5569 2004-11-03 Bob Wilson <bob.wilson@acm.org>
5571 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
5572 if there are no segments.
5574 2004-11-02 Daniel Jacobowitz <dan@debian.org>
5576 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
5578 2004-11-02 Nick Clifton <nickc@redhat.com>
5580 * elf32-iq2000.c: Convert to ISO C90 formatting.
5582 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
5584 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
5586 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
5588 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
5589 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
5590 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
5592 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5594 * elf32-sh.c (tpoff): Take alignment into account.
5596 2004-10-28 Nick Clifton <nickc@redhat.com>
5598 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
5599 performing a relocatable link.
5600 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
5601 for MIPS ports under Irix.
5603 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
5605 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
5606 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
5607 (elf32_arm_final_link_relocate): Ditto.
5608 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
5609 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
5610 (elf32_arm_adjust_dynamic_symbol): Ditto.
5611 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
5612 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
5613 (elf32_arm_r_howto): ... To here.
5614 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
5616 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
5619 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
5620 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
5621 and R_IA64_SECREL64LSB.
5623 2004-10-26 Paul Brook <paul@codesourcery.com>
5625 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
5626 (bfd_elf_size_dynamic_sections): Create default version definition.
5627 (elf_link_output_extsym): Adjust for default symbol version.
5629 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5631 * mmo.c: Adjust to ISO C.
5633 * mmo.c (mmo_write_section_description): New function broken out
5634 of mmo_internal_write_section.
5635 (mmo_internal_write_section): For each of .text and .data, call
5636 mmo_write_section_description before outputting contents if it has
5637 nontrivially deducible vma or contents.
5638 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
5639 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
5640 symbols if found within the .data address range.
5642 2004-10-24 Daniel Jacobowitz <dan@debian.org>
5644 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
5646 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5648 * mmo.c (File Layout): Correct place of misplaced blurb about
5651 2004-10-22 Mark Kettenis <kettenis@gnu.org>
5653 * config.bfd: Add mips64*-*-openbsd.
5655 2004-10-21 Bob Wilson <bob.wilson@acm.org>
5657 * elf32-xtensa.c (ebb_propose_action): Put declarations before
5660 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5662 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
5663 * configure: Regenerate.
5665 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5668 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
5669 to linker reloc_overflow callback.
5670 (aout_link_input_section_ext): Likewise.
5671 (aout_link_reloc_link_order): Likewise.
5672 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5673 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5675 (alpha_relocate_section): Likewise.
5676 * coff-arm.c (coff_arm_relocate_section): Likewise.
5677 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
5678 * coff-h8500.c (extra_case): Likewise.
5679 * coff-i960.c (coff_i960_relocate_section): Likewise.
5680 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5681 * coff-mips.c (mips_relocate_section): Likewise.
5682 * coff-or32.c (coff_or32_relocate_section): Likewise.
5683 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5684 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
5685 * coff-sh.c (sh_relocate_section): Likewise.
5686 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5687 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
5688 * coff-z8k.c (extra_case): Likewise.
5689 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
5690 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5691 (_bfd_coff_generic_relocate_section): Likewise.
5692 * ecoff.c (ecoff_reloc_link_order): Likewise.
5693 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
5694 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5695 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5696 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5697 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5698 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
5699 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5700 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
5701 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5702 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5703 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5704 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5705 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5706 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5707 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5708 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5709 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5710 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
5711 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5712 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
5713 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5714 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5715 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5716 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5717 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5718 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5719 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5720 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5721 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5722 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5723 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5724 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5725 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5726 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5727 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5728 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5729 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5730 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5731 * elflink.c (elf_reloc_link_order): Likewise.
5732 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5733 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
5734 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
5735 * linker.c (_bfd_generic_reloc_link_order): Likewise.
5736 * pdp11.c (pdp11_aout_link_input_section): Likewise.
5737 (aout_link_reloc_link_order): Likewise.
5738 * reloc.c (bfd_generic_get_relocated_section_contents):
5740 * xcofflink.c (xcoff_reloc_link_order): Likewise.
5741 * simple.c (simple_dummy_reloc_overflow): Updated.
5743 2004-10-20 Andreas Schwab <schwab@suse.de>
5745 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
5746 (elf_backend_plt_sym_val): Define.
5748 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
5750 * config.bfd: Set targ_underscore=yes for PE COFF targets
5752 2004-10-19 Alan Modra <amodra@bigpond.net.au>
5754 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
5755 (ppc64_elf_edit_opd): Likewise.
5757 2004-10-18 Mark Mitchell <mark@codesourcery.com>
5759 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
5760 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
5761 set SEC_ALLOC and SEC_LOAD.
5763 2004-10-18 Nick Clifton <nickc@redhat.com>
5765 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
5766 'name' for relocs against both local and global symbols.
5768 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5770 * bfd-in2.h: Regenerate.
5771 * bfd.c (struct bfd): Add no_export.
5772 * elflink.c (elf_link_add_object_symbols): Handle no_export.
5774 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5776 * config.bfd: Whitespace cleanup.
5777 * Makefile.am: Run "make dep-am"
5778 * Makefile.in: Regenerate.
5780 2004-10-15 Jakub Jelinek <jakub@redhat.com>
5782 * elflink.c (struct already_linked_section): Removed.
5783 (try_match_symbols_in_sections, already_linked): Removed.
5784 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
5785 prefix of section names when finding already_linked_table
5786 chain. Compare section names. Instead of calling already_linked,
5787 do it inline and only for sections in the same already_linked_list.
5789 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5791 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
5792 parameter. If called after _bfd_elf_write_section_eh_frame,
5793 don't allow a -2 return unless need_* bit is already set, and
5794 handle offsets adjusted for output_offset.
5795 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
5796 * elf.c (_bfd_elf_section_offset): Update call.
5798 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
5801 * coffcode.h (coff_compute_section_file_positions): Cast to
5802 bfd_vma when computing page alignment.
5804 2004-10-13 Mark Mitchell <mark@codesourcery.com>
5806 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5807 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
5809 2004-10-12 Mark Mitchell <mark@codesourcery.com>
5811 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
5812 relocations use a virtual address, not a section offset.
5814 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5816 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
5817 (narrow_instruction, widen_instruction): Remove unnecessary calls to
5818 xtensa_format_encode.
5819 (ebb_propose_action): Inline call to ebb_add_proposed_action.
5820 (ebb_add_proposed_action): Delete.
5822 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5824 * elf32-xtensa.c: Use ISO C90 formatting.
5826 2004-10-12 Paul Brook <paul@codesourcery.com>
5828 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
5831 2004-10-12 Paul Brook <paul@codesourcery.com>
5833 * elf32-arm.h: Support EABI version 4 objects.
5835 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5838 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
5839 Don't mark as default.
5840 (bfd_x86_64_arch): Don't mark as default.
5842 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5844 * elflink.c (enum action_discarded): New.
5845 (elf_section_complain_discarded): Delete.
5846 (elf_action_discarded): New function subsuming the above and also
5847 controlling reloc behaviour.
5848 (elf_link_input_bfd): Use it.
5850 2004-10-11 Jakub Jelinek <jakub@redhat.com>
5852 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
5853 (special_sections): Add .gnu.liblist and .gnu.conflict.
5854 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
5856 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5859 * elflink.c (elf_link_input_bfd): Try harder to support
5860 relocations against symbols in removed linkonce sections.
5862 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5864 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
5867 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
5868 sections do not reference symbols in non-SEC_ALLOC sections.
5870 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5873 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
5874 (_bfd_elf_link_omit_section_dynsym): Formatting.
5876 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5878 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
5879 * libbfd.h: Regnerate.
5880 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
5881 * elf32-frv.c: Likewise.
5882 * elf32-m32r.c: Likewise.
5883 * elf32-ppc.c: Likewise.
5884 * elf64-hppa.c: Likewise.
5885 * elfxx-ia64.c: Likewise.
5886 * opncls.c: Likewise.
5888 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5890 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
5891 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
5892 offsets stored in struct eh_cie_fde entries before doing other
5895 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
5896 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
5897 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
5898 setting offsets for removed CIEs. Don't set "sec", instead set
5899 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
5900 CIE in hdr_info. Only set make_relative and make_lsda_relative
5901 for CIEs. Use pointers rather than array indices.
5902 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
5903 make_lsda_relative, need_* on cie_inf for FDEs.
5904 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
5905 section output_offset. Delete cie_offset, instead use cie_inf
5906 pointer to CIE entry. Use need_relative and need_lsda_relative on
5907 CIE entry for FDEs. Use pointers rather than array indices.
5909 2004-10-09 Alan Modra <amodra@bigpond.net.au>
5911 * coff-rs6000.c (rs6000coff_vec): Add initializer for
5912 bfd_is_target_special_symbol.
5913 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5914 * som.c (som_bfd_is_target_special_symbol): Define.
5916 2004-10-08 Nick Clifton <nickc@redhat.com>
5918 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
5919 * configure: Regenerate.
5920 * bfd-in2.h: Regenerate.
5921 * syms.c (bfd_is_target_special_symbol): New interface function.
5922 Returns true when a symbol should be considered to be special.
5923 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
5924 the symbol jump table.
5925 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5926 Return true iff the symbol is a mapping symbol.
5927 (bfd_elf32_bfd_is_target_special_symbol): Define.
5928 * elfxx-target.h: Provide a default definition for
5929 bfd_is_target_special_symbol.
5930 * aout-target.h: Likewise.
5931 * aout-tic30.c: Likewise.
5932 * binary.c: Likewise.
5933 * coffcode.h: Likewise.
5934 * i386msdos.c: Likewise.
5937 * libaout.h: Likewise.
5938 * libbfd-in.h: Likewise
5939 * libecoff.h: Likewise.
5940 * mach-o.c: Likewise.
5942 * nlm-target.h: Likewise.
5943 * oasys.c: Likewise.
5945 * ppcboot.c: Likewise.
5947 * tekhex.c: Likewise.
5948 * versados.c: Likewise.
5950 * xcoff-target.h: Likewise.
5952 * libbfd.h: Regenerate.
5954 2004-10-08 Daniel Jacobowitz <dan@debian.org>
5956 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5957 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5958 (elf_backend_section_from_shdr): Define.
5960 2004-10-08 Alan Modra <amodra@bigpond.net.au>
5962 * syms.c (bfd_is_local_label): Return false for file symbols.
5964 2004-10-07 Bob Wilson <bob.wilson@acm.org>
5965 David Heine <dlheine@tensilica.com>
5967 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5968 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5969 (elf32xtensa_no_literal_movement): New global variable.
5970 (elf_howto_table): Add entries for new relocations.
5971 (elf_xtensa_reloc_type_lookup): Handle new relocations.
5972 (property_table_compare): When addresses are equal, compare sizes and
5973 various property flags.
5974 (property_table_matches): New.
5975 (xtensa_read_table_entries): Extend to read new property tables. Add
5976 output_addr parameter to indicate that output addresses should be used.
5977 Use bfd_get_section_limit.
5978 (elf_xtensa_find_property_entry): New.
5979 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5980 (elf_xtensa_check_relocs): Handle new relocations.
5981 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
5982 relocations. Use new xtensa-isa.h functions.
5983 (build_encoding_error_message): Remove encode_result parameter. Add
5984 new target_address parameter used to detect alignment errors.
5985 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
5986 error handling. Use new is_operand_relocation function.
5987 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5988 Use underbar macro for error messages. Formatting.
5989 (get_const16_opcode): New.
5990 (get_l32r_opcode): Add a separate flag for initialization.
5991 (get_relocation_opnd): Operand number is no longer explicit in the
5992 relocation. Change to decode the opcode and analyze its operands.
5993 (get_relocation_slot): New.
5994 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
5995 Use new xtensa-isa.h functions to handle multislot instructions.
5996 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
5997 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5998 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5999 check_loop_aligned, check_branch_target_aligned_address, narrowable,
6000 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
6001 get_single_format, init_op_single_format_table): New.
6002 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
6003 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
6004 (contract_asm_expansion): Add error_message parameter and pass it to
6005 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
6006 with R_XTENSA_SLOT0_OP.
6007 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
6008 instructions. Use new xtensa-isa.h functions.
6009 (r_reloc struct): Add new virtual_offset field.
6010 (r_reloc_init): Add contents and content_length parameters. Set
6011 virtual_offset field to zero. Add contents to target_offset field for
6012 partial_inplace relocations.
6013 (r_reloc_is_defined): Check for null.
6014 (print_r_reloc): New debug function.
6015 (source_reloc struct): Replace xtensa_operand field with pair of the
6016 opcode and the operand position. Add is_abs_literal field.
6017 (init_source_reloc): Specify operand by opcode/position pair. Set
6018 is_abs_literal field.
6019 (source_reloc_compare): When target_offsets are equal, compare other
6020 fields to make sorting predictable.
6021 (literal_value struct): Add is_abs_literal field.
6022 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
6023 (init_literal_value): New.
6024 (is_same_value): Replace with ...
6025 (literal_value_equal): ... this function. Add comparisons of
6026 virtual_offset and is_abs_literal fields.
6027 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
6028 failure. Initialize has_last_loc field.
6029 (value_map_hash_table_delete): New.
6030 (hash_literal_value): Rename to ...
6031 (literal_value_hash): ... this. Include is_abs_literal flag and
6032 virtual_offset field in the hash value.
6033 (get_cached_value): Rename to ...
6034 (value_map_get_cached_value): ... this. Update calls to
6035 literal_value_hash and literal_value_equal.
6036 (add_value_map): Check for allocation failure. Update calls to
6037 value_map_get_cached_value and literal_value_hash.
6038 (text_action, text_action_list, text_action_t): New types.
6039 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
6040 text_action_add, text_action_add_literal, offset_with_removed_text,
6041 offset_with_removed_text_before_fill, find_insn_action,
6042 print_action_list, print_removed_literals): New.
6043 (offset_with_removed_literals): Delete.
6044 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
6045 fix_array, fix_array_count, allocated_relocs, relocs_count, and
6046 allocated_relocs_count fields.
6047 (init_xtensa_relax_info): Initialize new fields.
6048 (reloc_bfd_fix struct): Add new translated field.
6049 (reloc_bfd_fix_init): Add translated parameter and use it to set the
6051 (fix_compare, cache_fix_array): New.
6052 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
6053 section via get_xtensa_relax_info. Use cache_fix_array to set up
6054 sorted fix_array and use bsearch instead of linear search.
6055 (section_cache_t): New struct.
6056 (init_section_cache, section_cache_section, clear_section_cache): New.
6057 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
6058 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
6059 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
6060 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
6062 (retrieve_contents): Use bfd_get_section_limit.
6063 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
6064 to compute_removed_literals. Free value_map_hash_table when no longer
6066 (analyze_relocations): Check is_relaxable_asm_section flag. Call
6067 compute_text_actions for all sections.
6068 (find_relaxable_sections): Mark sections as relaxable if they contain
6069 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
6070 call. Increment relax_info src_count field only for appropriate
6071 relocation types. Remove is_literal_section check.
6072 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
6073 r_reloc_init and find_associated_l32r_irel. Check
6074 is_relaxable_asm_section flag. Handle L32R instructions with absolute
6075 literals. Pass is_abs_literal flag to init_source_reloc.
6076 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
6077 CONST16 instructions. Adjust calls to r_reloc_init and
6078 pcrel_reloc_fits. Handle weak symbols conservatively.
6079 (find_associated_l32r_irel): Add bfd parameter and pass it to
6081 (compute_text_actions, compute_ebb_proposed_actions,
6082 compute_ebb_actions, check_section_ebb_pcrels_fit,
6083 check_section_ebb_reduces, text_action_add_proposed,
6084 compute_fill_extra_space): New.
6085 (remove_literals): Replace with ...
6086 (compute_removed_literals): ... this function. Call
6087 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
6088 Call xtensa_read_table_entries to get the property table. Skip
6089 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
6090 is_removable_literal, remove_dead_literal, and
6091 identify_literal_placement functions.
6092 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
6093 instead of linear search.
6094 (is_removable_literal, remove_dead_literal,
6095 identify_literal_placement): New.
6096 (relocations_reach): Update check for literal not referenced by any
6097 PC-relative relocations. Adjust call to pcrel_reloc_fits.
6098 (coalesce_shared_literal, move_shared_literal): New.
6099 (relax_section): Use bfd_get_section_limit. Call
6100 translate_section_fixes. Update calls to r_reloc_init and
6101 offset_with_removed_text. Check new is_relaxable_asm_section flag.
6102 Add call to pin_internal_relocs. Add special handling for
6103 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
6104 info to calculate new addend_displacement variable. Replace code for
6105 deleting literals with more general code to perform the actions
6106 determined by the action_list for the section.
6107 (translate_section_fixes, translate_reloc_bfd_fix): New.
6108 (translate_reloc): Check new is_relaxable_asm_section flag. Call
6109 find_removed_literal only if is_operand_relocation. Update call to
6110 offset_with_removed_text. Use new target_offset and removed_bytes
6112 (move_literal): New.
6113 (relax_property_section): Use bfd_get_section_limit. Set new
6114 is_full_prop_section flag and handle new property tables. Update calls
6115 to r_reloc_init and offset_with_removed_text. Check
6116 is_relaxable_asm_section flag. Handle expansion of zero-sized
6117 unreachable entries, with use of offset_with_removed_text_before_fill.
6118 For relocatable links, combine entries only for literal tables.
6119 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
6120 calls to offset_with_removed_text. Translate st_size field for
6122 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
6123 failure. Add contents parameter. Update call to get_bfd_fix. Update
6124 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
6125 R_XTENSA_ASM_EXPAND relocs.
6126 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
6127 call to get_bfd_fix. Include offset from contents for partial_inplace
6129 (is_reloc_sym_weak): New.
6130 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
6131 (prop_sec_len): New.
6132 (xtensa_is_property_section): Handle new property sections.
6133 (is_literal_section): Delete.
6134 (internal_reloc_compare): When r_offset matches, compare r_info and
6135 r_addend to make sorting predictable.
6136 (internal_reloc_matches): New.
6137 (xtensa_get_property_section_name): Handle new property sections.
6138 (xtensa_get_property_predef_flags): New.
6139 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
6140 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
6141 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
6142 (xtisa_errno, xtisa_error_msg): New variables.
6143 (xtensa_isa_errno, xtensa_isa_error_msg): New.
6144 (xtensa_insnbuf_alloc): Add error handling.
6145 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
6146 use xtensa_format_decode. Add error handling.
6147 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
6148 instruction length to find the number of bytes to copy.
6149 (xtensa_isa_init): Add error handling. Replace calls to
6150 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
6151 tables in the xtensa_modules structure.
6152 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
6153 xtensa_extend_isa): Delete.
6154 (xtensa_isa_free): Change to only free lookup tables.
6155 (opname_lookup_compare): Replace with ...
6156 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
6157 (xtensa_insn_maxlength): Rename to ...
6158 (xtensa_isa_maxlength): ... this.
6159 (xtensa_insn_length): Delete.
6160 (xtensa_insn_length_from_first_byte): Replace with ...
6161 (xtensa_isa_length_from_chars): ... this function.
6162 (xtensa_num_opcodes): Rename to ...
6163 (xtensa_isa_num_opcodes): ... this.
6164 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
6165 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
6166 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
6167 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
6168 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
6169 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
6170 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
6171 (xtensa_opcode_lookup): Add error handling.
6172 (xtensa_decode_insn): Replace with ...
6173 (xtensa_opcode_decode): ... this function, with new format and
6174 slot parameters. Add error handling.
6175 (xtensa_encode_insn): Replace with ...
6176 (xtensa_opcode_encode): ... this function, which does the encoding via
6177 one of the entries in the "encode_fns" array. Add error handling.
6178 (xtensa_opcode_name): Add error handling.
6179 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
6180 xtensa_opcode_is_call): New.
6181 (xtensa_num_operands): Replace with ...
6182 (xtensa_opcode_num_operands): ... this function. Add error handling.
6183 (xtensa_opcode_num_stateOperands,
6184 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
6185 xtensa_opcode_funcUnit_use, xtensa_operand_name,
6186 xtensa_operand_is_visible): New.
6187 (xtensa_get_operand, xtensa_operand_kind): Delete.
6188 (xtensa_operand_inout): Add error handling and special-case for
6190 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
6191 operate on one slot of an instruction. Added error handling.
6192 (xtensa_operand_encode): Handle default operands with no encoding
6193 functions. Check for success by comparing against decoded value.
6195 (xtensa_operand_decode): Handle default operands. Return decoded value
6196 through argument pointer. Add error handling.
6197 (xtensa_operand_is_register, xtensa_operand_regfile,
6198 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
6199 (xtensa_operand_isPCRelative): Rename to ...
6200 (xtensa_operand_is_PCrelative): ... this. Add error handling.
6201 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
6202 through argument pointer. Add error handling.
6203 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
6204 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
6205 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
6206 xtensa_regfile_shortname, xtensa_regfile_view_parent,
6207 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
6208 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
6209 xtensa_state_is_exported, xtensa_sysreg_lookup,
6210 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
6211 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
6212 xtensa_interface_num_bits, xtensa_interface_inout,
6213 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
6214 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
6215 * xtensa-modules.c: Rewrite to use new data structures.
6216 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
6217 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
6218 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
6219 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
6220 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
6221 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
6222 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
6223 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
6224 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
6225 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
6226 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
6227 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
6228 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
6229 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
6230 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
6231 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
6232 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
6233 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
6234 * Makefile.in: Regenerate.
6235 * bfd-in2.h: Likewise.
6236 * libbfd.h: Likewise.
6238 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
6240 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
6241 against the absolute section.
6242 (mips_elf64_write_rela): Likewise.
6244 2004-10-07 Jan Beulich <jbeulich@novell.com>
6246 * elf.c (elf_find_function): Don't generally check for matching
6247 section, just for non-file symbols. Remove redunant comparison
6249 * elf32-arm.h (arm_elf_find_function): Likewise.
6251 2004-10-07 Jeff Baker <jbaker@qnx.com>
6253 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
6254 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
6257 2004-10-04 Roland McGrath <roland@redhat.com>
6259 * hash.c (bfd_hash_set_default_size): Use const for table.
6260 Use size_t instead of int for variable compared to sizeof results.
6262 2004-10-05 Alan Modra <amodra@bigpond.net.au>
6265 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
6267 2004-10-01 Paul Brook <paul@codesourcery.com>
6269 * elf32-arm.h (elf32_arm_fake_sections,
6270 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
6272 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
6274 2004-10-01 Alan Modra <amodra@bigpond.net.au>
6276 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
6278 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
6279 need_relative or need_lsda_relative if we are processing an
6280 offset for a reloc on a FDE initial loc or LSDA field
6282 (_bfd_elf_write_section_eh_frame): Test need_relative and
6283 need_lsda_relative in place of corresponding make_* field
6284 when deciding to use pc-relative encodings.
6286 2004-09-30 Paul Brook <paul@codesourcery.com>
6288 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
6289 target2 relocation type.
6291 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
6294 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
6296 2004-09-30 Paul Brook <paul@codesourcery.com>
6298 * reloc.c: Add BFD_RELOC_ARM_SMI.
6299 * bfd-in2.h: Regenerate.
6302 2004-09-24 Alan Modra <amodra@bigpond.net.au>
6304 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
6305 vma and output offset to address.
6306 * simple.c (simple_save_output_info): Only set output section
6307 and offset for debug sections, or those not already set up by
6309 (bfd_simple_get_relocated_section_contents): Update comment.
6311 2004-09-24 Alan Modra <amodra@bigpond.net.au>
6313 * elf.c (IS_LOADED): Delete.
6314 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
6315 Restore SEC_HAS_CONTENTS test to the one place it was used prior
6318 2004-09-23 Alan Modra <amodra@bigpond.net.au>
6321 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
6322 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
6323 redundant assignment of EM_SPARC.
6325 2004-09-22 Brian Ford <ford@vss.fsi.com>
6327 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6328 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
6330 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6332 2004-09-22 Alan Modra <amodra@bigpond.net.au>
6334 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
6335 (elf_backend_modify_segment_map): Don't define.
6337 2004-09-22 Alan Modra <amodra@bigpond.net.au>
6339 * elf.c (IS_LOADED): Define.
6340 (assign_file_positions_for_segments): Don't round up file offset of
6341 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
6342 Delete code handling link script adjustment of lma. Do the adjust
6343 in later code handling similar ajustments. Remove dead code error
6344 check. Warn if section lma would require a negative offset
6345 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
6346 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
6347 update voff in section loop. Change voff in segment loop to be an
6348 adjustment on top of "off". Set sec->filepos and update "off" later.
6349 Test for loadable sections consistently using IS_LOADED. Similarly,
6350 test for alloc-only sections other than .tbss consistently.
6351 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
6352 Tidy PT_NOTE handling. Use %B and %A in error messages.
6353 (assign_file_positions_except_relocs): Use %B in error message.
6355 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
6357 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
6358 (CONFIG_STATUS_DEPENDENCIES): New.
6359 (Makefile): Removed.
6360 (config.status): Likewise.
6361 * Makefile.in: Regenerated.
6363 2004-09-17 Paul Brook <paul@codesourcery.com>
6365 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
6366 (bfd_elf32_arm_process_before_allocation): Update prototype.
6367 * bfd-in2.h: Regenerate.
6368 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
6369 (elf32_arm_link_hash_table_create): Set it.
6370 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
6371 (bfd_elf32_arm_set_target_relocs): New function.
6372 (arm_real_reloc_type): New function.
6373 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
6374 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
6375 (elf32_arm_gc_sweep_hook): Ditto.
6376 (elf32_arm_check_relocs): Ditto.
6377 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
6378 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
6380 (elf32_arm_got_prel): New variable.
6381 (elf32_arm_howto_from_type): New function.
6382 (elf32_arm_info_to_howto): Use it.
6383 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
6384 BFD_RELOC_ARM_TARGET2.
6385 * libbfd.h: Regenerate.
6386 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
6388 2004-09-17 Alan Modra <amodra@bigpond.net.au>
6390 * ecoff.c: Update u.undef.next refs.
6391 * elf64-ppc.c: Likewise.
6392 * elflink.c: Likewise.
6393 * linker.c: Likewise.
6394 * xcofflink.c: Likewise.
6396 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
6397 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
6398 fields to indirect struct.
6399 * elf-m10300.c: Update u.weakdef refs.
6400 * elf32-arm.h: Likewise.
6401 * elf32-cris.c: Likewise.
6402 * elf32-frv.c: Likewise.
6403 * elf32-hppa.c: Likewise.
6404 * elf32-i370.c: Likewise.
6405 * elf32-i386.c: Likewise.
6406 * elf32-m32r.c: Likewise.
6407 * elf32-m68k.c: Likewise.
6408 * elf32-ppc.c: Likewise.
6409 * elf32-s390.c: Likewise.
6410 * elf32-sh.c: Likewise.
6411 * elf32-sparc.c: Likewise.
6412 * elf32-vax.c: Likewise.
6413 * elf32-xtensa.c: Likewise.
6414 * elf64-alpha.c: Likewise.
6415 * elf64-hppa.c: Likewise.
6416 * elf64-ppc.c: Likewise.
6417 * elf64-s390.c: Likewise.
6418 * elf64-sh64.c: Likewise.
6419 * elf64-sparc.c: Likewise.
6420 * elf64-x86-64.c: Likewise.
6421 * elfxx-ia64.c: Likewise.
6422 * elfxx-mips.c: Likewise.
6423 * elflink.c: Likewise. Also u.elf_hash_value.
6424 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
6426 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6427 (bfd_elf_gc_record_vtinherit): Alloc vtable.
6428 (bfd_elf_gc_record_vtentry): Likewise.
6429 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
6431 2004-09-17 Alan Modra <amodra@bigpond.net.au>
6433 * Makefile.am: Run "make dep-am".
6434 * Makefile.in: Regenerate.
6435 * bfd-in2.h: Regenerate.
6436 * po/SRC-POTFILES.in: Regenerate.
6437 * po/bfd.pot: Regenerate.
6439 2004-09-16 Alan Modra <amodra@bigpond.net.au>
6441 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
6442 with bitfields. Make "type" and "other" bitfields too.
6443 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
6444 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
6445 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
6446 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
6447 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
6448 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
6449 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
6450 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
6451 * elf-hppa.h: Update all uses of elf_link_hash_flags.
6452 * elf-m10300.c: Likewise.
6454 * elf32-arm.h: Likewise.
6455 * elf32-cris.c: Likewise.
6456 * elf32-frv.c: Likewise.
6457 * elf32-hppa.c: Likewise.
6458 * elf32-i370.c: Likewise.
6459 * elf32-i386.c: Likewise.
6460 * elf32-m32r.c: Likewise.
6461 * elf32-m68k.c: Likewise.
6462 * elf32-ppc.c: Likewise.
6463 * elf32-s390.c: Likewise.
6464 * elf32-sh-symbian.c: Likewise.
6465 * elf32-sh.c: Likewise.
6466 * elf32-sh64.c: Likewise.
6467 * elf32-sparc.c: Likewise.
6468 * elf32-vax.c: Likewise.
6469 * elf32-xtensa.c: Likewise.
6470 * elf64-alpha.c: Likewise.
6471 * elf64-hppa.c: Likewise.
6472 * elf64-ppc.c: Likewise.
6473 * elf64-s390.c: Likewise.
6474 * elf64-sh64.c: Likewise.
6475 * elf64-sparc.c: Likewise.
6476 * elf64-x86-64.c: Likewise.
6477 * elflink.c: Likewise.
6478 * elfxx-ia64.c: Likewise.
6479 * elfxx-mips.c: Likewise.
6480 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
6481 * configure: Regenerate.
6482 * aclocal.m4: Regenerate.
6484 2004-09-16 Alan Modra <amodra@bigpond.net.au>
6486 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
6487 around uses of R_ARM_TARGET1.
6488 (elf32_arm_check_relocs): Likewise.
6490 2004-09-13 Paul Brook <paul@codesourcery.com>
6492 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
6494 * bfd-in2.h: Regenerate.
6495 * libbfd.h: Regenerate.
6496 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
6497 (elf32_arm_link_hash_table_create): Set target1_is_rel.
6498 (bfd_elf32_arm_process_before_allocation): Ditto.
6499 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
6500 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
6501 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
6504 2004-09-10 Joel Brobecker <brobecker@gnat.com>
6506 * hpux-core.c (thread_section_p): New function.
6507 (hpux_core_core_file_p): Fix computation of offset in call
6508 to bfd_seek. Create a ".reg" section from an arbitrary
6509 ".reg/<id>" section if none was created after having read
6512 2004-09-11 Andreas Schwab <schwab@suse.de>
6514 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
6515 * aclocal.m4: Rebuild.
6516 * configure: Rebuild.
6518 2004-09-10 Joel Brobecker <brobecker@gnat.com>
6520 * section.c (bfd_sections_find_if): Fix parameter name in
6521 comment to match code.
6523 2004-09-10 Alan Modra <amodra@bigpond.net.au>
6525 * elf.c (assign_file_positions_except_relocs): Assign relocs
6526 stored in a bfd section.
6528 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
6530 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
6531 h->gotplt_refcount to 0, not -1.
6533 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
6535 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6536 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
6538 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
6539 handle symbol visibility here.
6541 2004-09-07 Alan Modra <amodra@bigpond.net.au>
6543 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
6544 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
6546 (ppc_stub_name): Remove trailing "+0" on stub name.
6547 (create_linkage_sections): Create relocations for
6548 branch lookup table when --emit-relocs as well as when --shared.
6549 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
6550 relbrlt test. For --emit-stub-syms, always output a sym even when
6551 one already exists on a plt call stub. Put stub type in the stub
6553 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
6555 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
6556 reloc_count in stub sections. Adjust relbrlt test.
6557 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
6558 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
6559 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
6560 for relocs against discarded symbols. Fix comments.
6562 2004-09-06 Mark Mitchell <mark@codesourcery.com>
6564 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
6565 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
6567 (map_sections_to_segments): ... here. Use it. Assign a file
6568 position to the .dynamic section if it is not loadable, but part
6569 of the PT_DYNAMIC segment.
6570 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
6571 offsets, not VMAs, for the BPABI. Do not fill in the header in
6572 the .got.plt section for the BPABI.
6573 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
6575 (elf_backend_want_got_plt): Define to zero for Symbian OS.
6577 2004-09-06 Nick Clifton <nickc@redhat.com>
6579 * elflink.c (elf_link_add_object_symbols): Set the error code to
6580 bfd_error_wrong_format when the input format does not match the
6583 2004-09-06 Alan Modra <amodra@bigpond.net.au>
6585 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
6586 (ppc64_elf_check_directives): ..here.
6587 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
6588 before accessing ppc64_elf_tdata.
6589 (ppc64_elf_finish_dynamic_sections): And here too.
6591 2004-09-04 Alan Modra <amodra@bigpond.net.au>
6593 * bfd.c (_bfd_default_error_handler): Correct loop exit.
6595 2004-09-03 Mark Mitchell <mark@codesourcery.com>
6597 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
6598 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
6599 (bfd_elf32_littlearm_symbian_vec): Likewise.
6600 * configure: Regenerated.
6601 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
6602 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
6603 (PLT_ENTRY_SIZE): Likewise.
6604 (bfd_vma_elf32_arm_symbian_plt_entry): New
6606 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
6608 (create_got_section): Don't create sections when generating BPABI
6610 (elf32_arm_create_dynamic_sections): Tidy.
6611 (elf32_arm_link_hash_table_create): Set plt_header_size,
6612 plt_entry_size, and symbian_p.
6613 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
6614 generating BPABI objects.
6615 (allocate_dynrelocs): Use htab->plt_header_size, not
6616 PLT_HEADER_SIZE. Do not add to .got.plt when
6617 generating BPABI objects.
6618 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
6619 * elfarm-nabi.c: Add SymbianOS target vectors.
6620 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
6621 (_bfd_elf_link_create_dynamic_sections): Likewise.
6622 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
6623 (elfNN_bed): Use it.
6624 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
6625 (bfd_elf32_littlearm_symbian_vec): Likewise.
6626 (_bfd_target_vector): Add them.
6628 2004-09-03 Nick Clifton <nickc@redhat.com>
6631 * coffcode.h (handle_COMDAT): Replace abort with an warning
6632 message and allow the scan to continue.
6634 2004-09-02 Alan Modra <amodra@bigpond.net.au>
6636 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
6637 in when reading relocs, not our sorted syms. Remove unnecessary
6640 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6642 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
6644 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
6646 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
6647 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
6648 replace uses of *_alias with *_noncanonical.
6649 * aclocal.m4: Rebuild with aclocal 1.4p6.
6650 * Makefile.in: Rebuild with automake 1.4p6.
6651 * doc/Makefile.in: Rebuild with automake 1.4p6.
6652 * configure.in: Autoupdate with autoupdate 2.59.
6653 * config.in: Regenerate with autoheader 2.59.
6654 * configure: Regnerate with autoconf 2.59.
6656 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6658 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
6659 symbol pointer arrays before modifying.
6661 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6663 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
6664 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
6665 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
6666 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
6667 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
6668 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
6669 Use both symbol tables on non-relocatable objects. Use a common
6670 error exit. Fix "mid" warning.
6671 * libbfd.h: Regenerate.
6672 * bfd-in2.h: Regenerate.
6674 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6676 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
6678 (struct sfpr_def_parms): Save some space.
6679 (sfpr_define): Here too.
6681 * elf64-ppc.c (compare_symbols): Put section syms first.
6682 (sym_exists_at): New function.
6683 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
6684 points only for relocatable files. Use .opd section contents
6685 otherwise. Generally clean up the code.
6687 2004-08-27 Alan Modra <amodra@bigpond.net.au>
6689 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
6690 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
6691 (struct sfpr_def_parms): New.
6692 (sfpr_define): New function.
6693 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
6694 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
6695 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
6696 (savefpr1_tail, restfpr1_tail): New functions.
6697 (savevr, savevr_tail, restvr, restvr_tail): New functions.
6698 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
6699 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
6700 code. Define all ABI mandated _save and _rest functions.
6702 2004-08-26 Paul Brook <paul@codesourcery.com>
6704 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
6706 2004-08-26 Alan Modra <amodra@bigpond.net.au>
6708 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
6711 2004-08-26 Alan Modra <amodra@bigpond.net.au>
6713 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
6714 that pcrel correction is applied for R_386_PC32.
6716 2004-08-25 Alan Modra <amodra@bigpond.net.au>
6718 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
6719 for R_386_32 and R_386_PC32 relocs against symbols defined in
6722 2004-08-25 Dmitry Diky <diwil@spec.ru>
6724 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
6725 Add new relocations.
6726 * bfd-in2.h: Regenerate.
6727 * libbfd.h: Regenerate.
6728 * elf32-msp430.c: Clean-up code.
6729 (elf_msp430_howto_table): Add new relocation entries.
6730 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
6731 (msp430_elf_relax_section): New function.
6732 (msp430_elf_relax_delete_bytes): New function.
6733 (msp430_elf_symbol_address_p): New function.
6735 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6737 * elf32-m32r.c (m32r_elf_relocate_section): Handle
6738 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
6740 2004-08-20 Daniel Jacobowitz <dan@debian.org>
6742 * elflink.c (_bfd_elf_section_already_linked): Handle
6743 SEC_LINK_DUPLICATES_SAME_CONTENTS.
6745 2004-08-19 Mark Mitchell <mark@codesourcery.com>
6747 * config.bfd (arm*-*-symbianelf*): New target.
6748 (arm*-*-eabi*): Likewise.
6750 2004-08-19 Alan Modra <amodra@bigpond.net.au>
6752 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
6753 "struct ppc_link_hash_entry *".
6754 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
6755 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
6757 2004-08-19 Jakub Jelinek <jakub@redhat.com>
6759 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
6760 entries (where fd_aux overlaps next entry's fd_func).
6761 Add non_overlapping argument, use it.
6762 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
6763 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6764 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
6765 as indexes into opd_sym_map/opd_adjust array.
6766 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
6768 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6770 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
6771 if we can look up their function descriptor in a regular file.
6773 2004-08-18 Nick Clifton <nickc@redhat.com>
6776 * cofflink.c (coff_link_add_symbols): Check that the comdat
6777 pointer in the coff_section_data structure has been initialised
6780 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6783 * elflink.c (bfd_elf_record_link_assignment): Add comment about
6784 changing bfd_link_hash_undefined to bfd_link_hash_new.
6786 2004-08-17 Jakub Jelinek <jakub@redhat.com>
6788 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
6790 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
6791 (synthetic_opd, synthetic_relocatable): New variables.
6792 (compare_symbols, compare_relocs): New helper routines.
6793 (ppc64_elf_get_synthetic_symtab): New function.
6794 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
6796 * bfd-in2.h: Regenerated.
6797 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
6798 to relsyms. Return 0 if abfd is relocatable.
6800 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6802 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
6804 2004-08-17 Nick Clifton <nickc@redhat.com>
6806 * (is_arm_mapping_symbol_name): New function - return true
6807 when a symbol name matches the requirements for an ARM mapping
6809 (arm_elf_find_function): New function based on
6810 elf_find_function in elf.c but skipping ARM mapping symbols
6811 and including thumb function symbols.
6812 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
6813 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
6815 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6817 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
6818 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
6819 (ppc64_elf_brtaken_reloc): Here too.
6821 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6823 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
6825 (ppc64_elf_check_directives): Check that we have the right hash
6826 table before proceeding.
6828 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6830 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
6831 (adjust_opd_syms): Attach opd syms for deleted entries to one of
6832 the sections that will be discarded.
6834 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6836 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
6838 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6840 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
6841 free space available.
6843 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6845 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
6846 occurrences with bfd_byte * thoughout file.
6848 * coff-rs6000.c (do_shared_object_padding): Warning fix.
6849 (xcoff_write_armap_big): Likewise.
6850 (xcoff_write_archive_contents_old): Likewise.
6851 (xcoff_write_archive_contents_big): Likewise.
6853 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
6855 2004-08-13 Nick Clifton <nickc@redhat.com>
6857 * elf32-arm.h: Convert to ISO C90.
6859 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6862 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
6865 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6867 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
6868 (bfd_archive_filename, bfd_get_section_ident): Delete.
6869 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
6870 bfd_archive_filename.
6871 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
6872 to warn about symbols in discarded sections. Use _bfd_error_handler.
6873 * aout-adobe.c (aout_adobe_callback): See below.
6874 * aout-cris.c (swap_ext_reloc_in): ..
6875 * coff-arm.c (find_thumb_glue, find_arm_glue,
6876 coff_arm_relocate_section, bfd_arm_process_before_allocation,
6877 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
6878 coff_arm_copy_private_bfd_data): ..
6879 * coff-i860.c (i860_reloc_processing): ..
6880 * coff-mcore.c (mcore_coff_unsupported_reloc,
6881 coff_mcore_relocate_section): ..
6882 * coff-ppc.c (coff_ppc_relocate_section): ..
6883 * coff-rs6000.c (xcoff_create_csect_from_smclas
6884 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6885 sh_swap_insns, sh_relocate_section): ..
6886 * coff-tic54x.c (tic54x_reloc_processing): ..
6887 * coff-tic80.c (coff_tic80_relocate_section): ..
6888 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
6889 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
6890 coff_slurp_symbol_table, coff_classify_symbol,
6891 coff_slurp_reloc_table): ..
6892 * coffgen.c (_bfd_coff_read_string_table): ..
6893 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
6894 _bfd_coff_generic_relocate_section): ..
6895 * cpu-arm.c (bfd_arm_merge_machines): ..
6896 * cpu-sh.c (sh_merge_bfd_arch): ..
6897 * elf-hppa.h (elf_hppa_relocate_section): ..
6898 * elf.c (bfd_elf_string_from_elf_section, setup_group,
6899 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
6900 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
6901 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
6902 * elf32-arm.h (find_thumb_glue, find_arm_glue,
6903 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
6904 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
6905 elf32_arm_relocate_section, elf32_arm_set_private_flags,
6906 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
6907 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
6908 cris_elf_merge_private_bfd_data
6909 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
6910 * elf32-gen.c (elf32_generic_link_add_symbols): ..
6911 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
6912 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
6913 elf32_hppa_relocate_section): ..
6914 * elf32-i370.c (i370_elf_merge_private_bfd_data,
6915 i370_elf_check_relocs, i370_elf_relocate_section): ..
6916 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
6917 elf_i386_relocate_section): ..
6918 * elf32-m32r.c (m32r_elf_relocate_section,
6919 m32r_elf_merge_private_bfd_data): ..
6920 * elf32-m68hc1x.c (m68hc12_add_stub,
6921 _bfd_m68hc11_elf_merge_private_bfd_data): ..
6922 * elf32-m68k.c (elf_m68k_relocate_section): ..
6923 * elf32-mcore.c (mcore_elf_unsupported_reloc,
6924 mcore_elf_relocate_section): ..
6925 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6926 ppc_elf_check_relocs, ppc_elf_relocate_section,
6927 ppc_elf_begin_write_processing): ..
6928 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6929 elf_s390_relocate_section): ..
6930 * elf32-sh-symbian.c (sh_symbian_import_as,
6931 sh_symbian_process_embedded_commands,
6932 sh_symbian_relocate_section): ..
6933 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6934 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6935 sh_elf_merge_private_data): ..
6936 * elf32-sparc.c (elf32_sparc_check_relocs,
6937 elf32_sparc_relocate_section,
6938 elf32_sparc_merge_private_bfd_data): ..
6939 * elf32-v850.c (v850_elf_check_relocs,
6940 v850_elf_merge_private_bfd_data): ..
6941 * elf32-xtensa.c (elf_xtensa_check_relocs,
6942 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6943 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6944 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6945 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6946 * elf64-gen.c (elf64_generic_link_add_symbols): ..
6947 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6948 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6949 ppc64_elf_relocate_section): ..
6950 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6951 elf_s390_relocate_section): ..
6952 * elf64-sh64.c (sh_elf64_relocate_section): ..
6953 * elf64-sparc.c (sparc64_elf_check_relocs,
6954 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6955 sparc64_elf_merge_private_bfd_data): ..
6956 * elf64-x86-64.c (elf64_x86_64_check_relocs,
6957 elf64_x86_64_relocate_section): ..
6958 * elflink.c (_bfd_elf_add_default_symbol,
6959 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6960 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6961 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6962 elf_get_linked_section_vma, elf_fixup_link_order,
6963 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6964 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6965 * elfxx-ia64.c (elfNN_ia64_relax_section,
6966 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6967 * elfxx-mips.c (mips_elf_perform_relocation,
6968 _bfd_mips_elf_check_relocs,
6969 _bfd_mips_elf_merge_private_bfd_data): ..
6970 * ieee.c (ieee_slurp_external_symbols): ..
6971 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6972 * libbfd.c (_bfd_generic_verify_endian_match): ..
6973 * linker.c (_bfd_generic_link_add_one_symbol,
6974 _bfd_generic_section_already_linked): ..
6975 * pdp11.c (translate_to_native_sym_flags): ..
6976 * pe-mips.c (coff_pe_mips_relocate_section): ..
6977 * peicode.h (pe_ILF_build_a_bfd): ..
6978 * srec.c (srec_bad_byte): ..
6979 * stabs.c (_bfd_link_section_stabs): ..
6980 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6981 Replace all uses of bfd_archive_filename and bfd_get_section_ident
6982 with corresponding %B and %A in _bfd_error_handler format string.
6983 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6984 calls to use %A and %B. Fix "against symbol .. from section" and
6985 similar error messages. Combine multiple _bfd_error_handler calls
6986 where they were separated due to bfd_archive_filename deficiencies.
6987 * bfd-in2.h: Regenerate.
6989 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
6991 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6994 2004-08-10 Alan Modra <amodra@bigpond.net.au>
6996 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6997 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6998 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
7000 (link_hash_newfunc): Init was_undefined.
7001 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
7002 Use undefweak instead.
7003 (ppc64_elf_check_directives): Fix undefs chain.
7004 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
7006 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
7007 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
7008 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
7010 2004-08-09 Jakub Jelinek <jakub@redhat.com>
7012 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
7013 error, test input_section flags rather than sec.
7015 2004-08-09 Alan Modra <amodra@bigpond.net.au>
7017 * elf-bfd.h (struct elf_backend_data): Add
7018 elf_backend_archive_symbol_lookup.
7019 (_bfd_elf_archive_symbol_lookup): Declare.
7020 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
7021 (elf_link_add_archive_symbols): ..extracted from here. Call the
7023 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
7024 (elfNN_bed): Init new field.
7025 * elf64-ppc.c (elf_backend_check_directives): Define.
7026 (elf_backend_archive_symbol_lookup): Define.
7027 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
7028 a ppc_link_hash_entry pointer.
7030 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
7031 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
7032 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
7033 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
7034 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
7035 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
7036 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
7039 2004-08-09 Alan Modra <amodra@bigpond.net.au>
7041 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
7042 (ppc64_elf_add_symbol_hook): Test for NULL section.
7043 (get_sym_h): Formatting.
7044 (ppc64_elf_size_stubs): Include reloc addend in value stored as
7047 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
7048 long branch stubs with code handling plt and r2off branch stubs.
7050 2004-08-09 Alan Modra <amodra@bigpond.net.au>
7052 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
7053 * elflink.c (elf_link_input_bfd): Formatting.
7054 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
7056 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
7057 (link_hash_newfunc): Don't set it.
7058 (ppc64_elf_copy_indirect_symbol): Nor copy it.
7059 (ppc64_elf_mark_entry_syms): Delete.
7060 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
7061 sections. Use get_opd_info.
7062 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
7064 2004-08-09 Alan Modra <amodra@bigpond.net.au>
7066 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
7068 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
7069 (func_desc_adjust): Don't set have_undefweak.
7070 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
7071 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
7073 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
7074 "struct ppc_link_hash_entry *". Adjust all references.
7075 (ppc64_elf_hide_symbol): Correct a comment.
7077 * elf64-ppc.c (get_opd_info): New function.
7078 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
7079 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
7080 before calling get_fdh. Test fdh rather than h before dereferencing
7081 fdh. Mark removed symbols in opd_adjust.
7082 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
7083 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
7085 (ppc64_elf_output_symbol_hook): Likewise.
7087 2004-08-06 Paul Brook <paul@codesourcery.com>
7089 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
7090 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
7091 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
7092 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
7093 and BFD_RELOC_ARM_SBREL32.
7094 * bfd-in2.h, bbfd.h: Regenerate.
7096 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7098 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
7099 the dynamic link symbol actually in use.
7101 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
7103 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
7105 2004-07-31 Joel Brobecker <brobecker@gnat.com>
7106 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7108 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
7109 SHN_MIPS_TEXT and SHN_MIPS_DATA.
7111 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
7112 Nick Clifton <nickc@redhat.com>
7115 * bfd.c (_bfd_default_error_handler): Make it global.
7117 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
7119 * elf.c (assign_section_numbers): Cope gracefully with sections
7120 which have SHF_LINK_ORDER set but no sh_link set up.
7121 * elflink.c (elf_get_linked_section_vma): Likewise.
7123 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
7126 * elfxx-target.h (elf_backend_link_order_error_handler): New.
7127 Set it to _bfd_default_error_handler.
7128 (elfNN_bed): Add elf_backend_link_order_error_handler.
7130 * libbfd-in.h (_bfd_default_error_handler): New.
7132 * libbfd.h: Regenerated.
7134 2004-07-30 Jakub Jelinek <jakub@redhat.com>
7136 * archures.c (bfd_mach_sparc_64bit_p): Define.
7137 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
7138 * bfd-in2.h: Rebuilt.
7140 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
7142 Introduce SH2a support.
7143 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
7144 * archures.c (bfd_mach_sh2a_nofpu): New.
7145 * bfd-in2.h: Rebuilt.
7146 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
7147 (arch_info_struct): Add sh2a_nofpu.
7148 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
7149 2003-12-29 DJ Delorie <dj@redhat.com>
7150 * reloc.c: Add relocs for sh2a.
7151 * bfd-in2.h: Regenerate.
7152 * libbfd.hh: Regenerate.
7153 2003-12-01 Michael Snyder <msnyder@redhat.com>
7154 * archures.c (bfd_mach_sh2a): New.
7155 * bfd-in2.h: Rebuilt.
7156 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
7158 (arch_info_struct): Add sh2a.
7159 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
7161 2004-07-28 Nick Clifton <nickc@redhat.com>
7162 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7165 * som.c (setup_sections): Improve estimation of space sizes in
7166 relocatable objects.
7168 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
7169 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
7170 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
7172 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
7173 * configure: Regenerate.
7174 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
7175 case that accepts OSABI=NetBSD and OSABI=SysV.
7176 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
7177 the base of .got or .data (if .got does not exist).
7178 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
7180 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
7181 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
7182 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
7183 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
7185 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
7188 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
7189 (elf_sec_group): Defined.
7190 (bfd_elf_match_symbols_in_sections): New prototype.
7191 (_bfd_elf_setup_group_pointers): Likewise.
7193 * elf.c (bfd_elf_discard_group): Abort.
7194 (bfd_elf_set_group_contents): Also include relocation sections.
7195 Remove zero-fill for ld -r.
7196 (_bfd_elf_setup_group_pointers): New function.
7197 (elf_sort_elf_symbol): Likewise.
7198 (elf_sym_name_compare): Likewise.
7199 (bfd_elf_match_symbols_in_sections): Likewise.
7201 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
7203 * elflink.c (match_group_member): New.
7204 (elf_link_input_bfd): Check group member for discarded section.
7205 (try_match_symbols_in_sections): New function.
7206 (already_linked): Likewise.
7207 (_bfd_elf_section_already_linked): Support mixing comdat group
7208 and linkonce section.
7210 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
7211 * linker.c (bfd_section_already_linked_table_traverse): New.
7213 * libbfd.h: Regenerated.
7215 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
7217 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
7218 BFD_RELOC_CRX_SWITCH32.
7219 * bfd-in2.h: Regenerate.
7220 * libbfd.h: Regenerate.
7221 * elf32-crx.c: Support relocation/relaxation of
7222 BFD_RELOC_CRX_SWITCH* types.
7224 2004-07-27 Alan Modra <amodra@bigpond.net.au>
7226 * elf64-ppc.c: Correct "Linker stubs" comment.
7228 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
7230 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
7232 (elf_linked_to_section): New.
7234 * elf.c (assign_section_numbers): Set up sh_link for
7237 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
7238 to sh_link for SHT_IA_64_UNWIND sections.
7240 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
7242 * elflink.c (elf_fixup_link_order): Add _() to error message.
7244 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
7246 * elflink.c (elf_fixup_link_order): Issue a warning and flag
7249 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
7251 * aout-adobe.c (aout_32_section_already_linked): Defined.
7252 * aout-target.h (MY_section_already_linked): Likewise.
7253 * aout-tic30.c (MY_section_already_linked): Likewise.
7254 * binary.c (binary_section_already_linked): Likewise.
7255 * bout.c (b_out_section_already_linked): Likewise.
7256 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
7257 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
7258 * coffcode.h (coff_section_already_linked): Likewise.
7259 * i386msdos.c (msdos_section_already_linked): Likewise.
7260 * i386os9k.c (os9k_section_already_linked): Likewise.
7261 * ieee.c (ieee_section_already_linked): Likewise.
7262 * ihex.c (ihex_section_already_linked): Likewise.
7263 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
7264 * mmo.c (mmo_section_already_linked): Likewise.
7265 * nlm-target.h (nlm_section_already_linked): Likewise.
7266 * oasys.c (oasys_section_already_linked): Likewise.
7267 * pef.c (bfd_pef_section_already_linked): Likewise.
7268 * ppcboot.c (ppcboot_section_already_linked): Likewise.
7269 * som.c (som_bfd_discard_group): Likewise.
7270 * srec.c (srec_section_already_linked): Likewise.
7271 * tekhex.c (tekhex_section_already_linked): Likewise.
7272 * versados.c (versados_section_already_linked): Likewise.
7273 * vms.c (vms_section_already_linked): Likewise.
7274 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
7275 * xsym.c (bfd_sym_section_already_linked): Likewise.
7277 * bfd-in.h (bfd_section_already_linked_table_init): New.
7278 (bfd_section_already_linked_table_free): Likewise.
7280 * coff-rs6000.c (rs6000coff_vec): Add
7281 _bfd_generic_section_already_linked.
7282 (pmac_xcoff_vec): Likewise.
7283 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7284 (aix5coff64_vec): Likewise.
7286 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
7287 * elflink.c (_bfd_elf_section_already_linked): New function.
7289 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
7291 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
7292 (_bfd_generic_section_already_linked): New.
7293 (bfd_section_already_linked_hash_entry): Likewise.
7294 (bfd_section_already_linked): Likewise.
7295 (bfd_section_already_linked_table_lookup): Likewise.
7296 (bfd_section_already_linked_table_insert): Likewise.
7298 * linker.c (bfd_section_already_linked): New.
7299 (_bfd_section_already_linked_table): Likewise.
7300 (bfd_section_already_linked_table_lookup): Likewise.
7301 (bfd_section_already_linked_table_insert): Likewise.
7302 (already_linked_newfunc): Likewise.
7303 (bfd_section_already_linked_table_init): Likewise.
7304 (bfd_section_already_linked_table_free): Likewise.
7305 (_bfd_generic_section_already_linked): Likewise.
7307 * section.c (bfd_section): Remove comdat.
7308 (bfd_comdat_info): Moved to ...
7309 * bfd-in.h (coff_comdat_info): Here.
7310 (bfd_coff_get_comdat_section): New.
7311 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
7312 * libcoff-in.h (coff_section_tdata): Add comdat.
7313 * coffcode.h (handle_COMDAT): Updated.
7314 * cofflink.c (coff_link_add_symbols): Likewise.
7315 * ecoff.c (bfd_debug_section): Likewise.
7317 * targets.c (bfd_target): Add _section_already_linked.
7318 (BFD_JUMP_TABLE_LINK): Updated.
7320 * bfd-in2.h: Regenerated.
7321 * libbfd.h: Likewise.
7322 * libcoff.h: Likewise.
7324 2003-07-21 Paul Brook <paul@codesourcery.com>
7326 * elflink.c (elf_get_linked_section_vma, compare_link_order,
7327 elf_fixup_link_order): New functions.
7328 (bfd_elf_final_link): Call elf_fixup_link_order.
7330 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
7332 * elf-bfd.h (ELF_COMMON_DEF_P): New.
7333 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
7335 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
7336 _bfd_elf_symbol_refs_local_p.
7337 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
7340 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
7342 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
7344 (bfd_elf_get_dyn_lib_class): New prototype.
7345 * elf.c (bfd_elf_get_dyn_lib_class): New function.
7347 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
7348 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
7349 entry is needed. Issue an error if a DT_NEEDED entry is needed
7350 for a file marked DYN_NO_NEEDED.
7351 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
7354 * bfd-in2.h: Regenerated.
7356 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7358 * elflink.c (elf_section_complain_discarded): Don't complain in
7361 2004-07-10 James E Wilson <wilson@specifixinc.com>
7363 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
7364 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
7365 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
7366 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
7368 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
7369 bfd_put_64 to bfd_putl64.
7370 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
7372 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
7375 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
7376 .init/.fini sections when trying to relax it.
7378 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
7380 * elf.c (assign_file_positions_for_segments): Make sure the
7381 .dynamic section is the first section in the PT_DYNAMIC segment.
7383 2004-07-09 Nick Clifton <nickc@redhat.com>
7385 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
7386 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
7387 sh_elf_get_flags_from_mach functions so that they do not conflict
7388 when this target is built with other sh-elf targets.
7389 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
7390 suppression of this function.
7391 (sh_elf_find_flags): Likewise.
7393 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
7395 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
7396 (ALL_MACHINES_CFILES): Add cpu-crx.c.
7397 (BFD32_BACKENDS): Add elf32-crx.lo.
7398 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
7399 (cpu-crx.lo): New target.
7400 (elf32-crx.lo): New target.
7401 * Makefile.in: Regenerate.
7402 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
7403 (bfd_archures_list): Add bfd_crx_arch.
7404 * bfd-in2.h: Regenerate.
7405 * config.bfd: Handle crx-*-elf*, crx*.
7406 * configure.in: Handle bfd_elf32_crx_vec.
7407 * configure: Regenerate.
7408 * cpu-crx.c: New file.
7409 * elf32-crx.c: Likewise.
7410 * libbfd.h: Regenerate.
7411 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
7412 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
7413 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
7414 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
7415 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
7416 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
7417 * targets.c (bfd_elf32_crx_vec): Declare.
7418 (bfd_target_vector): Add bfd_elf32_crx_vec.
7420 2004-07-06 Nick Clifton <nickc@redhat.com>
7422 * config.bfd: Add sh-symbian-elf target.
7423 * configure.in: Add bfd_elf32_shl_symbian_vec.
7424 * configure: Regenerate.
7425 * elf-bfd.h (struct elf_backend_data): Add new field
7427 * elflink.c (elf_link_add_object_symbols): Invoke the
7428 check_directives function, if defined.
7429 * elfxx-target.h: Provide a default, NULL definition for
7431 * targets.c: Add bfd_elf32_shl_symbian_vec.
7432 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
7434 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
7435 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
7436 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
7437 not already been defined.
7438 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
7439 * sh-symbian.c: New file. Provide functions to support the
7440 * sh-symbian-elf target.
7441 * Makefile.am: Add elf32-sh-symbian.c
7442 * Makefile.in: Regenerate.
7444 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
7446 * elf32-sh.c: Include ../opcodes/sh-opc.h.
7447 * Makefile.am: Ran make dep-am.
7448 * Makefile.in: Ran make dep-in.
7450 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
7452 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
7455 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7457 * config.bfd: Add want64 to configuration target s390-*-linux*.
7459 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
7461 * bfd.c (bfd_get_section_ident): New.
7463 * elflink.c (elf_link_read_relocs_from_section): Call
7464 bfd_get_section_ident to identify the section when reporting
7466 (_bfd_elf_link_output_relocs): Likewise.
7467 (elf_link_output_extsym): Likewise.
7468 (elf_link_input_bfd): Likewise.
7469 (bfd_elf_gc_record_vtinherit): Likewise.
7471 * bfd-in2.h: Regenerated.
7473 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
7474 Nick Clifton <nickc@redhat.com>
7477 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
7478 of section symbols to mips_elf_sort_hash_table ().
7480 2004-07-01 Alan Modra <amodra@bigpond.net.au>
7482 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
7484 (elf_section_complain_discarded): New function. Handle
7485 .gcc_except_table too.
7486 (elf_link_input_bfd): Rewrite handling of relocs against symbols
7487 in discarded sections.
7488 * elf-bfd.h (elf_discarded_section): Protect macro arg.
7490 2004-06-30 James E Wilson <wilson@specifixinc.com>
7492 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
7493 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
7495 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
7498 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
7499 local references to discarded sections and report their
7502 2004-06-30 Alan Modra <amodra@bigpond.net.au>
7504 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
7505 sec_info_type, test section name instead.
7507 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
7510 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
7511 in .init/.fini sections.
7513 2004-06-29 Bob Wilson <bob.wilson@acm.org>
7515 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
7516 bfd_get_section_limit.
7518 2004-06-29 Bob Wilson <bob.wilson@acm.org>
7520 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
7521 output section size.
7523 2004-06-29 Alan Modra <amodra@bigpond.net.au>
7525 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
7527 (mmix_elf_perform_relocation): Adjust for above change.
7528 (mmix_elf_relocate_section): Likewise.
7529 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
7530 (mmix_elf_get_section_contents): Delete.
7531 (bfd_elf64_get_section_contents): Delete.
7532 (mmix_elf_relocate_section): Zero stub area.
7533 * linker.c (default_indirect_link_order): Alloc max of section size
7535 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
7536 * section.c (bfd_malloc_and_get_section): Likewise.
7537 (struct bfd_section): Update rawsize comment.
7538 * bfd-in2.h: Regenerate.
7540 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
7542 2004-06-29 Alan Modra <amodra@bigpond.net.au>
7544 * bfd-in.h (bfd_get_section_limit): Define.
7545 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
7546 (_bfd_final_link_relocate): Use bfd_get_section_limit.
7547 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
7548 * coff-arm.c (coff_arm_relocate_section): Likewise.
7549 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
7550 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
7551 (bfd_ns32k_final_link_relocate): Likewise.
7552 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
7553 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
7554 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
7555 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
7556 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
7557 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
7558 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
7559 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7560 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
7561 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
7562 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
7563 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
7564 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
7565 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
7566 * elf32-v850.c (v850_elf_reloc): Likewise.
7567 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
7568 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
7569 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
7570 * elf64-mips.c (mips_elf64_gprel32_reloc)
7571 (mips16_gprel_reloc): Likewise.
7572 * elf64-mmix.c (mmix_elf_reloc): Likewise.
7573 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
7574 * elf64-sparc.c (init_insn_reloc): Likewise.
7575 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7576 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
7577 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
7578 (_bfd_mips_elf_generic_reloc): Likewise.
7579 * bfd-in2.h: Regenerate.
7581 2004-06-28 Alan Modra <amodra@bigpond.net.au>
7583 * bfd-in.h (struct stab_info): Move from stabs.c.
7584 * stabs.c (struct stab_link_includes_table): Delete.
7585 (stab_link_includes_lookup): Delete.
7586 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
7587 level of indirection from sinfo parm.
7588 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
7589 stabstr section. Adjust hash table accesses.
7590 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
7591 alloc. Adjust stab_info test.
7592 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
7593 (_bfd_coff_final_link): Adjust stab_info test.
7594 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
7595 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
7597 * libcoff-in.h (struct coff_link_hash_table): Likewise.
7598 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
7599 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
7600 stabstr section. Adjust stab_info test.
7601 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
7602 (_bfd_write_stab_strings): Adjust prototypes.
7603 * libbfd.h: Regenerate.
7604 * libcoff.h: Regenerate.
7605 * bfd-in2.h: Regenerate.
7607 2004-06-27 Mark Kettenis <kettenis@gnu.org>
7609 From Miod Vallat <miod@online.fr>:
7610 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
7612 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
7614 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
7615 (struct elf32_mn10300_link_hash_entry): Remove
7616 pcrel_relocs_copied.
7617 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
7618 R_MN10300_32. Don't adjust pcrel_relocs_copied.
7619 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
7620 and gotoff relocations if the symbol doesn't bind locally. Use
7621 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
7622 relocation for PCREL32.
7623 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
7624 to test whether a symbol binds locally.
7625 (elf32_mn10300_link_hash_newfunc): Don't initialize
7626 pcrel_relocs_copied.
7627 (_bfd_mn10300_elf_discard_copies): Delete.
7628 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
7630 2004-06-26 Mark Kettenis <kettenis@gnu.org>
7632 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
7634 2004-06-25 Joel Brobecker <brobecker@gnat.com>
7636 * som.c (som_set_reloc_info): Correct small typo.
7638 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
7640 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
7641 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
7642 (m32r_elf_gcsweep_hook): Likewise.
7643 (m32r_elf_check_relocs): Likewise.
7644 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
7645 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
7646 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
7647 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
7648 * bfd-in2.h: Regenerated.
7649 * libbfd.h: Regenerated.
7651 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
7653 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
7655 (elf64_x86_64_relocate_section): Issue an error for
7656 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
7657 against global symbols when building shared library.
7659 2004-06-24 Alan Modra <amodra@bigpond.net.au>
7661 * section.c (struct sec): Rename "_cooked_size" to "size".
7662 Rename "_raw_size" to "rawsize".
7663 (STD_SECTION): Adjust comments.
7664 (bfd_set_section_size, bfd_get_section_contents): Use size.
7665 (bfd_malloc_and_get_section): New function.
7666 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
7667 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
7668 Correctly free reloc and contents memory.
7669 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
7670 and fake CIE now that we can shink section size to zero.
7671 (_bfd_elf_write_section_eh_frame): Likewise..
7672 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
7673 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
7674 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
7675 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
7676 unneeded indirection.
7677 * elf.c (_bfd_elf_section_offset): .. and update call.
7678 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
7679 * libbfd.h: Regenerate.
7680 * bfd-in2.h: Regenerate.
7682 Replace occurrences of "_raw_size" and "_cooked_size" in most places
7683 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
7684 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
7685 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
7686 Similarly use "rawsize", if non-zero, in reloc functions to validate
7687 reloc addresses. Use new bfd_malloc_and_get_section in most places
7688 where bfd_get_section_contents was called. Expand all occurrences of
7689 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
7690 grok_prstatus and similar functions to "size".
7691 * aix386-core.c (aix386_core_file_p): ..
7692 * aix5ppc-core.c (xcoff64_core_p): ..
7693 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
7694 aout_adobe_set_section_contents): ..
7695 * aout-target.h (callback): ..
7696 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
7697 MY_bfd_final_link): ..
7698 * aoutf1.h (sunos4_core_file_p): ..
7699 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7700 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
7701 final_link, aout_link_input_section): ..
7702 * binary.c (binary_object_p, binary_canonicalize_symtab,
7703 binary_set_section_contents): ..
7704 * bout.c (b_out_callback, b_out_write_object_contents,
7705 b_out_set_section_contents, b_out_bfd_relax_section,
7706 b_out_bfd_get_relocated_section_contents): ..
7707 * cisco-core.c (cisco_core_file_validate): ..
7708 * coff-alpha.c (alpha_ecoff_object_p,
7709 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
7710 * coff-arm.c (coff_arm_relocate_section,
7711 bfd_arm_allocate_interworking_sections): ..
7712 * coff-h8300.c (h8300_reloc16_extra_cases,
7713 h8300_bfd_link_add_symbols): ..
7714 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
7715 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
7716 ppc_bfd_coff_final_link): ..
7717 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
7718 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
7719 sh_align_loads, sh_coff_get_relocated_section_contents): ..
7720 * coff64-rs6000.c (xcoff64_write_object_contents,
7721 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
7722 * coffcode.h (coff_compute_section_file_positions,
7723 coff_write_object_contents): ..
7724 * coffgen.c (make_a_section_from_file, coff_write_symbols,
7725 coff_section_symbol, build_debug_section): ..
7726 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
7727 process_embedded_commands, _bfd_coff_link_input_bfd,
7728 _bfd_coff_write_global_sym): ..
7729 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
7730 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
7731 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
7732 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
7733 _bfd_dwarf2_find_nearest_line): ..
7734 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
7735 ecoff_compute_section_file_positions,
7736 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
7737 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
7738 _bfd_elf_discard_section_eh_frame_hdr,
7739 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
7740 _bfd_elf_write_section_eh_frame,
7741 _bfd_elf_write_section_eh_frame_hdr): ..
7742 * elf-hppa.h (elf_hppa_sort_unwind): ..
7743 * elf-m10200.c (mn10200_elf_relax_section,
7744 mn10200_elf_relax_delete_bytes,
7745 mn10200_elf_get_relocated_section_contents): ..
7746 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
7747 mn10300_elf_check_relocs, mn10300_elf_relax_section,
7748 mn10300_elf_relax_delete_bytes,
7749 mn10300_elf_get_relocated_section_contents,
7750 _bfd_mn10300_elf_adjust_dynamic_symbol,
7751 _bfd_mn10300_elf_discard_copies,
7752 _bfd_mn10300_elf_size_dynamic_sections,
7753 _bfd_mn10300_elf_finish_dynamic_sections): ..
7754 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
7755 _bfd_elf_make_section_from_phdr, elf_fake_sections,
7756 bfd_elf_set_group_contents, map_sections_to_segments,
7757 elf_sort_sections, assign_file_positions_for_segments,
7758 SECTION_SIZE, copy_private_bfd_data,
7759 _bfd_elf_get_dynamic_reloc_upper_bound,
7760 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
7761 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
7762 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
7763 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
7764 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
7765 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
7766 bfd_elf32_arm_process_before_allocation,
7767 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
7768 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
7769 elf32_arm_write_section): ..
7770 * elf32-cris.c (cris_elf_grok_prstatus,
7771 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
7772 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
7773 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
7774 elf_cris_discard_excess_dso_dynamics,
7775 elf_cris_discard_excess_program_dynamics): ..
7776 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
7777 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
7778 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
7779 _frv_create_got_section, _frvfdpic_assign_plt_entries,
7780 elf32_frvfdpic_size_dynamic_sections,
7781 elf32_frvfdpic_modify_segment_map,
7782 elf32_frvfdpic_finish_dynamic_sections): ..
7783 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
7784 elf32_h8_get_relocated_section_contents): ..
7785 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
7786 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
7787 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
7788 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
7789 elf32_hppa_finish_dynamic_sections): ..
7790 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
7791 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
7792 i370_elf_finish_dynamic_sections): ..
7793 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
7794 allocate_dynrelocs, elf_i386_size_dynamic_sections,
7795 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
7796 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
7797 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
7798 * elf32-ip2k.c (ip2k_is_switch_table_128,
7799 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
7800 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
7801 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
7802 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
7803 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
7804 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
7805 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
7806 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
7807 m32r_elf_get_relocated_section_contents): ..
7808 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
7809 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
7810 m68hc11_elf_relax_delete_bytes): ..
7811 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
7812 m68hc12_elf_size_one_stub): ..
7813 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
7814 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
7815 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
7816 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
7817 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
7818 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7819 elf32_mips_grok_prstatus): ..
7820 * elf32-or32.c (or32_elf_consth_reloc): ..
7821 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
7822 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
7823 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
7824 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
7825 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
7826 ppc_elf_final_write_processing): ..
7827 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7828 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7829 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
7830 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
7831 sh_elf_relax_delete_bytes, sh_elf_align_loads,
7832 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
7833 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
7834 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
7835 * elf32-sh64-com.c (sh64_address_in_cranges,
7836 sh64_get_contents_type): ..
7837 * elf32-sh64.c (sh64_find_section_for_address,
7838 sh64_elf_final_write_processing): ..
7839 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
7840 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
7841 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
7842 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
7843 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
7844 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
7845 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
7846 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
7847 elf_vax_finish_dynamic_sections): ..
7848 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
7849 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
7850 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
7851 xstormy16_elf_finish_dynamic_sections): ..
7852 * elf32-xtensa.c (xtensa_read_table_entries,
7853 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
7854 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
7855 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
7856 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
7857 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
7858 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
7859 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
7860 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
7861 xtensa_callback_required_dependence): ..
7862 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
7863 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
7864 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
7865 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
7866 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
7867 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
7868 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
7869 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
7870 * elf64-hppa.c (allocate_dynrel_entries,
7871 elf64_hppa_size_dynamic_sections,
7872 elf64_hppa_finish_dynamic_sections): ..
7873 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
7874 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
7875 elf64_mips_grok_prstatus): ..
7876 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
7877 mmix_elf_relocate_section, mmix_elf_final_link,
7878 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
7879 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
7880 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
7881 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
7882 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
7883 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
7884 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
7885 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
7886 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
7887 ppc64_elf_finish_dynamic_sections): ..
7888 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7889 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7890 elf_s390_finish_dynamic_sections): ..
7891 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
7892 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
7893 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
7894 sh64_elf64_finish_dynamic_sections): ..
7895 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
7896 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
7897 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
7898 sparc64_elf_finish_dynamic_symbol,
7899 sparc64_elf_finish_dynamic_sections): ..
7900 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
7901 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
7902 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
7903 elf64_x86_64_finish_dynamic_sections): ..
7904 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
7905 * elfcode.h (elf_slurp_reloc_table): ..
7906 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
7907 elf_finalize_dynstr, elf_link_add_object_symbols,
7908 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
7909 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
7910 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7911 elf32_mips_grok_prstatus): ..
7912 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
7913 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
7914 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
7915 elfNN_ia64_finish_dynamic_sections): ..
7916 * elfxx-mips.c (mips_elf_create_procedure_table,
7917 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
7918 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
7919 mips_elf_global_got_index, mips_elf_multi_got,
7920 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7921 mips_elf_allocate_dynamic_relocations,
7922 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7923 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7924 _bfd_mips_elf_always_size_sections,
7925 _bfd_mips_elf_size_dynamic_sections,
7926 _bfd_mips_elf_finish_dynamic_symbol,
7927 _bfd_mips_elf_finish_dynamic_sections,
7928 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7929 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7930 _bfd_elf_mips_get_relocated_section_contents,
7931 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7932 * hp300hpux.c (callback): ..
7933 * hppabsd-core.c (make_bfd_asection): ..
7934 * hpux-core.c (make_bfd_asection): ..
7935 * i386linux.c (linux_link_create_dynamic_sections,
7936 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7937 * i386msdos.c (msdos_write_object_contents): ..
7938 * i386os9k.c (os9k_callback, os9k_write_object_contents,
7939 os9k_set_section_contents): ..
7940 * ieee.c (parse_expression, ieee_slurp_external_symbols,
7941 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7942 ieee_write_section_part, do_with_relocs, do_as_repeat,
7943 do_without_relocs, ieee_write_debug_part, init_for_output,
7944 ieee_set_section_contents): ..
7945 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7946 * irix-core.c (do_sections, make_bfd_asection): ..
7947 * libaout.h (aout_section_merge_with_text_p): ..
7948 * libbfd.c (_bfd_generic_get_section_contents,
7949 _bfd_generic_get_section_contents_in_window): ..
7950 * linker.c (default_indirect_link_order): ..
7951 * lynx-core.c (make_bfd_asection): ..
7952 * m68klinux.c (linux_link_create_dynamic_sections,
7953 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7954 * mach-o.c (bfd_mach_o_make_bfd_section,
7955 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7956 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7957 bfd_mach_o_scan_read_segment): ..
7958 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7959 _bfd_merge_sections): ..
7960 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7961 mmo_map_set_sizes, mmo_canonicalize_symtab,
7962 mmo_internal_write_section, mmo_write_object_contents): ..
7963 * netbsd-core.c (netbsd_core_file_p): ..
7964 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7965 nlm_alpha_set_public_section): ..
7966 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7967 * nlm32-sparc.c (nlm_sparc_write_import): ..
7968 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7969 nlm_compute_section_file_positions): ..
7970 * oasys.c (oasys_object_p, oasys_slurp_section_data,
7971 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7972 * opncls.c (get_debug_link_info): ..
7973 * osf-core.c (make_bfd_asection): ..
7974 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7975 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7976 final_link, aout_link_input_section): ..
7977 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7978 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7979 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7980 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7981 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7982 * ptrace-core.c (ptrace_unix_core_file_p): ..
7983 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7984 _bfd_final_link_relocate, bfd_generic_relax_section,
7985 bfd_generic_get_relocated_section_contents): ..
7986 * reloc16.c (bfd_coff_reloc16_relax_section,
7987 bfd_coff_reloc16_get_relocated_section_c): ..
7988 * riscix.c (riscix_some_aout_object_p): ..
7989 * rs6000-core.c (read_hdr, make_bfd_asection): ..
7990 * sco5-core.c (make_bfd_asection): ..
7991 * simple.c (bfd_simple_get_relocated_section_contents): ..
7992 * som.c (som_object_setup, setup_sections, som_prep_headers,
7993 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7994 som_set_reloc_info, som_get_section_contents,
7995 som_bfd_link_split_section): ..
7996 * sparclinux.c (linux_link_create_dynamic_sections,
7997 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7998 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7999 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
8000 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
8001 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
8002 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
8003 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
8004 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
8005 sunos_finish_dynamic_link): ..
8006 * syms.c (_bfd_stab_section_find_nearest_line): ..
8007 * tekhex.c (first_phase, tekhex_set_section_contents,
8008 tekhex_write_object_contents): ..
8009 * trad-core.c (trad_unix_core_file_p): ..
8010 * versados.c (process_esd, process_otr, process_otr): ..
8011 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
8012 * vms-misc.c (add_new_contents): ..
8013 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
8014 * vms.c (vms_set_section_contents): ..
8015 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
8016 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
8017 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
8018 * xsym.c (bfd_sym_scan): .. See above.
8020 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
8022 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
8023 calling _bfd_merged_section_offset only for section symbols.
8025 2004-06-22 Alan Modra <amodra@bigpond.net.au>
8027 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
8028 for handling SEC_MERGE symbols in relax_section.
8030 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
8032 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
8033 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
8034 linked together. Mark the result as h8300sx code.
8036 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
8038 * elf-bfd.h (struct elf_backend_data): Added
8039 elf_backend_omit_section_dynsym.
8040 (_bfd_elf_link_omit_section_dynsym): Declare.
8041 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
8042 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
8043 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
8044 (_bfd_elf_link_renumber_dynsyms): ... this function.
8045 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
8046 _bfd_elf_link_omit_section_dynsym).
8047 (elfNN_bed): Added elf_backend_omit_section_dynsym.
8049 2004-06-21 Nick Clifton <nickc@redhat.com>
8051 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
8054 2004-06-17 Jerome Guitton <guitton@gnat.com>
8056 * bfd-in.h (bfd_cache_close_all): New function declaration.
8057 * bfd-in2.h: Regenerate.
8058 * cache.c (bfd_cache_close_all): New function definition.
8060 2004-06-16 Mark Kettenis <kettenis@gnu.org>
8062 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
8064 * configure: Regenerate.
8066 2004-06-16 Daniel Jacobowitz <dan@debian.org>
8068 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
8069 the pre-existing section.
8071 2004-06-15 Alan Modra <amodra@bigpond.net.au>
8073 * section.c (struct sec): Remove usused flags. Reorganize a little.
8074 (bfd_get_section_size_before_reloc): Delete.
8075 (bfd_get_section_size_after_reloc): Delete.
8076 (STD_SECTION): Update.
8077 (bfd_get_section_size_now): Delete.
8078 (bfd_set_section_contents): Don't referece reloc_done.
8079 (bfd_get_section_contents): Remove reloc_done comment.
8080 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
8082 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
8083 * ecoff.c (bfd_debug_section): Update initializer.
8084 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
8085 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
8086 * bfd-in.h (bfd_section_size): Expand.
8087 (bfd_get_section_size): New macro.
8088 * bfd-in2.h: Regenerate.
8089 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
8090 bfd_get_section_size_before_reloc with bfd_get_section_size.
8091 * coffcode.h (coff_write_object_contents): Likewise.
8092 * coffgen.c (build_debug_section): Likewise.
8093 * dwarf1.c (parse_line_table): Likewise.
8094 (_bfd_dwarf1_find_nearest_line): Likewise.
8095 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
8096 * i386msdos.c (msdos_write_object_contents): Likewise.
8097 * pdp11.c (squirt_out_relocs): Likewise.
8098 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
8099 * elf64-mmix.c (mmix_elf_final_link): Update comment.
8101 2004-06-14 Chris Demetriou <cgd@broadcom.com>
8103 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
8104 removal) with updated comment.
8105 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
8107 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
8108 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8110 2004-06-12 Alan Modra <amodra@bigpond.net.au>
8112 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
8113 overflow on branches to undefweaks.
8115 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8117 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
8118 as ecoff_section_data() does not return a valid lvalue.
8120 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
8122 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
8123 (elf_link_add_object_symbols): Likewise.
8125 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
8126 (elf_backend_reloc_type_class): New.
8128 2004-06-08 Mark Kettenis <kettenis@gnu.org>
8130 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
8132 * configure: Regenerate.
8134 2004-06-07 Daniel Jacobowitz <dan@debian.org>
8136 From: Albert Chin-A-Young <china@thewrittenword.com>
8137 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
8140 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
8142 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
8145 2004-05-28 DJ Delorie <dj@redhat.com>
8147 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
8148 for linking, but otherwise adjust reloc for merged sections.
8150 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
8152 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
8153 _bfd_merged_section_offset for local symbols.
8155 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
8157 * Makefile.am: Regenerate dependencies.
8158 * Makefile.in: Regenerate.
8159 * archures.c: Add bfd_mach_sh3_nommu .
8160 * bfd-in2.h: Regenerate.
8161 * cpu-sh.c: Add sh3-nommu architecture.
8162 (bfd_to_arch_table): Create new table.
8163 (sh_get_arch_from_bfd_mach): Create new function.
8164 (sh_get_arch_up_from_bfd_mach): Create new function.
8165 (sh_merge_bfd_arch): Create new function.
8166 * elf32-sh.c (sh_ef_bfd_table): Add table.
8167 (sh_elf_check_relocs): Replace switch statement with
8168 use of sh_ef_bfd_table .
8169 (sh_elf_get_flags_from_mach): Add new function.
8170 (sh_find_elf_flags): Likewise.
8171 (sh_elf_copy_private_data): Replace most of non-elf contents
8172 with a call to sh_merge_bfd_arch() .
8174 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
8176 * Makefile.am (bfdver.h): Use explicit filename, not $< .
8177 * Makefile.in: Regenerate.
8179 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
8181 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
8182 custom calling conventions for dynamic symbols.
8183 (mn10300_elf_relax_section): Avoid relaxing a function as a local
8184 symbol if it's an alias to a global one.
8186 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
8188 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
8191 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
8193 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
8196 2004-05-26 Alan Modra <amodra@bigpond.net.au>
8198 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
8199 for SHT_GROUP sections.
8201 2004-05-25 Alan Modra <amodra@bigpond.net.au>
8203 * elflink.c (elf_link_add_object_symbols): Don't set up merge
8205 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
8206 * merge.c: Formatting. Remove unnecessary casts. Expand
8207 bfd_get_section_alignment macro.
8208 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
8209 use throughout file.
8210 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
8211 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
8212 section name to determine sinfo group, instead test output section
8214 (_bfd_merge_sections): Add struct bfd_link_info param. Call
8215 _bfd_strip_section_from_output rather than just twiddling flags.
8216 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
8217 (_bfd_merge_sections): Update prototype.
8218 * libbfd.h: Regenerate.
8220 2004-05-24 Mark Kettenis <kettenis@gnu.org>
8222 * netbsd-core.c: Correctly indent section that sets architecture
8225 From Miod Vallat <miod@online.fr>:
8226 * m88kopenbsd.c: New file.
8227 * targets.c (m88k_openbsd_vec): New.
8228 * config.bfd: Add m88k-*-openbsd*.
8229 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
8230 (m88kopenbsd_vec): New.
8231 * configure: Regenerate.
8232 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
8233 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
8235 * Makefile.in: Regenerate.
8236 * po/SRC-POTFILES.in: Regenerate.
8238 2004-05-24 Nick Clifton <nickc@redhat.com>
8240 * hash.c: Remove bogus node "Changing the default Hash Table Size"
8241 introduced by hash table size patch.
8243 2004-05-22 Ben Elliston <bje@au.ibm.com>
8245 * configure.in (is_release): Remove.
8246 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
8247 (AC_OUTPUT): Don't output bfdver.h from version.h.
8248 * configure: Regenerate.
8249 * Makefile.am (RELEASE): New variable.
8250 (bfdver.h): New target.
8251 * Makefile.in: Regenerate.
8252 * doc/Makefile.in: Likewise.
8254 2004-05-22 Ben Elliston <bje@au.ibm.com>
8256 * Makefile.am (config.status): Don't depend on version.h.
8257 * Makefile.in: Regenerate.
8259 2004-05-22 Alan Modra <amodra@bigpond.net.au>
8261 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
8262 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
8263 * libbfd.h: Regenerate.
8264 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
8265 (_bfd_elf_rel_local_sym): Likewise.
8266 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
8267 (elf_link_input_bfd): Likewise.
8268 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
8269 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8270 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8271 (elfNN_ia64_relocate_section): Likewise.
8273 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
8275 * hash.c (bfd_default_hash_table_size): New variable.
8276 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
8277 (bfd_hash_set_default_size): New function. Set the default size
8278 to a selected prime number close to the argument. Document new
8280 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
8281 * bfd-in2.h: Regenerate.
8282 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
8283 * Makefile.in: Regenerate.
8285 2004-05-21 Mark Kettenis <kettenis@gnu.org>
8287 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
8288 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
8289 arm, m68k, m88k and hppa core files.
8291 2004-05-21 Nick Clifton <nickc@redhat.com>
8293 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
8294 (bfd_bwrite): Likewise.
8295 (bfd_tell): Likewise.
8296 (bfd_flush): Likewise.
8297 (bfd_stat): Likewise.
8298 (bfd_seek): Likewise.
8299 (bfd_get_mtime): Likewise.
8300 (bfd_get_size): Likewise.
8302 2004-05-19 Ben Elliston <bje@au.ibm.com>
8304 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
8306 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
8308 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
8309 (bfd_generic_openr_next_archived_file): Likewise.
8311 2004-05-17 Bob Wilson <bob.wilson@acm.org>
8313 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
8314 section names by inserting a new substring after .gnu.linkonce, except
8315 for .gnu.linkonce.t.* where the "t." is replaced.
8317 2004-05-17 Adam Nemet <anemet@lnxw.com>
8319 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
8320 (m68-*-lynxos* case): Likewise.
8321 (powerpc-*-lyxnos* case): New case.
8322 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
8324 2004-05-17 David Heine <dlheine@tensilica.com>
8326 * aout-target.h (MY_bfd_copy_private_header_data): Define.
8327 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
8328 * bfd.c (bfd_copy_private_header_data): Define.
8329 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
8331 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8332 * coffcode.h (coff_bfd_copy_private_header_data): Define.
8333 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
8334 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
8335 segments by calling copy_private_bfd_data.
8336 (_bfd_elf_copy_private_header_data): Define.
8337 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
8338 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
8339 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
8340 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
8341 * mmo.c (mmo_bfd_copy_private_header_data): Define.
8342 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
8343 * som.c (som_bfd_copy_private_header_data): Define.
8344 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
8345 * vms.c (vms_bfd_copy_private_header_data): Define.
8346 * bfd-in2.h: Regenerate.
8347 * libbfd.h: Regenerate.
8349 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8351 * elfxx-mips.c (MINUS_TWO): Define.
8352 (mips_elf_higher, mips_elf_highest,
8353 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
8354 some bfd_vma values.
8355 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
8357 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8359 * som.c (log2): Rename to exact_log2. Adjust all callers.
8361 2004-05-13 Paul Brook <paul@codesourcery.com>
8363 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
8364 dwarf3 format CIE entries. Remove comment about the size of the
8365 ra_column field. It is now correctly deduced.
8367 2004-05-13 Joel Sherrill <joel@oarcorp.com>
8369 * config.bfd (or32-*-rtems*): Switch to elf.
8371 2004-05-13 Nick Clifton <nickc@redhat.com>
8373 * po/fr.po: Updated French translation.
8375 2004-05-11 Jakub Jelinek <jakub@redhat.com>
8377 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8378 into .dynsym if elf_section_data (sec)->dynindx <= 0.
8379 Adjust counting of last_local.
8380 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
8381 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
8382 created by the linker nor !SHF_ALLOC.
8384 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
8385 DT_PLTGOT to the start of the .got.plt section instead of the
8386 .got output section. Set sh_entsize for .got section in addition
8388 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
8389 is at sgot->output_section->vma.
8390 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
8391 DT_PLTGOT to the start of the .got.plt section instead of the
8392 .got output section.
8393 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
8394 is at sgot->output_section->vma. Set sh_entsize for .got section
8395 in addition to .got.plt.
8396 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
8397 (bfd_section_from_phdr): Likewise.
8398 (map_sections_to_segments): Likewise.
8399 (assign_file_positions_for_segments): Likewise.
8400 (get_program_header_size): Likewise.
8401 * elflink.c (bfd_elf_size_dynamic_sections): Set
8402 elf_tdata (output_bfd)->relro from info->relro.
8403 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
8405 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
8407 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
8408 a zero symndx for which we hadn't accounted a dynamic relocation.
8409 (_frvfdpic_add_rofixup): Likewise.
8411 2004-05-07 Brian Ford <ford@vss.fsi.com>
8412 DJ Delorie <dj@redhat.com>
8414 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
8415 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
8416 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
8417 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
8419 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
8421 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
8422 immediately if there's no link info.
8423 (elf32_frvfdpic_copy_private_bfd_data): New.
8424 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
8426 2004-05-06 Zack Weinberg <zack@codesourcery.com>
8428 * dwarf2.c (add_line_info): Also set info->filename to NULL if
8429 filename argument is null; do not call strlen on a null pointer.
8431 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
8433 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
8436 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
8438 * configure.in (bfd_elf32_frvfdpic_vec): New.
8439 * configure: Rebuilt.
8440 * targets.c (bfd_elf32_frvfdpic_vec): New.
8441 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
8443 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
8444 frvfdpic instead of frv. Rearrange elf-target macros such that
8445 the FDPIC-specific ones are only defined for this new target
8447 (bfd_elf32_frvfdpic_vec): Declare.
8449 (elf32_frv_relocate_section): Use it to enable segment checking
8450 and to control rofixup emission. Add output section vma to
8451 applied relocation in non-LOAD non-ALLOC sections. Use
8452 _bfd_error_handler for errors.
8453 (_frv_create_got_section): Create .rel.got and .rofixup only in
8454 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
8456 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
8457 (elf32_frvfdpic_modify_segment_map): Likewise.
8458 (elf32_frv_finish_dynamic_sections): New, do-nothing.
8459 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
8460 error message if we miscompute the rofixup size.
8461 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
8462 (frvfdpic_elf_encode_eh_address): Likewise.
8463 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
8464 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
8465 relocs. Reject unknown relocation types.
8466 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
8467 (frv_elf_merge_private_bfd_data): Likewise.
8468 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
8469 0x4000 for newly-added elf32-frvfdpic.
8471 2004-05-05 Nick Clifton <nickc@redhat.com>
8474 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
8475 returning NULL as most users of this function do not check its
8477 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
8478 of bfd_cache_lookup().
8479 * sco5-core.c (sco5_core_file_p): Likewise.
8480 * trad-core.c (trad_unix_core_file_p): Likewise.
8482 2004-05-05 Nick Clifton <nickc@redhat.com>
8484 * cache.c (bfd_cache_lookup): Improve formatting.
8485 * archive.c: Fix formatting.
8487 2004-05-05 Peter Barada <peter@the-baradas.com>
8489 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
8490 * cpu-m68k.c(bfd_m68k_arch): Likewise.
8491 * bfd-in2.h(bfd_architecture): Regenerate.
8493 2004-05-03 Alan Modra <amodra@bigpond.net.au>
8495 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
8497 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
8498 those against discarded link-once and SEC_MERGE section symbols.
8500 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
8502 * section.c (bfd_get_section_by_name_if): New.
8503 * bfd-in2.h: Regenerated.
8505 2004-05-02 Alan Modra <amodra@bigpond.net.au>
8507 * som.c (som_bfd_is_group_section): Define.
8509 2004-05-01 Alan Modra <amodra@bigpond.net.au>
8511 * section.c (bfd_make_section_anyway): Copy the whole
8512 bfd_hash_entry, not just "next" from existing entry.
8514 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
8516 * elf.c (bfd_section_from_shdr): Maintain the section order in
8518 (special_sections): Add ".note.GNU-stack".
8519 (elf_fake_sections): Handle section group for relocatable
8522 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
8524 * section.c (bfd_sections_find_if): New.
8525 * bfd-in2.h: Regenerated.
8527 2004-04-30 Alan Modra <amodra@bigpond.net.au>
8529 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
8531 * elf-bfd.h (bfd_elf_is_group_section): Declare.
8532 * elf.c (bfd_elf_is_group_section): New function.
8533 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
8534 * section.c (bfd_generic_is_group_section): New function.
8535 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
8536 (BFD_JUMP_TABLE_LINK): Adjust.
8537 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
8538 * aout-target.h (MY_bfd_is_group_section): Define.
8539 * aout-tic30.c (MY_bfd_is_group_section): Define.
8540 * bfd.c (bfd_is_group_section): Define.
8541 * binary.c (binary_bfd_is_group_section): Define.
8542 * bout.c (b_out_bfd_is_group_section): Define.
8543 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
8544 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
8545 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
8546 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
8547 * coffcode.h (coff_bfd_is_group_section): Define.
8548 * i386msdos.c (msdos_bfd_is_group_section): Define.
8549 * i386os9k.c (os9k_bfd_is_group_section): Define.
8550 * ieee.c (ieee_bfd_is_group_section): Define.
8551 * ihex.c (ihex_bfd_is_group_section): Define.
8552 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
8553 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
8554 * mmo.c (mmo_bfd_is_group_section): Define.
8555 * nlm-target.h (nlm_bfd_is_group_section): Define.
8556 * oasys.c (oasys_bfd_is_group_section): Define.
8557 * pef.c (bfd_pef_bfd_is_group_section): Define.
8558 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
8559 * srec.c (srec_bfd_is_group_section): Define.
8560 * tekhex.c (tekhex_bfd_is_group_section): Define.
8561 * versados.c (versados_bfd_is_group_section): Define.
8562 * vms.c (vms_bfd_is_group_section): Define.
8563 * xsym.c (bfd_sym_bfd_is_group_section): Define.
8564 * bfd-in2.h: Regenerate.
8565 * libbfd.h: Regenerate.
8567 2004-04-30 Alan Modra <amodra@bigpond.net.au>
8569 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
8571 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
8573 * configure.in: Update version to 2.15.91.
8574 * configure: Regenerate.
8576 2004-04-29 Brian Ford <ford@vss.fsi.com>
8578 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
8579 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
8580 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
8581 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
8582 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
8583 .gnu.linkonce.wi. sections.
8584 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
8585 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
8587 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
8588 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8590 2004-04-28 Chris Demetriou <cgd@broadcom.com>
8592 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
8593 * bfd-in2.h: Regenerate.
8594 * libbfd.h: Likewise.
8596 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8598 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
8600 (setup_sections): Use som_subspace_dictionary_record struct instead
8601 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
8602 is_comdat, is_common or dup_common.
8603 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
8604 is_comdat, is_common and dup_common in section subspace_dict from
8606 (som_begin_writing): Use som_subspace_dictionary_record struct.
8607 (som_finish_writing): Likewise.
8608 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
8609 is_common and dup_common flags in info for symbol. Add comment
8610 regarding linker support for these fields. Slightly reorganize
8612 (som_build_and_write_symbol_table): Set is_comdat, is_common and
8613 dup_common fields in symbol table from symbol info.
8614 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
8615 arguments. Set corresponding fields in copy_data. Change all callers.
8616 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
8618 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
8619 * som.h (som_subspace_dictionary_record): Define.
8620 (som_copyable_section_data_struct): Add is_comdat, is_common and
8622 (som_section_data_struct): Use som_subspace_dictionary_record struct
8623 instead of subspace_dictionary_record.
8624 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
8626 2004-04-27 Bob Wilson <bob.wilson@acm.org>
8628 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
8629 if set. Check reloc_done flag before applying relocations. Use
8630 output addresses, both when applying relocations and when comparing
8631 against the specified section.
8632 (elf_xtensa_relocate_section): Use output address to check if dynamic
8633 reloc is in a literal pool. Set section's reloc_done flag.
8635 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
8637 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
8638 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
8640 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
8643 2004-04-27 Alan Modra <amodra@bigpond.net.au>
8645 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
8646 structure field removed in 2004-04-24 patch.
8647 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
8649 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
8651 * elf32-arm.h (elf32_arm_section_flags): Likewise.
8652 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
8653 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
8654 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
8655 field before calling elf_backend_section_flags.
8657 2004-04-24 Chris Demetriou <cgd@broadcom.com>
8659 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
8660 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
8661 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
8662 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
8663 and BFD_RELOC_32_PCREL.
8664 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
8665 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
8666 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8667 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
8668 (mips_elf_next_relocation): Move comment about matching HI/LO
8670 (_bfd_mips_elf_relocate_section): Here. Remove handling for
8671 R_MIPS_GNU_REL_HI16.
8673 2004-04-23 Chris Demetriou <cgd@broadcom.com>
8675 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
8676 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
8677 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
8678 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
8679 and update comments to reflect current usage.
8680 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
8681 and MIPS_R_SWITCH, as well as several empty entries. Update comment
8683 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
8684 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
8685 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8686 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
8687 type number to be MIPS_R_PCREL16.
8688 (mips_relocate_section): Remove support for link-time relaxation
8689 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
8690 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8691 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
8692 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
8693 relaxation of branches used by embedded-PIC.
8694 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
8695 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
8696 related members, update comment.
8697 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
8698 code related to embedded-PIC.
8699 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
8700 initialization of now-removed 'adjust' member of
8701 'struct ecoff_debug_info'.
8703 2004-04-23 Chris Demetriou <cgd@broadcom.com>
8705 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
8707 2004-04-21 Philip Blundell <pb@nexus.co.uk>
8709 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
8710 relocs for locally defined symbols during -shared final link.
8711 (elf32_arm_final_link_relocate): Likewise.
8713 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8715 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
8716 ELF_LINK_POINTER_EQUALITY_NEEDED.
8717 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
8718 if r_type is not R_X86_64_PC32.
8719 (elf64_x86_64_finish_dynamic_symbol): If
8720 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
8723 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8725 * elf32-sh.c (sh_elf_plt_sym_val): New function.
8726 (elf_backend_plt_sym_val): Define.
8728 2004-04-22 Andrew Cagney <cagney@redhat.com>
8730 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
8732 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8734 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
8736 * som.c (som_set_section_contents): Constantify second argument.
8737 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
8738 (som_object_setup): Rework to avoid warning.
8739 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
8742 2004-04-22 Andrew Cagney <cagney@redhat.com>
8744 * cache.c (bfd_cache_close): Check for a previously closed file.
8746 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8748 * bfd.c (bfd_get_synthetic_symtab): Define.
8749 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
8750 NAME##_get_synthetic_symtab.
8751 (struct bfd_target): Add _bfd_get_synthetic_symtab.
8752 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
8753 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
8755 (_bfd_elf_get_synthetic_symtab): New prototype.
8756 * elfcode.h (elf_get_synthetic_symtab): Define.
8757 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
8758 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
8759 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
8760 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
8761 * bfd-in2.h: Rebuilt.
8762 * libbfd.h: Rebuilt.
8763 * elf32-i386.c (elf_i386_plt_sym_val): New function.
8764 (elf_backend_plt_sym_val): Define.
8765 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
8766 (elf_backend_plt_sym_val): Define.
8767 * elf32-s390.c (elf_s390_plt_sym_val): New function.
8768 (elf_backend_plt_sym_val): Define.
8769 * elf64-s390.c (elf_s390_plt_sym_val): New function.
8770 (elf_backend_plt_sym_val): Define.
8771 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
8772 (elf_backend_plt_sym_val): Define.
8773 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
8774 (elf_backend_plt_sym_val): Define.
8775 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
8776 (elf_backend_plt_sym_val): Define.
8777 * aout-target.h (MY_get_synthetic_symtab): Define.
8778 * aout-tic30.c (MY_get_synthetic_symtab): Define.
8779 * coff-rs6000.c (rs6000coff_vec): Add
8780 _bfd_nodynamic_get_synthetic_symtab.
8781 (pmac_xcoff_vec): Likewise.
8782 * coff64-rs6000.c (rs6000coff64_vec): Add
8783 _bfd_nodynamic_get_synthetic_symtab.
8784 (aix5coff64_vec): Likewise.
8785 * sunos.c (MY_get_synthetic_symtab): Define.
8786 * vms.c (vms_get_synthetic_symtab): Define.
8788 2004-04-22 Nick Clifton <nickc@redhat.com>
8790 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
8792 2004-04-22 Peter Barada <peter@the-baradas.com>
8794 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
8795 * bfd2-in.h: Regenerate.
8796 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
8798 2004-04-21 Chris Demetriou <cgd@broadcom.com>
8800 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
8801 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
8802 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
8803 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
8804 * bfd-in2.h: Regenerate.
8806 2004-04-21 Bob Wilson <bob.wilson@acm.org>
8808 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
8809 require relocations against a weak symbol to reference the same
8810 symbol hash entry if not a final, static link.
8811 (get_cached_value, add_value_map): Add final_static_link argument.
8812 (remove_literals): Pass final_static_link argument as needed.
8814 2004-04-21 Andrew Cagney <cagney@redhat.com>
8816 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
8817 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
8818 (opncls_bwrite, opncls_bclose, opncls_bflush)
8819 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
8820 bfd iovec that uses function callbacks.
8821 (bfd_close): Use the iovec's bclose.
8822 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
8823 (cache_bclose, cache_bflush, cache_bstat)
8824 (cache_iovec): New functions and global variable, implement a
8825 cache "iovec", where applicable set bfd_error.
8826 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
8827 * bfdio.c (struct bfd_iovec): Define.
8828 (real_read): Delete function.
8829 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
8830 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
8831 assume that bread and bwrite set bfd_error.
8832 * bfd.c (struct bfd): Add "iovec", update comments.
8833 * bfd-in2.h, libbfd.h: Re-generate.
8835 2004-04-21 Andrew Cagney <cagney@redhat.com>
8837 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8839 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
8841 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
8842 (bfd_elf_gc_sections): Fail if a shared object is being created.
8843 Do not fail if dynamic sections have been created. Instead call
8844 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
8845 dynamically referenced symbols. Do not mark the whole graph
8846 rooted at .eh_frame, only the section proper.
8848 2004-04-20 DJ Delorie <dj@redhat.com>
8850 * reloc.c: Add BFD_RELOC_32_SECREL.
8851 * bfd-in2.h: Regenerate.
8852 * libbfd.h: Likewise.
8853 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
8854 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
8855 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
8857 2004-04-19 Jakub Jelinek <jakub@redhat.com>
8859 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
8860 relocs against hidden/protected undefweak symbols properly.
8861 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8863 2004-04-18 Mark Kettenis <kettenis@gnu.org>
8865 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8866 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
8869 2004-04-17 Brian Ford <ford@vss.fsi.com>
8871 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
8872 filepos for the SizeOfHeaders field.
8873 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
8875 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
8877 2004-04-16 Alan Modra <amodra@bigpond.net.au>
8879 * simple.c (bfd_simple_get_relocated_section_contents): Don't
8880 change reloc_done. Set and restore _cooked_size.
8883 2004-04-15 Mark Kettenis <kettenis@gnu.org>
8885 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
8888 2004-04-15 Nick Clifton <nickc@redhat.com>
8890 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
8892 2004-04-15 Alan Modra <amodra@bigpond.net.au>
8894 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
8896 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
8898 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
8899 when it is a definition.
8901 2004-04-14 Alan Modra <amodra@bigpond.net.au>
8903 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
8904 when statically linking PIC code.
8905 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8907 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8909 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
8910 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
8911 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
8912 * configure: Regenerate.
8914 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
8916 * elflink.c: Include libiberty.h.
8917 * Makefile.am (elflink.lo): Depend on libiberty.h.
8918 * Makefile.in: Regenerate.
8920 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
8922 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8925 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
8927 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8928 reserve the memory for dynamic linker
8930 2004-04-05 Mark Kettenis <kettenis@gnu.org>
8932 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8933 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8935 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8937 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8938 RELOC_FOR_GLOBAL_SYMBOL.
8939 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8941 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8943 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8944 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8946 2004-04-01 Paul Brook <paul@codesourcery.com>
8948 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8949 * elf32-arm.h (struct elf32_elf_section_map): New.
8950 (struct _arm_elf_section_data): New.
8951 (elf32_arm_section_data): Define.
8952 (struct elf32_arm_link_hash_table): Add byteswap_code.
8953 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8954 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8955 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8956 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8957 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8958 (bfd_elf32_new_section_hook, elf_backend_write_section,
8959 elf_backend_link_output_symbol_hook): Define.
8961 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
8963 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8964 that keeps the characters in a B_INCL..B_EINCL range.
8965 (_bfd_link_section_stabs): When computing the sum of the
8966 characters in a B_INCL..B_EINCL range also keep a copy of those
8967 characters. Use this information to distinguish between
8968 include sections that have the same sum and the same length
8969 but which are nevertheless unique.
8971 2004-03-31 Paul Brook <paul@codesourcery.com>
8973 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8974 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8976 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
8978 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8979 to 'sum_chars' and add field 'num_chars'.
8980 (_bfd_link_section_stabs): When computing the sum of the
8981 characters in a B_INCL..B_EINCL range also keep a count of the
8982 number of characters. Use this information to help distinguish
8983 between include sections when have the same sum but which
8984 nevertheless are still unique.
8986 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
8988 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8990 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
8991 Tomer Levi <Tomer.Levi@nsc.com>
8993 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8994 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8995 (BFD32_BACKENDS): Add elf32-cr16c.lo.
8996 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8997 (cpu-cr16c.lo): New target.
8998 (elf32-cr16c.lo): Likewise.
8999 * Makefile.in: Regenerate.
9000 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
9001 (bfd_archures_list): Add bfd_cr16c_arch.
9002 * config.bfd: Handle cr16c-*-elf*.
9003 * configure.in: Handle bfd_elf32_cr16c_vec.
9004 * configure: Regenerate.
9005 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
9006 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
9007 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
9008 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
9009 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
9010 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
9011 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
9012 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
9013 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
9014 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
9015 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
9016 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
9017 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
9018 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
9019 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
9020 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
9021 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
9022 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
9023 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
9024 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
9025 * targets.c (bfd_elf32_cr16c_vec): Declare.
9026 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
9027 * cpu-cr16c.c: New file.
9028 * elf32-cr16c.c: Likewise.
9029 * libbfd.h: Regenerate.
9030 * bfd-in2.h: Likewise.
9032 2004-03-30 Jakub Jelinek <jakub@redhat.com>
9034 * elf.c (map_sections_to_segments): Fix handling of .tbss.
9036 2004-03-27 Alan Modra <amodra@bigpond.net.au>
9038 * Makefile.am: Remove all mention of elflink.h.
9039 * Makefile.in: Regenerate.
9040 * bfd-in.h (bfd_elf_discard_info): Declare.
9041 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
9042 * bfd-in2.h: Regenerate.
9043 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
9044 bfd_elf32_link_record_dynamic_symbol,
9045 bfd_elf64_link_record_dynamic_symbol,
9046 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
9047 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
9048 _bfd_elf32_link_record_local_dynamic_symbol,
9049 _bfd_elf64_link_record_local_dynamic_symbol,
9050 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
9051 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
9052 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
9053 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
9054 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
9055 _bfd_elf32_reloc_symbol_deleted_p,
9056 _bfd_elf64_reloc_symbol_deleted_p): Delete.
9057 (bfd_elf_link_record_dynamic_symbol,
9058 bfd_elf_link_record_local_dynamic_symbol,
9059 bfd_elf_final_link, bfd_elf_gc_sections,
9060 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
9061 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
9062 bfd_elf_reloc_symbol_deleted_p): Declare.
9063 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
9064 * elf32-arm.h: Update for changed function names. Remove local
9065 WILL_CALL_FINISH_DYNAMIC_SECTION define.
9066 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
9067 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
9068 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
9069 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
9070 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
9071 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
9072 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
9073 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
9074 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
9075 (bfd_elfNN_print_symbol): Define.
9076 * elfcode.h: Don't include elflink.h.
9077 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
9078 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
9079 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
9080 elf_gc_record_vtinherit, elf_gc_record_vtentry,
9081 elf_link_record_local_dynamic_symbol): Don't define.
9082 * elflink.c: Update for changed function names. Move elflink.h
9084 * elflink.h: Delete file.
9085 * po/SRC-POTFILES.in: Regenerate.
9086 * po/bfd.pot: Regenerate.
9088 2004-03-27 Alan Modra <amodra@bigpond.net.au>
9090 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
9091 "name" for global syms accidentally removed in 2004-03-20 change.
9093 2004-03-27 Alan Modra <amodra@bigpond.net.au>
9095 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
9096 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
9097 where Elf_External_* is different for 64 and 32 bit, with
9098 corresponding elf_size_info field.
9099 (struct elf_final_link_info): Use "bfd_byte *" instead
9100 of "Elf_External_Sym *" for external_syms and symbuf.
9101 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
9102 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
9103 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
9104 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
9105 (elf_link_sort_cmp2): Adjust.
9106 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
9107 using ELF_R_SYM macro. Set u.sym_mask.
9108 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
9109 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
9110 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
9111 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
9112 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
9113 swap_syn_out functions. Rearrange dyn swap in/out switch.
9114 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
9115 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
9116 (elf_link_flush_output_syms): Add elf_backend_data arg.
9117 (elf_link_check_versioned_symbol): Likewise.
9118 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
9119 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
9120 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
9121 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
9122 ELF_R_TYPE and ELF_R_INFO macros.
9123 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
9124 based on size rather than using ELF_R_INFO.
9125 (elf_gc_mark): Set up r_sym_shift local var and use instead of
9127 (struct alloc_got_off_arg): New.
9128 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
9129 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
9130 (elf_gc_allocate_got_offsets): Adjust.
9131 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
9132 ELF_R_SYM. Use bfd_section_from_elf_index.
9133 (elf_bfd_discard_info): Set cookie.r_sym_shift.
9134 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
9135 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
9137 2004-03-26 Stan Shebs <shebs@apple.com>
9139 Remove MPW support, no longer used.
9140 * config.bfd (powerpc-*-mpw*): Remove configuration.
9141 * mpw-config.in, mpw-make.sed: Remove files.
9142 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
9144 2004-03-26 Alan Modra <amodra@bigpond.net.au>
9146 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
9147 (ppc64_elf_add_symbol_hook): New function.
9148 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
9149 const from Elf_Internal_Sym param.
9150 * elflink.c (elf_link_add_object_symbols): Adjust.
9151 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
9152 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
9153 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
9154 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
9155 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
9156 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
9157 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
9158 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
9159 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
9160 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
9161 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
9162 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
9163 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
9164 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
9165 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
9166 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
9168 2004-03-26 Alan Modra <amodra@bigpond.net.au>
9170 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
9171 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
9172 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
9173 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
9174 (bfd_elf64_bfd_link_add_symbols): Delete.
9175 (bfd_elf_link_add_symbols): Declare.
9176 * elfcode.h (elf_bfd_link_add_symbols): Delete.
9177 * elflink.c: Include safe-ctype.h.
9178 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
9180 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
9181 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
9183 (elf_link_add_archive_symbols): Rename from
9184 _bfd_elf_link_add_archive_symbols, make static.
9185 (elf_link_add_object_symbols): New function. Corresponding
9186 elflink.h function converted to use elf_size_info.
9187 (bfd_elf_link_add_symbols): Likewise.
9188 (bfd_elf_size_dynamic_sections): Adjust.
9189 * elflink.h (elf_bfd_link_add_symbols): Delete.
9190 (elf_link_add_object_symbols): Delete.
9191 * elf32-gen.c (elf32_generic_link_add_symbols): Call
9192 bfd_elf_link_add_symbols.
9193 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
9195 2004-03-25 Alan Modra <amodra@bigpond.net.au>
9197 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
9198 and chained shared libs only if dynsym. Clear dynsym on forced-local.
9200 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
9201 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
9202 (_bfd_elf_add_dt_needed_tag): Declare.
9203 (_bfd_elf_sort_symbol): Declare.
9204 (_bfd_elf_finalize_dynstr): Declare.
9205 (RELOC_FOR_GLOBAL_SYM): Formatting.
9206 * elfcode.h (elf_add_dynamic_entry): Delete.
9207 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
9208 elflink.h function converted to use elf_size_info.
9209 (_bfd_elf_add_dt_needed_tag): Likewise.
9210 (_bfd_elf_sort_symbol): Likewise.
9211 (_bfd_elf_finalize_dynstr): Likewise.
9212 (compute_bucket_count): Likewise.
9213 (bfd_elf_size_dynamic_sections): Likewise. Check result of
9214 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
9215 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
9216 * elflink.h: ..here.
9217 (sort_symbol, add_dt_needed_tag): Delete.
9218 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
9219 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
9221 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
9222 * elf32-cris.c (add_dynamic_entry): Likewise.
9223 * elf32-hppa.c (add_dynamic_entry): Likewise.
9224 * elf32-i370.c (add_dynamic_entry): Likewise.
9225 * elf32-i386.c (add_dynamic_entry): Likewise.
9226 * elf32-m32r.c (add_dynamic_entry): Likewise.
9227 * elf32-m68k.c (add_dynamic_entry): Likewise.
9228 * elf32-ppc.c (add_dynamic_entry): Likewise.
9229 * elf32-s390.c (add_dynamic_entry): Likewise.
9230 * elf32-sh.c (add_dynamic_entry): Likewise.
9231 * elf32-sparc.c (add_dynamic_entry): Likewise.
9232 * elf32-vax.c (add_dynamic_entry): Likewise.
9233 * elf32-xtensa.c (add_dynamic_entry): Likewise.
9234 * elf64-alpha.c (add_dynamic_entry): Likewise.
9235 * elf64-hppa.c (add_dynamic_entry): Likewise.
9236 * elf64-ppc.c (add_dynamic_entry): Likewise.
9237 * elf64-s390.c (add_dynamic_entry): Likewise.
9238 * elf64-sparc.c (add_dynamic_entry): Likewise.
9239 * elf64-x86-64.c (add_dynamic_entry): Likewise.
9240 * elfxx-ia64.c (add_dynamic_entry): Likewise.
9241 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
9242 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
9243 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
9244 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
9246 2004-03-23 Paul Brook <paul@codesourcery.com>
9248 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
9250 2004-03-22 Bob Wilson <bob.wilson@acm.org>
9252 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
9253 literal tables and check for relocs outside of literal pools.
9254 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
9255 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
9257 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
9258 (elf_xtensa_relocate_section): Read literal tables and check for
9259 dynamic relocations in read-only sections and not in literal pools.
9261 2004-03-23 Alan Modra <amodra@bigpond.net.au>
9264 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
9266 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
9268 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
9269 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
9270 not defined by the executable, or defined in a DSO.
9271 <eliding run-time relocation of .got>: Initialize GOT entry for a
9272 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
9274 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
9275 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
9276 a PLT reloc to GOT for an executable.
9277 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
9278 .got for a DSO and explain why.
9279 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
9280 and unreferenced symbols for which a PLT is defined. Adjust
9281 dynamic-symbol pruning correspondingly, to make sure we don't lose
9282 a dynamic symbol also defined by a DSO.
9284 2004-03-22 Alan Modra <amodra@bigpond.net.au>
9286 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
9287 and rel args. Group input and output args. Wrap to 80 columns.
9288 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
9289 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
9290 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
9291 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
9292 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
9293 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
9294 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
9295 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
9296 RELOC_FOR_GLOBAL_SYMBOL invocation.
9298 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
9300 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
9301 unresolved symbols in objects aren't allowed.
9303 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
9305 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9306 (elf_hppa_unmark_useless_dynamic_symbols):
9307 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
9308 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
9309 (elf32_hppa_relocate_section): Likewise.
9310 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9311 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9312 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9313 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9314 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
9316 * elf-m10200.c (mn10200_elf_relocate_section): Use
9317 RELOC_FOR_GLOBAL_SYMBOL.
9318 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
9319 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
9320 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9321 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
9322 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
9323 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
9324 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9325 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
9326 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
9327 * elf32-v850.c (v850_elf_relocate_section): Likewise.
9328 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
9329 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
9331 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9333 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
9334 (final_link_relocate): Likewise.
9335 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
9336 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
9338 2004-03-19 Alan Modra <amodra@bigpond.net.au>
9340 * Makefile.am: Run "make dep-am".
9341 * Makefile.in: Regenerate.
9342 * aclocal.m4: Regenerate.
9343 * config.in: Regenerate.
9344 * po/bfd.pot: Regenerate.
9346 2004-03-19 Alan Modra <amodra@bigpond.net.au>
9347 H.J. Lu <hongjiu.lu@intel.com>
9349 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
9350 type and size change code to where it was previously. Remove
9351 dt_needed param. Treat old weak syms as strong if new sym is
9352 from a shared lib, even when old sym is from another shared
9353 lib. Remove unnecessary tests of oldweak and newweak. Correct
9355 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
9356 _bfd_elf_merge_symbol calls.
9357 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
9358 dt_needed local var. Update comments.
9359 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
9360 (_bfd_elf_add_default_symbol): Likewise.
9362 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
9363 strong syms in one shared object overriding weak syms in another.
9365 2004-03-18 Alan Modra <amodra@bigpond.net.au>
9367 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
9368 dyn_lib_class field. Rearrange for better packing.
9369 (elf_dt_soname): Delete.
9370 (elf_dyn_lib_class): Define.
9371 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
9372 (bfd_elf_set_dt_needed_soname): Delete.
9373 (bfd_elf_set_dyn_lib_class): New function.
9374 * elflink.h (add_dt_needed_tag): New function. Split out from..
9375 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
9376 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
9377 initialization of soname.
9378 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
9380 * bfd-in.h (enum dynamic_lib_link_class): New.
9381 (bfd_elf_set_dt_needed_soname): Delete.
9382 (bfd_elf_set_dyn_lib_class): Declare.
9383 * bfd-in2.h: Regenerate.
9385 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
9386 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
9387 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
9388 symbol loop. Instead use add_needed to flag tag as written.
9390 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
9392 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
9393 logic for null_input_bfd detection.
9395 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
9397 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
9399 2004-03-16 Mark Kettenis <kettenis@gnu.org>
9401 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
9404 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9406 * elflink.c (elf_link_read_relocs_from_section): Don't use
9407 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
9408 (_bfd_elf_link_read_relocs): ..to here.
9409 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
9411 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9413 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
9414 values selected in configure.host. Require both to be defined
9415 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
9416 corresponding BFD_HOST vars with quotes.
9417 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
9418 Always require BFD_HOST_64_BIT_DEFINED.
9419 <file_ptr type>: Find off_t size before emitting message. Combine
9420 off_t and ftello64 conditional.
9421 * configure: Regenerate.
9423 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9425 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
9426 aliasing warning. Remove trailing whitespace throughout file.
9428 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9430 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
9431 input_section in calls to get_dyn_name.
9432 * 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
9434 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
9436 2004-03-15 Alan Modra <amodra@bigpond.net.au>
9438 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
9439 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
9440 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
9441 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
9442 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
9443 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
9444 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
9446 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
9447 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
9448 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
9449 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
9450 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
9451 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
9452 (read_8_bytes, read_indirect_string, read_address): Likewise.
9453 (read_abbrevs, parse_comp_unit): Likewise.
9454 * targets.c (struct bfd_target): Likewise.
9455 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
9456 * hppabsd-core.c: Likewise. Formatting.
9457 * hpux-core.c: Likewise.
9458 * irix-core.c: Likewise.
9459 * netbsd-core.c: Likewise.
9460 * osf-core.c: Likewise.
9461 * ptrace-core.c: Likewise.
9462 * sco5-core.c: Likewise.
9463 * trad-core.c: Likewise.
9464 * configure: Regenerate.
9465 * bfd-in2.h: Regenerate.
9467 2004-03-15 Alan Modra <amodra@bigpond.net.au>
9469 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
9470 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
9471 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
9472 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
9473 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
9474 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
9475 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
9476 * libbfd.c: Likewise in function definitions.
9477 (bfd_put_8): Mask with 0xff rather than casting to char.
9478 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
9479 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
9480 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
9481 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
9482 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
9483 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
9484 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
9485 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
9486 (H_GET_64, H_GET_32, H_GET_16): Likewise.
9487 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
9488 * archive.c (do_slurp_coff_armap): Update swap prototype.
9489 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
9490 (tic54x_getl_signed_32): Likewise.
9491 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
9492 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
9493 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
9494 (bfd_getp_signed_32, bfd_putp32): Likewise.
9495 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
9496 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
9497 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
9498 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
9499 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
9500 bfd_h_getx_signed_16, bfd_h_putx16.
9501 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
9502 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
9503 * hpux-core.c: Likewise.
9504 * irix-core.c: Likewise.
9505 * netbsd-core.c: Likewise.
9506 * osf-core.c: Likewise.
9507 * ptrace-core.c: Likewise.
9508 * sco5-core.c: Likewise.
9509 * trad-core.c: Likewise.
9510 * bfd-in2.h: Regenerate.
9512 2004-03-15 Matt Thomas <matt@3am-software.com>
9514 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
9517 2004-03-13 Mark Kettenis <kettenis@gnu.org>
9519 * config.bfd: Add x86_64-*-openbsd*.
9520 * configure.in (x86_64-*-openbsd*): Set COREFILE to
9522 * configure: Regenerate.
9524 2004-03-12 Nick Clifton <nickc@redhat.com>
9525 Dave Murphy <wintermute2k4@ntlworld.com>
9527 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
9528 if the input bfd does not contain any code.
9530 2004-03-09 Steve Ellcey <sje@cup.hp.com>
9532 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
9534 2004-03-05 Fred Fish <fnf@redhat.com>
9536 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
9537 mips16 symbols to be even rather than testing first for even/odd.
9538 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
9540 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
9542 * elf.c (map_sections_to_segments): Ignore .tbss sections for
9545 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
9547 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
9548 undefined symbols as hash_new.
9550 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
9552 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
9554 * elf32-sh.c: Ditto.
9555 * bfd-in2.h: Regenerate.
9557 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
9559 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
9561 (_frv_count_got_plt_entries): Initialize them.
9562 (frv_pic_relocs_info_find): Add insert argument. Adjust all
9564 (frv_pic_relocs_info_for_global): Likewise.
9565 (frv_pic_relocs_info_for_local): Likewise.
9566 (frv_pic_merge_early_relocs_info): New.
9567 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
9569 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
9570 Check that we don't exceed the allocated count for entry.
9571 (_frv_add_rofixup): Likewise.
9572 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
9573 (elf32_frv_finish_dynamic_sections): Improve error message in case
9574 we emit too few rofixup entries.
9576 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
9578 * archures.c (bfd_mach_fr450): New.
9579 * bfd-in2.h: Regenerate.
9580 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
9581 (arch_info_500): Link to it.
9582 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
9583 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
9584 (frv_elf_arch_extension_p): New function.
9585 (frv_elf_merge_private_bfd_data): Use it.
9587 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
9589 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
9591 * elflink.h (is_global_data_symbol_definition): Moved to
9593 (elf_link_is_defined_archive_symbol): Likewise.
9594 (elf_link_add_archive_symbols): Likewise. Renamed to
9595 _bfd_elf_link_add_archive_symbols.
9597 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
9598 of ELF symbol table entry from backend.
9599 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
9600 instead of elf_link_add_object_symbols.
9602 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
9604 * elf-bfd.h (struct elf_backend_data): Added
9605 elf_backend_can_make_relative_eh_frame,
9606 elf_backend_can_make_lsda_relative_eh_frame and
9607 elf_backend_encode_eh_address.
9608 (_bfd_elf_encode_eh_address): Declare.
9609 (_bfd_elf_can_make_relative): Declare.
9610 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
9611 hooks to decide whether to attempt to make_relative and
9613 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
9614 (_bfd_elf_can_make_relative): New.
9615 (_bfd_elf_encode_eh_address): New.
9616 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
9617 (frv_elf_encode_eh_address): New.
9618 (elf_backend_can_make_relative_eh_frame): Define.
9619 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9620 (elf_backend_encode_eh_address): Define.
9622 (elf_backend_can_make_relative_eh_frame): Define.
9623 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9624 (elf_backend_encode_eh_address): Define.
9625 (elfNN_bed): Add them.
9627 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
9629 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
9630 complain_on_overflow to signed.
9632 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
9634 * elflink.h (sort_symbol): New.
9635 (elf_link_add_object_symbols): Use a sorted symbol array for
9638 2004-02-27 Jakub Jelinek <jakub@redhat.com>
9640 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9641 for pc relative relocs.
9642 (elf_s390_relocate_section): Likewise.
9643 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9644 for pc relative relocs.
9645 (elf_s390_relocate_section): Likewise.
9647 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
9649 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
9652 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
9654 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
9655 field to track if a relocation is against readonly section.
9656 (count_dyn_reloc): Take a new argument for rent->reltext.
9657 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
9658 (get_reloc_section): Don't set ia64_info->reltext here.
9659 (allocate_dynrel_entries): Set ia64_info->reltext here.
9661 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
9663 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
9664 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
9665 function's descriptor to symbol+offset, and map local undefweak
9666 symbol to NULL function descriptor.
9667 (elf32_frv_relocate_section): Likewise.
9669 2004-02-23 Mark Kettenis <kettenis@gnu.org>
9671 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
9673 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
9674 (netbsd_core_file_p): Set architecture from machine ID for
9677 2004-02-23 Jakub Jelinek <jakub@redhat.com>
9679 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
9680 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
9682 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
9684 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
9685 symbols with non-default visibility.
9687 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
9689 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
9690 IMAGE_SCN_MEM_WRITE on known sections only.
9692 2004-02-20 Jakub Jelinek <jakub@redhat.com>
9694 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
9695 symbols used in PIE relocs.
9697 2004-02-19 Jakub Jelinek <jakub@redhat.com>
9699 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
9702 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
9704 * configure.in: Update version to 2.15.90.
9705 * configure: Regenerate.
9707 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
9708 Richard Sandiford <rsandifo@redhat.com>
9710 * elfxx-mips.c (mips_elf_calculate_relocation): Use
9711 _bfd_elf_symbol_refs_local_p to decide whether to decay
9712 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
9713 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
9714 relocs if the symbol wasn't defined by a regular object file.
9715 Don't check the symbol's dynindx.
9717 2004-02-16 Andrew Cagney <cagney@redhat.com>
9719 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
9721 * bfd-in2.h: Re-generate.
9723 2004-02-14 Andrew Cagney <cagney@redhat.com>
9725 * configure.host (HDEFINES): When hppa*-*-hpux*, define
9726 _LARGEFILE64_SOURCE.
9728 2004-02-13 Andrew Cagney <cagney@redhat.com>
9730 * elf.c (vma_page_aligned_bias): New function.
9731 (assign_file_positions_except_relocs)
9732 (assign_file_positions_for_segments): Replace broken modulo
9733 arithmetic with call to vma_page_aligned_bias.
9735 2004-02-11 Andrew Cagney <cagney@redhat.com>
9737 * bfd-in.h: Update copyright.
9738 (bfd_tell): Change return type to file_ptr.
9739 * bfd-in2.h: Re-generate.
9740 * cache.c: Update copyright.
9741 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
9743 (close_one): Use real_ftell.
9744 * bfdio.c: Update copyright.
9745 (real_ftell, real_fseek): New functions.
9746 (bfd_tell): Use real_fseek and real_ftell, change return type to
9748 (bfd_seek): Use real_ftell and real_fseek, change type of
9749 file_position to a file_ptr.
9750 * libbfd-in.h: Update copyright.
9751 (real_ftell, real_fseek): Declare.
9752 * libbfd.h: Re-generate.
9754 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
9755 fseeko and fseeko64. Determine bfd_file_ptr.
9756 * configure: Re-generate.
9757 * config.in: Re-generate.
9759 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
9761 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
9762 * elf32-h8300.c: Likewise.
9764 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
9765 Nick Clifton <nickc@redhat.com>
9767 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
9768 GOT entries with no associated GOT subsection.
9770 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
9772 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
9773 * elf.c (swap_out_syms): Use it to decide whether local section
9774 symbols should be named.
9775 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
9776 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
9777 (elf_backend_name_local_section_symbols): Define.
9778 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
9780 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
9782 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
9783 (elfNN_ia64_relax_section): Optimize brl to br during the relax
9786 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
9788 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
9789 to bfd_link_hash_entry passed by reference to
9790 _bfd_generic_link_add_one_symbol.
9792 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
9794 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
9795 relocations against dynamic symbols.
9797 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
9799 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
9802 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
9804 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
9805 * bfd-in2.h, libbfd.h: Rebuilt.
9807 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
9809 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
9810 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
9811 flag has been cleared.
9813 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
9815 * coff-h8300.c: Add and adjust comments about relaxation.
9816 * elf32-h8300.c: Likewise.
9818 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9820 * coff-h8300.c: Fix comment typos.
9821 * elf32-h8300.c: Likewise.
9823 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9825 * coff-h8300.c: Add comments about relaxation.
9826 * elf32-h8300.c: Likewise.
9828 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9830 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
9832 * aclocal.m4: Regenerate.
9833 * configure: Regenerate.
9835 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
9837 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
9838 mips_elf64_rtype_to_howto instead of using howto_table.
9840 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
9842 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
9844 (elf32_arm_check_relocs): Don't increment the PLT refcount for
9845 relocs which would not use the PLT.
9847 2004-01-13 Alan Modra <amodra@bigpond.net.au>
9849 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
9850 (ppc64_elf_gc_sweep_hook): Likewise.
9851 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
9853 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
9855 Adds linker relaxation support for bit manipulation insns like
9856 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
9858 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
9859 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
9860 * coff-h8300.c: Opcode for bit manipulation insn is checked in
9861 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
9863 2004-01-12 Alan Modra <amodra@bigpond.net.au>
9865 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
9867 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9869 * elf32-h8300.c: Fix formatting.
9871 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9873 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
9874 dynamic object is present. Declare r_symndx and h in an inner
9876 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
9878 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
9880 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
9881 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
9882 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
9883 identically. Do not emit PC24 relocations for shared libraries.
9884 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
9885 identically. Don't adjust pc_count.
9886 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
9887 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
9888 adjust count for branch relocations.
9889 (allocate_dynrelocs): Correct typo in call to
9890 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
9891 PC24 or PLT32 relocs when linking.
9893 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9895 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
9896 relocation howto with ARM_26 one for consistency.
9897 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
9898 that will be converted to ARM_26D ones, since we always want 'done'
9899 relocations to be reflected in section's data.
9900 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
9902 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
9905 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9907 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
9908 are not partial_inplace during a relocatable link.
9910 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
9912 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
9913 if no dynamic object is present. Declare r_symndx and h in an
9916 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
9918 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
9919 trampoline if it is known out of range.
9921 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
9923 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
9924 * elf32-frv.c (_frv_osec_readonly_p): New.
9925 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9927 (_frv_count_got_plt_entries): Adjust expected count accordingly.
9928 (elf32_frv_relocate_section): Likewise. Error out if attempting
9929 to emit rofixups or dynamic relocs in read-only segments. Use
9930 _bfd_elf_section_offset to adjust r_offsets in rofixups and
9931 dynamic relocations.
9932 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
9933 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9934 relocations or fixups involving merged sections correctly. Avoid
9935 crash when undefined symbol is referenced by R_FRV_32 or
9936 R_FRV_FUNCDESC_VALUE.
9937 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
9938 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9939 input section holding local symbol to addend of R_FRV_32 or
9940 R_FRV_FUNCDESC_VALUE dynamic relocation.
9941 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
9942 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9943 (elf32_frv_always_size_sections): Don't store pointer to
9944 __stacksize symbol in sec_info.
9945 (elf32_frv_modify_segment_map): Look it up here.
9946 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
9947 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9948 of the lazy PLT entry, not only its offset, as the low word of a
9949 function descriptor.
9950 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
9951 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9952 if a hash table entry already exists but is not a definition.
9953 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
9954 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9955 (_frv_add_rofixup): Don't inline.
9956 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9957 for undefweak symbols.
9958 (elf32_frv_relocate_section): Avoid crash while computing
9959 relocation when linking with shared library. Only emit rofixups
9960 and dynamic relocations for alloc&load sections. Mark binaries
9961 with inter-segment relocations for relocation as a unit.
9962 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9963 (DEFAULT_STACK_SIZE): New.
9964 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9965 emit rofixups or dynamic relocs when linking dynamic non-PIE
9967 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9968 shared libs too. Reserve the last entry for the GOT pointer.
9969 (elf32_frv_finish_dynamic_sections): Emit it.
9970 (elf32_frv_always_size_sections): New.
9971 (elf32_frv_modify_segment_map): New.
9972 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9974 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9975 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9976 (elf_backend_always_size_sections): New.
9977 (elf_backend_modify_segment_map): New.
9978 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
9979 * config.bfd: Added frv-*-*linux*.
9980 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9981 ABS section, instead of crashing.
9982 (elf32_frv_relocate_section): Don't crash before warning about
9983 different segments in non-PIC relocation.
9984 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
9985 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9986 relocs to undefweak symbols.
9987 (elf32_frv_relocate_section): Ditto for undefined symbols.
9988 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
9989 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9990 gotfixup section was created.
9991 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
9992 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9993 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9994 complain_overflow_signed.
9995 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9996 have not been allocated.
9997 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
9998 privfd only if dynamic sections were created.
9999 (elf32_frv_relocate_section): Compute gprel_segment, and use it
10000 for GPREL relocs. When linking relocatable FDPIC executables,
10001 emit warnings for relocations that would be illegal on PIE or
10002 shared libraries. Emit rofixup for R_FRV_32 only if input object
10004 (_frv_create_got_section): Define _gp symbol in the rofixup
10006 (elf32_frv_finish_dynamic_sections): If rofixups needed but
10007 dynamic sections missing, error out requesting -melf32frvfd.
10008 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
10009 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
10010 computation of addends from section and global or local symbol
10011 value. Change return type to bfd_boolean, and return a failure if
10012 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
10013 nonzero addend is required.
10014 (elf32_frv_relocate_section): Likewise. Print error for
10015 unsupported nonzero addends.
10016 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
10017 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
10018 force everything local.
10019 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
10020 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
10021 (frv_gotfixup_section): New.
10022 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
10023 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
10025 (_frv_add_rofixup): New.
10026 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
10027 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
10028 improve some ugly conditions.
10029 (elf32_frv_relocate_section): Likewise. Reject inter-segment
10030 relocations in fdpic.
10031 (_frv_create_got_section): Create .rofixup.got section.
10032 (struct _frv_dynamic_got_info): Added fixups.
10033 (_frv_count_got_plt_entries): Account in-GOT relocations into
10034 relocs32, relocsfd and relocsfdv. Account them into relocs or
10035 fixups, as appropriate.
10036 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
10038 (elf32_frv_finish_dynamic_sections): Verify that the right number
10039 of relocations and fixups was generated.
10040 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
10042 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
10043 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
10044 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
10045 descriptor of a (formerly-)global symbol is local.
10046 (struct frv_pic_relocs_info): Adjust comments.
10047 (_frv_emit_got_relocs_plt_entries): Adjust.
10048 (elf32_frv_relocate_section): Likewise.
10049 (_frv_count_got_plt_entries): Likewise.
10050 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
10051 symbol's value to addend in the common preamble. Decay dynamic
10052 symbols to section+offset if they bind or call locally, for GOT
10053 and FUNCDESC_VALUE, respectively.
10054 (elf32_frv_relocate_section): Likewise.
10055 (elf32_frv_check_relocs): Don't register as dynamic symbols of
10056 internal or hidden visibility.
10057 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
10058 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
10059 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
10060 (elf32_frv_relocate_section): Pass relocation addend in. Use
10061 original relocation addend to look up the got relocs/plt entries
10062 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
10063 processing relocations that reference .scommon symbols.
10064 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
10065 Introduce support for dynamic linking.
10066 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
10067 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
10068 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
10069 (frv_reloc_type_lookup): Return REL howtos for executables and
10071 (frv_info_to_howto_rel): New.
10072 (struct frv_elf_link_hash_table): New.
10073 (frv_hash_table, frv_got_section, frv_gotrel_section,
10074 frv_plt_section, frv_pltrel_section, frv_relocs_info,
10075 frv_got_initial_offset, frv_plt_initial_offset): New macros.
10076 (frv_elf_link_hash_table_create): New.
10077 (struct frv_pic_relocs_info): New.
10078 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
10079 (frv_pic_relocs_info_find): New.
10080 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
10082 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
10083 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
10084 (_frv_emit_got_relocs_plt_entries): New.
10085 (elf32_frv_relocate_section): Add support for dynamic linking.
10086 Handle new relocations.
10087 (_frv_create_got_section): New.
10088 (elf32_frv_create_dynamic_sections): New.
10089 (ELF_DYNAMIC_INTERPRETER): New.
10090 (struct _frv_dynamic_got_info): New.
10091 (_frv_count_got_plt_entries): New.
10092 (struct _frv_dynamic_got_plt_info): New.
10093 (_frv_compute_got_alloc_data): New.
10094 (_frv_get_got_entry, _frv_get_fd_entry): New.
10095 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
10096 (_frv_resolve_final_relocs_info): New.
10097 (elf32_frv_size_dynamic_sections): New.
10098 (elf32_frv_finish_dynamic_sections): New.
10099 (elf32_frv_adjust_dynamic_symbol): New.
10100 (elf32_frv_finish_dynamic_symbol): New.
10101 (elf32_frv_check_relocs): Handle new relocs. Explain how the
10103 (elf_info_to_howto_rel): Define.
10104 (bfd_elf32_bfd_link_hash_table_create): Define.
10105 (elf_backend_create_dynamic_sections): Define.
10106 (elf_backend_adjust_dynamic_symbol): Define.
10107 (elf_backend_size_dynamic_sections): Define.
10108 (elf_backend_finish_dynamic_symbol): Define.
10109 (elf_backend_finish_dynamic_sections): Define.
10110 (elf_backend_want_got_sym): Define.
10111 (elf_backend_got_header_size): Define.
10112 (elf_backend_want_got_plt): Define.
10113 (elf_backend_plt_readonly): Define.
10114 (elf_backend_want_plt_sym): Define.
10115 (elf_backend_plt_header_size): Define.
10116 (elf_backend_may_use_rel_p): Define.
10117 (elf_backend_may_use_rela_p): Define.
10118 (elf_backend_default_use_rela_p): Define.
10119 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
10120 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
10121 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
10122 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
10123 (frv_reloc_map): Map the corresponding BFD relocs to them.
10124 (frv_reloc_type_lookup): ... and back to BFD relocs.
10125 * reloc.c: New relocs.
10126 * bfd-in2.h, libbfd.h: Rebuilt.
10127 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
10128 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
10129 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
10130 R_FRV_FUNCDESC_GOTLO): New.
10131 (frv_reloc_map): Map the corresponding BFD relocs to them.
10132 (frv_reloc_type_lookup): ... and back to BFD relocs.
10133 * reloc.c: New relocs.
10134 * bfd-in2.h, libbfd.h: Rebuilt.
10136 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
10138 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
10139 targets to support pages of up to 64kB.
10140 (elf32_bed): Redefine to get a separate backend data structure for
10141 traditional targets.
10142 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
10143 targets to support pages of up to 64kB.
10144 (elf64_bed): Redefine to get a separate backend data structure for
10145 traditional targets.
10146 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
10147 targets to support pages of up to 64kB.
10148 (elf32_bed): Redefine to get a separate backend data structure for
10149 traditional targets.
10151 2004-01-04 Mark Kettenis <kettenis@gnu.org>
10153 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
10155 2004-01-02 Mark Kettenis <kettenis@gnu.org>
10157 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
10158 (elf_i386_grok_psinfo): Likewise.
10160 2004-01-02 Bernardo Innocenti <bernie@develer.com>
10162 * config.bfd: Add m68k-uClinux target.
10164 2004-01-01 Grant Edwards <grante@visi.com>
10166 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
10167 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
10168 (elf32_h8_gc_sweep_hook): New function.
10169 (elf_backend_gc_mark_hook): Define.
10170 (elf_backend_gc_sweep_hook): Define.
10171 (elf_backend_can_gc_sections): Define.
10173 For older changes see ChangeLog-0203
10179 version-control: never