1 2005-11-03 Alan Modra <amodra@bigpond.net.au>
3 * elf.c (elf_fake_sections): When calculating tbss size, just use
5 (assign_file_positions_for_segments): Likewise.
6 * elflink.c (bfd_elf_final_link): Likewise.
7 (elf_reloc_link_order): Correct comment.
9 2005-11-02 Alan Modra <amodra@bigpond.net.au>
12 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Add required
15 2005-10-29 H.J. Lu <hongjiu.lu@intel.com>
17 * Makefile.am: Run "make dep-am".
18 * Makefile.in: Regenerated.
20 * dep-in.sed: Replace " ./" with " ".
22 2005-10-29 H.J. Lu <hongjiu.lu@intel.com>
24 * hpux-core.c: Include <machine/reg.h> only if HPUX_CORE is
26 * osf-core.c: Include <sys/core.h> only if OSF_CORE is defined.
27 * sco5-core.c: Include <sys/paccess.h> and <sys/region.h> only
28 if SCO5_CORE is defined.
30 2005-10-29 Mark Kettenis <kettenis@gnu.org>
32 * Makefile.am: Run "make dep-am".
33 * Makefile.in: Regenerate.
35 2005-10-28 Joel Brobecker <brobecker@adacore.com>
37 From Eric Botcazou <botcazou@adacore.com>
38 * coffcode.h (coff_compute_section_file_positions): Fix small
39 error in preprocessor directives.
41 2005-10-28 Joel Brobecker <brobecker@adacore.com>
43 Mostly from Eric Botcazou <botcazou@adacore.com>
44 * rs6000-core.c: ANSIfy all function definitions.
45 Add missing function prototypes.
46 (ptr_to_uint): New type.
47 (rs6000coff_core_p): Use it as intermediate step in casts.
48 (rs6000coff_core_file_matches_executable_p): Likewise.
49 * xcoff-target.h (rs6000coff_core_p): Fix prototype.
50 (rs6000coff_core_file_matches_executable_p): Likewise.
52 2005-10-28 H.J. Lu <hongjiu.lu@intel.com>
55 * aoutx.h (NAME (aout, machine_type)): Handle
56 bfd_mach_sparc_v8plus, bfd_mach_sparc_v8plusa,
57 bfd_mach_sparc_v8plusb, bfd_mach_sparc_v9, bfd_mach_sparc_v9a
58 and bfd_mach_sparc_v9b.
60 2005-10-28 Hans-Peter Nilsson <hp@axis.com>
63 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_32>: Set
64 complain_on_overflow field to complain_overflow_dont.
66 2005-10-27 Alan Modra <amodra@bigpond.net.au>
69 * cache.c (enum cache_flag): New.
70 (close_one): Save file mtime.
71 (bfd_cache_lookup): Add flag arg, adjust all users.
72 (bfd_cache_lookup_worker): Likewise.
73 (cache_btell): Use CACHE_NO_OPEN and return abfd->where if file
75 (cache_bflush): Similarly, and return success of file not open.
76 (cache_bseek): Use CACHE_NO_SEEK if SEEK_SET or SEEK_END.
77 (cache_bstat): Use CACHE_NO_SEEK_ERROR.
79 * bfdwin.c (bfd_get_file_window): Seek into file in place of
80 using bfd_cache_lookup.
82 * cache.c (BFD_CACHE_MAX_OPEN): Make private to this file.
83 (bfd_last_cache, bfd_cache_lookup, bfd_cache_lookup_worker): Likewise.
84 * libbfd-in.h (bfd_cache_lookup_worker, bfd_last_cache): Delete.
85 * libbfd.h: Regenerate.
87 * hppabsd-core.c (hppabsd_core_core_file_p): Use bfd_stat, not fstat.
88 * sco5-core.c (sco5_core_file_p): Likewise.
89 * trad-core.c (trad_unix_core_file_p): Likewise.
91 * cache.c: Reorganize file to avoid forward reference.
93 2005-10-26 Alan Modra <amodra@bigpond.net.au>
95 * cache.c (bfd_cache_lookup_worker): Don't abort on failing to
97 (cache_btell, cache_bseek, cache_bflush, cache_bstat): Return -1 on
98 bfd_cache_lookup failure.
99 (cache_bread, cache_bwrite): Return 0 on the same.
100 * bfdwin.c (bfd_get_file_window): Likewise.
101 * hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
102 * sco5-core.c (sco5_core_file_p): Likewise.
103 * trad-core.c (trad_unix_core_file_p): Likewise.
105 2005-10-26 Alan Modra <amodra@bigpond.net.au>
107 * cache.c (bfd_cache_lookup_worker): Use bfd_error_handler
108 rather than bfd_perror. Print file name. Internationalise.
110 2005-10-26 Alan Modra <amodra@bigpond.net.au>
112 * cache.c (bfd_open_file): Set bfd_error_system_call on failure
114 (bfd_cache_lookup_worker): Remove check that file pos is in
115 unsigned long range. Print system error before aborting.
117 2005-10-25 Arnold Metselaar <arnold.metselaar@planet.nl>
119 * Makefile.am: Add rules for coff-z80 and cpu-z80.
120 * Makefile.in: Regenerated.
121 * archures.c: Add bfd_arch_z80 and support for it.
122 * coffcode.h(coff_set_arch_mach_hook): Add case Z80MAGIC.
123 (coff_set_flags): Add case bfd_arch_z80.
124 * config.bfd: Add z80coff_vec.
125 * configure.in: Add z80coff_vec.
126 * reloc.c: Add BFD_RELOC_Z80_DISP8
127 * targets.c: Add z80coff_vec.
128 * coff-z80.c: New file
129 * cpu-z80.c: New file
130 * configure: Regenerated.
131 * libbfd.h: Regenerated.
132 * bfd-in2.h: Regenerated.
134 2005-10-26 Alan Modra <amodra@bigpond.net.au>
137 * elf-bfd.h (elf_backend_copy_indirect_symbol): Replace pointer to
138 elf_backend_data with pointer to bfd_link_info.
139 (_bfd_elf_link_hash_copy_indirect): Likewise.
140 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Handle
141 direct and indirect symbols both having dynamic link info.
142 * elf32-arm.c (elf32_arm_copy_indirect_symbol): Likewise.
143 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
144 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
145 * elf32-m32r.c (m32r_elf_copy_indirect_symbol): Likewise.
146 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
147 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
148 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
149 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
150 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
151 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
152 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
153 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
154 * elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
155 * elflink.c: Adjust all calls to bed->elf_backend_copy_indirect_symbol.
156 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Update prototype.
157 * elfxx-sparc.h (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
159 2005-10-25 Alan Modra <amodra@bigpond.net.au>
161 * po/SRC-POTFILES.in: Regenerate.
162 * po/bfd.pot: Regenerate.
164 2005-10-24 Jie Zhang <jie.zhang@analog.com>
166 * elf32-bfin.c (bfd_bfin_elf32_create_embedded_relocs): Fix signedness
169 2005-10-24 Bernd Schmidt <bernd.schmidt@analog.com>
171 * elf32-bfin.c (bfin_howto_table): Set src_mask to 0 for all relocs.
172 (bfin_imm16_reloc): Always add in the addend. Don't fetch existing
173 contents from section.
174 (bfin_relocate_section): Rework so as to not call special_functions.
175 Handle the relocation stack here. Treat pcrel24 relocs specially.
177 2005-10-24 Alan Modra <amodra@bigpond.net.au>
179 * elflink.c (elf_link_input_bfd): Don't use linker_mark and
180 SEC_EXCLUDE to test for sections dropped from output. Instead,
181 use bfd_section_removed_from_list on normal sections. Don't
182 attempt to handle symbols with unknown reserved section indices.
183 * linker.c (_bfd_generic_link_output_symbols): Don't use
184 linker_mark to test for symbols belonging to dropped sections.
185 Do allow absolute symbols.
187 2005-10-24 Alan Modra <amodra@bigpond.net.au>
189 * elf32-i370.c (i370_elf_fake_sections): Don't set SHF_EXCLUDE on
192 2005-10-24 Jan Beulich <jbeulich@novell.com>
194 * cpu-ia64-opc.c (elf64_ia64_operands): Move memory operand out of
195 set of indirect operands.
197 2005-10-24 Alan Modra <amodra@bigpond.net.au>
199 * elf32-ppc.c (ppc_elf_fake_sections): Don't set SHF_EXCLUDE on
202 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
204 * coff-rs6000.c (rs6000coff_vec): Initialize
205 _bfd_init_private_section_data with
206 _bfd_generic_init_private_section_data.
207 (pmac_xcoff_vec): Likewise.
208 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
209 (aix5coff64_vec): Likewise.
211 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
214 * elf-bfd.h (_bfd_generic_init_private_section_data): New.
215 (_bfd_elf_init_private_section_data): New.
217 * elf.c (elf_fake_sections): Don't set SHF_GROUP for
219 (bfd_elf_set_group_contents): Don't handle relocatable link
221 (assign_section_numbers): If it isn't called by assembler,
222 use the output section of elf_linked_to_section for
224 (_bfd_elf_init_private_section_data): New.
225 (_bfd_elf_copy_private_section_data): Call it.
227 * libbfd-in.h (_bfd_generic_init_private_section_data): New.
229 * libbfd.c (_bfd_generic_init_private_section_data): New.
231 * targets.c (BFD_JUMP_TABLE_COPY): Add
232 _bfd_generic_init_private_section_data.
233 (bfd_init_private_section_data): Likewise.
235 * bfd-in2.h: Regenerated.
236 * libbfd.h: Likewise.
238 2005-10-23 Alan Modra <amodra@bigpond.net.au>
240 * elf64-ppc.c (dec_dynrel_count): Don't report errors for local
241 syms in gc'd sections.
242 (ppc64_elf_edit_opd): Don't adjust reloc counts when NO_OPD_RELOCS.
243 (elf_backend_action_discarded): Define.
244 (ppc64_elf_action_discarded): New function.
246 2005-10-19 Paul Brook <paul@codesourcery.com>
248 * elf32-arm.c (find_arm_elf_section_entry): New function.
249 (get_arm_elf_section_data): Use it.
250 (unrecord_section_with_arm_elf_section_data): Use it.
252 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
254 * coff-rs6000.c (rs6000coff_vec): Initialize
255 _bfd_match_sections_by_type with
256 _bfd_generic_match_sections_by_type.
257 (pmac_xcoff_vec): Likewise.
258 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
259 (aix5coff64_vec): Likewise.
261 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
264 * elf-bfd.h (_bfd_elf_match_sections_by_type): New.
265 (_bfd_generic_match_sections_by_type): New. Defined.
267 * elf.c (_bfd_elf_match_sections_by_type): New.
269 * libbfd-in.h (_bfd_generic_match_sections_by_type): New.
271 * bfd-in2.h: Regenerated.
272 * libbfd.h: Likewise.
274 * libbfd.c (_bfd_generic_match_sections_by_type): New.
276 * targets.c (BFD_JUMP_TABLE_LINK): Initialize
277 _bfd_match_sections_by_type with
278 _bfd_generic_match_sections_by_type.
279 (bfd_target): Add _bfd_match_sections_by_type.
281 2005-10-08 Paul Brook <paul@codesourcery.com>
283 * elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
284 (NUM_KNOWN_ATTRIBUTES): Define.
285 (aeabi_attribute, aeabi_attribute_list): Define.
286 (elf32_arm_obj_tdata): Add known_eabi_attributes and
287 other_eabi_attributes.
288 (uleb128_size, is_default_attr, eabi_attr_size,
289 elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
290 elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
291 elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
292 elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
293 elf32_arm_merge_eabi_attributes): New functions.
294 (elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
295 (elf32_arm_fake_sections): Handle .ARM.attributes.
296 (elf32_arm_parse_attributes): New function.
297 (elf32_arm_section_from_shdr): Use it.
298 (bfd_elf32_bfd_final_link): Define.
300 2005-10-06 Daniel Jacobowitz <dan@codesourcery.com>
302 * elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from
304 (elf32_arm_size_dynamic_sections): Likewise.
305 * ecofflink.c (bfd_ecoff_debug_one_external): Likewise.
306 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
307 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
308 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
309 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
310 * elf32-s390.c (elf_s390_check_relocs): Likewise.
311 (elf_s390_size_dynamic_sections): Likewise.
312 * elf32-sh.c (sh_elf_check_relocs): Likewise.
313 * elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count)
314 (ppc64_elf_size_dynamic_sections): Likewise.
315 * elf64-s390.c (elf_s390_check_relocs): Likewise.
316 (elf_s390_size_dynamic_sections): Likewise.
317 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
318 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
319 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
320 * ieee.c (ieee_slurp_section_data): Likewise.
321 * oasys.c (oasys_slurp_section_data): Likewise.
323 2005-10-04 Bob Wilson <bob.wilson@acm.org>
325 * archive.c: Add missing SUBSECTION for documentation.
328 * corefile.c: Likewise.
329 * format.c: Likewise.
331 * libbfd.c: Likewise.
332 * opncls.c: Likewise.
333 * elf.c: Remove blank line after SECTION heading.
334 * reloc.c: Change "howto manager" SECTION to a SUBSECTION.
336 2005-10-04 Nick Clifton <nickc@redhat.com>
338 * elf32-arm.c (get_arm_elf_section_data): Cache the last pointer
339 matched so that the typical case of scanning for the previous
340 section to last one can be handled quickly.
342 2005-10-03 David Heine <dlheine@tensilica.com>
344 * elf32-xtensa.c (relocations_reach): Skip range check for
347 2005-10-03 Alan Modra <amodra@bigpond.net.au>
349 * elf.c (_bfd_elf_get_synthetic_symtab): Set BSF_GLOBAL on
352 2005-09-30 H.J. Lu <hongjiu.lu@intel.com>
354 * Makefile.am: Run "make dep-am".
355 * Makefile.in: Regenerated.
356 * aclocal.m4: Likewise.
358 2005-09-30 Catherine Moore <clm@cm00re.com>
360 * Makefile.am: Bfin support.
361 * Makefile.in: Regenerated.
362 * aclocal.m4: Regenerated.
363 * archures.c (bfd_mach_bfin): New.
364 (bfd_arch_bfin): New.
365 bfd-in.h (bfd_bfin_elf32_create_embedded_relocs): New.
366 * bfd-in2.h: Regenerated.
367 * config.bfd: Bfin support.
368 * configure: Regenerated.
369 * configure.in: Bfin support.
370 * libbfd.h: Regenerated.
371 * reloc.c: Add BFD relocations for Bfin.
372 * targets.c (bfd_elf32_bfin_vec): New.
373 * cpu-bfin.c: New file.
374 * elf32-bfin.c: New file.
376 2005-09-30 Alan Modra <amodra@bigpond.net.au>
378 * elf64-ppc.c (ppc_type_of_stub): Check both func desc and func
379 entry sym before deciding no stub is needed.
380 (ppc64_elf_size_stubs): When calculating branch destination,
381 don't use func desc sym for old ABI objects unless func entry
384 2005-09-28 H.J. Lu <hongjiu.lu@intel.com>
387 * elf-bfd.h (_bfd_elf_setup_group_pointers): Renamed to ...
388 (_bfd_elf_setup_sections): This.
390 * elfcode.h (elf_object_p): Likewise.
392 * elf.c (_bfd_elf_setup_sections): Process SHF_LINK_ORDER.
393 (_bfd_elf_copy_private_section_data): Likewise.
395 2005-09-28 H.J. Lu <hongjiu.lu@intel.com>
397 * elflink.c (elf_fixup_link_order): Report locations for mixed
398 ordered and unordered input sections.
400 2005-09-22 James E. Wilson <wilson@specifix.com>
402 * dwarf2.c (struct funcinfo): Delete nesting_level field.
403 (lookup_address_in_function_table): Delete code to set funcinfo
404 caller_func field. Delete local curr_func.
405 (scan_unit_for_symbols): New locals nested_funcs, nested_funcs_size.
406 Delete code setting funcinfo nesting_level field. Add code to set
407 funcinfo caller_func field.
409 2005-09-20 James E. Wilson <wilson@specifix.com>
411 * dwarf2.c (find_abstract_instance_name): Don't early exit when name
412 set. For DW_AT_name case, only set name if not already set. Handle
413 DW_AT_MIPS_linkage_name.
415 2005-09-20 Alan Modra <amodra@bigpond.net.au>
417 * elflink.c (_bfd_elf_merge_symbol): Simplify.
419 2005-09-19 Alan Modra <amodra@bigpond.net.au>
421 * elf64-ppc.c (ppc_build_one_stub): Replace assertion that long
422 branch offset is in range with an error. Print full stub name on
424 (ppc_size_one_stub): Print full stub name on errors.
425 (group_sections): Warn if section size exceeds group size.
426 (ppc64_elf_size_stubs): Continue relaxing when stub types change.
428 2005-09-09 Kevin Buettner <kevinb@redhat.com>
430 * elf32-am33lin.c (bfd.h, sysdep.h, elf-bfd.h, elf/mn10300.h):
432 (elf32_am33lin_grok_prstatus, elf32_am33lin_grok_psinfo): New
434 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
436 2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
438 * elf32-arm.c (elf32_arm_section_from_shdr): Accept SHT_ARM_PREEMPTMAP
439 and SHT_ARM_ATTRIBUTES.
441 2005-09-08 H.J. Lu <hongjiu.lu@intel.com>
443 * elflink.c (elf_get_linked_section_vma): Fix a typo in comment.
444 * elfxx-ia64.c (elf_backend_link_order_error_handler): Likewise.
446 2005-09-08 H.J. Lu <hongjiu.lu@intel.com>
449 * elflink.c (elf_link_add_object_symbols): Abort for
450 --just-symbols on DSO.
452 2005-09-08 Paul Brook <paul@codesourcery.com>
454 * reloc.c: Rename BFD_RELOC_ARM_SMI to BFD_RELOC_ARM_SMC.
455 * bfd-in2.h: Regenerate.
456 * libbfd.h: Regenerate.
458 2005-09-06 H.J. Lu <hongjiu.lu@intel.com>
461 * elflink.c (_bfd_elf_merge_symbol): Don't check undefined
462 symbol introduced by "ld -u" for TLS.
464 2005-09-02 Paul Brook <paul@codesourcery.com>
466 * libbdf.h: Regenerate.
467 * bfd-in2.h: Regenerate.
468 * reloc.c: Add BFD_RELOC_ARM_T32_CP_OFF_IMM and
469 BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
471 2005-09-01 Dmitry Diky <diwil@spec.ru>
473 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Do not adjust
474 local symbols and move it to
475 (msp430_elf_relax_adjust_locals): New function - walk over the
476 sections in the bfd and adjust relocations as necessary.
478 2005-08-31 DJ Delorie <dj@redhat.com>
480 * elf32-i386.c (elf_i386_check_relocs): Don't cast a unary &
481 address operator, as that breaks GCC's strict aliasing rules.
482 (elf_i386_size_dynamic_sections): Avoid the need for type
484 * elf64-x86-64.c (elf_x86_64_check_relocs): Don't cast a unary
485 & address operator, as that breaks GCC's strict aliasing
487 (elf_x86_64_size_dynamic_sections): Avoid the need for type
490 2005-08-30 Phil Edwards <phil@codesourcery.com>
492 * config.bfd (i[3-7]86-*-vxworks): Match vxworks* instead.
494 2005-08-29 H.J. Lu <hongjiu.lu@intel.com>
497 * elfxx-ia64.c (allocate_fptr): Check undefined symbol.
499 2005-08-29 Steven J. Hill <sjhill@realitydiluted.com>
501 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Initialise
502 'value' to avoid compile time warning message.
504 2005-08-26 Christian Groessler <chris@groessler.org>
506 * coff-z8k.c: (r_jr, r_disp7, r_callr): Fix src_mask and dst_mask
508 (coff_z8k_select_reloc): Remove.
509 (SELECT_RELOC): Remove.
510 (coff_z8k_reloc_type_lookup): New function.
511 (coff_bfd_reloc_type_lookup): Define.
512 * configure.in: Add cofflink.lo to z8kcoff_vec.
513 * configure: Regenerate.
514 * reloc.c: (bfd_reloc_code_type): Add z8k relocations.
515 (bfd_install_relocation): Don't clear reloc_entry->addend for
517 * bfd-in2.h: Regenerate.
518 * libbfd.h: Regenerate.
520 2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
522 * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
524 2005-08-24 H.J. Lu <hongjiu.lu@intel.com>
527 * elf-hppa.h (elf_hppa_relocate_section): Print out the name
528 of unresolvable relocation.
529 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
530 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
531 * elf32-i386.c (elf_i386_relocate_section): Likewise.
532 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
533 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
534 * elf32-s390.c (elf_s390_relocate_section): Likewise.
535 * elf32-sh.c (sh_elf_relocate_section): Likewise.
536 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
537 * elf64-s390.c (elf_s390_relocate_section): Likewise.
538 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
539 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
540 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
542 2005-08-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
544 * config.bfd: Add bfd_elf32_shnbsd_vec and bfd_elf32_shlnbsd_vec
545 to targ_selvecs for sh5*-*-netbsd* and sh64*-*-netbsd*.
547 2005-08-18 Alan Modra <amodra@bigpond.net.au>
549 * coff-a29k.c: Delete.
550 * cpu-a29k.c: Delete.
551 * Makefile.am: Remove mention of a29k files.
552 * aoutf1.h: Remove a29k support.
554 * archures.c: Likewise.
555 * coffcode.h: Likewise.
556 * config.bfd: Likewise.
557 * configure.in: Likewise.
559 * mipsbsd.c: Likewise.
561 * sparclynx.c: Likewise.
562 * targets.c: Likewise.
563 * Makefile.in: Regenerate.
564 * configure: Regenerate.
565 * bfd-in2.h: Regenerate.
566 * po/SRC-POTFILES.in: Regenerate.
568 2005-08-18 Alan Modra <amodra@bigpond.net.au>
570 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Warn on
571 zero size dynamic variables.
572 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
573 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
574 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
575 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
576 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
577 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
578 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
579 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
580 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
581 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
582 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
583 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
584 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
585 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
586 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
587 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
589 2005-08-17 H.J. Lu <hongjiu.lu@intel.com>
592 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Use section lma
594 (_bfd_dwarf2_find_line): Likewise.
596 2005-08-17 Alan Modra <amodra@bigpond.net.au>
598 * elf64-mmix.c (mmix_elf_add_symbol_hook): Mark reg section
600 (mmix_elf_final_link): Check that section hasn't already been
601 removed before removing.
602 * mmo.c (mmo_scan): Mark reg contents section SEC_LINKER_CREATED.
603 (mmo_canonicalize_symtab): Likewise for reg section.
605 2005-08-17 Alan Modra <amodra@bigpond.net.au>
607 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later.
608 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called
609 without any got section.
611 2005-08-17 Danny Smith <dannysmith@users.sourceforge.net>
613 * cofflink.c (_bfd_coff_generic_relocate_section): Correct
616 2005-08-17 Alan Modra <amodra@bigpond.net.au>
618 * elflink.c (_bfd_elf_define_linkage_sym): Don't call
619 bfd_elf_link_record_dynamic_symbol. Call elf_backend_hide_symbol.
620 (_bfd_elf_link_renumber_dynsyms): Formatting.
621 (struct elf_gc_sweep_symbol_info): New.
622 (elf_gc_sweep_symbol): Rewrite.
623 (elf_gc_sweep): Adjust params and elf_gc_sweep_symbol call.
624 Call _bfd_elf_link_renumber_dynsyms.
625 (bfd_elf_gc_sections): Adjust elf_gc_sweep call.
627 2005-08-16 Alan Modra <amodra@bigpond.net.au>
629 * elf64-ppc.c (ppc64_elf_edit_opd): Don't call dec_dynrel_count
632 2005-08-15 Bob Wilson <bob.wilson@acm.org>
634 * elf32-xtensa.c (ELF_MACHINE_CODE, ELF_MACHINE_ALT1): Swap values
635 of EM_XTENSA and EM_XTENSA_OLD.
637 2005-08-16 Alan Modra <amodra@bigpond.net.au>
639 * elf-bfd.h (_bfd_elf_define_linkage_sym): Declare.
640 * elflink.c (_bfd_elf_define_linkage_sym): New function, extracted
642 (_bfd_elf_create_got_section): ..here.
643 (_bfd_elf_link_create_dynamic_sections): Call it for _DYNAMIC.
644 (_bfd_elf_create_dynamic_sections): ..and _PROCEDURE_LINKAGE_TABLE_.
645 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Use
646 _bfd_elf_define_linkage_sym.
647 * elf32-frv.c (_frv_create_got_section): Likewise.
648 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
650 2005-08-15 Paul Brook <paul@codesourcery.com>
652 * elf32-arm.c (elf32_arm_howto_table_1): Make R_ARM_PLT32 the same as
655 2005-08-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
658 * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
659 .plt, .dlt, .sdata, .sbss and .tbss.
661 2005-08-12 Dmitry Diky <diwil@spec.ru>
663 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
664 referenced by .section + DISPLACEMENT.
666 2005-08-10 James E. Wilson <wilson@specifix.com>
668 * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
669 DW_OP_addr is only opcode in location before using it.
671 2005-08-09 H.J. Lu <hongjiu.lu@intel.com>
673 * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
675 2005-08-09 Rodney Brown <rbrown@bravurasolutions.com.au>
676 Nick Clifton <nickc@redhat.com>
678 * aix5ppc-core.c (xcoff64_core_p): Constify return_value
679 variable. Also, do not use core_hdr macro as it evaluates to a
680 cast of an lvalue which is no longer supported by GCC 4.0.
682 2005-08-08 Eric Dönges <Eric.Doenges@betty-tv.com>
684 * archures.c (bfd_mach_msp21): New MSP430 machine number.
685 * bfd-in2.h: Regenerate.
686 * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
689 2005-08-07 Nick Clifton <nickc@redhat.com>
690 Paul Brook <paul@codesourcery.com>
693 * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
694 (elf32_arm_close_and_cleanup): New function - walk over the
695 sections in the bfd that is being closed removing them from the
696 list of recorded sections.
697 (unrecord_section_via_map_over_sections): New helper function.
698 (record_section_with_arm_elf_section_data): Call bfd_malloc
699 instead of bfd_alloc. Remove unneeded abfd parameter.
700 (elf32_arm_new_section_hook): Do not pass bfd to
701 record_section_with_arm_elf_section_data.
703 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
704 already defined by the target.
706 2005-08-05 Fred Fish <fnf@specifix.com>
708 * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
709 to determine how many bytes to read from each rangelist entry.
711 2005-08-05 H.J. Lu <hongjiu.lu@intel.com>
713 * bfd.c (bfd_hide_symbol): New.
714 * bfd-in2.h: Regenerated.
716 2005-08-04 H.J. Lu <hongjiu.lu@intel.com>
718 * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
719 large common symbol and a normal common symbol, always turn
720 the large common symbol into a normal one.
722 2005-08-04 Alan Modra <amodra@bigpond.net.au>
724 * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
726 (ppc_elf_relocate_section): Adjust for above.
727 (create_sdata_sym): New function.
728 (ppc_elf_create_linker_section): Call it.
729 (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
730 Create sdata syms for all SDA relocs.
731 (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
733 (ppc_elf_set_sdata_syms): Delete.
734 * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
735 and DT_FINI tags unless associated section has input.
736 (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
737 (_bfd_elf_provide_section_bound_symbols): Delete.
738 * bfd-in.h (_bfd_elf_provide_symbol): Delete.
739 (_bfd_elf_provide_section_bound_symbols): Delete.
740 * bfd-in2.h: Regenerate.
742 2005-08-04 Alan Modra <amodra@bigpond.net.au>
744 * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
745 * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
746 * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
747 * bfd-in2.h: Regenerate.
749 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
751 * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
752 only if it isn't NULL.
754 2005-08-03 H.J. Lu <hongjiu.lu@intel.com>
756 * elf32-i386.c (elf_howto_table): Undo the overflow change for
757 R_386_PC16 made on 2005-07-18.
759 * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
760 change for R_X86_64_PC16 made on 2005-07-18.
762 2005-08-03 Alan Modra <amodra@bigpond.net.au>
764 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot. Use
765 elf.hgot throughout file.
767 2005-08-03 Alan Modra <amodra@bigpond.net.au>
769 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
770 _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
772 2005-08-02 Andreas Schwab <schwab@suse.de>
774 * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
775 (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
777 (allocate_dynrel_entries): Look only at GOT relocations when
779 (elfNN_ia64_size_dynamic_sections): Set only_got to false before
780 calling allocate_dynrel_entries.
782 2005-08-02 Nick Clifton <nickc@redhat.com>
785 * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
786 and make the mapcount field unsigned.
787 (struct section_list): New: Used to keep track of which sections
788 have an _arm_elf_section_data structure.
789 (record_section_with_arm_elf_section_data): New function.
790 (get_arm_elf_section_data): New function.
791 (unrecord_section_with_arm_elf_section_data): New function.
792 (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
793 (elf32_arm_new_section_hook): Call
794 record_section_with_arm_elf_section_data.
795 (elf32_arm_write_section): Use get_arm_elf_section_data and
796 unrecord_section_with_arm_elf_section_data.
798 2005-08-01 Richard Sandiford <richard@codesourcery.com>
800 * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
801 of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
803 2005-07-30 David Daney <ddaney@avtrex.com>
805 * elflink.c (elf_gc_sweep): Set dynsymcount to correct value.
807 2005-07-29 David Daney <ddaney@avtrex.com>
809 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Ignore _gp_disp
810 if it is in the *ABS* section.
812 2005-07-29 Paul Brook <paul@codesourcery.com>
814 * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
815 * bfd-in2.h: Regenerate.
816 * libbfd.h: Regenerate.
818 2005-07-29 Paul Brook <paul@codesourcery.com>
820 * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
821 * bfd-in2.h: Regeenrate.
822 * libbfd.h: Regenerate.
824 2005-07-29 Pavel Kankovsky <peak@argo.troja.mff.cuni.cz>
826 * peXXigen.c (pe_print_edata): Compute the size of the export
827 table from the size field in the DataDictionary and not the size
828 of the section. Some linkers embed the export table inside a
831 2005-07-29 Alan Modra <amodra@bigpond.net.au>
833 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
834 (enum action_discarded): Move from..
835 * elflink.c (enum action_discarded): ..here.
836 (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
837 Remove target specific section checks.
838 (elf_link_input_bfd): Adjust.
839 * elfxx-target.h (elf_backend_action_discarded): Define.
840 (elfNN_bed): Init new field.
841 * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
842 * bfd-in2.h: Regenerate.
843 * elf-hppa.h (elf_hppa_action_discarded): New function.
844 * elf32-hppa.c (elf_backend_action_discarded): Define.
845 * elf64-hppa.c (elf_backend_action_discarded): Define.
846 * elf32-ppc.c (ppc_elf_action_discarded): New function.
847 (elf_backend_action_discarded): Define.
849 2005-07-27 Alan Modra <amodra@bigpond.net.au>
851 * elflink.c (fix_syms): Handle symbols defined in input sections.
853 2005-07-27 Jan Beulich <jbeulich@novell.com>
855 * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
856 (elf64_x86_64_info_to_howto): Use them.
858 2005-07-27 Alan Modra <amodra@bigpond.net.au>
860 * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
861 regardless of strength of previous definition.
863 2005-07-26 Alan Modra <amodra@bigpond.net.au>
865 * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
866 (bfd_elf_gc_sections): Allow -gc-sections when -shared.
867 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
869 2005-07-26 Alan Modra <amodra@bigpond.net.au>
871 * elflink.c (elf_gc_sweep): Move gcc_except_table code..
872 (bfd_elf_gc_sections): ..to here.
874 2005-07-25 DJ Delorie <dj@redhat.com>
876 * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
877 * libbfd.h: Regenerate.
878 * bfd-in2.h: Regenerate.
880 * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
881 R_M32C_HI8, R_M32C_HI16.
882 (m32c_reloc_map): Likewise.
883 (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
885 2005-07-25 Jan Hubicka <jh@suse.cz>
886 H.J. Lu <hongjiu.lu@intel.com>
888 * elf-bfd.h (_bfd_elf_large_com_section): New.
889 * elf.c (_bfd_elf_large_com_section): New. Defined.
891 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
892 (elf64_x86_64_elf_section_from_bfd_section): New.
893 (elf64_x86_64_symbol_processing): New.
894 (elf64_x86_64_common_definition): New.
895 (elf64_x86_64_common_section_index): New.
896 (elf64_x86_64_common_section): New.
897 (elf64_x86_64_merge_symbol): New.
898 (elf64_x86_64_additional_program_headers): New.
899 (elf64_x86_64_special_sections): New.
900 (elf_backend_section_from_bfd_section): New. Defined.
901 (elf_backend_add_symbol_hook): Likewise.
902 (elf_backend_common_section_index): Likewise.
903 (elf_backend_common_section): Likewise.
904 (elf_backend_common_definition): Likewise.
905 (elf_backend_merge_symbol): Likewise.
906 (elf_backend_special_sections): Likewise.
907 (elf_backend_additional_program_headers): Likewise.
909 2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
911 * elf-bfd.h (elf_backend_data): Add common_definition,
912 common_section_index, common_section, and merge_symbol.
913 (_bfd_elf_common_definition): New.
914 (_bfd_elf_common_section_index): New.
915 (_bfd_elf_common_section): New.
917 * elf.c (elf_fake_sections): Don't clear sh_flags.
919 * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
921 (is_global_data_symbol_definition): Call backend
922 common_definition instead of checking SHN_COMMON.
923 (elf_link_add_object_symbols): Likewise.
924 (elf_link_output_extsym): Call backend common_section_index
925 for common section index.
926 (_bfd_elf_common_definition): New.
927 (_bfd_elf_common_section_index): New.
928 (_bfd_elf_common_section): New.
930 * elfxx-target.h (elf_backend_common_definition): New.
931 (elf_backend_common_section_index): New.
932 (elf_backend_common_section): New.
933 (elf_backend_merge_symbol): New.
934 (elfNN_bed): Initialize common_definition, common_section_index,
935 common_section, and merge_symbol.
937 * section.c (BFD_FAKE_SECTION): New.
938 (STD_SECTION): Use it.
939 * bfd-in2.h: Regenerated.
941 2005-07-23 Olaf Hering <olh@suse.de>
943 * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
946 2005-07-21 Ralf Corsepius <ralf.corsepius@rtems.org>
948 * config.bfd: Remove i[3-7]86-*-rtemself*.
949 Remove sparc-*-rtemself*.
951 2005-07-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
953 * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
956 2005-07-21 Ben Elliston <bje@gnu.org>
958 * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
959 (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
960 (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
961 (cf-m68klynx.lo, m68klynx.lo): Remove targets.
962 * Makefile.in: Regenerate.
963 * cf-m68klynx.c: Remove.
964 * m68klynx.c: Likewise.
965 * configure.in (m68klynx_aout_vec): Remove vector.
966 (m68klynx_coff_vec): Likewise.
967 * configure: Regenerate.
968 * targets.c (m68klynx_aout_vec): Remove extern.
969 (m68klynx_coff_vec): Likewise.
970 (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
971 * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
973 2005-07-20 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
975 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
976 (m32r_reloc_map): Likewise.
977 (m32r_elf_relocate_section): Likewise.
978 (m32r_elf_gc_sweep_hook): Likewise.
979 (m32r_elf_check_relocs): Likewise.
981 2005-07-18 Nick Clifton <nickc@redhat.com>
983 * reloc.c: Add M32C and MS1 relocs.
984 * bfd-in2.h: Regenerate.
985 * libbfd.h: Regenerate.
987 2005-07-18 Nick Clifton <nickc@redhat.com>
989 * config.bfd: Move m32c entry to correct location.
990 * archures.c: Likewise.
991 * configure.in: Likewise.
992 * configure: Regenerate.
993 * targets.c: Move ms1 vector to correct location.
995 2005-07-18 Jan Beulich <jbeulich@novell.com>
997 * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
999 * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
1000 handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
1002 2005-07-16 Eric Botcazou <ebotcazou@libertysurf.fr>
1006 * elflink.c (elf_link_add_object_symbols): Also append the version
1007 name to non-hidden absolute symbols that are functions.
1009 2005-07-16 Alan Modra <amodra@bigpond.net.au>
1011 * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void. Remove hack
1012 for zero size sections. Don't set .sbss syms here.
1013 * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
1015 2005-07-16 Alan Modra <amodra@bigpond.net.au>
1017 * Makefile.am: Run "make dep-am".
1018 * Makefile.in: Regenerate.
1020 2005-07-15 Bob Wilson <bob.wilson@acm.org>
1022 * elf32-xtensa.c (vsprint_msg): Add prototype.
1023 (build_encoding_error_message): Delete. Code moved into....
1024 (elf_xtensa_do_reloc): ....here, and changed to give better
1025 error messages for out of range literals.
1027 2005-07-15 Alan Modra <amodra@bigpond.net.au>
1029 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
1030 (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
1031 defined in output sections. Call bfd_elf_record_link_assignment.
1032 * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
1033 * bfd-in2.h: Regenerate.
1035 2005-07-14 Jim Blandy <jimb@redhat.com>
1037 Add support for m32c-*-elf (Renesas m32c and m16c).
1038 * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
1039 (ALL_MACHINES_CFILES): Add cpu-m32c.c.
1040 (BFD32_BACKENDS): Add elf32-m32c.lo.
1041 (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
1042 (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
1043 * Makefile.in: Regenerated.
1044 * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
1045 arch and mach codes.
1046 (bfd_m32c_arch): New arch info object.
1047 (bfd_archures_list): List bfd_m32c_arch.
1048 * bfd-in2.h: Regenerated.
1049 * config.bfd: Add case for the m32c.
1050 * configure.in: Add case for the m32c.
1051 * configure: Regenerated.
1052 * cpu-m32c.c, elf32-m32c.c: New files.
1053 * libbfd.h: Regenerated.
1054 * targets.c (bfd_elf32_m32c_vec): Declare.
1055 (_bfd_target_vector): List bfd_elf32_m32c_vec.
1057 2005-07-14 Alan Modra <amodra@bigpond.net.au>
1059 * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
1060 (_bfd_elf_provide_section_bound_symbols): Remove param name.
1062 * bfd-in2.h: Regenerate.
1063 * elflink.c (bfd_elf_gc_sections): Don't call generic function.
1064 (_bfd_elf_provide_symbol): Formatting.
1065 (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
1066 create section relative syms.
1067 (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
1068 * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
1069 _bfd_elf_provide_section_bound_symbols.
1070 * reloc.c (bfd_mark_used_section): Delete.
1071 (bfd_generic_gc_sections): Don't call the above.
1073 2005-07-14 Paul Woegerer <paul.woegerer@nsc.com>
1076 * cache.c (bfd_last_cache): Initialise to NULL.
1078 2005-07-14 Daniel Marques <marques@cs.cornell.edu>
1079 Nick Clifton <nickc@redhat.com>
1081 * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
1082 Alpha binaries and issue a helpful error message.
1083 (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
1084 symbol index to 15 to allow for binaries produced by DEC
1087 2005-07-13 Steve Ellcey <sje@cup.hp.com>
1089 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
1091 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1093 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
1096 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1098 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
1100 2005-07-12 Alan Modra <amodra@bigpond.net.au>
1102 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
1104 2005-07-11 H.J. Lu <hongjiu.lu@intel.com>
1106 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
1109 2005-07-08 Paul Koning <pkoning@equallogic.com>
1111 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
1112 where addresses are sign extended.
1114 2005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
1116 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
1117 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
1118 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
1119 sparc*-*-rtemsaout* as removed
1121 2005-07-08 Alan Modra <amodra@bigpond.net.au>
1123 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
1124 of the usual sections are found.
1125 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
1126 Strip .dynbss if it is zero size.
1127 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
1128 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
1129 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1130 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
1132 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
1133 when it is zero size.
1134 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
1135 of .dynbss and zero size sections.
1136 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
1138 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
1139 .dynbss if zero size.
1140 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
1142 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1143 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1144 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
1145 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
1146 .plt.* and .got.plt.* if zero size.
1147 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
1148 .got* and .dynbss if zero size.
1149 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
1150 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
1151 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
1153 (create_got_section): Always create new .got and .rela.got sections.
1154 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
1155 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1156 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
1157 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
1158 dynamic bss sections correctly.
1159 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
1160 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
1161 .dynbss if zero size.
1163 2005-07-08 Ben Elliston <bje@au.ibm.com>
1165 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
1166 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
1168 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
1170 * elf-bfd.h (elf_backend_data): Add special_sections.
1172 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
1175 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
1176 (elf_backend_special_sections): New. Defined.
1177 * elf32-m32r.c: Likewise.
1178 * elf32-m68hc11.c: Likewise.
1179 * elf32-m68hc12.c: Likewise.
1180 * elf32-mcore.c: Likewise.
1181 * elf32-sh64.c: Likewise.
1182 * elf32-v850.c: Likewise.
1183 * elf32-xtensa.c: Likewise.
1184 * elf64-alpha.c: Likewise.
1185 * elf64-hppa.c: Likewise.
1186 * elf64-ppc.c: Likewise.
1187 * elf64-sh64.c: Likewise.
1188 * elfxx-ia64.c: Likewise.
1189 * elfxx-mips.c: Likewise.
1190 * elfxx-mips.h: Likewise.
1192 * elfxx-target.h (elf_backend_special_sections): New.
1193 (elfNN_bed): Initialize special_sections.
1195 2005-07-07 Bob Wilson <bob.wilson@acm.org>
1197 * xtensa-modules.c: Update tables with Xtensa MMU features.
1199 2005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1201 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
1203 * vms.h (_bfd_vms_debug): Add format attribute.
1204 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
1206 2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
1209 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
1210 symbol with default visibility is local.
1212 2005-07-07 Ben Elliston <bje@gnu.org>
1214 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
1216 2005-07-06 H.J. Lu <hongjiu.lu@intel.com>
1218 * dwarf2.c (varinfo): Add addr.
1219 (lookup_symbol_in_variable_table): Also check addr.
1220 (scan_unit_for_symbols): Set addr for variable.
1221 (comp_unit_find_line): Updated.
1223 2005-07-06 Nick Clifton <nickc@redhat.com>
1225 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
1226 message if an unknown reloc is encountered.
1227 (alpha_relocate_section): Likewise.
1229 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
1230 with a missing howto field.
1232 2005-07-06 Alan Modra <amodra@bigpond.net.au>
1234 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
1237 2005-07-05 Paul Brook <paul@codesourcery.com>
1239 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
1240 (ppc_elf_vxworks_get_sec_type_attr): New function.
1241 (elf_backend_special_sections): Remove vxwords definition.
1242 (elf_backend_get_sec_type_attr): Define for vxworks.
1244 2005-07-05 Nick Clifton <nickc@redhat.com>
1246 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
1248 2005-07-05 Paul Brook <paul@codesourcery.com>
1250 * config.bfd: Add separate case for ppc-vxworks.
1251 * configure: Regenerate.
1252 * configure.in: Include elf-vxworks.lo on ppc targets.
1253 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
1255 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
1256 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
1257 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
1258 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
1259 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
1260 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
1261 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
1262 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
1263 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
1264 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
1265 (ppc_elf_create_got): Create .got.plt for VxWorks.
1266 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
1267 section for VxWorks.
1268 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
1269 (allocate_got): VxWorks does not need a got header.
1270 (allocate_dynrelocs): Handle VxWorks plt format.
1271 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
1272 VxWorks. Handle VxWorks plt/got.
1273 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
1274 (ppc_elf_vxworks_special_sections): New.
1275 (ppc_elf_vxworks_link_hash_table_create,
1276 ppc_elf_vxworks_add_symbol_hook,
1277 elf_i386_vxworks_link_output_symbol_hook,
1278 ppc_elf_vxworks_final_write_processing): New functions.
1279 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
1280 (_bfd_target_vector): Use it.
1282 2005-07-05 Jakub Jelinek <jakub@redhat.com>
1284 * libbfd-in.h (struct artdata): Add extended_names_size field.
1285 * libbfd.h: Rebuilt.
1286 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
1287 allocated object by bfd_zalloc.
1288 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
1289 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
1290 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
1291 (get_extended_arelt_filename): Fail if index is bigger or equal to
1292 extended_names_size.
1293 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
1294 get_extended_arelt_filename already did that.
1295 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
1296 Allocate one extra byte and clear it, in case extended names table
1299 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
1300 bfd_zalloc2): New prototypes.
1301 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
1302 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
1303 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
1304 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
1305 elf_map_symbols, map_sections_to_segments,
1306 assign_file_positions_for_segments, copy_private_bfd_data,
1307 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
1309 * bfd-in2.h: Rebuilt.
1310 * libbfd.h: Rebuilt.
1312 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
1313 verdef or verneed section.
1314 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
1315 verneed sections gracefully.
1316 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
1317 bogus relocation values.
1318 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
1319 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
1320 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
1321 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
1322 * elfxx-ia64.c (lookup_howto): Likewise.
1324 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
1325 the end of strtab and clear it.
1328 2005-07-05 Nick Clifton <nickc@redhat.com>
1330 * po/vi.po: New Vietnamese translation.
1331 * configure.in (ALL_LINGUAS): Add vi.
1332 * configure: Regenerate.
1334 2005-07-05 Peter S. Mazinger <ps.m@gmx.net>
1336 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
1337 touchup logic like i386/ppc.
1339 2005-07-05 Alan Modra <amodra@bigpond.net.au>
1341 * elf.c (special_sections): Move const qualifier.
1342 (special_sections_b..special_sections_t): Likewise.
1343 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
1345 (elf32_arm_symbian_special_sections): Move const qualifier.
1346 * elf32-m32r.c: Similarly.
1347 * elf32-m68hc11.c: Similarly.
1348 * elf32-m68hc12.c: Similarly.
1349 * elf32-mcore.c: Similarly.
1350 * elf32-ppc.c: Similarly.
1351 * elf32-sh64.c: Similarly.
1352 * elf32-v850.c: Similarly.
1353 * elf32-xtensa.c: Similarly.
1354 * elf64-alpha.c: Similarly.
1355 * elf64-hppa.c: Similarly.
1356 * elf64-ppc.c: Similarly.
1357 * elf64-sh64.c: Similarly.
1358 * elfxx-ia64.c: Similarly.
1359 * elfxx-mips.c: Similarly.
1361 2005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1363 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
1364 info->executable instead of !info->shared where appropriate.
1366 2005-07-04 Alan Modra <amodra@bigpond.net.au>
1369 * elf.c (assign_file_positions_for_segments): Remove excluded
1370 sections from the segment map.
1372 2005-07-04 Alan Modra <amodra@bigpond.net.au>
1375 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
1377 (_bfd_elf_get_special_section): Declare.
1378 (bfd_elf_special_section): Update prototype.
1379 * elf.c (special_sections): Remove unused outer entries.
1380 (get_special_section): Delete.
1381 (_bfd_elf_get_special_section): New function.
1382 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
1383 special_sections indexing.
1384 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
1385 * elf32-arm.c (symbian_special_sections_d): Delete.
1386 (symbian_special_sections_g, symbian_special_sections_h): Delete.
1387 (symbian_special_sections_i, symbian_special_sections_f): Delete.
1388 (symbian_special_sections_p): Delete.
1389 (elf32_arm_symbian_special_sections): Merge above to here.
1390 (elf32_arm_symbian_get_sec_type_attr): New function.
1391 (elf_backend_special_sections): Don't define.
1392 (elf_backend_get_sec_type_attr): Define.
1393 * elf32-m32r.c: Similarly to elf32-arm.c.
1394 * elf32-m68hc11.c: Likewise.
1395 * elf32-m68hc12.c: Likewise.
1396 * elf32-mcore.c: Likewise.
1397 * elf32-sh64.c: Likewise.
1398 * elf32-v850.c: Likewise.
1399 * elf32-xtensa.c: Likewise.
1400 * elf64-alpha.c: Likewise.
1401 * elf64-hppa.c: Likewise.
1402 * elf64-ppc.c: Likewise.
1403 * elf64-sh64.c: Likewise.
1404 * elfxx-ia64.c: Likewise.
1405 * elfxx-mips.c: Likewise.
1406 * elf32-ppc.c: Likewise.
1407 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
1408 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
1409 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
1410 (elf_backend_get_sec_type_attr): Define.
1411 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
1412 (elf_backend_special_sections): Don't define.
1413 (elfNN_bed): Update.
1415 2005-07-01 Nick Clifton <nickc@redhat.com>
1417 * cpu-d10v.c: Update to ISO C90 style function declarations and
1419 * cpu-d30v.c: Likewsie.
1420 * cpu-i370.c: Likewsie.
1421 * cpu-xstormy16.c: Likewsie.
1422 * elf32-arc.c: Likewsie.
1423 * elf32-d10v.c: Likewsie.
1424 * elf32-d30v.c: Likewsie.
1425 * elf32-dlx.c: Likewsie.
1426 * elf32-i370.c: Likewsie.
1427 * elf32-i960.c: Likewsie.
1428 * elf32-ip2k.c: Likewsie.
1429 * elf32-m32r.c: Likewsie.
1430 * elf32-mcore.c: Likewsie.
1431 * elf32-openrisc.c: Likewsie.
1432 * elf32-or32.c: Likewsie.
1433 * elf32-pj.c: Likewsie.
1434 * elf32-v850.c: Likewsie.
1435 * elf32-xstormy16.c: Likewsie.
1437 2005-07-01 Alan Modra <amodra@bigpond.net.au>
1439 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
1441 (elf64_alpha_create_dynamic_sections): Always make new sections
1442 by using bfd_make_section_anyway_with_flags. Check that .got not
1444 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
1447 2005-06-30 Alan Modra <amodra@bigpond.net.au>
1449 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
1450 _SDA_BASE_ and _SDA2_BASE_ symbols.
1451 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
1452 sym if not def_regular.
1453 (_bfd_elf_provide_section_bound_symbols): Similarly.
1455 2005-06-30 Ben Elliston <bje@gnu.org>
1457 * config.bfd: Mark as obsolete:
1462 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1464 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
1465 .eh_frame specially..
1466 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
1467 Don't recheck sections we have already marked.
1468 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
1469 * section.c (struct bfd_section): Add gc_mark_from_eh.
1470 (STD_SECTION): Adjust.
1471 * ecoff.c (bfd_debug_section): Adjust.
1472 * bfd-in2.h: Regenerate.
1474 2005-06-29 Alan Modra <amodra@bigpond.net.au>
1476 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
1477 not been processed by check_relocs.
1479 2005-06-29 Paul Brook <paul@codesourcery.com>
1481 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
1482 * bfd-in2.h: Regenerate.
1483 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
1485 * elflink.c (bfd_elf_set_symbol): Add section argument.
1486 (_bfd_elf_provide_symbol): Ditto.
1487 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
1489 2005-06-27 Carlos O'Donell <carlos@systemhalted.org>
1491 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
1492 Use bh_root, and hh.
1493 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
1494 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
1495 (struct elf32_hppa_link_hash_table): Use etab and bstab.
1496 (stub_hash_newfunc): Use hh.
1497 (hppa_link_hash_newfunc): Use hsh_cache.
1498 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
1499 (elf32_hppa_link_hash_table_free): Use bstab.
1500 (hppa_stub_name): Use eh.
1501 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
1502 (hppa_add_stub): Use bstab.
1503 (hppa_type_of_stub): Use eh.
1504 (hppa_build_one_stub): Use hh and bh_root.
1505 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
1506 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
1507 (elf32_hppa_gc_sweep_hook): Use hdh_next.
1508 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
1509 (allocate_plt_static): Use etab.
1510 (allocate_dynrelocs): Use etab, and hdh_next.
1511 (readonly_dynrelocs): Use hdh_next.
1512 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
1513 (get_local_syms): Use eh, bstab, and hh.
1514 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
1515 (elf32_hppa_set_gp): Use etab.
1516 (elf32_hppa_build_stubs): Use bstab.
1517 (final_link_relocate): Use eh, bh_root.
1518 (elf32_hppa_relocate_section): Use elf, etab.
1519 (elf32_hppa_finish_dynamic_sections): Use etab.
1521 2005-06-27 H.J. Lu <hongjiu.lu@intel.com>
1523 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
1526 2005-06-21 Carlos O'Donell <carlos@systemhalted.org>
1528 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
1529 (hppa_stub_hash_entry): Define.
1530 (stub_hash_newfunc): Rename variables.
1531 (hppa_link_hash_newfunc): Likewise.
1532 (elf32_hppa_link_hash_table_free): Likewise.
1533 (hppa_stub_name): Likewise.
1534 (hppa_get_stub_entry): Likewise.
1535 (hppa_add_stub): Likewise.
1536 (hppa_type_of_stub): Likewise.
1537 (hppa_build_one_stub): Likewise.
1538 (hppa_size_one_stub): Likewise.
1539 (elf32_hppa_create_dynamic_sections): Likewise.
1540 (elf32_hppa_copy_indirect_symbol): Likewise.
1541 (elf32_hppa_check_relocs): Likewise.
1542 (elf32_hppa_gc_mark_hook): Likewise.
1543 (elf32_hppa_gc_sweep_hook): Likewise.
1544 (elf32_hppa_grok_psinfo): Likewise.
1545 (elf32_hppa_hide_symbol): Likewise.
1546 (elf32_hppa_adjust_dynamic_symbol): Likewise.
1547 (allocate_dynrelocs): Likewise.
1548 (clobber_millicode_symbols): Likewise.
1549 (readonly_dynrelocs): Likewise.
1550 (elf32_hppa_size_dynamic_sections): Likewise.
1551 (get_local_syms): Likewise.
1552 (elf32_hppa_size_stubs): Likewise.
1553 (hppa_record_segment_addr): Likewise.
1554 (final_link_relocate): Likewise.
1555 (elf32_hppa_relocate_section): Likewise.
1556 (elf32_hppa_finish_dynamic_symbol): Likewise.
1558 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1561 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
1563 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1564 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
1565 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1566 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
1567 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
1568 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
1569 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
1570 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1571 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
1572 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
1573 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1574 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1575 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
1576 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
1577 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
1578 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
1579 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
1580 * elf32-s390.c (elf_s390_check_relocs): Likewise.
1581 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1582 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1583 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1584 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
1585 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1586 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1587 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1588 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
1589 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1591 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1594 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
1597 2005-06-20 H.J. Lu <hongjiu.lu@intel.com>
1600 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
1601 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1603 2005-06-18 H.J. Lu <hongjiu.lu@intel.com>
1605 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
1606 BFD_RELOC_X86_64_GOTPC32.
1607 * bfd-in2.h: Regenerated.
1609 2005-06-17 Jakub Jelinek <jakub@redhat.com>
1611 * elf.c (bfd_section_from_shdr): Kill bogus warning.
1613 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
1614 symbol, relocation, group or versym sections.
1616 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
1618 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
1619 doesn't point into the section.
1621 2005-06-17 Jan Beulich <jbeulich@novell.com>
1623 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
1624 and BFD_RELOC_X86_64_GOTPC32.
1625 * libbfd.h (bfd_reloc_code_real_names): Likewise.
1626 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
1627 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1628 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
1629 and R_X86_64_GOTPC32.
1630 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
1631 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
1632 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
1633 (elf64_x86_64_relocate_section): Likewise.
1634 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
1636 2005-06-15 Mark Kettenis <kettenis@gnu.org>
1638 * archive.c: Include "libiberty.h".
1640 2005-06-15 Nick Clifton <nickc@redhat.com>
1642 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
1643 produced by the GreenHills toolchain can be assimilated.
1645 2005-06-14 Steve Ellcey <sje@cup.hp.com>
1647 * som.c (som_find_inliner_info): New.
1649 2005-06-14 H.J. Lu <hongjiu.lu@intel.com>
1651 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
1653 2005-06-14 Jakub Jelinek <jakub@redhat.com>
1655 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1656 Prevent endless recursion on broken objects.
1658 * archive.c (do_slurp_coff_armap): Check for overflows.
1660 2005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
1662 * elfcode.h (elf_write_relocs): Do nothing if there are no
1665 2005-06-10 Alan Modra <amodra@bigpond.net.au>
1667 * dwarf2.c (decode_line_info): Revert last change. Instead set
1668 initial low_pc to -1 to avoid need to test whether loc_pc has
1671 2005-06-09 Christopher Faylor <cgf@timesys.com>
1673 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1674 either SEC_ALLOC OR SEC_LOAD.
1676 2005-06-09 Christopher Faylor <cgf@timesys.com>
1678 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1679 section header. Do not add STYP_NOLOAD since it does not appear to be
1682 2005-06-09 H.J. Lu <hongjiu.lu@intel.com>
1685 * dwarf2.c (lookup_address_in_line_info_table): Restore code
1686 handling NULL function info, removed with 2005-04-03 change.
1688 2005-06-08 Mark Mitchell <mark@codesourcery.com>
1690 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1692 2005-06-09 Alan Modra <amodra@bigpond.net.au>
1694 * elflink.c (elf_mark_used_section): Delete.
1695 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1696 * reloc.c (bfd_mark_used_section): New function.
1697 (bfd_generic_gc_sections): Call bfd_mark_used_section.
1699 2005-06-08 Alan Modra <amodra@bigpond.net.au>
1701 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1702 (bfd_fdopenr): Same.
1704 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1706 * opncls.c (bfd_fdopenr): Add missing break statements.
1708 2005-06-07 Mark Mitchell <mark@codesourcery.com>
1710 * opncls.c (bfd_fopen): New API.
1711 (bfd_openr): Use it.
1712 (bfd_fdopenr): Likewise.
1713 * bfd-in2.h: Regenerated.
1715 2005-06-07 Aldy Hernandez <aldyh@redhat.com>
1716 Michael Snyder <msnyder@redhat.com>
1717 Stan Cox <scox@redhat.com>
1719 * Makefile.am (ALL_MACHINES): Add ms1 support.
1720 (ALL_MACHINES_CFILES): Same.
1721 (BFD32_BACKENDS): Same.
1722 (BFD32_BACKENDS_CFILES): Same.
1724 * Makefile.in: Regenerate.
1726 * archures.c (bfd_architecture): Add ms1 entries.
1727 Externalize bfd_ms1_arch.
1728 (bfd_archures_list): Add bfd_ms1_arch.
1730 * bfd-in2.h: Regenerate.
1732 * cpu-ms1.c: New file.
1734 * elf32-ms1.c: New file.
1736 * targets.c: Define extern of bfd_elf32_ms1_vec.
1737 Add bfd_elf32_ms1_vec to _bfd_target_vector.
1739 * configure.in: Add bfd_elf32_ms1_vec case.
1741 * configure: Regenerate.
1743 * config.bfd: Add ms1-*-elf to table.
1745 2005-06-07 Zack Weinberg <zack@codesourcery.com>
1747 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1749 2005-06-07 Alan Modra <amodra@bigpond.net.au>
1751 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1752 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1754 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1757 * bfd.c (bfd_find_line): New.
1759 * dwarf2.c (comp_unit): Add variable_table.
1760 (funcinfo): Add file, line, and sec.
1762 (lookup_symbol_in_function_table): New.
1763 (lookup_symbol_in_variable_table): New.
1764 (scan_unit_for_functions): Renamed to ...
1765 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1767 (comp_unit_find_nearest_line): Updated.
1768 (comp_unit_find_line): New.
1769 (_bfd_dwarf2_find_line): New.
1771 * elf-bfd.h (_bfd_elf_find_line): New.
1772 (_bfd_generic_find_line): New. Defined.
1774 * elf.c (_bfd_elf_find_line): New.
1776 * libbfd-in.h (_bfd_dwarf2_find_line): New.
1777 (_bfd_generic_find_line): New.
1779 * bfd-in2.h: Regenerated.
1780 * libbfd.h: Likewise.
1782 * libbfd.c (_bfd_generic_find_line): New.
1784 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1785 with _bfd_generic_find_line.
1786 (bfd_target): Add _bfd_find_line.
1788 2005-06-06 H.J. Lu <hongjiu.lu@intel.com>
1790 * dwarf2.c (decode_line_info): Properly set low_pc.
1792 2005-06-06 Alan Modra <amodra@bigpond.net.au>
1794 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1795 case, include addend when indexing .opd section map.
1796 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
1797 clear opd_adjust array if no_opd_opt set. Tidy code.
1798 Ignore zero size .opd. Check bfd_alloc return value.
1799 (ppc_stub_name): Return immediately on bfd_malloc fail.
1800 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1802 2005-06-04 H.J. Lu <hongjiu.lu@intel.com>
1804 * dwarf2.c (comp_unit): Fix a typo in comment.
1806 2005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
1808 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1809 (reloc_type_lookup): Dito.
1810 (elf_vax_discard_copies): Dito.
1811 (elf_vax_instantiate_got_entries): Dito.
1812 (elf_vax_link_hash_traverse): Dito.
1813 (elf_vax_link_hash_newfunc): Dito.
1814 (elf_vax_link_hash_table_create): Dito.
1815 (elf32_vax_set_private_flags): Dito.
1816 (elf32_vax_merge_private_bfd_data): Dito.
1817 (elf32_vax_print_private_bfd_data): Dito.
1818 (elf_vax_check_relocs): Dito.
1819 (elf_vax_gc_mark_hook): Dito.
1820 (elf_vax_gc_sweep_hook): Dito.
1821 (elf_vax_size_dynamic_sections): Dito.
1822 (elf_vax_discard_copies): Dito.
1823 (elf_vax_instantiate_got_entries): Dito.
1824 (elf_vax_relocate_section): Dito.
1825 (elf_vax_finish_dynamic_symbol): Dito.
1826 (elf_vax_finish_dynamic_sections): Dito.
1827 (elf_vax_hash_table): Break-up of line isn't needed.
1828 (elf_vax_check_relocs): Remove leading whitespace
1829 (elf_vax_relocate_section): Remove redundant whitespace
1830 (elf_vax_link_hash_newfunc): Don't cast NULL.
1831 (elf_vax_link_hash_table_create): Dito.
1832 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1834 2005-06-03 Alan Modra <amodra@bigpond.net.au>
1837 * configure.in: Bump version
1838 * configure: Regenerate.
1839 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1840 discarded section sym refs and kill linker output.
1841 * simple.c (simple_dummy_einfo): New function.
1842 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1844 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1845 for all reloc types.
1847 2005-06-02 Alan Modra <amodra@bigpond.net.au>
1849 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1850 restrictive of func code and func descr for undefined syms as well
1853 2005-05-31 Jim Blandy <jimb@redhat.com>
1855 * Makefile.am: Regenerate dependencies with 'make dep-am'.
1856 * Makefile.in: Regenerate.
1858 2005-05-31 Richard Henderson <rth@redhat.com>
1860 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1861 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1862 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1863 (elf64_alpha_want_plt): Update to match.
1864 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1865 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
1867 2005-05-31 Zack Weinberg <zack@codesourcery.com>
1869 * elf32-arm.c (elf32_arm_reloc_type_lookup)
1870 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1871 Use ISO C90 function declaration style.
1873 2005-05-31 James E Wilson <wilson@specifixinc.com>
1875 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1876 header PF_R flag on PT_LOAD segments.
1878 2005-05-30 Richard Henderson <rth@redhat.com>
1880 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1881 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1883 2005-05-29 Richard Henderson <rth@redhat.com>
1885 * configure.in (--enable-secureplt): New.
1886 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1887 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1888 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1889 (elf64_alpha_use_secureplt): New.
1890 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1891 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1892 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1893 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1894 (struct alpha_elf_link_hash_entry): Add plt_offset.
1895 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1896 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1897 (PLT_ENTRY_WORD3): Remove.
1898 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1899 on .plt and create .got.plt.
1900 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1901 (get_got_entry): Initialize plt_offset.
1902 (elf64_alpha_want_plt): New.
1903 (elf64_alpha_check_relocs): Use it.
1904 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
1906 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1907 error as user error.
1908 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1910 (elf64_alpha_size_plt_section): Size .got.plt section.
1911 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1913 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1914 Add PLTRO DYNAMIC entry.
1915 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1916 (elf64_alpha_finish_dynamic_sections): Likewise.
1918 2005-05-28 David Daney <ddaney@avtrex.com>
1920 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
1921 calculation of DT_RELSZ to occur after all dynamic relocations
1924 2005-05-28 Eli Zaretskii <eliz@gnu.org>
1926 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1927 * config.in, configure: Regenerate.
1929 2005-05-26 Mark Kettenis <kettenis@gnu.org>
1930 Maciej W. Rozycki <macro@linux-mips.org>
1932 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1933 stop processing of options if one of invalid size is
1935 (_bfd_mips_elf_section_from_shdr): Likewise.
1936 (_bfd_mips_elf_fake_sections): Reset the type of empty special
1939 2005-05-26 Richard Henderson <rth@redhat.com>
1941 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
1942 plt_old_section, plt_old_value.
1943 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1944 (elf64_alpha_size_plt_section_1): Don't use it.
1946 2005-05-26 Jakub Jelinek <jakub@redhat.com>
1948 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1949 first shdr has sh_size == 0. Fail if e_shnum is large to cause
1950 arithmetic overflow when allocating the i_shdr array.
1951 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
1953 2005-05-25 Richard Henderson <rth@redhat.com>
1955 * elf64-alpha.c: Update all function definitions to ISO C. Remove
1956 all function prototypes; rearrange functions into def-use order.
1958 2005-05-25 Richard Henderson <rth@redhat.com>
1960 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1961 in the presence of deleting elements.
1962 (elf64_alpha_size_got_sections): Zero dead got section size.
1964 2005-05-23 Fred Fish <fnf@specifixinc.com>
1966 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1967 (struct funcinfo): Add caller_func, caller_file, caller_line.
1968 tag, and nesting_level members.
1969 (lookup_address_in_function_table): Change first passed parameter
1970 from "struct funcinfo *" to "struct comp_unit *".
1971 (lookup_address_in_function_table): Dereference unit to find function
1973 (lookup_address_in_function_table): Traverse the function list to
1974 create a chain of inlined functions back to the first non inlined
1976 (scan_unit_for_functions): Remember tag and nesting level. Handle
1977 DW_AT_call_file and DW_AT_call_line.
1978 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1979 call to pass unit pointer instead of function table pointer. For
1980 inlined functions, save pointer to the inliner chain.
1981 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1982 (_bfd_dwarf2_find_inliner_info): New function that returns information
1983 from the inliner chain after a call to bfd_find_nearest_line.
1985 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1986 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1987 NAME##_find_inliner_info.
1988 (bfd_target): Add _bfd_find_inliner_info.
1989 * bfd-in2.h: Regenerate.
1991 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1992 macro that always returns bfd_false.
1993 (_bfd_dwarf2_find_inliner_info): Declare.
1994 * libbfd.h: Regenerate.
1996 * elf32-arm.c (elf32_arm_find_inliner_info): New function
1997 that calls _bfd_dwarf2_find_inliner_info.
1998 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
2000 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
2001 that calls _bfd_dwarf2_find_inliner_info.
2002 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
2003 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
2004 _bfd_mips_elf_find_inliner_info.
2005 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
2006 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
2008 * elf.c (_bfd_elf_find_inliner_info): New function that calls
2009 _bfd_dwarf2_find_inliner_info.
2010 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
2011 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
2012 _bfd_elf_find_inliner_info.
2014 * coffgen.c (coff_find_inliner_info): New function that
2015 calls _bfd_dwarf2_find_inliner_info.
2016 * libcoff-in.h (coff_find_inliner_info): Declare.
2017 * libcoff.h: Regenerate.
2018 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
2019 (pmac_xcoff_vec) Ditto.
2020 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
2021 (aix5coff64_vec): Ditto.
2023 * aout-target.h (MY_find_inliner_info): Define as
2024 _bfd_nosymbols_find_inliner_info.
2025 * aout-tic30.c (MY_find_inliner_info): Ditto.
2026 * binary.c (binary_find_inliner_info): Ditto.
2027 * i386msdos.c (msdos_find_inliner_info): Ditto.
2028 * ihex.c (ihex_find_inliner_info): Ditto.
2029 * libaout.h (aout_32_find_inliner_info): Ditto.
2030 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
2031 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
2032 * mmo.c (mmo_find_inliner_info): Ditto.
2033 * nlm-target.h (nlm_find_inliner_info): Ditto.
2034 * pef.c (bfd_pef_find_inliner_info): Ditto.
2035 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
2036 * srec.c (srec_find_inliner_info): Ditto.
2037 * tekhex.c (tekhex_find_inliner_info): Ditto.
2038 * versados.c (versados_find_inliner_info): Ditto.
2039 * xsym.c (bfd_sym_find_inliner_info): Ditto.
2041 * ieee.c (ieee_find_inliner_info): New function that always
2043 * oasys.c (oasys_find_inliner_info): Ditto.
2044 * vms.c (vms_find_inliner_info): Ditto.
2046 2005-05-24 Alan Modra <amodra@bigpond.net.au>
2048 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
2049 force old plt layout.
2051 2005-05-22 Richard Henderson <rth@redhat.com>
2053 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
2055 (elf64_alpha_check_relocs): Likewise.
2056 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
2057 non-allocated sections.
2059 2005-05-22 Richard Henderson <rth@redhat.com>
2061 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
2062 undefweak to use zero register. Call elf64_alpha_relax_got_load
2063 if not all uses removed.
2064 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
2065 (elf64_alpha_relax_section): Handle undefweak symbols.
2066 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
2067 (elf64_alpha_size_rela_got_1): Likewise.
2068 (elf64_alpha_relocate_section): Likewise.
2070 2005-05-22 Richard Henderson <rth@redhat.com>
2072 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
2073 on SEC_CODE sections.
2075 2005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2077 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
2079 (som_write_space_strings): Change type of tmp_space and p to char *.
2080 (som_write_symbol_strings): Likewise. Also change type of comp to
2082 (som_begin_writing): Change type of strings_size to unsigned int.
2083 (som_finish_writing): Likewise.
2084 (som_slurp_reloc_table): Change type of external_relocs to unsigned
2086 * som.h (struct som_section_data_struct): Change type of reloc_stream
2087 field to unsigned char *.
2089 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
2091 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
2092 copy relocations for VxWorks.
2094 2005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
2096 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
2098 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
2099 (ppc_elf_check_relocs): Set has_sda_refs.
2100 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
2101 copy relocations. Use has_sda_refs to place variables in .sbss.
2102 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
2105 2005-05-20 Bob Wilson <bob.wilson@acm.org>
2107 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
2108 xtensa_default_isa is initialized.
2110 2005-05-20 Alan Modra <amodra@bigpond.net.au>
2112 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
2113 for second and subsequent list entries. Only allocate multiple
2114 glink stubs when shared or pie.
2115 (ppc_elf_finish_dynamic_symbol): Break out early when only one
2116 glink stub is needed.
2118 2005-05-19 Zack Weinberg <zack@codesourcery.com>
2120 * Makefile.am: Have 'all' depend on 'info'.
2121 * Makefile.in: Regenerate.
2123 2005-05-19 Alan Modra <amodra@bigpond.net.au>
2125 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
2126 init_offset. Add init_got_refcount, init_plt_refcount,
2127 init_got_offset and init_plt_offset.
2128 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
2129 (_bfd_elf_link_hash_hide_symbol): Likewise.
2130 (_bfd_elf_link_hash_table_init): Likewise.
2131 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2132 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2133 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
2134 (bfd_elf_size_dynamic_sections): Likewise.
2135 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
2136 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
2137 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
2138 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
2139 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
2140 (struct plt_entry): New.
2141 (ppc_elf_link_hash_table_create): Set new init_plt fields.
2142 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
2143 use _bfd_elf_link_hash_copy_indirect.
2144 (update_plt_info, find_plt_ent): New functions.
2145 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
2146 and adjust for use of plt list rather than refcount.
2147 (ppc_elf_gc_sweep_hook): Likewise.
2148 (ppc_elf_tls_optimize): Likewise.
2149 (ppc_elf_adjust_dynamic_symbol): Likewise.
2150 (allocate_dynrelocs): Likewise.
2151 (ppc_elf_relax_section): Likewise.
2152 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
2153 when performing a relocatable link.
2154 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
2155 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
2158 2005-05-19 Alan Modra <amodra@bigpond.net.au>
2160 * elf.c (assign_file_positions_for_segments): Use maximum of
2161 maxpagesize and section alignment when adjusting initial
2162 segment offset and section offsets.
2164 2005-05-18 Zack Weinberg <zack@codesourcery.com>
2166 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
2169 2005-05-18 H.J. Lu <hongjiu.lu@intel.com>
2171 * elf.c (group_signature): Undo the last change. Check if the
2172 symbol table section is correct.
2174 2005-05-17 Zack Weinberg <zack@codesourcery.com>
2176 * elf32-arm.c: Wherever possible, use official reloc names
2178 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
2179 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
2180 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
2181 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
2182 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
2183 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
2184 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
2185 Add many new relocations from AAELF.
2186 (elf32_arm_howto_from_type): Update to match.
2187 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
2188 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
2189 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
2190 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
2191 (elf32_arm_final_link_relocate): Add support for
2192 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
2193 case entries redundant with default.
2195 * reloc.c: Reorganize ARM relocations. Add Thumb
2196 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
2197 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
2198 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
2199 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
2200 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
2201 * bfd-in2.h, libbfd.h: Regenerate.
2203 2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
2205 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
2207 * format.c (bfd_check_format_matches): Set output_has_begun
2209 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
2210 special case for both_direction.
2212 2005-05-17 Nick Clifton <nickc@redhat.com>
2214 * elf.c (group_signature): Check for a group section which is
2215 actually a (corrupt) symbol table section in disguise and prevent
2216 an infinite loop from occurring.
2218 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2220 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
2223 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2225 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
2226 predicate on slot 0 only if slot 0 isn't br.
2228 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
2231 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
2232 empty sdynbss section.
2233 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
2235 2005-05-17 Tavis Ormandy <taviso@gentoo.org>
2237 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
2240 2005-05-17 Alan Modra <amodra@bigpond.net.au>
2242 * elf32-ppc.c (LIS_11. LIS_12): Define.
2243 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
2244 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
2245 for --data-plt when building non-pie executables.
2247 2005-05-17 Nick Clifton <nickc@redhat.com>
2249 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
2250 the situation where a symbols's section is not known but a section
2251 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
2254 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
2255 the presence of a symbol table to just before the symbol table is
2258 2005-05-16 H.J. Lu <hongjiu.lu@intel.com>
2261 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
2262 (elfNN_ia64_relax_section): Use it.
2264 2005-05-14 Mark Kettenis <kettenis@gnu.org>
2266 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
2269 2005-05-14 Alan Modra <amodra@bigpond.net.au>
2271 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
2273 (ppc_elf_finish_dynamic_sections): Likewise.
2275 2005-05-13 Fred Fish <fnf@specifixinc.com>
2277 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
2278 * libbfd.h: Rebuilt.
2280 2005-05-13 Bob Wilson <bob.wilson@acm.org>
2282 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
2283 periods in linkonce_kind values.
2285 2005-05-12 H.J. Lu <hongjiu.lu@intel.com>
2287 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
2288 against protected function when building executable.
2290 2005-05-12 Alan Modra <amodra@bigpond.net.au>
2292 * elf32-ppc.c (LWZU_0_X_11): Delete.
2293 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
2294 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
2295 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
2297 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
2299 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
2300 Generate .glink branch table and updated stubs.
2302 2005-05-11 Alan Modra <amodra@bigpond.net.au>
2304 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
2305 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
2306 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
2307 (CROR_151515, CROR_313131): Delete.
2308 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
2309 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
2310 LWZU_0_X_11): Define.
2311 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
2312 and R_PPC_REL16_HA entries.
2313 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
2314 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
2315 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
2316 new_plt, and old_plt.
2317 (ppc_elf_create_dynamic_sections): Create .glink section.
2318 (ppc_elf_check_relocs): Set new_plt and old_plt.
2319 (ppc_elf_select_plt_layout): New function.
2320 (ppc_elf_tls_setup): Set plt output section elf type and flags.
2321 (allocate_got): Handle differences between old and new got layout.
2322 (allocate_dynrelocs): Likewise for plt.
2323 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
2324 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
2325 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
2326 destination of R_PPC_PLTREL24 relocs.
2327 (ppc_elf_relocate_section): Handle new relocs and changed destination
2329 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
2330 differences in layout.
2331 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
2332 put a blrl in new got. Write glink contents.
2333 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
2334 * libbfd.h: Regenerate.
2335 * bfd-in2.h: Regenerate.
2337 2005-05-11 Andreas Schwab <schwab@suse.de>
2339 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
2342 2005-05-10 H.J. Lu <hongjiu.lu@intel.com>
2344 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
2345 section if SEC_ALLOC isn't set.
2347 2005-05-09 Kelley Cook <kcook@gcc.gnu.org>
2349 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
2350 * acinclude.m4: Don't sinclude accross.m4.
2351 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
2353 2005-05-09 Alan Modra <amodra@bigpond.net.au>
2355 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
2356 (ppc64_elf_add_symbol_hook): Set has_dotsym.
2357 (ppc64_elf_check_directives): Only process syms when has_dotsym.
2358 (func_desc_adjust): Hide fake function descriptors when function
2359 code entry is defined.
2360 (adjust_opd_syms): Adjust for deleted_section becoming union field.
2362 2005-05-09 Alan Modra <amodra@bigpond.net.au>
2364 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
2366 2005-05-08 Dave Korn <dave.korn@artimi.com>
2368 * coff-tic80.c: Undefine _CONST after system headers to prevent
2369 clash with tic80-specific definition in include/coff/tic80.h
2371 2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
2374 * elflink.c (elf_link_output_extsym): Use output_bfd if
2375 h->root.u.def.section is bfd_abs_section_ptr when reporting
2378 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
2380 * elf-bfd.h (elf_backend_data): Update special_sections to
2381 array of pointer to bfd_elf_special_section.
2382 * elf.c (special_sections): Likewise.
2383 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
2384 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
2385 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
2386 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
2387 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
2388 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
2389 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
2390 * elf32-v850.c (v850_elf_special_sections): Likewise.
2391 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
2392 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
2393 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
2394 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
2395 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
2396 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
2397 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
2398 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
2400 * elf.c (get_special_section): Updated.
2402 2005-05-07 Alan Modra <amodra@bigpond.net.au>
2404 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
2405 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
2406 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
2408 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
2409 * elf32-frv.c (_frv_create_got_section): Likewise.
2410 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
2411 (elf_backend_got_symbol_offset): Don't define.
2412 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
2413 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
2415 (ppc_elf_create_got): Tidy.
2416 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
2417 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
2418 (ppc_elf_gc_sweep_hook): Likewise.
2419 (ppc_elf_relocate_section): Likewise.
2420 (ppc_elf_finish_dynamic_symbol): Likewise.
2421 (allocate_got): New function.
2422 (allocate_dynrelocs): Use allocate_got.
2423 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
2424 so that local got can refcount it. Set got_header_size.
2425 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
2427 (ppc_elf_finish_dynamic_sections): Likewise.
2428 (elf_backend_got_symbol_offset): Don't define.
2429 (elf_backend_got_header_size): Ditto.
2431 2005-05-05 Steve Ellcey <sje@cup.hp.com>
2433 * configure.in (ACX_HEADER_STRING): New.
2434 * configure: Regenerate.
2435 * config.in: Regenerate.
2436 * sysdep.h (STRING_WITH_STRINGS): Use.
2438 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2440 * elf.c (_bfd_elf_close_and_cleanup): Only call
2441 _bfd_dwarf2_cleanup_debug_info on bfd_object.
2443 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2445 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
2446 "__bss_start" instead of "_edata" as fallback.
2448 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2450 * bfd-in2.h: Regenerated.
2452 2005-05-05 Paul Brook <paul@codesourcery.com>
2454 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
2455 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
2457 * configure: Regenerate.
2458 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
2459 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
2460 (elf32-i386.lo): Depend on elf-vxworks.h.
2461 (elf-vxworks.lo): New rule.
2462 * Makefile.in: Regenerate.
2463 * elf-bfd.h (elf_backend_data): Update type of
2464 elf_backend_emit_relocs.
2465 (_bfd_elf_link_output_relocs): Update prototype.
2466 * elflink.c (_bfd_elf_link_output_relocs): Always use
2467 bed->elf_backend_emit_relocs when outputting relocations.
2468 * elfxx-target.h (elf_backend_emit_relocs): Default to
2469 _bfd_elf_link_output_relocs.
2470 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
2471 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
2472 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
2473 (elf_i386_plt0_entry): Remove padding.
2474 (elf_i386_pic_plt0_entry): Ditto.
2475 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
2476 (PLT_NON_JUMP_SLOT_RELOCS): Define.
2477 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
2478 plt0_pad_byte fields.
2479 (elf_i386_link_hash_table_create): Zero them.
2480 (elf_i386_create_dynamic_sections): Create static relocation section.
2481 (allocate_dynrelocs): Allocate space for static PLT relocations.
2482 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
2483 symbols. Give PLT symbols function type. Don't strip PLT sections
2484 if we have exported symbols from them.
2485 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
2486 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
2488 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
2489 Add relocation for GOT location. Fill in PLT static relocations.
2490 (elf_i386_vxworks_link_hash_table_create): New function.
2491 (elf_i386_vxworks_link_output_symbol_hook): New function.
2492 * elf-vxworks.h: New file.
2494 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2496 * section.c (bfd_make_section_anyway_with_flags): New.
2497 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
2498 (bfd_make_section_with_flags): New.
2499 (bfd_make_section): Call bfd_make_section_with_flags.
2501 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
2502 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
2503 instead of bfd_make_section/bfd_make_section and don't call
2504 bfd_set_section_flags.
2505 (mn10300_elf_check_relocs): Likewise.
2506 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
2507 * elf32-arm.c (create_got_section): Likewise.
2508 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
2509 (elf32_arm_check_relocs): Likewise.
2510 * elf32-cris.c (cris_elf_check_relocs): Likewise.
2511 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
2512 (_frv_create_got_section): Likewise.
2513 (elf32_frvfdpic_create_dynamic_sections): Likewise.
2514 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2515 (elf32_hppa_check_relocs): Likewise.
2516 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
2517 (i370_elf_check_relocs): Likewise.
2518 * elf32-i386.c (create_got_section): Likewise.
2519 (elf_i386_check_relocs): Likewise.
2520 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2521 (create_got_section): Likewise.
2522 (m32r_elf_create_dynamic_sections): Likewise.
2523 (m32r_elf_check_relocs): Likewise.
2524 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2525 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2526 (ppc_elf_create_dynamic_sections): Likewise.
2527 (ppc_elf_add_symbol_hook): Likewise.
2528 (ppc_elf_check_relocs): Likewise.
2529 * elf32-s390.c (create_got_section): Likewise.
2530 (elf_s390_check_relocs): Likewise.
2531 * elf32-sh.c (create_got_section): Likewise.
2532 (sh_elf_create_dynamic_sections): Likewise.
2533 (sh_elf_check_relocs): Likewise.
2534 * elf32-vax.c (elf_vax_check_relocs): Likewise.
2535 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
2536 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2537 (add_extra_plt_sections): Likewise.
2538 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2539 (elf64_alpha_create_got_section): Likewise.
2540 (elf64_alpha_create_dynamic_sections): Likewise.
2541 (elf64_alpha_check_relocs): Likewise.
2542 * elf64-hppa.c (get_reloc_section): Likewise.
2543 (get_opd): Likewise.
2544 (get_plt): Likewise.
2545 (get_dlt): Likewise.
2546 (get_stub): Likewise.
2547 (elf64_hppa_create_dynamic_sectionso): Likewise.
2548 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
2549 * elf64-ppc.c (create_linkage_sections): Likewise.
2550 (ppc64_elf_check_relocs): Likewise.
2551 * elf64-s390.c (create_got_section): Likewise.
2552 (elf_s390_check_relocs): Likewise.
2553 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
2554 (sh64_elf64_create_dynamic_sections): Likewise.
2555 * elf64-x86-64.c (create_got_section): Likewise.
2556 (elf64_x86_64_check_relocs): Likewise.
2557 * elflink.c (_bfd_elf_create_got_section): Likewise.
2558 (_bfd_elf_link_create_dynamic_sections): Likewise.
2559 (elf_link_add_object_symbols): Likewise.
2560 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2561 (elfNN_ia64_create_dynamic_sections): Likewise.
2562 (get_fptr): Likewise.
2563 (get_pltoff): Likewise.
2564 (get_reloc_section): Likewise.
2565 (elfNN_ia64_object_p): Likewise.
2566 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
2567 (mips_elf_create_compact_rel_section): Likewise.
2568 (mips_elf_create_got_section): Likewise.
2569 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2570 * elfxx-sparc.c (create_got_section): Likewise.
2571 (_bfd_sparc_elf_check_relocs): Likewise.
2573 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
2574 on linker created sections.
2576 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
2579 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
2580 script on executable.
2582 2005-05-05 John Levon <levon@movementarian.org>
2584 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
2585 allocated memory before returning.
2586 (decode_line_info): Likewise.
2587 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
2588 allocated by functions in this file.
2589 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
2590 * elf.c (_bfd_elf_close_and_cleanup): Call
2591 _bfd_dwarf2_cleanup_debug_info.
2593 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2595 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
2596 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
2597 * configure, config.in, Makefile.in: Regenerate.
2598 * sysdep.h (stpcpy): Revert last change.
2600 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
2602 * sysdep.h (stpcpy): Wrap declaration in parentheses.
2604 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2606 * elfxx-ia64.c (ARCH_SIZE): New.
2607 (LOG_SECTION_ALIGN): Likewise.
2608 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
2609 align relocation sections.
2610 (get_fptr): Likewise.
2611 (get_reloc_section): Likewise.
2612 (elfNN_ia64_tprel_base): Likewise.
2613 (elfNN_ia64_check_relocs): Support 32bit relocations.
2614 (allocate_global_fptr_got): Likewise.
2615 (allocate_dynrel_entries): Likewise.
2616 (set_got_entry): Likewise.
2617 (set_pltoff_entry): Likewise.
2618 (elfNN_ia64_relocate_section): Likewise.
2620 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2622 * configure.in: Add AC_CHECK_DECLS(stpcpy).
2623 * configure: Regenerate.
2624 * config.in: Likewise.
2626 * sysdep.h (stpcpy): New.
2628 2005-05-04 Nick Clifton <nickc@redhat.com>
2630 * Update the address and phone number of the FSF organization in
2631 the GPL notices in the following files:
2632 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
2633 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
2634 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
2635 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
2636 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
2637 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
2638 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
2639 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
2640 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
2641 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
2642 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
2643 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
2644 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
2645 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
2646 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
2647 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
2648 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
2649 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
2650 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
2651 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
2652 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
2653 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2654 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2655 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2656 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2657 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2658 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2659 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2660 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2661 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2662 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2663 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2664 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2665 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2666 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2667 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2668 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2669 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2670 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2671 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2672 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2673 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2674 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2675 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2676 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2677 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2678 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2679 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2680 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2681 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2682 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2683 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2684 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2685 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2686 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2687 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2688 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2689 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2690 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2691 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2692 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2693 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2694 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2695 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2696 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2697 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2698 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2699 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2700 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2701 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2704 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2706 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2707 * bfd-in2.h: Regenerated.
2709 * elflink.c (bfd_elf_set_symbol): New.
2710 (_bfd_elf_provide_symbol): Call it.
2711 (_bfd_elf_provide_section_bound_symbols): New.
2713 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
2715 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2716 at the end, if a strong definition has already been seen.
2718 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2720 * section.c (struct bfd_section): Replace link_order_head and
2721 link_order_tail with map_head and map_tail union.
2722 (STD_SECTION): Update.
2723 (_bfd_strip_section_from_output): Delete.
2724 * aoutx.h: Update throughout for above changes.
2725 * coff-ppc.c: Likewise.
2726 * cofflink.c: Likewise.
2727 * ecoff.c: Likewise.
2728 * elf-eh-frame.c: Likewise.
2729 * elf-m10300.c: Likewise.
2731 * elf32-arm.c: Likewise.
2732 * elf32-cris.c: Likewise.
2733 * elf32-hppa.c: Likewise.
2734 * elf32-i386.c: Likewise.
2735 * elf32-m32r.c: Likewise.
2736 * elf32-m68hc1x.c: Likewise.
2737 * elf32-m68k.c: Likewise.
2738 * elf32-ppc.c: Likewise.
2739 * elf32-s390.c: Likewise.
2740 * elf32-sh.c: Likewise.
2741 * elf32-vax.c: Likewise.
2742 * elf32-xtensa.c: Likewise.
2743 * elf64-alpha.c: Likewise.
2744 * elf64-hppa.c: Likewise.
2745 * elf64-ppc.c: Likewise.
2746 * elf64-s390.c: Likewise.
2747 * elf64-sh64.c: Likewise.
2748 * elf64-x86-64.c: Likewise.
2749 * elflink.c: Likewise.
2750 * elfxx-ia64.c: Likewise.
2751 * elfxx-mips.c: Likewise.
2752 * elfxx-sparc.c: Likewise.
2753 * linker.c: Likewise.
2754 * merge.c: Likewise.
2755 * pdp11.c: Likewise.
2756 * xcofflink.c: Likewise.
2757 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2758 out from bfd_elf_size_dynamic_sections.
2759 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2760 * bfd-in2.h: Regenerate.
2762 2005-05-04 Alan Modra <amodra@bigpond.net.au>
2764 * section.c (bfd_section_list_remove): Don't clear s->next.
2765 (bfd_section_list_append): Always init s->prev.
2766 (bfd_section_list_prepend): Define.
2767 (bfd_section_list_insert_after): Minor optimization.
2768 (bfd_section_removed_from_list): Rewrite.
2769 * elf.c (assign_section_numbers): Simplify list traversal now that
2770 bfd_section_list_remove doesn't destroy removed section next ptr.
2771 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2772 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2773 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2774 * bfd-in2.h: Regenerate.
2776 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2778 * bfd.c (bfd): Remove section_tail and add section_last.
2779 (bfd_preserve): Likewise.
2780 (bfd_preserve_save): Likewise.
2781 (bfd_preserve_restore): Likewise.
2782 * opncls.c (_bfd_new_bfd): Likewise.
2784 * coffcode.h (coff_compute_section_file_positions): Updated.
2785 (coff_compute_section_file_positions): Likewise.
2786 * elf.c (assign_section_numbers): Likewise.
2787 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2788 * elf64-mmix.c (mmix_elf_final_link): Likewise.
2789 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2790 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2791 * sunos.c (sunos_add_dynamic_symbols): Likewise.
2792 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2794 * ecoff.c (bfd_debug_section): Initialize prev.
2796 * section.c (bfd_section): Add prev.
2797 (bfd_section_list_remove): Updated.
2798 (bfd_section_list_append): New.
2799 (bfd_section_list_insert_after): New.
2800 (bfd_section_list_insert_before): New.
2801 (bfd_section_list_insert): Removed.
2802 (bfd_section_removed_from_list): Updated.
2803 (STD_SECTION): Initialize prev.
2804 (bfd_section_init): Updated.
2805 (bfd_section_list_clear): Updated.
2807 * bfd-in2.h: Regenerated.
2809 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2811 * elf.c (_bfd_elf_new_section_hook): Don't call
2812 _bfd_elf_get_sec_type_attr on sections from input files.
2814 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
2816 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2817 hash table size 16699 instead of bfd_hash_table_init.
2819 2005-05-01 Paul Brook <paul@codesourcery.com>
2821 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2822 definition has already been seen.
2824 2005-05-01 Paul Brook <paul@codesourcery.com>
2826 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2827 R_ARM_PLT32 the same as R_ARM_PC24.
2828 (arm_add_to_rel): Ditto.
2830 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
2832 * config.bfd: Add h8300*-*-rtemscoff.
2833 Switch h8300*-*-rtems* to elf.
2835 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2837 * aclocal.m4, Makefile.in: Regnerated.
2839 2005-04-28 Paul Brook <paul@codesourcery.com>
2841 Merge changes only applied to Makefile.in.
2842 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2843 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2844 (elfxx-sparc.lo): New rule.
2845 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2846 (elf64-sparc.lo): Likewise.
2848 2005-04-28 Julian Brown <julian@codesourcery.com>
2850 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2853 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
2855 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2857 * elf.c (bfd_elf_sym_name): Updated.
2858 (group_signature): Likewise.
2859 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2860 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2861 (ppc64_elf_edit_toc): Likewise.
2862 (ppc64_elf_relocate_section): Likewise.
2863 * elfcode.h (elf_slurp_symbol_table): Likewise.
2864 * elflink.c (elf_link_input_bfd): Likewise.
2866 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2867 bfd_elf_sym_name to get local symbol name when reporting errors.
2869 2005-04-27 Nick Clifton <nickc@redhat.com>
2871 * elflink.c (elf_link_input_bfd): Handle the case where a badly
2872 formatted input file results in a reloc which has no associated
2875 2005-04-26 Jerome Guitton <guitton@gnat.com>
2877 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2879 2005-04-25 David S. Miller <davem@davemloft.net>
2881 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2882 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2883 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2886 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
2889 * elflink.c (elf_link_input_bfd): Make non-debugging reference
2890 to discarded section an error.
2892 2005-04-21 Jerome Guitton <guitton@gnat.com>
2894 * configure.in: Replace BFD_NEED_DECLARATION checks by the
2895 corresponding AC_CHECK_DECLS.
2896 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2898 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2899 * configure: Regenerate.
2902 2005-04-21 Andreas Schwab <schwab@suse.de>
2904 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2905 unsigned from type of dynamic_interpreter.
2906 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2909 * elf.c (assign_section_numbers): Fix comment.
2911 2005-04-21 Jerome Guitton <guitton@gnat.com>
2913 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2914 for struct som_exec_auxhdr fields.
2916 2005-04-21 Nick Clifton <nickc@redhat.com>
2918 * aout-adobe.c: Convert to ISO C and fix formatting.
2919 * aout-arm.c: Convert to ISO C and fix formatting.
2920 * aout-cris.c: Convert to ISO C and fix formatting.
2921 * aout-ns32k.c: Convert to ISO C and fix formatting.
2922 * aout-tic30.c: Convert to ISO C and fix formatting.
2923 * coffcode.h: Convert to ISO C and fix formatting.
2924 * coffswap.h: Convert to ISO C and fix formatting.
2925 * i386aout.c: Convert to ISO C and fix formatting.
2926 * libaout.h: Convert to ISO C and fix formatting.
2927 * libcoff-in.h: Convert to ISO C and fix formatting.
2928 * libcoff.h: Convert to ISO C and fix formatting.
2929 * libecoff.h: Convert to ISO C and fix formatting.
2930 * libnlm.h: Convert to ISO C and fix formatting.
2931 * libpei.h: Convert to ISO C and fix formatting.
2932 * libxcoff.h: Convert to ISO C and fix formatting.
2933 * nlm-target.h: Convert to ISO C and fix formatting.
2934 * nlm.c: Convert to ISO C and fix formatting.
2935 * nlm32-alpha.c: Convert to ISO C and fix formatting.
2936 * nlm32-i386.c: Convert to ISO C and fix formatting.
2937 * nlm32-ppc.c: Convert to ISO C and fix formatting.
2938 * nlm32-sparc.c: Convert to ISO C and fix formatting.
2939 * nlmcode.h: Convert to ISO C and fix formatting.
2940 * nlmswap.h: Convert to ISO C and fix formatting.
2941 * pe-mips.c: Convert to ISO C and fix formatting.
2942 * peXXigen.c: Convert to ISO C and fix formatting.
2943 * peicode.h: Convert to ISO C and fix formatting.
2944 * vms-gsd.c: Convert to ISO C and fix formatting.
2945 * vms-hdr.c: Convert to ISO C and fix formatting.
2946 * vms-misc.c: Convert to ISO C and fix formatting.
2947 * vms-tir.c: Convert to ISO C and fix formatting.
2948 * vms.c: Convert to ISO C and fix formatting.
2949 * vms.h: Convert to ISO C and fix formatting.
2951 * coffgen.c (coff_print_symbol): Restore correct formatting of
2954 2005-04-20 David S. Miller <davem@davemloft.net>
2956 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2957 (_bfd_sparc_elf_link_hash_table_create): Likewise.
2958 (allocate_dynrelocs): Likewise.
2960 2005-04-20 Jerome Guitton <guitton@gnat.com>
2962 * configure.in: Fix the check for basename declaration. Add check
2963 for declarations of ftello, ftello64, fseeko, fseeko64.
2964 * configure: Regenerate.
2966 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2968 2005-04-19 David S. Miller <davem@davemloft.net>
2970 * elfxx-sparc.c: New file.
2971 * elfxx-sparc.h: New file.
2972 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2973 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2974 (elfxx-sparc.lo): New rule.
2975 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2976 (elf64-sparc.lo): Likewise.
2977 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2978 (bfd_elf64_sparc_vec): Likewise.
2979 * configure: Regenerate.
2980 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2981 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2982 which is more consistent with elf32-sparc.c
2984 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
2986 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2987 (mips_elf_create_local_got_entry): Check h->root.forced_local.
2989 2005-04-19 Alan Modra <amodra@bigpond.net.au>
2991 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2992 dynamic relocs in non-SEC_ALLOC sections.
2993 (ppc_elf_gc_sweep_hook): Likewise.
2994 (ppc_elf_relax_section): Likewise.
2995 (ppc_elf_relocate_section): Likewise.
2997 2005-04-18 Nick Clifton <nickc@redhat.com>
2999 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
3000 assigning a value to return_value.
3002 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
3005 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
3008 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
3011 * elf.c (setup_group): Properly handle zero group count.
3013 2005-04-17 Mark Kettenis <kettenis@gnu.org>
3015 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
3016 (som_is_subspace, compare_subspaces, som_compute_checksum)
3017 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
3019 (hppa_som_reloc, compare_syms, compare_subspaces)
3020 (som_print_symbol, som_get_section_contents)
3021 (som_set_section_contents): Remove space after 'void *'.
3022 (som_bfd_print_private_bfd_data): Use %lx to print longs.
3023 (som_bfd_merge_private_bfd_data)
3024 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
3027 2004-04-15 Julian Brown <julian@codesourcery.com>
3029 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3030 * bfd-in2.h: Regenerate.
3031 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
3032 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
3033 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
3034 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
3035 relocations if requested to.
3036 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
3037 use_blx rather than symbian_p.
3038 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
3039 use_blx is in effect.
3040 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
3043 2005-04-15 Nick Clifton <nickc@redhat.com>
3045 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
3048 2005-04-15 Alan Modra <amodra@bigpond.net.au>
3051 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
3052 used as a list pointer.
3054 2005-04-14 Alan Modra <amodra@bigpond.net.au>
3056 * Makefile.am (NO_WERROR): Define.
3057 * warning.m4: New file
3058 * acinclude.m4: Include warning.m4.
3059 * configure.in: Invoke AM_BINUTILS_WARNINGS.
3060 * Makefile.in: Regenerate.
3061 * configure: Regenerate.
3063 2005-04-14 Alan Modra <amodra@bigpond.net.au>
3065 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
3066 Write trailing padding.
3068 * merge.c (merge_strings): Round up section size for alignment.
3070 2005-04-14 David S. Miller <davem@davemloft.net>
3072 Add TLS support for 64-bit Sparc ELF.
3073 * elf64-sparc.c (sparc64_elf_dyn_relocs,
3074 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
3075 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
3076 sparc64_elf_hash_entry, sparc64_elf_tdata,
3077 sparc64_elf_local_got_tls_type): New defines.
3078 (sparc64_elf_mkobject): New function.
3079 (sparc64_elf_link_hash_table): Add members for dynamic linker
3080 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
3081 uion to track TLS GOT references. Add sym_sec to cache
3082 mappings from local sym to section.
3083 (link_hash_newfunc): New function.
3084 (sparc64_elf_bfd_link_hash_table_create): Rename to
3085 sparc64_elf_link_hash_table_create for consistency.
3086 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
3087 (sparc64_elf_create_dynamic_sections): Initialize new section
3088 members of sparc64_elf_link_hash_table. Only init srelbss
3090 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
3092 (SPARC_NOP): Define.
3093 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
3094 sparc64_elf_plt_ptr_offset): Delete.
3095 (sparc64_plt_entry_build): New function to build PLT entries
3096 gradually instread of all at once at the end of linking.
3097 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
3098 local vars. Get them from sparc64_elf_hash_table instead.
3099 Check early on if r_symndx is in bounds. Handle TLS transitions.
3100 Account for TLS GOT references and DF_STATIC_TLS, as needed.
3101 For TLS relocs, record the tls_type in either
3102 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
3103 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
3104 to the __tls_get_addr symbol. For PLT relocs, track references
3105 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
3106 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
3107 symbol references, count the number of relocations needed for
3108 that symbol. For default switch case, don't error, this lets
3109 the TLS relocs not explicitly handled by this function get
3111 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
3112 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
3113 it from sparc64_elf_hash_table. Store the real PLT offset
3114 in h->plt.offset, and build PLT entries one at a time. Also
3115 get .dynbss section pointer from htab.
3116 (allocate_dynrelocs, readonly_dynrelocs,
3117 sparc64_omit_section_dynsym): New functions.
3118 (sparc64_elf_omit_section_dynsym): Use these new functions as
3120 (dtpoff_base, tpoff): New functions.
3121 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
3122 locals, get them from sparc64_elf_hash_table. Handle TLS
3123 relocations and refcounting in main relocation loop.
3124 (sparc64_elf_finish_dynamic_symbol): Use
3125 sparc64_elf_link_hash_table. Build PLT entries as we see
3126 them. Handle TLS GOT relocations.
3127 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
3128 from sparc64_elf_hash_table. Initialize only PLT header
3129 not all entries since we not build PLT entries one by one.
3130 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
3131 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
3132 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
3134 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
3136 * elflink.c (elf_link_input_bfd): Update check for removed
3139 2005-04-12 Alan Modra <amodra@bigpond.net.au>
3141 * Makefile.am: Run "make dep-am".
3142 * Makefile.in: Regenerate.
3143 * aclocal.m4: Regenerate.
3144 * libcoff.h: Regenerate.
3146 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
3148 * linker.c (_bfd_generic_link_output_symbols): Also check if
3149 the output section of an input section has been removed from
3152 * section.c (bfd_section_list_remove): Clear the next field
3153 of the removed section.
3154 (bfd_section_removed_from_list): New.
3155 * bfd-in2.h: Regenerated.
3157 2005-04-11 David S. Miller <davem@davemloft.net>
3159 * elf32-sparc.c (elf32_sparc_relocate_section,
3160 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
3161 R_SPARC_TLS_LE_{HIX22,LOX10}.
3162 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
3163 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
3164 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
3165 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
3167 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
3169 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
3171 2005-04-11 Nick Clifton <nickc@redhat.com>
3173 * aout-target.h: Convert to ISO C.
3174 * aoutf1.h: Convert to ISO C.
3175 * aoutx.h: Convert to ISO C.
3176 * bout.c: Convert to ISO C.
3177 * dwarf1.c: Convert to ISO C.
3178 * ecoffswap.h: Convert to ISO C.
3179 * freebsd.h: Convert to ISO C.
3180 * genlink.h: Convert to ISO C.
3181 * ieee.c: Convert to ISO C.
3182 * ihex.c: Convert to ISO C.
3183 * libcoff-in.h: Convert to ISO C.
3184 * mach-o.c: Convert to ISO C.
3185 * mach-o.h: Convert to ISO C.
3186 * netbsd.h: Convert to ISO C.
3187 * ns32k.h: Convert to ISO C.
3188 * ns32knetbsd.c: Convert to ISO C.
3189 * oasys.c: Convert to ISO C.
3190 * pdp11.c: Convert to ISO C.
3191 * pef-traceback.h: Convert to ISO C.
3192 * pef.c: Convert to ISO C.
3193 * pef.h: Convert to ISO C.
3194 * riscix.c: Convert to ISO C.
3195 * som.c: Convert to ISO C.
3196 * som.h: Convert to ISO C.
3197 * srec.c: Convert to ISO C.
3198 * stabs.c: Convert to ISO C.
3199 * sunos.c: Convert to ISO C.
3200 * tekhex.c: Convert to ISO C.
3201 * versados.c: Convert to ISO C.
3202 * version.h: Convert to ISO C.
3203 * xcoff-target.h: Convert to ISO C.
3204 * xcofflink.c: Convert to ISO C.
3205 * xsym.c: Convert to ISO C.
3206 * xsym.h: Convert to ISO C.
3208 2005-04-08 Paul Brook <paul@codesourcery.com>
3210 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
3211 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
3212 (ARM2THUMB_PIC_GLUE_SIZE): Define.
3213 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
3214 (elf32_arm_to_thumb_stub): Create PIC stubs.
3215 (record_arm_to_thumb_glue): Use different stub size for relocatable
3218 2005-04-05 Alan Modra <amodra@bigpond.net.au>
3220 * elf64-ppc.c (dec_dynrel_count): New function split out from
3221 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
3222 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
3223 (ppc64_elf_tls_optimize): Likewise.
3225 2005-04-05 Mark Kettenis <kettenis@gnu.org>
3227 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
3228 CORE_WCOOKIE_OFFSET.
3229 (SPARC64_WCOOKIE_OFFSET): New.
3230 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
3232 2005-04-05 Nick Clifton <nickc@redhat.com>
3234 * po/rw.po: New translation: Kinyarwanda
3235 * configure.in (ALL_LINGUAS): Add rw
3236 * configure: Regenerate.
3238 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
3240 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
3241 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
3242 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
3244 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
3245 to check for SHT_MIPS_OPTIONS sections.
3246 (_bfd_mips_elf_set_section_contents): Likewise.
3248 2005-04-04 Eric Christopher <echristo@redhat.com>
3250 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
3251 Clean up gp handling code.
3253 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
3255 * elf.c (bfd_elf_set_group_contents): Ignore linker created
3257 (assign_section_numbers): Accept link_info. Check SHT_GROUP
3258 sections for relocatable files only. Remove the linker created
3260 (_bfd_elf_compute_section_file_positions): Pass link_info to
3261 assign_section_numbers.
3263 * elfxx-ia64.c (elfNN_ia64_object_p): New.
3264 (elf_backend_object_p): Defined.
3266 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
3268 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
3270 2005-04-03 Fred Fish <fnf@specifixinc.com>
3272 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
3273 dwarf_ranges_size members.
3274 (struct comp_unit): Add base_address member.
3275 (struct funcinfo): Replace low/high members with an arange.
3276 (arange_add): Replace incoming "unit" parameter with "abfd" and
3277 "first_arange" pointers. Reorganize/rewrite function body.
3278 (decode_line_info): Change arange_add call to pass bfd and arange
3280 (lookup_address_in_line_info_table): Use arange list instead of
3281 individual low/high members. Walk function's arange list to find
3282 lowest PC in list, to test for overlapping functions.
3283 (read_debug_ranges): New function, reads the debug_ranges section.
3284 (lookup_address_in_function_table): Use arange list instead of
3285 individual low/high members. Rewrite to find smallest range that
3287 (read_rangelist): Read a given rangelist from debug_ranges.
3288 (scan_unit_for_functions): Use arange list instead of individual
3289 low/high members. Handle a DW_AT_ranges attribute.
3290 (parse_comp_unit): Use arange list instead of individual low/high
3291 members. Save comp unit base address. Handle a DW_AT_ranges
3294 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
3296 * elf.c (assign_section_numbers): Really use the kept section.
3298 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3300 * elf-bfd.h (_bfd_elf_check_kept_section): New.
3302 * elf.c (assign_section_numbers): When sh_link points to a
3303 discarded section, call _bfd_elf_check_kept_section to see if
3304 the kept section can be used. Otherwise reject sh_link
3305 pointing to discarded section.
3307 * elflink.c (_bfd_elf_check_kept_section): New.
3308 (elf_link_input_bfd): Use it.
3310 2005-04-01 Alan Modra <amodra@bigpond.net.au>
3312 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
3313 that we no longer need.
3315 2005-04-01 Alan Modra <amodra@bigpond.net.au>
3317 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
3319 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
3321 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3323 * elf.c (assign_section_numbers): Fix a typo.
3325 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
3327 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
3329 (_bfd_elf_section_already_linked): Likewise.
3331 2005-03-31 Jerome Guitton <guitton@gnat.com>
3333 * config.in: Regenerate.
3335 2005-03-31 Jerome Guitton <guitton@gnat.com>
3337 * config.in (HAVE_DECL_BASENAME): New configure macro.
3338 * configure.in: Check for basename.
3339 * configure: Regenerate.
3341 2005-03-30 Julian Brown <julian@codesourcery.com>
3343 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
3344 bfd_elf32_is_arm_mapping_symbol_name.
3345 * bfd-in2.h: Regenerate.
3346 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
3347 bfd_elf32_is_arm_mapping_symbol_name.
3348 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
3349 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
3350 (arm_elf_find_function): Likewise.
3351 (elf32_arm_output_symbol_hook): Likewise.
3353 2005-03-30 Julian Brown <julian@codesourcery.com>
3355 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
3356 * bfd-in2.h: Regenerate.
3357 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
3358 bfd_elf32_is_arm_mapping_symbol_name.
3359 (elf32_arm_output_symbol_hook): Likewise.
3360 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
3362 (is_arm_mapping_symbol_name): Function moved from here...
3363 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
3366 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3368 * configure.in: Check for ffs decl and alphabetize.
3369 * config.in: Regenerate.
3370 * configure: Regenerate.
3371 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
3373 2005-03-29 Fred Fish <fnf@specifixinc.com>
3375 * dwarf2.c (struct comp_unit): Fix typo.
3376 (scan_unit_for_functions): Remove unused local variable "name"
3377 and dead code that set it.
3379 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3380 Phil Blundell <philb@gnu.org>
3382 * bfd-in2.h, libbfd.h: Regenerated.
3383 * reloc.c: Add ARM TLS relocations.
3384 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
3386 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
3387 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
3388 (elf32_arm_tls_ie32_howto): New.
3389 (elf32_arm_howto_from_type): Support TLS relocations.
3390 (elf32_arm_reloc_map): Likewise.
3391 (elf32_arm_reloc_type_lookup): Likewise.
3393 (struct elf32_arm_obj_tdata): New.
3394 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
3395 (elf32_arm_mkobject): New function.
3396 (struct elf32_arm_relocs_copied): Add pc_count.
3397 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
3398 (GOT_TLS_IE): Define.
3399 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
3400 (elf32_arm_link_hash_newfunc): Initialize tls_type.
3401 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
3402 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
3403 (dtpoff_base, tpoff): New functions.
3404 (elf32_arm_final_link_relocate): Handle TLS relocations.
3405 (IS_ARM_TLS_RELOC): Define.
3406 (elf32_arm_relocate_section): Warn about TLS mismatches.
3407 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
3408 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
3409 TLS relocations and pc_count.
3410 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
3411 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
3413 (elf32_arm_size_dynamic_sections): Handle TLS.
3414 (elf32_arm_finish_dynamic_symbol): Likewise.
3415 (bfd_elf32_mkobject): Define.
3417 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
3419 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
3420 relocation types. Don't count relocations which will use a PLT.
3422 2005-03-29 Joel Brobecker <brobecker@gnat.com>
3424 * elf.c (elfcore_grok_nto_status): Print tid as long.
3425 (elfcore_grok_nto_regs): Likewise.
3427 2005-03-29 Joel Brobecker <brobecker@gnat.com>
3429 * irix-core.c: Remove some unnecessary prototypes.
3431 2005-03-28 Joel Brobecker <brobecker@adacore.com>
3433 * irix-core.c: Convert to ISO C.
3435 2005-03-28 Joel Brobecker <brobecker@adacore.com>
3437 * irix-core.c (do_sections): Replace + by | in expression.
3438 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
3439 to unused parameters to avoid a compiler warning.
3441 2005-03-28 Mark Kettenis <kettenis@gnu.org>
3443 * netbsd-core.c: Convert to ISO C. Fix formatting.
3445 2005-03-24 Eric Christopher <echristo@redhat.com>
3447 * elfxx-mips.c: Revert previous patch.
3449 2005-03-24 Nick Clifton <nickc@redhat.com>
3451 * targets.c (_bfd_target_vector): Only include the
3452 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
3453 all targets enabled.
3455 2005-03-24 James E Wilson <wilson@specifixinc.com>
3457 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
3458 (BFD64_BACKENDS): Add elf32-ia64.lo.
3459 * Makefile.in: Regenerate.
3461 2005-03-23 Eric Christopher <echristo@redhat.com>
3463 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
3464 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
3465 after emitting relocation.
3466 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
3467 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
3470 2005-03-23 Mike Frysinger <vapier@gentoo.org>
3471 Nick Clifton <nickc@redhat.com>
3473 * config.bfd: Accept any C library to accompany a GNU Linux
3474 implementation, not just the GNU C library.
3475 * configure.in: Likewise.
3476 * configure: Regenerate.
3478 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
3480 * bfd-in.h (_bfd_elf_provide_symbol): New.
3481 * bfd-in2.h: Regenerated.
3483 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
3484 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
3487 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
3490 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
3492 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
3494 2005-03-22 Bob Wilson <bob.wilson@acm.org>
3496 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
3497 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
3498 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
3499 (xtensa_opcode_decode): Rearrange code.
3501 2005-03-22 Nick Clifton <nickc@redhat.com>
3503 * binary.c: Convert to ISO C90 formatting.
3504 * coff-arm.c: Convert to ISO C90 formatting.
3505 * coffgen.c: Convert to ISO C90 formatting.
3506 * elf32-gen.c: Convert to ISO C90 formatting.
3507 * elf64-gen.c: Convert to ISO C90 formatting.
3508 * hash.c: Convert to ISO C90 formatting.
3509 * ieee.c: Convert to ISO C90 formatting.
3511 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3513 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
3514 unresolved symbols in R_ARM_NONE relocations.
3516 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
3518 * elf32-arm.c (elf32_arm_final_link_relocate): Add
3519 UNRESOLVED_RELOC_P argument. Set it appropriately.
3520 (elf32_arm_relocate_section): Update call to
3521 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
3522 unresolved_reloc instead.
3524 2005-03-23 Alan Modra <amodra@bigpond.net.au>
3526 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
3527 .gnu.warning.* sections.
3529 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3531 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
3533 (ppc_elf_create_linker_section): Don't try to reuse existing section.
3534 (elf_create_pointer_linker_section): Delete info parm. Don't make
3535 h dynamic. Don't set written_address_p.
3536 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
3537 (bfd_put_ptr): Delete.
3538 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
3539 Always write section contents. Assert global sym is def_regular.
3540 Use offset bottom bit as a written flag.
3541 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
3544 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3546 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
3547 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
3550 2005-03-21 Nick Clifton <nickc@redhat.com>
3552 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
3554 (t2a1_bx_pc_insn): Likewise.
3555 (t2a2_noop_insn): Likewise.
3556 (t2a3_b_insn): Likewise.
3557 (t2a1_push_insn): Likewise.
3558 (t2a2_ldr_insn): Likewise.
3559 (t2a3_mov_insn): Likewise.
3560 (t2a4_bx_insn): Likewise.
3561 (t2a5_pop_insn): Likewise.
3562 (t2a6_bx_insn): Likewise.
3563 (coff_arm_relocate_section): Only declare the high_address
3564 variable for non WINCE targets.
3566 2005-03-22 Alan Modra <amodra@bigpond.net.au>
3568 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
3569 SEC_LINKER_CREATED. Attach to dynobj.
3570 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
3572 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3574 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
3575 sym_offset. Add name, bss_name, sym_name, sym_val.
3576 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
3577 Add sdata array of elf_linker_section_t.
3578 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
3579 (enum elf_linker_section_enum): Delete.
3580 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
3581 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
3582 the special sections are needed. Adjust htab->sdata refs.
3583 Ensure dynobj is set in sreloc code.
3584 (ppc_elf_size_dynamic_sections): Strip sdata sections.
3585 (ppc_elf_set_sdata_syms): New function.
3586 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
3587 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
3588 sym_val instead of sym_hash.
3589 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
3591 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3593 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
3594 (ppc_elf_merge_private_bfd_data): Likewise.
3596 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3598 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
3599 (ppc_elf_create_linker_section): Don't create rel_section.
3600 (elf_create_pointer_linker_section): Don't size relocs.
3601 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
3602 Don't generate relocs.
3603 (ppc_elf_relocate_section): Adjust calls to
3604 elf_finish_pointer_linker_section.
3606 2005-03-21 Alan Modra <amodra@bigpond.net.au>
3608 * elf32-ppc.c (is_ppc_elf_target): New function.
3609 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
3610 for bfd_target_elf_flavour. Do this test before endian check.
3611 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
3612 (ppc_elf_size_dynamic_sections): Likewise.
3614 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
3616 * elf-bfd.h (elf_backend_data): Add int to
3617 elf_backend_section_from_shdr.
3618 (bfd_elf_section_data): Update comment for this_idx.
3619 (_bfd_elf_make_section_from_shdr): Add int.
3620 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3622 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
3623 and use it to set this_idx in bfd_elf_section_data.
3624 (bfd_section_from_shdr): Pass shindex to
3625 _bfd_elf_make_section_from_shdr.
3626 (_bfd_elf_section_from_bfd_section): Use this_idx in
3627 bfd_elf_section_data to find section index.
3629 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
3630 index and pass it to _bfd_elf_make_section_from_shdr.
3631 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
3632 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3633 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3634 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3635 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3636 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3637 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
3638 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3639 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3641 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
3642 Ross Ridge <rridge@csclub.uwaterloo.ca>
3644 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
3645 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
3648 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3650 * elflink.c (elf_mark_used_section): Remove check for special
3653 2005-03-18 Andreas Schwab <schwab@suse.de>
3655 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3656 from bfd_vma to ia64_insn, remove broken cast.
3658 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
3660 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
3661 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3662 elf_m68k_finish_dynamic_sections): Use it.
3664 2005-03-17 Paul Brook <paul@codesourcery.com>
3665 Dan Jacobowitz <dan@codesourcery.com>
3666 Mark Mitchell <mark@codesourcery.com>
3668 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3669 (elf32_arm_additional_program_headers): Likewise.
3670 (elf_backend_modify_segment_map): Define.
3671 (elf_backend_additional_program_headers): Likewise.
3672 (elf32_arm_symbian_modify_segment_map): Use
3673 elf32_arm_modify_segment_map.
3675 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
3677 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3678 for special sections.
3680 2005-03-18 Alan Modra <amodra@bigpond.net.au>
3682 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3683 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3684 section_sym_count param, and return number of section symbols.
3685 (bfd_elf_size_dynamic_sections): Clear section symbol area of
3686 .dynsym contents. Don't bother calling swap_symbol_out on the
3687 first all-zero dynsym.
3688 (elf_mark_used_section): Formatting. Avoid twiddling flags in
3689 special sections like bfd_abs_section.
3690 (bfd_elf_gc_sections): Spelling fix.
3692 2005-03-16 Fred Fish <fnf@specifixinc.com>
3695 * dwarf2.c (read_indirect_string): Fix apparent typo, check
3696 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3698 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
3700 * elflink.c (elf_mark_used_section): New.
3701 (bfd_elf_gc_sections): Call elf_gc_mark_section for
3702 non-relocatable link if we don't do GC.
3704 2005-03-16 Nick Clifton <nickc@redhat.com>
3705 Ben Elliston <bje@au.ibm.com>
3707 * configure.in (werror): New switch: Add -Werror to the
3708 compiler command line. Enabled by default. Disable via
3710 * configure: Regenerate.
3712 2005-03-16 Nick Clifton <nickc@redhat.com>
3714 * ecoff.c: Convert to ISO C90 formatting.
3716 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3718 * elf32-ppc.c: Divide file into general and linker specific
3719 functions. Sort linker functions into roughly the order in which
3720 they are called by the ELF linker code.
3722 2005-03-16 Alan Modra <amodra@bigpond.net.au>
3724 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3725 on section. Correct comment, and add FIXME.
3726 (ppc_elf_additional_program_headers): Don't bump header count for
3727 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3728 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3729 do allocate memory if they need it.
3731 2005-03-15 Mikkel Krautz <krautz@gmail.com>
3733 * config.bfd (x86_64-elf): Add target.
3735 2005-03-15 Alan Modra <amodra@bigpond.net.au>
3737 * po/es.po: Commit new Spanish translation.
3739 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
3741 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3742 for global symbol when reporting overflow.
3744 2005-03-11 Jakub Jelinek <jakub@redhat.com>
3746 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3747 * libbfd.h: Rebuilt.
3748 * archive.c (_bfd_ar_spacepad): New function.
3749 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3750 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3751 coff_write_armap): Use it.
3752 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
3754 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3756 2005-03-10 Mark Kettenis <kettenis@gnu.org>
3758 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3759 has_table to the start of the function.
3761 2005-03-10 Ben Elliston <bje@au.ibm.com>
3763 * archive.c: Include hashtab.h.
3764 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3765 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3766 (hash_file_ptr): New function.
3767 (eq_file_ptr): Likewise.
3768 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3769 * libbfd-in.h: Include hashtab.h.
3770 (struct artdata): Change `cache' member type to htab_t.
3771 * libbfd.h: Rebuild.
3773 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
3775 * configure.in: Bump version to 2.16.90.
3776 * configure: Regenerated.
3778 2005-03-07 Jakub Jelinek <jakub@redhat.com>
3780 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3781 close is a function like macro in system headers.
3783 2005-03-07 Alan Modra <amodra@bigpond.net.au>
3786 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3787 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3789 2005-03-06 Alan Modra <amodra@bigpond.net.au>
3791 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3793 2005-03-05 Alan Modra <amodra@bigpond.net.au>
3795 * po/bfd.pot: Regenerate.
3797 2005-03-05 Alan Modra <amodra@bigpond.net.au>
3799 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3801 (func_desc_adjust): Force dot-syms local in executables as well
3804 2005-03-04 David Daney <ddaney@avtrex.com>
3806 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3807 '__gnu_local_gp' symbol used by gas -mno-shared.
3809 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
3811 * elf-bfd.h (elf_backend_data): Add "const char *" to
3812 elf_backend_section_from_phdr.
3814 * elf.c (bfd_section_from_phdr): Pass "proc" to the
3815 elf_backend_section_from_phdr hook.
3817 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
3818 Joseph Myers <joseph@codesourcery.com>
3820 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3821 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3823 (struct mips_elf_got_per_bfd_arg): Add global_count.
3824 (struct mips_elf_count_tls_arg): New.
3825 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3826 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3827 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3828 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3829 (TLS_RELOC_P): Define.
3830 (TP_OFFSET, DTP_OFFSET): Define.
3831 (dtprel_base, tprel_base): New functions.
3832 (mips_elf_link_hash_newfunc): Initialize tls_type.
3833 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3834 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3836 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3837 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3838 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3839 (mips_tls_got_index): New functions.
3840 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3841 arguments. Pass them to mips_elf_create_local_got_entry. Use
3843 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3845 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3846 mips_elf_create_local_got_entry.
3847 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3848 arguments. Handle TLS entries.
3849 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3850 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
3852 (mips_elf_record_global_got_symbol): Likewise.
3853 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3855 (mips_elf_merge_gots): Handle TLS entries when merging.
3856 (mips_elf_initialize_tls_index): New function.
3857 (mips_elf_set_global_got_offset): Handle TLS entries.
3858 (mips_elf_adjust_gp): Handle TLS.
3859 (mips_elf_multi_got): Remove redundant call to
3860 mips_elf_resolve_final_got_entries. Initialize global_count.
3861 Correct a comment. Initialize new TLS members of mips_got_info.
3862 Assign TLS GOT indexes for new GOTs.
3863 (mips_elf_create_got_section): Initialize new TLS members of
3865 (mips_elf_calculate_relocation): Handle TLS relocs.
3866 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
3868 (_bfd_mips_elf_always_size_sections): Handle TLS.
3869 (_bfd_mips_elf_size_dynamic_sections): Likewise.
3870 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
3872 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3873 (_bfd_mips_elf_hide_symbol): Handle TLS.
3874 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3875 (mips_reloc_map): Add TLS relocs.
3876 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3877 * elf64-mips.c (mips_elf64_howto_table_rel)
3878 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3879 * reloc.c: Define new MIPS TLS relocations.
3880 * libbfd.h, bfd-in2.h: Regenerated.
3882 2005-03-02 Jan Beulich <jbeulich@novell.com>
3884 * Makefile.am: Add dependency of cache.o on libiberty.h.
3885 * cache.c: Include libiberty.h.
3886 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3888 2005-03-01 Zack Weinberg <zack@codesourcery.com>
3890 * elf.c (bfd_section_from_shdr <default case>): Call
3891 elf_backend_section_from_shdr hook unconditionally, and return
3893 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3894 * elfxx-target.h (elf_backend_section_from_shdr)
3895 (elf_backend_section_from_phdr): Default to
3896 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3899 2005-03-01 Alan Modra <amodra@bigpond.net.au>
3901 * targets.h: Typo fix.
3902 * bfd-in2.h: Regenerate.
3904 * bout.c (b_out_write_object_contents): Don't use sizeof on host
3905 structs to size on-disk structures.
3906 (b_out_set_section_contents): Size the external struct, not the
3907 internal one for on-disk size.
3908 (b_out_sizeof_headers): Likewise.
3910 2005-03-01 Alan Modra <amodra@bigpond.net.au>
3912 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3913 entry points with the func descriptor as well as undefweak.
3915 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
3917 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3918 present when IMPORT_NAME_UNDOECRATE is used.
3920 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
3923 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3926 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3927 to _bfd_elf_merge_symbol.
3929 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3930 unsigned int to return the alignment of the old common symbol
3931 in the dynamic object.
3932 (_bfd_elf_add_default_symbol): Pass NULL to
3933 _bfd_elf_merge_symbol.
3934 (elf_link_add_object_symbols): Pass &old_alignment to
3935 _bfd_elf_merge_symbol. Get the alignment of the new common
3936 symbol in the dynamic object.
3938 2005-02-24 Ben Elliston <bje@au.ibm.com>
3940 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3941 * format.c (bfd_check_format_matches): Likewise.
3942 * archive.c (BFD_GNU960_ARMAG): Likewise.
3943 (bfd_generic_archive_p): Likewise.
3944 (_bfd_write_archive_contents): Likewise.
3946 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
3948 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3949 * configure: Regenerate.
3951 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
3953 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3954 COMDAT group sections to have default visibility.
3956 2005-02-24 Alan Modra <amodra@bigpond.net.au>
3958 * coffcode.h (coff_print_aux): Warning fix.
3959 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3960 instead of section pointer to identify.
3961 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
3962 the correct size buffer for local sym mangling too.
3963 (h8300_bfd_link_add_symbols): Likewise.
3964 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3966 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3967 * elf32-xtensa.c (literal_value_hash): Warning fix.
3968 * versados.c (process_otr): Warning fix.
3969 (versados_canonicalize_reloc): Likewise.
3970 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3971 * vms.c (fill_section_ptr): Warning fix.
3973 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
3975 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3976 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3978 2005-02-23 Nick Clifton <nickc@redhat.com>
3980 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3981 the relvaddr field of the Elf32_crinfo structure.
3983 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3984 variables that are passed by reference to
3985 m68hc11_get_relocation_value in case that function does not
3988 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3989 return statements and replace with a single return at the end of
3990 the function. This helps pacify the flow analysis code in gcc 4.0.
3992 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3993 strtab to avoid compile time warning.
3995 2005-02-23 Ben Elliston <bje@au.ibm.com>
3997 * opncls.c (bfd_zalloc): Document this function.
3999 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
4001 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
4002 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
4003 Replace SEC_SHARED with SEC_COFF_SHARED.
4004 (styp_to_sec_flags): Likewise.
4006 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
4007 (TARGET_LITTLE_SYM): Likewise.
4009 * section.c (SEC_ARCH_BIT_0): Removed.
4010 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
4011 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
4012 (SEC_SHARED): Renamed to ...
4013 (SEC_COFF_SHARED): This.
4014 (SEC_BLOCK): Renamed to ...
4015 (SEC_TIC54X_BLOCK): This.
4016 (SEC_CLINK): Renamed to ...
4017 (SEC_TIC54X_CLINK): This.
4018 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
4019 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
4021 * bfd-in2.h: Regenerated.
4023 2005-02-21 Fred Fish <fnf@specifixinc.com>
4025 * dwarf2.c (find_abstract_instance_name): Call recursively
4026 to handle a DW_AT_specification.
4028 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4030 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
4031 mips_elf_create_dynamic_relocation,
4032 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
4033 Remove #if 0'd code.
4035 2005-02-21 Alan Modra <amodra@bigpond.net.au>
4037 * Makefile.am: Run "make dep-am"
4038 * Makefile.in: Regenerate.
4040 2005-02-21 Alan Modra <amodra@bigpond.net.au>
4042 * coffgen.c (bfd_coff_get_comdat_section): Check that
4043 coff_section_data isn't NULL.
4045 2005-02-21 Alan Modra <amodra@bigpond.net.au>
4047 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
4048 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
4049 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
4050 useless assignments.
4051 (xcoff_write_archive_contents_big): Likewise.
4052 (_bfd_xcoff_put_ldsymbol_name): Likewise.
4053 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
4054 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
4055 * cofflink.c (process_embedded_commands): Warning fixes.
4056 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
4058 * dwarf2.c: Warning fixes.
4059 * elf-bfd.h: Likewise.
4060 * elf-eh-frame.c: Likewise.
4061 * elf-strtab.c: Likewise.
4063 * elf32-m68k.c: Likewise.
4064 * elf32-ppc.c: Likewise.
4065 * elf32-sh-symbian.c: Likewise.
4066 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
4067 * elf64-sh64.c: Likewise.
4068 * peicode.h: Likewise.
4069 * elf64-mmix.c: Warning fixes.
4070 * elfcode.h: Likewise.
4071 * elfxx-mips.c: Likewise.
4072 * libbfd-in.h: Likewise.
4073 * libbfd.c: Likewise.
4074 * mach-o.c: Likewise.
4075 * merge.c: Likewise.
4077 * opncls.c: Likewise.
4080 * vms-hdr.c: Likewise.
4081 * vms-tir.c: Likewise.
4082 * xtensa-isa.c: Likewise.
4083 * xtensa-modules.c: Likewise.
4085 (pstrcmp): Use correct choice of string lengths. Fix return value.
4086 (bfd_sym_module_name): Correct string length.
4087 * bfd-in2.h: Regenerate.
4088 * libbfd.h: Regenerate.
4090 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
4092 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
4093 uninitialized check_segment[1] in TLSMOFF case.
4094 Reported by Alan Modra.
4095 (elf32_frv_relocate_section): Improve errors and warnings.
4097 2005-02-17 Alan Modra <amodra@bigpond.net.au>
4099 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
4101 2005-02-16 Alan Modra <amodra@bigpond.net.au>
4103 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
4104 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
4105 * pef.c (bfd_pef_scan): Don't ignore return value of
4106 bfd_pef_scan_start_address.
4107 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
4108 bfd_mach_o_scan_start_address.
4109 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
4110 * elfxx-mips.c: Remove unnecessary prototypes.
4111 (sort_dynamic_relocs_64): Abort if not BFD64.
4113 2005-02-16 Alan Modra <amodra@bigpond.net.au>
4115 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
4116 Skip toc reloc adjust if reloc_count is zero.
4118 2005-02-15 Nigel Stephens <nigel@mips.com>
4119 Maciej W. Rozycki <macro@mips.com>
4121 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
4122 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
4123 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4124 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
4125 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4127 (mips16_gprel_reloc): Remove bit shuffling; call
4128 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4129 and _bfd_mips16_elf_reloc_shuffle() instead.
4130 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4131 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4133 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
4134 elf_mips16_howto_table_rel.
4135 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
4136 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
4137 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4138 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
4139 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4141 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
4142 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
4143 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
4145 (mips16_gprel_reloc): Remove bit shuffling; call
4146 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4147 and _bfd_mips16_elf_reloc_shuffle() instead.
4148 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4149 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4151 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
4152 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
4153 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
4154 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
4155 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
4156 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
4157 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
4159 (mips16_gprel_reloc): Remove bit shuffling; call
4160 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
4161 and _bfd_mips16_elf_reloc_shuffle() instead.
4162 (mips16_reloc_map): New reloc map for MIPS16 relocs.
4163 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
4165 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
4166 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
4167 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
4168 handle bit shuffling for MIPS16 relocs.
4169 (_bfd_mips16_elf_reloc_shuffle): Likewise.
4170 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
4171 and _bfd_mips16_elf_reloc_shuffle().
4172 (_bfd_mips_elf_generic_reloc): Likewise.
4173 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
4175 (mips_elf_obtain_contents): Remove bit shuffling.
4176 (mips_elf_perform_relocation): Likewise; call
4177 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
4179 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
4181 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
4182 (_bfd_mips16_elf_reloc_shuffle): Likewise.
4183 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
4184 (BFD_RELOC_MIPS16_HI16_S): Likewise.
4185 (BFD_RELOC_MIPS16_LO16): Likewise.
4186 * bfd-in2.h: Regenerate.
4187 * libbfd.h: Regenerate.
4189 2005-02-15 Jan Beulich <jbeulich@novell.com>
4191 * elfxx-ia64.c (ia64_howto_table): Correct strings for
4192 R_IA64_DTPMOD64[LM]SB.
4194 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
4196 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
4197 backward branch in the same section.
4198 (elfNN_ia64_relocate_section): Inform users that the input
4199 section is too big to relax br instruction when overflow
4200 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
4201 and R_IA64_PCREL21F.
4203 2005-02-14 Orjan Friberg <orjanf@axis.com>
4205 * elfcore.h (elf_core_file_p): Move the call to
4206 elf_backend_object_p to allow the correct machine to be set before
4207 processing the program headers.
4209 2005-02-14 Nick Clifton <nickc@redhat.com>
4212 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
4213 aware flag from the input bfd to the output bfd.
4215 2005-02-11 Maciej W. Rozycki <macro@mips.com>
4217 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
4218 R_MIPS_LITERAL relocations for external symbols.
4219 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
4220 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
4222 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
4224 * bfd-in2.h: Rebuilt.
4226 2005-02-11 Paul Brook <paul@codesourcery.com>
4228 * elf-bfd.h (struct elf_link_hash_table): Add
4229 is_relocatable_executable.
4230 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
4231 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
4232 symbols in relocatable executables.
4233 (bfd_elf_record_link_assignment): Create dynamic section symbols in
4234 relocatable executables.
4235 (_bfd_elf_link_renumber_dynsyms): Ditto.
4236 (bfd_elf_final_link): Ditto.
4237 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
4238 relocations into relocatable executables.
4239 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
4240 executables. Also copy absolute relocations.
4241 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
4242 in relocatable executables.
4243 (allocate_dynrelocs): Copy relocations for relocatable executables.
4244 Output dynamic symbols for symbols defined in linker scripts.
4246 2005-02-11 Nick Clifton <nickc@redhat.com>
4248 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
4249 to avoid a compile time warning.
4251 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
4254 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
4255 inclusion of coffcode.h so that it is actually picked up.
4257 * coffcode.h (coff_std_swap_table): Add an unused attribute in
4258 case it is not used.
4260 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
4261 structure and macro.
4263 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
4266 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
4267 to protect the declaration of this array.
4269 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
4270 Avoid call to memcpy with a size of 0.
4272 2005-02-12 Alan Modra <amodra@bigpond.net.au>
4274 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
4275 old-style branches to undefined dot-symbols which will be
4276 satisfied by a plt call.
4278 2005-02-11 Alan Modra <amodra@bigpond.net.au>
4280 * elf64-ppc.c (move_plt_plist): New function, extracted from..
4281 (ppc64_elf_copy_indirect_symbol): ..here.
4282 (func_desc_adjust): Use move_plt_plist.
4284 2005-02-10 Paul Brook <paul@codesourcery.com>
4286 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
4288 2005-02-10 Paul Brook <paul@codesourcery.com>
4290 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
4292 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
4293 (elf_link_renumber_local_hash_table_dynsyms): New function.
4294 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
4296 2005-02-10 Jakub Jelinek <jakub@redhat.com>
4298 * bfd-in.h (BFD_LINKER_CREATED): Define.
4299 * bfd-in2.h: Rebuilt.
4300 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
4301 BFD_LINKER_CREATED bfds when determining input bfds without
4302 .note.GNU-stack section.
4304 2005-02-10 Maciej W. Rozycki <macro@mips.com>
4306 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
4307 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
4308 relocations against external symbols unchanged.
4310 2005-02-08 Paul Brook <paul@codesourcery.com>
4312 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
4315 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
4317 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
4320 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4322 * elf64-mips.c: Fix formatting throughout.
4324 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4326 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
4328 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
4330 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
4331 *ABS*/*UND* sections.
4332 (elf32_frv_relocate_section): Move zero-addend-required error...
4333 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
4334 missing needed TLS section.
4336 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
4338 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
4339 being the last symbol.
4340 (aout_link_add_symbols): Just return TRUE if a warning
4343 2005-02-07 Maciej W. Rozycki <macro@mips.com>
4345 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
4346 R_MIPS_GPREL32 relocations against external symbols.
4347 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
4350 2005-02-07 Alan Modra <amodra@bigpond.net.au>
4352 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
4353 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
4354 elf_string_from_elf_strtab.
4355 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
4356 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
4357 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
4358 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
4359 looking at cached symtab info first, before iterating over headers.
4360 For SHT_REL and SHT_RELA, load dynsymtab if needed.
4361 * elfcode.h (elf_object_p): Don't load section header stringtab
4364 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
4366 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
4367 against protected function when building shared library.
4370 * elf64-x86-64.c (is_32bit_relative_branch): New.
4371 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
4372 protected function symbol when building shared library for
4373 32bit relative branch instruction.
4375 2005-02-06 Alan Modra <amodra@bigpond.net.au>
4377 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
4378 syms when doing a relocatable link.
4379 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
4381 (ppc64_elf_tls_setup): Likewise.
4382 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
4384 2005-02-04 Alan Modra <amodra@bigpond.net.au>
4386 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
4387 (link_hash_newfunc): Clear all locals using memset.
4388 (make_fdh): Remove flags param. Always create fake func desc
4389 weak. Link the descriptor with the code entry sym.
4390 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
4391 (add_symbol_adjust): Adjust make_fdh call.
4392 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
4393 descriptor to strong undefined if code entry is strong.
4395 2005-02-04 Alan Modra <amodra@bigpond.net.au>
4397 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
4398 lookup here. Set to new before calling bfd_link_repair_undef_list.
4399 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
4401 2005-02-03 Alan Modra <amodra@bigpond.net.au>
4403 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
4405 2005-02-03 Alan Modra <amodra@bigpond.net.au>
4407 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
4408 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
4409 before the as-needed lib was loaded. Abort on unexpected refs.
4411 2005-02-02 Alan Modra <amodra@bigpond.net.au>
4413 * elflink.c (elf_smash_syms): Expand comments.
4414 (elf_link_add_object_symbols): Only call elf_smash_syms for
4415 as-needed dynamic objects.
4417 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
4418 everything, just the field specific to ia64.
4419 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4421 2005-02-01 Alan Modra <amodra@bigpond.net.au>
4423 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
4424 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
4426 (struct add_symbol_adjust_data): New.
4427 (add_symbol_adjust): Make an undefweak func desc for old ABI
4428 objects to link with --as-needed shared libs. Return fail status.
4429 Don't adjust old ABI func entry sym to weak if func desc syms
4431 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
4434 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
4436 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
4439 2005-02-01 Alan Modra <amodra@bigpond.net.au>
4441 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
4442 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
4443 remove anything but new and undefweak.
4444 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
4446 (_bfd_elf_create_dynamic_sections): Formatting.
4447 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
4448 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
4449 (struct elf_smash_data): New.
4450 (elf_smash_syms): New function.
4451 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
4452 unneeded dynamic objects to loaded list.
4453 (elf_link_output_extsym): Don't handle as-needed here. Strip
4454 bfd_link_hash_new symbols.
4455 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4456 delref when dynindx is already -1.
4457 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
4459 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
4461 2005-02-01 Ben Elliston <bje@au.ibm.com>
4463 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
4465 2005-02-01 Ben Elliston <bje@au.ibm.com>
4467 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
4468 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
4469 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
4470 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
4471 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
4472 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
4473 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
4474 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
4475 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
4476 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
4477 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
4478 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
4479 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
4480 throughout. Similarly, collapse #if 1'd code.
4482 2005-02-01 Ben Elliston <bje@au.ibm.com>
4484 * elf-bfd.h (bfd_elf_discard_group): Remove.
4485 * elf.c (bfd_elf_discard_group): Likewise.
4486 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
4488 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
4490 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
4491 (_bfd_elf_eh_frame_address_size): Declare.
4492 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
4493 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
4494 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
4495 (elf_backend_eh_frame_address_size): Define.
4496 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
4497 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
4498 size from the new backend hook.
4499 (_bfd_elf_write_section_eh_frame): Likewise.
4500 (_bfd_elf_eh_frame_address_size): New function.
4502 2005-01-31 Andrew Cagney <cagney@gnu.org>
4504 * configure: Regenerate to track ../gettext.m4.
4506 2005-01-31 Mark Mitchell <mark@codesourcery.com>
4508 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
4509 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
4511 2005-01-31 Nick Clifton <nickc@redhat.com>
4513 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
4514 sparc-lynxos, vax-vms) be obsolete.
4516 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
4518 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
4519 * elf32-arm.c (ELF_MINPAGESIZE): Define.
4520 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
4521 * elfcode.h (elf_object_p): Use minpagesize instead of
4523 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
4524 (elfNN_bed): Include ELF_MINPAGESIZE.
4526 2005-01-28 Julian Brown <julian@codesourcery.com>
4528 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4529 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
4530 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
4531 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
4532 passing flag value from ld. Set flag value in global hash table entry.
4533 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
4536 2005-01-27 Andrew Cagney <cagney@gnu.org>
4538 * configure: Regenerate to track ../gettext.m4 change.
4540 2005-01-25 Mark Mitchell <mark@codesourcery.com>
4542 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
4545 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
4547 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
4548 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
4550 * reloc.c: Add R_FRV_TLSMOFF.
4551 * elf32-frv.c (elf32_frv_howto_table): Likewise.
4552 (frv_reloc_map, frv_reloc_type_lookup): Map it.
4553 (elf32_frv_relocate_section): Handle it.
4554 (elf32_frv_check_relocs): Likewise.
4555 * libbfd.h, bfd-in2.h: Rebuilt.
4556 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
4557 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
4558 when given an undefweak TLS symbol. Fix constant TLS PLT entries
4559 such that they return the constant in gr9.
4560 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
4562 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
4563 too, such that they shrink on relaxation.
4564 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
4565 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
4566 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
4567 if we can guarantee the use of 16-bit constants.
4568 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
4569 Introduce TLS support for FR-V FDPIC.
4570 * reloc.c: Add TLS relocations.
4571 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
4572 (elf32_frv_rel_tlsdesc_value_howto): New.
4573 (elf32_frv_rel_tlsoff_howto): New.
4574 (frv_reloc_map): Add new mappings.
4575 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
4577 (frvfdpic_dynamic_got_plt_info): New.
4578 (frvfdpic_plt_tls_ret_offset): New.
4579 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
4580 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
4581 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
4582 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
4584 (struct frvfdpic_relocs_info): Add TLS fields.
4585 (frvfdpic_relocs_info_hash): Warning clean up.
4586 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
4587 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
4588 (FRVFDPIC_TLS_BIAS): Define.
4589 (tls_biased_base): New.
4590 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
4592 (frv_reloc_type_lookup): Likewise.
4593 (frvfdpic_info_to_howto_rel): Likewise.
4594 (elf32_frv_relocate_section): Likewise.
4595 (_frv_create_got_section): Create the PLT section here.
4596 (elf32_frvfdpic_create_dynamic_sections): Not here.
4597 (_frvfdpic_count_nontls_entries): Move out of...
4598 (_frvfdpic_count_got_plt_entries): ... here.
4599 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
4600 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
4602 (_frvfdpic_relax_tls_entries): New.
4603 (_frvfdpic_compute_got_alloc_data): Add TLS support.
4604 (_frvfdpic_get_tlsdesc_entry): New.
4605 (_frvfdpic_assign_got_entries): Add TLS support.
4606 (_frvfdpic_assign_plt_entries): Likewise.
4607 (_frvfdpic_reset_got_plt_entries): New.
4608 (_frvfdpic_size_got_plt): Move out of...
4609 (elf32_frvfdpic_size_dynamic_sections): ... here.
4610 (_frvfdpic_relax_got_plt_entries): New.
4611 (elf32_frvfdpic_relax_section): New.
4612 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
4613 (elf32_frv_check_relocs): Add TLS support.
4614 (bfd_elf32_bfd_relax_section): Define for FDPIC.
4615 * libbfd.h, bfd-in2.h: Rebuilt.
4617 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4619 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
4620 loadable reloc sections.
4621 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
4622 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
4624 2005-01-25 Alan Modra <amodra@bigpond.net.au>
4626 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
4627 sections immediately when linking shared libs. Instead, wait until
4628 we know a lib is needed.
4629 (_bfd_elf_link_create_dynstrtab): Extract from..
4630 (_bfd_elf_link_create_dynamic_sections_): ..here.
4631 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
4632 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
4633 for non-existent .dynamic.
4634 (elf_link_output_extsym): Don't complain about undefined symbols
4635 in as-needed dynamic libs that aren't actually linked.
4637 2005-01-24 Andrew Cagney <cagney@gnu.org>
4639 * configure: Regenerate, ../gettext.m4 was updated.
4641 2005-01-21 Ben Elliston <bje@au.ibm.com>
4643 * aout-encap.c: Remove unused file.
4645 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
4648 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
4649 non-function symbols are local.
4650 (_bfd_elf_symbol_refs_local_p): Likewise.
4652 2005-01-18 Alan Modra <amodra@bigpond.net.au>
4654 * bfd.c (bfd_link_just_syms): Add abfd param.
4655 * bfd-in2.h: Regenerate.
4657 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4659 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4660 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4661 instructions. If the amount of padding is known, reduce the size
4662 of the CIE or FDE by that amount.
4664 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4666 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4667 augmentation_size. Use bfd_signed_vmas for data_align.
4668 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4669 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4670 functions. Don't read past the end of the enclosing CIE or FDE.
4671 (skip_bytes): New utility function.
4672 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4674 (_bfd_elf_write_section_eh_frame): Use new functions.
4676 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
4678 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4679 assert-style REQUIRE() macro to handle sanity checks.
4681 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
4683 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4685 (read_unsigned_leb128): Removed.
4686 (read_signed_leb128): Removed.
4687 (find_abstract_instance_name): Updated.
4688 (parse_comp_unit): Accept info_ptr_unit.
4689 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4690 comp unit and pass it to parse_comp_unit.
4692 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4693 (read_signed_leb128): Moved to ...
4696 * libbfd-in.h (read_unsigned_leb128): New prototype.
4697 (read_signed_leb128): Likewise.
4698 * libbfd.h: Regenerated.
4700 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
4701 Nick Clifton <nickc@redhat.com>
4703 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4704 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4705 arch_sh4a_nofpu_up in order to match the external names and make the
4706 testsuite's job easier.
4707 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4709 * bfd-in2.h: Regenerate.
4711 2005-01-15 Andrew Cagney <cagney@gnu.org>
4714 * acinclude.m4: Move BFD_NEED_DECLARATION,
4715 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4716 the new file bfd.m4. Include ../bfd/bfd.m4.
4717 * configure: Re-generate.
4719 2005-01-12 Alan Modra <amodra@bigpond.net.au>
4721 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4722 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4724 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4725 R_PPC_RELAX32PC_PLT.
4727 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4729 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4731 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4732 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4733 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4734 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4735 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4736 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4737 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4738 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4739 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4740 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4741 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4742 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4743 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4744 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4746 2005-01-11 Alan Modra <amodra@bigpond.net.au>
4748 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4751 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
4753 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4754 * bfd-in2.h: Regenerate.
4755 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4756 to support these new machine values.
4757 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4759 (bfd_maxq_arch): Update values for the maxq20.
4761 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
4763 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4764 non-shared object, do not reserve space in .plt and .rela.plt for
4765 regular symbols neither defined nor referenced in shared objects.
4767 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4769 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4770 to zero the structure.
4771 (create_got_section): Use BFD_ASSERT instead of abort.
4772 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4774 (create_got_section): New function.
4775 (sparc64_elf_create_dynamic_sections): Likewise.
4776 (sparc64_elf_check_relocs): Invoke create_got_section instead of
4777 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
4778 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4779 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4780 (sparc64_elf_finish_dynamic_symbol): Likewise.
4781 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4782 (elf_backend_create_dynamic_sections): Define to
4783 sparc64_elf_create_dynamic_sections.
4785 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
4787 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4788 (elf_backend_omit_section_dynsym): Define to it.
4789 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4790 (elf_backend_omit_section_dynsym): Define to it.
4792 2005-01-07 Jakub Jelinek <jakub@redhat.com>
4794 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4795 PT_DYNAMIC segment, unless .dynamic.
4797 2005-01-06 Paul Brook <paul@codesourcery.com>
4799 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4800 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4801 * configure: Regenerate.
4802 * elf32-arm.c: Add VxWorks target bfd.
4804 (elf32_arm_link_hash_table): Add use_rel.
4805 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4806 elf32_arm_relocate_section): Replace USE_REL with runtime check.
4807 Correct offset calculation for RELA case.
4808 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4809 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4810 (elf32_arm_vxworks_link_hash_table_create): New function.
4811 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4812 (bfd_elf32_littlearm_vxworks_vec): Ditto.
4813 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4815 2005-01-06 Alan Modra <amodra@bigpond.net.au>
4817 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4819 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4820 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4821 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4822 (ppc64_elf_next_toc_section): Heed no_multi_toc.
4823 (ppc64_elf_reinit_toc): Set multi_toc_needed.
4824 (toc_adjusting_stub_needed): Rewrite.
4825 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4826 toc tests. Adjust for toc_adjusting_stub_needed changes.
4827 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4828 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4829 * section.c: Expand comment on backend bits.
4830 * bfd-in2.h: Regenerate.
4831 * libbfd.h: Regenerate.
4833 2005-01-06 Alan Modra <amodra@bigpond.net.au>
4835 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4836 toc adjusting stub, do not test source section flags.
4838 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
4840 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4841 from STABS debugging sections again.
4843 2005-01-05 Fred Fish <fnf@specifixinc.com>
4845 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4846 (find_abstract_instance_name): New function.
4847 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4848 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4849 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4851 2004-12-31 Paul Brook <paul@copdesourcery.com>
4853 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4855 2004-12-31 Alan Modra <amodra@bigpond.net.au>
4857 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4858 Commit missing changes from 2004-12-22.
4859 * bfd-in2.h: Regenerate.
4861 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
4863 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4865 2004-12-21 Kris Warkentin <kewarken@qnx.com>
4867 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4868 Add 'base' argument for constructing register sections. Reformat.
4869 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4870 gp and fp regs. Reformat.
4872 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
4874 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4875 * bfd-in2.h: Regenerate.
4876 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4877 (avr_reloc_map): Likewise.
4878 (avr_final_link_relocate): Likewise.
4880 2004-12-22 Alan Modra <amodra@bigpond.net.au>
4882 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4883 as-needed dynamic libs as undefined.
4884 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4885 libs when finding they are needed.
4887 2004-12-20 Alan Modra <amodra@bigpond.net.au>
4889 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4890 (opd_entry_value): Use opd_relocs if available.
4891 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
4892 copy .opd relocations to opd_relocs.
4893 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4895 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
4897 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4898 * elf32-v850.c (v850_elf_howto_table): Add entry for
4899 R_V850_LO16_SPLIT_OFFSET.
4900 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4901 (v850_elf_perform_lo16_relocation): New function, extracted from...
4902 (v850_elf_perform_relocation): ...here. Use it to handle
4903 R_V850_LO16_SPLIT_OFFSET.
4904 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4905 R_V850_LO16_SPLIT_OFFSET.
4906 * libbfd.h, bfd-in2.h: Regenerate.
4908 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
4910 * config.bfd: Add s390x-ibm-tpf support.
4912 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
4914 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
4915 to prototype, to make hash info available.
4916 Prevent wrapped symbols from being adjusted twice.
4918 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
4920 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4921 overflow for calls to undefined weak symbols.
4923 2004-12-11 Alan Modra <amodra@bigpond.net.au>
4925 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4926 canonical sections syms have a name.
4928 2004-12-11 Alan Modra <amodra@bigpond.net.au>
4930 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4931 have been adjusted for output.
4932 (ppc64_elf_relocate_section): Mark sections with reloc_done.
4934 2004-12-10 Alan Modra <amodra@bigpond.net.au>
4936 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4937 add symtab_hdr param.
4938 (group_signature): Update calls.
4939 * elf-bfd.h (bfd_elf_sym_name): Update.
4940 * elf32-ppc.c (ppc_elf_relocate_section): Update.
4941 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4942 (ppc64_elf_relocate_section): Update.
4943 * elflink.c (elf_link_input_bfd): Update.
4945 2004-12-10 Jakub Jelinek <jakub@redhat.com>
4947 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4948 st_shndx on STT_SECTION sections.
4950 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
4952 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4953 ELF section symbols.
4955 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
4957 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4958 return a real value, unless it is a PLT symbol.
4959 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4962 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4963 R_MIPS_JALR entry to 0.
4965 * archures.c: Define bfd_mach_mips9000.
4966 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4967 (mips_set_isa_flags): Handle bfd_mach_mips9000.
4968 * cpu-mips.c (I_mips9000): Define.
4969 (arch_info_struct): Add case for bfd_mach_mips9000.
4970 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4971 * bfd-in2.h: Regenerate.
4973 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
4975 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4978 2004-12-07 Ben Elliston <bje@gnu.org>
4980 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4982 2004-12-06 Daniel Jacobowitz <dan@debian.org>
4984 Suggested by Fergal Daly <fergal@esatclear.ie>:
4985 * simple.c (simple_dummy_multiple_definition): New function.
4986 (bfd_simple_get_relocated_section_contents): Use it.
4988 2004-12-03 Jan Beulich <jbeulich@novell.com>
4990 * elf.c (elf_find_function): Don't use the last file symbol ever,
4991 seen, but the last one seen prior to the symbol being reported.
4992 Don't report a filename at all for global symbols when that might
4995 2004-12-01 Paul Brook <paul@codesourcery.com>
4997 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4998 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
5001 2004-12-01 Paul Brook <paul@codesourcery.com>
5003 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
5006 2004-11-30 Paul Brook <paul@codesourcery.com>
5008 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
5009 no_pipeline_knowledge
5010 (elf32_arm_link_hash_table_create): Ditto.
5011 (bfd_elf32_arm_process_before_allocation): Ditto.
5012 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
5014 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5016 * bfd-in2.h: Regenerate.
5018 2004-11-30 Randolph Chung <tausq@debian.org>
5020 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
5021 (elf32_hppa_grok_psinfo): New function.
5022 (elf_backend_grok_prstatus): Define.
5023 (elf_backend_grok_psinfo): Define.
5025 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
5028 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
5030 2004-11-24 Paul Brook <paul@codesourcery.com>
5032 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
5034 2004-11-24 Paul Brook <paul@codesourcery.com>
5036 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
5037 (elf32_arm_swap_symbol_out): New function.
5038 (elf32_arm_size_info): Add.
5039 (elf_backend_size_info): Define.
5041 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5043 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
5046 2004-11-19 Alan Modra <amodra@bigpond.net.au>
5048 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
5049 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
5050 * nlmcode.h (nlm_write_object_contents): Warning fix.
5052 2004-11-18 Bob Wilson <bob.wilson@acm.org>
5054 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
5056 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
5058 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
5059 (elf32_arm_plt_thumb_stub): New.
5060 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
5062 (elf32_arm_link_hash_traverse): Fix typo.
5063 (elf32_arm_link_hash_table): Add obfd.
5064 (elf32_arm_link_hash_newfunc): Initialize new fields.
5065 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
5066 (elf32_arm_link_hash_table_create): Initialize obfd.
5067 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
5068 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
5069 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
5070 interworking BFD is not dynamic.
5071 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
5072 not emit glue for PLT references.
5073 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
5074 emit glue for PLT references. Support the Thumb PLT prefix.
5075 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
5077 (elf32_arm_check_relocs): Likewise.
5078 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
5080 (allocate_dynrelocs): Handle Thumb PLT references.
5081 (elf32_arm_finish_dynamic_symbol): Likewise.
5082 (elf32_arm_symbol_processing): New function.
5083 (elf_backend_symbol_processing): Define.
5085 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
5087 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
5088 add_fde_encoding. Remove need_relative.
5089 * elf-eh-frame.c (extra_augmentation_string_bytes)
5090 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
5091 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
5092 in cases where the CIE has no existing 'R' augmentation. Use
5093 size_of_output_cie_fde when assigning offsets. Use the final offset
5094 as the new section size.
5095 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
5096 Account for any extra augmentation bytes in the returned offset.
5097 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
5098 moved before being modified. Pad growing entries with DW_CFA_nops.
5099 Add 'z' and 'R' augmentations as directed by add_augmentation_size
5100 and add_fde_encoding.
5102 2004-11-15 Mark Mitchell <mark@codesourcery.com>
5104 * elf32-arm.c (elf32_arm_relocate_section): Use
5105 arm_real_reloc_type.
5107 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
5109 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
5110 for discard relocations; don't add an R_MIPS_NONE to the main body
5113 2004-11-04 Paul Brook <paul@codesourcery.com>
5115 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
5116 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
5117 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
5118 default version definition for unversioned symbols.
5119 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
5120 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
5121 _bfd_elf_slurp_version_tables. Set default version for unversioned
5124 2004-11-15 Paul Brook <paul@codesourcery.com>
5126 * elflink.c (elf_link_add_object_symbols): Don't assume version
5127 indices are consecutive.
5129 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
5131 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
5132 composite relocations against the personality data.
5134 2004-11-13 Paul Brook <paul@codesourcery.com>
5136 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
5137 R_ARM_PREL31 relocations to PLT entries.
5138 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
5139 (elf32_arm_check_relocs): Ditto.
5141 2004-11-12 Bob Wilson <bob.wilson@acm.org>
5143 * xtensa-isa.c (xtensa_interface_class_id): New.
5145 2004-11-11 Bob Wilson <bob.wilson@acm.org>
5147 * elf32-xtensa.c (property_table_compare): Remove assertion about
5148 entries with the same address and non-zero size.
5149 (xtensa_read_table_entries): Report such entries as errors.
5151 2004-11-11 Mark Mitchell <mark@codesourcery.com>
5153 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
5154 R_ARM_RELATIVE on Symbian OS.
5156 2004-11-09 Mark Mitchell <mark@codesourcery.com>
5158 * som.c (som_bfd_print_private_bfd_data): New function.
5159 (som_object_setup): Save the auxiliary header. Don't assume that
5160 zero is an invalid entry point for a shared library.
5161 (som_object_p): Allocate the auxiliary header on the heap.
5163 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
5165 (elf32_arm_symbian_modify_segment_map): Likewise.
5167 2004-11-09 Daniel Jacobowitz <dan@debian.org>
5169 From David Poole <daveml@mbuf.com>:
5170 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
5171 (elf32_arm_size_dynamic_sections): Call it.
5173 2004-11-09 Alan Modra <amodra@bigpond.net.au>
5175 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
5176 (ALL_MACHINES_CFILES): Fix typo.
5177 * Makefile.in: Regenerate.
5178 * po/SRC-POTFILES.in: Regenerate.
5180 2004-11-08 Mark Mitchell <mark@codesourcery.com>
5182 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
5183 R_ARM_RELATIVE relocation for Symbian OS, mention the section
5184 symbol in the relocation.
5186 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
5187 Vineet Sharma <vineets@noida.hcltech.com>
5189 * coff-maxq.c: New File.
5190 * cpu-maxq.c: New File.
5191 * coffcode.h: Likewise.
5192 * config.bfd: Likewise.
5193 * configure.in (maxqcoff_vec): New target vector.
5194 * Makefile.am: Add support for maxq target.
5195 * configure.in: Likewise.
5196 * archures.c:. Likewise.
5197 * targets.c: Likewise.
5198 * bfd_in2.h : Regenerated.
5199 * Makefile.in: Regenerated.
5200 * configure: Regenerated.
5201 * doc/Makefile.in: Regenerated.
5203 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5205 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
5206 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
5207 C_NT_WEAK aux entries.
5208 (_bfd_coff_generic_relocate_section): Handle undefined
5211 2004-11-07 Andreas Schwab <schwab@suse.de>
5213 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
5214 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
5215 non-default visibility.
5217 2004-11-01 Mark Mitchell <mark@codesourcery.com>
5219 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
5221 (elf32_arm_symbian_modify_segment_map): Don't
5222 reset includes_filehdr and includes_phdrs here.
5224 2004-11-04 Daniel Jacobowitz <dan@debian.org>
5226 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
5227 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
5228 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
5230 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
5231 to a new removed list. Remove normal configuration stanzas.
5232 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
5233 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
5234 elfarm-nabi.lo with elf32-arm.lo.
5235 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
5236 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
5237 * elf32-arm.h: Remove.
5238 * elfarm-oabi.c: Remove.
5239 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
5240 and bfd_elf32_littlearm_oabi_vec.
5241 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
5243 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
5245 * config.bfd: Support crisv32-*-* like cris-*-*.
5246 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
5247 (bfd_mach_cris_v10_v32): New macros.
5248 * cpu-cris.c: Tweak formatting.
5249 (get_compatible): New function.
5251 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
5252 bfd_arch_info_type:s.
5253 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
5254 get_compatible for member compatible and link bfd_cris_arch_v32 as
5256 * elf32-cris.c (cris_elf_pcrel_reloc)
5257 (cris_elf_set_mach_from_flags): New functions.
5258 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
5259 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
5260 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
5261 numbers for bfd_mach_cris_v32.
5262 (PLT_ENTRY_SIZE_V32): New macro.
5263 (elf_cris_plt0_entry): Drop last comma in initializer.
5264 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
5265 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
5267 (cris_elf_relocate_section): Change all "%B(%A)" messages to
5269 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
5270 (elf_cris_finish_dynamic_sections): Similar.
5271 (elf_cris_adjust_dynamic_symbol): Similar.
5272 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
5274 <switch with PIC relocs>: Emit error and return FALSE for
5275 bfd_mach_cris_v10_v32.
5276 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5277 Emit warning when generating textrel reloc.
5278 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
5279 (cris_elf_final_write_processing): Set flags according to mach.
5280 (cris_elf_print_private_bfd_data): Display
5281 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
5282 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
5283 new_flags. Don't call cris_elf_final_write_processing. Don't
5284 look at the actual elf header flags at all; use
5285 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
5286 in bfd_get_mach for ibfd and obfd and handle merging of compatible
5288 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5289 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
5290 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
5291 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
5292 * bfd-in2.h, libbfd.h: Regenerate.
5294 2004-11-04 Alan Modra <amodra@bigpond.net.au>
5296 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
5297 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
5299 (struct adjust_toc_info): New.
5300 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
5302 2004-11-03 Bob Wilson <bob.wilson@acm.org>
5304 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
5305 if there are no segments.
5307 2004-11-02 Daniel Jacobowitz <dan@debian.org>
5309 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
5311 2004-11-02 Nick Clifton <nickc@redhat.com>
5313 * elf32-iq2000.c: Convert to ISO C90 formatting.
5315 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
5317 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
5319 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
5321 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
5322 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
5323 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
5325 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5327 * elf32-sh.c (tpoff): Take alignment into account.
5329 2004-10-28 Nick Clifton <nickc@redhat.com>
5331 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
5332 performing a relocatable link.
5333 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
5334 for MIPS ports under Irix.
5336 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
5338 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
5339 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
5340 (elf32_arm_final_link_relocate): Ditto.
5341 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
5342 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
5343 (elf32_arm_adjust_dynamic_symbol): Ditto.
5344 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
5345 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
5346 (elf32_arm_r_howto): ... To here.
5347 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
5349 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
5352 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
5353 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
5354 and R_IA64_SECREL64LSB.
5356 2004-10-26 Paul Brook <paul@codesourcery.com>
5358 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
5359 (bfd_elf_size_dynamic_sections): Create default version definition.
5360 (elf_link_output_extsym): Adjust for default symbol version.
5362 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5364 * mmo.c: Adjust to ISO C.
5366 * mmo.c (mmo_write_section_description): New function broken out
5367 of mmo_internal_write_section.
5368 (mmo_internal_write_section): For each of .text and .data, call
5369 mmo_write_section_description before outputting contents if it has
5370 nontrivially deducible vma or contents.
5371 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
5372 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
5373 symbols if found within the .data address range.
5375 2004-10-24 Daniel Jacobowitz <dan@debian.org>
5377 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
5379 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
5381 * mmo.c (File Layout): Correct place of misplaced blurb about
5384 2004-10-22 Mark Kettenis <kettenis@gnu.org>
5386 * config.bfd: Add mips64*-*-openbsd.
5388 2004-10-21 Bob Wilson <bob.wilson@acm.org>
5390 * elf32-xtensa.c (ebb_propose_action): Put declarations before
5393 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5395 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
5396 * configure: Regenerate.
5398 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
5401 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
5402 to linker reloc_overflow callback.
5403 (aout_link_input_section_ext): Likewise.
5404 (aout_link_reloc_link_order): Likewise.
5405 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5406 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5408 (alpha_relocate_section): Likewise.
5409 * coff-arm.c (coff_arm_relocate_section): Likewise.
5410 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
5411 * coff-h8500.c (extra_case): Likewise.
5412 * coff-i960.c (coff_i960_relocate_section): Likewise.
5413 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5414 * coff-mips.c (mips_relocate_section): Likewise.
5415 * coff-or32.c (coff_or32_relocate_section): Likewise.
5416 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5417 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
5418 * coff-sh.c (sh_relocate_section): Likewise.
5419 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5420 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
5421 * coff-z8k.c (extra_case): Likewise.
5422 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
5423 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
5424 (_bfd_coff_generic_relocate_section): Likewise.
5425 * ecoff.c (ecoff_reloc_link_order): Likewise.
5426 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
5427 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5428 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5429 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5430 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5431 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
5432 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5433 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
5434 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5435 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5436 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5437 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5438 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5439 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5440 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5441 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5442 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5443 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
5444 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5445 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
5446 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5447 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5448 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
5449 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5450 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5451 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5452 * elf32-sh.c (sh_elf_relocate_section): Likewise.
5453 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5454 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5455 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5456 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5457 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5458 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
5459 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5460 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5461 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5462 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5463 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5464 * elflink.c (elf_reloc_link_order): Likewise.
5465 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5466 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
5467 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
5468 * linker.c (_bfd_generic_reloc_link_order): Likewise.
5469 * pdp11.c (pdp11_aout_link_input_section): Likewise.
5470 (aout_link_reloc_link_order): Likewise.
5471 * reloc.c (bfd_generic_get_relocated_section_contents):
5473 * xcofflink.c (xcoff_reloc_link_order): Likewise.
5474 * simple.c (simple_dummy_reloc_overflow): Updated.
5476 2004-10-20 Andreas Schwab <schwab@suse.de>
5478 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
5479 (elf_backend_plt_sym_val): Define.
5481 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
5483 * config.bfd: Set targ_underscore=yes for PE COFF targets
5485 2004-10-19 Alan Modra <amodra@bigpond.net.au>
5487 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
5488 (ppc64_elf_edit_opd): Likewise.
5490 2004-10-18 Mark Mitchell <mark@codesourcery.com>
5492 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
5493 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
5494 set SEC_ALLOC and SEC_LOAD.
5496 2004-10-18 Nick Clifton <nickc@redhat.com>
5498 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
5499 'name' for relocs against both local and global symbols.
5501 2004-10-16 Daniel Jacobowitz <dan@debian.org>
5503 * bfd-in2.h: Regenerate.
5504 * bfd.c (struct bfd): Add no_export.
5505 * elflink.c (elf_link_add_object_symbols): Handle no_export.
5507 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5509 * config.bfd: Whitespace cleanup.
5510 * Makefile.am: Run "make dep-am"
5511 * Makefile.in: Regenerate.
5513 2004-10-15 Jakub Jelinek <jakub@redhat.com>
5515 * elflink.c (struct already_linked_section): Removed.
5516 (try_match_symbols_in_sections, already_linked): Removed.
5517 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
5518 prefix of section names when finding already_linked_table
5519 chain. Compare section names. Instead of calling already_linked,
5520 do it inline and only for sections in the same already_linked_list.
5522 2004-10-15 Alan Modra <amodra@bigpond.net.au>
5524 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
5525 parameter. If called after _bfd_elf_write_section_eh_frame,
5526 don't allow a -2 return unless need_* bit is already set, and
5527 handle offsets adjusted for output_offset.
5528 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
5529 * elf.c (_bfd_elf_section_offset): Update call.
5531 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
5534 * coffcode.h (coff_compute_section_file_positions): Cast to
5535 bfd_vma when computing page alignment.
5537 2004-10-13 Mark Mitchell <mark@codesourcery.com>
5539 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5540 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
5542 2004-10-12 Mark Mitchell <mark@codesourcery.com>
5544 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
5545 relocations use a virtual address, not a section offset.
5547 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5549 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
5550 (narrow_instruction, widen_instruction): Remove unnecessary calls to
5551 xtensa_format_encode.
5552 (ebb_propose_action): Inline call to ebb_add_proposed_action.
5553 (ebb_add_proposed_action): Delete.
5555 2004-10-12 Bob Wilson <bob.wilson@acm.org>
5557 * elf32-xtensa.c: Use ISO C90 formatting.
5559 2004-10-12 Paul Brook <paul@codesourcery.com>
5561 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
5564 2004-10-12 Paul Brook <paul@codesourcery.com>
5566 * elf32-arm.h: Support EABI version 4 objects.
5568 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5571 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
5572 Don't mark as default.
5573 (bfd_x86_64_arch): Don't mark as default.
5575 2004-10-12 Alan Modra <amodra@bigpond.net.au>
5577 * elflink.c (enum action_discarded): New.
5578 (elf_section_complain_discarded): Delete.
5579 (elf_action_discarded): New function subsuming the above and also
5580 controlling reloc behaviour.
5581 (elf_link_input_bfd): Use it.
5583 2004-10-11 Jakub Jelinek <jakub@redhat.com>
5585 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
5586 (special_sections): Add .gnu.liblist and .gnu.conflict.
5587 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
5589 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5592 * elflink.c (elf_link_input_bfd): Try harder to support
5593 relocations against symbols in removed linkonce sections.
5595 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5597 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
5600 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
5601 sections do not reference symbols in non-SEC_ALLOC sections.
5603 2004-10-11 Alan Modra <amodra@bigpond.net.au>
5606 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
5607 (_bfd_elf_link_omit_section_dynsym): Formatting.
5609 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5611 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
5612 * libbfd.h: Regnerate.
5613 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
5614 * elf32-frv.c: Likewise.
5615 * elf32-m32r.c: Likewise.
5616 * elf32-ppc.c: Likewise.
5617 * elf64-hppa.c: Likewise.
5618 * elfxx-ia64.c: Likewise.
5619 * opncls.c: Likewise.
5621 2004-10-10 Alan Modra <amodra@bigpond.net.au>
5623 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
5624 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
5625 offsets stored in struct eh_cie_fde entries before doing other
5628 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
5629 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
5630 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
5631 setting offsets for removed CIEs. Don't set "sec", instead set
5632 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
5633 CIE in hdr_info. Only set make_relative and make_lsda_relative
5634 for CIEs. Use pointers rather than array indices.
5635 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
5636 make_lsda_relative, need_* on cie_inf for FDEs.
5637 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
5638 section output_offset. Delete cie_offset, instead use cie_inf
5639 pointer to CIE entry. Use need_relative and need_lsda_relative on
5640 CIE entry for FDEs. Use pointers rather than array indices.
5642 2004-10-09 Alan Modra <amodra@bigpond.net.au>
5644 * coff-rs6000.c (rs6000coff_vec): Add initializer for
5645 bfd_is_target_special_symbol.
5646 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5647 * som.c (som_bfd_is_target_special_symbol): Define.
5649 2004-10-08 Nick Clifton <nickc@redhat.com>
5651 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
5652 * configure: Regenerate.
5653 * bfd-in2.h: Regenerate.
5654 * syms.c (bfd_is_target_special_symbol): New interface function.
5655 Returns true when a symbol should be considered to be special.
5656 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
5657 the symbol jump table.
5658 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5659 Return true iff the symbol is a mapping symbol.
5660 (bfd_elf32_bfd_is_target_special_symbol): Define.
5661 * elfxx-target.h: Provide a default definition for
5662 bfd_is_target_special_symbol.
5663 * aout-target.h: Likewise.
5664 * aout-tic30.c: Likewise.
5665 * binary.c: Likewise.
5666 * coffcode.h: Likewise.
5667 * i386msdos.c: Likewise.
5670 * libaout.h: Likewise.
5671 * libbfd-in.h: Likewise
5672 * libecoff.h: Likewise.
5673 * mach-o.c: Likewise.
5675 * nlm-target.h: Likewise.
5676 * oasys.c: Likewise.
5678 * ppcboot.c: Likewise.
5680 * tekhex.c: Likewise.
5681 * versados.c: Likewise.
5683 * xcoff-target.h: Likewise.
5685 * libbfd.h: Regenerate.
5687 2004-10-08 Daniel Jacobowitz <dan@debian.org>
5689 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5690 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5691 (elf_backend_section_from_shdr): Define.
5693 2004-10-08 Alan Modra <amodra@bigpond.net.au>
5695 * syms.c (bfd_is_local_label): Return false for file symbols.
5697 2004-10-07 Bob Wilson <bob.wilson@acm.org>
5698 David Heine <dlheine@tensilica.com>
5700 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5701 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5702 (elf32xtensa_no_literal_movement): New global variable.
5703 (elf_howto_table): Add entries for new relocations.
5704 (elf_xtensa_reloc_type_lookup): Handle new relocations.
5705 (property_table_compare): When addresses are equal, compare sizes and
5706 various property flags.
5707 (property_table_matches): New.
5708 (xtensa_read_table_entries): Extend to read new property tables. Add
5709 output_addr parameter to indicate that output addresses should be used.
5710 Use bfd_get_section_limit.
5711 (elf_xtensa_find_property_entry): New.
5712 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5713 (elf_xtensa_check_relocs): Handle new relocations.
5714 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
5715 relocations. Use new xtensa-isa.h functions.
5716 (build_encoding_error_message): Remove encode_result parameter. Add
5717 new target_address parameter used to detect alignment errors.
5718 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
5719 error handling. Use new is_operand_relocation function.
5720 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5721 Use underbar macro for error messages. Formatting.
5722 (get_const16_opcode): New.
5723 (get_l32r_opcode): Add a separate flag for initialization.
5724 (get_relocation_opnd): Operand number is no longer explicit in the
5725 relocation. Change to decode the opcode and analyze its operands.
5726 (get_relocation_slot): New.
5727 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
5728 Use new xtensa-isa.h functions to handle multislot instructions.
5729 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
5730 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5731 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5732 check_loop_aligned, check_branch_target_aligned_address, narrowable,
5733 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5734 get_single_format, init_op_single_format_table): New.
5735 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5736 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
5737 (contract_asm_expansion): Add error_message parameter and pass it to
5738 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
5739 with R_XTENSA_SLOT0_OP.
5740 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5741 instructions. Use new xtensa-isa.h functions.
5742 (r_reloc struct): Add new virtual_offset field.
5743 (r_reloc_init): Add contents and content_length parameters. Set
5744 virtual_offset field to zero. Add contents to target_offset field for
5745 partial_inplace relocations.
5746 (r_reloc_is_defined): Check for null.
5747 (print_r_reloc): New debug function.
5748 (source_reloc struct): Replace xtensa_operand field with pair of the
5749 opcode and the operand position. Add is_abs_literal field.
5750 (init_source_reloc): Specify operand by opcode/position pair. Set
5751 is_abs_literal field.
5752 (source_reloc_compare): When target_offsets are equal, compare other
5753 fields to make sorting predictable.
5754 (literal_value struct): Add is_abs_literal field.
5755 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5756 (init_literal_value): New.
5757 (is_same_value): Replace with ...
5758 (literal_value_equal): ... this function. Add comparisons of
5759 virtual_offset and is_abs_literal fields.
5760 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
5761 failure. Initialize has_last_loc field.
5762 (value_map_hash_table_delete): New.
5763 (hash_literal_value): Rename to ...
5764 (literal_value_hash): ... this. Include is_abs_literal flag and
5765 virtual_offset field in the hash value.
5766 (get_cached_value): Rename to ...
5767 (value_map_get_cached_value): ... this. Update calls to
5768 literal_value_hash and literal_value_equal.
5769 (add_value_map): Check for allocation failure. Update calls to
5770 value_map_get_cached_value and literal_value_hash.
5771 (text_action, text_action_list, text_action_t): New types.
5772 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5773 text_action_add, text_action_add_literal, offset_with_removed_text,
5774 offset_with_removed_text_before_fill, find_insn_action,
5775 print_action_list, print_removed_literals): New.
5776 (offset_with_removed_literals): Delete.
5777 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5778 fix_array, fix_array_count, allocated_relocs, relocs_count, and
5779 allocated_relocs_count fields.
5780 (init_xtensa_relax_info): Initialize new fields.
5781 (reloc_bfd_fix struct): Add new translated field.
5782 (reloc_bfd_fix_init): Add translated parameter and use it to set the
5784 (fix_compare, cache_fix_array): New.
5785 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5786 section via get_xtensa_relax_info. Use cache_fix_array to set up
5787 sorted fix_array and use bsearch instead of linear search.
5788 (section_cache_t): New struct.
5789 (init_section_cache, section_cache_section, clear_section_cache): New.
5790 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5791 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5792 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5793 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5795 (retrieve_contents): Use bfd_get_section_limit.
5796 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
5797 to compute_removed_literals. Free value_map_hash_table when no longer
5799 (analyze_relocations): Check is_relaxable_asm_section flag. Call
5800 compute_text_actions for all sections.
5801 (find_relaxable_sections): Mark sections as relaxable if they contain
5802 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
5803 call. Increment relax_info src_count field only for appropriate
5804 relocation types. Remove is_literal_section check.
5805 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
5806 r_reloc_init and find_associated_l32r_irel. Check
5807 is_relaxable_asm_section flag. Handle L32R instructions with absolute
5808 literals. Pass is_abs_literal flag to init_source_reloc.
5809 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
5810 CONST16 instructions. Adjust calls to r_reloc_init and
5811 pcrel_reloc_fits. Handle weak symbols conservatively.
5812 (find_associated_l32r_irel): Add bfd parameter and pass it to
5814 (compute_text_actions, compute_ebb_proposed_actions,
5815 compute_ebb_actions, check_section_ebb_pcrels_fit,
5816 check_section_ebb_reduces, text_action_add_proposed,
5817 compute_fill_extra_space): New.
5818 (remove_literals): Replace with ...
5819 (compute_removed_literals): ... this function. Call
5820 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
5821 Call xtensa_read_table_entries to get the property table. Skip
5822 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
5823 is_removable_literal, remove_dead_literal, and
5824 identify_literal_placement functions.
5825 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5826 instead of linear search.
5827 (is_removable_literal, remove_dead_literal,
5828 identify_literal_placement): New.
5829 (relocations_reach): Update check for literal not referenced by any
5830 PC-relative relocations. Adjust call to pcrel_reloc_fits.
5831 (coalesce_shared_literal, move_shared_literal): New.
5832 (relax_section): Use bfd_get_section_limit. Call
5833 translate_section_fixes. Update calls to r_reloc_init and
5834 offset_with_removed_text. Check new is_relaxable_asm_section flag.
5835 Add call to pin_internal_relocs. Add special handling for
5836 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
5837 info to calculate new addend_displacement variable. Replace code for
5838 deleting literals with more general code to perform the actions
5839 determined by the action_list for the section.
5840 (translate_section_fixes, translate_reloc_bfd_fix): New.
5841 (translate_reloc): Check new is_relaxable_asm_section flag. Call
5842 find_removed_literal only if is_operand_relocation. Update call to
5843 offset_with_removed_text. Use new target_offset and removed_bytes
5845 (move_literal): New.
5846 (relax_property_section): Use bfd_get_section_limit. Set new
5847 is_full_prop_section flag and handle new property tables. Update calls
5848 to r_reloc_init and offset_with_removed_text. Check
5849 is_relaxable_asm_section flag. Handle expansion of zero-sized
5850 unreachable entries, with use of offset_with_removed_text_before_fill.
5851 For relocatable links, combine entries only for literal tables.
5852 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
5853 calls to offset_with_removed_text. Translate st_size field for
5855 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5856 failure. Add contents parameter. Update call to get_bfd_fix. Update
5857 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
5858 R_XTENSA_ASM_EXPAND relocs.
5859 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
5860 call to get_bfd_fix. Include offset from contents for partial_inplace
5862 (is_reloc_sym_weak): New.
5863 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5864 (prop_sec_len): New.
5865 (xtensa_is_property_section): Handle new property sections.
5866 (is_literal_section): Delete.
5867 (internal_reloc_compare): When r_offset matches, compare r_info and
5868 r_addend to make sorting predictable.
5869 (internal_reloc_matches): New.
5870 (xtensa_get_property_section_name): Handle new property sections.
5871 (xtensa_get_property_predef_flags): New.
5872 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5873 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5874 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5875 (xtisa_errno, xtisa_error_msg): New variables.
5876 (xtensa_isa_errno, xtensa_isa_error_msg): New.
5877 (xtensa_insnbuf_alloc): Add error handling.
5878 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
5879 use xtensa_format_decode. Add error handling.
5880 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
5881 instruction length to find the number of bytes to copy.
5882 (xtensa_isa_init): Add error handling. Replace calls to
5883 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5884 tables in the xtensa_modules structure.
5885 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5886 xtensa_extend_isa): Delete.
5887 (xtensa_isa_free): Change to only free lookup tables.
5888 (opname_lookup_compare): Replace with ...
5889 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
5890 (xtensa_insn_maxlength): Rename to ...
5891 (xtensa_isa_maxlength): ... this.
5892 (xtensa_insn_length): Delete.
5893 (xtensa_insn_length_from_first_byte): Replace with ...
5894 (xtensa_isa_length_from_chars): ... this function.
5895 (xtensa_num_opcodes): Rename to ...
5896 (xtensa_isa_num_opcodes): ... this.
5897 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5898 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5899 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5900 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5901 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5902 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5903 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5904 (xtensa_opcode_lookup): Add error handling.
5905 (xtensa_decode_insn): Replace with ...
5906 (xtensa_opcode_decode): ... this function, with new format and
5907 slot parameters. Add error handling.
5908 (xtensa_encode_insn): Replace with ...
5909 (xtensa_opcode_encode): ... this function, which does the encoding via
5910 one of the entries in the "encode_fns" array. Add error handling.
5911 (xtensa_opcode_name): Add error handling.
5912 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5913 xtensa_opcode_is_call): New.
5914 (xtensa_num_operands): Replace with ...
5915 (xtensa_opcode_num_operands): ... this function. Add error handling.
5916 (xtensa_opcode_num_stateOperands,
5917 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5918 xtensa_opcode_funcUnit_use, xtensa_operand_name,
5919 xtensa_operand_is_visible): New.
5920 (xtensa_get_operand, xtensa_operand_kind): Delete.
5921 (xtensa_operand_inout): Add error handling and special-case for
5923 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5924 operate on one slot of an instruction. Added error handling.
5925 (xtensa_operand_encode): Handle default operands with no encoding
5926 functions. Check for success by comparing against decoded value.
5928 (xtensa_operand_decode): Handle default operands. Return decoded value
5929 through argument pointer. Add error handling.
5930 (xtensa_operand_is_register, xtensa_operand_regfile,
5931 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5932 (xtensa_operand_isPCRelative): Rename to ...
5933 (xtensa_operand_is_PCrelative): ... this. Add error handling.
5934 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5935 through argument pointer. Add error handling.
5936 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5937 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5938 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5939 xtensa_regfile_shortname, xtensa_regfile_view_parent,
5940 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5941 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5942 xtensa_state_is_exported, xtensa_sysreg_lookup,
5943 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5944 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5945 xtensa_interface_num_bits, xtensa_interface_inout,
5946 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5947 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5948 * xtensa-modules.c: Rewrite to use new data structures.
5949 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5950 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5951 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5952 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5953 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5954 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5955 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5956 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5957 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5958 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5959 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5960 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5961 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5962 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5963 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5964 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5965 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5966 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5967 * Makefile.in: Regenerate.
5968 * bfd-in2.h: Likewise.
5969 * libbfd.h: Likewise.
5971 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
5973 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5974 against the absolute section.
5975 (mips_elf64_write_rela): Likewise.
5977 2004-10-07 Jan Beulich <jbeulich@novell.com>
5979 * elf.c (elf_find_function): Don't generally check for matching
5980 section, just for non-file symbols. Remove redunant comparison
5982 * elf32-arm.h (arm_elf_find_function): Likewise.
5984 2004-10-07 Jeff Baker <jbaker@qnx.com>
5986 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5987 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5990 2004-10-04 Roland McGrath <roland@redhat.com>
5992 * hash.c (bfd_hash_set_default_size): Use const for table.
5993 Use size_t instead of int for variable compared to sizeof results.
5995 2004-10-05 Alan Modra <amodra@bigpond.net.au>
5998 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
6000 2004-10-01 Paul Brook <paul@codesourcery.com>
6002 * elf32-arm.h (elf32_arm_fake_sections,
6003 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
6005 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
6007 2004-10-01 Alan Modra <amodra@bigpond.net.au>
6009 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
6011 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
6012 need_relative or need_lsda_relative if we are processing an
6013 offset for a reloc on a FDE initial loc or LSDA field
6015 (_bfd_elf_write_section_eh_frame): Test need_relative and
6016 need_lsda_relative in place of corresponding make_* field
6017 when deciding to use pc-relative encodings.
6019 2004-09-30 Paul Brook <paul@codesourcery.com>
6021 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
6022 target2 relocation type.
6024 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
6027 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
6029 2004-09-30 Paul Brook <paul@codesourcery.com>
6031 * reloc.c: Add BFD_RELOC_ARM_SMI.
6032 * bfd-in2.h: Regenerate.
6035 2004-09-24 Alan Modra <amodra@bigpond.net.au>
6037 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
6038 vma and output offset to address.
6039 * simple.c (simple_save_output_info): Only set output section
6040 and offset for debug sections, or those not already set up by
6042 (bfd_simple_get_relocated_section_contents): Update comment.
6044 2004-09-24 Alan Modra <amodra@bigpond.net.au>
6046 * elf.c (IS_LOADED): Delete.
6047 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
6048 Restore SEC_HAS_CONTENTS test to the one place it was used prior
6051 2004-09-23 Alan Modra <amodra@bigpond.net.au>
6054 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
6055 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
6056 redundant assignment of EM_SPARC.
6058 2004-09-22 Brian Ford <ford@vss.fsi.com>
6060 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6061 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
6063 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6065 2004-09-22 Alan Modra <amodra@bigpond.net.au>
6067 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
6068 (elf_backend_modify_segment_map): Don't define.
6070 2004-09-22 Alan Modra <amodra@bigpond.net.au>
6072 * elf.c (IS_LOADED): Define.
6073 (assign_file_positions_for_segments): Don't round up file offset of
6074 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
6075 Delete code handling link script adjustment of lma. Do the adjust
6076 in later code handling similar ajustments. Remove dead code error
6077 check. Warn if section lma would require a negative offset
6078 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
6079 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
6080 update voff in section loop. Change voff in segment loop to be an
6081 adjustment on top of "off". Set sec->filepos and update "off" later.
6082 Test for loadable sections consistently using IS_LOADED. Similarly,
6083 test for alloc-only sections other than .tbss consistently.
6084 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
6085 Tidy PT_NOTE handling. Use %B and %A in error messages.
6086 (assign_file_positions_except_relocs): Use %B in error message.
6088 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
6090 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
6091 (CONFIG_STATUS_DEPENDENCIES): New.
6092 (Makefile): Removed.
6093 (config.status): Likewise.
6094 * Makefile.in: Regenerated.
6096 2004-09-17 Paul Brook <paul@codesourcery.com>
6098 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
6099 (bfd_elf32_arm_process_before_allocation): Update prototype.
6100 * bfd-in2.h: Regenerate.
6101 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
6102 (elf32_arm_link_hash_table_create): Set it.
6103 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
6104 (bfd_elf32_arm_set_target_relocs): New function.
6105 (arm_real_reloc_type): New function.
6106 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
6107 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
6108 (elf32_arm_gc_sweep_hook): Ditto.
6109 (elf32_arm_check_relocs): Ditto.
6110 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
6111 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
6113 (elf32_arm_got_prel): New variable.
6114 (elf32_arm_howto_from_type): New function.
6115 (elf32_arm_info_to_howto): Use it.
6116 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
6117 BFD_RELOC_ARM_TARGET2.
6118 * libbfd.h: Regenerate.
6119 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
6121 2004-09-17 Alan Modra <amodra@bigpond.net.au>
6123 * ecoff.c: Update u.undef.next refs.
6124 * elf64-ppc.c: Likewise.
6125 * elflink.c: Likewise.
6126 * linker.c: Likewise.
6127 * xcofflink.c: Likewise.
6129 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
6130 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
6131 fields to indirect struct.
6132 * elf-m10300.c: Update u.weakdef refs.
6133 * elf32-arm.h: Likewise.
6134 * elf32-cris.c: Likewise.
6135 * elf32-frv.c: Likewise.
6136 * elf32-hppa.c: Likewise.
6137 * elf32-i370.c: Likewise.
6138 * elf32-i386.c: Likewise.
6139 * elf32-m32r.c: Likewise.
6140 * elf32-m68k.c: Likewise.
6141 * elf32-ppc.c: Likewise.
6142 * elf32-s390.c: Likewise.
6143 * elf32-sh.c: Likewise.
6144 * elf32-sparc.c: Likewise.
6145 * elf32-vax.c: Likewise.
6146 * elf32-xtensa.c: Likewise.
6147 * elf64-alpha.c: Likewise.
6148 * elf64-hppa.c: Likewise.
6149 * elf64-ppc.c: Likewise.
6150 * elf64-s390.c: Likewise.
6151 * elf64-sh64.c: Likewise.
6152 * elf64-sparc.c: Likewise.
6153 * elf64-x86-64.c: Likewise.
6154 * elfxx-ia64.c: Likewise.
6155 * elfxx-mips.c: Likewise.
6156 * elflink.c: Likewise. Also u.elf_hash_value.
6157 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
6159 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6160 (bfd_elf_gc_record_vtinherit): Alloc vtable.
6161 (bfd_elf_gc_record_vtentry): Likewise.
6162 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
6164 2004-09-17 Alan Modra <amodra@bigpond.net.au>
6166 * Makefile.am: Run "make dep-am".
6167 * Makefile.in: Regenerate.
6168 * bfd-in2.h: Regenerate.
6169 * po/SRC-POTFILES.in: Regenerate.
6170 * po/bfd.pot: Regenerate.
6172 2004-09-16 Alan Modra <amodra@bigpond.net.au>
6174 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
6175 with bitfields. Make "type" and "other" bitfields too.
6176 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
6177 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
6178 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
6179 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
6180 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
6181 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
6182 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
6183 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
6184 * elf-hppa.h: Update all uses of elf_link_hash_flags.
6185 * elf-m10300.c: Likewise.
6187 * elf32-arm.h: Likewise.
6188 * elf32-cris.c: Likewise.
6189 * elf32-frv.c: Likewise.
6190 * elf32-hppa.c: Likewise.
6191 * elf32-i370.c: Likewise.
6192 * elf32-i386.c: Likewise.
6193 * elf32-m32r.c: Likewise.
6194 * elf32-m68k.c: Likewise.
6195 * elf32-ppc.c: Likewise.
6196 * elf32-s390.c: Likewise.
6197 * elf32-sh-symbian.c: Likewise.
6198 * elf32-sh.c: Likewise.
6199 * elf32-sh64.c: Likewise.
6200 * elf32-sparc.c: Likewise.
6201 * elf32-vax.c: Likewise.
6202 * elf32-xtensa.c: Likewise.
6203 * elf64-alpha.c: Likewise.
6204 * elf64-hppa.c: Likewise.
6205 * elf64-ppc.c: Likewise.
6206 * elf64-s390.c: Likewise.
6207 * elf64-sh64.c: Likewise.
6208 * elf64-sparc.c: Likewise.
6209 * elf64-x86-64.c: Likewise.
6210 * elflink.c: Likewise.
6211 * elfxx-ia64.c: Likewise.
6212 * elfxx-mips.c: Likewise.
6213 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
6214 * configure: Regenerate.
6215 * aclocal.m4: Regenerate.
6217 2004-09-16 Alan Modra <amodra@bigpond.net.au>
6219 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
6220 around uses of R_ARM_TARGET1.
6221 (elf32_arm_check_relocs): Likewise.
6223 2004-09-13 Paul Brook <paul@codesourcery.com>
6225 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
6227 * bfd-in2.h: Regenerate.
6228 * libbfd.h: Regenerate.
6229 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
6230 (elf32_arm_link_hash_table_create): Set target1_is_rel.
6231 (bfd_elf32_arm_process_before_allocation): Ditto.
6232 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
6233 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
6234 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
6237 2004-09-10 Joel Brobecker <brobecker@gnat.com>
6239 * hpux-core.c (thread_section_p): New function.
6240 (hpux_core_core_file_p): Fix computation of offset in call
6241 to bfd_seek. Create a ".reg" section from an arbitrary
6242 ".reg/<id>" section if none was created after having read
6245 2004-09-11 Andreas Schwab <schwab@suse.de>
6247 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
6248 * aclocal.m4: Rebuild.
6249 * configure: Rebuild.
6251 2004-09-10 Joel Brobecker <brobecker@gnat.com>
6253 * section.c (bfd_sections_find_if): Fix parameter name in
6254 comment to match code.
6256 2004-09-10 Alan Modra <amodra@bigpond.net.au>
6258 * elf.c (assign_file_positions_except_relocs): Assign relocs
6259 stored in a bfd section.
6261 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
6263 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
6264 h->gotplt_refcount to 0, not -1.
6266 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
6268 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6269 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
6271 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
6272 handle symbol visibility here.
6274 2004-09-07 Alan Modra <amodra@bigpond.net.au>
6276 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
6277 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
6279 (ppc_stub_name): Remove trailing "+0" on stub name.
6280 (create_linkage_sections): Create relocations for
6281 branch lookup table when --emit-relocs as well as when --shared.
6282 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
6283 relbrlt test. For --emit-stub-syms, always output a sym even when
6284 one already exists on a plt call stub. Put stub type in the stub
6286 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
6288 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
6289 reloc_count in stub sections. Adjust relbrlt test.
6290 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
6291 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
6292 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
6293 for relocs against discarded symbols. Fix comments.
6295 2004-09-06 Mark Mitchell <mark@codesourcery.com>
6297 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
6298 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
6300 (map_sections_to_segments): ... here. Use it. Assign a file
6301 position to the .dynamic section if it is not loadable, but part
6302 of the PT_DYNAMIC segment.
6303 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
6304 offsets, not VMAs, for the BPABI. Do not fill in the header in
6305 the .got.plt section for the BPABI.
6306 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
6308 (elf_backend_want_got_plt): Define to zero for Symbian OS.
6310 2004-09-06 Nick Clifton <nickc@redhat.com>
6312 * elflink.c (elf_link_add_object_symbols): Set the error code to
6313 bfd_error_wrong_format when the input format does not match the
6316 2004-09-06 Alan Modra <amodra@bigpond.net.au>
6318 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
6319 (ppc64_elf_check_directives): ..here.
6320 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
6321 before accessing ppc64_elf_tdata.
6322 (ppc64_elf_finish_dynamic_sections): And here too.
6324 2004-09-04 Alan Modra <amodra@bigpond.net.au>
6326 * bfd.c (_bfd_default_error_handler): Correct loop exit.
6328 2004-09-03 Mark Mitchell <mark@codesourcery.com>
6330 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
6331 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
6332 (bfd_elf32_littlearm_symbian_vec): Likewise.
6333 * configure: Regenerated.
6334 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
6335 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
6336 (PLT_ENTRY_SIZE): Likewise.
6337 (bfd_vma_elf32_arm_symbian_plt_entry): New
6339 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
6341 (create_got_section): Don't create sections when generating BPABI
6343 (elf32_arm_create_dynamic_sections): Tidy.
6344 (elf32_arm_link_hash_table_create): Set plt_header_size,
6345 plt_entry_size, and symbian_p.
6346 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
6347 generating BPABI objects.
6348 (allocate_dynrelocs): Use htab->plt_header_size, not
6349 PLT_HEADER_SIZE. Do not add to .got.plt when
6350 generating BPABI objects.
6351 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
6352 * elfarm-nabi.c: Add SymbianOS target vectors.
6353 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
6354 (_bfd_elf_link_create_dynamic_sections): Likewise.
6355 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
6356 (elfNN_bed): Use it.
6357 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
6358 (bfd_elf32_littlearm_symbian_vec): Likewise.
6359 (_bfd_target_vector): Add them.
6361 2004-09-03 Nick Clifton <nickc@redhat.com>
6364 * coffcode.h (handle_COMDAT): Replace abort with an warning
6365 message and allow the scan to continue.
6367 2004-09-02 Alan Modra <amodra@bigpond.net.au>
6369 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
6370 in when reading relocs, not our sorted syms. Remove unnecessary
6373 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6375 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
6377 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
6379 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
6380 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
6381 replace uses of *_alias with *_noncanonical.
6382 * aclocal.m4: Rebuild with aclocal 1.4p6.
6383 * Makefile.in: Rebuild with automake 1.4p6.
6384 * doc/Makefile.in: Rebuild with automake 1.4p6.
6385 * configure.in: Autoupdate with autoupdate 2.59.
6386 * config.in: Regenerate with autoheader 2.59.
6387 * configure: Regnerate with autoconf 2.59.
6389 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6391 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
6392 symbol pointer arrays before modifying.
6394 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6396 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
6397 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
6398 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
6399 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
6400 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
6401 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
6402 Use both symbol tables on non-relocatable objects. Use a common
6403 error exit. Fix "mid" warning.
6404 * libbfd.h: Regenerate.
6405 * bfd-in2.h: Regenerate.
6407 2004-08-28 Alan Modra <amodra@bigpond.net.au>
6409 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
6411 (struct sfpr_def_parms): Save some space.
6412 (sfpr_define): Here too.
6414 * elf64-ppc.c (compare_symbols): Put section syms first.
6415 (sym_exists_at): New function.
6416 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
6417 points only for relocatable files. Use .opd section contents
6418 otherwise. Generally clean up the code.
6420 2004-08-27 Alan Modra <amodra@bigpond.net.au>
6422 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
6423 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
6424 (struct sfpr_def_parms): New.
6425 (sfpr_define): New function.
6426 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
6427 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
6428 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
6429 (savefpr1_tail, restfpr1_tail): New functions.
6430 (savevr, savevr_tail, restvr, restvr_tail): New functions.
6431 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
6432 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
6433 code. Define all ABI mandated _save and _rest functions.
6435 2004-08-26 Paul Brook <paul@codesourcery.com>
6437 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
6439 2004-08-26 Alan Modra <amodra@bigpond.net.au>
6441 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
6444 2004-08-26 Alan Modra <amodra@bigpond.net.au>
6446 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
6447 that pcrel correction is applied for R_386_PC32.
6449 2004-08-25 Alan Modra <amodra@bigpond.net.au>
6451 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
6452 for R_386_32 and R_386_PC32 relocs against symbols defined in
6455 2004-08-25 Dmitry Diky <diwil@spec.ru>
6457 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
6458 Add new relocations.
6459 * bfd-in2.h: Regenerate.
6460 * libbfd.h: Regenerate.
6461 * elf32-msp430.c: Clean-up code.
6462 (elf_msp430_howto_table): Add new relocation entries.
6463 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
6464 (msp430_elf_relax_section): New function.
6465 (msp430_elf_relax_delete_bytes): New function.
6466 (msp430_elf_symbol_address_p): New function.
6468 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6470 * elf32-m32r.c (m32r_elf_relocate_section): Handle
6471 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
6473 2004-08-20 Daniel Jacobowitz <dan@debian.org>
6475 * elflink.c (_bfd_elf_section_already_linked): Handle
6476 SEC_LINK_DUPLICATES_SAME_CONTENTS.
6478 2004-08-19 Mark Mitchell <mark@codesourcery.com>
6480 * config.bfd (arm*-*-symbianelf*): New target.
6481 (arm*-*-eabi*): Likewise.
6483 2004-08-19 Alan Modra <amodra@bigpond.net.au>
6485 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
6486 "struct ppc_link_hash_entry *".
6487 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
6488 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
6490 2004-08-19 Jakub Jelinek <jakub@redhat.com>
6492 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
6493 entries (where fd_aux overlaps next entry's fd_func).
6494 Add non_overlapping argument, use it.
6495 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
6496 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6497 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
6498 as indexes into opd_sym_map/opd_adjust array.
6499 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
6501 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6503 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
6504 if we can look up their function descriptor in a regular file.
6506 2004-08-18 Nick Clifton <nickc@redhat.com>
6509 * cofflink.c (coff_link_add_symbols): Check that the comdat
6510 pointer in the coff_section_data structure has been initialised
6513 2004-08-18 Alan Modra <amodra@bigpond.net.au>
6516 * elflink.c (bfd_elf_record_link_assignment): Add comment about
6517 changing bfd_link_hash_undefined to bfd_link_hash_new.
6519 2004-08-17 Jakub Jelinek <jakub@redhat.com>
6521 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
6523 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
6524 (synthetic_opd, synthetic_relocatable): New variables.
6525 (compare_symbols, compare_relocs): New helper routines.
6526 (ppc64_elf_get_synthetic_symtab): New function.
6527 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
6529 * bfd-in2.h: Regenerated.
6530 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
6531 to relsyms. Return 0 if abfd is relocatable.
6533 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6535 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
6537 2004-08-17 Nick Clifton <nickc@redhat.com>
6539 * (is_arm_mapping_symbol_name): New function - return true
6540 when a symbol name matches the requirements for an ARM mapping
6542 (arm_elf_find_function): New function based on
6543 elf_find_function in elf.c but skipping ARM mapping symbols
6544 and including thumb function symbols.
6545 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
6546 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
6548 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6550 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
6551 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
6552 (ppc64_elf_brtaken_reloc): Here too.
6554 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6556 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
6558 (ppc64_elf_check_directives): Check that we have the right hash
6559 table before proceeding.
6561 2004-08-17 Alan Modra <amodra@bigpond.net.au>
6563 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
6564 (adjust_opd_syms): Attach opd syms for deleted entries to one of
6565 the sections that will be discarded.
6567 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6569 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
6571 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6573 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
6574 free space available.
6576 2004-08-16 Alan Modra <amodra@bigpond.net.au>
6578 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
6579 occurrences with bfd_byte * thoughout file.
6581 * coff-rs6000.c (do_shared_object_padding): Warning fix.
6582 (xcoff_write_armap_big): Likewise.
6583 (xcoff_write_archive_contents_old): Likewise.
6584 (xcoff_write_archive_contents_big): Likewise.
6586 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
6588 2004-08-13 Nick Clifton <nickc@redhat.com>
6590 * elf32-arm.h: Convert to ISO C90.
6592 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6595 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
6598 2004-08-13 Alan Modra <amodra@bigpond.net.au>
6600 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
6601 (bfd_archive_filename, bfd_get_section_ident): Delete.
6602 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
6603 bfd_archive_filename.
6604 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
6605 to warn about symbols in discarded sections. Use _bfd_error_handler.
6606 * aout-adobe.c (aout_adobe_callback): See below.
6607 * aout-cris.c (swap_ext_reloc_in): ..
6608 * coff-arm.c (find_thumb_glue, find_arm_glue,
6609 coff_arm_relocate_section, bfd_arm_process_before_allocation,
6610 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
6611 coff_arm_copy_private_bfd_data): ..
6612 * coff-i860.c (i860_reloc_processing): ..
6613 * coff-mcore.c (mcore_coff_unsupported_reloc,
6614 coff_mcore_relocate_section): ..
6615 * coff-ppc.c (coff_ppc_relocate_section): ..
6616 * coff-rs6000.c (xcoff_create_csect_from_smclas
6617 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6618 sh_swap_insns, sh_relocate_section): ..
6619 * coff-tic54x.c (tic54x_reloc_processing): ..
6620 * coff-tic80.c (coff_tic80_relocate_section): ..
6621 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
6622 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
6623 coff_slurp_symbol_table, coff_classify_symbol,
6624 coff_slurp_reloc_table): ..
6625 * coffgen.c (_bfd_coff_read_string_table): ..
6626 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
6627 _bfd_coff_generic_relocate_section): ..
6628 * cpu-arm.c (bfd_arm_merge_machines): ..
6629 * cpu-sh.c (sh_merge_bfd_arch): ..
6630 * elf-hppa.h (elf_hppa_relocate_section): ..
6631 * elf.c (bfd_elf_string_from_elf_section, setup_group,
6632 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
6633 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
6634 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
6635 * elf32-arm.h (find_thumb_glue, find_arm_glue,
6636 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
6637 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
6638 elf32_arm_relocate_section, elf32_arm_set_private_flags,
6639 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
6640 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
6641 cris_elf_merge_private_bfd_data
6642 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
6643 * elf32-gen.c (elf32_generic_link_add_symbols): ..
6644 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
6645 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
6646 elf32_hppa_relocate_section): ..
6647 * elf32-i370.c (i370_elf_merge_private_bfd_data,
6648 i370_elf_check_relocs, i370_elf_relocate_section): ..
6649 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
6650 elf_i386_relocate_section): ..
6651 * elf32-m32r.c (m32r_elf_relocate_section,
6652 m32r_elf_merge_private_bfd_data): ..
6653 * elf32-m68hc1x.c (m68hc12_add_stub,
6654 _bfd_m68hc11_elf_merge_private_bfd_data): ..
6655 * elf32-m68k.c (elf_m68k_relocate_section): ..
6656 * elf32-mcore.c (mcore_elf_unsupported_reloc,
6657 mcore_elf_relocate_section): ..
6658 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6659 ppc_elf_check_relocs, ppc_elf_relocate_section,
6660 ppc_elf_begin_write_processing): ..
6661 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6662 elf_s390_relocate_section): ..
6663 * elf32-sh-symbian.c (sh_symbian_import_as,
6664 sh_symbian_process_embedded_commands,
6665 sh_symbian_relocate_section): ..
6666 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6667 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6668 sh_elf_merge_private_data): ..
6669 * elf32-sparc.c (elf32_sparc_check_relocs,
6670 elf32_sparc_relocate_section,
6671 elf32_sparc_merge_private_bfd_data): ..
6672 * elf32-v850.c (v850_elf_check_relocs,
6673 v850_elf_merge_private_bfd_data): ..
6674 * elf32-xtensa.c (elf_xtensa_check_relocs,
6675 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6676 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6677 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6678 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6679 * elf64-gen.c (elf64_generic_link_add_symbols): ..
6680 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6681 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6682 ppc64_elf_relocate_section): ..
6683 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6684 elf_s390_relocate_section): ..
6685 * elf64-sh64.c (sh_elf64_relocate_section): ..
6686 * elf64-sparc.c (sparc64_elf_check_relocs,
6687 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6688 sparc64_elf_merge_private_bfd_data): ..
6689 * elf64-x86-64.c (elf64_x86_64_check_relocs,
6690 elf64_x86_64_relocate_section): ..
6691 * elflink.c (_bfd_elf_add_default_symbol,
6692 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6693 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6694 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6695 elf_get_linked_section_vma, elf_fixup_link_order,
6696 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6697 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6698 * elfxx-ia64.c (elfNN_ia64_relax_section,
6699 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6700 * elfxx-mips.c (mips_elf_perform_relocation,
6701 _bfd_mips_elf_check_relocs,
6702 _bfd_mips_elf_merge_private_bfd_data): ..
6703 * ieee.c (ieee_slurp_external_symbols): ..
6704 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6705 * libbfd.c (_bfd_generic_verify_endian_match): ..
6706 * linker.c (_bfd_generic_link_add_one_symbol,
6707 _bfd_generic_section_already_linked): ..
6708 * pdp11.c (translate_to_native_sym_flags): ..
6709 * pe-mips.c (coff_pe_mips_relocate_section): ..
6710 * peicode.h (pe_ILF_build_a_bfd): ..
6711 * srec.c (srec_bad_byte): ..
6712 * stabs.c (_bfd_link_section_stabs): ..
6713 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6714 Replace all uses of bfd_archive_filename and bfd_get_section_ident
6715 with corresponding %B and %A in _bfd_error_handler format string.
6716 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6717 calls to use %A and %B. Fix "against symbol .. from section" and
6718 similar error messages. Combine multiple _bfd_error_handler calls
6719 where they were separated due to bfd_archive_filename deficiencies.
6720 * bfd-in2.h: Regenerate.
6722 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
6724 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6727 2004-08-10 Alan Modra <amodra@bigpond.net.au>
6729 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6730 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6731 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6733 (link_hash_newfunc): Init was_undefined.
6734 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6735 Use undefweak instead.
6736 (ppc64_elf_check_directives): Fix undefs chain.
6737 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6739 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6740 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6741 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6743 2004-08-09 Jakub Jelinek <jakub@redhat.com>
6745 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6746 error, test input_section flags rather than sec.
6748 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6750 * elf-bfd.h (struct elf_backend_data): Add
6751 elf_backend_archive_symbol_lookup.
6752 (_bfd_elf_archive_symbol_lookup): Declare.
6753 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6754 (elf_link_add_archive_symbols): ..extracted from here. Call the
6756 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6757 (elfNN_bed): Init new field.
6758 * elf64-ppc.c (elf_backend_check_directives): Define.
6759 (elf_backend_archive_symbol_lookup): Define.
6760 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
6761 a ppc_link_hash_entry pointer.
6763 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6764 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6765 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6766 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6767 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6768 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6769 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6772 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6774 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6775 (ppc64_elf_add_symbol_hook): Test for NULL section.
6776 (get_sym_h): Formatting.
6777 (ppc64_elf_size_stubs): Include reloc addend in value stored as
6780 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6781 long branch stubs with code handling plt and r2off branch stubs.
6783 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6785 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6786 * elflink.c (elf_link_input_bfd): Formatting.
6787 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
6789 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6790 (link_hash_newfunc): Don't set it.
6791 (ppc64_elf_copy_indirect_symbol): Nor copy it.
6792 (ppc64_elf_mark_entry_syms): Delete.
6793 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
6794 sections. Use get_opd_info.
6795 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6797 2004-08-09 Alan Modra <amodra@bigpond.net.au>
6799 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6801 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6802 (func_desc_adjust): Don't set have_undefweak.
6803 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6804 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6806 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6807 "struct ppc_link_hash_entry *". Adjust all references.
6808 (ppc64_elf_hide_symbol): Correct a comment.
6810 * elf64-ppc.c (get_opd_info): New function.
6811 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
6812 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
6813 before calling get_fdh. Test fdh rather than h before dereferencing
6814 fdh. Mark removed symbols in opd_adjust.
6815 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6816 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6818 (ppc64_elf_output_symbol_hook): Likewise.
6820 2004-08-06 Paul Brook <paul@codesourcery.com>
6822 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6823 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6824 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6825 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6826 and BFD_RELOC_ARM_SBREL32.
6827 * bfd-in2.h, bbfd.h: Regenerate.
6829 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6831 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6832 the dynamic link symbol actually in use.
6834 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
6836 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6838 2004-07-31 Joel Brobecker <brobecker@gnat.com>
6839 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6841 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6842 SHN_MIPS_TEXT and SHN_MIPS_DATA.
6844 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
6845 Nick Clifton <nickc@redhat.com>
6848 * bfd.c (_bfd_default_error_handler): Make it global.
6850 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6852 * elf.c (assign_section_numbers): Cope gracefully with sections
6853 which have SHF_LINK_ORDER set but no sh_link set up.
6854 * elflink.c (elf_get_linked_section_vma): Likewise.
6856 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6859 * elfxx-target.h (elf_backend_link_order_error_handler): New.
6860 Set it to _bfd_default_error_handler.
6861 (elfNN_bed): Add elf_backend_link_order_error_handler.
6863 * libbfd-in.h (_bfd_default_error_handler): New.
6865 * libbfd.h: Regenerated.
6867 2004-07-30 Jakub Jelinek <jakub@redhat.com>
6869 * archures.c (bfd_mach_sparc_64bit_p): Define.
6870 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6871 * bfd-in2.h: Rebuilt.
6873 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
6875 Introduce SH2a support.
6876 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
6877 * archures.c (bfd_mach_sh2a_nofpu): New.
6878 * bfd-in2.h: Rebuilt.
6879 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6880 (arch_info_struct): Add sh2a_nofpu.
6881 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6882 2003-12-29 DJ Delorie <dj@redhat.com>
6883 * reloc.c: Add relocs for sh2a.
6884 * bfd-in2.h: Regenerate.
6885 * libbfd.hh: Regenerate.
6886 2003-12-01 Michael Snyder <msnyder@redhat.com>
6887 * archures.c (bfd_mach_sh2a): New.
6888 * bfd-in2.h: Rebuilt.
6889 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6891 (arch_info_struct): Add sh2a.
6892 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6894 2004-07-28 Nick Clifton <nickc@redhat.com>
6895 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6898 * som.c (setup_sections): Improve estimation of space sizes in
6899 relocatable objects.
6901 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
6902 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6903 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
6905 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6906 * configure: Regenerate.
6907 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6908 case that accepts OSABI=NetBSD and OSABI=SysV.
6909 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6910 the base of .got or .data (if .got does not exist).
6911 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6913 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6914 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6915 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6916 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6918 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
6921 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6922 (elf_sec_group): Defined.
6923 (bfd_elf_match_symbols_in_sections): New prototype.
6924 (_bfd_elf_setup_group_pointers): Likewise.
6926 * elf.c (bfd_elf_discard_group): Abort.
6927 (bfd_elf_set_group_contents): Also include relocation sections.
6928 Remove zero-fill for ld -r.
6929 (_bfd_elf_setup_group_pointers): New function.
6930 (elf_sort_elf_symbol): Likewise.
6931 (elf_sym_name_compare): Likewise.
6932 (bfd_elf_match_symbols_in_sections): Likewise.
6934 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6936 * elflink.c (match_group_member): New.
6937 (elf_link_input_bfd): Check group member for discarded section.
6938 (try_match_symbols_in_sections): New function.
6939 (already_linked): Likewise.
6940 (_bfd_elf_section_already_linked): Support mixing comdat group
6941 and linkonce section.
6943 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6944 * linker.c (bfd_section_already_linked_table_traverse): New.
6946 * libbfd.h: Regenerated.
6948 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
6950 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6951 BFD_RELOC_CRX_SWITCH32.
6952 * bfd-in2.h: Regenerate.
6953 * libbfd.h: Regenerate.
6954 * elf32-crx.c: Support relocation/relaxation of
6955 BFD_RELOC_CRX_SWITCH* types.
6957 2004-07-27 Alan Modra <amodra@bigpond.net.au>
6959 * elf64-ppc.c: Correct "Linker stubs" comment.
6961 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
6963 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6965 (elf_linked_to_section): New.
6967 * elf.c (assign_section_numbers): Set up sh_link for
6970 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6971 to sh_link for SHT_IA_64_UNWIND sections.
6973 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6975 * elflink.c (elf_fixup_link_order): Add _() to error message.
6977 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
6979 * elflink.c (elf_fixup_link_order): Issue a warning and flag
6982 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
6984 * aout-adobe.c (aout_32_section_already_linked): Defined.
6985 * aout-target.h (MY_section_already_linked): Likewise.
6986 * aout-tic30.c (MY_section_already_linked): Likewise.
6987 * binary.c (binary_section_already_linked): Likewise.
6988 * bout.c (b_out_section_already_linked): Likewise.
6989 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6990 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6991 * coffcode.h (coff_section_already_linked): Likewise.
6992 * i386msdos.c (msdos_section_already_linked): Likewise.
6993 * i386os9k.c (os9k_section_already_linked): Likewise.
6994 * ieee.c (ieee_section_already_linked): Likewise.
6995 * ihex.c (ihex_section_already_linked): Likewise.
6996 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6997 * mmo.c (mmo_section_already_linked): Likewise.
6998 * nlm-target.h (nlm_section_already_linked): Likewise.
6999 * oasys.c (oasys_section_already_linked): Likewise.
7000 * pef.c (bfd_pef_section_already_linked): Likewise.
7001 * ppcboot.c (ppcboot_section_already_linked): Likewise.
7002 * som.c (som_bfd_discard_group): Likewise.
7003 * srec.c (srec_section_already_linked): Likewise.
7004 * tekhex.c (tekhex_section_already_linked): Likewise.
7005 * versados.c (versados_section_already_linked): Likewise.
7006 * vms.c (vms_section_already_linked): Likewise.
7007 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
7008 * xsym.c (bfd_sym_section_already_linked): Likewise.
7010 * bfd-in.h (bfd_section_already_linked_table_init): New.
7011 (bfd_section_already_linked_table_free): Likewise.
7013 * coff-rs6000.c (rs6000coff_vec): Add
7014 _bfd_generic_section_already_linked.
7015 (pmac_xcoff_vec): Likewise.
7016 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7017 (aix5coff64_vec): Likewise.
7019 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
7020 * elflink.c (_bfd_elf_section_already_linked): New function.
7022 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
7024 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
7025 (_bfd_generic_section_already_linked): New.
7026 (bfd_section_already_linked_hash_entry): Likewise.
7027 (bfd_section_already_linked): Likewise.
7028 (bfd_section_already_linked_table_lookup): Likewise.
7029 (bfd_section_already_linked_table_insert): Likewise.
7031 * linker.c (bfd_section_already_linked): New.
7032 (_bfd_section_already_linked_table): Likewise.
7033 (bfd_section_already_linked_table_lookup): Likewise.
7034 (bfd_section_already_linked_table_insert): Likewise.
7035 (already_linked_newfunc): Likewise.
7036 (bfd_section_already_linked_table_init): Likewise.
7037 (bfd_section_already_linked_table_free): Likewise.
7038 (_bfd_generic_section_already_linked): Likewise.
7040 * section.c (bfd_section): Remove comdat.
7041 (bfd_comdat_info): Moved to ...
7042 * bfd-in.h (coff_comdat_info): Here.
7043 (bfd_coff_get_comdat_section): New.
7044 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
7045 * libcoff-in.h (coff_section_tdata): Add comdat.
7046 * coffcode.h (handle_COMDAT): Updated.
7047 * cofflink.c (coff_link_add_symbols): Likewise.
7048 * ecoff.c (bfd_debug_section): Likewise.
7050 * targets.c (bfd_target): Add _section_already_linked.
7051 (BFD_JUMP_TABLE_LINK): Updated.
7053 * bfd-in2.h: Regenerated.
7054 * libbfd.h: Likewise.
7055 * libcoff.h: Likewise.
7057 2003-07-21 Paul Brook <paul@codesourcery.com>
7059 * elflink.c (elf_get_linked_section_vma, compare_link_order,
7060 elf_fixup_link_order): New functions.
7061 (bfd_elf_final_link): Call elf_fixup_link_order.
7063 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
7065 * elf-bfd.h (ELF_COMMON_DEF_P): New.
7066 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
7068 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
7069 _bfd_elf_symbol_refs_local_p.
7070 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
7073 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
7075 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
7077 (bfd_elf_get_dyn_lib_class): New prototype.
7078 * elf.c (bfd_elf_get_dyn_lib_class): New function.
7080 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
7081 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
7082 entry is needed. Issue an error if a DT_NEEDED entry is needed
7083 for a file marked DYN_NO_NEEDED.
7084 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
7087 * bfd-in2.h: Regenerated.
7089 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7091 * elflink.c (elf_section_complain_discarded): Don't complain in
7094 2004-07-10 James E Wilson <wilson@specifixinc.com>
7096 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
7097 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
7098 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
7099 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
7101 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
7102 bfd_put_64 to bfd_putl64.
7103 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
7105 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
7108 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
7109 .init/.fini sections when trying to relax it.
7111 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
7113 * elf.c (assign_file_positions_for_segments): Make sure the
7114 .dynamic section is the first section in the PT_DYNAMIC segment.
7116 2004-07-09 Nick Clifton <nickc@redhat.com>
7118 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
7119 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
7120 sh_elf_get_flags_from_mach functions so that they do not conflict
7121 when this target is built with other sh-elf targets.
7122 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
7123 suppression of this function.
7124 (sh_elf_find_flags): Likewise.
7126 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
7128 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
7129 (ALL_MACHINES_CFILES): Add cpu-crx.c.
7130 (BFD32_BACKENDS): Add elf32-crx.lo.
7131 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
7132 (cpu-crx.lo): New target.
7133 (elf32-crx.lo): New target.
7134 * Makefile.in: Regenerate.
7135 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
7136 (bfd_archures_list): Add bfd_crx_arch.
7137 * bfd-in2.h: Regenerate.
7138 * config.bfd: Handle crx-*-elf*, crx*.
7139 * configure.in: Handle bfd_elf32_crx_vec.
7140 * configure: Regenerate.
7141 * cpu-crx.c: New file.
7142 * elf32-crx.c: Likewise.
7143 * libbfd.h: Regenerate.
7144 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
7145 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
7146 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
7147 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
7148 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
7149 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
7150 * targets.c (bfd_elf32_crx_vec): Declare.
7151 (bfd_target_vector): Add bfd_elf32_crx_vec.
7153 2004-07-06 Nick Clifton <nickc@redhat.com>
7155 * config.bfd: Add sh-symbian-elf target.
7156 * configure.in: Add bfd_elf32_shl_symbian_vec.
7157 * configure: Regenerate.
7158 * elf-bfd.h (struct elf_backend_data): Add new field
7160 * elflink.c (elf_link_add_object_symbols): Invoke the
7161 check_directives function, if defined.
7162 * elfxx-target.h: Provide a default, NULL definition for
7164 * targets.c: Add bfd_elf32_shl_symbian_vec.
7165 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
7167 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
7168 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
7169 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
7170 not already been defined.
7171 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
7172 * sh-symbian.c: New file. Provide functions to support the
7173 * sh-symbian-elf target.
7174 * Makefile.am: Add elf32-sh-symbian.c
7175 * Makefile.in: Regenerate.
7177 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
7179 * elf32-sh.c: Include ../opcodes/sh-opc.h.
7180 * Makefile.am: Ran make dep-am.
7181 * Makefile.in: Ran make dep-in.
7183 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
7185 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
7188 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7190 * config.bfd: Add want64 to configuration target s390-*-linux*.
7192 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
7194 * bfd.c (bfd_get_section_ident): New.
7196 * elflink.c (elf_link_read_relocs_from_section): Call
7197 bfd_get_section_ident to identify the section when reporting
7199 (_bfd_elf_link_output_relocs): Likewise.
7200 (elf_link_output_extsym): Likewise.
7201 (elf_link_input_bfd): Likewise.
7202 (bfd_elf_gc_record_vtinherit): Likewise.
7204 * bfd-in2.h: Regenerated.
7206 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
7207 Nick Clifton <nickc@redhat.com>
7210 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
7211 of section symbols to mips_elf_sort_hash_table ().
7213 2004-07-01 Alan Modra <amodra@bigpond.net.au>
7215 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
7217 (elf_section_complain_discarded): New function. Handle
7218 .gcc_except_table too.
7219 (elf_link_input_bfd): Rewrite handling of relocs against symbols
7220 in discarded sections.
7221 * elf-bfd.h (elf_discarded_section): Protect macro arg.
7223 2004-06-30 James E Wilson <wilson@specifixinc.com>
7225 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
7226 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
7228 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
7231 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
7232 local references to discarded sections and report their
7235 2004-06-30 Alan Modra <amodra@bigpond.net.au>
7237 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
7238 sec_info_type, test section name instead.
7240 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
7243 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
7244 in .init/.fini sections.
7246 2004-06-29 Bob Wilson <bob.wilson@acm.org>
7248 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
7249 bfd_get_section_limit.
7251 2004-06-29 Bob Wilson <bob.wilson@acm.org>
7253 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
7254 output section size.
7256 2004-06-29 Alan Modra <amodra@bigpond.net.au>
7258 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
7260 (mmix_elf_perform_relocation): Adjust for above change.
7261 (mmix_elf_relocate_section): Likewise.
7262 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
7263 (mmix_elf_get_section_contents): Delete.
7264 (bfd_elf64_get_section_contents): Delete.
7265 (mmix_elf_relocate_section): Zero stub area.
7266 * linker.c (default_indirect_link_order): Alloc max of section size
7268 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
7269 * section.c (bfd_malloc_and_get_section): Likewise.
7270 (struct bfd_section): Update rawsize comment.
7271 * bfd-in2.h: Regenerate.
7273 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
7275 2004-06-29 Alan Modra <amodra@bigpond.net.au>
7277 * bfd-in.h (bfd_get_section_limit): Define.
7278 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
7279 (_bfd_final_link_relocate): Use bfd_get_section_limit.
7280 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
7281 * coff-arm.c (coff_arm_relocate_section): Likewise.
7282 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
7283 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
7284 (bfd_ns32k_final_link_relocate): Likewise.
7285 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
7286 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
7287 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
7288 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
7289 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
7290 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
7291 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
7292 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7293 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
7294 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
7295 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
7296 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
7297 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
7298 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
7299 * elf32-v850.c (v850_elf_reloc): Likewise.
7300 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
7301 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
7302 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
7303 * elf64-mips.c (mips_elf64_gprel32_reloc)
7304 (mips16_gprel_reloc): Likewise.
7305 * elf64-mmix.c (mmix_elf_reloc): Likewise.
7306 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
7307 * elf64-sparc.c (init_insn_reloc): Likewise.
7308 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
7309 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
7310 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
7311 (_bfd_mips_elf_generic_reloc): Likewise.
7312 * bfd-in2.h: Regenerate.
7314 2004-06-28 Alan Modra <amodra@bigpond.net.au>
7316 * bfd-in.h (struct stab_info): Move from stabs.c.
7317 * stabs.c (struct stab_link_includes_table): Delete.
7318 (stab_link_includes_lookup): Delete.
7319 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
7320 level of indirection from sinfo parm.
7321 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
7322 stabstr section. Adjust hash table accesses.
7323 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
7324 alloc. Adjust stab_info test.
7325 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
7326 (_bfd_coff_final_link): Adjust stab_info test.
7327 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
7328 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
7330 * libcoff-in.h (struct coff_link_hash_table): Likewise.
7331 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
7332 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
7333 stabstr section. Adjust stab_info test.
7334 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
7335 (_bfd_write_stab_strings): Adjust prototypes.
7336 * libbfd.h: Regenerate.
7337 * libcoff.h: Regenerate.
7338 * bfd-in2.h: Regenerate.
7340 2004-06-27 Mark Kettenis <kettenis@gnu.org>
7342 From Miod Vallat <miod@online.fr>:
7343 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
7345 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
7347 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
7348 (struct elf32_mn10300_link_hash_entry): Remove
7349 pcrel_relocs_copied.
7350 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
7351 R_MN10300_32. Don't adjust pcrel_relocs_copied.
7352 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
7353 and gotoff relocations if the symbol doesn't bind locally. Use
7354 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
7355 relocation for PCREL32.
7356 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
7357 to test whether a symbol binds locally.
7358 (elf32_mn10300_link_hash_newfunc): Don't initialize
7359 pcrel_relocs_copied.
7360 (_bfd_mn10300_elf_discard_copies): Delete.
7361 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
7363 2004-06-26 Mark Kettenis <kettenis@gnu.org>
7365 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
7367 2004-06-25 Joel Brobecker <brobecker@gnat.com>
7369 * som.c (som_set_reloc_info): Correct small typo.
7371 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
7373 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
7374 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
7375 (m32r_elf_gcsweep_hook): Likewise.
7376 (m32r_elf_check_relocs): Likewise.
7377 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
7378 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
7379 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
7380 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
7381 * bfd-in2.h: Regenerated.
7382 * libbfd.h: Regenerated.
7384 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
7386 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
7388 (elf64_x86_64_relocate_section): Issue an error for
7389 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
7390 against global symbols when building shared library.
7392 2004-06-24 Alan Modra <amodra@bigpond.net.au>
7394 * section.c (struct sec): Rename "_cooked_size" to "size".
7395 Rename "_raw_size" to "rawsize".
7396 (STD_SECTION): Adjust comments.
7397 (bfd_set_section_size, bfd_get_section_contents): Use size.
7398 (bfd_malloc_and_get_section): New function.
7399 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
7400 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
7401 Correctly free reloc and contents memory.
7402 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
7403 and fake CIE now that we can shink section size to zero.
7404 (_bfd_elf_write_section_eh_frame): Likewise..
7405 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
7406 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
7407 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
7408 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
7409 unneeded indirection.
7410 * elf.c (_bfd_elf_section_offset): .. and update call.
7411 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
7412 * libbfd.h: Regenerate.
7413 * bfd-in2.h: Regenerate.
7415 Replace occurrences of "_raw_size" and "_cooked_size" in most places
7416 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
7417 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
7418 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
7419 Similarly use "rawsize", if non-zero, in reloc functions to validate
7420 reloc addresses. Use new bfd_malloc_and_get_section in most places
7421 where bfd_get_section_contents was called. Expand all occurrences of
7422 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
7423 grok_prstatus and similar functions to "size".
7424 * aix386-core.c (aix386_core_file_p): ..
7425 * aix5ppc-core.c (xcoff64_core_p): ..
7426 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
7427 aout_adobe_set_section_contents): ..
7428 * aout-target.h (callback): ..
7429 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
7430 MY_bfd_final_link): ..
7431 * aoutf1.h (sunos4_core_file_p): ..
7432 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7433 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
7434 final_link, aout_link_input_section): ..
7435 * binary.c (binary_object_p, binary_canonicalize_symtab,
7436 binary_set_section_contents): ..
7437 * bout.c (b_out_callback, b_out_write_object_contents,
7438 b_out_set_section_contents, b_out_bfd_relax_section,
7439 b_out_bfd_get_relocated_section_contents): ..
7440 * cisco-core.c (cisco_core_file_validate): ..
7441 * coff-alpha.c (alpha_ecoff_object_p,
7442 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
7443 * coff-arm.c (coff_arm_relocate_section,
7444 bfd_arm_allocate_interworking_sections): ..
7445 * coff-h8300.c (h8300_reloc16_extra_cases,
7446 h8300_bfd_link_add_symbols): ..
7447 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
7448 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
7449 ppc_bfd_coff_final_link): ..
7450 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
7451 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
7452 sh_align_loads, sh_coff_get_relocated_section_contents): ..
7453 * coff64-rs6000.c (xcoff64_write_object_contents,
7454 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
7455 * coffcode.h (coff_compute_section_file_positions,
7456 coff_write_object_contents): ..
7457 * coffgen.c (make_a_section_from_file, coff_write_symbols,
7458 coff_section_symbol, build_debug_section): ..
7459 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
7460 process_embedded_commands, _bfd_coff_link_input_bfd,
7461 _bfd_coff_write_global_sym): ..
7462 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
7463 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
7464 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
7465 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
7466 _bfd_dwarf2_find_nearest_line): ..
7467 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
7468 ecoff_compute_section_file_positions,
7469 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
7470 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
7471 _bfd_elf_discard_section_eh_frame_hdr,
7472 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
7473 _bfd_elf_write_section_eh_frame,
7474 _bfd_elf_write_section_eh_frame_hdr): ..
7475 * elf-hppa.h (elf_hppa_sort_unwind): ..
7476 * elf-m10200.c (mn10200_elf_relax_section,
7477 mn10200_elf_relax_delete_bytes,
7478 mn10200_elf_get_relocated_section_contents): ..
7479 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
7480 mn10300_elf_check_relocs, mn10300_elf_relax_section,
7481 mn10300_elf_relax_delete_bytes,
7482 mn10300_elf_get_relocated_section_contents,
7483 _bfd_mn10300_elf_adjust_dynamic_symbol,
7484 _bfd_mn10300_elf_discard_copies,
7485 _bfd_mn10300_elf_size_dynamic_sections,
7486 _bfd_mn10300_elf_finish_dynamic_sections): ..
7487 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
7488 _bfd_elf_make_section_from_phdr, elf_fake_sections,
7489 bfd_elf_set_group_contents, map_sections_to_segments,
7490 elf_sort_sections, assign_file_positions_for_segments,
7491 SECTION_SIZE, copy_private_bfd_data,
7492 _bfd_elf_get_dynamic_reloc_upper_bound,
7493 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
7494 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
7495 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
7496 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
7497 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
7498 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
7499 bfd_elf32_arm_process_before_allocation,
7500 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
7501 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
7502 elf32_arm_write_section): ..
7503 * elf32-cris.c (cris_elf_grok_prstatus,
7504 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
7505 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
7506 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
7507 elf_cris_discard_excess_dso_dynamics,
7508 elf_cris_discard_excess_program_dynamics): ..
7509 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
7510 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
7511 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
7512 _frv_create_got_section, _frvfdpic_assign_plt_entries,
7513 elf32_frvfdpic_size_dynamic_sections,
7514 elf32_frvfdpic_modify_segment_map,
7515 elf32_frvfdpic_finish_dynamic_sections): ..
7516 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
7517 elf32_h8_get_relocated_section_contents): ..
7518 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
7519 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
7520 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
7521 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
7522 elf32_hppa_finish_dynamic_sections): ..
7523 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
7524 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
7525 i370_elf_finish_dynamic_sections): ..
7526 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
7527 allocate_dynrelocs, elf_i386_size_dynamic_sections,
7528 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
7529 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
7530 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
7531 * elf32-ip2k.c (ip2k_is_switch_table_128,
7532 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
7533 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
7534 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
7535 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
7536 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
7537 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
7538 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
7539 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
7540 m32r_elf_get_relocated_section_contents): ..
7541 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
7542 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
7543 m68hc11_elf_relax_delete_bytes): ..
7544 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
7545 m68hc12_elf_size_one_stub): ..
7546 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
7547 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
7548 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
7549 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
7550 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
7551 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7552 elf32_mips_grok_prstatus): ..
7553 * elf32-or32.c (or32_elf_consth_reloc): ..
7554 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
7555 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
7556 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
7557 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
7558 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
7559 ppc_elf_final_write_processing): ..
7560 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7561 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7562 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
7563 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
7564 sh_elf_relax_delete_bytes, sh_elf_align_loads,
7565 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
7566 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
7567 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
7568 * elf32-sh64-com.c (sh64_address_in_cranges,
7569 sh64_get_contents_type): ..
7570 * elf32-sh64.c (sh64_find_section_for_address,
7571 sh64_elf_final_write_processing): ..
7572 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
7573 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
7574 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
7575 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
7576 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
7577 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
7578 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
7579 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
7580 elf_vax_finish_dynamic_sections): ..
7581 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
7582 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
7583 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
7584 xstormy16_elf_finish_dynamic_sections): ..
7585 * elf32-xtensa.c (xtensa_read_table_entries,
7586 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
7587 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
7588 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
7589 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
7590 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
7591 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
7592 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
7593 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
7594 xtensa_callback_required_dependence): ..
7595 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
7596 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
7597 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
7598 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
7599 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
7600 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
7601 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
7602 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
7603 * elf64-hppa.c (allocate_dynrel_entries,
7604 elf64_hppa_size_dynamic_sections,
7605 elf64_hppa_finish_dynamic_sections): ..
7606 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
7607 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
7608 elf64_mips_grok_prstatus): ..
7609 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
7610 mmix_elf_relocate_section, mmix_elf_final_link,
7611 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
7612 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
7613 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
7614 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
7615 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
7616 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
7617 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
7618 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
7619 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
7620 ppc64_elf_finish_dynamic_sections): ..
7621 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
7622 allocate_dynrelocs, elf_s390_size_dynamic_sections,
7623 elf_s390_finish_dynamic_sections): ..
7624 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
7625 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
7626 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
7627 sh64_elf64_finish_dynamic_sections): ..
7628 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
7629 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
7630 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
7631 sparc64_elf_finish_dynamic_symbol,
7632 sparc64_elf_finish_dynamic_sections): ..
7633 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
7634 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
7635 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
7636 elf64_x86_64_finish_dynamic_sections): ..
7637 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
7638 * elfcode.h (elf_slurp_reloc_table): ..
7639 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
7640 elf_finalize_dynstr, elf_link_add_object_symbols,
7641 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
7642 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
7643 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
7644 elf32_mips_grok_prstatus): ..
7645 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
7646 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
7647 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
7648 elfNN_ia64_finish_dynamic_sections): ..
7649 * elfxx-mips.c (mips_elf_create_procedure_table,
7650 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
7651 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
7652 mips_elf_global_got_index, mips_elf_multi_got,
7653 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7654 mips_elf_allocate_dynamic_relocations,
7655 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7656 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7657 _bfd_mips_elf_always_size_sections,
7658 _bfd_mips_elf_size_dynamic_sections,
7659 _bfd_mips_elf_finish_dynamic_symbol,
7660 _bfd_mips_elf_finish_dynamic_sections,
7661 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7662 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7663 _bfd_elf_mips_get_relocated_section_contents,
7664 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7665 * hp300hpux.c (callback): ..
7666 * hppabsd-core.c (make_bfd_asection): ..
7667 * hpux-core.c (make_bfd_asection): ..
7668 * i386linux.c (linux_link_create_dynamic_sections,
7669 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7670 * i386msdos.c (msdos_write_object_contents): ..
7671 * i386os9k.c (os9k_callback, os9k_write_object_contents,
7672 os9k_set_section_contents): ..
7673 * ieee.c (parse_expression, ieee_slurp_external_symbols,
7674 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7675 ieee_write_section_part, do_with_relocs, do_as_repeat,
7676 do_without_relocs, ieee_write_debug_part, init_for_output,
7677 ieee_set_section_contents): ..
7678 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7679 * irix-core.c (do_sections, make_bfd_asection): ..
7680 * libaout.h (aout_section_merge_with_text_p): ..
7681 * libbfd.c (_bfd_generic_get_section_contents,
7682 _bfd_generic_get_section_contents_in_window): ..
7683 * linker.c (default_indirect_link_order): ..
7684 * lynx-core.c (make_bfd_asection): ..
7685 * m68klinux.c (linux_link_create_dynamic_sections,
7686 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7687 * mach-o.c (bfd_mach_o_make_bfd_section,
7688 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7689 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7690 bfd_mach_o_scan_read_segment): ..
7691 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7692 _bfd_merge_sections): ..
7693 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7694 mmo_map_set_sizes, mmo_canonicalize_symtab,
7695 mmo_internal_write_section, mmo_write_object_contents): ..
7696 * netbsd-core.c (netbsd_core_file_p): ..
7697 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7698 nlm_alpha_set_public_section): ..
7699 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7700 * nlm32-sparc.c (nlm_sparc_write_import): ..
7701 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7702 nlm_compute_section_file_positions): ..
7703 * oasys.c (oasys_object_p, oasys_slurp_section_data,
7704 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7705 * opncls.c (get_debug_link_info): ..
7706 * osf-core.c (make_bfd_asection): ..
7707 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7708 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7709 final_link, aout_link_input_section): ..
7710 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7711 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7712 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7713 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7714 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7715 * ptrace-core.c (ptrace_unix_core_file_p): ..
7716 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7717 _bfd_final_link_relocate, bfd_generic_relax_section,
7718 bfd_generic_get_relocated_section_contents): ..
7719 * reloc16.c (bfd_coff_reloc16_relax_section,
7720 bfd_coff_reloc16_get_relocated_section_c): ..
7721 * riscix.c (riscix_some_aout_object_p): ..
7722 * rs6000-core.c (read_hdr, make_bfd_asection): ..
7723 * sco5-core.c (make_bfd_asection): ..
7724 * simple.c (bfd_simple_get_relocated_section_contents): ..
7725 * som.c (som_object_setup, setup_sections, som_prep_headers,
7726 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7727 som_set_reloc_info, som_get_section_contents,
7728 som_bfd_link_split_section): ..
7729 * sparclinux.c (linux_link_create_dynamic_sections,
7730 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7731 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7732 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7733 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7734 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7735 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7736 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7737 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7738 sunos_finish_dynamic_link): ..
7739 * syms.c (_bfd_stab_section_find_nearest_line): ..
7740 * tekhex.c (first_phase, tekhex_set_section_contents,
7741 tekhex_write_object_contents): ..
7742 * trad-core.c (trad_unix_core_file_p): ..
7743 * versados.c (process_esd, process_otr, process_otr): ..
7744 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7745 * vms-misc.c (add_new_contents): ..
7746 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7747 * vms.c (vms_set_section_contents): ..
7748 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7749 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7750 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7751 * xsym.c (bfd_sym_scan): .. See above.
7753 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
7755 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7756 calling _bfd_merged_section_offset only for section symbols.
7758 2004-06-22 Alan Modra <amodra@bigpond.net.au>
7760 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7761 for handling SEC_MERGE symbols in relax_section.
7763 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
7765 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
7766 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7767 linked together. Mark the result as h8300sx code.
7769 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
7771 * elf-bfd.h (struct elf_backend_data): Added
7772 elf_backend_omit_section_dynsym.
7773 (_bfd_elf_link_omit_section_dynsym): Declare.
7774 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7775 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7776 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7777 (_bfd_elf_link_renumber_dynsyms): ... this function.
7778 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7779 _bfd_elf_link_omit_section_dynsym).
7780 (elfNN_bed): Added elf_backend_omit_section_dynsym.
7782 2004-06-21 Nick Clifton <nickc@redhat.com>
7784 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7787 2004-06-17 Jerome Guitton <guitton@gnat.com>
7789 * bfd-in.h (bfd_cache_close_all): New function declaration.
7790 * bfd-in2.h: Regenerate.
7791 * cache.c (bfd_cache_close_all): New function definition.
7793 2004-06-16 Mark Kettenis <kettenis@gnu.org>
7795 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7797 * configure: Regenerate.
7799 2004-06-16 Daniel Jacobowitz <dan@debian.org>
7801 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7802 the pre-existing section.
7804 2004-06-15 Alan Modra <amodra@bigpond.net.au>
7806 * section.c (struct sec): Remove usused flags. Reorganize a little.
7807 (bfd_get_section_size_before_reloc): Delete.
7808 (bfd_get_section_size_after_reloc): Delete.
7809 (STD_SECTION): Update.
7810 (bfd_get_section_size_now): Delete.
7811 (bfd_set_section_contents): Don't referece reloc_done.
7812 (bfd_get_section_contents): Remove reloc_done comment.
7813 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7815 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7816 * ecoff.c (bfd_debug_section): Update initializer.
7817 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7818 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7819 * bfd-in.h (bfd_section_size): Expand.
7820 (bfd_get_section_size): New macro.
7821 * bfd-in2.h: Regenerate.
7822 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7823 bfd_get_section_size_before_reloc with bfd_get_section_size.
7824 * coffcode.h (coff_write_object_contents): Likewise.
7825 * coffgen.c (build_debug_section): Likewise.
7826 * dwarf1.c (parse_line_table): Likewise.
7827 (_bfd_dwarf1_find_nearest_line): Likewise.
7828 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7829 * i386msdos.c (msdos_write_object_contents): Likewise.
7830 * pdp11.c (squirt_out_relocs): Likewise.
7831 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7832 * elf64-mmix.c (mmix_elf_final_link): Update comment.
7834 2004-06-14 Chris Demetriou <cgd@broadcom.com>
7836 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7837 removal) with updated comment.
7838 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7840 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7841 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7843 2004-06-12 Alan Modra <amodra@bigpond.net.au>
7845 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7846 overflow on branches to undefweaks.
7848 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7850 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7851 as ecoff_section_data() does not return a valid lvalue.
7853 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
7855 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7856 (elf_link_add_object_symbols): Likewise.
7858 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7859 (elf_backend_reloc_type_class): New.
7861 2004-06-08 Mark Kettenis <kettenis@gnu.org>
7863 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7865 * configure: Regenerate.
7867 2004-06-07 Daniel Jacobowitz <dan@debian.org>
7869 From: Albert Chin-A-Young <china@thewrittenword.com>
7870 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7873 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
7875 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7878 2004-05-28 DJ Delorie <dj@redhat.com>
7880 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7881 for linking, but otherwise adjust reloc for merged sections.
7883 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
7885 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7886 _bfd_merged_section_offset for local symbols.
7888 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
7890 * Makefile.am: Regenerate dependencies.
7891 * Makefile.in: Regenerate.
7892 * archures.c: Add bfd_mach_sh3_nommu .
7893 * bfd-in2.h: Regenerate.
7894 * cpu-sh.c: Add sh3-nommu architecture.
7895 (bfd_to_arch_table): Create new table.
7896 (sh_get_arch_from_bfd_mach): Create new function.
7897 (sh_get_arch_up_from_bfd_mach): Create new function.
7898 (sh_merge_bfd_arch): Create new function.
7899 * elf32-sh.c (sh_ef_bfd_table): Add table.
7900 (sh_elf_check_relocs): Replace switch statement with
7901 use of sh_ef_bfd_table .
7902 (sh_elf_get_flags_from_mach): Add new function.
7903 (sh_find_elf_flags): Likewise.
7904 (sh_elf_copy_private_data): Replace most of non-elf contents
7905 with a call to sh_merge_bfd_arch() .
7907 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
7909 * Makefile.am (bfdver.h): Use explicit filename, not $< .
7910 * Makefile.in: Regenerate.
7912 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
7914 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7915 custom calling conventions for dynamic symbols.
7916 (mn10300_elf_relax_section): Avoid relaxing a function as a local
7917 symbol if it's an alias to a global one.
7919 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
7921 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7924 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
7926 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7929 2004-05-26 Alan Modra <amodra@bigpond.net.au>
7931 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7932 for SHT_GROUP sections.
7934 2004-05-25 Alan Modra <amodra@bigpond.net.au>
7936 * elflink.c (elf_link_add_object_symbols): Don't set up merge
7938 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7939 * merge.c: Formatting. Remove unnecessary casts. Expand
7940 bfd_get_section_alignment macro.
7941 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
7942 use throughout file.
7943 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
7944 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
7945 section name to determine sinfo group, instead test output section
7947 (_bfd_merge_sections): Add struct bfd_link_info param. Call
7948 _bfd_strip_section_from_output rather than just twiddling flags.
7949 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7950 (_bfd_merge_sections): Update prototype.
7951 * libbfd.h: Regenerate.
7953 2004-05-24 Mark Kettenis <kettenis@gnu.org>
7955 * netbsd-core.c: Correctly indent section that sets architecture
7958 From Miod Vallat <miod@online.fr>:
7959 * m88kopenbsd.c: New file.
7960 * targets.c (m88k_openbsd_vec): New.
7961 * config.bfd: Add m88k-*-openbsd*.
7962 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7963 (m88kopenbsd_vec): New.
7964 * configure: Regenerate.
7965 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7966 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7968 * Makefile.in: Regenerate.
7969 * po/SRC-POTFILES.in: Regenerate.
7971 2004-05-24 Nick Clifton <nickc@redhat.com>
7973 * hash.c: Remove bogus node "Changing the default Hash Table Size"
7974 introduced by hash table size patch.
7976 2004-05-22 Ben Elliston <bje@au.ibm.com>
7978 * configure.in (is_release): Remove.
7979 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7980 (AC_OUTPUT): Don't output bfdver.h from version.h.
7981 * configure: Regenerate.
7982 * Makefile.am (RELEASE): New variable.
7983 (bfdver.h): New target.
7984 * Makefile.in: Regenerate.
7985 * doc/Makefile.in: Likewise.
7987 2004-05-22 Ben Elliston <bje@au.ibm.com>
7989 * Makefile.am (config.status): Don't depend on version.h.
7990 * Makefile.in: Regenerate.
7992 2004-05-22 Alan Modra <amodra@bigpond.net.au>
7994 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7995 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7996 * libbfd.h: Regenerate.
7997 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7998 (_bfd_elf_rel_local_sym): Likewise.
7999 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
8000 (elf_link_input_bfd): Likewise.
8001 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
8002 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8003 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8004 (elfNN_ia64_relocate_section): Likewise.
8006 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
8008 * hash.c (bfd_default_hash_table_size): New variable.
8009 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
8010 (bfd_hash_set_default_size): New function. Set the default size
8011 to a selected prime number close to the argument. Document new
8013 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
8014 * bfd-in2.h: Regenerate.
8015 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
8016 * Makefile.in: Regenerate.
8018 2004-05-21 Mark Kettenis <kettenis@gnu.org>
8020 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
8021 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
8022 arm, m68k, m88k and hppa core files.
8024 2004-05-21 Nick Clifton <nickc@redhat.com>
8026 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
8027 (bfd_bwrite): Likewise.
8028 (bfd_tell): Likewise.
8029 (bfd_flush): Likewise.
8030 (bfd_stat): Likewise.
8031 (bfd_seek): Likewise.
8032 (bfd_get_mtime): Likewise.
8033 (bfd_get_size): Likewise.
8035 2004-05-19 Ben Elliston <bje@au.ibm.com>
8037 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
8039 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
8041 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
8042 (bfd_generic_openr_next_archived_file): Likewise.
8044 2004-05-17 Bob Wilson <bob.wilson@acm.org>
8046 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
8047 section names by inserting a new substring after .gnu.linkonce, except
8048 for .gnu.linkonce.t.* where the "t." is replaced.
8050 2004-05-17 Adam Nemet <anemet@lnxw.com>
8052 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
8053 (m68-*-lynxos* case): Likewise.
8054 (powerpc-*-lyxnos* case): New case.
8055 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
8057 2004-05-17 David Heine <dlheine@tensilica.com>
8059 * aout-target.h (MY_bfd_copy_private_header_data): Define.
8060 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
8061 * bfd.c (bfd_copy_private_header_data): Define.
8062 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
8064 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8065 * coffcode.h (coff_bfd_copy_private_header_data): Define.
8066 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
8067 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
8068 segments by calling copy_private_bfd_data.
8069 (_bfd_elf_copy_private_header_data): Define.
8070 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
8071 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
8072 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
8073 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
8074 * mmo.c (mmo_bfd_copy_private_header_data): Define.
8075 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
8076 * som.c (som_bfd_copy_private_header_data): Define.
8077 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
8078 * vms.c (vms_bfd_copy_private_header_data): Define.
8079 * bfd-in2.h: Regenerate.
8080 * libbfd.h: Regenerate.
8082 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8084 * elfxx-mips.c (MINUS_TWO): Define.
8085 (mips_elf_higher, mips_elf_highest,
8086 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
8087 some bfd_vma values.
8088 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
8090 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8092 * som.c (log2): Rename to exact_log2. Adjust all callers.
8094 2004-05-13 Paul Brook <paul@codesourcery.com>
8096 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
8097 dwarf3 format CIE entries. Remove comment about the size of the
8098 ra_column field. It is now correctly deduced.
8100 2004-05-13 Joel Sherrill <joel@oarcorp.com>
8102 * config.bfd (or32-*-rtems*): Switch to elf.
8104 2004-05-13 Nick Clifton <nickc@redhat.com>
8106 * po/fr.po: Updated French translation.
8108 2004-05-11 Jakub Jelinek <jakub@redhat.com>
8110 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8111 into .dynsym if elf_section_data (sec)->dynindx <= 0.
8112 Adjust counting of last_local.
8113 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
8114 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
8115 created by the linker nor !SHF_ALLOC.
8117 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
8118 DT_PLTGOT to the start of the .got.plt section instead of the
8119 .got output section. Set sh_entsize for .got section in addition
8121 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
8122 is at sgot->output_section->vma.
8123 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
8124 DT_PLTGOT to the start of the .got.plt section instead of the
8125 .got output section.
8126 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
8127 is at sgot->output_section->vma. Set sh_entsize for .got section
8128 in addition to .got.plt.
8129 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
8130 (bfd_section_from_phdr): Likewise.
8131 (map_sections_to_segments): Likewise.
8132 (assign_file_positions_for_segments): Likewise.
8133 (get_program_header_size): Likewise.
8134 * elflink.c (bfd_elf_size_dynamic_sections): Set
8135 elf_tdata (output_bfd)->relro from info->relro.
8136 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
8138 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
8140 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
8141 a zero symndx for which we hadn't accounted a dynamic relocation.
8142 (_frvfdpic_add_rofixup): Likewise.
8144 2004-05-07 Brian Ford <ford@vss.fsi.com>
8145 DJ Delorie <dj@redhat.com>
8147 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
8148 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
8149 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
8150 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
8152 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
8154 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
8155 immediately if there's no link info.
8156 (elf32_frvfdpic_copy_private_bfd_data): New.
8157 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
8159 2004-05-06 Zack Weinberg <zack@codesourcery.com>
8161 * dwarf2.c (add_line_info): Also set info->filename to NULL if
8162 filename argument is null; do not call strlen on a null pointer.
8164 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
8166 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
8169 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
8171 * configure.in (bfd_elf32_frvfdpic_vec): New.
8172 * configure: Rebuilt.
8173 * targets.c (bfd_elf32_frvfdpic_vec): New.
8174 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
8176 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
8177 frvfdpic instead of frv. Rearrange elf-target macros such that
8178 the FDPIC-specific ones are only defined for this new target
8180 (bfd_elf32_frvfdpic_vec): Declare.
8182 (elf32_frv_relocate_section): Use it to enable segment checking
8183 and to control rofixup emission. Add output section vma to
8184 applied relocation in non-LOAD non-ALLOC sections. Use
8185 _bfd_error_handler for errors.
8186 (_frv_create_got_section): Create .rel.got and .rofixup only in
8187 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
8189 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
8190 (elf32_frvfdpic_modify_segment_map): Likewise.
8191 (elf32_frv_finish_dynamic_sections): New, do-nothing.
8192 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
8193 error message if we miscompute the rofixup size.
8194 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
8195 (frvfdpic_elf_encode_eh_address): Likewise.
8196 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
8197 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
8198 relocs. Reject unknown relocation types.
8199 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
8200 (frv_elf_merge_private_bfd_data): Likewise.
8201 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
8202 0x4000 for newly-added elf32-frvfdpic.
8204 2004-05-05 Nick Clifton <nickc@redhat.com>
8207 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
8208 returning NULL as most users of this function do not check its
8210 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
8211 of bfd_cache_lookup().
8212 * sco5-core.c (sco5_core_file_p): Likewise.
8213 * trad-core.c (trad_unix_core_file_p): Likewise.
8215 2004-05-05 Nick Clifton <nickc@redhat.com>
8217 * cache.c (bfd_cache_lookup): Improve formatting.
8218 * archive.c: Fix formatting.
8220 2004-05-05 Peter Barada <peter@the-baradas.com>
8222 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
8223 * cpu-m68k.c(bfd_m68k_arch): Likewise.
8224 * bfd-in2.h(bfd_architecture): Regenerate.
8226 2004-05-03 Alan Modra <amodra@bigpond.net.au>
8228 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
8230 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
8231 those against discarded link-once and SEC_MERGE section symbols.
8233 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
8235 * section.c (bfd_get_section_by_name_if): New.
8236 * bfd-in2.h: Regenerated.
8238 2004-05-02 Alan Modra <amodra@bigpond.net.au>
8240 * som.c (som_bfd_is_group_section): Define.
8242 2004-05-01 Alan Modra <amodra@bigpond.net.au>
8244 * section.c (bfd_make_section_anyway): Copy the whole
8245 bfd_hash_entry, not just "next" from existing entry.
8247 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
8249 * elf.c (bfd_section_from_shdr): Maintain the section order in
8251 (special_sections): Add ".note.GNU-stack".
8252 (elf_fake_sections): Handle section group for relocatable
8255 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
8257 * section.c (bfd_sections_find_if): New.
8258 * bfd-in2.h: Regenerated.
8260 2004-04-30 Alan Modra <amodra@bigpond.net.au>
8262 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
8264 * elf-bfd.h (bfd_elf_is_group_section): Declare.
8265 * elf.c (bfd_elf_is_group_section): New function.
8266 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
8267 * section.c (bfd_generic_is_group_section): New function.
8268 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
8269 (BFD_JUMP_TABLE_LINK): Adjust.
8270 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
8271 * aout-target.h (MY_bfd_is_group_section): Define.
8272 * aout-tic30.c (MY_bfd_is_group_section): Define.
8273 * bfd.c (bfd_is_group_section): Define.
8274 * binary.c (binary_bfd_is_group_section): Define.
8275 * bout.c (b_out_bfd_is_group_section): Define.
8276 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
8277 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
8278 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
8279 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
8280 * coffcode.h (coff_bfd_is_group_section): Define.
8281 * i386msdos.c (msdos_bfd_is_group_section): Define.
8282 * i386os9k.c (os9k_bfd_is_group_section): Define.
8283 * ieee.c (ieee_bfd_is_group_section): Define.
8284 * ihex.c (ihex_bfd_is_group_section): Define.
8285 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
8286 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
8287 * mmo.c (mmo_bfd_is_group_section): Define.
8288 * nlm-target.h (nlm_bfd_is_group_section): Define.
8289 * oasys.c (oasys_bfd_is_group_section): Define.
8290 * pef.c (bfd_pef_bfd_is_group_section): Define.
8291 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
8292 * srec.c (srec_bfd_is_group_section): Define.
8293 * tekhex.c (tekhex_bfd_is_group_section): Define.
8294 * versados.c (versados_bfd_is_group_section): Define.
8295 * vms.c (vms_bfd_is_group_section): Define.
8296 * xsym.c (bfd_sym_bfd_is_group_section): Define.
8297 * bfd-in2.h: Regenerate.
8298 * libbfd.h: Regenerate.
8300 2004-04-30 Alan Modra <amodra@bigpond.net.au>
8302 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
8304 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
8306 * configure.in: Update version to 2.15.91.
8307 * configure: Regenerate.
8309 2004-04-29 Brian Ford <ford@vss.fsi.com>
8311 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
8312 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
8313 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
8314 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
8315 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
8316 .gnu.linkonce.wi. sections.
8317 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
8318 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
8320 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
8321 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8323 2004-04-28 Chris Demetriou <cgd@broadcom.com>
8325 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
8326 * bfd-in2.h: Regenerate.
8327 * libbfd.h: Likewise.
8329 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8331 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
8333 (setup_sections): Use som_subspace_dictionary_record struct instead
8334 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
8335 is_comdat, is_common or dup_common.
8336 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
8337 is_comdat, is_common and dup_common in section subspace_dict from
8339 (som_begin_writing): Use som_subspace_dictionary_record struct.
8340 (som_finish_writing): Likewise.
8341 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
8342 is_common and dup_common flags in info for symbol. Add comment
8343 regarding linker support for these fields. Slightly reorganize
8345 (som_build_and_write_symbol_table): Set is_comdat, is_common and
8346 dup_common fields in symbol table from symbol info.
8347 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
8348 arguments. Set corresponding fields in copy_data. Change all callers.
8349 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
8351 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
8352 * som.h (som_subspace_dictionary_record): Define.
8353 (som_copyable_section_data_struct): Add is_comdat, is_common and
8355 (som_section_data_struct): Use som_subspace_dictionary_record struct
8356 instead of subspace_dictionary_record.
8357 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
8359 2004-04-27 Bob Wilson <bob.wilson@acm.org>
8361 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
8362 if set. Check reloc_done flag before applying relocations. Use
8363 output addresses, both when applying relocations and when comparing
8364 against the specified section.
8365 (elf_xtensa_relocate_section): Use output address to check if dynamic
8366 reloc is in a literal pool. Set section's reloc_done flag.
8368 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
8370 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
8371 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
8373 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
8376 2004-04-27 Alan Modra <amodra@bigpond.net.au>
8378 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
8379 structure field removed in 2004-04-24 patch.
8380 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
8382 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
8384 * elf32-arm.h (elf32_arm_section_flags): Likewise.
8385 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
8386 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
8387 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
8388 field before calling elf_backend_section_flags.
8390 2004-04-24 Chris Demetriou <cgd@broadcom.com>
8392 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
8393 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
8394 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
8395 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
8396 and BFD_RELOC_32_PCREL.
8397 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
8398 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
8399 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8400 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
8401 (mips_elf_next_relocation): Move comment about matching HI/LO
8403 (_bfd_mips_elf_relocate_section): Here. Remove handling for
8404 R_MIPS_GNU_REL_HI16.
8406 2004-04-23 Chris Demetriou <cgd@broadcom.com>
8408 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
8409 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
8410 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
8411 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
8412 and update comments to reflect current usage.
8413 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
8414 and MIPS_R_SWITCH, as well as several empty entries. Update comment
8416 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
8417 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
8418 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8419 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
8420 type number to be MIPS_R_PCREL16.
8421 (mips_relocate_section): Remove support for link-time relaxation
8422 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
8423 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
8424 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
8425 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
8426 relaxation of branches used by embedded-PIC.
8427 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
8428 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
8429 related members, update comment.
8430 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
8431 code related to embedded-PIC.
8432 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
8433 initialization of now-removed 'adjust' member of
8434 'struct ecoff_debug_info'.
8436 2004-04-23 Chris Demetriou <cgd@broadcom.com>
8438 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
8440 2004-04-21 Philip Blundell <pb@nexus.co.uk>
8442 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
8443 relocs for locally defined symbols during -shared final link.
8444 (elf32_arm_final_link_relocate): Likewise.
8446 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8448 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
8449 ELF_LINK_POINTER_EQUALITY_NEEDED.
8450 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
8451 if r_type is not R_X86_64_PC32.
8452 (elf64_x86_64_finish_dynamic_symbol): If
8453 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
8456 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
8458 * elf32-sh.c (sh_elf_plt_sym_val): New function.
8459 (elf_backend_plt_sym_val): Define.
8461 2004-04-22 Andrew Cagney <cagney@redhat.com>
8463 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
8465 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8467 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
8469 * som.c (som_set_section_contents): Constantify second argument.
8470 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
8471 (som_object_setup): Rework to avoid warning.
8472 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
8475 2004-04-22 Andrew Cagney <cagney@redhat.com>
8477 * cache.c (bfd_cache_close): Check for a previously closed file.
8479 2004-04-22 Jakub Jelinek <jakub@redhat.com>
8481 * bfd.c (bfd_get_synthetic_symtab): Define.
8482 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
8483 NAME##_get_synthetic_symtab.
8484 (struct bfd_target): Add _bfd_get_synthetic_symtab.
8485 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
8486 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
8488 (_bfd_elf_get_synthetic_symtab): New prototype.
8489 * elfcode.h (elf_get_synthetic_symtab): Define.
8490 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
8491 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
8492 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
8493 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
8494 * bfd-in2.h: Rebuilt.
8495 * libbfd.h: Rebuilt.
8496 * elf32-i386.c (elf_i386_plt_sym_val): New function.
8497 (elf_backend_plt_sym_val): Define.
8498 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
8499 (elf_backend_plt_sym_val): Define.
8500 * elf32-s390.c (elf_s390_plt_sym_val): New function.
8501 (elf_backend_plt_sym_val): Define.
8502 * elf64-s390.c (elf_s390_plt_sym_val): New function.
8503 (elf_backend_plt_sym_val): Define.
8504 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
8505 (elf_backend_plt_sym_val): Define.
8506 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
8507 (elf_backend_plt_sym_val): Define.
8508 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
8509 (elf_backend_plt_sym_val): Define.
8510 * aout-target.h (MY_get_synthetic_symtab): Define.
8511 * aout-tic30.c (MY_get_synthetic_symtab): Define.
8512 * coff-rs6000.c (rs6000coff_vec): Add
8513 _bfd_nodynamic_get_synthetic_symtab.
8514 (pmac_xcoff_vec): Likewise.
8515 * coff64-rs6000.c (rs6000coff64_vec): Add
8516 _bfd_nodynamic_get_synthetic_symtab.
8517 (aix5coff64_vec): Likewise.
8518 * sunos.c (MY_get_synthetic_symtab): Define.
8519 * vms.c (vms_get_synthetic_symtab): Define.
8521 2004-04-22 Nick Clifton <nickc@redhat.com>
8523 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
8525 2004-04-22 Peter Barada <peter@the-baradas.com>
8527 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
8528 * bfd2-in.h: Regenerate.
8529 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
8531 2004-04-21 Chris Demetriou <cgd@broadcom.com>
8533 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
8534 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
8535 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
8536 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
8537 * bfd-in2.h: Regenerate.
8539 2004-04-21 Bob Wilson <bob.wilson@acm.org>
8541 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
8542 require relocations against a weak symbol to reference the same
8543 symbol hash entry if not a final, static link.
8544 (get_cached_value, add_value_map): Add final_static_link argument.
8545 (remove_literals): Pass final_static_link argument as needed.
8547 2004-04-21 Andrew Cagney <cagney@redhat.com>
8549 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
8550 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
8551 (opncls_bwrite, opncls_bclose, opncls_bflush)
8552 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
8553 bfd iovec that uses function callbacks.
8554 (bfd_close): Use the iovec's bclose.
8555 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
8556 (cache_bclose, cache_bflush, cache_bstat)
8557 (cache_iovec): New functions and global variable, implement a
8558 cache "iovec", where applicable set bfd_error.
8559 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
8560 * bfdio.c (struct bfd_iovec): Define.
8561 (real_read): Delete function.
8562 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
8563 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
8564 assume that bread and bwrite set bfd_error.
8565 * bfd.c (struct bfd): Add "iovec", update comments.
8566 * bfd-in2.h, libbfd.h: Re-generate.
8568 2004-04-21 Andrew Cagney <cagney@redhat.com>
8570 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8572 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
8574 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
8575 (bfd_elf_gc_sections): Fail if a shared object is being created.
8576 Do not fail if dynamic sections have been created. Instead call
8577 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
8578 dynamically referenced symbols. Do not mark the whole graph
8579 rooted at .eh_frame, only the section proper.
8581 2004-04-20 DJ Delorie <dj@redhat.com>
8583 * reloc.c: Add BFD_RELOC_32_SECREL.
8584 * bfd-in2.h: Regenerate.
8585 * libbfd.h: Likewise.
8586 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
8587 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
8588 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
8590 2004-04-19 Jakub Jelinek <jakub@redhat.com>
8592 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
8593 relocs against hidden/protected undefweak symbols properly.
8594 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8596 2004-04-18 Mark Kettenis <kettenis@gnu.org>
8598 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
8599 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
8602 2004-04-17 Brian Ford <ford@vss.fsi.com>
8604 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
8605 filepos for the SizeOfHeaders field.
8606 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
8608 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
8610 2004-04-16 Alan Modra <amodra@bigpond.net.au>
8612 * simple.c (bfd_simple_get_relocated_section_contents): Don't
8613 change reloc_done. Set and restore _cooked_size.
8616 2004-04-15 Mark Kettenis <kettenis@gnu.org>
8618 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
8621 2004-04-15 Nick Clifton <nickc@redhat.com>
8623 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
8625 2004-04-15 Alan Modra <amodra@bigpond.net.au>
8627 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
8629 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
8631 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
8632 when it is a definition.
8634 2004-04-14 Alan Modra <amodra@bigpond.net.au>
8636 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
8637 when statically linking PIC code.
8638 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8640 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8642 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
8643 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
8644 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
8645 * configure: Regenerate.
8647 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
8649 * elflink.c: Include libiberty.h.
8650 * Makefile.am (elflink.lo): Depend on libiberty.h.
8651 * Makefile.in: Regenerate.
8653 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
8655 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8658 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
8660 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8661 reserve the memory for dynamic linker
8663 2004-04-05 Mark Kettenis <kettenis@gnu.org>
8665 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8666 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8668 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8670 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8671 RELOC_FOR_GLOBAL_SYMBOL.
8672 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8674 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
8676 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8677 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8679 2004-04-01 Paul Brook <paul@codesourcery.com>
8681 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8682 * elf32-arm.h (struct elf32_elf_section_map): New.
8683 (struct _arm_elf_section_data): New.
8684 (elf32_arm_section_data): Define.
8685 (struct elf32_arm_link_hash_table): Add byteswap_code.
8686 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8687 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8688 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8689 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8690 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8691 (bfd_elf32_new_section_hook, elf_backend_write_section,
8692 elf_backend_link_output_symbol_hook): Define.
8694 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
8696 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8697 that keeps the characters in a B_INCL..B_EINCL range.
8698 (_bfd_link_section_stabs): When computing the sum of the
8699 characters in a B_INCL..B_EINCL range also keep a copy of those
8700 characters. Use this information to distinguish between
8701 include sections that have the same sum and the same length
8702 but which are nevertheless unique.
8704 2004-03-31 Paul Brook <paul@codesourcery.com>
8706 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8707 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8709 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
8711 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8712 to 'sum_chars' and add field 'num_chars'.
8713 (_bfd_link_section_stabs): When computing the sum of the
8714 characters in a B_INCL..B_EINCL range also keep a count of the
8715 number of characters. Use this information to help distinguish
8716 between include sections when have the same sum but which
8717 nevertheless are still unique.
8719 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
8721 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8723 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
8724 Tomer Levi <Tomer.Levi@nsc.com>
8726 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8727 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8728 (BFD32_BACKENDS): Add elf32-cr16c.lo.
8729 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8730 (cpu-cr16c.lo): New target.
8731 (elf32-cr16c.lo): Likewise.
8732 * Makefile.in: Regenerate.
8733 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8734 (bfd_archures_list): Add bfd_cr16c_arch.
8735 * config.bfd: Handle cr16c-*-elf*.
8736 * configure.in: Handle bfd_elf32_cr16c_vec.
8737 * configure: Regenerate.
8738 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8739 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8740 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8741 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8742 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8743 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8744 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8745 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8746 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8747 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8748 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8749 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8750 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8751 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8752 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8753 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8754 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8755 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8756 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8757 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8758 * targets.c (bfd_elf32_cr16c_vec): Declare.
8759 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8760 * cpu-cr16c.c: New file.
8761 * elf32-cr16c.c: Likewise.
8762 * libbfd.h: Regenerate.
8763 * bfd-in2.h: Likewise.
8765 2004-03-30 Jakub Jelinek <jakub@redhat.com>
8767 * elf.c (map_sections_to_segments): Fix handling of .tbss.
8769 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8771 * Makefile.am: Remove all mention of elflink.h.
8772 * Makefile.in: Regenerate.
8773 * bfd-in.h (bfd_elf_discard_info): Declare.
8774 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8775 * bfd-in2.h: Regenerate.
8776 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8777 bfd_elf32_link_record_dynamic_symbol,
8778 bfd_elf64_link_record_dynamic_symbol,
8779 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8780 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8781 _bfd_elf32_link_record_local_dynamic_symbol,
8782 _bfd_elf64_link_record_local_dynamic_symbol,
8783 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8784 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8785 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8786 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8787 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8788 _bfd_elf32_reloc_symbol_deleted_p,
8789 _bfd_elf64_reloc_symbol_deleted_p): Delete.
8790 (bfd_elf_link_record_dynamic_symbol,
8791 bfd_elf_link_record_local_dynamic_symbol,
8792 bfd_elf_final_link, bfd_elf_gc_sections,
8793 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8794 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8795 bfd_elf_reloc_symbol_deleted_p): Declare.
8796 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8797 * elf32-arm.h: Update for changed function names. Remove local
8798 WILL_CALL_FINISH_DYNAMIC_SECTION define.
8799 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8800 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8801 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8802 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8803 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8804 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8805 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8806 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8807 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8808 (bfd_elfNN_print_symbol): Define.
8809 * elfcode.h: Don't include elflink.h.
8810 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8811 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8812 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8813 elf_gc_record_vtinherit, elf_gc_record_vtentry,
8814 elf_link_record_local_dynamic_symbol): Don't define.
8815 * elflink.c: Update for changed function names. Move elflink.h
8817 * elflink.h: Delete file.
8818 * po/SRC-POTFILES.in: Regenerate.
8819 * po/bfd.pot: Regenerate.
8821 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8823 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8824 "name" for global syms accidentally removed in 2004-03-20 change.
8826 2004-03-27 Alan Modra <amodra@bigpond.net.au>
8828 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8829 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8830 where Elf_External_* is different for 64 and 32 bit, with
8831 corresponding elf_size_info field.
8832 (struct elf_final_link_info): Use "bfd_byte *" instead
8833 of "Elf_External_Sym *" for external_syms and symbuf.
8834 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8835 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8836 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8837 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8838 (elf_link_sort_cmp2): Adjust.
8839 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8840 using ELF_R_SYM macro. Set u.sym_mask.
8841 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8842 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
8843 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
8844 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
8845 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
8846 swap_syn_out functions. Rearrange dyn swap in/out switch.
8847 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8848 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
8849 (elf_link_flush_output_syms): Add elf_backend_data arg.
8850 (elf_link_check_versioned_symbol): Likewise.
8851 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8852 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
8853 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
8854 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8855 ELF_R_TYPE and ELF_R_INFO macros.
8856 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8857 based on size rather than using ELF_R_INFO.
8858 (elf_gc_mark): Set up r_sym_shift local var and use instead of
8860 (struct alloc_got_off_arg): New.
8861 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8862 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
8863 (elf_gc_allocate_got_offsets): Adjust.
8864 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8865 ELF_R_SYM. Use bfd_section_from_elf_index.
8866 (elf_bfd_discard_info): Set cookie.r_sym_shift.
8867 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8868 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8870 2004-03-26 Stan Shebs <shebs@apple.com>
8872 Remove MPW support, no longer used.
8873 * config.bfd (powerpc-*-mpw*): Remove configuration.
8874 * mpw-config.in, mpw-make.sed: Remove files.
8875 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8877 2004-03-26 Alan Modra <amodra@bigpond.net.au>
8879 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8880 (ppc64_elf_add_symbol_hook): New function.
8881 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8882 const from Elf_Internal_Sym param.
8883 * elflink.c (elf_link_add_object_symbols): Adjust.
8884 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8885 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8886 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8887 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8888 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8889 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8890 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8891 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8892 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8893 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8894 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8895 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8896 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8897 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8898 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8899 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8901 2004-03-26 Alan Modra <amodra@bigpond.net.au>
8903 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8904 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8905 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8906 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8907 (bfd_elf64_bfd_link_add_symbols): Delete.
8908 (bfd_elf_link_add_symbols): Declare.
8909 * elfcode.h (elf_bfd_link_add_symbols): Delete.
8910 * elflink.c: Include safe-ctype.h.
8911 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8913 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8914 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8916 (elf_link_add_archive_symbols): Rename from
8917 _bfd_elf_link_add_archive_symbols, make static.
8918 (elf_link_add_object_symbols): New function. Corresponding
8919 elflink.h function converted to use elf_size_info.
8920 (bfd_elf_link_add_symbols): Likewise.
8921 (bfd_elf_size_dynamic_sections): Adjust.
8922 * elflink.h (elf_bfd_link_add_symbols): Delete.
8923 (elf_link_add_object_symbols): Delete.
8924 * elf32-gen.c (elf32_generic_link_add_symbols): Call
8925 bfd_elf_link_add_symbols.
8926 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8928 2004-03-25 Alan Modra <amodra@bigpond.net.au>
8930 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8931 and chained shared libs only if dynsym. Clear dynsym on forced-local.
8933 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8934 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8935 (_bfd_elf_add_dt_needed_tag): Declare.
8936 (_bfd_elf_sort_symbol): Declare.
8937 (_bfd_elf_finalize_dynstr): Declare.
8938 (RELOC_FOR_GLOBAL_SYM): Formatting.
8939 * elfcode.h (elf_add_dynamic_entry): Delete.
8940 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
8941 elflink.h function converted to use elf_size_info.
8942 (_bfd_elf_add_dt_needed_tag): Likewise.
8943 (_bfd_elf_sort_symbol): Likewise.
8944 (_bfd_elf_finalize_dynstr): Likewise.
8945 (compute_bucket_count): Likewise.
8946 (bfd_elf_size_dynamic_sections): Likewise. Check result of
8947 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8948 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8949 * elflink.h: ..here.
8950 (sort_symbol, add_dt_needed_tag): Delete.
8951 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8952 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8954 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
8955 * elf32-cris.c (add_dynamic_entry): Likewise.
8956 * elf32-hppa.c (add_dynamic_entry): Likewise.
8957 * elf32-i370.c (add_dynamic_entry): Likewise.
8958 * elf32-i386.c (add_dynamic_entry): Likewise.
8959 * elf32-m32r.c (add_dynamic_entry): Likewise.
8960 * elf32-m68k.c (add_dynamic_entry): Likewise.
8961 * elf32-ppc.c (add_dynamic_entry): Likewise.
8962 * elf32-s390.c (add_dynamic_entry): Likewise.
8963 * elf32-sh.c (add_dynamic_entry): Likewise.
8964 * elf32-sparc.c (add_dynamic_entry): Likewise.
8965 * elf32-vax.c (add_dynamic_entry): Likewise.
8966 * elf32-xtensa.c (add_dynamic_entry): Likewise.
8967 * elf64-alpha.c (add_dynamic_entry): Likewise.
8968 * elf64-hppa.c (add_dynamic_entry): Likewise.
8969 * elf64-ppc.c (add_dynamic_entry): Likewise.
8970 * elf64-s390.c (add_dynamic_entry): Likewise.
8971 * elf64-sparc.c (add_dynamic_entry): Likewise.
8972 * elf64-x86-64.c (add_dynamic_entry): Likewise.
8973 * elfxx-ia64.c (add_dynamic_entry): Likewise.
8974 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8975 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8976 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8977 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8979 2004-03-23 Paul Brook <paul@codesourcery.com>
8981 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8983 2004-03-22 Bob Wilson <bob.wilson@acm.org>
8985 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8986 literal tables and check for relocs outside of literal pools.
8987 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8988 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8990 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8991 (elf_xtensa_relocate_section): Read literal tables and check for
8992 dynamic relocations in read-only sections and not in literal pools.
8994 2004-03-23 Alan Modra <amodra@bigpond.net.au>
8997 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8999 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
9001 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
9002 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
9003 not defined by the executable, or defined in a DSO.
9004 <eliding run-time relocation of .got>: Initialize GOT entry for a
9005 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
9007 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
9008 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
9009 a PLT reloc to GOT for an executable.
9010 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
9011 .got for a DSO and explain why.
9012 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
9013 and unreferenced symbols for which a PLT is defined. Adjust
9014 dynamic-symbol pruning correspondingly, to make sure we don't lose
9015 a dynamic symbol also defined by a DSO.
9017 2004-03-22 Alan Modra <amodra@bigpond.net.au>
9019 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
9020 and rel args. Group input and output args. Wrap to 80 columns.
9021 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
9022 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
9023 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
9024 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
9025 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
9026 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
9027 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
9028 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
9029 RELOC_FOR_GLOBAL_SYMBOL invocation.
9031 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
9033 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
9034 unresolved symbols in objects aren't allowed.
9036 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
9038 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9039 (elf_hppa_unmark_useless_dynamic_symbols):
9040 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
9041 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
9042 (elf32_hppa_relocate_section): Likewise.
9043 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9044 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9045 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9046 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9047 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
9049 * elf-m10200.c (mn10200_elf_relocate_section): Use
9050 RELOC_FOR_GLOBAL_SYMBOL.
9051 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
9052 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
9053 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9054 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
9055 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
9056 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
9057 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9058 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
9059 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
9060 * elf32-v850.c (v850_elf_relocate_section): Likewise.
9061 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
9062 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
9064 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9066 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
9067 (final_link_relocate): Likewise.
9068 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
9069 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
9071 2004-03-19 Alan Modra <amodra@bigpond.net.au>
9073 * Makefile.am: Run "make dep-am".
9074 * Makefile.in: Regenerate.
9075 * aclocal.m4: Regenerate.
9076 * config.in: Regenerate.
9077 * po/bfd.pot: Regenerate.
9079 2004-03-19 Alan Modra <amodra@bigpond.net.au>
9080 H.J. Lu <hongjiu.lu@intel.com>
9082 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
9083 type and size change code to where it was previously. Remove
9084 dt_needed param. Treat old weak syms as strong if new sym is
9085 from a shared lib, even when old sym is from another shared
9086 lib. Remove unnecessary tests of oldweak and newweak. Correct
9088 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
9089 _bfd_elf_merge_symbol calls.
9090 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
9091 dt_needed local var. Update comments.
9092 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
9093 (_bfd_elf_add_default_symbol): Likewise.
9095 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
9096 strong syms in one shared object overriding weak syms in another.
9098 2004-03-18 Alan Modra <amodra@bigpond.net.au>
9100 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
9101 dyn_lib_class field. Rearrange for better packing.
9102 (elf_dt_soname): Delete.
9103 (elf_dyn_lib_class): Define.
9104 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
9105 (bfd_elf_set_dt_needed_soname): Delete.
9106 (bfd_elf_set_dyn_lib_class): New function.
9107 * elflink.h (add_dt_needed_tag): New function. Split out from..
9108 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
9109 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
9110 initialization of soname.
9111 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
9113 * bfd-in.h (enum dynamic_lib_link_class): New.
9114 (bfd_elf_set_dt_needed_soname): Delete.
9115 (bfd_elf_set_dyn_lib_class): Declare.
9116 * bfd-in2.h: Regenerate.
9118 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
9119 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
9120 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
9121 symbol loop. Instead use add_needed to flag tag as written.
9123 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
9125 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
9126 logic for null_input_bfd detection.
9128 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
9130 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
9132 2004-03-16 Mark Kettenis <kettenis@gnu.org>
9134 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
9137 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9139 * elflink.c (elf_link_read_relocs_from_section): Don't use
9140 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
9141 (_bfd_elf_link_read_relocs): ..to here.
9142 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
9144 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9146 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
9147 values selected in configure.host. Require both to be defined
9148 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
9149 corresponding BFD_HOST vars with quotes.
9150 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
9151 Always require BFD_HOST_64_BIT_DEFINED.
9152 <file_ptr type>: Find off_t size before emitting message. Combine
9153 off_t and ftello64 conditional.
9154 * configure: Regenerate.
9156 2004-03-16 Alan Modra <amodra@bigpond.net.au>
9158 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
9159 aliasing warning. Remove trailing whitespace throughout file.
9161 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9163 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
9164 input_section in calls to get_dyn_name.
9165 * 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
9167 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
9169 2004-03-15 Alan Modra <amodra@bigpond.net.au>
9171 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
9172 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
9173 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
9174 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
9175 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
9176 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
9177 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
9179 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
9180 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
9181 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
9182 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
9183 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
9184 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
9185 (read_8_bytes, read_indirect_string, read_address): Likewise.
9186 (read_abbrevs, parse_comp_unit): Likewise.
9187 * targets.c (struct bfd_target): Likewise.
9188 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
9189 * hppabsd-core.c: Likewise. Formatting.
9190 * hpux-core.c: Likewise.
9191 * irix-core.c: Likewise.
9192 * netbsd-core.c: Likewise.
9193 * osf-core.c: Likewise.
9194 * ptrace-core.c: Likewise.
9195 * sco5-core.c: Likewise.
9196 * trad-core.c: Likewise.
9197 * configure: Regenerate.
9198 * bfd-in2.h: Regenerate.
9200 2004-03-15 Alan Modra <amodra@bigpond.net.au>
9202 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
9203 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
9204 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
9205 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
9206 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
9207 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
9208 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
9209 * libbfd.c: Likewise in function definitions.
9210 (bfd_put_8): Mask with 0xff rather than casting to char.
9211 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
9212 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
9213 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
9214 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
9215 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
9216 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
9217 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
9218 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
9219 (H_GET_64, H_GET_32, H_GET_16): Likewise.
9220 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
9221 * archive.c (do_slurp_coff_armap): Update swap prototype.
9222 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
9223 (tic54x_getl_signed_32): Likewise.
9224 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
9225 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
9226 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
9227 (bfd_getp_signed_32, bfd_putp32): Likewise.
9228 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
9229 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
9230 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
9231 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
9232 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
9233 bfd_h_getx_signed_16, bfd_h_putx16.
9234 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
9235 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
9236 * hpux-core.c: Likewise.
9237 * irix-core.c: Likewise.
9238 * netbsd-core.c: Likewise.
9239 * osf-core.c: Likewise.
9240 * ptrace-core.c: Likewise.
9241 * sco5-core.c: Likewise.
9242 * trad-core.c: Likewise.
9243 * bfd-in2.h: Regenerate.
9245 2004-03-15 Matt Thomas <matt@3am-software.com>
9247 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
9250 2004-03-13 Mark Kettenis <kettenis@gnu.org>
9252 * config.bfd: Add x86_64-*-openbsd*.
9253 * configure.in (x86_64-*-openbsd*): Set COREFILE to
9255 * configure: Regenerate.
9257 2004-03-12 Nick Clifton <nickc@redhat.com>
9258 Dave Murphy <wintermute2k4@ntlworld.com>
9260 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
9261 if the input bfd does not contain any code.
9263 2004-03-09 Steve Ellcey <sje@cup.hp.com>
9265 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
9267 2004-03-05 Fred Fish <fnf@redhat.com>
9269 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
9270 mips16 symbols to be even rather than testing first for even/odd.
9271 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
9273 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
9275 * elf.c (map_sections_to_segments): Ignore .tbss sections for
9278 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
9280 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
9281 undefined symbols as hash_new.
9283 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
9285 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
9287 * elf32-sh.c: Ditto.
9288 * bfd-in2.h: Regenerate.
9290 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
9292 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
9294 (_frv_count_got_plt_entries): Initialize them.
9295 (frv_pic_relocs_info_find): Add insert argument. Adjust all
9297 (frv_pic_relocs_info_for_global): Likewise.
9298 (frv_pic_relocs_info_for_local): Likewise.
9299 (frv_pic_merge_early_relocs_info): New.
9300 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
9302 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
9303 Check that we don't exceed the allocated count for entry.
9304 (_frv_add_rofixup): Likewise.
9305 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
9306 (elf32_frv_finish_dynamic_sections): Improve error message in case
9307 we emit too few rofixup entries.
9309 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
9311 * archures.c (bfd_mach_fr450): New.
9312 * bfd-in2.h: Regenerate.
9313 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
9314 (arch_info_500): Link to it.
9315 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
9316 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
9317 (frv_elf_arch_extension_p): New function.
9318 (frv_elf_merge_private_bfd_data): Use it.
9320 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
9322 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
9324 * elflink.h (is_global_data_symbol_definition): Moved to
9326 (elf_link_is_defined_archive_symbol): Likewise.
9327 (elf_link_add_archive_symbols): Likewise. Renamed to
9328 _bfd_elf_link_add_archive_symbols.
9330 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
9331 of ELF symbol table entry from backend.
9332 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
9333 instead of elf_link_add_object_symbols.
9335 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
9337 * elf-bfd.h (struct elf_backend_data): Added
9338 elf_backend_can_make_relative_eh_frame,
9339 elf_backend_can_make_lsda_relative_eh_frame and
9340 elf_backend_encode_eh_address.
9341 (_bfd_elf_encode_eh_address): Declare.
9342 (_bfd_elf_can_make_relative): Declare.
9343 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
9344 hooks to decide whether to attempt to make_relative and
9346 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
9347 (_bfd_elf_can_make_relative): New.
9348 (_bfd_elf_encode_eh_address): New.
9349 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
9350 (frv_elf_encode_eh_address): New.
9351 (elf_backend_can_make_relative_eh_frame): Define.
9352 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9353 (elf_backend_encode_eh_address): Define.
9355 (elf_backend_can_make_relative_eh_frame): Define.
9356 (elf_backend_can_make_lsda_relative_eh_frame): Define.
9357 (elf_backend_encode_eh_address): Define.
9358 (elfNN_bed): Add them.
9360 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
9362 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
9363 complain_on_overflow to signed.
9365 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
9367 * elflink.h (sort_symbol): New.
9368 (elf_link_add_object_symbols): Use a sorted symbol array for
9371 2004-02-27 Jakub Jelinek <jakub@redhat.com>
9373 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9374 for pc relative relocs.
9375 (elf_s390_relocate_section): Likewise.
9376 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
9377 for pc relative relocs.
9378 (elf_s390_relocate_section): Likewise.
9380 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
9382 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
9385 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
9387 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
9388 field to track if a relocation is against readonly section.
9389 (count_dyn_reloc): Take a new argument for rent->reltext.
9390 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
9391 (get_reloc_section): Don't set ia64_info->reltext here.
9392 (allocate_dynrel_entries): Set ia64_info->reltext here.
9394 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
9396 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
9397 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
9398 function's descriptor to symbol+offset, and map local undefweak
9399 symbol to NULL function descriptor.
9400 (elf32_frv_relocate_section): Likewise.
9402 2004-02-23 Mark Kettenis <kettenis@gnu.org>
9404 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
9406 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
9407 (netbsd_core_file_p): Set architecture from machine ID for
9410 2004-02-23 Jakub Jelinek <jakub@redhat.com>
9412 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
9413 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
9415 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
9417 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
9418 symbols with non-default visibility.
9420 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
9422 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
9423 IMAGE_SCN_MEM_WRITE on known sections only.
9425 2004-02-20 Jakub Jelinek <jakub@redhat.com>
9427 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
9428 symbols used in PIE relocs.
9430 2004-02-19 Jakub Jelinek <jakub@redhat.com>
9432 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
9435 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
9437 * configure.in: Update version to 2.15.90.
9438 * configure: Regenerate.
9440 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
9441 Richard Sandiford <rsandifo@redhat.com>
9443 * elfxx-mips.c (mips_elf_calculate_relocation): Use
9444 _bfd_elf_symbol_refs_local_p to decide whether to decay
9445 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
9446 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
9447 relocs if the symbol wasn't defined by a regular object file.
9448 Don't check the symbol's dynindx.
9450 2004-02-16 Andrew Cagney <cagney@redhat.com>
9452 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
9454 * bfd-in2.h: Re-generate.
9456 2004-02-14 Andrew Cagney <cagney@redhat.com>
9458 * configure.host (HDEFINES): When hppa*-*-hpux*, define
9459 _LARGEFILE64_SOURCE.
9461 2004-02-13 Andrew Cagney <cagney@redhat.com>
9463 * elf.c (vma_page_aligned_bias): New function.
9464 (assign_file_positions_except_relocs)
9465 (assign_file_positions_for_segments): Replace broken modulo
9466 arithmetic with call to vma_page_aligned_bias.
9468 2004-02-11 Andrew Cagney <cagney@redhat.com>
9470 * bfd-in.h: Update copyright.
9471 (bfd_tell): Change return type to file_ptr.
9472 * bfd-in2.h: Re-generate.
9473 * cache.c: Update copyright.
9474 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
9476 (close_one): Use real_ftell.
9477 * bfdio.c: Update copyright.
9478 (real_ftell, real_fseek): New functions.
9479 (bfd_tell): Use real_fseek and real_ftell, change return type to
9481 (bfd_seek): Use real_ftell and real_fseek, change type of
9482 file_position to a file_ptr.
9483 * libbfd-in.h: Update copyright.
9484 (real_ftell, real_fseek): Declare.
9485 * libbfd.h: Re-generate.
9487 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
9488 fseeko and fseeko64. Determine bfd_file_ptr.
9489 * configure: Re-generate.
9490 * config.in: Re-generate.
9492 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
9494 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
9495 * elf32-h8300.c: Likewise.
9497 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
9498 Nick Clifton <nickc@redhat.com>
9500 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
9501 GOT entries with no associated GOT subsection.
9503 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
9505 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
9506 * elf.c (swap_out_syms): Use it to decide whether local section
9507 symbols should be named.
9508 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
9509 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
9510 (elf_backend_name_local_section_symbols): Define.
9511 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
9513 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
9515 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
9516 (elfNN_ia64_relax_section): Optimize brl to br during the relax
9519 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
9521 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
9522 to bfd_link_hash_entry passed by reference to
9523 _bfd_generic_link_add_one_symbol.
9525 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
9527 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
9528 relocations against dynamic symbols.
9530 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
9532 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
9535 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
9537 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
9538 * bfd-in2.h, libbfd.h: Rebuilt.
9540 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
9542 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
9543 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
9544 flag has been cleared.
9546 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
9548 * coff-h8300.c: Add and adjust comments about relaxation.
9549 * elf32-h8300.c: Likewise.
9551 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9553 * coff-h8300.c: Fix comment typos.
9554 * elf32-h8300.c: Likewise.
9556 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
9558 * coff-h8300.c: Add comments about relaxation.
9559 * elf32-h8300.c: Likewise.
9561 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9563 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
9565 * aclocal.m4: Regenerate.
9566 * configure: Regenerate.
9568 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
9570 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
9571 mips_elf64_rtype_to_howto instead of using howto_table.
9573 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
9575 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
9577 (elf32_arm_check_relocs): Don't increment the PLT refcount for
9578 relocs which would not use the PLT.
9580 2004-01-13 Alan Modra <amodra@bigpond.net.au>
9582 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
9583 (ppc64_elf_gc_sweep_hook): Likewise.
9584 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
9586 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
9588 Adds linker relaxation support for bit manipulation insns like
9589 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
9591 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
9592 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
9593 * coff-h8300.c: Opcode for bit manipulation insn is checked in
9594 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
9596 2004-01-12 Alan Modra <amodra@bigpond.net.au>
9598 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
9600 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9602 * elf32-h8300.c: Fix formatting.
9604 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
9606 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
9607 dynamic object is present. Declare r_symndx and h in an inner
9609 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
9611 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
9613 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
9614 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
9615 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
9616 identically. Do not emit PC24 relocations for shared libraries.
9617 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
9618 identically. Don't adjust pc_count.
9619 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
9620 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
9621 adjust count for branch relocations.
9622 (allocate_dynrelocs): Correct typo in call to
9623 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
9624 PC24 or PLT32 relocs when linking.
9626 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9628 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
9629 relocation howto with ARM_26 one for consistency.
9630 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
9631 that will be converted to ARM_26D ones, since we always want 'done'
9632 relocations to be reflected in section's data.
9633 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
9635 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
9638 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
9640 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
9641 are not partial_inplace during a relocatable link.
9643 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
9645 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
9646 if no dynamic object is present. Declare r_symndx and h in an
9649 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
9651 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
9652 trampoline if it is known out of range.
9654 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
9656 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
9657 * elf32-frv.c (_frv_osec_readonly_p): New.
9658 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9660 (_frv_count_got_plt_entries): Adjust expected count accordingly.
9661 (elf32_frv_relocate_section): Likewise. Error out if attempting
9662 to emit rofixups or dynamic relocs in read-only segments. Use
9663 _bfd_elf_section_offset to adjust r_offsets in rofixups and
9664 dynamic relocations.
9665 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
9666 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9667 relocations or fixups involving merged sections correctly. Avoid
9668 crash when undefined symbol is referenced by R_FRV_32 or
9669 R_FRV_FUNCDESC_VALUE.
9670 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
9671 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9672 input section holding local symbol to addend of R_FRV_32 or
9673 R_FRV_FUNCDESC_VALUE dynamic relocation.
9674 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
9675 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9676 (elf32_frv_always_size_sections): Don't store pointer to
9677 __stacksize symbol in sec_info.
9678 (elf32_frv_modify_segment_map): Look it up here.
9679 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
9680 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9681 of the lazy PLT entry, not only its offset, as the low word of a
9682 function descriptor.
9683 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
9684 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9685 if a hash table entry already exists but is not a definition.
9686 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
9687 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9688 (_frv_add_rofixup): Don't inline.
9689 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9690 for undefweak symbols.
9691 (elf32_frv_relocate_section): Avoid crash while computing
9692 relocation when linking with shared library. Only emit rofixups
9693 and dynamic relocations for alloc&load sections. Mark binaries
9694 with inter-segment relocations for relocation as a unit.
9695 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9696 (DEFAULT_STACK_SIZE): New.
9697 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9698 emit rofixups or dynamic relocs when linking dynamic non-PIE
9700 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9701 shared libs too. Reserve the last entry for the GOT pointer.
9702 (elf32_frv_finish_dynamic_sections): Emit it.
9703 (elf32_frv_always_size_sections): New.
9704 (elf32_frv_modify_segment_map): New.
9705 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9707 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9708 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9709 (elf_backend_always_size_sections): New.
9710 (elf_backend_modify_segment_map): New.
9711 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
9712 * config.bfd: Added frv-*-*linux*.
9713 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9714 ABS section, instead of crashing.
9715 (elf32_frv_relocate_section): Don't crash before warning about
9716 different segments in non-PIC relocation.
9717 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
9718 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9719 relocs to undefweak symbols.
9720 (elf32_frv_relocate_section): Ditto for undefined symbols.
9721 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
9722 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9723 gotfixup section was created.
9724 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
9725 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9726 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9727 complain_overflow_signed.
9728 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9729 have not been allocated.
9730 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
9731 privfd only if dynamic sections were created.
9732 (elf32_frv_relocate_section): Compute gprel_segment, and use it
9733 for GPREL relocs. When linking relocatable FDPIC executables,
9734 emit warnings for relocations that would be illegal on PIE or
9735 shared libraries. Emit rofixup for R_FRV_32 only if input object
9737 (_frv_create_got_section): Define _gp symbol in the rofixup
9739 (elf32_frv_finish_dynamic_sections): If rofixups needed but
9740 dynamic sections missing, error out requesting -melf32frvfd.
9741 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
9742 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9743 computation of addends from section and global or local symbol
9744 value. Change return type to bfd_boolean, and return a failure if
9745 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9746 nonzero addend is required.
9747 (elf32_frv_relocate_section): Likewise. Print error for
9748 unsupported nonzero addends.
9749 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
9750 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9751 force everything local.
9752 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9753 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9754 (frv_gotfixup_section): New.
9755 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9756 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9758 (_frv_add_rofixup): New.
9759 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9760 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
9761 improve some ugly conditions.
9762 (elf32_frv_relocate_section): Likewise. Reject inter-segment
9763 relocations in fdpic.
9764 (_frv_create_got_section): Create .rofixup.got section.
9765 (struct _frv_dynamic_got_info): Added fixups.
9766 (_frv_count_got_plt_entries): Account in-GOT relocations into
9767 relocs32, relocsfd and relocsfdv. Account them into relocs or
9768 fixups, as appropriate.
9769 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
9771 (elf32_frv_finish_dynamic_sections): Verify that the right number
9772 of relocations and fixups was generated.
9773 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9775 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9776 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9777 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9778 descriptor of a (formerly-)global symbol is local.
9779 (struct frv_pic_relocs_info): Adjust comments.
9780 (_frv_emit_got_relocs_plt_entries): Adjust.
9781 (elf32_frv_relocate_section): Likewise.
9782 (_frv_count_got_plt_entries): Likewise.
9783 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9784 symbol's value to addend in the common preamble. Decay dynamic
9785 symbols to section+offset if they bind or call locally, for GOT
9786 and FUNCDESC_VALUE, respectively.
9787 (elf32_frv_relocate_section): Likewise.
9788 (elf32_frv_check_relocs): Don't register as dynamic symbols of
9789 internal or hidden visibility.
9790 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
9791 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9792 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9793 (elf32_frv_relocate_section): Pass relocation addend in. Use
9794 original relocation addend to look up the got relocs/plt entries
9795 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
9796 processing relocations that reference .scommon symbols.
9797 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
9798 Introduce support for dynamic linking.
9799 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9800 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9801 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9802 (frv_reloc_type_lookup): Return REL howtos for executables and
9804 (frv_info_to_howto_rel): New.
9805 (struct frv_elf_link_hash_table): New.
9806 (frv_hash_table, frv_got_section, frv_gotrel_section,
9807 frv_plt_section, frv_pltrel_section, frv_relocs_info,
9808 frv_got_initial_offset, frv_plt_initial_offset): New macros.
9809 (frv_elf_link_hash_table_create): New.
9810 (struct frv_pic_relocs_info): New.
9811 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9812 (frv_pic_relocs_info_find): New.
9813 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9815 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9816 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9817 (_frv_emit_got_relocs_plt_entries): New.
9818 (elf32_frv_relocate_section): Add support for dynamic linking.
9819 Handle new relocations.
9820 (_frv_create_got_section): New.
9821 (elf32_frv_create_dynamic_sections): New.
9822 (ELF_DYNAMIC_INTERPRETER): New.
9823 (struct _frv_dynamic_got_info): New.
9824 (_frv_count_got_plt_entries): New.
9825 (struct _frv_dynamic_got_plt_info): New.
9826 (_frv_compute_got_alloc_data): New.
9827 (_frv_get_got_entry, _frv_get_fd_entry): New.
9828 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9829 (_frv_resolve_final_relocs_info): New.
9830 (elf32_frv_size_dynamic_sections): New.
9831 (elf32_frv_finish_dynamic_sections): New.
9832 (elf32_frv_adjust_dynamic_symbol): New.
9833 (elf32_frv_finish_dynamic_symbol): New.
9834 (elf32_frv_check_relocs): Handle new relocs. Explain how the
9836 (elf_info_to_howto_rel): Define.
9837 (bfd_elf32_bfd_link_hash_table_create): Define.
9838 (elf_backend_create_dynamic_sections): Define.
9839 (elf_backend_adjust_dynamic_symbol): Define.
9840 (elf_backend_size_dynamic_sections): Define.
9841 (elf_backend_finish_dynamic_symbol): Define.
9842 (elf_backend_finish_dynamic_sections): Define.
9843 (elf_backend_want_got_sym): Define.
9844 (elf_backend_got_header_size): Define.
9845 (elf_backend_want_got_plt): Define.
9846 (elf_backend_plt_readonly): Define.
9847 (elf_backend_want_plt_sym): Define.
9848 (elf_backend_plt_header_size): Define.
9849 (elf_backend_may_use_rel_p): Define.
9850 (elf_backend_may_use_rela_p): Define.
9851 (elf_backend_default_use_rela_p): Define.
9852 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
9853 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9854 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9855 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9856 (frv_reloc_map): Map the corresponding BFD relocs to them.
9857 (frv_reloc_type_lookup): ... and back to BFD relocs.
9858 * reloc.c: New relocs.
9859 * bfd-in2.h, libbfd.h: Rebuilt.
9860 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
9861 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9862 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9863 R_FRV_FUNCDESC_GOTLO): New.
9864 (frv_reloc_map): Map the corresponding BFD relocs to them.
9865 (frv_reloc_type_lookup): ... and back to BFD relocs.
9866 * reloc.c: New relocs.
9867 * bfd-in2.h, libbfd.h: Rebuilt.
9869 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
9871 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9872 targets to support pages of up to 64kB.
9873 (elf32_bed): Redefine to get a separate backend data structure for
9874 traditional targets.
9875 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9876 targets to support pages of up to 64kB.
9877 (elf64_bed): Redefine to get a separate backend data structure for
9878 traditional targets.
9879 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9880 targets to support pages of up to 64kB.
9881 (elf32_bed): Redefine to get a separate backend data structure for
9882 traditional targets.
9884 2004-01-04 Mark Kettenis <kettenis@gnu.org>
9886 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9888 2004-01-02 Mark Kettenis <kettenis@gnu.org>
9890 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9891 (elf_i386_grok_psinfo): Likewise.
9893 2004-01-02 Bernardo Innocenti <bernie@develer.com>
9895 * config.bfd: Add m68k-uClinux target.
9897 2004-01-01 Grant Edwards <grante@visi.com>
9899 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9900 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9901 (elf32_h8_gc_sweep_hook): New function.
9902 (elf_backend_gc_mark_hook): Define.
9903 (elf_backend_gc_sweep_hook): Define.
9904 (elf_backend_can_gc_sections): Define.
9906 For older changes see ChangeLog-0203
9912 version-control: never