* aoutx.h (swap_ext_reloc_in): Set howto to NULL for unknown
[binutils.git] / bfd / ChangeLog
blobf0e13f279d5c807c6d21cee7b03a6c2154fc5e81
1 2007-08-01  Alan Modra  <amodra@bigpond.net.au>
3         * aoutx.h (swap_ext_reloc_in): Set howto to NULL for unknown
4         r_type.
5         (swap_std_reloc_in): Likewise.
6         (aout_link_input_section_std): Likewise.  Return with an error
7         on unexpected relocation type.
8         (aout_link_input_section_ext): Likewise.
10 2007-08-01  Alan Modra  <amodra@bigpond.net.au>
12         PR4694
13         * aoutx.h (final_link): Write a zero in first word of
14         stringtab if no symbols rather than corrupting last byte
15         of text/data.
17 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
19         * elf.c (get_program_header_size): Adjacent loadable .note*
20         sections need just one PT_NOTE segment.
21         (_bfd_elf_map_sections_to_segments): Likewise.
23 2007-07-30  Michael Snyder  <msnyder@access-company.com>
25         * coffgen.c (_bfd_coff_read_internal_relocs): Revert change of
26         2007-07-26.  Buffer still in use, can't be freed.
28 2007-07-27  Michael Snyder  <msnyder@access-company.com>
30         * cofflink.c (coff_link_add_symbols): Return if count is zero.
32         * coff-i386.c (coff_i386_rtype_to_howto): Off by one error.
34         * aoutx.h (slurp_symbol_table): Return if count == 0.
36         * coffgen.c (_bfd_coff_read_internal_relocs): Return if count is zero.
38         * elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
40 2007-07-27  H.J. Lu  <hongjiu.lu@intel.com>
42         * config.bfd (x86_64-*-mingw*): Don't include x86_64coff_vec.
44 2007-07-26  Michael Snyder  <msnyder@access-company.com>
46         * coff-i386.c (coff_i386_rtype_to_howto): Guard against null.
48         * linker.c (bfd_section_already_linked_table_insert): Change 
49         return type from void to boolean.  Return FALSE on failure.
50         (_bfd_generic_section_already_linked): Test return value of
51         bfd_section_already_linked_table_insert, call fatal on error.
53         * elflink.c (_bfd_elf_section_already_linked): Test return value
54         of bfd_section_already_linked_table_insert, call fatal on error.
56         * libbfd-in.h (bfd_section_already_linked_table_insert): Update
57         return type to bfd_boolean.
59         * libbfd.h: Regenerate.
61 2007-07-26  Adam Nemet  <anemet@caviumnetworks.com>
63         * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap,
64         bfd_slurp_armap): Improve function comment.
66 2007-07-26  Michael Snyder  <msnyder@access-company.com>
68         * linker.c (already_linked_newfunc): Check for NULL return from
69         bfd_hash_allocate.
71         * coffgen.c (fixup_symbol_value): Guard against null; 
72         bfd_is_com_section will dereference the section pointer.
74         * syms.c (bfd_decode_symclass): Guard against NULL, since 
75         bfd_is_com_section dereferences the pointer.
77         * srec.c (srec_scan): Check for EOF (critical because return value
78         will be used as array index).
80         * coffgen.c (_bfd_coff_read_internal_relocs): If internal_relocs
81         are not to be cached, free the temporary buffer.
83         * aoutx.h (slurp_reloc_table): Return TRUE if reloc_size == zero
84         or count == zero.
86         * tekhex.c (first_phase): Check return value for null.
88         * elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless 
89         pointer increment.
91 2007-07-26  Alan Modra  <amodra@bigpond.net.au>
93         * elflink.c (_bfd_elf_fix_symbol_flags): Remove unnecessary
94         check on dynobj.  Remove bed shadow.
96         * srec.c (srec_get_section_contents): Return immediately on
97         count zero.  Check that offset and count are within section.
98         * libbfd.c (_bfd_generic_get_section_contents): Check that
99         offset + count does not overflow.
101         * srec.c (srec_canonicalize_symtab): Don't alloc when symcount
102         is zero.  Correct return value on error.
103         * mmo.c (mmo_canonicalize_symtab): Likewise.
104         * binary.c (binary_canonicalize_symtab) Correct return on error.
106 2007-07-26  Thiemo Seufer  <ths@mips.com>
108         * bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL.
110 2007-07-26  Alan Modra  <amodra@bigpond.net.au>
112         * reloc.c (bfd_generic_get_relocated_section_contents): Avoid
113         bfd_canonicalize_reloc call when bfd_get_reloc_upper_bound
114         says there are no relocs.
116 2007-07-26  Doug Kwan  <dougkwan@google.com>
118         Speed up bfd_dwarf2_find_line.
119         * dwarf2.c (struct dwarf2_debug): Add new fields to support function
120         and variable info hash tables. Add last_comp_unit, info_hash_count,
121         funcinfo_hash_table, varinfo_hash_table, hash_units_head.
122         (struct comp_unit): Add prev_unit, cached.
123         (struct info_list_node, struct info_hash_entry,
124         struct info_hash_table): New.
125         (info_hash_table_newfunc, create_info_hash_table,
126         insert_info_hash_table, lookup_info_hash_table): New functions
127         implementing function and variable info hash tables.
128         (scan_unit_for_symbols): Add checks to make sure hash tables are
129         consistent with compilation units.
130         (comp_unit_maybe_decode_line_info): New function.
131         (comp_unit_find_line): Use comp_unit_maybe_decode_line_info.
132         (reverse_funcinfo_list, reverse_varinfo_list, comp_unit_hash_info,
133         info_hash_lookup_funcinfo, info_hash_lookup_varinfo,
134         stash_maybe_update_info_hash_table, stash_verify_info_hash_table,
135         stash_maybe_enable_info_hash_tables, stash_find_line_fast): New
136         functions. Make use of info hash tables to speed up
137         bfd_dwarf2_find_line.
138         (find_line): Use hash table for faster lookup if it is turned on.
139         Also add code to maintain bi-directional link in comp units.
141 2007-07-25  Michael Snyder  <msnyder@access-company.com>
143         * coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
144         if size == 0; return and avoid possible null pointer issues.
146 2007-07-25  Alan Modra  <amodra@bigpond.net.au>
148         * linker.c (generic_link_add_symbol_list): Warning fix.
150 2007-07-24  Michael Snyder  <msnyder@access-company.com>
152         * opncls.c (bfd_make_writable): Check return from bfd_malloc.
154         * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return
155         on bfd_malloc error rather than goto error_return.
157 2007-07-24  Alan Modra  <amodra@bigpond.net.au>
159         * elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook,
160         _bfd_elf_merge_sections, _bfd_elf_link_hash_newfunc,
161         _bfd_elf_link_hash_copy_indirect, _bfd_elf_link_hash_hide_symbol,
162         _bfd_elf_link_hash_table_init, _bfd_elf_link_hash_table_create,
163         bfd_elf_set_dt_needed_name, bfd_elf_get_dyn_lib_class,
164         bfd_elf_set_dyn_lib_class, bfd_elf_get_needed_list,
165         bfd_elf_get_runpath_list, bfd_elf_get_dt_soname,
166         bfd_elf_get_bfd_needed_list, struct elf_symbuf_symbol,
167         struct elf_symbuf_head, struct elf_symbol, elf_sort_elf_symbol,
168         elf_sym_name_compare, elf_create_symbuf,
169         bfd_elf_match_symbols_in_sections,
170         _bfd_elf_match_sections_by_type): Move to here..
171         * elf.c: ..from here.
173 2007-07-23  Richard Sandiford  <richard@codesourcery.com>
175         * elflink.c (_bfd_elf_fix_symbol_flags): Only assert the type
176         of weakdef->root.type if weakdef has no regular definition.
178 2007-07-22  Adam Nemet  <anemet@caviumnetworks.com>
180         * elfxx-mips.c (struct mips_elf_link_hash_table): Add new field
181         small_data_overflow_reported.
182         (_bfd_mips_elf_link_hash_table_create): Initialize it.
183         (_bfd_mips_elf_relocate_section) <bfd_reloc_overflow>: Report
184         small-data section overflow.
186 2007-07-19  Doug Kwan  <dougkwan@google.com>
188         PR binutils/4797
189         * dwarf2.c: (find_line) Do not dereference functionname_ptr if
190         do_line is true.
192 2007-07-18  Bob Wilson  <bob.wilson@acm.org>
194         * elf32-xtensa.c (xtensa_callback_required_dependence): Ignore
195         non-ELF sections.
197 2007-07-18  Bob Wilson  <bob.wilson@acm.org>
199         * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Get section
200         vma and size for dynamic tags from the output sections.
202 2007-07-18  Alan Modra  <amodra@bigpond.net.au>
204         * elf-bfd.h (struct sym_sec_cache): Delete "sec".  Add "shndx".
205         * elf.c (bfd_section_from_r_symndx): Don't cache bfd section of
206         symbol.  Instead cache ELF section index.  Remove redundant
207         checks of st_shndx.
209 2007-07-15  Mike Frysinger  <vapier@gentoo.org>
211         * trad-core.c (NBPG): If not defined, set to getpagesize().
213 2007-07-13  Roland McGrath  <roland@redhat.com>
215         * elf-bfd.h (struct elf_obj_tdata): Revert last change.
216         Add after_write_object_contents, after_write_object_contents_info.
217         * elf.c (_bfd_elf_write_object_contents): Revert last change.
218         Instead, call after_write_object_contents if set.
220 2007-07-12  Kai Tietz   <kai.tietz@onevision.com>
222         * bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New.
223         (BFD_HOSTPTR_T): Host pointer type for casting a
224         pointer to an integer type.
225         (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
226         (sprintf_vma, fprintf_vma): Add support for long long prints.
227         * bfd-in2.h: Regenerate.
228         * configure.in: (BFD_HOST_64BIT_LONG_LONG): New.
229         (BFD_HOSTPTR_T): Host pointer type for casting a
230         pointer to an integer type. Default is "unsigned long".
231         (AC_CHECK_SIZEOF(void *)): New.
232         (host64): Set it if the pointer size is 8.
233         * configure: Regenerate.
234         * config.in: Add macro SIZEOF_VOID_P.
235         * coffcode.h: Replace host ptr type assuming "long" with
236         bfd_hostptr_t type.
237         * coffgen.c: Likewise.
238         * elf-eh-frame.c: Likewise.
239         * peicode.h: Likewise.
241 2007-07-10  H.J. Lu  <hongjiu.lu@intel.com>
243         * Makefile.in: Regenerated.
245 2007-07-10  H.J. Lu  <hongjiu.lu@intel.com>
247         PR binutils/4756
248         * simple.c (bfd_simple_get_relocated_section_content): Don't
249         apply relocation on executable and shared library.
251 2007-07-10  Nathan Sidwell  <nathan@codesourcery.com>
253         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
254         copy relocs on vxworks.
256 2007-07-10  Alan Modra  <amodra@bigpond.net.au>
258         * elf32-arm.c (elf32_arm_size_info): Init checksum_contents field.
259         * elf64-alpha.c (alpha_elf_size_info): Likewise.
260         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
261         * elf64-mips.c (mips_elf64_size_info): Likewise.
262         * elf64-s390.c (s390_elf64_size_info): Likewise.
263         * elf64-sparc.c (elf64_sparc_size_info): Likewise.
265 2007-07-09  H.J. Lu  <hongjiu.lu@intel.com>
267         * elflink.c (bfd_elf_record_link_assignment): Handle indirect
268         symbol.
269         (_bfd_elf_merge_symbol): Properly update normal symbol when
270         overriding the versioned symbol from a dynamic library.
272 2007-07-09  Roland McGrath  <roland@redhat.com>
274         * elf-bfd.h (struct elf_obj_tdata): Add members
275         emit_note_gnu_build_id and note_gnu_build_id_sec.
276         * elf.c (_bfd_id_note_section_size): New global function.
277         (read_hex, _bfd_elf_write_build_id_section): New static functions.
278         (_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section
279         if emit_note_gnu_build_id is set.
280         * Makefile.am (elf.lo): Update dependencies.
282         * elf-bfd.h (struct elf_size_info): Add checksum_contents hook.
283         (bfd_elf32_checksum_contents, bfd_elf64_checksum_contents): Declare.
284         * elfcode.h (elf_checksum_contents): New macro and function.
285         (NAME(_bfd_elf,size_info)): Initialize checksum_contents hook.
287 2007-07-06  Michael Snyder  <msnyder@access-company.com>
289         * elflink.c (elf_link_add_object_symbols): Return via
290         error_free_vers on "notice" failure.
292 2007-07-04  H.J. Lu  <hongjiu.lu@intel.com>
294         * peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target
295         if arch is unknown.
297 2007-07-04  Nick Clifton  <nickc@redhat.com>
299         Import this patch from an internal tree:
301         2001-07-17  Richard Henderson  <rth@redhat.com>
303         * elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly
304         compensate for high bit set in R_MEP_LOW16.
306 2007-07-03  Joseph Myers  <joseph@codesourcery.com>
308         * elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
309         input attributes if value has been copied.
311 2007-07-03  Nick Clifton  <nickc@redhat.com>
313         * COPYING: Replace with GPLv3 text.
314         * aix386-core.c: Update copyright notice to refer to GPLv3.
315         * aix5ppc-core.c, aout0.c, aout32.c, aout64.c, aout-adobe.c,
316         aout-arm.c, aout-cris.c, aoutf1.h, aout-ns32k.c, aout-sparcle.c,
317         aout-target.h, aout-tic30.c, aoutx.h, archive64.c, archive.c,
318         archures.c, armnetbsd.c, bfd.c, bfd-in.h, bfdio.c, bfdwin.c,
319         binary.c, bout.c, cache.c, cf-i386lynx.c, cf-sparclynx.c,
320         cisco-core.c, coff64-rs6000.c, coff-alpha.c, coff-apollo.c,
321         coff-arm.c, coff-aux.c, coffcode.h, coffgen.c, coff-go32.c,
322         coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c, coff-i960.c,
323         coff-ia64.c, cofflink.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
324         coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
325         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
326         coff-svm68k.c, coffswap.h, coff-tic30.c, coff-tic4x.c,
327         coff-tic54x.c, coff-tic80.c, coff-u68k.c, coff-w65.c,
328         coff-we32k.c, coff-x86_64.c, coff-z80.c, coff-z8k.c, corefile.c,
329         cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c, cpu-bfin.c,
330         cpu-cr16.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
331         cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
332         cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
333         cpu-i960.c, cpu-ia64.c, cpu-ia64-opc.c, cpu-ip2k.c, cpu-iq2000.c,
334         cpu-m10200.c, cpu-m10300.c, cpu-m32c.c, cpu-m32r.c, cpu-m68hc11.c,
335         cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
336         cpu-mep.c, cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-mt.c,
337         cpu-ns32k.c, cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c,
338         cpu-powerpc.c, cpu-rs6000.c, cpu-s390.c, cpu-score.c, cpu-sh.c,
339         cpu-sparc.c, cpu-spu.c, cpu-tic30.c, cpu-tic4x.c, cpu-tic54x.c,
340         cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c, cpu-we32k.c,
341         cpu-xc16x.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z80.c, cpu-z8k.c,
342         demo64.c, doc/chew.c, dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c,
343         ecoffswap.h, efi-app-ia32.c, efi-app-ia64.c, efi-app-x86_64.c,
344         elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
345         elf32-avr.h, elf32-bfin.c, elf32.c, elf32-cr16.c, elf32-cr16c.c,
346         elf32-cris.c, elf32-crx.c, elf32-d10v.c, elf32-d30v.c,
347         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
348         elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
349         elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
350         elf32-iq2000.c, elf32-m32c.c, elf32-m32r.c, elf32-m68hc11.c,
351         elf32-m68hc12.c, elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c,
352         elf32-m88k.c, elf32-mcore.c, elf32-mep.c, elf32-mips.c,
353         elf32-msp430.c, elf32-mt.c, elf32-openrisc.c, elf32-or32.c,
354         elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c, elf32-score.c,
355         elf32-sh64.c, elf32-sh64-com.c, elf32-sh64.h, elf32-sh.c,
356         elf32-sh-symbian.c, elf32-sparc.c, elf32-spu.c, elf32-spu.h,
357         elf32-v850.c, elf32-vax.c, elf32-xc16x.c, elf32-xstormy16.c,
358         elf32-xtensa.c, elf64-alpha.c, elf64.c, elf64-gen.c, elf64-hppa.c,
359         elf64-hppa.h, elf64-mips.c, elf64-mmix.c, elf64-ppc.c,
360         elf64-ppc.h, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
361         elf64-x86-64.c, elf-attrs.c, elf-bfd.h, elf.c, elfcode.h,
362         elfcore.h, elf-eh-frame.c, elf-hppa.h, elflink.c, elf-m10200.c,
363         elf-m10300.c, elfn32-mips.c, elf-strtab.c, elf-vxworks.c,
364         elf-vxworks.h, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
365         elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h, epoc-pe-arm.c,
366         epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c, genlink.h,
367         hash.c, host-aout.c, hosts/alphavms.h, hp300bsd.c, hp300hpux.c,
368         hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
369         i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
370         i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
371         libaout.h, libbfd.c, libbfd-in.h, libcoff-in.h, libecoff.h,
372         libhppa.h, libieee.h, libnlm.h, liboasys.h, libpei.h, libxcoff.h,
373         linker.c, lynx-core.c, m68k4knetbsd.c, m68klinux.c, m68knetbsd.c,
374         m88kmach3.c, m88kopenbsd.c, mach-o.c, mach-o.h, mach-o-target.c,
375         mep-relocs.pl, merge.c, mipsbsd.c, mmo.c, netbsd-core.c, netbsd.h,
376         newsos3.c, nlm32-alpha.c, nlm32.c, nlm32-i386.c, nlm32-ppc.c,
377         nlm32-sparc.c, nlm64.c, nlm.c, nlmcode.h, nlmswap.h, nlm-target.h,
378         ns32k.h, ns32knetbsd.c, oasys.c, opncls.c, osf-core.c,
379         pc532-mach.c, pdp11.c, pe-arm.c, pe-arm-wince.c, pef.c, pef.h,
380         pef-traceback.h, pe-i386.c, pei-arm.c, pei-arm-wince.c, peicode.h,
381         pei-i386.c, pei-mcore.c, pei-mips.c, pei-ppc.c, pei-sh.c,
382         pei-x86_64.c, pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c,
383         pe-x86_64.c, peXXigen.c, ppcboot.c, ptrace-core.c, reloc16.c,
384         reloc.c, riscix.c, rs6000-core.c, sco5-core.c, section.c,
385         simple.c, som.c, som.h, sparclinux.c, sparclynx.c, sparcnetbsd.c,
386         srec.c, stabs.c, stab-syms.c, stamp-h.in, sunos.c, syms.c,
387         sysdep.h, targets.c, targmatch.sed, tekhex.c, ticoff.h,
388         trad-core.c, vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c,
389         vms.c, vms-gsd.c, vms.h, vms-hdr.c, vms-misc.c, vms-tir.c,
390         xcofflink.c, xcoff-target.h, xsym.c, xsym.h, xtensa-isa.c,
391         xtensa-modules.c: Likewise.
392         * elf32-sh-relocs.h: Add copyright notice.
393         * hosts/alphalinux.h, hosts/decstation.h, hosts/delta68.h,
394         hosts/dpx2.h, hosts/hp300bsd.h, hosts/i386bsd.h,
395         hosts/i386linux.h, hosts/i386mach3.h, hosts/i386sco.h,
396         hosts/i860mach3.h, hosts/m68kaux.h, hosts/m68klinux.h,
397         hosts/m88kmach3.h, hosts/mipsbsd.h, hosts/mipsmach3.h,
398         hosts/news.h, hosts/news-mips.h, hosts/pc532mach.h,
399         hosts/riscos.h, hosts/symmetry.h, hosts/tahoe.h, hosts/vaxbsd.h,
400         hosts/vaxlinux.h, hosts/vaxult2.h, hosts/vaxult.h: Likewise.
401         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate.
403 2007-07-02  Joseph Myers  <joseph@codesourcery.com>
405         * elfxx-mips.c (mips_elf_calculate_relocation): Handle
406         R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
407         * elf64-mips.c (mips_elf64_howto_table_rela): Support
408         R_MIPS_TLS_DTPREL64.
410 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
412         * Makefile.am: Run "make dep-am".
413         * Makefile.in: Regenerate.
414         * aclocal.m4: Regenerate.
415         * config.in: Regenerate.
416         * po/SRC-POTFILES.in: Regenerate.
417         * po/bfd.pot: Regenerate.
419 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
421         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
422         symsec != NULL tests.
424 2007-07-02  Alan Modra  <amodra@bigpond.net.au>
426         PR 4712
427         * elf.c (assign_file_positions_for_load_sections): Adjust lma
428         by p_vaddr_offset.
430 2007-06-30  H.J. Lu  <hongjiu.lu@intel.com>
432         * aclocal.m4: Regenerated.
433         * Makefile.in: Likewise.
435 2007-06-29  Joseph Myers  <joseph@codesourcery.com>
437         * elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
438         (ppc_elf_merge_private_bfd_data): Call it.
440 2007-06-29  Joseph Myers  <joseph@codesourcery.com>
442         * elfxx-mips.c (mips_elf_merge_obj_attributes): New.
443         (_bfd_mips_elf_merge_private_bfd_data): Call it.
445 2007-06-29  Joseph Myers  <joseph@codesourcery.com>
447         * elf-attrs.c: New.
448         * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
449         (BFD32_BACKENDS_CFILES): Add elf-attrs.c.
450         (elf-attrs.lo): Generate dependencies.
451         * Makefile.in: Regenerate.
452         * configure.in (elf): Add elf-attrs.lo.
453         * configure: Regenerate.
454         * elf-bfd.h (struct elf_backend_data): Add entries for object
455         attributes.
456         (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
457         OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
458         Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
459         New.
460         (struct elf_obj_tdata): Add entries for object attributes.
461         (elf_known_obj_attributes, elf_other_obj_attributes,
462         elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
463         New.
464         (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
465         bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
466         bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
467         bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
468         bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
469         _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
470         _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
471         * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
472         (bfd_section_from_shdr): Handle attributes sections.
473         * elflink.c (bfd_elf_final_link): Handle attributes sections.
474         * elfxx-target.h (elf_backend_obj_attrs_vendor,
475         elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
476         elf_backend_obj_attrs_section_type): New.
477         (elfNN_bed): Update.
478         * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
479         aeabi_attribute_list): Remove.
480         (struct elf32_arm_obj_tdata): Remove object attributes fields.
481         (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
482         elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
483         Update for new object attributes interfaces.
484         (uleb128_size, is_default_attr, eabi_attr_size,
485         elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
486         elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
487         elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
488         elf32_arm_add_eabi_attr_int, attr_strdup,
489         elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
490         copy_eabi_attributes, elf32_arm_parse_attributes): Remove.  Moved
491         to generic code in elf-attrs.c.
492         (elf32_arm_obj_attrs_arg_type): New.
493         (elf32_arm_fake_sections): Do not handle .ARM.attributes.
494         (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
495         (bfd_elf32_bfd_final_link): Remove.
496         (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
497         elf_backend_obj_attrs_arg_type,
498         elf_backend_obj_attrs_section_type): New.
499         * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
500         attributes.
501         * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
502         * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
503         * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
504         * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
505         * elf32-sh.c (sh_elf_copy_private_data): Likewise.
506         * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
508 2007-06-29  Paul Brook  <paul@codesourcery.com>
510         * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
511         call veneers for call relocations against undefined symbols.
512         (elf32_arm_final_link_relocate): Turn call to undefined symbol
513         into a jump to the next instruction.
515 2007-06-29  Michael Snyder  <msnyder@access-company.com>
517         * bfd.c (bfd_demangle): Plug memory leak (Coverity).
519 2007-06-29  M R Swami Reddy  <MR.Swami.Reddy@nsc.com>
521         * Makefile.am: Add cr16 related entry
522         * Makefile.in: Regenerate
523         * archures.c: Add bfd_cr16_arch
524         * bfd-in2.h: Regenerate
525         * config.bfd: Add cr16-elf
526         * configure.in: Add bfd_elf32_cr16_vec
527         * configure: Regenerate.
528         * targets.c: Added cr16 related information
529         * cpu-cr16.c: New file.
530         * elf32-cr16.c: New file.
531         * reloc.c: Added cr16 relocs.
533 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
535         * elflink.c (_bfd_elf_link_assign_sym_version): Improve error
536         message for undefined version nodes.
537         (elf_gc_sweep): Don't warn when zero size sections are
538         removed.
540 2007-06-29  Nathan Froyd  <froydnj@codesourcery.com>
542         * elf32-ppc.c (ppc_elf_info_to_howto): Check for invalid relocation
543         types.
545 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
547         * elf32-spu.c (spu_elf_fake_sections): New function.
548         (elf_backend_fake_sections): Define.
550 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
552         * elf.c (assign_file_positions_for_load_sections): Use elf
553         section header sh_size rather than bfd section size, simplifying
554         .tbss handling.
556 2007-06-29  Alan Modra  <amodra@bigpond.net.au>
558         PR ld/4701
559         * elf.c (assign_file_positions_for_load_sections): Ensure bss
560         segments meet gABI alignment requirements.  Don't allocate
561         file space for bss sections in a segment also containing file
562         or program headers.
564 2007-06-27  Alan Modra  <amodra@bigpond.net.au>
566         * bfd.c (struct bfd): Rename "next" to "archive_next".
567         * archive.c: Rename uses throughout file.
568         * archive64.c: Likewise.
569         * coff-rs6000.c: Likewise.
570         * ecoff.c: Likewise.
571         * som.c: Likewise.
572         * bfd-in2.h: Regenerate.
574         * elf32-ppc.c (ppc_elf_select_plt_layout): Properly iterate over
575         input bfds.
576         * elf32-spu.c (spu_elf_create_sections): Likewise.
578 2007-06-26  H.J. Lu  <hongjiu.lu@intel.com>
580         * dwarf2.c (find_line): New.  Contains the duplicated code from:
581         (_bfd_dwarf2_find_nearest_line): Use it.
582         (_bfd_dwarf2_find_line): Use it.
584 2007-06-26  Joseph Myers  <joseph@codesourcery.com>
586         * elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
588 2007-06-25  Richard Sandiford  <richard@codesourcery.com>
590         * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs
591         to be used for calls from MIPS16 code.
593 2007-06-23  Andreas Schwab  <schwab@suse.de>
595         * configure.in (--with-separate-debug-dir): New option.
596         * configure: Regenerate.
597         * Makefile.am (dwarf2.lo): Add rule to pass DEBUGDIR.
598         * Makefile.in: Regenerate.
599         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Pass DEBUGDIR to
600         bfd_follow_gnu_debuglink.
601         (_bfd_dwarf2_find_line): Likewise.
603 2007-06-22  Nick Clifton  <nickc@redhat.com>
605         * dwarf2.c: Add support for reading in debug information via a
606         .gnu_debuglink section:
607         (struct dwarf2_debug): Add bfd field to record the bfd containing
608         the debug info.
609         (parse_comp_unit): Remove ABFD parameter.  Instead use the bfd
610         field in the dwarf2_debug structure.
611         (_bfd_dwarf2_find_nearest_line): If a debug info section could not
612         be found in the current bfd call bfd_follow_gnu_debuglink to see
613         if another file contains the debug information.  If it does, open
614         it and continue.
615         (_bfd_dwarf2_find_line): Likewise.
617 2007-06-19  H.J. Lu  <hongjiu.lu@intel.com>
619         PR ld/4590
620         * elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset
621         when removing duplicated entries.
622         (get_dyn_sym_info): Initialize the got_offset field to -1.
623         Update call to sort_dyn_sym_info.
624         (elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort
625         array of addend and remove duplicates.
627 2007-06-18  H.J. Lu  <hongjiu.lu@intel.com>
629         * libpei.h (_bfd_XXi_final_link_postscript): Remove
630         duplication.
631         (bfd_target_pei_p): New.
632         (bfd_target_pei_arch): New
633         (bfd_target_efi_p): Likewise.
634         (bfd_target_efi_arch): New
635         (bfd_pe_executable_p): Use bfd_target_pei_p and
636         bfd_target_efi_p.
638         * peicode.h (arch_type): New enum.
639         (pe_arch): New function.
640         (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file
641         if there is an EFI/PE target.
643 2007-06-14  H.J. Lu  <hongjiu.lu@intel.com>
645         * Makefile.am (ACLOCAL_AMFLAGS): Add -I . -I ../config.
647         * acinclude.m4: Don't include m4 files. Remove libtool
648         kludge.
650         * Makefile.in: Regenerated.
651         * aclocal.m4: Likewise.
652         * configure: Likewise.
654 2007-06-11  Sterling Augustine  <sterling@tensilica.com>
655             Bob Wilson  <bob.wilson@acm.org>
657         * elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
658         XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
659         (extend_ebb_bounds_backward, compute_text_actions): Likewise.
660         (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
661         (xtensa_get_property_predef_flags): Likewise.
662         (compute_removed_literals): Pass new arguments to is_removable_literal.
663         (is_removable_literal): Add sec, prop_table and ptblsize arguments.
664         Do not remove literal if the NO_TRANSFORM property flag is set.
666 2007-05-31  Richard Sandiford  <rsandifo@nildram.co.uk>
668         * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
669         type (3) single-GOT entry, read tls_type from the hash table entry
670         rather than the GOT entry.
672 2007-06-01  Alan Modra  <amodra@bigpond.net.au>
674         * simple.c (bfd_simple_get_relocated_section_contents): Init
675         input_bfds_tail.
677 2007-05-30  Alan Modra  <amodra@bigpond.net.au>
679         * elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
680         created by objcopy --only-keep-debug.
681         (_bfd_elf_init_private_section_data): Only change elf_section_type
682         if it is SHT_NULL.
684         * elf.c (assign_file_positions_for_load_sections): Correct sh_type
685         to SHT_NOBITS earlier.  Base actions in rest of function on sh_type
686         and sh_flags instead of bfd section flags.  Delete voff and code
687         keeping nobits segments aligned.
689 2007-05-25  Eric Christopher  <echristo@apple.com>
691         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
692         Check that sym_sec isn't NULL before accessing.
694 2007-05-24  Steve Ellcey  <sje@cup.hp.com>
696         * Makefile.in: Regnerate.
697         * configure: Regenerate.
698         * aclocal.m4: Regenerate.
699         * doc/Makefile.in: Regenerate.
701 2007-05-22  Paul Brook  <paul@codesourcery.com>
703         * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
704         with sec and sec_shndx.
705         (elf32_arm_ouput_plt_map_sym): Use them.
706         (elf32_arm_output_arch_local_syms): Output mapping symbols for
707         interworking glue.
709 2007-05-18  Paul Brook  <paul@codesourcery.com>
711         * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
712         (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
713         (record_arm_to_thumb_glue): Add v5t non-pic glue.
714         (elf32_arm_create_thumb_stub): Ditto.
716 2007-05-16  H.J. Lu  <hongjiu.lu@intel.com>
717             Alan Modra  <amodra@bigpond.net.au>
719         * elflink.c (_bfd_elf_adjust_dynamic_copy): Align dynamic bss
720         section to the minimum alignment.
722 2007-05-15  H.J. Lu  <hongjiu.lu@intel.com>
723             Alan Modra  <amodra@bigpond.net.au>
725         PR ld/4504
726         * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New.
727         * elflink.c (_bfd_elf_adjust_dynamic_copy): New.
729         * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call
730         _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic
731         bss section.
732         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
733         * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
734         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
735         * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
736         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
737         * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
738         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
739         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
740         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
741         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
742         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
743         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
744         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
745         * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
746         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
747         * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise.
748         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
750 2007-05-15  Richard Sandiford  <richard@codesourcery.com>
752         * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
753         input_section argument.  Create .rela.dyn relocations against
754         symbol 0 rather than the section symbol.
755         (mips_elf_local_got_index): Remove input_section argument.
756         Update call to mips_elf_create_local_got_entry.
757         (mips_elf_got_page, mips_elf_got16_entry): Likewise.
758         (mips_elf_calculate_relocation): Update calls to
759         mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
761 2007-05-15  Mark Shinwell  <shinwell@codesourcery.com>
763         * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
764         handle the Thumb-2 JUMP19 relocation.
766 2007-05-15  Alan Modra  <amodra@bigpond.net.au>
768         PR 4479
769         * elf.c (elf_fake_sections): Don't allow backend to change
770         SHT_NOBITS if called for strip/objcopy --only-keep-debug.
771         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
772         fix from here.
774 2007-05-14  Alan Modra  <amodra@bigpond.net.au>
776         * elf.c (bfd_elf_string_from_elf_section): Return NULL on
777         invalid shstrndx.
778         (bfd_elf_get_str_section): Likewise.
780 2007-05-12  Alan Modra  <amodra@bigpond.net.au>
782         PR 4497
783         * elf-eh-frame.c (struct cie): Add "local_personality".  Make
784         "personality" a union.
785         (cie_eq): Compare local_personality too.  Adjust personality
786         comparison.
787         (_bfd_elf_discard_section_eh_frame): Check binding on personality
788         reloc sym to allow for bad symtab.  Use stashed local syms rather
789         than reading personality local sym.  Handle discarded sections.
791 2007-05-12  Alan Modra  <amodra@bigpond.net.au>
793         * elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
795 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
797         * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
798         (enum ppc_elf_plt_type): Move from..
799         * elf32-ppc.c: ..here.
800         (struct ppc_elf_obj_tdata): Add makes_plt_call and has_rel16.
801         (struct ppc_elf_link_hash_table): Reorder.  Add old_bfd.  Delete
802         can_use_new_plt.  Make is_vxworks a bitfield.
803         (ppc_elf_link_hash_table_create): Don't clear is_vxworks (again).
804         (ppc_elf_check_relocs): Update setting of reloc flags.  Set old_bfd.
805         (ppc_elf_select_plt_layout): Modify parameters.  Use bfd reloc
806         flags to better detect object files needing old bss-style plt.
807         Allow secure plt to be used without rel16 relocs being detected.
808         Warn if secure plt request cannot be allowed.
810 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
812         * reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
813         * elf-bfd.h (struct elf_backend_data): Change return type of
814         elf_backend_relocate_section to int.
815         * elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
816         R_SPU_PPU64.
817         (spu_elf_bfd_to_reloc_type): Convert new relocs.
818         (spu_elf_count_relocs): New function.
819         (elf_backend_count_relocs): Define.
820         (spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
821         R_SPU_PPU64 relocs.
822         * elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
823         returns 2.
824         * bfd-in2.h: Regenerate.
825         * libbfd.h: Regenerate.
827 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
829         * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
830         for R_ARM_ABS12 relocs.
831         (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
832         non-shared VxWorks PLT entries.
834 2007-05-11  Alan Modra  <amodra@bigpond.net.au>
836         PR 4454
837         * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
838         (_bfd_elf_discard_section_eh_frame): Handle local syms on
839         personality relocation.
841 2007-05-10  Richard Sandiford  <richard@codesourcery.com>
843         * elf.c (assign_file_positions_for_load_sections): Use p_memsz
844         rather than p_filesz to calculate the LMA of the end of a segment.
846 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
848         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't do copyreloc
849         processing if symbol is defined in the executable.
851 2007-05-10  Alexandre Oliva  <aoliva@redhat.com>
853         * elf32-frv.c (_frvfdpic_check_discarded_relocs): New.
854         (frvfdpic_elf_discard_info): New.
855         (elf_backend_discard_info): Define for FDPIC.
857 2007-05-09  Mark Shinwell  <shinwell@codesourcery.com>
859         * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
860         attempt to scan if the bfd doesn't correspond to an ELF image.
861         (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
863 2007-05-08  Alexandre Oliva  <aoliva@redhat.com>
865         * elf32-frv.c (elf32_frv_relocate_section): Discard dynamic relocs
866         for which _bfd_elf_section_offset returns -1.
868 2007-05-08  Alan Modra  <amodra@bigpond.net.au>
870         * elf32-spu.c (spu_elf_size_stubs): Use "void *" for psyms.
871         (mark_functions_via_relocs): Likewise.
873 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
875         * elflink.c (bfd_elf_final_link): Correct reloc handling for
876         elf_backend_count_relocs.
877         (bfd_elf_discard_info): Print an error if we can't read syms.
879 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
881         * elf32-spu.c (spu_elf_reloc_type_lookup): Return NULL on
882         invalid reloc code.
883         (spu_elf_gc_mark_hook, spu_elf_section_processing): Delete functions.
884         (elf_backend_gc_mark_hook, elf_backend_section_processing): Don't
885         define.
887 2007-05-07  Alan Modra  <amodra@bigpond.net.au>
889         * elf.c (assign_file_positions_for_load_sections): Don't check
890         core segment.
892 2007-05-04  H.J. Lu  <hongjiu.lu@intel.com>
894         * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
895         and .rel.dyn aren't present.
897 2007-05-04  Nick Clifton  <nickc@redhat.com>
899         * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
900         sections are present examine the indirect sections in an attempt
901         to compute the correct relocation size.  If there is any
902         ambiguity, produce an error and refuse to sort.
904 2007-05-03  Sandra Loosemore  <sandra@codesourcery.com>
906         * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
908 2007-05-03  Vincent Riviere  <vincent.riviere@freesbee.fr>
909             Nick Clifton  <nickc@redhat.com>
911         PR gas/3041
912         * aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
913         in the same way as relocs against external symbols.
915 2007-05-02  Alan Modra  <amodra@bigpond.net.au>
917         * elf.c (assign_file_positions_for_load_sections): Set sh_offset
918         here.  Set sh_type to SHT_NOBITS if we won't be allocating
919         file space.  Don't bump p_memsz for non-alloc sections.  Adjust
920         section-in-segment check.
921         (assign_file_positions_for_non_load_sections): Don't set sh_offset
922         here for sections that have already been handled above.
924 2007-04-30  Alan Modra  <amodra@bigpond.net.au>
926         * elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
927         and emit_stack_syms bitfields.
928         (get_sym_h): Read all symbols if stack analysis will be done.
929         (spu_elf_create_sections): Add stack_analysis and emit_stack_syms
930         params, and stash in hash table.
931         (is_hint): Split off from..
932         (is_branch): ..here.  Adjust callers.
933         (spu_elf_size_stubs): Add stack_analysis param.  Arrange to read
934         and keep all syms.
935         (write_one_stub): Fix mem leak.
936         (find_function_stack_adjust): New function.
937         (sort_syms_syms, sort_syms_psecs): New vars.
938         (sort_syms): New function.
939         (struct call_info, struct function_info): New.
940         (struct spu_elf_stack_info): New.
941         (alloc_stack_info, maybe_insert_function, func_name): New functions.
942         (is_nop, insns_at_end, check_function_ranges): Likewise.
943         (find_function, insert_callee, mark_functions_via_relocs): Likewise.
944         (pasted_function, interesting_section, discover_functions): Likewise.
945         (mark_non_root, call_graph_traverse, build_call_tree): Likewise.
946         (sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
947         (bfd_elf32_bfd_final_link): Define.
948         * elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
949         (spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
951 2007-04-28  Sergey Rogozhkin  <rogozhkin@niisi.msk.ru>
953         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Don't access
954         memory which we might not own.
956 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
958         * elf32-xtensa.c (elf_xtensa_make_sym_local): Restore deleted function.
959         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Likewise.
960         (elf_xtensa_allocate_dynrelocs): Use elf_xtensa_make_sym_local.
962 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
964         * elf32-xtensa.c (xtensa_read_table_entries): Step through table
965         contents and relocs in parallel.
967 2007-04-27  Bob Wilson  <bob.wilson@acm.org>
969         * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
971 2007-04-27  Alan Modra  <amodra@bigpond.net.au>
973         * cpu-rs6000.c: Write Mimi's name in ASCII.
974         * coff-rs6000.c: Likewise.
975         * rs6000-core.c: Likewise.
977 2007-04-27  Alan Modra  <amodra@bigpond.net.au>
979         * sysdep.h: Include config.h first.
980         Many files: Include sysdep.h before bfd.h.
981         * Makefile.am: Run "make dep-am".
982         * Makefile.in: Regenerate.
984 2007-04-25  Alan Modra  <amodra@bigpond.net.au>
986         * sysdep.h: Revert last change.
988 2007-04-24  Nick Clifton  <nickc@redhat.com>
990         * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset.
991         * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto.
993 2007-04-24  Alan Modra  <amodra@bigpond.net.au>
995         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if
996         eh_frame_hdr table won't be created.
998 2007-04-24  Alan Modra  <amodra@bigpond.net.au>
1000         * acinclude.m4: Include config/stdint.m4.
1001         * configure.in: Invoke GCC_HEADER_STDINT.
1002         * sysdep.h: Don't include ansidecl.h here.
1003         * configure: Regenerate.
1004         * config.in: Regenerate.
1005         * Makefile.in: Regenerate.
1007 2007-04-23  Nathan Sidwell  <nathan@codesourcery.com>
1009         * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
1010         bfd_mach_mcf_isa_c_emac): New.
1011         * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
1012         elf_isac_plt_entry, elf_isac_plt_info): New.
1013         (elf32_m68k_object_p): Add ISA_C.
1014         (elf32_m68k_print_private_bfd_data): Print ISA_C.
1015         (elf32_m68k_get_plt_info): Detect ISA_C.
1016         * cpu-m68k.c (arch_info): Add ISAC.
1017         (m68k_arch_features): Likewise,
1018         (bfd_m68k_compatible): ISAs B & C are not compatible.
1020 2007-04-21  Nick Clifton  <nickc@redhat.com>
1022         * ecoff.c (_bfd_ecoff_write_armap): Initialise rehash.
1023         (ecoff_link_add_archive_symbols): Likewise.
1024         * coff-m68k.c (m68kcoff_common_addend_rtype_to_howto): Initialise
1025         relent.howto.
1026         * ieee.c (parse_int): Initialise x.
1027         (must_parse_int): Initialise result.
1028         (ieee_slurp_external_symbols): Initialise value.
1030 2007-04-21  Alan Modra  <amodra@bigpond.net.au>
1032         * config.bfd (spu-*-elf): Delete targ_selvecs.
1034 2007-04-19  Nick Clifton  <nickc@redhat.com>
1036         * coffcode.h (coff_rtype_to_howto): Initialise genrel.howto.
1038 2007-04-19  Alan Modra  <amodra@bigpond.net.au>
1040         * bfd.c (bfd_demangle): New function.
1041         * Makefile.am: Run "make dep-am".
1042         * Makefile.in: Regenerate.
1043         * bfd-in2.h: Regenerate.
1045 2007-04-18  Matthias Klose  <doko@ubuntu.com>
1047         * Makefile.am (libbfd_la_LDFLAGS): Use bfd soversion.
1048         (bfdver.h): Use the date in non-release builds for the soversion.
1049         * Makefile.in: Regenerate.
1051 2007-04-17  Paul Brook  <paul@codesourcery.com>
1053         * elf.c (_bfd_elf_is_function_type): New function.
1054         * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type.
1055         (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p,
1056         is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto.
1057         * elf-bfd.h (elf_backend_data): Add is_function_type.
1058         (_bfd_elf_is_function_type): Add prototype.
1059         * elfxx-target.h (elf_backend_is_function_type): Add default
1060         definition.
1061         (elfNN_bed): Add elf_backend_is_function_type.
1062         * elf32-arm.c (elf32_arm_is_function_type): New function.
1063         (elf_backend_is_function_type): Define.
1065 2007-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
1067         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
1068         DT_MIPS_RLD_MAP before DT_DEBUG again.
1070 2007-04-14  Steve Ellcey  <sje@cup.hp.com>
1072         * Makefile.am: Add ACLOCAL_AMFLAGS.
1073         * configure.in: Change macro call order.
1074         * Makefile.in: Regnerate.
1075         * doc/Makefile.in: Regenerate.
1076         * configure: Regenerate.
1078 2007-04-14  Jakub Jelinek  <jakub@redhat.com>
1080         * elflink.c (bfd_elf_final_link): Don't free symbuf for
1081         non-elf input bfds.
1082         (bfd_elf_size_dynamic_sections): Don't access elf_section_data
1083         for non-elf input bfds.
1085 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
1087         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
1088         DT_MIPS_RTLD_MAP for PIEs.
1090 2007-04-12  Richard Sandiford  <richard@codesourcery.com>
1092         * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL
1093         when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation
1094         in a read-only section.
1095         (_bfd_mips_elf_check_relocs): Likewise.
1097 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
1099         * elf32-xtensa.c (xtensa_is_insntable_section): New.
1100         (xtensa_is_proptable_section): New.
1101         (elf_xtensa_discard_info_for_section): Handle "full" .xt.prop property
1102         tables with 12-byte entries, as well as tables with 8-byte entries.
1103         Sort the relocations before examining them.
1104         (relax_property_section): Use xtensa_is_proptable_section and
1105         xtensa_is_littable_section.  Rewrite code for combining table entries
1106         to be more robust in case of unexpected relocations.  Do not set offset
1107         of unused relocations to less than zero.
1108         (xtensa_is_property_section): Use other functions instead of
1109         duplicating section name comparisons.
1110         (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
1111         (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
1113 2007-04-12  Bob Wilson  <bob.wilson@acm.org>
1115         * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
1116         from Xtensa property sections.
1118 2007-04-12  Alan Modra  <amodra@bigpond.net.au>
1120         * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
1121         is non-NULL before dereferencing.
1123 2007-04-11  Nathan Sidwell  <nathan@codesourcery.com>
1125         * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
1126         relocs too.
1128 2007-04-10  Richard Henderson  <rth@redhat.com>
1130         * elf64-alpha.c (struct alpha_elf_link_hash_table): Add relax_trip.
1131         (elf64_alpha_size_got_sections): Remove unused something_changed local.
1132         (elf64_alpha_size_plt_section): Return void.
1133         (elf64_alpha_size_rela_got_section): Likewise.
1134         (elf64_alpha_relax_section): Only regenerate got+plt if the
1135         relax_trip counter has changed.
1137 2007-04-09  Daniel Jacobowitz  <dan@codesourcery.com>
1139         * Makefile.am (bfdver.h): Do not generate doc/bfdver.texi.
1140         * doc/Makefile.am (DOCFILES): Add bfdver.texi.
1141         (bfdver.texi): New rule.
1142         * Makefile.in, doc/Makefile.in: Regenerated.
1144 2007-04-03  Matt Thomas  <matt@netbsd.org>
1146         * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
1147         in a shared object if it is not in a CODE section or if it is against
1148         a section symbol.  This allows DWARF2 to use pcrel format.
1150 2007-04-05  H.J. Lu  <hongjiu.lu@intel.com>
1152         PR ld/4304
1153         * elflink.c (bfd_elf_final_link): Call einfo callback in
1154         bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
1155         warning.
1157 2007-04-05  Alan Modra  <amodra@bigpond.net.au>
1159         * elf32-spu.c (spu_elf_output_symbol_hook): New function.
1160         (elf_backend_link_output_symbol_hook): Define.
1162 2007-04-02  Nick Clifton  <nickc@redhat.com>
1164         PR binutils/4292
1165         * bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
1166         targets as 64-bit values, even if running on a 64-bit host.
1167         * coffgen.c (coff_print_symbol): Likewise.
1169 2007-03-29  Nick Clifton  <nickc@redhat.com>
1171         PR binutils/4110
1172         * elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
1173         (setup_group): Use it.  Report corrupt group section headers.
1174         (bfd_section_from_shdr): Use new macro.  Replace constant 4 with
1175         GRP_ENTRY_SIZE.  Cope with NULLs in the group section table.
1176         (elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
1178 2007-03-29  Alan Modra  <amodra@bigpond.net.au>
1180         PR ld/4267
1181         * elflink.c (evaluate_complex_relocation_symbols): Use bfd_vma
1182         for rel->r_info values.
1183         (bfd_elf_perform_complex_relocation): Likewise.
1184         * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for
1185         unused entries.  Don't clear plt.plist in loop.
1187 2007-03-28  Richard Sandiford  <richard@codesourcery.com>
1189         * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela.
1190         * elfxx-sparc.c (sparc_elf_append_rela_64, sparc_elf_append_rela_32):
1191         Merge into...
1192         (sparc_elf_append_rela): ...this new function.
1193         (SPARC_ELF_APPEND_RELA): Delete.
1194         (_bfd_sparc_elf_link_hash_table_create): Don't initialize
1195         the deleted append_rela field.
1196         (_bfd_sparc_elf_relocate_section): Use sparc_elf_append_rela
1197         instead of SPARC_ELF_APPEND_RELA.
1198         (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.  Use the
1199         elf_size_info structure to find the size of a RELA entry and
1200         the associated swap-out function.
1201         (sparc64_finish_dyn, sparc64_finish_dyn): Merge into...
1202         (sparc_finish_dyn): ...this new function.
1203         (_bfd_sparc_elf_finish_dynamic_sections): Update calls accordingly.
1205 2007-03-28  Richard Sandiford  <richard@codesourcery.com>
1206             Phil Edwards  <phil@codesourcery.com>
1208         * doc/bfd.texinfo: Put the contents after the title page rather
1209         than at the end of the document.
1211 2007-03-27  Andreas Schwab  <schwab@suse.de>
1213         * elfxx-ia64.c (elf_backend_default_execstack): Define to 0.
1215 2007-03-26  H.J. Lu  <hongjiu.lu@intel.com>
1217         * configure: Regenerated.
1219 2007-03-26  Alan Modra  <amodra@bigpond.net.au>
1221         * elf32-spu.c (struct stubarr): Add stub_hash_table and err fields.
1222         (allocate_spuear_stubs): New function.
1223         (spu_elf_size_stubs): Call allocate_spuear_stubs.
1225 2007-03-26  Alan Modra  <amodra@bigpond.net.au>
1227         * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
1228         * aout-arm.c (MY_bfd_reloc_name_lookup): Define.
1229         (MY (bfd_reloc_name_lookup)): New function.
1230         * aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
1231         * aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
1232         (MY_bfd_reloc_name_lookup): Define.
1233         * aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
1234         (MY_bfd_reloc_name_lookup): Define.
1235         * aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
1236         (NAME (aout, reloc_name_lookup)): New function.
1237         * bout.c (b_out_bfd_reloc_name_lookup): New function.
1238         * coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
1239         (_bfd_ecoff_bfd_reloc_name_lookup): Define.
1240         * coff-arm.c (coff_arm_reloc_name_lookup): New function.
1241         (coff_bfd_reloc_name_lookup): Define.
1242         * coff-i386.c (coff_bfd_reloc_name_lookup): Define.
1243         (coff_i386_reloc_name_lookup): New function.
1244         * coff-i860.c (coff_i860_reloc_name_lookup): New function.
1245         (coff_bfd_reloc_name_lookup): Define.
1246         * coff-i960.c (coff_i960_reloc_name_lookup): New function.
1247         (coff_bfd_reloc_name_lookup): Define.
1248         * coff-m68k.c (m68k_reloc_name_lookup): New function.
1249         (coff_bfd_reloc_name_lookup): Define.
1250         * coff-maxq.c (maxq_reloc_name_lookup): New function.
1251         (coff_bfd_reloc_name_lookup): Define.
1252         * coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
1253         (coff_bfd_reloc_name_lookup): Define.
1254         * coff-mips.c (mips_bfd_reloc_name_lookup): New function.
1255         (_bfd_ecoff_bfd_reloc_name_lookup): Define.
1256         * coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
1257         (coff_bfd_reloc_name_lookup): Define.
1258         * coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
1259         (_bfd_xcoff_reloc_name_lookup): New function.
1260         (rs6000coff_vec, pmac_xcoff_vec): Init new field.
1261         * coff-sh.c (coff_bfd_reloc_name_lookup): Define.
1262         (sh_coff_reloc_name_lookup): New function.
1263         * coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
1264         (coff_bfd_reloc_name_lookup): Define.
1265         * coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
1266         (tic30_coff_reloc_name_lookup): New function.
1267         * coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
1268         (tic4x_coff_reloc_name_lookup): New function.
1269         * coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
1270         (tic54x_coff_reloc_name_lookup): New function.
1271         * coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
1272         (coff_amd64_reloc_name_lookup): New function.
1273         * coff-z80.c (coff_z80_reloc_name_lookup): New function.
1274         (coff_bfd_reloc_name_lookup): Define.
1275         * coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
1276         (coff_bfd_reloc_name_lookup): Define.
1277         * coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
1278         (xcoff64_reloc_name_lookup): New function.
1279         (rs6000coff64_vec, aix5coff64_vec): Init new field.
1280         * coffcode.h (coff_bfd_reloc_name_lookup): Define.
1281         * elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
1282         * elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1283         * elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1284         * elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1285         * elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
1286         (bfd_elf32_bfd_reloc_name_lookup): Define.
1287         * elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1288         * elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
1289         (bfd_elf32_bfd_reloc_name_lookup): Define.
1290         * elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
1291         (bfd_elf32_bfd_reloc_name_lookup): Define.
1292         * elf32-cris.c (cris_reloc_name_lookup): New function.
1293         (bfd_elf32_bfd_reloc_name_lookup): Define.
1294         * elf32-crx.c (elf_crx_reloc_name_lookup): New function.
1295         (bfd_elf32_bfd_reloc_name_lookup): Define.
1296         * elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1297         * elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1298         * elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
1299         (bfd_elf32_bfd_reloc_name_lookup): Define.
1300         * elf32-fr30.c (fr30_reloc_name_lookup): New function.
1301         (bfd_elf32_bfd_reloc_name_lookup): Define.
1302         * elf32-frv.c (frv_reloc_name_lookup): New function.
1303         (bfd_elf32_bfd_reloc_name_lookup): Define.
1304         * elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
1305         * elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
1306         (bfd_elf32_bfd_reloc_name_lookup): Define.
1307         * elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
1308         * elf32-i370.c (i370_elf_reloc_name_lookup): New function.
1309         (bfd_elf32_bfd_reloc_name_lookup): Define.
1310         * elf32-i386.c (elf_i386_reloc_name_lookup): New function.
1311         (bfd_elf32_bfd_reloc_name_lookup): Define.
1312         * elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
1313         (bfd_elf32_bfd_reloc_name_lookup): Define.
1314         * elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
1315         (bfd_elf32_bfd_reloc_name_lookup): Define.
1316         * elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
1317         (bfd_elf32_bfd_reloc_name_lookup): Define.
1318         * elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
1319         (bfd_elf32_bfd_reloc_name_lookup): Define.
1320         * elf32-m32c.c (m32c_reloc_name_lookup): New function.
1321         (bfd_elf32_bfd_reloc_name_lookup): Define.
1322         * elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1323         * elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1324         * elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1325         * elf32-m68k.c (reloc_name_lookup): New function.
1326         (bfd_elf32_bfd_reloc_name_lookup): Define.
1327         * elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
1328         * elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
1329         (bfd_elf32_bfd_reloc_name_lookup): Define.
1330         * elf32-mep.c (mep_reloc_name_lookup): New function.
1331         (bfd_elf32_bfd_reloc_name_lookup): Define.
1332         * elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1333         (mips_vxworks_bfd_reloc_name_lookup): Likewise.
1334         (bfd_elf32_bfd_reloc_name_lookup): Define.
1335         * elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1336         * elf32-mt.c (mt_reloc_name_lookup): New function.
1337         (bfd_elf32_bfd_reloc_name_lookup): Define.
1338         * elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
1339         (bfd_elf32_bfd_reloc_name_lookup): Define.
1340         * elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1341         * elf32-pj.c (pj_elf_reloc_name_lookup): New function.
1342         (bfd_elf32_bfd_reloc_name_lookup): Define.
1343         * elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
1344         (bfd_elf32_bfd_reloc_name_lookup): Define.
1345         * elf32-s390.c (elf_s390_reloc_name_lookup): New function.
1346         (bfd_elf32_bfd_reloc_name_lookup): Define.
1347         * elf32-score.c (elf32_score_reloc_name_lookup): New function.
1348         (bfd_elf32_bfd_reloc_name_lookup): Define.
1349         * elf32-sh.c (sh_elf_reloc_name_lookup): New function.
1350         (bfd_elf32_bfd_reloc_name_lookup): Define.
1351         * elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
1352         * elf32-spu.c (spu_elf_reloc_name_lookup): New function.
1353         (bfd_elf32_bfd_reloc_name_lookup): Define.
1354         * elf32-v850.c (v850_elf_reloc_name_lookup): New function.
1355         (bfd_elf32_bfd_reloc_name_lookup): Define.
1356         * elf32-vax.c (reloc_name_lookup): New function.
1357         (bfd_elf32_bfd_reloc_name_lookup): Define.
1358         * elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
1359         (bfd_elf32_bfd_reloc_name_lookup): Define.
1360         * elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
1361         (bfd_elf32_bfd_reloc_name_lookup): Define.
1362         * elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
1363         (bfd_elf32_bfd_reloc_name_lookup): Define.
1364         * elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
1365         (bfd_elf64_bfd_reloc_name_lookup): Define.
1366         * elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
1367         * elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
1368         * elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
1369         * elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
1370         * elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
1371         (bfd_elf64_bfd_reloc_name_lookup): Define.
1372         * elf64-s390.c (elf_s390_reloc_name_lookup): New function.
1373         (bfd_elf64_bfd_reloc_name_lookup): Define.
1374         * elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
1375         (bfd_elf64_bfd_reloc_name_lookup): Define.
1376         * elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
1377         * elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
1378         (bfd_elf64_bfd_reloc_name_lookup): Define.
1379         * elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
1380         * elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
1381         (bfd_elfNN_bfd_reloc_name_lookup): Define.
1382         * elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
1383         * elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
1384         * i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
1385         * i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
1386         * ieee.c (ieee_bfd_reloc_name_lookup): Define.
1387         * libaout.h (NAME (aout, reloc_name_lookup)): Declare.
1388         * libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
1389         * mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
1390         (MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
1391         (MY(reloc_name_lookup)): New function.
1392         * nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
1393         * oasys.c (oasys_bfd_reloc_name_lookup): Define.
1394         * pdp11.c (NAME (aout, reloc_name_lookup)): New function.
1395         * pe-mips.c (coff_mips_reloc_name_lookup): New function.
1396         (coff_bfd_reloc_name_lookup): Define.
1397         * reloc.c (bfd_reloc_name_lookup): New function.
1398         * riscix.c (riscix_reloc_name_lookup): New function.
1399         (MY_bfd_reloc_name_lookup): Define.
1400         * som.c (som_bfd_reloc_name_lookup): New function.
1401         * targets.c (struct bfd_target): Add reloc_name_lookup.
1402         (BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
1403         * versados.c (versados_bfd_reloc_name_lookup): Define.
1404         * vms.c (vms_bfd_reloc_name_lookup): New function.
1405         * bfd-in2.h: Regenerate.
1406         * libbfd.h: Regenerate.
1408 2007-03-26  Thiemo Seufer  <ths@mips.com>
1410         PR ld/4208
1411         * elfxx-mips.c (mips_elf_next_relocation): Don't signal an error if no
1412         matching relocation is found.
1413         (_bfd_mips_elf_relocate_section): Only warn about missing relocations.
1415 2007-03-23  H.J. Lu  <hongjiu.lu@intel.com>
1417         * configure: Regenerated.
1419 2007-03-23  Joseph Myers  <joseph@codesourcery.com>
1421         * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
1422         * configure: Regenerate.
1424 2007-03-23  Alan Modra  <amodra@bigpond.net.au>
1426         * elf32-spu.c (spu_stub_name): Don't put input section in stub name.
1427         Remove input_sec param.  Adjust all calls.
1428         (write_one_stub): Adjust stub symbol.
1429         (needs_ovl_stub): New function, extracted from..
1430         (spu_elf_size_stubs): ..here.
1431         (spu_elf_relocate_section): Use needs_ovl_stub.
1433 2007-03-22  Joseph Myers  <joseph@codesourcery.com>
1435         * Makefile.am (bfdver.h): Only set VERSION_PACKAGE in bfdver.texi
1436         if nonempty.
1437         * configure.in (REPORT_BUGS_TO): Do not use "URL:" prefix.
1438         * Makefile.in, configure, doc/Makefile.in: Regenerate.
1440 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
1442         PR ld/4210
1443         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual
1444         address and virtual size of the last section for the image
1445         size.
1447 2007-03-22  H.J. Lu  <hongjiu.lu@intel.com>
1449         PR ld/4007
1450         * elf.c (assign_file_positions_for_load_sections): Check if
1451         all sections are in the segment.
1453 2007-03-20  H.J. Lu  <hongjiu.lu@intel.com>
1455         PR ld/4208
1456         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
1457         matching LO16 relocation for HI16 relocation.
1459 2007-03-20  Paul Brook  <paul@codesourcery.com>
1461         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1462         * bfd-in2.h: Regenerate.
1463         * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
1464         (record_arm_to_thumb_glue): Use globals->pic_veneer.
1465         (elf32_arm_create_thumb_stub): Ditto.
1466         (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
1468 2007-03-18  Mark Shinwell  <shinwell@codesourcery.com>
1470         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
1471         argument and extra last argument.
1472         * bfd-in2.h: Regenerate.
1473         * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
1474         member.
1475         (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
1476         extra last argument.  Set no_enum_size_warning appropriately.
1477         (elf32_arm_merge_eabi_attributes): Improve enum sizes
1478         diagnostic, suppressing it when no_enum_size_warning dictates.
1480 2007-03-20  Nick Clifton  <nickc@redhat.com>
1482         PR binutils/3535
1483         * elf.c (copy_private_bfd_data): Widen the scope of Solaris
1484         specific conditions that need the program headers to be
1485         rewritten.
1487 2007-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1489         * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
1490         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
1491         SizeOfInitializedData, SizeOfUninitializedData,
1492         AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
1493         extra PE a.out header.
1494         (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
1495         (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
1496         defined.
1497         (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
1498         defined.
1499         (_bfd_XX_print_private_bfd_data_common): Also print Magic,
1500         MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
1501         SizeOfInitializedData, SizeOfUninitializedData,
1502         AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
1503         extra PE a.out header.
1505 2007-03-18  H.J. Lu  <hongjiu.lu@intel.com>
1507         * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
1508         only if BFD64 is defined.
1510 2007-03-17  Alan Modra  <amodra@bigpond.net.au>
1512         * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
1513         on setjmp calls.
1515 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
1517         * doc/Makefile.in: Regenerated.
1519 2007-03-15  H.J. Lu  <hongjiu.lu@intel.com>
1521         * Makefile.am (bfdver.h): Substitute report_bugs_to.  Also
1522         create doc/bfdver.texi.
1523         * Makefile.in: Regenerated.
1525         * configure.in (--with-bugurl): New option.
1526         * configure: Regenerated.
1528         * version.h (REPORT_BUGS_TO): New.
1530 2007-03-13  H.J. Lu  <hongjiu.lu@intel.com>
1532         PR binutils/3826
1533         * elf-bfd.h (elf_backend_data): Add elf_osabi.
1534         (_bfd_elf_set_osabi): New.
1536         * elf.c (_bfd_elf_set_osabi): New.
1538         * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
1539         (elf_backend_post_process_headers): Defined with
1540         _bfd_elf_set_osabi.
1541         (ELF_OSABI): Properly defined for each target.
1543         * elf32-i370.c (i370_elf_post_process_headers): Removed.
1544         (ELF_OSABI): Defined.
1545         (elf_backend_post_process_headers): Defined with
1546         _bfd_elf_set_osabi.
1548         * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
1549         freebsd.
1550         (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
1552         * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
1553         (ELF_OSABI): Defined.
1554         (elf_backend_post_process_headers): Defined with
1555         _bfd_elf_set_osabi.
1557         * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
1558         freebsd.
1559         (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
1560         elf_osabi.
1562         * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
1563         with elf_osabi.
1564         (ELF_OSABI): Properly defined for each target.
1565         (elf_backend_post_process_headers): Defined with
1566         _bfd_elf_set_osabi for Linux.
1568         * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
1569         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
1570         (elf_backend_post_process_headers): Defined with
1571         _bfd_elf_set_osabi.
1573         * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
1574         (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
1575         (elf_backend_post_process_headers): Defined with
1576         _bfd_elf_set_osabi.
1578         * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
1579         with any ELF target of the compatible machine for which we do not
1580         have a specific backend.
1582         * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
1583         with elf_osabi.
1585         * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
1586         (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
1588 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
1590         * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
1591         V850_OTHER_* bits.
1593 2007-03-08  Alan Modra  <amodra@bigpond.net.au>
1595         * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
1596         (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
1597         Run "make dep-am".
1598         * Makefile.in: Regenerate.
1599         * po/SRC-POTFILES.in: Regenerate.
1601 2007-03-07  H.J. Lu  <hongjiu.lu@intel.com>
1603         * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
1604         (x86_64-*-kfreebsd*-gnu): Likewise.
1605         (x86_64-*-netbsd*): Likewise.
1606         (x86_64-*-openbsd*): Likewise.
1607         (x86_64-*-linux-*): Likewise.
1609         * configure.in: Support bfd_efi_app_x86_64_vec.
1610         * configure: Regenerated.
1612         * efi-app-x86_64.c: New file.
1614         * targets.c (bfd_efi_app_x86_64_vec): New.
1615         (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
1617 2007-03-07  Kai Tietz   <kai.tietz@onevision.com>
1619         * reloc.c (bfd_generic_get_relocated_section_contents): Remove
1620         const for type reloc_howto_type.
1622 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
1624         PR 3958
1625         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
1626         (elf_discarded_section): Move..
1627         * bfd-in.h: ..to here.
1628         * bfd-in2.h: Regenerate.
1629         * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
1630         from discarded sections before relocate_section has done its job.
1631         * reloc.c (bfd_generic_get_relocated_section_contents): Handle
1632         relocs against symbols from discarded sections.
1633         * elf-hppa.h (elf_hppa_howto_table): Set size.  Set dst_mask on
1634         SECREL32.
1635         (elf_hppa_relocate_section): Handle relocatable link after setting
1636         sec, sym, h etc. for final link.  Squash error messages for
1637         relocatable link.  Clear section contents for relocs against
1638         symbols in discarded sections, and zero reloc.  Remove existing
1639         zero r_symndx code.
1640         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
1641         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1642         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1643         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1644         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
1645         (bfin_relocate_section): Likewise.
1646         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1647         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1648         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1649         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1650         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1651         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1652         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1653         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1654         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1655         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1656         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1657         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1658         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1659         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1660         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1661         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
1662         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1663         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1664         * elf32-mep.c (mep_elf_relocate_section): Likewise.
1665         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1666         * elf32-mt.c (mt_elf_relocate_section): Likewise.
1667         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1668         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1669         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1670         * elf32-score.c (_bfd_score_elf_relocate_section): Likewise.
1671         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1672         * elf32-spu.c (spu_elf_relocate_section): Likewise.
1673         * elf32-v850.c (v850_elf_relocate_section): Likewise.
1674         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1675         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1676         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1677         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1678         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1679         (elf64_alpha_relocate_section): Likewise.
1680         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1681         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1682         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1683         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1684         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1685         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1686         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1687         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1689         * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
1690         symbols for relocatable link.  Don't use always-zero st_value.
1691         (elf_backend_rela_normal): Don't define.
1692         * elf32-bfin.c (bfinfdpic_relocate_section): Use
1693         RELOC_FOR_GLOBAL_SYMBOL.
1694         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1695         * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
1696         section symbol adjustments with same for relocatable link.
1697         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1698         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
1699         (elf32_m68hc11_check_relocs): ..to here.
1700         * elf32-score.c (score_elf_final_link_relocate): Remove zero
1701         r_symndx code.
1702         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1704 2007-03-07  Alan Modra  <amodra@bigpond.net.au>
1706         PR 4144
1707         * elf.c (assign_file_positions_for_load_sections): Don't
1708         adjust p_memsz for !SEC_LOAD section vma modulo page size.
1709         Instead, use the same lma based adjustment for SEC_LOAD
1710         sections.
1712 2007-03-01  Bob Wilson  <bob.wilson@acm.org>
1714         * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
1715         (find_relaxable_sections): Do not increment src_count for unknown
1716         opcodes.  Decode only once instead of calling is_l32r_relocation.
1717         (compute_text_actions): Remove unused no_insn_move flag.  Assert that
1718         src_next matches src_count in relax_info.
1720 2007-03-01  Joseph Myers  <joseph@codesourcery.com>
1722         * Makefile.am (bfdver.h): Use "." not " " between version number
1723         and date.
1724         * Makefile.in: Regenerate.
1725         * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
1726         * configure: Regenerate.
1728 2007-02-28  Nathan Sidwell  <nathan@codesourcery.com>
1730         * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
1732 2007-02-27  Alan Modra  <amodra@bigpond.net.au>
1734         * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
1735         * elf32-spu.c (ovl_mgr_pread): Add const to casts.
1737 2007-02-23  Carlos O'Donell  <carlos@codesourcery.com>
1739         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
1740         DWARF even with 64-bit addresses.
1741         (_bfd_dwarf2_find_nearest_line): Likewise.
1743 2007-02-23  Nick Clifton  <nickc@redhat.com>
1745         PR binutils/3535
1746         * elf.c (copy_private_bfd_data): Always rewrite the program
1747         headers when a Solaris interpreter segment is involved.
1749 2007-02-22  Paul Brook  <paul@codesourcery.com>
1751         * elflink.c (gc_mark_hook_fn): Remove.
1752         (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
1753         (bfd_elf_gc_sections): Ditto.  Call gc_mark_extra_sections.
1754         * elf-bfd.h (elf_gc_mark_hook_fn): Define.
1755         (elf_backend_data): Add gc_mark_extra_sections.
1756         * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
1757         definition.
1758         (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
1759         * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
1760         (elf_backend_gc_mark_extra_sections): Define.
1762 2007-02-21  Nick Clifton  <nickc@redhat.com>
1764         * elf.c (_bfd_elf_map_sections_to_segments): If the
1765         override_segment_assignment callback is defined then call it.
1767 2007-02-21  Alan Modra  <amodra@bigpond.net.au>
1769         * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
1771 2007-02-19  Thiemo Seufer  <ths@mips.com>
1773         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
1774         translation marker from untranslatable strings.
1776 2007-02-19  Alan Modra  <amodra@bigpond.net.au>
1778         * elf-bfd.h (struct elf_backend_data): Add default_execstack.
1779         * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
1780         * elfxx-target.h (elf_backend_default_execstack): Define to 1.
1781         (elfNN_bed): Init new field.
1782         * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
1784 2007-02-17  Mark Mitchell  <mark@codesourcery.com>
1785             Nathan Sidwell  <nathan@codesourcery.com>
1786             Vladimir Prus  <vladimir@codesourcery.com
1787             Joseph Myers  <joseph@codesourcery.com>
1789         * configure.in (--with-pkgversion): New option.
1790         * configure: Regenerate.
1791         * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
1792         * Makefile.in: Regenerate.
1793         * version.h (BFD_VERSION_STRING): Define using
1794         @bfd_version_package@.
1796 2007-02-16  Carlos O'Donell  <carlos@codesourcery.com>
1798         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
1799         Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
1800         and EF_MIPS_UCODE.
1802 2007-02-15  Alan Modra  <amodra@bigpond.net.au>
1804         * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
1805         declare.
1806         (_bfd_norelocs_canonicalize_reloc): Likewise.
1807         * libbfd.h: Regenerate.
1808         * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
1809         (_bfd_norelocs_canonicalize_reloc): Likewise.
1810         * binary.c (binary_bfd_reloc_type_lookup): Don't define.
1811         (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
1812         (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
1813         * ihex.c: Similarly.
1814         * mach-o-target.c: Similarly.
1815         * mach-o.c: Similarly.
1816         * mmo.c: Similarly.
1817         * pef.c: Similarly.
1818         * ppcboot.c: Similarly.
1819         * srec.c: Similarly.
1820         * xsym.c: Similarly.
1822 2007-02-14  H.J. Lu  <hongjiu.lu@intel.com>
1824         PR ld/3953
1825         * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
1826         when adding default symbol.
1828 2007-02-13  Alan Modra  <amodra@bigpond.net.au>
1830         * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
1831         for branch lookup table.
1833 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
1835         * elf64-ppc.c (create_linkage_sections): Don't create
1836         .rela.rodata.brlt for --emit-relocs.
1837         (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
1838         (ppc_size_one_stub): Count them.  Simplify test of stub type
1839         when counting stub relocs.  Set SEC_RELOC too.
1840         (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
1841         (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
1843 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
1845         * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
1846         with a zero symbol index.
1848 2007-02-12  Alan Modra  <amodra@bigpond.net.au>
1850         * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
1852 2007-02-05  Dave Brolley  <brolley@redhat.com>
1853             Stan Cox  <scox@redhat.com>
1855         PR ld/3972
1856         * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
1858 2007-02-05  Dave Brolley  <brolley@redhat.com>
1859             Richard Sandiford  <rsandifo@redhat.com>
1860             Stan Cox  <scox@redhat.com>
1861             Nick Clifton  <nickc@redhat.com>
1862             DJ Delorie  <dj@redhat.com>
1863             Frank Ch. Eigler  <fche@redhat.com>
1864             Ben Elliston  <bje@redhat.com>
1865             Richard Henderson  <rth@redhat.com>
1867         * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
1868         (ALL_MACHINES_CFILES): Add CPU_MEP.c.
1869         (BFD32_BACKENDS): Add elf32-mep.lo.
1870         (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
1871         (cpu-mep.lo,elf32-mep.lo): New targets.
1872         * archures.c (bfd_arch_mep): New enumerator.
1873         (bfd_mach_mep, bfd_mach_mep_h1): New macros.
1874         (bfd_mep_arch): New external variable.
1875         (bfd_archures_list): Add bfd_mep_arch.
1876         * config.bfd: Support mep-*-elf.
1877         * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
1878         * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
1879         * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
1880         declarations.
1881         (_bfd_target_vector): Add bfd_elf32_mep_vec and
1882         bfd_elf32_mep_little_vec.
1883         * mep-relocs.pl: New file.
1884         * cpu-mep.c: New file.
1885         * elf32-mep.c: New file.
1886         * bfd-in2.h: Regenerate.
1887         * po/POTFILES.in: Regenerate.
1888         * libbfd.h: Regenerate.
1889         * Makefile.in: Regenerate.
1890         * configure: Regenerate.
1892 2007-02-05  Dave Brolley  <brolley@redhat.com>
1894         * elflink.c (evaluate_complex_relocation_symbols): Check for
1895         STT_SRELC for global symbols.
1896         (perform_complex_relocations): Renamed to
1897         perform_complex_relocation and now examines only one relocation.
1898         (elf_link_input_bfd): Don't call perform_complex_relocations.
1899         * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
1900         * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
1901         (OD,OS,OU): #undefs corrected to N, S and U repectively.
1902         (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
1903         (complex_reloc_installation_howto): Removed.
1904         (mep_info_to_howto_rela): Remove special case for r_type==0xff.
1905         (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
1907 2007-02-05  Dave Brolley  <brolley@redhat.com>
1908             Richard Sandiford  <rsandifo@redhat.com>
1909             DJ Delorie  <dj@redhat.com>
1910             Graydon Hoare  <graydon@redhat.com>
1911             Nick Clifton  <nickc@cambridge.redhat.com>
1912             Jeff Holcomb  <jeffh@redhat.com>
1913             Frank Ch. Eigler  <fche@redhat.com>
1915         * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
1916         * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
1917         * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
1918         * elflink.c (set_symbolValue): New static function.
1919         (resolve_symbol): Likewise.
1920         (resolve_section): Likewise.
1921         (undefined_reference): Likewise.
1922         (eval_symbol): Likewise.
1923         (evaluate_complex_relocation_symbols): Likewise.
1924         (put_value): Likewise.
1925         (get_value): Likewise.
1926         (decode_complex_addend):
1927         (bfd_elf_perform_complex_relocation): New function.
1928         (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
1929         * reloc.c (BFD_RELOC_RELC): New relocation number.
1930         * syms.c (BSF_RELC,BSF_SRELC): New macros.
1932 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
1934         * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
1935         (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
1936         (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
1937         (elf_xtensa_allocate_got_size): Replace these with...
1938         (elf_xtensa_allocate_dynrelocs): ...this new function.
1939         (elf_xtensa_size_dynamic_sections): Use it.
1941 2007-02-05  Bob Wilson  <bob.wilson@acm.org>
1943         * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
1944         <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
1945         Set src_mask to zero.
1946         <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise.  Also fix dst_mask.
1947         <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
1949 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
1951         * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
1952         (elf_xtensa_dynamic_symbol_p): ...this.
1954 2007-02-02  Bob Wilson  <bob.wilson@acm.org>
1956         * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
1957         (struct elf_xtensa_link_hash_table): New.
1958         (elf_xtensa_hash_table): New.
1959         (elf_xtensa_link_hash_table_create): New.
1960         (elf_xtensa_check_relocs): Update plt_reloc_count references.
1961         Update arguments to add_extra_plt_sections.
1962         (elf_xtensa_create_dynamic_sections): Record new sections in the hash
1963         table.  Update for plt_reloc_count and add_extra_plt_sections.
1964         (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
1965         argument with link info.  Update calls to elf_xtensa_get_plt_section
1966         and elf_xtensa_get_gotplt_section.
1967         (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
1968         (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
1969         (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
1970         (relax_property_section): Get sections from the hash table and update
1971         function calls.
1972         (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
1973         dynobj argument with link info.  Get sections for first plt chunk from
1974         the hash table.
1975         (bfd_elf32_bfd_link_hash_table_create): Define.
1977 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
1979         * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
1980         * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
1981         (struct elf_symbol): Change first member into union.
1982         (elf_sort_elf_symbol): Compare pointers to internal syms rather than
1983         internal syms.  Only compare st_shndx fields.
1984         (elf_create_symbuf): New function.
1985         (bfd_elf_match_symbols_in_sections): Use it.  If symbufs are available
1986         for bfds, use a binary search, otherwise don't qsort symbols
1987         unnecessarily only to select which symbols are for the particular
1988         shndx.
1990 2007-02-01  Nick Clifton  <nickc@redhat.com>
1992         PR ld/3852
1993         * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
1994         in the elf_link_hash_table structure.
1996 2007-02-01  Alan Modra  <amodra@bigpond.net.au>
1998         * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
1999         * elfxx-target.h (elf_backend_write_core_note): Define and use.
2000         * elf.c (elfcore_write_prpsinfo): Call the above.  Add support for
2001         32-bit core note on 64-bit target.
2002         (elfcore_write_prstatus): Likewise.
2003         (elfcore_write_lwpstatus): Make note_name const.
2004         (elfcore_write_prfpreg): Likewise.
2005         (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
2006         target.
2007         * elf32-ppc.c (ppc_elf_write_core_note): New function.
2008         (elf_backend_write_core_note): Define.
2009         * elf64-ppc.c (ppc64_elf_write_core_note): New function.
2010         (elf_backend_write_core_note): Define.
2012 2007-01-31  H.J. Lu  <hongjiu.lu@intel.com>
2014         * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
2015         (elf32_bed): Defined for elf32-us-cris.
2017         * elf64-sh64.c (elf64_bed): Defined for Linux.
2018         (INCLUDED_TARGET_FILE): Removed.
2020         * elfxx-target.h (elfNN_bed): Always define. Don't check
2021         INCLUDED_TARGET_FILE.
2023 2007-01-31  DJ Delorie  <dj@redhat.com>
2025         * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
2026         message for dangerous relocs, special case the common user error.
2028 2007-01-30  H.J. Lu  <hongjiu.lu@intel.com>
2030         * elf.c (copy_elf_program_header): Start from the first section
2031         in a segment and stop when all sections in a segment are
2032         accounted for.
2034 2007-01-29  Julian Brown  <julian@codesourcery.com>
2036         * bfd-in2.h: Regenerate.
2037         * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
2038         instruction scanning should be done.
2039         (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
2040         (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
2041         (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
2042         prototype.
2043         * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
2044         argument.
2045         * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
2046         (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
2047         (elf32_vfp11_erratum_type): New enum.
2048         (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
2049         veneers.
2050         (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
2051         (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
2052         vfp11_fix and num_vfp11_fixes fields.
2053         (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
2054         vfp11_erratum_glue_size, num_vfp11_fixes fields.
2055         (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
2056         (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
2057         glue section.
2058         (elf32_arm_section_map_add): Add an code/data mapping symbol entry
2059         to a section's map.
2060         (record_vfp11_erratum_veneer): Create a single veneer, and its
2061         associated symbols.
2062         (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
2063         (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
2064         BFDs.
2065         (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
2066         required.
2067         (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
2068         (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
2069         (bfd_arm_vfp11_write_mask): Update write mask according to coded
2070         register number.
2071         (bfd_arm_vfp11_antidependency): New function.
2072         (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
2073         (elf32_arm_compare_mapping): Declare.
2074         (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
2075         BFD for potential erratum-triggering insns. Record results.
2076         (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
2077         and branches to veneers have been placed in virtual memory after
2078         layout.
2079         (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
2080         hash table.
2081         (elf32_arm_output_symbol_hook): Remove.
2082         (elf32_arm_write_section): Output veneers, and branches to veneers.
2083         Use maps from input sections, not output sections, for code
2084         byte-swapping.
2085         * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
2086         * elf32-score.c (_bfd_score_elf_write_section): Likewise.
2087         * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
2088         * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
2090 2007-01-27  H.J. Lu  <hongjiu.lu@intel.com>
2092         * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
2093         (INCLUDED_TARGET_FILE): Removed.
2095 2007-01-27  Mike Frysinger  <vapier@gentoo.org>
2097         * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
2098         (INCLUDED_TARGET_FILE): Remove.
2100 2007-01-25  DJ Delorie  <dj@redhat.com>
2102         * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
2103         R_M32C_16 or R_M32C_24 relocs.
2105 2007-01-25  Nick Clifton  <nickc@redhat.com>
2107         PR binutils/3874
2108         * elf32-avr.c (avr_link_hash_table): Check to make sure that the
2109         hash table was created by elf32_avr_link_hash_table_create before
2110         using it.
2111         (elf32_avr_link_hash_newfunc): New function.  Just pass the call
2112         through to _bfd_elf_link_hash_newfunc.
2113         (elf32_avr_link_hash_table_create): Use
2114         elf32_avr_link_hash_newfunc instead of
2115         _bfd_elf_link_hash_newfunc.
2116         (elf32_avr_relocate_section): Check for the hash table pointer
2117         being NULL.
2118         (elf32_avr_relax_section, avr_build_one_stub,
2119         elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
2120         elf32_avr_build_stubs): Likewise.
2122 2007-01-16  H.J. Lu  <hongjiu.lu@intel.com>
2124         PR ld/3831
2125         * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
2126         argument, Elf_Internal_Sym *.
2128         * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
2129         symbol dynamic if info->dynamic_data is TRUE.
2130         (bfd_elf_record_link_assignment): Updated call to
2131         bfd_elf_record_link_assignment.
2132         (_bfd_elf_merge_symbol): Likewise.  Always call
2133         bfd_elf_link_mark_dynamic_symbol.
2135 2007-01-12  H.J. Lu  <hongjiu.lu@intel.com>
2137         * Makefile.am (BFD_LIBS): Removed.
2138         * Makefile.in: Regenerated.
2140 2007-01-11  H.J. Lu  <hongjiu.lu@intel.com>
2142         PR binutils/3631
2143         * Makefile.am (OFILES): Add @bfd64_libs@.
2144         (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
2145         * Makefile.in: Regenerated.
2147         * configure.in (bfd_libs): Replaced by ...
2148         (bfd64_libs): This.
2149         * configure: Regenerated.
2151 2007-01-11  Nathan Sidwell  <nathan@codesourcery.com>
2153         * elf.c (assign_file_positions_for_load_sections): We can
2154         require fewer phdrs than expected.
2156 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
2158         * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
2159         * bfd-in2.h: Regenerate.
2160         * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
2161         bfd_mach_cpu32_fido.
2162         (m68k_arch_features): Use fido_a instead of cpu32.
2163         (bfd_m68k_compatible): Reject the combination of Fido and
2164         ColdFire.  Accept the combination of CPU32 and Fido with a
2165         warning.
2166         * elf32-m68k.c (elf32_m68k_object_p,
2167         elf32_m68k_merge_private_bfd_data,
2168         elf32_m68k_print_private_bfd_data): Treat Fido as an
2169         architecture by itself.
2171 2007-01-08  Kai Tietz   <kai.tietz@onevision.com>
2173         * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
2175 2007-01-05  Jakub Jelinek  <jakub@redhat.com>
2177         * texhex.c (first_phase): Don't fall through into the default
2178         case.
2179         (pass_over): Replace abort () calls with return FALSE.  Fix
2180         buffer overflow.
2182 2007-01-04  Jie Zhang  <jie.zhang@analog.com>
2184         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
2185         SEC_EXCLUDE on zero size .eh_frame.
2187 For older changes see ChangeLog-2006
2189 Local Variables:
2190 mode: change-log
2191 left-margin: 8
2192 fill-column: 74
2193 version-control: never
2194 End: