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