2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
[binutils-gdb.git] / bfd / ChangeLog
1 2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
2
3 * elf-bfd.h (elf_backend_data): Update special_sections to
4 array of pointer to bfd_elf_special_section.
5 * elf.c (special_sections): Likewise.
6 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
7 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
8 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
9 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
10 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
11 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
12 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
13 * elf32-v850.c (v850_elf_special_sections): Likewise.
14 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
15 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
16 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
17 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
18 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
19 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
20 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
21 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
22
23 * elf.c (get_special_section): Updated.
24
25 2005-05-07 Alan Modra <amodra@bigpond.net.au>
26
27 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
28 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
29 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
30 got_symbol_offset.
31 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
32 * elf32-frv.c (_frv_create_got_section): Likewise.
33 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
34 (elf_backend_got_symbol_offset): Don't define.
35 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
36 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
37 and got_gap.
38 (ppc_elf_create_got): Tidy.
39 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
40 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
41 (ppc_elf_gc_sweep_hook): Likewise.
42 (ppc_elf_relocate_section): Likewise.
43 (ppc_elf_finish_dynamic_symbol): Likewise.
44 (allocate_got): New function.
45 (allocate_dynrelocs): Use allocate_got.
46 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
47 so that local got can refcount it. Set got_header_size.
48 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
49 coded 4.
50 (ppc_elf_finish_dynamic_sections): Likewise.
51 (elf_backend_got_symbol_offset): Don't define.
52 (elf_backend_got_header_size): Ditto.
53
54 2005-05-05 Steve Ellcey <sje@cup.hp.com>
55
56 * configure.in (ACX_HEADER_STRING): New.
57 * configure: Regenerate.
58 * config.in: Regenerate.
59 * sysdep.h (STRING_WITH_STRINGS): Use.
60
61 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
62
63 * elf.c (_bfd_elf_close_and_cleanup): Only call
64 _bfd_dwarf2_cleanup_debug_info on bfd_object.
65
66 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
67
68 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
69 "__bss_start" instead of "_edata" as fallback.
70
71 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
72
73 * bfd-in2.h: Regenerated.
74
75 2005-05-05 Paul Brook <paul@codesourcery.com>
76
77 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
78 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
79 elf-vxworks.lo.
80 * configure: Regenerate.
81 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
82 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
83 (elf32-i386.lo): Depend on elf-vxworks.h.
84 (elf-vxworks.lo): New rule.
85 * Makefile.in: Regenerate.
86 * elf-bfd.h (elf_backend_data): Update type of
87 elf_backend_emit_relocs.
88 (_bfd_elf_link_output_relocs): Update prototype.
89 * elflink.c (_bfd_elf_link_output_relocs): Always use
90 bed->elf_backend_emit_relocs when outputting relocations.
91 * elfxx-target.h (elf_backend_emit_relocs): Default to
92 _bfd_elf_link_output_relocs.
93 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
94 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
95 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
96 (elf_i386_plt0_entry): Remove padding.
97 (elf_i386_pic_plt0_entry): Ditto.
98 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
99 (PLT_NON_JUMP_SLOT_RELOCS): Define.
100 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
101 plt0_pad_byte fields.
102 (elf_i386_link_hash_table_create): Zero them.
103 (elf_i386_create_dynamic_sections): Create static relocation section.
104 (allocate_dynrelocs): Allocate space for static PLT relocations.
105 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
106 symbols. Give PLT symbols function type. Don't strip PLT sections
107 if we have exported symbols from them.
108 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
109 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
110 VxWorks.
111 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
112 Add relocation for GOT location. Fill in PLT static relocations.
113 (elf_i386_vxworks_link_hash_table_create): New function.
114 (elf_i386_vxworks_link_output_symbol_hook): New function.
115 * elf-vxworks.h: New file.
116
117 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
118
119 * section.c (bfd_make_section_anyway_with_flags): New.
120 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
121 (bfd_make_section_with_flags): New.
122 (bfd_make_section): Call bfd_make_section_with_flags.
123
124 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
125 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
126 instead of bfd_make_section/bfd_make_section and don't call
127 bfd_set_section_flags.
128 (mn10300_elf_check_relocs): Likewise.
129 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
130 * elf32-arm.c (create_got_section): Likewise.
131 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
132 (elf32_arm_check_relocs): Likewise.
133 * elf32-cris.c (cris_elf_check_relocs): Likewise.
134 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
135 (_frv_create_got_section): Likewise.
136 (elf32_frvfdpic_create_dynamic_sections): Likewise.
137 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
138 (elf32_hppa_check_relocs): Likewise.
139 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
140 (i370_elf_check_relocs): Likewise.
141 * elf32-i386.c (create_got_section): Likewise.
142 (elf_i386_check_relocs): Likewise.
143 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
144 (create_got_section): Likewise.
145 (m32r_elf_create_dynamic_sections): Likewise.
146 (m32r_elf_check_relocs): Likewise.
147 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
148 * elf32-ppc.c (ppc_elf_create_got): Likewise.
149 (ppc_elf_create_dynamic_sections): Likewise.
150 (ppc_elf_add_symbol_hook): Likewise.
151 (ppc_elf_check_relocs): Likewise.
152 * elf32-s390.c (create_got_section): Likewise.
153 (elf_s390_check_relocs): Likewise.
154 * elf32-sh.c (create_got_section): Likewise.
155 (sh_elf_create_dynamic_sections): Likewise.
156 (sh_elf_check_relocs): Likewise.
157 * elf32-vax.c (elf_vax_check_relocs): Likewise.
158 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
159 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
160 (add_extra_plt_sections): Likewise.
161 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
162 (elf64_alpha_create_got_section): Likewise.
163 (elf64_alpha_create_dynamic_sections): Likewise.
164 (elf64_alpha_check_relocs): Likewise.
165 * elf64-hppa.c (get_reloc_section): Likewise.
166 (get_opd): Likewise.
167 (get_plt): Likewise.
168 (get_dlt): Likewise.
169 (get_stub): Likewise.
170 (elf64_hppa_create_dynamic_sectionso): Likewise.
171 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
172 * elf64-ppc.c (create_linkage_sections): Likewise.
173 (ppc64_elf_check_relocs): Likewise.
174 * elf64-s390.c (create_got_section): Likewise.
175 (elf_s390_check_relocs): Likewise.
176 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
177 (sh64_elf64_create_dynamic_sections): Likewise.
178 * elf64-x86-64.c (create_got_section): Likewise.
179 (elf64_x86_64_check_relocs): Likewise.
180 * elflink.c (_bfd_elf_create_got_section): Likewise.
181 (_bfd_elf_link_create_dynamic_sections): Likewise.
182 (elf_link_add_object_symbols): Likewise.
183 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
184 (elfNN_ia64_create_dynamic_sections): Likewise.
185 (get_fptr): Likewise.
186 (get_pltoff): Likewise.
187 (get_reloc_section): Likewise.
188 (elfNN_ia64_object_p): Likewise.
189 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
190 (mips_elf_create_compact_rel_section): Likewise.
191 (mips_elf_create_got_section): Likewise.
192 (_bfd_mips_elf_create_dynamic_sections): Likewise.
193 * elfxx-sparc.c (create_got_section): Likewise.
194 (_bfd_sparc_elf_check_relocs): Likewise.
195
196 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
197 on linker created sections.
198
199 2005-05-05 H.J. Lu <hongjiu.lu@intel.com>
200
201 PR 882
202 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
203 script on executable.
204
205 2005-05-05 John Levon <levon@movementarian.org>
206
207 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
208 allocated memory before returning.
209 (decode_line_info): Likewise.
210 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
211 allocated by functions in this file.
212 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
213 * elf.c (_bfd_elf_close_and_cleanup): Call
214 _bfd_dwarf2_cleanup_debug_info.
215
216 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
217
218 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
219 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
220 * configure, config.in, Makefile.in: Regenerate.
221 * sysdep.h (stpcpy): Revert last change.
222
223 2005-05-05 Hans-Peter Nilsson <hp@axis.com>
224
225 * sysdep.h (stpcpy): Wrap declaration in parentheses.
226
227 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
228
229 * elfxx-ia64.c (ARCH_SIZE): New.
230 (LOG_SECTION_ALIGN): Likewise.
231 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
232 align relocation sections.
233 (get_fptr): Likewise.
234 (get_reloc_section): Likewise.
235 (elfNN_ia64_tprel_base): Likewise.
236 (elfNN_ia64_check_relocs): Support 32bit relocations.
237 (allocate_global_fptr_got): Likewise.
238 (allocate_dynrel_entries): Likewise.
239 (set_got_entry): Likewise.
240 (set_pltoff_entry): Likewise.
241 (elfNN_ia64_relocate_section): Likewise.
242
243 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
244
245 * configure.in: Add AC_CHECK_DECLS(stpcpy).
246 * configure: Regenerate.
247 * config.in: Likewise.
248
249 * sysdep.h (stpcpy): New.
250
251 2005-05-04 Nick Clifton <nickc@redhat.com>
252
253 * Update the address and phone number of the FSF organization in
254 the GPL notices in the following files:
255 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
256 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
257 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
258 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
259 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
260 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
261 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
262 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
263 coff-i960.c, coff-ia64.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, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
267 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
268 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
269 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
270 cpu-avr.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-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
274 cpu-m10200.c, cpu-m10300.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-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
277 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
278 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
279 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
280 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
281 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
282 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
283 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
284 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
285 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
286 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
287 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
288 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
289 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
290 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
291 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
292 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
293 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
294 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
295 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
296 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
297 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
298 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
299 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
300 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
301 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
302 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
303 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
304 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
305 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
306 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
307 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
308 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
309 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
310 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
311 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
312 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
313 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
314 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
315 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
316 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
317 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
318 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
319 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
320 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
321 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
322 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
323 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
324 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
325 hosts/alphavms.h
326
327 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
328
329 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
330 * bfd-in2.h: Regenerated.
331
332 * elflink.c (bfd_elf_set_symbol): New.
333 (_bfd_elf_provide_symbol): Call it.
334 (_bfd_elf_provide_section_bound_symbols): New.
335
336 2005-05-04 H.J. Lu <hongjiu.lu@intel.com>
337
338 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
339 at the end, if a strong definition has already been seen.
340
341 2005-05-04 Alan Modra <amodra@bigpond.net.au>
342
343 * section.c (struct bfd_section): Replace link_order_head and
344 link_order_tail with map_head and map_tail union.
345 (STD_SECTION): Update.
346 (_bfd_strip_section_from_output): Delete.
347 * aoutx.h: Update throughout for above changes.
348 * coff-ppc.c: Likewise.
349 * cofflink.c: Likewise.
350 * ecoff.c: Likewise.
351 * elf-eh-frame.c: Likewise.
352 * elf-m10300.c: Likewise.
353 * elf.c: Likewise.
354 * elf32-arm.c: Likewise.
355 * elf32-cris.c: Likewise.
356 * elf32-hppa.c: Likewise.
357 * elf32-i386.c: Likewise.
358 * elf32-m32r.c: Likewise.
359 * elf32-m68hc1x.c: Likewise.
360 * elf32-m68k.c: Likewise.
361 * elf32-ppc.c: Likewise.
362 * elf32-s390.c: Likewise.
363 * elf32-sh.c: Likewise.
364 * elf32-vax.c: Likewise.
365 * elf32-xtensa.c: Likewise.
366 * elf64-alpha.c: Likewise.
367 * elf64-hppa.c: Likewise.
368 * elf64-ppc.c: Likewise.
369 * elf64-s390.c: Likewise.
370 * elf64-sh64.c: Likewise.
371 * elf64-x86-64.c: Likewise.
372 * elflink.c: Likewise.
373 * elfxx-ia64.c: Likewise.
374 * elfxx-mips.c: Likewise.
375 * elfxx-sparc.c: Likewise.
376 * linker.c: Likewise.
377 * merge.c: Likewise.
378 * pdp11.c: Likewise.
379 * xcofflink.c: Likewise.
380 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
381 out from bfd_elf_size_dynamic_sections.
382 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
383 * bfd-in2.h: Regenerate.
384
385 2005-05-04 Alan Modra <amodra@bigpond.net.au>
386
387 * section.c (bfd_section_list_remove): Don't clear s->next.
388 (bfd_section_list_append): Always init s->prev.
389 (bfd_section_list_prepend): Define.
390 (bfd_section_list_insert_after): Minor optimization.
391 (bfd_section_removed_from_list): Rewrite.
392 * elf.c (assign_section_numbers): Simplify list traversal now that
393 bfd_section_list_remove doesn't destroy removed section next ptr.
394 * sunos.c (sunos_add_dynamic_symbols): Likewise.
395 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
396 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
397 * bfd-in2.h: Regenerate.
398
399 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
400
401 * bfd.c (bfd): Remove section_tail and add section_last.
402 (bfd_preserve): Likewise.
403 (bfd_preserve_save): Likewise.
404 (bfd_preserve_restore): Likewise.
405 * opncls.c (_bfd_new_bfd): Likewise.
406
407 * coffcode.h (coff_compute_section_file_positions): Updated.
408 (coff_compute_section_file_positions): Likewise.
409 * elf.c (assign_section_numbers): Likewise.
410 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
411 * elf64-mmix.c (mmix_elf_final_link): Likewise.
412 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
413 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
414 * sunos.c (sunos_add_dynamic_symbols): Likewise.
415 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
416
417 * ecoff.c (bfd_debug_section): Initialize prev.
418
419 * section.c (bfd_section): Add prev.
420 (bfd_section_list_remove): Updated.
421 (bfd_section_list_append): New.
422 (bfd_section_list_insert_after): New.
423 (bfd_section_list_insert_before): New.
424 (bfd_section_list_insert): Removed.
425 (bfd_section_removed_from_list): Updated.
426 (STD_SECTION): Initialize prev.
427 (bfd_section_init): Updated.
428 (bfd_section_list_clear): Updated.
429
430 * bfd-in2.h: Regenerated.
431
432 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
433
434 * elf.c (_bfd_elf_new_section_hook): Don't call
435 _bfd_elf_get_sec_type_attr on sections from input files.
436
437 2005-05-02 H.J. Lu <hongjiu.lu@intel.com>
438
439 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
440 hash table size 16699 instead of bfd_hash_table_init.
441
442 2005-05-01 Paul Brook <paul@codesourcery.com>
443
444 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
445 definition has already been seen.
446
447 2005-05-01 Paul Brook <paul@codesourcery.com>
448
449 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
450 R_ARM_PLT32 the same as R_ARM_PC24.
451 (arm_add_to_rel): Ditto.
452
453 2005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
454
455 * config.bfd: Add h8300*-*-rtemscoff.
456 Switch h8300*-*-rtems* to elf.
457
458 2005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
459
460 * aclocal.m4, Makefile.in: Regnerated.
461
462 2005-04-28 Paul Brook <paul@codesourcery.com>
463
464 Merge changes only applied to Makefile.in.
465 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
466 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
467 (elfxx-sparc.lo): New rule.
468 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
469 (elf64-sparc.lo): Likewise.
470
471 2005-04-28 Julian Brown <julian@codesourcery.com>
472
473 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
474 import.
475
476 2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
477
478 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
479
480 * elf.c (bfd_elf_sym_name): Updated.
481 (group_signature): Likewise.
482 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
483 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
484 (ppc64_elf_edit_toc): Likewise.
485 (ppc64_elf_relocate_section): Likewise.
486 * elfcode.h (elf_slurp_symbol_table): Likewise.
487 * elflink.c (elf_link_input_bfd): Likewise.
488
489 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
490 bfd_elf_sym_name to get local symbol name when reporting errors.
491
492 2005-04-27 Nick Clifton <nickc@redhat.com>
493
494 * elflink.c (elf_link_input_bfd): Handle the case where a badly
495 formatted input file results in a reloc which has no associated
496 global symbol.
497
498 2005-04-26 Jerome Guitton <guitton@gnat.com>
499
500 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
501
502 2005-04-25 David S. Miller <davem@davemloft.net>
503
504 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
505 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
506 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
507 Likewise.
508
509 2005-04-25 H.J. Lu <hongjiu.lu@intel.com>
510
511 PR 858
512 * elflink.c (elf_link_input_bfd): Make non-debugging reference
513 to discarded section an error.
514
515 2005-04-21 Jerome Guitton <guitton@gnat.com>
516
517 * configure.in: Replace BFD_NEED_DECLARATION checks by the
518 corresponding AC_CHECK_DECLS.
519 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
520 HAVE_DECL_*.
521 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
522 * configure: Regenerate.
523 * config.in: Ditto.
524
525 2005-04-21 Andreas Schwab <schwab@suse.de>
526
527 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
528 unsigned from type of dynamic_interpreter.
529 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
530 casts again.
531
532 * elf.c (assign_section_numbers): Fix comment.
533
534 2005-04-21 Jerome Guitton <guitton@gnat.com>
535
536 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
537 for struct som_exec_auxhdr fields.
538
539 2005-04-21 Nick Clifton <nickc@redhat.com>
540
541 * aout-adobe.c: Convert to ISO C and fix formatting.
542 * aout-arm.c: Convert to ISO C and fix formatting.
543 * aout-cris.c: Convert to ISO C and fix formatting.
544 * aout-ns32k.c: Convert to ISO C and fix formatting.
545 * aout-tic30.c: Convert to ISO C and fix formatting.
546 * coffcode.h: Convert to ISO C and fix formatting.
547 * coffswap.h: Convert to ISO C and fix formatting.
548 * i386aout.c: Convert to ISO C and fix formatting.
549 * libaout.h: Convert to ISO C and fix formatting.
550 * libcoff-in.h: Convert to ISO C and fix formatting.
551 * libcoff.h: Convert to ISO C and fix formatting.
552 * libecoff.h: Convert to ISO C and fix formatting.
553 * libnlm.h: Convert to ISO C and fix formatting.
554 * libpei.h: Convert to ISO C and fix formatting.
555 * libxcoff.h: Convert to ISO C and fix formatting.
556 * nlm-target.h: Convert to ISO C and fix formatting.
557 * nlm.c: Convert to ISO C and fix formatting.
558 * nlm32-alpha.c: Convert to ISO C and fix formatting.
559 * nlm32-i386.c: Convert to ISO C and fix formatting.
560 * nlm32-ppc.c: Convert to ISO C and fix formatting.
561 * nlm32-sparc.c: Convert to ISO C and fix formatting.
562 * nlmcode.h: Convert to ISO C and fix formatting.
563 * nlmswap.h: Convert to ISO C and fix formatting.
564 * pe-mips.c: Convert to ISO C and fix formatting.
565 * peXXigen.c: Convert to ISO C and fix formatting.
566 * peicode.h: Convert to ISO C and fix formatting.
567 * vms-gsd.c: Convert to ISO C and fix formatting.
568 * vms-hdr.c: Convert to ISO C and fix formatting.
569 * vms-misc.c: Convert to ISO C and fix formatting.
570 * vms-tir.c: Convert to ISO C and fix formatting.
571 * vms.c: Convert to ISO C and fix formatting.
572 * vms.h: Convert to ISO C and fix formatting.
573
574 * coffgen.c (coff_print_symbol): Restore correct formatting of
575 output.
576
577 2005-04-20 David S. Miller <davem@davemloft.net>
578
579 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
580 (_bfd_sparc_elf_link_hash_table_create): Likewise.
581 (allocate_dynrelocs): Likewise.
582
583 2005-04-20 Jerome Guitton <guitton@gnat.com>
584
585 * configure.in: Fix the check for basename declaration. Add check
586 for declarations of ftello, ftello64, fseeko, fseeko64.
587 * configure: Regenerate.
588 * config.in: Ditto.
589 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
590
591 2005-04-19 David S. Miller <davem@davemloft.net>
592
593 * elfxx-sparc.c: New file.
594 * elfxx-sparc.h: New file.
595 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
596 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
597 (elfxx-sparc.lo): New rule.
598 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
599 (elf64-sparc.lo): Likewise.
600 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
601 (bfd_elf64_sparc_vec): Likewise.
602 * configure: Regenerate.
603 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
604 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
605 which is more consistent with elf32-sparc.c
606
607 2005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
608
609 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
610 (mips_elf_create_local_got_entry): Check h->root.forced_local.
611
612 2005-04-19 Alan Modra <amodra@bigpond.net.au>
613
614 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
615 dynamic relocs in non-SEC_ALLOC sections.
616 (ppc_elf_gc_sweep_hook): Likewise.
617 (ppc_elf_relax_section): Likewise.
618 (ppc_elf_relocate_section): Likewise.
619
620 2005-04-18 Nick Clifton <nickc@redhat.com>
621
622 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
623 assigning a value to return_value.
624
625 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
626
627 PR 855
628 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
629 created group data.
630
631 2005-04-17 H.J. Lu <hongjiu.lu@intel.com>
632
633 PR 855
634 * elf.c (setup_group): Properly handle zero group count.
635
636 2005-04-17 Mark Kettenis <kettenis@gnu.org>
637
638 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
639 (som_is_subspace, compare_subspaces, som_compute_checksum)
640 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
641 protoypes.
642 (hppa_som_reloc, compare_syms, compare_subspaces)
643 (som_print_symbol, som_get_section_contents)
644 (som_set_section_contents): Remove space after 'void *'.
645 (som_bfd_print_private_bfd_data): Use %lx to print longs.
646 (som_bfd_merge_private_bfd_data)
647 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
648 defines.
649
650 2004-04-15 Julian Brown <julian@codesourcery.com>
651
652 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
653 * bfd-in2.h: Regenerate.
654 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
655 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
656 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
657 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
658 relocations if requested to.
659 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
660 use_blx rather than symbian_p.
661 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
662 use_blx is in effect.
663 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
664 for SymbianOS.
665
666 2005-04-15 Nick Clifton <nickc@redhat.com>
667
668 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
669 values.
670
671 2005-04-15 Alan Modra <amodra@bigpond.net.au>
672
673 PR ld/815
674 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
675 used as a list pointer.
676
677 2005-04-14 Alan Modra <amodra@bigpond.net.au>
678
679 * Makefile.am (NO_WERROR): Define.
680 * warning.m4: New file
681 * acinclude.m4: Include warning.m4.
682 * configure.in: Invoke AM_BINUTILS_WARNINGS.
683 * Makefile.in: Regenerate.
684 * configure: Regenerate.
685
686 2005-04-14 Alan Modra <amodra@bigpond.net.au>
687
688 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
689 Write trailing padding.
690
691 * merge.c (merge_strings): Round up section size for alignment.
692
693 2005-04-14 David S. Miller <davem@davemloft.net>
694
695 Add TLS support for 64-bit Sparc ELF.
696 * elf64-sparc.c (sparc64_elf_dyn_relocs,
697 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
698 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
699 sparc64_elf_hash_entry, sparc64_elf_tdata,
700 sparc64_elf_local_got_tls_type): New defines.
701 (sparc64_elf_mkobject): New function.
702 (sparc64_elf_link_hash_table): Add members for dynamic linker
703 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
704 uion to track TLS GOT references. Add sym_sec to cache
705 mappings from local sym to section.
706 (link_hash_newfunc): New function.
707 (sparc64_elf_bfd_link_hash_table_create): Rename to
708 sparc64_elf_link_hash_table_create for consistency.
709 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
710 (sparc64_elf_create_dynamic_sections): Initialize new section
711 members of sparc64_elf_link_hash_table. Only init srelbss
712 if not-shared.
713 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
714 New functions.
715 (SPARC_NOP): Define.
716 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
717 sparc64_elf_plt_ptr_offset): Delete.
718 (sparc64_plt_entry_build): New function to build PLT entries
719 gradually instread of all at once at the end of linking.
720 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
721 local vars. Get them from sparc64_elf_hash_table instead.
722 Check early on if r_symndx is in bounds. Handle TLS transitions.
723 Account for TLS GOT references and DF_STATIC_TLS, as needed.
724 For TLS relocs, record the tls_type in either
725 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
726 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
727 to the __tls_get_addr symbol. For PLT relocs, track references
728 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
729 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
730 symbol references, count the number of relocations needed for
731 that symbol. For default switch case, don't error, this lets
732 the TLS relocs not explicitly handled by this function get
733 accepted.
734 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
735 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
736 it from sparc64_elf_hash_table. Store the real PLT offset
737 in h->plt.offset, and build PLT entries one at a time. Also
738 get .dynbss section pointer from htab.
739 (allocate_dynrelocs, readonly_dynrelocs,
740 sparc64_omit_section_dynsym): New functions.
741 (sparc64_elf_omit_section_dynsym): Use these new functions as
742 helpers.
743 (dtpoff_base, tpoff): New functions.
744 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
745 locals, get them from sparc64_elf_hash_table. Handle TLS
746 relocations and refcounting in main relocation loop.
747 (sparc64_elf_finish_dynamic_symbol): Use
748 sparc64_elf_link_hash_table. Build PLT entries as we see
749 them. Handle TLS GOT relocations.
750 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
751 from sparc64_elf_hash_table. Initialize only PLT header
752 not all entries since we not build PLT entries one by one.
753 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
754 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
755 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
756
757 2005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
758
759 * elflink.c (elf_link_input_bfd): Update check for removed
760 sections.
761
762 2005-04-12 Alan Modra <amodra@bigpond.net.au>
763
764 * Makefile.am: Run "make dep-am".
765 * Makefile.in: Regenerate.
766 * aclocal.m4: Regenerate.
767 * libcoff.h: Regenerate.
768
769 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
770
771 * linker.c (_bfd_generic_link_output_symbols): Also check if
772 the output section of an input section has been removed from
773 the output file.
774
775 * section.c (bfd_section_list_remove): Clear the next field
776 of the removed section.
777 (bfd_section_removed_from_list): New.
778 * bfd-in2.h: Regenerated.
779
780 2005-04-11 David S. Miller <davem@davemloft.net>
781
782 * elf32-sparc.c (elf32_sparc_relocate_section,
783 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
784 R_SPARC_TLS_LE_{HIX22,LOX10}.
785 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
786 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
787 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
788 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
789
790 2005-04-11 H.J. Lu <hongjiu.lu@intel.com>
791
792 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
793
794 2005-04-11 Nick Clifton <nickc@redhat.com>
795
796 * aout-target.h: Convert to ISO C.
797 * aoutf1.h: Convert to ISO C.
798 * aoutx.h: Convert to ISO C.
799 * bout.c: Convert to ISO C.
800 * dwarf1.c: Convert to ISO C.
801 * ecoffswap.h: Convert to ISO C.
802 * freebsd.h: Convert to ISO C.
803 * genlink.h: Convert to ISO C.
804 * ieee.c: Convert to ISO C.
805 * ihex.c: Convert to ISO C.
806 * libcoff-in.h: Convert to ISO C.
807 * mach-o.c: Convert to ISO C.
808 * mach-o.h: Convert to ISO C.
809 * netbsd.h: Convert to ISO C.
810 * ns32k.h: Convert to ISO C.
811 * ns32knetbsd.c: Convert to ISO C.
812 * oasys.c: Convert to ISO C.
813 * pdp11.c: Convert to ISO C.
814 * pef-traceback.h: Convert to ISO C.
815 * pef.c: Convert to ISO C.
816 * pef.h: Convert to ISO C.
817 * riscix.c: Convert to ISO C.
818 * som.c: Convert to ISO C.
819 * som.h: Convert to ISO C.
820 * srec.c: Convert to ISO C.
821 * stabs.c: Convert to ISO C.
822 * sunos.c: Convert to ISO C.
823 * tekhex.c: Convert to ISO C.
824 * versados.c: Convert to ISO C.
825 * version.h: Convert to ISO C.
826 * xcoff-target.h: Convert to ISO C.
827 * xcofflink.c: Convert to ISO C.
828 * xsym.c: Convert to ISO C.
829 * xsym.h: Convert to ISO C.
830
831 2005-04-08 Paul Brook <paul@codesourcery.com>
832
833 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
834 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
835 (ARM2THUMB_PIC_GLUE_SIZE): Define.
836 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
837 (elf32_arm_to_thumb_stub): Create PIC stubs.
838 (record_arm_to_thumb_glue): Use different stub size for relocatable
839 images.
840
841 2005-04-05 Alan Modra <amodra@bigpond.net.au>
842
843 * elf64-ppc.c (dec_dynrel_count): New function split out from
844 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
845 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
846 (ppc64_elf_tls_optimize): Likewise.
847
848 2005-04-05 Mark Kettenis <kettenis@gnu.org>
849
850 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
851 CORE_WCOOKIE_OFFSET.
852 (SPARC64_WCOOKIE_OFFSET): New.
853 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
854
855 2005-04-05 Nick Clifton <nickc@redhat.com>
856
857 * po/rw.po: New translation: Kinyarwanda
858 * configure.in (ALL_LINGUAS): Add rw
859 * configure: Regenerate.
860
861 2005-04-05 Richard Sandiford <rsandifo@redhat.com>
862
863 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
864 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
865 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
866 section flags.
867 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
868 to check for SHT_MIPS_OPTIONS sections.
869 (_bfd_mips_elf_set_section_contents): Likewise.
870
871 2005-04-04 Eric Christopher <echristo@redhat.com>
872
873 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
874 Clean up gp handling code.
875
876 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
877
878 * elf.c (bfd_elf_set_group_contents): Ignore linker created
879 group section.
880 (assign_section_numbers): Accept link_info. Check SHT_GROUP
881 sections for relocatable files only. Remove the linker created
882 group sections.
883 (_bfd_elf_compute_section_file_positions): Pass link_info to
884 assign_section_numbers.
885
886 * elfxx-ia64.c (elfNN_ia64_object_p): New.
887 (elf_backend_object_p): Defined.
888
889 2005-04-04 H.J. Lu <hongjiu.lu@intel.com>
890
891 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
892
893 2005-04-03 Fred Fish <fnf@specifixinc.com>
894
895 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
896 dwarf_ranges_size members.
897 (struct comp_unit): Add base_address member.
898 (struct funcinfo): Replace low/high members with an arange.
899 (arange_add): Replace incoming "unit" parameter with "abfd" and
900 "first_arange" pointers. Reorganize/rewrite function body.
901 (decode_line_info): Change arange_add call to pass bfd and arange
902 pointers.
903 (lookup_address_in_line_info_table): Use arange list instead of
904 individual low/high members. Walk function's arange list to find
905 lowest PC in list, to test for overlapping functions.
906 (read_debug_ranges): New function, reads the debug_ranges section.
907 (lookup_address_in_function_table): Use arange list instead of
908 individual low/high members. Rewrite to find smallest range that
909 matches.
910 (read_rangelist): Read a given rangelist from debug_ranges.
911 (scan_unit_for_functions): Use arange list instead of individual
912 low/high members. Handle a DW_AT_ranges attribute.
913 (parse_comp_unit): Use arange list instead of individual low/high
914 members. Save comp unit base address. Handle a DW_AT_ranges
915 attribute.
916
917 2005-04-01 H.J. Lu <hongjiu.lu@intel.com>
918
919 * elf.c (assign_section_numbers): Really use the kept section.
920
921 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
922
923 * elf-bfd.h (_bfd_elf_check_kept_section): New.
924
925 * elf.c (assign_section_numbers): When sh_link points to a
926 discarded section, call _bfd_elf_check_kept_section to see if
927 the kept section can be used. Otherwise reject sh_link
928 pointing to discarded section.
929
930 * elflink.c (_bfd_elf_check_kept_section): New.
931 (elf_link_input_bfd): Use it.
932
933 2005-04-01 Alan Modra <amodra@bigpond.net.au>
934
935 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
936 that we no longer need.
937
938 2005-04-01 Alan Modra <amodra@bigpond.net.au>
939
940 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
941 rather than 0.
942 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
943
944 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
945
946 * elf.c (assign_section_numbers): Fix a typo.
947
948 2005-03-31 H.J. Lu <hongjiu.lu@intel.com>
949
950 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
951 error message.
952 (_bfd_elf_section_already_linked): Likewise.
953
954 2005-03-31 Jerome Guitton <guitton@gnat.com>
955
956 * config.in: Regenerate.
957
958 2005-03-31 Jerome Guitton <guitton@gnat.com>
959
960 * config.in (HAVE_DECL_BASENAME): New configure macro.
961 * configure.in: Check for basename.
962 * configure: Regenerate.
963
964 2005-03-30 Julian Brown <julian@codesourcery.com>
965
966 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
967 bfd_elf32_is_arm_mapping_symbol_name.
968 * bfd-in2.h: Regenerate.
969 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
970 bfd_elf32_is_arm_mapping_symbol_name.
971 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
972 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
973 (arm_elf_find_function): Likewise.
974 (elf32_arm_output_symbol_hook): Likewise.
975
976 2005-03-30 Julian Brown <julian@codesourcery.com>
977
978 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
979 * bfd-in2.h: Regenerate.
980 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
981 bfd_elf32_is_arm_mapping_symbol_name.
982 (elf32_arm_output_symbol_hook): Likewise.
983 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
984 mapping symbols.
985 (is_arm_mapping_symbol_name): Function moved from here...
986 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
987 and made global.
988
989 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
990
991 * configure.in: Check for ffs decl and alphabetize.
992 * config.in: Regenerate.
993 * configure: Regenerate.
994 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and
995 alphabetize.
996
997 2005-03-29 Fred Fish <fnf@specifixinc.com>
998
999 * dwarf2.c (struct comp_unit): Fix typo.
1000 (scan_unit_for_functions): Remove unused local variable "name"
1001 and dead code that set it.
1002
1003 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1004 Phil Blundell <philb@gnu.org>
1005
1006 * bfd-in2.h, libbfd.h: Regenerated.
1007 * reloc.c: Add ARM TLS relocations.
1008 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1009 relocations.
1010 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1011 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1012 (elf32_arm_tls_ie32_howto): New.
1013 (elf32_arm_howto_from_type): Support TLS relocations.
1014 (elf32_arm_reloc_map): Likewise.
1015 (elf32_arm_reloc_type_lookup): Likewise.
1016 (TCB_SIZE): Define.
1017 (struct elf32_arm_obj_tdata): New.
1018 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1019 (elf32_arm_mkobject): New function.
1020 (struct elf32_arm_relocs_copied): Add pc_count.
1021 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1022 (GOT_TLS_IE): Define.
1023 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1024 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1025 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1026 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1027 (dtpoff_base, tpoff): New functions.
1028 (elf32_arm_final_link_relocate): Handle TLS relocations.
1029 (IS_ARM_TLS_RELOC): Define.
1030 (elf32_arm_relocate_section): Warn about TLS mismatches.
1031 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1032 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1033 TLS relocations and pc_count.
1034 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1035 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1036 calls.
1037 (elf32_arm_size_dynamic_sections): Handle TLS.
1038 (elf32_arm_finish_dynamic_symbol): Likewise.
1039 (bfd_elf32_mkobject): Define.
1040
1041 2005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1042
1043 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1044 relocation types. Don't count relocations which will use a PLT.
1045
1046 2005-03-29 Joel Brobecker <brobecker@gnat.com>
1047
1048 * elf.c (elfcore_grok_nto_status): Print tid as long.
1049 (elfcore_grok_nto_regs): Likewise.
1050
1051 2005-03-29 Joel Brobecker <brobecker@gnat.com>
1052
1053 * irix-core.c: Remove some unnecessary prototypes.
1054
1055 2005-03-28 Joel Brobecker <brobecker@adacore.com>
1056
1057 * irix-core.c: Convert to ISO C.
1058
1059 2005-03-28 Joel Brobecker <brobecker@adacore.com>
1060
1061 * irix-core.c (do_sections): Replace + by | in expression.
1062 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1063 to unused parameters to avoid a compiler warning.
1064
1065 2005-03-28 Mark Kettenis <kettenis@gnu.org>
1066
1067 * netbsd-core.c: Convert to ISO C. Fix formatting.
1068
1069 2005-03-24 Eric Christopher <echristo@redhat.com>
1070
1071 * elfxx-mips.c: Revert previous patch.
1072
1073 2005-03-24 Nick Clifton <nickc@redhat.com>
1074
1075 * targets.c (_bfd_target_vector): Only include the
1076 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1077 all targets enabled.
1078
1079 2005-03-24 James E Wilson <wilson@specifixinc.com>
1080
1081 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1082 (BFD64_BACKENDS): Add elf32-ia64.lo.
1083 * Makefile.in: Regenerate.
1084
1085 2005-03-23 Eric Christopher <echristo@redhat.com>
1086
1087 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1088 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1089 after emitting relocation.
1090 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1091 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1092 and readonly_reloc.
1093
1094 2005-03-23 Mike Frysinger <vapier@gentoo.org>
1095 Nick Clifton <nickc@redhat.com>
1096
1097 * config.bfd: Accept any C library to accompany a GNU Linux
1098 implementation, not just the GNU C library.
1099 * configure.in: Likewise.
1100 * configure: Regenerate.
1101
1102 2005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1103
1104 * bfd-in.h (_bfd_elf_provide_symbol): New.
1105 * bfd-in2.h: Regenerated.
1106
1107 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1108 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1109 of set_linker_sym.
1110
1111 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1112 from elf32-ppc.c.
1113
1114 2005-03-22 Hans-Peter Nilsson <hp@axis.com>
1115
1116 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1117
1118 2005-03-22 Bob Wilson <bob.wilson@acm.org>
1119
1120 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1121 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1122 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1123 (xtensa_opcode_decode): Rearrange code.
1124
1125 2005-03-22 Nick Clifton <nickc@redhat.com>
1126
1127 * binary.c: Convert to ISO C90 formatting.
1128 * coff-arm.c: Convert to ISO C90 formatting.
1129 * coffgen.c: Convert to ISO C90 formatting.
1130 * elf32-gen.c: Convert to ISO C90 formatting.
1131 * elf64-gen.c: Convert to ISO C90 formatting.
1132 * hash.c: Convert to ISO C90 formatting.
1133 * ieee.c: Convert to ISO C90 formatting.
1134
1135 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1136
1137 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1138 unresolved symbols in R_ARM_NONE relocations.
1139
1140 2005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1141
1142 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1143 UNRESOLVED_RELOC_P argument. Set it appropriately.
1144 (elf32_arm_relocate_section): Update call to
1145 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1146 unresolved_reloc instead.
1147
1148 2005-03-23 Alan Modra <amodra@bigpond.net.au>
1149
1150 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1151 .gnu.warning.* sections.
1152
1153 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1154
1155 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1156 written_address_p.
1157 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1158 (elf_create_pointer_linker_section): Delete info parm. Don't make
1159 h dynamic. Don't set written_address_p.
1160 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1161 (bfd_put_ptr): Delete.
1162 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1163 Always write section contents. Assert global sym is def_regular.
1164 Use offset bottom bit as a written flag.
1165 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1166 calls.
1167
1168 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1169
1170 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1171 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1172 and end syms.
1173
1174 2005-03-21 Nick Clifton <nickc@redhat.com>
1175
1176 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1177 targets.
1178 (t2a1_bx_pc_insn): Likewise.
1179 (t2a2_noop_insn): Likewise.
1180 (t2a3_b_insn): Likewise.
1181 (t2a1_push_insn): Likewise.
1182 (t2a2_ldr_insn): Likewise.
1183 (t2a3_mov_insn): Likewise.
1184 (t2a4_bx_insn): Likewise.
1185 (t2a5_pop_insn): Likewise.
1186 (t2a6_bx_insn): Likewise.
1187 (coff_arm_relocate_section): Only declare the high_address
1188 variable for non WINCE targets.
1189
1190 2005-03-22 Alan Modra <amodra@bigpond.net.au>
1191
1192 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1193 SEC_LINKER_CREATED. Attach to dynobj.
1194 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1195
1196 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1197
1198 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1199 sym_offset. Add name, bss_name, sym_name, sym_val.
1200 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1201 Add sdata array of elf_linker_section_t.
1202 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1203 (enum elf_linker_section_enum): Delete.
1204 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1205 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1206 the special sections are needed. Adjust htab->sdata refs.
1207 Ensure dynobj is set in sreloc code.
1208 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1209 (ppc_elf_set_sdata_syms): New function.
1210 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1211 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1212 sym_val instead of sym_hash.
1213 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1214
1215 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1216
1217 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1218 (ppc_elf_merge_private_bfd_data): Likewise.
1219
1220 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1221
1222 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1223 (ppc_elf_create_linker_section): Don't create rel_section.
1224 (elf_create_pointer_linker_section): Don't size relocs.
1225 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1226 Don't generate relocs.
1227 (ppc_elf_relocate_section): Adjust calls to
1228 elf_finish_pointer_linker_section.
1229
1230 2005-03-21 Alan Modra <amodra@bigpond.net.au>
1231
1232 * elf32-ppc.c (is_ppc_elf_target): New function.
1233 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1234 for bfd_target_elf_flavour. Do this test before endian check.
1235 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1236 (ppc_elf_size_dynamic_sections): Likewise.
1237
1238 2005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1239
1240 * elf-bfd.h (elf_backend_data): Add int to
1241 elf_backend_section_from_shdr.
1242 (bfd_elf_section_data): Update comment for this_idx.
1243 (_bfd_elf_make_section_from_shdr): Add int.
1244 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1245
1246 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1247 and use it to set this_idx in bfd_elf_section_data.
1248 (bfd_section_from_shdr): Pass shindex to
1249 _bfd_elf_make_section_from_shdr.
1250 (_bfd_elf_section_from_bfd_section): Use this_idx in
1251 bfd_elf_section_data to find section index.
1252
1253 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1254 index and pass it to _bfd_elf_make_section_from_shdr.
1255 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1256 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1257 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1258 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1259 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1260 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1261 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1262 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1263 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1264
1265 2005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1266 Ross Ridge <rridge@csclub.uwaterloo.ca>
1267
1268 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1269 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1270 cases. Add comment.
1271
1272 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1273
1274 * elflink.c (elf_mark_used_section): Remove check for special
1275 sections.
1276
1277 2005-03-18 Andreas Schwab <schwab@suse.de>
1278
1279 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1280 from bfd_vma to ia64_insn, remove broken cast.
1281
1282 2005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1283
1284 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
1285 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1286 elf_m68k_finish_dynamic_sections): Use it.
1287
1288 2005-03-17 Paul Brook <paul@codesourcery.com>
1289 Dan Jacobowitz <dan@codesourcery.com>
1290 Mark Mitchell <mark@codesourcery.com>
1291
1292 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1293 (elf32_arm_additional_program_headers): Likewise.
1294 (elf_backend_modify_segment_map): Define.
1295 (elf_backend_additional_program_headers): Likewise.
1296 (elf32_arm_symbian_modify_segment_map): Use
1297 elf32_arm_modify_segment_map.
1298
1299 2005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1300
1301 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1302 for special sections.
1303
1304 2005-03-18 Alan Modra <amodra@bigpond.net.au>
1305
1306 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1307 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1308 section_sym_count param, and return number of section symbols.
1309 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1310 .dynsym contents. Don't bother calling swap_symbol_out on the
1311 first all-zero dynsym.
1312 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1313 special sections like bfd_abs_section.
1314 (bfd_elf_gc_sections): Spelling fix.
1315
1316 2005-03-16 Fred Fish <fnf@specifixinc.com>
1317
1318 PR binutils/790
1319 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1320 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1321
1322 2005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1323
1324 * elflink.c (elf_mark_used_section): New.
1325 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1326 non-relocatable link if we don't do GC.
1327
1328 2005-03-16 Nick Clifton <nickc@redhat.com>
1329 Ben Elliston <bje@au.ibm.com>
1330
1331 * configure.in (werror): New switch: Add -Werror to the
1332 compiler command line. Enabled by default. Disable via
1333 --disable-werror.
1334 * configure: Regenerate.
1335
1336 2005-03-16 Nick Clifton <nickc@redhat.com>
1337
1338 * ecoff.c: Convert to ISO C90 formatting.
1339
1340 2005-03-16 Alan Modra <amodra@bigpond.net.au>
1341
1342 * elf32-ppc.c: Divide file into general and linker specific
1343 functions. Sort linker functions into roughly the order in which
1344 they are called by the ELF linker code.
1345
1346 2005-03-16 Alan Modra <amodra@bigpond.net.au>
1347
1348 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1349 on section. Correct comment, and add FIXME.
1350 (ppc_elf_additional_program_headers): Don't bump header count for
1351 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1352 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1353 do allocate memory if they need it.
1354
1355 2005-03-15 Mikkel Krautz <krautz@gmail.com>
1356
1357 * config.bfd (x86_64-elf): Add target.
1358
1359 2005-03-15 Alan Modra <amodra@bigpond.net.au>
1360
1361 * po/es.po: Commit new Spanish translation.
1362
1363 2005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1364
1365 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1366 for global symbol when reporting overflow.
1367
1368 2005-03-11 Jakub Jelinek <jakub@redhat.com>
1369
1370 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1371 * libbfd.h: Rebuilt.
1372 * archive.c (_bfd_ar_spacepad): New function.
1373 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1374 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1375 coff_write_armap): Use it.
1376 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1377 uid/gid support.
1378 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1379
1380 2005-03-10 Mark Kettenis <kettenis@gnu.org>
1381
1382 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1383 has_table to the start of the function.
1384
1385 2005-03-10 Ben Elliston <bje@au.ibm.com>
1386
1387 * archive.c: Include hashtab.h.
1388 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1389 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1390 (hash_file_ptr): New function.
1391 (eq_file_ptr): Likewise.
1392 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1393 * libbfd-in.h: Include hashtab.h.
1394 (struct artdata): Change `cache' member type to htab_t.
1395 * libbfd.h: Rebuild.
1396
1397 2005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1398
1399 * configure.in: Bump version to 2.16.90.
1400 * configure: Regenerated.
1401
1402 2005-03-07 Jakub Jelinek <jakub@redhat.com>
1403
1404 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1405 close is a function like macro in system headers.
1406
1407 2005-03-07 Alan Modra <amodra@bigpond.net.au>
1408
1409 PR ld/778
1410 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1411 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1412
1413 2005-03-06 Alan Modra <amodra@bigpond.net.au>
1414
1415 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1416
1417 2005-03-05 Alan Modra <amodra@bigpond.net.au>
1418
1419 * po/bfd.pot: Regenerate.
1420
1421 2005-03-05 Alan Modra <amodra@bigpond.net.au>
1422
1423 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1424 with is_func.
1425 (func_desc_adjust): Force dot-syms local in executables as well
1426 as shared libs.
1427
1428 2005-03-04 David Daney <ddaney@avtrex.com>
1429
1430 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1431 '__gnu_local_gp' symbol used by gas -mno-shared.
1432
1433 2005-03-03 H.J. Lu <hongjiu.lu@intel.com>
1434
1435 * elf-bfd.h (elf_backend_data): Add "const char *" to
1436 elf_backend_section_from_phdr.
1437
1438 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1439 elf_backend_section_from_phdr hook.
1440
1441 2005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1442 Joseph Myers <joseph@codesourcery.com>
1443
1444 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1445 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1446 and tls_ldm_offset.
1447 (struct mips_elf_got_per_bfd_arg): Add global_count.
1448 (struct mips_elf_count_tls_arg): New.
1449 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1450 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1451 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1452 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1453 (TLS_RELOC_P): Define.
1454 (TP_OFFSET, DTP_OFFSET): Define.
1455 (dtprel_base, tprel_base): New functions.
1456 (mips_elf_link_hash_newfunc): Initialize tls_type.
1457 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1458 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1459 TLS entries.
1460 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1461 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1462 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1463 (mips_tls_got_index): New functions.
1464 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1465 arguments. Pass them to mips_elf_create_local_got_entry. Use
1466 mips_tls_got_index.
1467 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1468 Handle TLS entries.
1469 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1470 mips_elf_create_local_got_entry.
1471 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1472 arguments. Handle TLS entries.
1473 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1474 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1475 TLS entries.
1476 (mips_elf_record_global_got_symbol): Likewise.
1477 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1478 Count TLS entries.
1479 (mips_elf_merge_gots): Handle TLS entries when merging.
1480 (mips_elf_initialize_tls_index): New function.
1481 (mips_elf_set_global_got_offset): Handle TLS entries.
1482 (mips_elf_adjust_gp): Handle TLS.
1483 (mips_elf_multi_got): Remove redundant call to
1484 mips_elf_resolve_final_got_entries. Initialize global_count.
1485 Correct a comment. Initialize new TLS members of mips_got_info.
1486 Assign TLS GOT indexes for new GOTs.
1487 (mips_elf_create_got_section): Initialize new TLS members of
1488 mips_got_info.
1489 (mips_elf_calculate_relocation): Handle TLS relocs.
1490 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1491 functions.
1492 (_bfd_mips_elf_always_size_sections): Handle TLS.
1493 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1494 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1495 changed functions.
1496 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1497 (_bfd_mips_elf_hide_symbol): Handle TLS.
1498 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1499 (mips_reloc_map): Add TLS relocs.
1500 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1501 * elf64-mips.c (mips_elf64_howto_table_rel)
1502 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1503 * reloc.c: Define new MIPS TLS relocations.
1504 * libbfd.h, bfd-in2.h: Regenerated.
1505
1506 2005-03-02 Jan Beulich <jbeulich@novell.com>
1507
1508 * Makefile.am: Add dependency of cache.o on libiberty.h.
1509 * cache.c: Include libiberty.h.
1510 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1511
1512 2005-03-01 Zack Weinberg <zack@codesourcery.com>
1513
1514 * elf.c (bfd_section_from_shdr <default case>): Call
1515 elf_backend_section_from_shdr hook unconditionally, and return
1516 what it returns.
1517 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1518 * elfxx-target.h (elf_backend_section_from_shdr)
1519 (elf_backend_section_from_phdr): Default to
1520 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1521 respectively.
1522
1523 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1524
1525 * targets.h: Typo fix.
1526 * bfd-in2.h: Regenerate.
1527
1528 * bout.c (b_out_write_object_contents): Don't use sizeof on host
1529 structs to size on-disk structures.
1530 (b_out_set_section_contents): Size the external struct, not the
1531 internal one for on-disk size.
1532 (b_out_sizeof_headers): Likewise.
1533
1534 2005-03-01 Alan Modra <amodra@bigpond.net.au>
1535
1536 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1537 entry points with the func descriptor as well as undefweak.
1538
1539 2005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
1540
1541 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1542 present when IMPORT_NAME_UNDOECRATE is used.
1543
1544 2005-02-28 H.J. Lu <hongjiu.lu@intel.com>
1545
1546 PR 757
1547 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1548 int.
1549
1550 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1551 to _bfd_elf_merge_symbol.
1552
1553 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1554 unsigned int to return the alignment of the old common symbol
1555 in the dynamic object.
1556 (_bfd_elf_add_default_symbol): Pass NULL to
1557 _bfd_elf_merge_symbol.
1558 (elf_link_add_object_symbols): Pass &old_alignment to
1559 _bfd_elf_merge_symbol. Get the alignment of the new common
1560 symbol in the dynamic object.
1561
1562 2005-02-24 Ben Elliston <bje@au.ibm.com>
1563
1564 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1565 * format.c (bfd_check_format_matches): Likewise.
1566 * archive.c (BFD_GNU960_ARMAG): Likewise.
1567 (bfd_generic_archive_p): Likewise.
1568 (_bfd_write_archive_contents): Likewise.
1569
1570 2005-02-24 H.J. Lu <hongjiu.lu@intel.com>
1571
1572 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1573 * configure: Regenerate.
1574
1575 2005-02-24 Julian Brown <julian@sirius.codesourcery.com>
1576
1577 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1578 COMDAT group sections to have default visibility.
1579
1580 2005-02-24 Alan Modra <amodra@bigpond.net.au>
1581
1582 * coffcode.h (coff_print_aux): Warning fix.
1583 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1584 instead of section pointer to identify.
1585 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
1586 the correct size buffer for local sym mangling too.
1587 (h8300_bfd_link_add_symbols): Likewise.
1588 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
1589 warning.
1590 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
1591 * elf32-xtensa.c (literal_value_hash): Warning fix.
1592 * versados.c (process_otr): Warning fix.
1593 (versados_canonicalize_reloc): Likewise.
1594 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
1595 * vms.c (fill_section_ptr): Warning fix.
1596
1597 2005-02-23 H.J. Lu <hongjiu.lu@intel.com>
1598
1599 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
1600 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
1601
1602 2005-02-23 Nick Clifton <nickc@redhat.com>
1603
1604 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
1605 the relvaddr field of the Elf32_crinfo structure.
1606
1607 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
1608 variables that are passed by reference to
1609 m68hc11_get_relocation_value in case that function does not
1610 initialise them.
1611
1612 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
1613 return statements and replace with a single return at the end of
1614 the function. This helps pacify the flow analysis code in gcc 4.0.
1615
1616 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
1617 strtab to avoid compile time warning.
1618
1619 2005-02-23 Ben Elliston <bje@au.ibm.com>
1620
1621 * opncls.c (bfd_zalloc): Document this function.
1622
1623 2005-02-21 H.J. Lu <hongjiu.lu@intel.com>
1624
1625 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
1626 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
1627 Replace SEC_SHARED with SEC_COFF_SHARED.
1628 (styp_to_sec_flags): Likewise.
1629
1630 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
1631 (TARGET_LITTLE_SYM): Likewise.
1632
1633 * section.c (SEC_ARCH_BIT_0): Removed.
1634 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
1635 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
1636 (SEC_SHARED): Renamed to ...
1637 (SEC_COFF_SHARED): This.
1638 (SEC_BLOCK): Renamed to ...
1639 (SEC_TIC54X_BLOCK): This.
1640 (SEC_CLINK): Renamed to ...
1641 (SEC_TIC54X_CLINK): This.
1642 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
1643 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
1644 end.
1645 * bfd-in2.h: Regenerated.
1646
1647 2005-02-21 Fred Fish <fnf@specifixinc.com>
1648
1649 * dwarf2.c (find_abstract_instance_name): Call recursively
1650 to handle a DW_AT_specification.
1651
1652 2005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1653
1654 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
1655 mips_elf_create_dynamic_relocation,
1656 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
1657 Remove #if 0'd code.
1658
1659 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1660
1661 * Makefile.am: Run "make dep-am"
1662 * Makefile.in: Regenerate.
1663
1664 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1665
1666 * coffgen.c (bfd_coff_get_comdat_section): Check that
1667 coff_section_data isn't NULL.
1668
1669 2005-02-21 Alan Modra <amodra@bigpond.net.au>
1670
1671 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
1672 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
1673 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
1674 useless assignments.
1675 (xcoff_write_archive_contents_big): Likewise.
1676 (_bfd_xcoff_put_ldsymbol_name): Likewise.
1677 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
1678 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
1679 * cofflink.c (process_embedded_commands): Warning fixes.
1680 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
1681 Warning fixes.
1682 * dwarf2.c: Warning fixes.
1683 * elf-bfd.h: Likewise.
1684 * elf-eh-frame.c: Likewise.
1685 * elf-strtab.c: Likewise.
1686 * elf.c: Likewise.
1687 * elf32-m68k.c: Likewise.
1688 * elf32-ppc.c: Likewise.
1689 * elf32-sh-symbian.c: Likewise.
1690 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
1691 * elf64-sh64.c: Likewise.
1692 * peicode.h: Likewise.
1693 * elf64-mmix.c: Warning fixes.
1694 * elfcode.h: Likewise.
1695 * elfxx-mips.c: Likewise.
1696 * libbfd-in.h: Likewise.
1697 * libbfd.c: Likewise.
1698 * mach-o.c: Likewise.
1699 * merge.c: Likewise.
1700 * mmo.c: Likewise.
1701 * opncls.c: Likewise.
1702 * pef.c: Likewise.
1703 * srec.c: Likewise.
1704 * vms-hdr.c: Likewise.
1705 * vms-tir.c: Likewise.
1706 * xtensa-isa.c: Likewise.
1707 * xtensa-modules.c: Likewise.
1708 * xsym.c: Likewise.
1709 (pstrcmp): Use correct choice of string lengths. Fix return value.
1710 (bfd_sym_module_name): Correct string length.
1711 * bfd-in2.h: Regenerate.
1712 * libbfd.h: Regenerate.
1713
1714 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1715
1716 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
1717 uninitialized check_segment[1] in TLSMOFF case.
1718 Reported by Alan Modra.
1719 (elf32_frv_relocate_section): Improve errors and warnings.
1720
1721 2005-02-17 Alan Modra <amodra@bigpond.net.au>
1722
1723 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
1724
1725 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1726
1727 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
1728 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
1729 * pef.c (bfd_pef_scan): Don't ignore return value of
1730 bfd_pef_scan_start_address.
1731 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
1732 bfd_mach_o_scan_start_address.
1733 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
1734 * elfxx-mips.c: Remove unnecessary prototypes.
1735 (sort_dynamic_relocs_64): Abort if not BFD64.
1736
1737 2005-02-16 Alan Modra <amodra@bigpond.net.au>
1738
1739 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
1740 Skip toc reloc adjust if reloc_count is zero.
1741
1742 2005-02-15 Nigel Stephens <nigel@mips.com>
1743 Maciej W. Rozycki <macro@mips.com>
1744
1745 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1746 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1747 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1748 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1749 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1750 dst_mask.
1751 (mips16_gprel_reloc): Remove bit shuffling; call
1752 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1753 and _bfd_mips16_elf_reloc_shuffle() instead.
1754 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1755 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1756 relocs.
1757 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
1758 elf_mips16_howto_table_rel.
1759 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
1760 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
1761 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1762 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
1763 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1764 dst_mask.
1765 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
1766 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
1767 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
1768 placeholders.
1769 (mips16_gprel_reloc): Remove bit shuffling; call
1770 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1771 and _bfd_mips16_elf_reloc_shuffle() instead.
1772 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1773 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1774 relocs.
1775 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
1776 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
1777 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1778 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1779 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1780 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1781 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
1782 dst_mask.
1783 (mips16_gprel_reloc): Remove bit shuffling; call
1784 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1785 and _bfd_mips16_elf_reloc_shuffle() instead.
1786 (mips16_reloc_map): New reloc map for MIPS16 relocs.
1787 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1788 relocs.
1789 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
1790 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
1791 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
1792 handle bit shuffling for MIPS16 relocs.
1793 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1794 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
1795 and _bfd_mips16_elf_reloc_shuffle().
1796 (_bfd_mips_elf_generic_reloc): Likewise.
1797 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
1798 and R_MIPS16_LO16.
1799 (mips_elf_obtain_contents): Remove bit shuffling.
1800 (mips_elf_perform_relocation): Likewise; call
1801 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
1802 instead.
1803 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
1804 and R_MIPS16_LO16.
1805 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
1806 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1807 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
1808 (BFD_RELOC_MIPS16_HI16_S): Likewise.
1809 (BFD_RELOC_MIPS16_LO16): Likewise.
1810 * bfd-in2.h: Regenerate.
1811 * libbfd.h: Regenerate.
1812
1813 2005-02-15 Jan Beulich <jbeulich@novell.com>
1814
1815 * elfxx-ia64.c (ia64_howto_table): Correct strings for
1816 R_IA64_DTPMOD64[LM]SB.
1817
1818 2005-02-14 H.J. Lu <hongjiu.lu@intel.com>
1819
1820 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
1821 backward branch in the same section.
1822 (elfNN_ia64_relocate_section): Inform users that the input
1823 section is too big to relax br instruction when overflow
1824 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
1825 and R_IA64_PCREL21F.
1826
1827 2005-02-14 Orjan Friberg <orjanf@axis.com>
1828
1829 * elfcore.h (elf_core_file_p): Move the call to
1830 elf_backend_object_p to allow the correct machine to be set before
1831 processing the program headers.
1832
1833 2005-02-14 Nick Clifton <nickc@redhat.com>
1834
1835 PR binutils/716
1836 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
1837 aware flag from the input bfd to the output bfd.
1838
1839 2005-02-11 Maciej W. Rozycki <macro@mips.com>
1840
1841 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
1842 R_MIPS_LITERAL relocations for external symbols.
1843 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
1844 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
1845
1846 2005-02-11 H.J. Lu <hongjiu.lu@intel.com>
1847
1848 * bfd-in2.h: Rebuilt.
1849
1850 2005-02-11 Paul Brook <paul@codesourcery.com>
1851
1852 * elf-bfd.h (struct elf_link_hash_table): Add
1853 is_relocatable_executable.
1854 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
1855 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
1856 symbols in relocatable executables.
1857 (bfd_elf_record_link_assignment): Create dynamic section symbols in
1858 relocatable executables.
1859 (_bfd_elf_link_renumber_dynsyms): Ditto.
1860 (bfd_elf_final_link): Ditto.
1861 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
1862 relocations into relocatable executables.
1863 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
1864 executables. Also copy absolute relocations.
1865 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
1866 in relocatable executables.
1867 (allocate_dynrelocs): Copy relocations for relocatable executables.
1868 Output dynamic symbols for symbols defined in linker scripts.
1869
1870 2005-02-11 Nick Clifton <nickc@redhat.com>
1871
1872 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
1873 to avoid a compile time warning.
1874
1875 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
1876 BFD_ASSERT.
1877
1878 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
1879 inclusion of coffcode.h so that it is actually picked up.
1880
1881 * coffcode.h (coff_std_swap_table): Add an unused attribute in
1882 case it is not used.
1883
1884 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
1885 structure and macro.
1886
1887 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
1888 array.
1889
1890 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
1891 to protect the declaration of this array.
1892
1893 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
1894 Avoid call to memcpy with a size of 0.
1895
1896 2005-02-12 Alan Modra <amodra@bigpond.net.au>
1897
1898 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
1899 old-style branches to undefined dot-symbols which will be
1900 satisfied by a plt call.
1901
1902 2005-02-11 Alan Modra <amodra@bigpond.net.au>
1903
1904 * elf64-ppc.c (move_plt_plist): New function, extracted from..
1905 (ppc64_elf_copy_indirect_symbol): ..here.
1906 (func_desc_adjust): Use move_plt_plist.
1907
1908 2005-02-10 Paul Brook <paul@codesourcery.com>
1909
1910 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
1911
1912 2005-02-10 Paul Brook <paul@codesourcery.com>
1913
1914 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
1915 symbols local.
1916 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
1917 (elf_link_renumber_local_hash_table_dynsyms): New function.
1918 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
1919
1920 2005-02-10 Jakub Jelinek <jakub@redhat.com>
1921
1922 * bfd-in.h (BFD_LINKER_CREATED): Define.
1923 * bfd-in2.h: Rebuilt.
1924 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
1925 BFD_LINKER_CREATED bfds when determining input bfds without
1926 .note.GNU-stack section.
1927
1928 2005-02-10 Maciej W. Rozycki <macro@mips.com>
1929
1930 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
1931 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
1932 relocations against external symbols unchanged.
1933
1934 2005-02-08 Paul Brook <paul@codesourcery.com>
1935
1936 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
1937 sections.
1938
1939 2005-02-08 Hans-Peter Nilsson <hp@axis.com>
1940
1941 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
1942 prefix here.
1943
1944 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1945
1946 * elf64-mips.c: Fix formatting throughout.
1947
1948 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1949
1950 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
1951
1952 2005-02-07 Alexandre Oliva <aoliva@redhat.com>
1953
1954 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
1955 *ABS*/*UND* sections.
1956 (elf32_frv_relocate_section): Move zero-addend-required error...
1957 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
1958 missing needed TLS section.
1959
1960 2005-02-07 Hans-Peter Nilsson <hp@axis.com>
1961
1962 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
1963 being the last symbol.
1964 (aout_link_add_symbols): Just return TRUE if a warning
1965 symbol was last.
1966
1967 2005-02-07 Maciej W. Rozycki <macro@mips.com>
1968
1969 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
1970 R_MIPS_GPREL32 relocations against external symbols.
1971 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
1972 comment.
1973
1974 2005-02-07 Alan Modra <amodra@bigpond.net.au>
1975
1976 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
1977 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
1978 elf_string_from_elf_strtab.
1979 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
1980 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
1981 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
1982 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
1983 looking at cached symtab info first, before iterating over headers.
1984 For SHT_REL and SHT_RELA, load dynsymtab if needed.
1985 * elfcode.h (elf_object_p): Don't load section header stringtab
1986 specially.
1987
1988 2005-02-06 H.J. Lu <hongjiu.lu@intel.com>
1989
1990 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
1991 against protected function when building shared library.
1992
1993 PR 584
1994 * elf64-x86-64.c (is_32bit_relative_branch): New.
1995 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
1996 protected function symbol when building shared library for
1997 32bit relative branch instruction.
1998
1999 2005-02-06 Alan Modra <amodra@bigpond.net.au>
2000
2001 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2002 syms when doing a relocatable link.
2003 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2004 at u.def.section.
2005 (ppc64_elf_tls_setup): Likewise.
2006 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2007
2008 2005-02-04 Alan Modra <amodra@bigpond.net.au>
2009
2010 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2011 (link_hash_newfunc): Clear all locals using memset.
2012 (make_fdh): Remove flags param. Always create fake func desc
2013 weak. Link the descriptor with the code entry sym.
2014 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2015 (add_symbol_adjust): Adjust make_fdh call.
2016 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2017 descriptor to strong undefined if code entry is strong.
2018
2019 2005-02-04 Alan Modra <amodra@bigpond.net.au>
2020
2021 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2022 lookup here. Set to new before calling bfd_link_repair_undef_list.
2023 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2024
2025 2005-02-03 Alan Modra <amodra@bigpond.net.au>
2026
2027 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2028
2029 2005-02-03 Alan Modra <amodra@bigpond.net.au>
2030
2031 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2032 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2033 before the as-needed lib was loaded. Abort on unexpected refs.
2034
2035 2005-02-02 Alan Modra <amodra@bigpond.net.au>
2036
2037 * elflink.c (elf_smash_syms): Expand comments.
2038 (elf_link_add_object_symbols): Only call elf_smash_syms for
2039 as-needed dynamic objects.
2040
2041 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2042 everything, just the field specific to ia64.
2043 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
2044
2045 2005-02-01 Alan Modra <amodra@bigpond.net.au>
2046
2047 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2048 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2049 undefined syms.
2050 (struct add_symbol_adjust_data): New.
2051 (add_symbol_adjust): Make an undefweak func desc for old ABI
2052 objects to link with --as-needed shared libs. Return fail status.
2053 Don't adjust old ABI func entry sym to weak if func desc syms
2054 isn't defined.
2055 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2056 and return status.
2057
2058 2005-02-01 Hans-Peter Nilsson <hp@axis.com>
2059
2060 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2061 for clarity.
2062
2063 2005-02-01 Alan Modra <amodra@bigpond.net.au>
2064
2065 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2066 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2067 remove anything but new and undefweak.
2068 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2069 existing _DYNAMIC.
2070 (_bfd_elf_create_dynamic_sections): Formatting.
2071 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2072 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2073 (struct elf_smash_data): New.
2074 (elf_smash_syms): New function.
2075 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2076 unneeded dynamic objects to loaded list.
2077 (elf_link_output_extsym): Don't handle as-needed here. Strip
2078 bfd_link_hash_new symbols.
2079 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2080 delref when dynindx is already -1.
2081 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2082 symbols.
2083 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2084
2085 2005-02-01 Ben Elliston <bje@au.ibm.com>
2086
2087 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2088
2089 2005-02-01 Ben Elliston <bje@au.ibm.com>
2090
2091 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2092 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2093 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2094 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2095 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2096 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2097 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2098 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2099 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2100 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2101 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
2102 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
2103 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2104 throughout. Similarly, collapse #if 1'd code.
2105
2106 2005-02-01 Ben Elliston <bje@au.ibm.com>
2107
2108 * elf-bfd.h (bfd_elf_discard_group): Remove.
2109 * elf.c (bfd_elf_discard_group): Likewise.
2110 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2111
2112 2005-01-31 Richard Sandiford <rsandifo@redhat.com>
2113
2114 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2115 (_bfd_elf_eh_frame_address_size): Declare.
2116 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2117 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2118 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2119 (elf_backend_eh_frame_address_size): Define.
2120 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2121 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2122 size from the new backend hook.
2123 (_bfd_elf_write_section_eh_frame): Likewise.
2124 (_bfd_elf_eh_frame_address_size): New function.
2125
2126 2005-01-31 Andrew Cagney <cagney@gnu.org>
2127
2128 * configure: Regenerate to track ../gettext.m4.
2129
2130 2005-01-31 Mark Mitchell <mark@codesourcery.com>
2131
2132 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2133 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
2134
2135 2005-01-31 Nick Clifton <nickc@redhat.com>
2136
2137 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2138 sparc-lynxos, vax-vms) be obsolete.
2139
2140 2005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2141
2142 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2143 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2144 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2145 * elfcode.h (elf_object_p): Use minpagesize instead of
2146 maxpagesize.
2147 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2148 (elfNN_bed): Include ELF_MINPAGESIZE.
2149
2150 2005-01-28 Julian Brown <julian@codesourcery.com>
2151
2152 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2153 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2154 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2155 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
2156 passing flag value from ld. Set flag value in global hash table entry.
2157 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
2158 relocation.
2159
2160 2005-01-27 Andrew Cagney <cagney@gnu.org>
2161
2162 * configure: Regenerate to track ../gettext.m4 change.
2163
2164 2005-01-25 Mark Mitchell <mark@codesourcery.com>
2165
2166 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
2167 SymbianOS.
2168
2169 2005-01-25 Alexandre Oliva <aoliva@redhat.com>
2170
2171 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2172 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2173 for TLSMOFF.
2174 * reloc.c: Add R_FRV_TLSMOFF.
2175 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2176 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2177 (elf32_frv_relocate_section): Handle it.
2178 (elf32_frv_check_relocs): Likewise.
2179 * libbfd.h, bfd-in2.h: Rebuilt.
2180 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2181 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2182 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2183 such that they return the constant in gr9.
2184 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2185 symbols.
2186 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2187 too, such that they shrink on relaxation.
2188 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2189 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2190 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2191 if we can guarantee the use of 16-bit constants.
2192 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2193 Introduce TLS support for FR-V FDPIC.
2194 * reloc.c: Add TLS relocations.
2195 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2196 (elf32_frv_rel_tlsdesc_value_howto): New.
2197 (elf32_frv_rel_tlsoff_howto): New.
2198 (frv_reloc_map): Add new mappings.
2199 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2200 reloc information.
2201 (frvfdpic_dynamic_got_plt_info): New.
2202 (frvfdpic_plt_tls_ret_offset): New.
2203 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2204 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2205 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2206 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2207 section as local.
2208 (struct frvfdpic_relocs_info): Add TLS fields.
2209 (frvfdpic_relocs_info_hash): Warning clean up.
2210 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2211 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2212 (FRVFDPIC_TLS_BIAS): Define.
2213 (tls_biased_base): New.
2214 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2215 relocations.
2216 (frv_reloc_type_lookup): Likewise.
2217 (frvfdpic_info_to_howto_rel): Likewise.
2218 (elf32_frv_relocate_section): Likewise.
2219 (_frv_create_got_section): Create the PLT section here.
2220 (elf32_frvfdpic_create_dynamic_sections): Not here.
2221 (_frvfdpic_count_nontls_entries): Move out of...
2222 (_frvfdpic_count_got_plt_entries): ... here.
2223 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2224 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2225 support.
2226 (_frvfdpic_relax_tls_entries): New.
2227 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2228 (_frvfdpic_get_tlsdesc_entry): New.
2229 (_frvfdpic_assign_got_entries): Add TLS support.
2230 (_frvfdpic_assign_plt_entries): Likewise.
2231 (_frvfdpic_reset_got_plt_entries): New.
2232 (_frvfdpic_size_got_plt): Move out of...
2233 (elf32_frvfdpic_size_dynamic_sections): ... here.
2234 (_frvfdpic_relax_got_plt_entries): New.
2235 (elf32_frvfdpic_relax_section): New.
2236 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2237 (elf32_frv_check_relocs): Add TLS support.
2238 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2239 * libbfd.h, bfd-in2.h: Rebuilt.
2240
2241 2005-01-25 Alan Modra <amodra@bigpond.net.au>
2242
2243 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2244 loadable reloc sections.
2245 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2246 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2247
2248 2005-01-25 Alan Modra <amodra@bigpond.net.au>
2249
2250 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2251 sections immediately when linking shared libs. Instead, wait until
2252 we know a lib is needed.
2253 (_bfd_elf_link_create_dynstrtab): Extract from..
2254 (_bfd_elf_link_create_dynamic_sections_): ..here.
2255 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2256 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2257 for non-existent .dynamic.
2258 (elf_link_output_extsym): Don't complain about undefined symbols
2259 in as-needed dynamic libs that aren't actually linked.
2260
2261 2005-01-24 Andrew Cagney <cagney@gnu.org>
2262
2263 * configure: Regenerate, ../gettext.m4 was updated.
2264
2265 2005-01-21 Ben Elliston <bje@au.ibm.com>
2266
2267 * aout-encap.c: Remove unused file.
2268
2269 2005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2270
2271 PR 679
2272 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2273 non-function symbols are local.
2274 (_bfd_elf_symbol_refs_local_p): Likewise.
2275
2276 2005-01-18 Alan Modra <amodra@bigpond.net.au>
2277
2278 * bfd.c (bfd_link_just_syms): Add abfd param.
2279 * bfd-in2.h: Regenerate.
2280
2281 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2282
2283 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2284 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2285 instructions. If the amount of padding is known, reduce the size
2286 of the CIE or FDE by that amount.
2287
2288 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2289
2290 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2291 augmentation_size. Use bfd_signed_vmas for data_align.
2292 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2293 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2294 functions. Don't read past the end of the enclosing CIE or FDE.
2295 (skip_bytes): New utility function.
2296 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2297 sanity checking.
2298 (_bfd_elf_write_section_eh_frame): Use new functions.
2299
2300 2005-01-17 Richard Sandiford <rsandifo@redhat.com>
2301
2302 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2303 assert-style REQUIRE() macro to handle sanity checks.
2304
2305 2005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2306
2307 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2308 (comp_unit): Here.
2309 (read_unsigned_leb128): Removed.
2310 (read_signed_leb128): Removed.
2311 (find_abstract_instance_name): Updated.
2312 (parse_comp_unit): Accept info_ptr_unit.
2313 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2314 comp unit and pass it to parse_comp_unit.
2315
2316 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2317 (read_signed_leb128): Moved to ...
2318 * libbfd.c: Here.
2319
2320 * libbfd-in.h (read_unsigned_leb128): New prototype.
2321 (read_signed_leb128): Likewise.
2322 * libbfd.h: Regenerated.
2323
2324 2005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2325 Nick Clifton <nickc@redhat.com>
2326
2327 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2328 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2329 arch_sh4a_nofpu_up in order to match the external names and make the
2330 testsuite's job easier.
2331 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2332 names.
2333 * bfd-in2.h: Regenerate.
2334
2335 2005-01-15 Andrew Cagney <cagney@gnu.org>
2336
2337 * bfd.m4: New file.
2338 * acinclude.m4: Move BFD_NEED_DECLARATION,
2339 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2340 the new file bfd.m4. Include ../bfd/bfd.m4.
2341 * configure: Re-generate.
2342
2343 2005-01-12 Alan Modra <amodra@bigpond.net.au>
2344
2345 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2346 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2347 reaching PLT.
2348 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2349 R_PPC_RELAX32PC_PLT.
2350
2351 2005-01-11 Alan Modra <amodra@bigpond.net.au>
2352
2353 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2354 symbols.
2355 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2356 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2357 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2358 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2359 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2360 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2361 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2362 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2363 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2364 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2365 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2366 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2367 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2368 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2369
2370 2005-01-11 Alan Modra <amodra@bigpond.net.au>
2371
2372 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2373 .dynsbss flags.
2374
2375 2005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2376
2377 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2378 * bfd-in2.h: Regenerate.
2379 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2380 to support these new machine values.
2381 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2382 the maxq10.
2383 (bfd_maxq_arch): Update values for the maxq20.
2384
2385 2005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2386
2387 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2388 non-shared object, do not reserve space in .plt and .rela.plt for
2389 regular symbols neither defined nor referenced in shared objects.
2390
2391 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2392
2393 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2394 to zero the structure.
2395 (create_got_section): Use BFD_ASSERT instead of abort.
2396 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2397 'srelgot' fields.
2398 (create_got_section): New function.
2399 (sparc64_elf_create_dynamic_sections): Likewise.
2400 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2401 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2402 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2403 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2404 (sparc64_elf_finish_dynamic_symbol): Likewise.
2405 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2406 (elf_backend_create_dynamic_sections): Define to
2407 sparc64_elf_create_dynamic_sections.
2408
2409 2005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2410
2411 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2412 (elf_backend_omit_section_dynsym): Define to it.
2413 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2414 (elf_backend_omit_section_dynsym): Define to it.
2415
2416 2005-01-07 Jakub Jelinek <jakub@redhat.com>
2417
2418 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2419 PT_DYNAMIC segment, unless .dynamic.
2420
2421 2005-01-06 Paul Brook <paul@codesourcery.com>
2422
2423 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2424 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2425 * configure: Regenerate.
2426 * elf32-arm.c: Add VxWorks target bfd.
2427 (USE_REL): Remove.
2428 (elf32_arm_link_hash_table): Add use_rel.
2429 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2430 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2431 Correct offset calculation for RELA case.
2432 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2433 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2434 (elf32_arm_vxworks_link_hash_table_create): New function.
2435 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2436 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2437 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2438
2439 2005-01-06 Alan Modra <amodra@bigpond.net.au>
2440
2441 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2442 multi_toc_needed.
2443 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2444 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2445 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2446 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2447 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2448 (toc_adjusting_stub_needed): Rewrite.
2449 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2450 toc tests. Adjust for toc_adjusting_stub_needed changes.
2451 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2452 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2453 * section.c: Expand comment on backend bits.
2454 * bfd-in2.h: Regenerate.
2455 * libbfd.h: Regenerate.
2456
2457 2005-01-06 Alan Modra <amodra@bigpond.net.au>
2458
2459 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2460 toc adjusting stub, do not test source section flags.
2461
2462 2005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
2463
2464 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2465 from STABS debugging sections again.
2466
2467 2005-01-05 Fred Fish <fnf@specifixinc.com>
2468
2469 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2470 (find_abstract_instance_name): New function.
2471 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2472 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2473 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2474
2475 2004-12-31 Paul Brook <paul@copdesourcery.com>
2476
2477 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2478
2479 2004-12-31 Alan Modra <amodra@bigpond.net.au>
2480
2481 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2482 Commit missing changes from 2004-12-22.
2483 * bfd-in2.h: Regenerate.
2484
2485 2004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
2486
2487 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2488
2489 2004-12-21 Kris Warkentin <kewarken@qnx.com>
2490
2491 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2492 Add 'base' argument for constructing register sections. Reformat.
2493 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2494 gp and fp regs. Reformat.
2495
2496 2004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2497
2498 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2499 * bfd-in2.h: Regenerate.
2500 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2501 (avr_reloc_map): Likewise.
2502 (avr_final_link_relocate): Likewise.
2503
2504 2004-12-22 Alan Modra <amodra@bigpond.net.au>
2505
2506 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2507 as-needed dynamic libs as undefined.
2508 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2509 libs when finding they are needed.
2510
2511 2004-12-20 Alan Modra <amodra@bigpond.net.au>
2512
2513 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2514 (opd_entry_value): Use opd_relocs if available.
2515 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
2516 copy .opd relocations to opd_relocs.
2517 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2518
2519 2004-12-16 Richard Sandiford <rsandifo@redhat.com>
2520
2521 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2522 * elf32-v850.c (v850_elf_howto_table): Add entry for
2523 R_V850_LO16_SPLIT_OFFSET.
2524 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2525 (v850_elf_perform_lo16_relocation): New function, extracted from...
2526 (v850_elf_perform_relocation): ...here. Use it to handle
2527 R_V850_LO16_SPLIT_OFFSET.
2528 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2529 R_V850_LO16_SPLIT_OFFSET.
2530 * libbfd.h, bfd-in2.h: Regenerate.
2531
2532 2004-12-14 P.J. Darcy <darcypj@us.ibm.com>
2533
2534 * config.bfd: Add s390x-ibm-tpf support.
2535
2536 2004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
2537
2538 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
2539 to prototype, to make hash info available.
2540 Prevent wrapped symbols from being adjusted twice.
2541
2542 2004-12-14 Richard Sandiford <rsandifo@redhat.com>
2543
2544 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2545 overflow for calls to undefined weak symbols.
2546
2547 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2548
2549 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2550 canonical sections syms have a name.
2551
2552 2004-12-11 Alan Modra <amodra@bigpond.net.au>
2553
2554 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2555 have been adjusted for output.
2556 (ppc64_elf_relocate_section): Mark sections with reloc_done.
2557
2558 2004-12-10 Alan Modra <amodra@bigpond.net.au>
2559
2560 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2561 add symtab_hdr param.
2562 (group_signature): Update calls.
2563 * elf-bfd.h (bfd_elf_sym_name): Update.
2564 * elf32-ppc.c (ppc_elf_relocate_section): Update.
2565 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2566 (ppc64_elf_relocate_section): Update.
2567 * elflink.c (elf_link_input_bfd): Update.
2568
2569 2004-12-10 Jakub Jelinek <jakub@redhat.com>
2570
2571 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2572 st_shndx on STT_SECTION sections.
2573
2574 2004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
2575
2576 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2577 ELF section symbols.
2578
2579 2004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
2580
2581 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2582 return a real value, unless it is a PLT symbol.
2583 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2584 bal if possible.
2585
2586 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
2587 R_MIPS_JALR entry to 0.
2588
2589 * archures.c: Define bfd_mach_mips9000.
2590 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
2591 (mips_set_isa_flags): Handle bfd_mach_mips9000.
2592 * cpu-mips.c (I_mips9000): Define.
2593 (arch_info_struct): Add case for bfd_mach_mips9000.
2594 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
2595 * bfd-in2.h: Regenerate.
2596
2597 2004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
2598
2599 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
2600 overflow.
2601
2602 2004-12-07 Ben Elliston <bje@gnu.org>
2603
2604 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
2605
2606 2004-12-06 Daniel Jacobowitz <dan@debian.org>
2607
2608 Suggested by Fergal Daly <fergal@esatclear.ie>:
2609 * simple.c (simple_dummy_multiple_definition): New function.
2610 (bfd_simple_get_relocated_section_contents): Use it.
2611
2612 2004-12-03 Jan Beulich <jbeulich@novell.com>
2613
2614 * elf.c (elf_find_function): Don't use the last file symbol ever,
2615 seen, but the last one seen prior to the symbol being reported.
2616 Don't report a filename at all for global symbols when that might
2617 be ambiguous/wrong.
2618
2619 2004-12-01 Paul Brook <paul@codesourcery.com>
2620
2621 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
2622 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
2623 version.
2624
2625 2004-12-01 Paul Brook <paul@codesourcery.com>
2626
2627 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
2628 sections undefined.
2629
2630 2004-11-30 Paul Brook <paul@codesourcery.com>
2631
2632 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
2633 no_pipeline_knowledge
2634 (elf32_arm_link_hash_table_create): Ditto.
2635 (bfd_elf32_arm_process_before_allocation): Ditto.
2636 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
2637 handling.
2638 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2639 prototype.
2640 * bfd-in2.h: Regenerate.
2641
2642 2004-11-30 Randolph Chung <tausq@debian.org>
2643
2644 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
2645 (elf32_hppa_grok_psinfo): New function.
2646 (elf_backend_grok_prstatus): Define.
2647 (elf_backend_grok_psinfo): Define.
2648
2649 2004-11-24 H.J. Lu <hongjiu.lu@intel.com>
2650
2651 PR 574:
2652 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2653
2654 2004-11-24 Paul Brook <paul@codesourcery.com>
2655
2656 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
2657
2658 2004-11-24 Paul Brook <paul@codesourcery.com>
2659
2660 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
2661 (elf32_arm_swap_symbol_out): New function.
2662 (elf32_arm_size_info): Add.
2663 (elf_backend_size_info): Define.
2664
2665 2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2666
2667 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
2668 make_bfd_asection.
2669
2670 2004-11-19 Alan Modra <amodra@bigpond.net.au>
2671
2672 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
2673 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
2674 * nlmcode.h (nlm_write_object_contents): Warning fix.
2675
2676 2004-11-18 Bob Wilson <bob.wilson@acm.org>
2677
2678 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
2679
2680 2004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
2681
2682 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
2683 (elf32_arm_plt_thumb_stub): New.
2684 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2685 and plt_got_offset.
2686 (elf32_arm_link_hash_traverse): Fix typo.
2687 (elf32_arm_link_hash_table): Add obfd.
2688 (elf32_arm_link_hash_newfunc): Initialize new fields.
2689 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2690 (elf32_arm_link_hash_table_create): Initialize obfd.
2691 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2692 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2693 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2694 interworking BFD is not dynamic.
2695 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
2696 not emit glue for PLT references.
2697 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
2698 emit glue for PLT references. Support the Thumb PLT prefix.
2699 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
2700 plt_thumb_refcount.
2701 (elf32_arm_check_relocs): Likewise.
2702 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
2703 plt_thumb_refcount.
2704 (allocate_dynrelocs): Handle Thumb PLT references.
2705 (elf32_arm_finish_dynamic_symbol): Likewise.
2706 (elf32_arm_symbol_processing): New function.
2707 (elf_backend_symbol_processing): Define.
2708
2709 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2710
2711 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
2712 add_fde_encoding. Remove need_relative.
2713 * elf-eh-frame.c (extra_augmentation_string_bytes)
2714 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
2715 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
2716 in cases where the CIE has no existing 'R' augmentation. Use
2717 size_of_output_cie_fde when assigning offsets. Use the final offset
2718 as the new section size.
2719 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
2720 Account for any extra augmentation bytes in the returned offset.
2721 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
2722 moved before being modified. Pad growing entries with DW_CFA_nops.
2723 Add 'z' and 'R' augmentations as directed by add_augmentation_size
2724 and add_fde_encoding.
2725
2726 2004-11-15 Mark Mitchell <mark@codesourcery.com>
2727
2728 * elf32-arm.c (elf32_arm_relocate_section): Use
2729 arm_real_reloc_type.
2730
2731 2004-11-16 Richard Sandiford <rsandifo@redhat.com>
2732
2733 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
2734 for discard relocations; don't add an R_MIPS_NONE to the main body
2735 of .rel.dyn.
2736
2737 2004-11-04 Paul Brook <paul@codesourcery.com>
2738
2739 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
2740 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
2741 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
2742 default version definition for unversioned symbols.
2743 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
2744 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
2745 _bfd_elf_slurp_version_tables. Set default version for unversioned
2746 imported symbols.
2747
2748 2004-11-15 Paul Brook <paul@codesourcery.com>
2749
2750 * elflink.c (elf_link_add_object_symbols): Don't assume version
2751 indices are consecutive.
2752
2753 2004-11-14 Richard Sandiford <rsandifo@redhat.com>
2754
2755 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
2756 composite relocations against the personality data.
2757
2758 2004-11-13 Paul Brook <paul@codesourcery.com>
2759
2760 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
2761 R_ARM_PREL31 relocations to PLT entries.
2762 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
2763 (elf32_arm_check_relocs): Ditto.
2764
2765 2004-11-12 Bob Wilson <bob.wilson@acm.org>
2766
2767 * xtensa-isa.c (xtensa_interface_class_id): New.
2768
2769 2004-11-11 Bob Wilson <bob.wilson@acm.org>
2770
2771 * elf32-xtensa.c (property_table_compare): Remove assertion about
2772 entries with the same address and non-zero size.
2773 (xtensa_read_table_entries): Report such entries as errors.
2774
2775 2004-11-11 Mark Mitchell <mark@codesourcery.com>
2776
2777 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
2778 R_ARM_RELATIVE on Symbian OS.
2779
2780 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2781
2782 * som.c (som_bfd_print_private_bfd_data): New function.
2783 (som_object_setup): Save the auxiliary header. Don't assume that
2784 zero is an invalid entry point for a shared library.
2785 (som_object_p): Allocate the auxiliary header on the heap.
2786
2787 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
2788 declaration.
2789 (elf32_arm_symbian_modify_segment_map): Likewise.
2790
2791 2004-11-09 Daniel Jacobowitz <dan@debian.org>
2792
2793 From David Poole <daveml@mbuf.com>:
2794 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
2795 (elf32_arm_size_dynamic_sections): Call it.
2796
2797 2004-11-09 Alan Modra <amodra@bigpond.net.au>
2798
2799 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
2800 (ALL_MACHINES_CFILES): Fix typo.
2801 * Makefile.in: Regenerate.
2802 * po/SRC-POTFILES.in: Regenerate.
2803
2804 2004-11-08 Mark Mitchell <mark@codesourcery.com>
2805
2806 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
2807 R_ARM_RELATIVE relocation for Symbian OS, mention the section
2808 symbol in the relocation.
2809
2810 2004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
2811 Vineet Sharma <vineets@noida.hcltech.com>
2812
2813 * coff-maxq.c: New File.
2814 * cpu-maxq.c: New File.
2815 * coffcode.h: Likewise.
2816 * config.bfd: Likewise.
2817 * configure.in (maxqcoff_vec): New target vector.
2818 * Makefile.am: Add support for maxq target.
2819 * configure.in: Likewise.
2820 * archures.c:. Likewise.
2821 * targets.c: Likewise.
2822 * bfd_in2.h : Regenerated.
2823 * Makefile.in: Regenerated.
2824 * configure: Regenerated.
2825 * doc/Makefile.in: Regenerated.
2826
2827 2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2828
2829 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
2830 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
2831 C_NT_WEAK aux entries.
2832 (_bfd_coff_generic_relocate_section): Handle undefined
2833 aliases.
2834
2835 2004-11-07 Andreas Schwab <schwab@suse.de>
2836
2837 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
2838 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
2839 non-default visibility.
2840
2841 2004-11-01 Mark Mitchell <mark@codesourcery.com>
2842
2843 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
2844 D_PAGED.
2845 (elf32_arm_symbian_modify_segment_map): Don't
2846 reset includes_filehdr and includes_phdrs here.
2847
2848 2004-11-04 Daniel Jacobowitz <dan@debian.org>
2849
2850 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
2851 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
2852 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
2853 dependency.
2854 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
2855 to a new removed list. Remove normal configuration stanzas.
2856 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
2857 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
2858 elfarm-nabi.lo with elf32-arm.lo.
2859 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
2860 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
2861 * elf32-arm.h: Remove.
2862 * elfarm-oabi.c: Remove.
2863 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
2864 and bfd_elf32_littlearm_oabi_vec.
2865 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
2866
2867 2004-11-04 Hans-Peter Nilsson <hp@axis.com>
2868
2869 * config.bfd: Support crisv32-*-* like cris-*-*.
2870 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
2871 (bfd_mach_cris_v10_v32): New macros.
2872 * cpu-cris.c: Tweak formatting.
2873 (get_compatible): New function.
2874 (N): New macro.
2875 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
2876 bfd_arch_info_type:s.
2877 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
2878 get_compatible for member compatible and link bfd_cris_arch_v32 as
2879 next.
2880 * elf32-cris.c (cris_elf_pcrel_reloc)
2881 (cris_elf_set_mach_from_flags): New functions.
2882 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
2883 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
2884 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
2885 numbers for bfd_mach_cris_v32.
2886 (PLT_ENTRY_SIZE_V32): New macro.
2887 (elf_cris_plt0_entry): Drop last comma in initializer.
2888 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
2889 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
2890 PLT initializers.
2891 (cris_elf_relocate_section): Change all "%B(%A)" messages to
2892 "%B, section %A".
2893 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
2894 (elf_cris_finish_dynamic_sections): Similar.
2895 (elf_cris_adjust_dynamic_symbol): Similar.
2896 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
2897 section %A".
2898 <switch with PIC relocs>: Emit error and return FALSE for
2899 bfd_mach_cris_v10_v32.
2900 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2901 Emit warning when generating textrel reloc.
2902 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
2903 (cris_elf_final_write_processing): Set flags according to mach.
2904 (cris_elf_print_private_bfd_data): Display
2905 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
2906 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
2907 new_flags. Don't call cris_elf_final_write_processing. Don't
2908 look at the actual elf header flags at all; use
2909 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
2910 in bfd_get_mach for ibfd and obfd and handle merging of compatible
2911 objects.
2912 (bfd_elf32_bfd_copy_private_bfd_data): Define.
2913 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
2914 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
2915 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
2916 * bfd-in2.h, libbfd.h: Regenerate.
2917
2918 2004-11-04 Alan Modra <amodra@bigpond.net.au>
2919
2920 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
2921 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
2922 comment.
2923 (struct adjust_toc_info): New.
2924 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
2925
2926 2004-11-03 Bob Wilson <bob.wilson@acm.org>
2927
2928 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
2929 if there are no segments.
2930
2931 2004-11-02 Daniel Jacobowitz <dan@debian.org>
2932
2933 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
2934
2935 2004-11-02 Nick Clifton <nickc@redhat.com>
2936
2937 * elf32-iq2000.c: Convert to ISO C90 formatting.
2938
2939 2004-11-02 Hans-Peter Nilsson <hp@axis.com>
2940
2941 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
2942
2943 2004-10-28 H.J. Lu <hongjiu.lu@intel.com>
2944
2945 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
2946 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
2947 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2948
2949 2004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2950
2951 * elf32-sh.c (tpoff): Take alignment into account.
2952
2953 2004-10-28 Nick Clifton <nickc@redhat.com>
2954
2955 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
2956 performing a relocatable link.
2957 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
2958 for MIPS ports under Irix.
2959
2960 2004-10-27 Richard Earnshaw <rearnsha@arm.com>
2961
2962 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
2963 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
2964 (elf32_arm_final_link_relocate): Ditto.
2965 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
2966 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
2967 (elf32_arm_adjust_dynamic_symbol): Ditto.
2968 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
2969 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
2970 (elf32_arm_r_howto): ... To here.
2971 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
2972
2973 2004-10-26 H.J. Lu <hongjiu.lu@intel.com>
2974
2975 PR 475
2976 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
2977 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
2978 and R_IA64_SECREL64LSB.
2979
2980 2004-10-26 Paul Brook <paul@codesourcery.com>
2981
2982 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
2983 (bfd_elf_size_dynamic_sections): Create default version definition.
2984 (elf_link_output_extsym): Adjust for default symbol version.
2985
2986 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
2987
2988 * mmo.c: Adjust to ISO C.
2989
2990 * mmo.c (mmo_write_section_description): New function broken out
2991 of mmo_internal_write_section.
2992 (mmo_internal_write_section): For each of .text and .data, call
2993 mmo_write_section_description before outputting contents if it has
2994 nontrivially deducible vma or contents.
2995 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
2996 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
2997 symbols if found within the .data address range.
2998
2999 2004-10-24 Daniel Jacobowitz <dan@debian.org>
3000
3001 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3002
3003 2004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3004
3005 * mmo.c (File Layout): Correct place of misplaced blurb about
3006 special data.
3007
3008 2004-10-22 Mark Kettenis <kettenis@gnu.org>
3009
3010 * config.bfd: Add mips64*-*-openbsd.
3011
3012 2004-10-21 Bob Wilson <bob.wilson@acm.org>
3013
3014 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3015 statements.
3016
3017 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3018
3019 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3020 * configure: Regenerate.
3021
3022 2004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3023
3024 PR 463
3025 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3026 to linker reloc_overflow callback.
3027 (aout_link_input_section_ext): Likewise.
3028 (aout_link_reloc_link_order): Likewise.
3029 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3030 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3031 Likewise.
3032 (alpha_relocate_section): Likewise.
3033 * coff-arm.c (coff_arm_relocate_section): Likewise.
3034 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3035 * coff-h8500.c (extra_case): Likewise.
3036 * coff-i960.c (coff_i960_relocate_section): Likewise.
3037 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3038 * coff-mips.c (mips_relocate_section): Likewise.
3039 * coff-or32.c (coff_or32_relocate_section): Likewise.
3040 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3041 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3042 * coff-sh.c (sh_relocate_section): Likewise.
3043 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3044 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3045 * coff-z8k.c (extra_case): Likewise.
3046 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3047 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3048 (_bfd_coff_generic_relocate_section): Likewise.
3049 * ecoff.c (ecoff_reloc_link_order): Likewise.
3050 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3051 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3052 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3053 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3054 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3055 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3056 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3057 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3058 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3059 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3060 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3061 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3062 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3063 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3064 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3065 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3066 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3067 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3068 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3069 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3070 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3071 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3072 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3073 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3074 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3075 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3076 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3077 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3078 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3079 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3080 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3081 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3082 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3083 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3084 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3085 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3086 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3087 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3088 * elflink.c (elf_reloc_link_order): Likewise.
3089 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3090 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3091 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3092 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3093 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3094 (aout_link_reloc_link_order): Likewise.
3095 * reloc.c (bfd_generic_get_relocated_section_contents):
3096 Likewise.
3097 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3098 * simple.c (simple_dummy_reloc_overflow): Updated.
3099
3100 2004-10-20 Andreas Schwab <schwab@suse.de>
3101
3102 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3103 (elf_backend_plt_sym_val): Define.
3104
3105 2004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3106
3107 * config.bfd: Set targ_underscore=yes for PE COFF targets
3108
3109 2004-10-19 Alan Modra <amodra@bigpond.net.au>
3110
3111 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3112 (ppc64_elf_edit_opd): Likewise.
3113
3114 2004-10-18 Mark Mitchell <mark@codesourcery.com>
3115
3116 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3117 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3118 set SEC_ALLOC and SEC_LOAD.
3119
3120 2004-10-18 Nick Clifton <nickc@redhat.com>
3121
3122 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3123 'name' for relocs against both local and global symbols.
3124
3125 2004-10-16 Daniel Jacobowitz <dan@debian.org>
3126
3127 * bfd-in2.h: Regenerate.
3128 * bfd.c (struct bfd): Add no_export.
3129 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3130
3131 2004-10-15 Alan Modra <amodra@bigpond.net.au>
3132
3133 * config.bfd: Whitespace cleanup.
3134 * Makefile.am: Run "make dep-am"
3135 * Makefile.in: Regenerate.
3136
3137 2004-10-15 Jakub Jelinek <jakub@redhat.com>
3138
3139 * elflink.c (struct already_linked_section): Removed.
3140 (try_match_symbols_in_sections, already_linked): Removed.
3141 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3142 prefix of section names when finding already_linked_table
3143 chain. Compare section names. Instead of calling already_linked,
3144 do it inline and only for sections in the same already_linked_list.
3145
3146 2004-10-15 Alan Modra <amodra@bigpond.net.au>
3147
3148 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3149 parameter. If called after _bfd_elf_write_section_eh_frame,
3150 don't allow a -2 return unless need_* bit is already set, and
3151 handle offsets adjusted for output_offset.
3152 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3153 * elf.c (_bfd_elf_section_offset): Update call.
3154
3155 2004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3156
3157 PR 440
3158 * coffcode.h (coff_compute_section_file_positions): Cast to
3159 bfd_vma when computing page alignment.
3160
3161 2004-10-13 Mark Mitchell <mark@codesourcery.com>
3162
3163 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3164 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3165
3166 2004-10-12 Mark Mitchell <mark@codesourcery.com>
3167
3168 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3169 relocations use a virtual address, not a section offset.
3170
3171 2004-10-12 Bob Wilson <bob.wilson@acm.org>
3172
3173 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3174 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3175 xtensa_format_encode.
3176 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3177 (ebb_add_proposed_action): Delete.
3178
3179 2004-10-12 Bob Wilson <bob.wilson@acm.org>
3180
3181 * elf32-xtensa.c: Use ISO C90 formatting.
3182
3183 2004-10-12 Paul Brook <paul@codesourcery.com>
3184
3185 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3186 message.
3187
3188 2004-10-12 Paul Brook <paul@codesourcery.com>
3189
3190 * elf32-arm.h: Support EABI version 4 objects.
3191
3192 2004-10-12 Alan Modra <amodra@bigpond.net.au>
3193
3194 PR 325
3195 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3196 Don't mark as default.
3197 (bfd_x86_64_arch): Don't mark as default.
3198
3199 2004-10-12 Alan Modra <amodra@bigpond.net.au>
3200
3201 * elflink.c (enum action_discarded): New.
3202 (elf_section_complain_discarded): Delete.
3203 (elf_action_discarded): New function subsuming the above and also
3204 controlling reloc behaviour.
3205 (elf_link_input_bfd): Use it.
3206
3207 2004-10-11 Jakub Jelinek <jakub@redhat.com>
3208
3209 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3210 (special_sections): Add .gnu.liblist and .gnu.conflict.
3211 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3212
3213 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3214
3215 PR 233
3216 * elflink.c (elf_link_input_bfd): Try harder to support
3217 relocations against symbols in removed linkonce sections.
3218
3219 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3220
3221 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3222
3223 PR 354
3224 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3225 sections do not reference symbols in non-SEC_ALLOC sections.
3226
3227 2004-10-11 Alan Modra <amodra@bigpond.net.au>
3228
3229 PR 437
3230 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3231 (_bfd_elf_link_omit_section_dynsym): Formatting.
3232
3233 2004-10-10 Alan Modra <amodra@bigpond.net.au>
3234
3235 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3236 * libbfd.h: Regnerate.
3237 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3238 * elf32-frv.c: Likewise.
3239 * elf32-m32r.c: Likewise.
3240 * elf32-ppc.c: Likewise.
3241 * elf64-hppa.c: Likewise.
3242 * elfxx-ia64.c: Likewise.
3243 * opncls.c: Likewise.
3244
3245 2004-10-10 Alan Modra <amodra@bigpond.net.au>
3246
3247 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3248 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3249 offsets stored in struct eh_cie_fde entries before doing other
3250 work.
3251
3252 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3253 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3254 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3255 setting offsets for removed CIEs. Don't set "sec", instead set
3256 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3257 CIE in hdr_info. Only set make_relative and make_lsda_relative
3258 for CIEs. Use pointers rather than array indices.
3259 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3260 make_lsda_relative, need_* on cie_inf for FDEs.
3261 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3262 section output_offset. Delete cie_offset, instead use cie_inf
3263 pointer to CIE entry. Use need_relative and need_lsda_relative on
3264 CIE entry for FDEs. Use pointers rather than array indices.
3265
3266 2004-10-09 Alan Modra <amodra@bigpond.net.au>
3267
3268 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3269 bfd_is_target_special_symbol.
3270 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3271 * som.c (som_bfd_is_target_special_symbol): Define.
3272
3273 2004-10-08 Nick Clifton <nickc@redhat.com>
3274
3275 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3276 * configure: Regenerate.
3277 * bfd-in2.h: Regenerate.
3278 * syms.c (bfd_is_target_special_symbol): New interface function.
3279 Returns true when a symbol should be considered to be special.
3280 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3281 the symbol jump table.
3282 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3283 Return true iff the symbol is a mapping symbol.
3284 (bfd_elf32_bfd_is_target_special_symbol): Define.
3285 * elfxx-target.h: Provide a default definition for
3286 bfd_is_target_special_symbol.
3287 * aout-target.h: Likewise.
3288 * aout-tic30.c: Likewise.
3289 * binary.c: Likewise.
3290 * coffcode.h: Likewise.
3291 * i386msdos.c: Likewise.
3292 * ieee.c: Likewise.
3293 * ihex.c: Likewise.
3294 * libaout.h: Likewise.
3295 * libbfd-in.h: Likewise
3296 * libecoff.h: Likewise.
3297 * mach-o.c: Likewise.
3298 * mmo.c: Likewise.
3299 * nlm-target.h: Likewise.
3300 * oasys.c: Likewise.
3301 * pef.c: Likewise.
3302 * ppcboot.c: Likewise.
3303 * srec.c: Likewise.
3304 * tekhex.c: Likewise.
3305 * versados.c: Likewise.
3306 * vms.c: Likewise.
3307 * xcoff-target.h: Likewise.
3308 * xsym.c: Likewise.
3309 * libbfd.h: Regenerate.
3310
3311 2004-10-08 Daniel Jacobowitz <dan@debian.org>
3312
3313 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3314 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3315 (elf_backend_section_from_shdr): Define.
3316
3317 2004-10-08 Alan Modra <amodra@bigpond.net.au>
3318
3319 * syms.c (bfd_is_local_label): Return false for file symbols.
3320
3321 2004-10-07 Bob Wilson <bob.wilson@acm.org>
3322 David Heine <dlheine@tensilica.com>
3323
3324 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3325 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3326 (elf32xtensa_no_literal_movement): New global variable.
3327 (elf_howto_table): Add entries for new relocations.
3328 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3329 (property_table_compare): When addresses are equal, compare sizes and
3330 various property flags.
3331 (property_table_matches): New.
3332 (xtensa_read_table_entries): Extend to read new property tables. Add
3333 output_addr parameter to indicate that output addresses should be used.
3334 Use bfd_get_section_limit.
3335 (elf_xtensa_find_property_entry): New.
3336 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3337 (elf_xtensa_check_relocs): Handle new relocations.
3338 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3339 relocations. Use new xtensa-isa.h functions.
3340 (build_encoding_error_message): Remove encode_result parameter. Add
3341 new target_address parameter used to detect alignment errors.
3342 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3343 error handling. Use new is_operand_relocation function.
3344 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3345 Use underbar macro for error messages. Formatting.
3346 (get_const16_opcode): New.
3347 (get_l32r_opcode): Add a separate flag for initialization.
3348 (get_relocation_opnd): Operand number is no longer explicit in the
3349 relocation. Change to decode the opcode and analyze its operands.
3350 (get_relocation_slot): New.
3351 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3352 Use new xtensa-isa.h functions to handle multislot instructions.
3353 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3354 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3355 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3356 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3357 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3358 get_single_format, init_op_single_format_table): New.
3359 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3360 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3361 (contract_asm_expansion): Add error_message parameter and pass it to
3362 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3363 with R_XTENSA_SLOT0_OP.
3364 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3365 instructions. Use new xtensa-isa.h functions.
3366 (r_reloc struct): Add new virtual_offset field.
3367 (r_reloc_init): Add contents and content_length parameters. Set
3368 virtual_offset field to zero. Add contents to target_offset field for
3369 partial_inplace relocations.
3370 (r_reloc_is_defined): Check for null.
3371 (print_r_reloc): New debug function.
3372 (source_reloc struct): Replace xtensa_operand field with pair of the
3373 opcode and the operand position. Add is_abs_literal field.
3374 (init_source_reloc): Specify operand by opcode/position pair. Set
3375 is_abs_literal field.
3376 (source_reloc_compare): When target_offsets are equal, compare other
3377 fields to make sorting predictable.
3378 (literal_value struct): Add is_abs_literal field.
3379 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3380 (init_literal_value): New.
3381 (is_same_value): Replace with ...
3382 (literal_value_equal): ... this function. Add comparisons of
3383 virtual_offset and is_abs_literal fields.
3384 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3385 failure. Initialize has_last_loc field.
3386 (value_map_hash_table_delete): New.
3387 (hash_literal_value): Rename to ...
3388 (literal_value_hash): ... this. Include is_abs_literal flag and
3389 virtual_offset field in the hash value.
3390 (get_cached_value): Rename to ...
3391 (value_map_get_cached_value): ... this. Update calls to
3392 literal_value_hash and literal_value_equal.
3393 (add_value_map): Check for allocation failure. Update calls to
3394 value_map_get_cached_value and literal_value_hash.
3395 (text_action, text_action_list, text_action_t): New types.
3396 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3397 text_action_add, text_action_add_literal, offset_with_removed_text,
3398 offset_with_removed_text_before_fill, find_insn_action,
3399 print_action_list, print_removed_literals): New.
3400 (offset_with_removed_literals): Delete.
3401 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3402 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3403 allocated_relocs_count fields.
3404 (init_xtensa_relax_info): Initialize new fields.
3405 (reloc_bfd_fix struct): Add new translated field.
3406 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3407 translated field.
3408 (fix_compare, cache_fix_array): New.
3409 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3410 section via get_xtensa_relax_info. Use cache_fix_array to set up
3411 sorted fix_array and use bsearch instead of linear search.
3412 (section_cache_t): New struct.
3413 (init_section_cache, section_cache_section, clear_section_cache): New.
3414 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3415 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3416 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3417 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3418 New.
3419 (retrieve_contents): Use bfd_get_section_limit.
3420 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3421 to compute_removed_literals. Free value_map_hash_table when no longer
3422 needed.
3423 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3424 compute_text_actions for all sections.
3425 (find_relaxable_sections): Mark sections as relaxable if they contain
3426 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3427 call. Increment relax_info src_count field only for appropriate
3428 relocation types. Remove is_literal_section check.
3429 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3430 r_reloc_init and find_associated_l32r_irel. Check
3431 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3432 literals. Pass is_abs_literal flag to init_source_reloc.
3433 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3434 CONST16 instructions. Adjust calls to r_reloc_init and
3435 pcrel_reloc_fits. Handle weak symbols conservatively.
3436 (find_associated_l32r_irel): Add bfd parameter and pass it to
3437 is_l32r_relocation.
3438 (compute_text_actions, compute_ebb_proposed_actions,
3439 compute_ebb_actions, check_section_ebb_pcrels_fit,
3440 check_section_ebb_reduces, text_action_add_proposed,
3441 compute_fill_extra_space): New.
3442 (remove_literals): Replace with ...
3443 (compute_removed_literals): ... this function. Call
3444 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3445 Call xtensa_read_table_entries to get the property table. Skip
3446 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3447 is_removable_literal, remove_dead_literal, and
3448 identify_literal_placement functions.
3449 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3450 instead of linear search.
3451 (is_removable_literal, remove_dead_literal,
3452 identify_literal_placement): New.
3453 (relocations_reach): Update check for literal not referenced by any
3454 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3455 (coalesce_shared_literal, move_shared_literal): New.
3456 (relax_section): Use bfd_get_section_limit. Call
3457 translate_section_fixes. Update calls to r_reloc_init and
3458 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3459 Add call to pin_internal_relocs. Add special handling for
3460 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3461 info to calculate new addend_displacement variable. Replace code for
3462 deleting literals with more general code to perform the actions
3463 determined by the action_list for the section.
3464 (translate_section_fixes, translate_reloc_bfd_fix): New.
3465 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3466 find_removed_literal only if is_operand_relocation. Update call to
3467 offset_with_removed_text. Use new target_offset and removed_bytes
3468 variables.
3469 (move_literal): New.
3470 (relax_property_section): Use bfd_get_section_limit. Set new
3471 is_full_prop_section flag and handle new property tables. Update calls
3472 to r_reloc_init and offset_with_removed_text. Check
3473 is_relaxable_asm_section flag. Handle expansion of zero-sized
3474 unreachable entries, with use of offset_with_removed_text_before_fill.
3475 For relocatable links, combine entries only for literal tables.
3476 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3477 calls to offset_with_removed_text. Translate st_size field for
3478 function symbols.
3479 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3480 failure. Add contents parameter. Update call to get_bfd_fix. Update
3481 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3482 R_XTENSA_ASM_EXPAND relocs.
3483 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3484 call to get_bfd_fix. Include offset from contents for partial_inplace
3485 relocations.
3486 (is_reloc_sym_weak): New.
3487 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3488 (prop_sec_len): New.
3489 (xtensa_is_property_section): Handle new property sections.
3490 (is_literal_section): Delete.
3491 (internal_reloc_compare): When r_offset matches, compare r_info and
3492 r_addend to make sorting predictable.
3493 (internal_reloc_matches): New.
3494 (xtensa_get_property_section_name): Handle new property sections.
3495 (xtensa_get_property_predef_flags): New.
3496 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3497 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3498 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3499 (xtisa_errno, xtisa_error_msg): New variables.
3500 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3501 (xtensa_insnbuf_alloc): Add error handling.
3502 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3503 use xtensa_format_decode. Add error handling.
3504 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3505 instruction length to find the number of bytes to copy.
3506 (xtensa_isa_init): Add error handling. Replace calls to
3507 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3508 tables in the xtensa_modules structure.
3509 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3510 xtensa_extend_isa): Delete.
3511 (xtensa_isa_free): Change to only free lookup tables.
3512 (opname_lookup_compare): Replace with ...
3513 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
3514 (xtensa_insn_maxlength): Rename to ...
3515 (xtensa_isa_maxlength): ... this.
3516 (xtensa_insn_length): Delete.
3517 (xtensa_insn_length_from_first_byte): Replace with ...
3518 (xtensa_isa_length_from_chars): ... this function.
3519 (xtensa_num_opcodes): Rename to ...
3520 (xtensa_isa_num_opcodes): ... this.
3521 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3522 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3523 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3524 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3525 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3526 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3527 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3528 (xtensa_opcode_lookup): Add error handling.
3529 (xtensa_decode_insn): Replace with ...
3530 (xtensa_opcode_decode): ... this function, with new format and
3531 slot parameters. Add error handling.
3532 (xtensa_encode_insn): Replace with ...
3533 (xtensa_opcode_encode): ... this function, which does the encoding via
3534 one of the entries in the "encode_fns" array. Add error handling.
3535 (xtensa_opcode_name): Add error handling.
3536 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3537 xtensa_opcode_is_call): New.
3538 (xtensa_num_operands): Replace with ...
3539 (xtensa_opcode_num_operands): ... this function. Add error handling.
3540 (xtensa_opcode_num_stateOperands,
3541 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3542 xtensa_opcode_funcUnit_use, xtensa_operand_name,
3543 xtensa_operand_is_visible): New.
3544 (xtensa_get_operand, xtensa_operand_kind): Delete.
3545 (xtensa_operand_inout): Add error handling and special-case for
3546 "sout" operands.
3547 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3548 operate on one slot of an instruction. Added error handling.
3549 (xtensa_operand_encode): Handle default operands with no encoding
3550 functions. Check for success by comparing against decoded value.
3551 Add error handling.
3552 (xtensa_operand_decode): Handle default operands. Return decoded value
3553 through argument pointer. Add error handling.
3554 (xtensa_operand_is_register, xtensa_operand_regfile,
3555 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3556 (xtensa_operand_isPCRelative): Rename to ...
3557 (xtensa_operand_is_PCrelative): ... this. Add error handling.
3558 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3559 through argument pointer. Add error handling.
3560 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3561 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3562 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3563 xtensa_regfile_shortname, xtensa_regfile_view_parent,
3564 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3565 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3566 xtensa_state_is_exported, xtensa_sysreg_lookup,
3567 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3568 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3569 xtensa_interface_num_bits, xtensa_interface_inout,
3570 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3571 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3572 * xtensa-modules.c: Rewrite to use new data structures.
3573 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3574 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3575 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3576 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3577 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3578 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3579 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3580 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3581 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3582 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3583 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3584 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3585 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3586 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
3587 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
3588 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
3589 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
3590 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
3591 * Makefile.in: Regenerate.
3592 * bfd-in2.h: Likewise.
3593 * libbfd.h: Likewise.
3594
3595 2004-10-07 Richard Sandiford <rsandifo@redhat.com>
3596
3597 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
3598 against the absolute section.
3599 (mips_elf64_write_rela): Likewise.
3600
3601 2004-10-07 Jan Beulich <jbeulich@novell.com>
3602
3603 * elf.c (elf_find_function): Don't generally check for matching
3604 section, just for non-file symbols. Remove redunant comparison
3605 for the latter.
3606 * elf32-arm.h (arm_elf_find_function): Likewise.
3607
3608 2004-10-07 Jeff Baker <jbaker@qnx.com>
3609
3610 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
3611 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
3612 was specified.
3613
3614 2004-10-04 Roland McGrath <roland@redhat.com>
3615
3616 * hash.c (bfd_hash_set_default_size): Use const for table.
3617 Use size_t instead of int for variable compared to sizeof results.
3618
3619 2004-10-05 Alan Modra <amodra@bigpond.net.au>
3620
3621 PR 425
3622 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
3623
3624 2004-10-01 Paul Brook <paul@codesourcery.com>
3625
3626 * elf32-arm.h (elf32_arm_fake_sections,
3627 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
3628 functions.
3629 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
3630
3631 2004-10-01 Alan Modra <amodra@bigpond.net.au>
3632
3633 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
3634 need_lsda_relative.
3635 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
3636 need_relative or need_lsda_relative if we are processing an
3637 offset for a reloc on a FDE initial loc or LSDA field
3638 respectively.
3639 (_bfd_elf_write_section_eh_frame): Test need_relative and
3640 need_lsda_relative in place of corresponding make_* field
3641 when deciding to use pc-relative encodings.
3642
3643 2004-09-30 Paul Brook <paul@codesourcery.com>
3644
3645 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
3646 target2 relocation type.
3647
3648 2004-09-30 H.J. Lu <hongjiu.lu@intel.com>
3649
3650 PR 414
3651 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
3652
3653 2004-09-30 Paul Brook <paul@codesourcery.com>
3654
3655 * reloc.c: Add BFD_RELOC_ARM_SMI.
3656 * bfd-in2.h: Regenerate.
3657 * libbfd.h: Ditto.
3658
3659 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3660
3661 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
3662 vma and output offset to address.
3663 * simple.c (simple_save_output_info): Only set output section
3664 and offset for debug sections, or those not already set up by
3665 the linker.
3666 (bfd_simple_get_relocated_section_contents): Update comment.
3667
3668 2004-09-24 Alan Modra <amodra@bigpond.net.au>
3669
3670 * elf.c (IS_LOADED): Delete.
3671 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
3672 Restore SEC_HAS_CONTENTS test to the one place it was used prior
3673 to 2004-09-22.
3674
3675 2004-09-23 Alan Modra <amodra@bigpond.net.au>
3676
3677 PR gas/396
3678 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3679 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
3680 redundant assignment of EM_SPARC.
3681
3682 2004-09-22 Brian Ford <ford@vss.fsi.com>
3683
3684 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3685 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3686 constants.
3687 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3688
3689 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3690
3691 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3692 (elf_backend_modify_segment_map): Don't define.
3693
3694 2004-09-22 Alan Modra <amodra@bigpond.net.au>
3695
3696 * elf.c (IS_LOADED): Define.
3697 (assign_file_positions_for_segments): Don't round up file offset of
3698 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
3699 Delete code handling link script adjustment of lma. Do the adjust
3700 in later code handling similar ajustments. Remove dead code error
3701 check. Warn if section lma would require a negative offset
3702 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
3703 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
3704 update voff in section loop. Change voff in segment loop to be an
3705 adjustment on top of "off". Set sec->filepos and update "off" later.
3706 Test for loadable sections consistently using IS_LOADED. Similarly,
3707 test for alloc-only sections other than .tbss consistently.
3708 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
3709 Tidy PT_NOTE handling. Use %B and %A in error messages.
3710 (assign_file_positions_except_relocs): Use %B in error message.
3711
3712 2004-09-17 H.J. Lu <hongjiu.lu@intel.com>
3713
3714 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
3715 (CONFIG_STATUS_DEPENDENCIES): New.
3716 (Makefile): Removed.
3717 (config.status): Likewise.
3718 * Makefile.in: Regenerated.
3719
3720 2004-09-17 Paul Brook <paul@codesourcery.com>
3721
3722 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
3723 (bfd_elf32_arm_process_before_allocation): Update prototype.
3724 * bfd-in2.h: Regenerate.
3725 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
3726 (elf32_arm_link_hash_table_create): Set it.
3727 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
3728 (bfd_elf32_arm_set_target_relocs): New function.
3729 (arm_real_reloc_type): New function.
3730 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
3731 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
3732 (elf32_arm_gc_sweep_hook): Ditto.
3733 (elf32_arm_check_relocs): Ditto.
3734 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
3735 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
3736 R_ARM_GOT_TARGET2.
3737 (elf32_arm_got_prel): New variable.
3738 (elf32_arm_howto_from_type): New function.
3739 (elf32_arm_info_to_howto): Use it.
3740 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
3741 BFD_RELOC_ARM_TARGET2.
3742 * libbfd.h: Regenerate.
3743 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
3744
3745 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3746
3747 * ecoff.c: Update u.undef.next refs.
3748 * elf64-ppc.c: Likewise.
3749 * elflink.c: Likewise.
3750 * linker.c: Likewise.
3751 * xcofflink.c: Likewise.
3752
3753 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
3754 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
3755 fields to indirect struct.
3756 * elf-m10300.c: Update u.weakdef refs.
3757 * elf32-arm.h: Likewise.
3758 * elf32-cris.c: Likewise.
3759 * elf32-frv.c: Likewise.
3760 * elf32-hppa.c: Likewise.
3761 * elf32-i370.c: Likewise.
3762 * elf32-i386.c: Likewise.
3763 * elf32-m32r.c: Likewise.
3764 * elf32-m68k.c: Likewise.
3765 * elf32-ppc.c: Likewise.
3766 * elf32-s390.c: Likewise.
3767 * elf32-sh.c: Likewise.
3768 * elf32-sparc.c: Likewise.
3769 * elf32-vax.c: Likewise.
3770 * elf32-xtensa.c: Likewise.
3771 * elf64-alpha.c: Likewise.
3772 * elf64-hppa.c: Likewise.
3773 * elf64-ppc.c: Likewise.
3774 * elf64-s390.c: Likewise.
3775 * elf64-sh64.c: Likewise.
3776 * elf64-sparc.c: Likewise.
3777 * elf64-x86-64.c: Likewise.
3778 * elfxx-ia64.c: Likewise.
3779 * elfxx-mips.c: Likewise.
3780 * elflink.c: Likewise. Also u.elf_hash_value.
3781 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
3782 indirection.
3783 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3784 (bfd_elf_gc_record_vtinherit): Alloc vtable.
3785 (bfd_elf_gc_record_vtentry): Likewise.
3786 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
3787
3788 2004-09-17 Alan Modra <amodra@bigpond.net.au>
3789
3790 * Makefile.am: Run "make dep-am".
3791 * Makefile.in: Regenerate.
3792 * bfd-in2.h: Regenerate.
3793 * po/SRC-POTFILES.in: Regenerate.
3794 * po/bfd.pot: Regenerate.
3795
3796 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3797
3798 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
3799 with bitfields. Make "type" and "other" bitfields too.
3800 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
3801 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
3802 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
3803 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
3804 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
3805 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
3806 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
3807 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
3808 * elf-hppa.h: Update all uses of elf_link_hash_flags.
3809 * elf-m10300.c: Likewise.
3810 * elf.c: Likewise.
3811 * elf32-arm.h: Likewise.
3812 * elf32-cris.c: Likewise.
3813 * elf32-frv.c: Likewise.
3814 * elf32-hppa.c: Likewise.
3815 * elf32-i370.c: Likewise.
3816 * elf32-i386.c: Likewise.
3817 * elf32-m32r.c: Likewise.
3818 * elf32-m68k.c: Likewise.
3819 * elf32-ppc.c: Likewise.
3820 * elf32-s390.c: Likewise.
3821 * elf32-sh-symbian.c: Likewise.
3822 * elf32-sh.c: Likewise.
3823 * elf32-sh64.c: Likewise.
3824 * elf32-sparc.c: Likewise.
3825 * elf32-vax.c: Likewise.
3826 * elf32-xtensa.c: Likewise.
3827 * elf64-alpha.c: Likewise.
3828 * elf64-hppa.c: Likewise.
3829 * elf64-ppc.c: Likewise.
3830 * elf64-s390.c: Likewise.
3831 * elf64-sh64.c: Likewise.
3832 * elf64-sparc.c: Likewise.
3833 * elf64-x86-64.c: Likewise.
3834 * elflink.c: Likewise.
3835 * elfxx-ia64.c: Likewise.
3836 * elfxx-mips.c: Likewise.
3837 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
3838 * configure: Regenerate.
3839 * aclocal.m4: Regenerate.
3840
3841 2004-09-16 Alan Modra <amodra@bigpond.net.au>
3842
3843 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
3844 around uses of R_ARM_TARGET1.
3845 (elf32_arm_check_relocs): Likewise.
3846
3847 2004-09-13 Paul Brook <paul@codesourcery.com>
3848
3849 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3850 prototype.
3851 * bfd-in2.h: Regenerate.
3852 * libbfd.h: Regenerate.
3853 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
3854 (elf32_arm_link_hash_table_create): Set target1_is_rel.
3855 (bfd_elf32_arm_process_before_allocation): Ditto.
3856 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
3857 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
3858 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
3859 * reloc.c: Ditto.
3860
3861 2004-09-10 Joel Brobecker <brobecker@gnat.com>
3862
3863 * hpux-core.c (thread_section_p): New function.
3864 (hpux_core_core_file_p): Fix computation of offset in call
3865 to bfd_seek. Create a ".reg" section from an arbitrary
3866 ".reg/<id>" section if none was created after having read
3867 all sections.
3868
3869 2004-09-11 Andreas Schwab <schwab@suse.de>
3870
3871 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
3872 * aclocal.m4: Rebuild.
3873 * configure: Rebuild.
3874
3875 2004-09-10 Joel Brobecker <brobecker@gnat.com>
3876
3877 * section.c (bfd_sections_find_if): Fix parameter name in
3878 comment to match code.
3879
3880 2004-09-10 Alan Modra <amodra@bigpond.net.au>
3881
3882 * elf.c (assign_file_positions_except_relocs): Assign relocs
3883 stored in a bfd section.
3884
3885 2004-09-08 Hans-Peter Nilsson <hp@axis.com>
3886
3887 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
3888 h->gotplt_refcount to 0, not -1.
3889
3890 2004-09-07 Hans-Peter Nilsson <hp@axis.com>
3891
3892 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3893 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
3894 symname.
3895 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
3896 handle symbol visibility here.
3897
3898 2004-09-07 Alan Modra <amodra@bigpond.net.au>
3899
3900 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
3901 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
3902 callers.
3903 (ppc_stub_name): Remove trailing "+0" on stub name.
3904 (create_linkage_sections): Create relocations for
3905 branch lookup table when --emit-relocs as well as when --shared.
3906 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
3907 relbrlt test. For --emit-stub-syms, always output a sym even when
3908 one already exists on a plt call stub. Put stub type in the stub
3909 symbol name.
3910 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
3911 test.
3912 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
3913 reloc_count in stub sections. Adjust relbrlt test.
3914 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
3915 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
3916 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
3917 for relocs against discarded symbols. Fix comments.
3918
3919 2004-09-06 Mark Mitchell <mark@codesourcery.com>
3920
3921 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
3922 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
3923 from ...
3924 (map_sections_to_segments): ... here. Use it. Assign a file
3925 position to the .dynamic section if it is not loadable, but part
3926 of the PT_DYNAMIC segment.
3927 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3928 offsets, not VMAs, for the BPABI. Do not fill in the header in
3929 the .got.plt section for the BPABI.
3930 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
3931 PT_DYNAMIC segment.
3932 (elf_backend_want_got_plt): Define to zero for Symbian OS.
3933
3934 2004-09-06 Nick Clifton <nickc@redhat.com>
3935
3936 * elflink.c (elf_link_add_object_symbols): Set the error code to
3937 bfd_error_wrong_format when the input format does not match the
3938 output format.
3939
3940 2004-09-06 Alan Modra <amodra@bigpond.net.au>
3941
3942 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
3943 (ppc64_elf_check_directives): ..here.
3944 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
3945 before accessing ppc64_elf_tdata.
3946 (ppc64_elf_finish_dynamic_sections): And here too.
3947
3948 2004-09-04 Alan Modra <amodra@bigpond.net.au>
3949
3950 * bfd.c (_bfd_default_error_handler): Correct loop exit.
3951
3952 2004-09-03 Mark Mitchell <mark@codesourcery.com>
3953
3954 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
3955 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
3956 (bfd_elf32_littlearm_symbian_vec): Likewise.
3957 * configure: Regenerated.
3958 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
3959 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
3960 (PLT_ENTRY_SIZE): Likewise.
3961 (bfd_vma_elf32_arm_symbian_plt_entry): New
3962 variable.
3963 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
3964 and symbian_p.
3965 (create_got_section): Don't create sections when generating BPABI
3966 objects.
3967 (elf32_arm_create_dynamic_sections): Tidy.
3968 (elf32_arm_link_hash_table_create): Set plt_header_size,
3969 plt_entry_size, and symbian_p.
3970 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
3971 generating BPABI objects.
3972 (allocate_dynrelocs): Use htab->plt_header_size, not
3973 PLT_HEADER_SIZE. Do not add to .got.plt when
3974 generating BPABI objects.
3975 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
3976 * elfarm-nabi.c: Add SymbianOS target vectors.
3977 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
3978 (_bfd_elf_link_create_dynamic_sections): Likewise.
3979 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
3980 (elfNN_bed): Use it.
3981 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
3982 (bfd_elf32_littlearm_symbian_vec): Likewise.
3983 (_bfd_target_vector): Add them.
3984
3985 2004-09-03 Nick Clifton <nickc@redhat.com>
3986
3987 PR 360
3988 * coffcode.h (handle_COMDAT): Replace abort with an warning
3989 message and allow the scan to continue.
3990
3991 2004-09-02 Alan Modra <amodra@bigpond.net.au>
3992
3993 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
3994 in when reading relocs, not our sorted syms. Remove unnecessary
3995 var.
3996
3997 2004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
3998
3999 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4000
4001 2004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4002
4003 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4004 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4005 replace uses of *_alias with *_noncanonical.
4006 * aclocal.m4: Rebuild with aclocal 1.4p6.
4007 * Makefile.in: Rebuild with automake 1.4p6.
4008 * doc/Makefile.in: Rebuild with automake 1.4p6.
4009 * configure.in: Autoupdate with autoupdate 2.59.
4010 * config.in: Regenerate with autoheader 2.59.
4011 * configure: Regnerate with autoconf 2.59.
4012
4013 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4014
4015 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4016 symbol pointer arrays before modifying.
4017
4018 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4019
4020 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
4021 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4022 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4023 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
4024 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4025 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4026 Use both symbol tables on non-relocatable objects. Use a common
4027 error exit. Fix "mid" warning.
4028 * libbfd.h: Regenerate.
4029 * bfd-in2.h: Regenerate.
4030
4031 2004-08-28 Alan Modra <amodra@bigpond.net.au>
4032
4033 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4034 object file.
4035 (struct sfpr_def_parms): Save some space.
4036 (sfpr_define): Here too.
4037
4038 * elf64-ppc.c (compare_symbols): Put section syms first.
4039 (sym_exists_at): New function.
4040 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4041 points only for relocatable files. Use .opd section contents
4042 otherwise. Generally clean up the code.
4043
4044 2004-08-27 Alan Modra <amodra@bigpond.net.au>
4045
4046 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4047 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4048 (struct sfpr_def_parms): New.
4049 (sfpr_define): New function.
4050 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4051 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4052 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4053 (savefpr1_tail, restfpr1_tail): New functions.
4054 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4055 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4056 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4057 code. Define all ABI mandated _save and _rest functions.
4058
4059 2004-08-26 Paul Brook <paul@codesourcery.com>
4060
4061 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
4062
4063 2004-08-26 Alan Modra <amodra@bigpond.net.au>
4064
4065 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4066 TRUE or FALSE.
4067
4068 2004-08-26 Alan Modra <amodra@bigpond.net.au>
4069
4070 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4071 that pcrel correction is applied for R_386_PC32.
4072
4073 2004-08-25 Alan Modra <amodra@bigpond.net.au>
4074
4075 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4076 for R_386_32 and R_386_PC32 relocs against symbols defined in
4077 discarded sections.
4078
4079 2004-08-25 Dmitry Diky <diwil@spec.ru>
4080
4081 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4082 Add new relocations.
4083 * bfd-in2.h: Regenerate.
4084 * libbfd.h: Regenerate.
4085 * elf32-msp430.c: Clean-up code.
4086 (elf_msp430_howto_table): Add new relocation entries.
4087 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4088 (msp430_elf_relax_section): New function.
4089 (msp430_elf_relax_delete_bytes): New function.
4090 (msp430_elf_symbol_address_p): New function.
4091
4092 2004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4093
4094 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4095 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4096
4097 2004-08-20 Daniel Jacobowitz <dan@debian.org>
4098
4099 * elflink.c (_bfd_elf_section_already_linked): Handle
4100 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4101
4102 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4103
4104 * config.bfd (arm*-*-symbianelf*): New target.
4105 (arm*-*-eabi*): Likewise.
4106
4107 2004-08-19 Alan Modra <amodra@bigpond.net.au>
4108
4109 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4110 "struct ppc_link_hash_entry *".
4111 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4112 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4113
4114 2004-08-19 Jakub Jelinek <jakub@redhat.com>
4115
4116 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4117 entries (where fd_aux overlaps next entry's fd_func).
4118 Add non_overlapping argument, use it.
4119 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4120 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4121 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4122 as indexes into opd_sym_map/opd_adjust array.
4123 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4124
4125 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4126
4127 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4128 if we can look up their function descriptor in a regular file.
4129
4130 2004-08-18 Nick Clifton <nickc@redhat.com>
4131
4132 PR 324
4133 * cofflink.c (coff_link_add_symbols): Check that the comdat
4134 pointer in the coff_section_data structure has been initialised
4135 before using it.
4136
4137 2004-08-18 Alan Modra <amodra@bigpond.net.au>
4138
4139 PR 338
4140 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4141 changing bfd_link_hash_undefined to bfd_link_hash_new.
4142
4143 2004-08-17 Jakub Jelinek <jakub@redhat.com>
4144
4145 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4146 if not yet defined.
4147 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4148 (synthetic_opd, synthetic_relocatable): New variables.
4149 (compare_symbols, compare_relocs): New helper routines.
4150 (ppc64_elf_get_synthetic_symtab): New function.
4151 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4152 to relsyms.
4153 * bfd-in2.h: Regenerated.
4154 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4155 to relsyms. Return 0 if abfd is relocatable.
4156
4157 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4158
4159 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4160
4161 2004-08-17 Nick Clifton <nickc@redhat.com>
4162
4163 * (is_arm_mapping_symbol_name): New function - return true
4164 when a symbol name matches the requirements for an ARM mapping
4165 symbol name.
4166 (arm_elf_find_function): New function based on
4167 elf_find_function in elf.c but skipping ARM mapping symbols
4168 and including thumb function symbols.
4169 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4170 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4171
4172 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4173
4174 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4175 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4176 (ppc64_elf_brtaken_reloc): Here too.
4177
4178 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4179
4180 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4181 symbol visibility.
4182 (ppc64_elf_check_directives): Check that we have the right hash
4183 table before proceeding.
4184
4185 2004-08-17 Alan Modra <amodra@bigpond.net.au>
4186
4187 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4188 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4189 the sections that will be discarded.
4190
4191 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4192
4193 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4194
4195 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4196
4197 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4198 free space available.
4199
4200 2004-08-16 Alan Modra <amodra@bigpond.net.au>
4201
4202 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
4203 occurrences with bfd_byte * thoughout file.
4204
4205 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4206 (xcoff_write_armap_big): Likewise.
4207 (xcoff_write_archive_contents_old): Likewise.
4208 (xcoff_write_archive_contents_big): Likewise.
4209
4210 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4211
4212 2004-08-13 Nick Clifton <nickc@redhat.com>
4213
4214 * elf32-arm.h: Convert to ISO C90.
4215
4216 2004-08-13 Alan Modra <amodra@bigpond.net.au>
4217
4218 PR 293
4219 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4220 zero the plt field.
4221
4222 2004-08-13 Alan Modra <amodra@bigpond.net.au>
4223
4224 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4225 (bfd_archive_filename, bfd_get_section_ident): Delete.
4226 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4227 bfd_archive_filename.
4228 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4229 to warn about symbols in discarded sections. Use _bfd_error_handler.
4230 * aout-adobe.c (aout_adobe_callback): See below.
4231 * aout-cris.c (swap_ext_reloc_in): ..
4232 * coff-arm.c (find_thumb_glue, find_arm_glue,
4233 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4234 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4235 coff_arm_copy_private_bfd_data): ..
4236 * coff-i860.c (i860_reloc_processing): ..
4237 * coff-mcore.c (mcore_coff_unsupported_reloc,
4238 coff_mcore_relocate_section): ..
4239 * coff-ppc.c (coff_ppc_relocate_section): ..
4240 * coff-rs6000.c (xcoff_create_csect_from_smclas
4241 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4242 sh_swap_insns, sh_relocate_section): ..
4243 * coff-tic54x.c (tic54x_reloc_processing): ..
4244 * coff-tic80.c (coff_tic80_relocate_section): ..
4245 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4246 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4247 coff_slurp_symbol_table, coff_classify_symbol,
4248 coff_slurp_reloc_table): ..
4249 * coffgen.c (_bfd_coff_read_string_table): ..
4250 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4251 _bfd_coff_generic_relocate_section): ..
4252 * cpu-arm.c (bfd_arm_merge_machines): ..
4253 * cpu-sh.c (sh_merge_bfd_arch): ..
4254 * elf-hppa.h (elf_hppa_relocate_section): ..
4255 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4256 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4257 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4258 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4259 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4260 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4261 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4262 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4263 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4264 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4265 cris_elf_merge_private_bfd_data
4266 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4267 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4268 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4269 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4270 elf32_hppa_relocate_section): ..
4271 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4272 i370_elf_check_relocs, i370_elf_relocate_section): ..
4273 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4274 elf_i386_relocate_section): ..
4275 * elf32-m32r.c (m32r_elf_relocate_section,
4276 m32r_elf_merge_private_bfd_data): ..
4277 * elf32-m68hc1x.c (m68hc12_add_stub,
4278 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4279 * elf32-m68k.c (elf_m68k_relocate_section): ..
4280 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4281 mcore_elf_relocate_section): ..
4282 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4283 ppc_elf_check_relocs, ppc_elf_relocate_section,
4284 ppc_elf_begin_write_processing): ..
4285 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4286 elf_s390_relocate_section): ..
4287 * elf32-sh-symbian.c (sh_symbian_import_as,
4288 sh_symbian_process_embedded_commands,
4289 sh_symbian_relocate_section): ..
4290 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4291 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4292 sh_elf_merge_private_data): ..
4293 * elf32-sparc.c (elf32_sparc_check_relocs,
4294 elf32_sparc_relocate_section,
4295 elf32_sparc_merge_private_bfd_data): ..
4296 * elf32-v850.c (v850_elf_check_relocs,
4297 v850_elf_merge_private_bfd_data): ..
4298 * elf32-xtensa.c (elf_xtensa_check_relocs,
4299 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4300 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4301 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4302 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4303 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4304 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4305 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4306 ppc64_elf_relocate_section): ..
4307 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4308 elf_s390_relocate_section): ..
4309 * elf64-sh64.c (sh_elf64_relocate_section): ..
4310 * elf64-sparc.c (sparc64_elf_check_relocs,
4311 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4312 sparc64_elf_merge_private_bfd_data): ..
4313 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4314 elf64_x86_64_relocate_section): ..
4315 * elflink.c (_bfd_elf_add_default_symbol,
4316 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4317 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4318 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4319 elf_get_linked_section_vma, elf_fixup_link_order,
4320 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4321 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4322 * elfxx-ia64.c (elfNN_ia64_relax_section,
4323 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4324 * elfxx-mips.c (mips_elf_perform_relocation,
4325 _bfd_mips_elf_check_relocs,
4326 _bfd_mips_elf_merge_private_bfd_data): ..
4327 * ieee.c (ieee_slurp_external_symbols): ..
4328 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4329 * libbfd.c (_bfd_generic_verify_endian_match): ..
4330 * linker.c (_bfd_generic_link_add_one_symbol,
4331 _bfd_generic_section_already_linked): ..
4332 * pdp11.c (translate_to_native_sym_flags): ..
4333 * pe-mips.c (coff_pe_mips_relocate_section): ..
4334 * peicode.h (pe_ILF_build_a_bfd): ..
4335 * srec.c (srec_bad_byte): ..
4336 * stabs.c (_bfd_link_section_stabs): ..
4337 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4338 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4339 with corresponding %B and %A in _bfd_error_handler format string.
4340 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4341 calls to use %A and %B. Fix "against symbol .. from section" and
4342 similar error messages. Combine multiple _bfd_error_handler calls
4343 where they were separated due to bfd_archive_filename deficiencies.
4344 * bfd-in2.h: Regenerate.
4345
4346 2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4347
4348 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4349 relocation.
4350
4351 2004-08-10 Alan Modra <amodra@bigpond.net.au>
4352
4353 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4354 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4355 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4356 Add twiddled_syms.
4357 (link_hash_newfunc): Init was_undefined.
4358 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4359 Use undefweak instead.
4360 (ppc64_elf_check_directives): Fix undefs chain.
4361 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4362 references.
4363 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4364 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4365 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4366
4367 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4368
4369 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4370 error, test input_section flags rather than sec.
4371
4372 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4373
4374 * elf-bfd.h (struct elf_backend_data): Add
4375 elf_backend_archive_symbol_lookup.
4376 (_bfd_elf_archive_symbol_lookup): Declare.
4377 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4378 (elf_link_add_archive_symbols): ..extracted from here. Call the
4379 backend version.
4380 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4381 (elfNN_bed): Init new field.
4382 * elf64-ppc.c (elf_backend_check_directives): Define.
4383 (elf_backend_archive_symbol_lookup): Define.
4384 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4385 a ppc_link_hash_entry pointer.
4386 (get_fdh): Move.
4387 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4388 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4389 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4390 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4391 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4392 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4393 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4394 descriptor symbols.
4395
4396 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4397
4398 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4399 (ppc64_elf_add_symbol_hook): Test for NULL section.
4400 (get_sym_h): Formatting.
4401 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4402 stub target_value.
4403
4404 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4405 long branch stubs with code handling plt and r2off branch stubs.
4406
4407 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4408
4409 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4410 * elflink.c (elf_link_input_bfd): Formatting.
4411 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4412 all callers.
4413 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4414 (link_hash_newfunc): Don't set it.
4415 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4416 (ppc64_elf_mark_entry_syms): Delete.
4417 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4418 sections. Use get_opd_info.
4419 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4420
4421 2004-08-09 Alan Modra <amodra@bigpond.net.au>
4422
4423 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4424
4425 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4426 (func_desc_adjust): Don't set have_undefweak.
4427 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4428 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4429
4430 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4431 "struct ppc_link_hash_entry *". Adjust all references.
4432 (ppc64_elf_hide_symbol): Correct a comment.
4433
4434 * elf64-ppc.c (get_opd_info): New function.
4435 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4436 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4437 before calling get_fdh. Test fdh rather than h before dereferencing
4438 fdh. Mark removed symbols in opd_adjust.
4439 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4440 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4441 opd symbols.
4442 (ppc64_elf_output_symbol_hook): Likewise.
4443
4444 2004-08-06 Paul Brook <paul@codesourcery.com>
4445
4446 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4447 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4448 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4449 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4450 and BFD_RELOC_ARM_SBREL32.
4451 * bfd-in2.h, bbfd.h: Regenerate.
4452
4453 2004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4454
4455 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4456 the dynamic link symbol actually in use.
4457
4458 2004-08-01 Stephane Carrez <stcarrez@nerim.fr>
4459
4460 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4461
4462 2004-07-31 Joel Brobecker <brobecker@gnat.com>
4463 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4464
4465 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4466 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4467
4468 2004-07-30 H.J. Lu <hongjiu.lu@intel.com>
4469 Nick Clifton <nickc@redhat.com>
4470
4471 PR 290
4472 * bfd.c (_bfd_default_error_handler): Make it global.
4473
4474 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4475
4476 * elf.c (assign_section_numbers): Cope gracefully with sections
4477 which have SHF_LINK_ORDER set but no sh_link set up.
4478 * elflink.c (elf_get_linked_section_vma): Likewise.
4479
4480 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4481 it to NULL.
4482
4483 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4484 Set it to _bfd_default_error_handler.
4485 (elfNN_bed): Add elf_backend_link_order_error_handler.
4486
4487 * libbfd-in.h (_bfd_default_error_handler): New.
4488
4489 * libbfd.h: Regenerated.
4490
4491 2004-07-30 Jakub Jelinek <jakub@redhat.com>
4492
4493 * archures.c (bfd_mach_sparc_64bit_p): Define.
4494 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4495 * bfd-in2.h: Rebuilt.
4496
4497 2004-07-29 Alexandre Oliva <aoliva@redhat.com>
4498
4499 Introduce SH2a support.
4500 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4501 * archures.c (bfd_mach_sh2a_nofpu): New.
4502 * bfd-in2.h: Rebuilt.
4503 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4504 (arch_info_struct): Add sh2a_nofpu.
4505 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4506 2003-12-29 DJ Delorie <dj@redhat.com>
4507 * reloc.c: Add relocs for sh2a.
4508 * bfd-in2.h: Regenerate.
4509 * libbfd.hh: Regenerate.
4510 2003-12-01 Michael Snyder <msnyder@redhat.com>
4511 * archures.c (bfd_mach_sh2a): New.
4512 * bfd-in2.h: Rebuilt.
4513 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4514 (SH2A_NEXT): New.
4515 (arch_info_struct): Add sh2a.
4516 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4517
4518 2004-07-28 Nick Clifton <nickc@redhat.com>
4519 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4520
4521 PR 273
4522 * som.c (setup_sections): Improve estimation of space sizes in
4523 relocatable objects.
4524
4525 2004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
4526 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4527 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
4528 to targ_selvecs.
4529 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4530 * configure: Regenerate.
4531 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4532 case that accepts OSABI=NetBSD and OSABI=SysV.
4533 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4534 the base of .got or .data (if .got does not exist).
4535 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4536 set OSABI=NetBSD.
4537 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4538 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4539 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4540 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4541
4542 2004-07-27 H.J. Lu <hongjiu.lu@intel.com>
4543
4544 PR 161/251
4545 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4546 (elf_sec_group): Defined.
4547 (bfd_elf_match_symbols_in_sections): New prototype.
4548 (_bfd_elf_setup_group_pointers): Likewise.
4549
4550 * elf.c (bfd_elf_discard_group): Abort.
4551 (bfd_elf_set_group_contents): Also include relocation sections.
4552 Remove zero-fill for ld -r.
4553 (_bfd_elf_setup_group_pointers): New function.
4554 (elf_sort_elf_symbol): Likewise.
4555 (elf_sym_name_compare): Likewise.
4556 (bfd_elf_match_symbols_in_sections): Likewise.
4557
4558 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4559
4560 * elflink.c (match_group_member): New.
4561 (elf_link_input_bfd): Check group member for discarded section.
4562 (try_match_symbols_in_sections): New function.
4563 (already_linked): Likewise.
4564 (_bfd_elf_section_already_linked): Support mixing comdat group
4565 and linkonce section.
4566
4567 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4568 * linker.c (bfd_section_already_linked_table_traverse): New.
4569
4570 * libbfd.h: Regenerated.
4571
4572 2004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
4573
4574 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4575 BFD_RELOC_CRX_SWITCH32.
4576 * bfd-in2.h: Regenerate.
4577 * libbfd.h: Regenerate.
4578 * elf32-crx.c: Support relocation/relaxation of
4579 BFD_RELOC_CRX_SWITCH* types.
4580
4581 2004-07-27 Alan Modra <amodra@bigpond.net.au>
4582
4583 * elf64-ppc.c: Correct "Linker stubs" comment.
4584
4585 2004-07-26 H.J. Lu <hongjiu.lu@intel.com>
4586
4587 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
4588 linked-to section.
4589 (elf_linked_to_section): New.
4590
4591 * elf.c (assign_section_numbers): Set up sh_link for
4592 SHF_LINK_ORDER.
4593
4594 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
4595 to sh_link for SHT_IA_64_UNWIND sections.
4596
4597 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4598
4599 * elflink.c (elf_fixup_link_order): Add _() to error message.
4600
4601 2004-07-22 H.J. Lu <hongjiu.lu@intel.com>
4602
4603 * elflink.c (elf_fixup_link_order): Issue a warning and flag
4604 an error if failed.
4605
4606 2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
4607
4608 * aout-adobe.c (aout_32_section_already_linked): Defined.
4609 * aout-target.h (MY_section_already_linked): Likewise.
4610 * aout-tic30.c (MY_section_already_linked): Likewise.
4611 * binary.c (binary_section_already_linked): Likewise.
4612 * bout.c (b_out_section_already_linked): Likewise.
4613 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
4614 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
4615 * coffcode.h (coff_section_already_linked): Likewise.
4616 * i386msdos.c (msdos_section_already_linked): Likewise.
4617 * i386os9k.c (os9k_section_already_linked): Likewise.
4618 * ieee.c (ieee_section_already_linked): Likewise.
4619 * ihex.c (ihex_section_already_linked): Likewise.
4620 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
4621 * mmo.c (mmo_section_already_linked): Likewise.
4622 * nlm-target.h (nlm_section_already_linked): Likewise.
4623 * oasys.c (oasys_section_already_linked): Likewise.
4624 * pef.c (bfd_pef_section_already_linked): Likewise.
4625 * ppcboot.c (ppcboot_section_already_linked): Likewise.
4626 * som.c (som_bfd_discard_group): Likewise.
4627 * srec.c (srec_section_already_linked): Likewise.
4628 * tekhex.c (tekhex_section_already_linked): Likewise.
4629 * versados.c (versados_section_already_linked): Likewise.
4630 * vms.c (vms_section_already_linked): Likewise.
4631 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
4632 * xsym.c (bfd_sym_section_already_linked): Likewise.
4633
4634 * bfd-in.h (bfd_section_already_linked_table_init): New.
4635 (bfd_section_already_linked_table_free): Likewise.
4636
4637 * coff-rs6000.c (rs6000coff_vec): Add
4638 _bfd_generic_section_already_linked.
4639 (pmac_xcoff_vec): Likewise.
4640 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4641 (aix5coff64_vec): Likewise.
4642
4643 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
4644 * elflink.c (_bfd_elf_section_already_linked): New function.
4645
4646 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
4647
4648 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
4649 (_bfd_generic_section_already_linked): New.
4650 (bfd_section_already_linked_hash_entry): Likewise.
4651 (bfd_section_already_linked): Likewise.
4652 (bfd_section_already_linked_table_lookup): Likewise.
4653 (bfd_section_already_linked_table_insert): Likewise.
4654
4655 * linker.c (bfd_section_already_linked): New.
4656 (_bfd_section_already_linked_table): Likewise.
4657 (bfd_section_already_linked_table_lookup): Likewise.
4658 (bfd_section_already_linked_table_insert): Likewise.
4659 (already_linked_newfunc): Likewise.
4660 (bfd_section_already_linked_table_init): Likewise.
4661 (bfd_section_already_linked_table_free): Likewise.
4662 (_bfd_generic_section_already_linked): Likewise.
4663
4664 * section.c (bfd_section): Remove comdat.
4665 (bfd_comdat_info): Moved to ...
4666 * bfd-in.h (coff_comdat_info): Here.
4667 (bfd_coff_get_comdat_section): New.
4668 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
4669 * libcoff-in.h (coff_section_tdata): Add comdat.
4670 * coffcode.h (handle_COMDAT): Updated.
4671 * cofflink.c (coff_link_add_symbols): Likewise.
4672 * ecoff.c (bfd_debug_section): Likewise.
4673
4674 * targets.c (bfd_target): Add _section_already_linked.
4675 (BFD_JUMP_TABLE_LINK): Updated.
4676
4677 * bfd-in2.h: Regenerated.
4678 * libbfd.h: Likewise.
4679 * libcoff.h: Likewise.
4680
4681 2003-07-21 Paul Brook <paul@codesourcery.com>
4682
4683 * elflink.c (elf_get_linked_section_vma, compare_link_order,
4684 elf_fixup_link_order): New functions.
4685 (bfd_elf_final_link): Call elf_fixup_link_order.
4686
4687 2004-07-21 Alexandre Oliva <aoliva@redhat.com>
4688
4689 * elf-bfd.h (ELF_COMMON_DEF_P): New.
4690 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4691 common definitions.
4692 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4693 _bfd_elf_symbol_refs_local_p.
4694 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4695 symbols.
4696
4697 2004-07-19 H.J. Lu <hongjiu.lu@intel.com>
4698
4699 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
4700 DYN_NO_NEEDED.
4701 (bfd_elf_get_dyn_lib_class): New prototype.
4702 * elf.c (bfd_elf_get_dyn_lib_class): New function.
4703
4704 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
4705 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
4706 entry is needed. Issue an error if a DT_NEEDED entry is needed
4707 for a file marked DYN_NO_NEEDED.
4708 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
4709 for DT_NEEDED tags.
4710
4711 * bfd-in2.h: Regenerated.
4712
4713 2004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4714
4715 * elflink.c (elf_section_complain_discarded): Don't complain in
4716 .PARISC.unwind.
4717
4718 2004-07-10 James E Wilson <wilson@specifixinc.com>
4719
4720 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
4721 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
4722 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
4723 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
4724 Fix callers.
4725 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
4726 bfd_put_64 to bfd_putl64.
4727 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
4728
4729 2004-07-09 H.J. Lu <hongjiu.lu@intel.com>
4730
4731 PR 240
4732 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
4733 .init/.fini sections when trying to relax it.
4734
4735 2004-07-09 Jie Zhang <zhangjie@magima.com.cn>
4736
4737 * elf.c (assign_file_positions_for_segments): Make sure the
4738 .dynamic section is the first section in the PT_DYNAMIC segment.
4739
4740 2004-07-09 Nick Clifton <nickc@redhat.com>
4741
4742 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
4743 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
4744 sh_elf_get_flags_from_mach functions so that they do not conflict
4745 when this target is built with other sh-elf targets.
4746 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
4747 suppression of this function.
4748 (sh_elf_find_flags): Likewise.
4749
4750 2004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
4751
4752 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
4753 (ALL_MACHINES_CFILES): Add cpu-crx.c.
4754 (BFD32_BACKENDS): Add elf32-crx.lo.
4755 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
4756 (cpu-crx.lo): New target.
4757 (elf32-crx.lo): New target.
4758 * Makefile.in: Regenerate.
4759 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
4760 (bfd_archures_list): Add bfd_crx_arch.
4761 * bfd-in2.h: Regenerate.
4762 * config.bfd: Handle crx-*-elf*, crx*.
4763 * configure.in: Handle bfd_elf32_crx_vec.
4764 * configure: Regenerate.
4765 * cpu-crx.c: New file.
4766 * elf32-crx.c: Likewise.
4767 * libbfd.h: Regenerate.
4768 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
4769 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
4770 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
4771 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
4772 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
4773 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
4774 * targets.c (bfd_elf32_crx_vec): Declare.
4775 (bfd_target_vector): Add bfd_elf32_crx_vec.
4776
4777 2004-07-06 Nick Clifton <nickc@redhat.com>
4778
4779 * config.bfd: Add sh-symbian-elf target.
4780 * configure.in: Add bfd_elf32_shl_symbian_vec.
4781 * configure: Regenerate.
4782 * elf-bfd.h (struct elf_backend_data): Add new field
4783 'check_directives'.
4784 * elflink.c (elf_link_add_object_symbols): Invoke the
4785 check_directives function, if defined.
4786 * elfxx-target.h: Provide a default, NULL definition for
4787 check_directives.
4788 * targets.c: Add bfd_elf32_shl_symbian_vec.
4789 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
4790 definition.
4791 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
4792 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
4793 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
4794 not already been defined.
4795 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
4796 * sh-symbian.c: New file. Provide functions to support the
4797 * sh-symbian-elf target.
4798 * Makefile.am: Add elf32-sh-symbian.c
4799 * Makefile.in: Regenerate.
4800
4801 2004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
4802
4803 * elf32-sh.c: Include ../opcodes/sh-opc.h.
4804 * Makefile.am: Ran make dep-am.
4805 * Makefile.in: Ran make dep-in.
4806
4807 2004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4808
4809 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
4810 externals properly.
4811
4812 2004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4813
4814 * config.bfd: Add want64 to configuration target s390-*-linux*.
4815
4816 2004-07-01 H.J. Lu <hongjiu.lu@intel.com>
4817
4818 * bfd.c (bfd_get_section_ident): New.
4819
4820 * elflink.c (elf_link_read_relocs_from_section): Call
4821 bfd_get_section_ident to identify the section when reporting
4822 error.
4823 (_bfd_elf_link_output_relocs): Likewise.
4824 (elf_link_output_extsym): Likewise.
4825 (elf_link_input_bfd): Likewise.
4826 (bfd_elf_gc_record_vtinherit): Likewise.
4827
4828 * bfd-in2.h: Regenerated.
4829
4830 2004-07-01 Jie Zhang <zhangjie@magima.com.cn>
4831 Nick Clifton <nickc@redhat.com>
4832
4833 PR 204
4834 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
4835 of section symbols to mips_elf_sort_hash_table ().
4836
4837 2004-07-01 Alan Modra <amodra@bigpond.net.au>
4838
4839 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
4840 change. Comment.
4841 (elf_section_complain_discarded): New function. Handle
4842 .gcc_except_table too.
4843 (elf_link_input_bfd): Rewrite handling of relocs against symbols
4844 in discarded sections.
4845 * elf-bfd.h (elf_discarded_section): Protect macro arg.
4846
4847 2004-06-30 James E Wilson <wilson@specifixinc.com>
4848
4849 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
4850 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
4851
4852 2004-06-30 H.J. Lu <hongjiu.lu@intel.com>
4853
4854 PR 233
4855 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
4856 local references to discarded sections and report their
4857 locations.
4858
4859 2004-06-30 Alan Modra <amodra@bigpond.net.au>
4860
4861 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
4862 sec_info_type, test section name instead.
4863
4864 2004-06-29 H.J. Lu <hongjiu.lu@intel.com>
4865
4866 PR 240
4867 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
4868 in .init/.fini sections.
4869
4870 2004-06-29 Bob Wilson <bob.wilson@acm.org>
4871
4872 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
4873 bfd_get_section_limit.
4874
4875 2004-06-29 Bob Wilson <bob.wilson@acm.org>
4876
4877 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
4878 output section size.
4879
4880 2004-06-29 Alan Modra <amodra@bigpond.net.au>
4881
4882 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
4883 rawsize.
4884 (mmix_elf_perform_relocation): Adjust for above change.
4885 (mmix_elf_relocate_section): Likewise.
4886 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
4887 (mmix_elf_get_section_contents): Delete.
4888 (bfd_elf64_get_section_contents): Delete.
4889 (mmix_elf_relocate_section): Zero stub area.
4890 * linker.c (default_indirect_link_order): Alloc max of section size
4891 and rawsize.
4892 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
4893 * section.c (bfd_malloc_and_get_section): Likewise.
4894 (struct bfd_section): Update rawsize comment.
4895 * bfd-in2.h: Regenerate.
4896
4897 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
4898
4899 2004-06-29 Alan Modra <amodra@bigpond.net.au>
4900
4901 * bfd-in.h (bfd_get_section_limit): Define.
4902 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
4903 (_bfd_final_link_relocate): Use bfd_get_section_limit.
4904 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
4905 * coff-arm.c (coff_arm_relocate_section): Likewise.
4906 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
4907 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
4908 (bfd_ns32k_final_link_relocate): Likewise.
4909 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
4910 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
4911 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
4912 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
4913 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
4914 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
4915 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
4916 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4917 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
4918 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
4919 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
4920 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
4921 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
4922 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
4923 * elf32-v850.c (v850_elf_reloc): Likewise.
4924 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
4925 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
4926 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
4927 * elf64-mips.c (mips_elf64_gprel32_reloc)
4928 (mips16_gprel_reloc): Likewise.
4929 * elf64-mmix.c (mmix_elf_reloc): Likewise.
4930 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
4931 * elf64-sparc.c (init_insn_reloc): Likewise.
4932 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4933 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
4934 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
4935 (_bfd_mips_elf_generic_reloc): Likewise.
4936 * bfd-in2.h: Regenerate.
4937
4938 2004-06-28 Alan Modra <amodra@bigpond.net.au>
4939
4940 * bfd-in.h (struct stab_info): Move from stabs.c.
4941 * stabs.c (struct stab_link_includes_table): Delete.
4942 (stab_link_includes_lookup): Delete.
4943 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
4944 level of indirection from sinfo parm.
4945 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
4946 stabstr section. Adjust hash table accesses.
4947 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
4948 alloc. Adjust stab_info test.
4949 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
4950 (_bfd_coff_final_link): Adjust stab_info test.
4951 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
4952 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
4953 in place.
4954 * libcoff-in.h (struct coff_link_hash_table): Likewise.
4955 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
4956 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
4957 stabstr section. Adjust stab_info test.
4958 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
4959 (_bfd_write_stab_strings): Adjust prototypes.
4960 * libbfd.h: Regenerate.
4961 * libcoff.h: Regenerate.
4962 * bfd-in2.h: Regenerate.
4963
4964 2004-06-27 Mark Kettenis <kettenis@gnu.org>
4965
4966 From Miod Vallat <miod@online.fr>:
4967 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
4968
4969 2004-06-26 Alexandre Oliva <aoliva@redhat.com>
4970
4971 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
4972 (struct elf32_mn10300_link_hash_entry): Remove
4973 pcrel_relocs_copied.
4974 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
4975 R_MN10300_32. Don't adjust pcrel_relocs_copied.
4976 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
4977 and gotoff relocations if the symbol doesn't bind locally. Use
4978 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
4979 relocation for PCREL32.
4980 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
4981 to test whether a symbol binds locally.
4982 (elf32_mn10300_link_hash_newfunc): Don't initialize
4983 pcrel_relocs_copied.
4984 (_bfd_mn10300_elf_discard_copies): Delete.
4985 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
4986
4987 2004-06-26 Mark Kettenis <kettenis@gnu.org>
4988
4989 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
4990
4991 2004-06-25 Joel Brobecker <brobecker@gnat.com>
4992
4993 * som.c (som_set_reloc_info): Correct small typo.
4994
4995 2004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4996
4997 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
4998 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
4999 (m32r_elf_gcsweep_hook): Likewise.
5000 (m32r_elf_check_relocs): Likewise.
5001 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5002 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5003 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5004 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
5005 * bfd-in2.h: Regenerated.
5006 * libbfd.h: Regenerated.
5007
5008 2004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5009
5010 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5011 relocation symbol.
5012 (elf64_x86_64_relocate_section): Issue an error for
5013 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5014 against global symbols when building shared library.
5015
5016 2004-06-24 Alan Modra <amodra@bigpond.net.au>
5017
5018 * section.c (struct sec): Rename "_cooked_size" to "size".
5019 Rename "_raw_size" to "rawsize".
5020 (STD_SECTION): Adjust comments.
5021 (bfd_set_section_size, bfd_get_section_contents): Use size.
5022 (bfd_malloc_and_get_section): New function.
5023 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5024 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5025 Correctly free reloc and contents memory.
5026 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5027 and fake CIE now that we can shink section size to zero.
5028 (_bfd_elf_write_section_eh_frame): Likewise..
5029 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5030 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5031 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5032 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5033 unneeded indirection.
5034 * elf.c (_bfd_elf_section_offset): .. and update call.
5035 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5036 * libbfd.h: Regenerate.
5037 * bfd-in2.h: Regenerate.
5038
5039 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5040 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5041 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5042 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5043 Similarly use "rawsize", if non-zero, in reloc functions to validate
5044 reloc addresses. Use new bfd_malloc_and_get_section in most places
5045 where bfd_get_section_contents was called. Expand all occurrences of
5046 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5047 grok_prstatus and similar functions to "size".
5048 * aix386-core.c (aix386_core_file_p): ..
5049 * aix5ppc-core.c (xcoff64_core_p): ..
5050 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5051 aout_adobe_set_section_contents): ..
5052 * aout-target.h (callback): ..
5053 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5054 MY_bfd_final_link): ..
5055 * aoutf1.h (sunos4_core_file_p): ..
5056 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5057 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5058 final_link, aout_link_input_section): ..
5059 * binary.c (binary_object_p, binary_canonicalize_symtab,
5060 binary_set_section_contents): ..
5061 * bout.c (b_out_callback, b_out_write_object_contents,
5062 b_out_set_section_contents, b_out_bfd_relax_section,
5063 b_out_bfd_get_relocated_section_contents): ..
5064 * cisco-core.c (cisco_core_file_validate): ..
5065 * coff-alpha.c (alpha_ecoff_object_p,
5066 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5067 * coff-arm.c (coff_arm_relocate_section,
5068 bfd_arm_allocate_interworking_sections): ..
5069 * coff-h8300.c (h8300_reloc16_extra_cases,
5070 h8300_bfd_link_add_symbols): ..
5071 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5072 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5073 ppc_bfd_coff_final_link): ..
5074 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5075 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5076 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5077 * coff64-rs6000.c (xcoff64_write_object_contents,
5078 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5079 * coffcode.h (coff_compute_section_file_positions,
5080 coff_write_object_contents): ..
5081 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5082 coff_section_symbol, build_debug_section): ..
5083 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5084 process_embedded_commands, _bfd_coff_link_input_bfd,
5085 _bfd_coff_write_global_sym): ..
5086 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5087 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5088 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5089 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5090 _bfd_dwarf2_find_nearest_line): ..
5091 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5092 ecoff_compute_section_file_positions,
5093 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5094 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5095 _bfd_elf_discard_section_eh_frame_hdr,
5096 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5097 _bfd_elf_write_section_eh_frame,
5098 _bfd_elf_write_section_eh_frame_hdr): ..
5099 * elf-hppa.h (elf_hppa_sort_unwind): ..
5100 * elf-m10200.c (mn10200_elf_relax_section,
5101 mn10200_elf_relax_delete_bytes,
5102 mn10200_elf_get_relocated_section_contents): ..
5103 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5104 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5105 mn10300_elf_relax_delete_bytes,
5106 mn10300_elf_get_relocated_section_contents,
5107 _bfd_mn10300_elf_adjust_dynamic_symbol,
5108 _bfd_mn10300_elf_discard_copies,
5109 _bfd_mn10300_elf_size_dynamic_sections,
5110 _bfd_mn10300_elf_finish_dynamic_sections): ..
5111 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5112 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5113 bfd_elf_set_group_contents, map_sections_to_segments,
5114 elf_sort_sections, assign_file_positions_for_segments,
5115 SECTION_SIZE, copy_private_bfd_data,
5116 _bfd_elf_get_dynamic_reloc_upper_bound,
5117 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5118 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5119 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5120 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5121 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5122 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5123 bfd_elf32_arm_process_before_allocation,
5124 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5125 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5126 elf32_arm_write_section): ..
5127 * elf32-cris.c (cris_elf_grok_prstatus,
5128 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5129 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5130 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5131 elf_cris_discard_excess_dso_dynamics,
5132 elf_cris_discard_excess_program_dynamics): ..
5133 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5134 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5135 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5136 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5137 elf32_frvfdpic_size_dynamic_sections,
5138 elf32_frvfdpic_modify_segment_map,
5139 elf32_frvfdpic_finish_dynamic_sections): ..
5140 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5141 elf32_h8_get_relocated_section_contents): ..
5142 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5143 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5144 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5145 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5146 elf32_hppa_finish_dynamic_sections): ..
5147 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5148 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5149 i370_elf_finish_dynamic_sections): ..
5150 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5151 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5152 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5153 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5154 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5155 * elf32-ip2k.c (ip2k_is_switch_table_128,
5156 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5157 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5158 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5159 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5160 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5161 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5162 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5163 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5164 m32r_elf_get_relocated_section_contents): ..
5165 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5166 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5167 m68hc11_elf_relax_delete_bytes): ..
5168 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5169 m68hc12_elf_size_one_stub): ..
5170 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5171 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5172 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5173 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5174 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5175 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5176 elf32_mips_grok_prstatus): ..
5177 * elf32-or32.c (or32_elf_consth_reloc): ..
5178 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5179 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5180 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5181 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5182 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5183 ppc_elf_final_write_processing): ..
5184 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5185 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5186 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5187 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5188 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5189 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5190 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5191 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5192 * elf32-sh64-com.c (sh64_address_in_cranges,
5193 sh64_get_contents_type): ..
5194 * elf32-sh64.c (sh64_find_section_for_address,
5195 sh64_elf_final_write_processing): ..
5196 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5197 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5198 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5199 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5200 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5201 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5202 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5203 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5204 elf_vax_finish_dynamic_sections): ..
5205 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5206 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5207 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5208 xstormy16_elf_finish_dynamic_sections): ..
5209 * elf32-xtensa.c (xtensa_read_table_entries,
5210 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5211 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5212 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5213 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5214 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5215 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5216 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5217 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5218 xtensa_callback_required_dependence): ..
5219 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5220 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5221 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5222 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5223 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5224 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5225 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5226 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5227 * elf64-hppa.c (allocate_dynrel_entries,
5228 elf64_hppa_size_dynamic_sections,
5229 elf64_hppa_finish_dynamic_sections): ..
5230 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5231 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5232 elf64_mips_grok_prstatus): ..
5233 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5234 mmix_elf_relocate_section, mmix_elf_final_link,
5235 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5236 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5237 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5238 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5239 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5240 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5241 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5242 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5243 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5244 ppc64_elf_finish_dynamic_sections): ..
5245 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5246 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5247 elf_s390_finish_dynamic_sections): ..
5248 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5249 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5250 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5251 sh64_elf64_finish_dynamic_sections): ..
5252 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5253 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5254 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5255 sparc64_elf_finish_dynamic_symbol,
5256 sparc64_elf_finish_dynamic_sections): ..
5257 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5258 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5259 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5260 elf64_x86_64_finish_dynamic_sections): ..
5261 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5262 * elfcode.h (elf_slurp_reloc_table): ..
5263 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5264 elf_finalize_dynstr, elf_link_add_object_symbols,
5265 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5266 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5267 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5268 elf32_mips_grok_prstatus): ..
5269 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5270 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5271 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5272 elfNN_ia64_finish_dynamic_sections): ..
5273 * elfxx-mips.c (mips_elf_create_procedure_table,
5274 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5275 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5276 mips_elf_global_got_index, mips_elf_multi_got,
5277 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5278 mips_elf_allocate_dynamic_relocations,
5279 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5280 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5281 _bfd_mips_elf_always_size_sections,
5282 _bfd_mips_elf_size_dynamic_sections,
5283 _bfd_mips_elf_finish_dynamic_symbol,
5284 _bfd_mips_elf_finish_dynamic_sections,
5285 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5286 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5287 _bfd_elf_mips_get_relocated_section_contents,
5288 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5289 * hp300hpux.c (callback): ..
5290 * hppabsd-core.c (make_bfd_asection): ..
5291 * hpux-core.c (make_bfd_asection): ..
5292 * i386linux.c (linux_link_create_dynamic_sections,
5293 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5294 * i386msdos.c (msdos_write_object_contents): ..
5295 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5296 os9k_set_section_contents): ..
5297 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5298 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5299 ieee_write_section_part, do_with_relocs, do_as_repeat,
5300 do_without_relocs, ieee_write_debug_part, init_for_output,
5301 ieee_set_section_contents): ..
5302 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5303 * irix-core.c (do_sections, make_bfd_asection): ..
5304 * libaout.h (aout_section_merge_with_text_p): ..
5305 * libbfd.c (_bfd_generic_get_section_contents,
5306 _bfd_generic_get_section_contents_in_window): ..
5307 * linker.c (default_indirect_link_order): ..
5308 * lynx-core.c (make_bfd_asection): ..
5309 * m68klinux.c (linux_link_create_dynamic_sections,
5310 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5311 * mach-o.c (bfd_mach_o_make_bfd_section,
5312 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5313 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5314 bfd_mach_o_scan_read_segment): ..
5315 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5316 _bfd_merge_sections): ..
5317 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5318 mmo_map_set_sizes, mmo_canonicalize_symtab,
5319 mmo_internal_write_section, mmo_write_object_contents): ..
5320 * netbsd-core.c (netbsd_core_file_p): ..
5321 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5322 nlm_alpha_set_public_section): ..
5323 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5324 * nlm32-sparc.c (nlm_sparc_write_import): ..
5325 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5326 nlm_compute_section_file_positions): ..
5327 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5328 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5329 * opncls.c (get_debug_link_info): ..
5330 * osf-core.c (make_bfd_asection): ..
5331 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5332 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5333 final_link, aout_link_input_section): ..
5334 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5335 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5336 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5337 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5338 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5339 * ptrace-core.c (ptrace_unix_core_file_p): ..
5340 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5341 _bfd_final_link_relocate, bfd_generic_relax_section,
5342 bfd_generic_get_relocated_section_contents): ..
5343 * reloc16.c (bfd_coff_reloc16_relax_section,
5344 bfd_coff_reloc16_get_relocated_section_c): ..
5345 * riscix.c (riscix_some_aout_object_p): ..
5346 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5347 * sco5-core.c (make_bfd_asection): ..
5348 * simple.c (bfd_simple_get_relocated_section_contents): ..
5349 * som.c (som_object_setup, setup_sections, som_prep_headers,
5350 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5351 som_set_reloc_info, som_get_section_contents,
5352 som_bfd_link_split_section): ..
5353 * sparclinux.c (linux_link_create_dynamic_sections,
5354 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5355 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5356 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5357 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5358 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5359 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5360 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5361 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5362 sunos_finish_dynamic_link): ..
5363 * syms.c (_bfd_stab_section_find_nearest_line): ..
5364 * tekhex.c (first_phase, tekhex_set_section_contents,
5365 tekhex_write_object_contents): ..
5366 * trad-core.c (trad_unix_core_file_p): ..
5367 * versados.c (process_esd, process_otr, process_otr): ..
5368 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5369 * vms-misc.c (add_new_contents): ..
5370 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5371 * vms.c (vms_set_section_contents): ..
5372 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5373 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5374 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5375 * xsym.c (bfd_sym_scan): .. See above.
5376
5377 2004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5378
5379 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5380 calling _bfd_merged_section_offset only for section symbols.
5381
5382 2004-06-22 Alan Modra <amodra@bigpond.net.au>
5383
5384 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5385 for handling SEC_MERGE symbols in relax_section.
5386
5387 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
5388
5389 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5390 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5391 linked together. Mark the result as h8300sx code.
5392
5393 2004-06-21 Alexandre Oliva <aoliva@redhat.com>
5394
5395 * elf-bfd.h (struct elf_backend_data): Added
5396 elf_backend_omit_section_dynsym.
5397 (_bfd_elf_link_omit_section_dynsym): Declare.
5398 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5399 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5400 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5401 (_bfd_elf_link_renumber_dynsyms): ... this function.
5402 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5403 _bfd_elf_link_omit_section_dynsym).
5404 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5405
5406 2004-06-21 Nick Clifton <nickc@redhat.com>
5407
5408 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5409 flags.
5410
5411 2004-06-17 Jerome Guitton <guitton@gnat.com>
5412
5413 * bfd-in.h (bfd_cache_close_all): New function declaration.
5414 * bfd-in2.h: Regenerate.
5415 * cache.c (bfd_cache_close_all): New function definition.
5416
5417 2004-06-16 Mark Kettenis <kettenis@gnu.org>
5418
5419 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5420 4.10 and beyond.
5421 * configure: Regenerate.
5422
5423 2004-06-16 Daniel Jacobowitz <dan@debian.org>
5424
5425 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5426 the pre-existing section.
5427
5428 2004-06-15 Alan Modra <amodra@bigpond.net.au>
5429
5430 * section.c (struct sec): Remove usused flags. Reorganize a little.
5431 (bfd_get_section_size_before_reloc): Delete.
5432 (bfd_get_section_size_after_reloc): Delete.
5433 (STD_SECTION): Update.
5434 (bfd_get_section_size_now): Delete.
5435 (bfd_set_section_contents): Don't referece reloc_done.
5436 (bfd_get_section_contents): Remove reloc_done comment.
5437 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5438 reloc_done.
5439 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5440 * ecoff.c (bfd_debug_section): Update initializer.
5441 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5442 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5443 * bfd-in.h (bfd_section_size): Expand.
5444 (bfd_get_section_size): New macro.
5445 * bfd-in2.h: Regenerate.
5446 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5447 bfd_get_section_size_before_reloc with bfd_get_section_size.
5448 * coffcode.h (coff_write_object_contents): Likewise.
5449 * coffgen.c (build_debug_section): Likewise.
5450 * dwarf1.c (parse_line_table): Likewise.
5451 (_bfd_dwarf1_find_nearest_line): Likewise.
5452 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5453 * i386msdos.c (msdos_write_object_contents): Likewise.
5454 * pdp11.c (squirt_out_relocs): Likewise.
5455 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5456 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5457
5458 2004-06-14 Chris Demetriou <cgd@broadcom.com>
5459
5460 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5461 removal) with updated comment.
5462 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5463 BFD_RELOC_32_PCREL.
5464 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5465 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5466
5467 2004-06-12 Alan Modra <amodra@bigpond.net.au>
5468
5469 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5470 overflow on branches to undefweaks.
5471
5472 2004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5473
5474 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5475 as ecoff_section_data() does not return a valid lvalue.
5476
5477 2004-06-09 Alexandre Oliva <aoliva@redhat.com>
5478
5479 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5480 (elf_link_add_object_symbols): Likewise.
5481
5482 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5483 (elf_backend_reloc_type_class): New.
5484
5485 2004-06-08 Mark Kettenis <kettenis@gnu.org>
5486
5487 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5488 netbsd-core.lo.
5489 * configure: Regenerate.
5490
5491 2004-06-07 Daniel Jacobowitz <dan@debian.org>
5492
5493 From: Albert Chin-A-Young <china@thewrittenword.com>
5494 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5495 to unsigned int.
5496
5497 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5498
5499 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5500 change.
5501
5502 2004-05-28 DJ Delorie <dj@redhat.com>
5503
5504 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5505 for linking, but otherwise adjust reloc for merged sections.
5506
5507 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
5508
5509 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5510 _bfd_merged_section_offset for local symbols.
5511
5512 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
5513
5514 * Makefile.am: Regenerate dependencies.
5515 * Makefile.in: Regenerate.
5516 * archures.c: Add bfd_mach_sh3_nommu .
5517 * bfd-in2.h: Regenerate.
5518 * cpu-sh.c: Add sh3-nommu architecture.
5519 (bfd_to_arch_table): Create new table.
5520 (sh_get_arch_from_bfd_mach): Create new function.
5521 (sh_get_arch_up_from_bfd_mach): Create new function.
5522 (sh_merge_bfd_arch): Create new function.
5523 * elf32-sh.c (sh_ef_bfd_table): Add table.
5524 (sh_elf_check_relocs): Replace switch statement with
5525 use of sh_ef_bfd_table .
5526 (sh_elf_get_flags_from_mach): Add new function.
5527 (sh_find_elf_flags): Likewise.
5528 (sh_elf_copy_private_data): Replace most of non-elf contents
5529 with a call to sh_merge_bfd_arch() .
5530
5531 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
5532
5533 * Makefile.am (bfdver.h): Use explicit filename, not $< .
5534 * Makefile.in: Regenerate.
5535
5536 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5537
5538 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5539 custom calling conventions for dynamic symbols.
5540 (mn10300_elf_relax_section): Avoid relaxing a function as a local
5541 symbol if it's an alias to a global one.
5542
5543 2004-05-26 H.J. Lu <hongjiu.lu@intel.com>
5544
5545 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5546 change.
5547
5548 2004-05-27 Alexandre Oliva <aoliva@redhat.com>
5549
5550 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5551 loop over hashes.
5552
5553 2004-05-26 Alan Modra <amodra@bigpond.net.au>
5554
5555 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5556 for SHT_GROUP sections.
5557
5558 2004-05-25 Alan Modra <amodra@bigpond.net.au>
5559
5560 * elflink.c (elf_link_add_object_symbols): Don't set up merge
5561 section data here..
5562 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5563 * merge.c: Formatting. Remove unnecessary casts. Expand
5564 bfd_get_section_alignment macro.
5565 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
5566 use throughout file.
5567 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
5568 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
5569 section name to determine sinfo group, instead test output section
5570 and alignment.
5571 (_bfd_merge_sections): Add struct bfd_link_info param. Call
5572 _bfd_strip_section_from_output rather than just twiddling flags.
5573 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5574 (_bfd_merge_sections): Update prototype.
5575 * libbfd.h: Regenerate.
5576
5577 2004-05-24 Mark Kettenis <kettenis@gnu.org>
5578
5579 * netbsd-core.c: Correctly indent section that sets architecture
5580 from machine ID.
5581
5582 From Miod Vallat <miod@online.fr>:
5583 * m88kopenbsd.c: New file.
5584 * targets.c (m88k_openbsd_vec): New.
5585 * config.bfd: Add m88k-*-openbsd*.
5586 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
5587 (m88kopenbsd_vec): New.
5588 * configure: Regenerate.
5589 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
5590 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
5591 Run "make dep-am".
5592 * Makefile.in: Regenerate.
5593 * po/SRC-POTFILES.in: Regenerate.
5594
5595 2004-05-24 Nick Clifton <nickc@redhat.com>
5596
5597 * hash.c: Remove bogus node "Changing the default Hash Table Size"
5598 introduced by hash table size patch.
5599
5600 2004-05-22 Ben Elliston <bje@au.ibm.com>
5601
5602 * configure.in (is_release): Remove.
5603 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
5604 (AC_OUTPUT): Don't output bfdver.h from version.h.
5605 * configure: Regenerate.
5606 * Makefile.am (RELEASE): New variable.
5607 (bfdver.h): New target.
5608 * Makefile.in: Regenerate.
5609 * doc/Makefile.in: Likewise.
5610
5611 2004-05-22 Ben Elliston <bje@au.ibm.com>
5612
5613 * Makefile.am (config.status): Don't depend on version.h.
5614 * Makefile.in: Regenerate.
5615
5616 2004-05-22 Alan Modra <amodra@bigpond.net.au>
5617
5618 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
5619 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
5620 * libbfd.h: Regenerate.
5621 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
5622 (_bfd_elf_rel_local_sym): Likewise.
5623 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
5624 (elf_link_input_bfd): Likewise.
5625 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
5626 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5627 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5628 (elfNN_ia64_relocate_section): Likewise.
5629
5630 2004-05-21 Andy Chittenden <achittenden@bluearc.com>
5631
5632 * hash.c (bfd_default_hash_table_size): New variable.
5633 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
5634 (bfd_hash_set_default_size): New function. Set the default size
5635 to a selected prime number close to the argument. Document new
5636 function.
5637 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
5638 * bfd-in2.h: Regenerate.
5639 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
5640 * Makefile.in: Regenerate.
5641
5642 2004-05-21 Mark Kettenis <kettenis@gnu.org>
5643
5644 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
5645 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
5646 arm, m68k, m88k and hppa core files.
5647
5648 2004-05-21 Nick Clifton <nickc@redhat.com>
5649
5650 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
5651 (bfd_bwrite): Likewise.
5652 (bfd_tell): Likewise.
5653 (bfd_flush): Likewise.
5654 (bfd_stat): Likewise.
5655 (bfd_seek): Likewise.
5656 (bfd_get_mtime): Likewise.
5657 (bfd_get_size): Likewise.
5658
5659 2004-05-19 Ben Elliston <bje@au.ibm.com>
5660
5661 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
5662
5663 2004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
5664
5665 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
5666 (bfd_generic_openr_next_archived_file): Likewise.
5667
5668 2004-05-17 Bob Wilson <bob.wilson@acm.org>
5669
5670 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
5671 section names by inserting a new substring after .gnu.linkonce, except
5672 for .gnu.linkonce.t.* where the "t." is replaced.
5673
5674 2004-05-17 Adam Nemet <anemet@lnxw.com>
5675
5676 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
5677 (m68-*-lynxos* case): Likewise.
5678 (powerpc-*-lyxnos* case): New case.
5679 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
5680
5681 2004-05-17 David Heine <dlheine@tensilica.com>
5682
5683 * aout-target.h (MY_bfd_copy_private_header_data): Define.
5684 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5685 * bfd.c (bfd_copy_private_header_data): Define.
5686 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5687 interface.
5688 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5689 * coffcode.h (coff_bfd_copy_private_header_data): Define.
5690 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5691 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5692 segments by calling copy_private_bfd_data.
5693 (_bfd_elf_copy_private_header_data): Define.
5694 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5695 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5696 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5697 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
5698 * mmo.c (mmo_bfd_copy_private_header_data): Define.
5699 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
5700 * som.c (som_bfd_copy_private_header_data): Define.
5701 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
5702 * vms.c (vms_bfd_copy_private_header_data): Define.
5703 * bfd-in2.h: Regenerate.
5704 * libbfd.h: Regenerate.
5705
5706 2004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5707
5708 * elfxx-mips.c (MINUS_TWO): Define.
5709 (mips_elf_higher, mips_elf_highest,
5710 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
5711 some bfd_vma values.
5712 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
5713
5714 2004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5715
5716 * som.c (log2): Rename to exact_log2. Adjust all callers.
5717
5718 2004-05-13 Paul Brook <paul@codesourcery.com>
5719
5720 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
5721 dwarf3 format CIE entries. Remove comment about the size of the
5722 ra_column field. It is now correctly deduced.
5723
5724 2004-05-13 Joel Sherrill <joel@oarcorp.com>
5725
5726 * config.bfd (or32-*-rtems*): Switch to elf.
5727
5728 2004-05-13 Nick Clifton <nickc@redhat.com>
5729
5730 * po/fr.po: Updated French translation.
5731
5732 2004-05-11 Jakub Jelinek <jakub@redhat.com>
5733
5734 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
5735 into .dynsym if elf_section_data (sec)->dynindx <= 0.
5736 Adjust counting of last_local.
5737 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
5738 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
5739 created by the linker nor !SHF_ALLOC.
5740
5741 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
5742 DT_PLTGOT to the start of the .got.plt section instead of the
5743 .got output section. Set sh_entsize for .got section in addition
5744 to .got.plt.
5745 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5746 is at sgot->output_section->vma.
5747 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
5748 DT_PLTGOT to the start of the .got.plt section instead of the
5749 .got output section.
5750 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5751 is at sgot->output_section->vma. Set sh_entsize for .got section
5752 in addition to .got.plt.
5753 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
5754 (bfd_section_from_phdr): Likewise.
5755 (map_sections_to_segments): Likewise.
5756 (assign_file_positions_for_segments): Likewise.
5757 (get_program_header_size): Likewise.
5758 * elflink.c (bfd_elf_size_dynamic_sections): Set
5759 elf_tdata (output_bfd)->relro from info->relro.
5760 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
5761
5762 2004-05-08 Alexandre Oliva <aoliva@redhat.com>
5763
5764 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
5765 a zero symndx for which we hadn't accounted a dynamic relocation.
5766 (_frvfdpic_add_rofixup): Likewise.
5767
5768 2004-05-07 Brian Ford <ford@vss.fsi.com>
5769 DJ Delorie <dj@redhat.com>
5770
5771 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
5772 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
5773 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
5774 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
5775
5776 2004-05-07 Alexandre Oliva <aoliva@redhat.com>
5777
5778 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
5779 immediately if there's no link info.
5780 (elf32_frvfdpic_copy_private_bfd_data): New.
5781 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
5782
5783 2004-05-06 Zack Weinberg <zack@codesourcery.com>
5784
5785 * dwarf2.c (add_line_info): Also set info->filename to NULL if
5786 filename argument is null; do not call strlen on a null pointer.
5787
5788 2004-05-06 Daniel Jacobowitz <drow@mvista.com>
5789
5790 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
5791 special case.
5792
5793 2004-05-05 Alexandre Oliva <aoliva@redhat.com>
5794
5795 * configure.in (bfd_elf32_frvfdpic_vec): New.
5796 * configure: Rebuilt.
5797 * targets.c (bfd_elf32_frvfdpic_vec): New.
5798 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
5799 on the latter.
5800 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
5801 frvfdpic instead of frv. Rearrange elf-target macros such that
5802 the FDPIC-specific ones are only defined for this new target
5803 vector.
5804 (bfd_elf32_frvfdpic_vec): Declare.
5805 (IS_FDPIC): New.
5806 (elf32_frv_relocate_section): Use it to enable segment checking
5807 and to control rofixup emission. Add output section vma to
5808 applied relocation in non-LOAD non-ALLOC sections. Use
5809 _bfd_error_handler for errors.
5810 (_frv_create_got_section): Create .rel.got and .rofixup only in
5811 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
5812 linker script.
5813 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
5814 (elf32_frvfdpic_modify_segment_map): Likewise.
5815 (elf32_frv_finish_dynamic_sections): New, do-nothing.
5816 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
5817 error message if we miscompute the rofixup size.
5818 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
5819 (frvfdpic_elf_encode_eh_address): Likewise.
5820 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
5821 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
5822 relocs. Reject unknown relocation types.
5823 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
5824 (frv_elf_merge_private_bfd_data): Likewise.
5825 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
5826 0x4000 for newly-added elf32-frvfdpic.
5827
5828 2004-05-05 Nick Clifton <nickc@redhat.com>
5829
5830 PR/136
5831 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
5832 returning NULL as most users of this function do not check its
5833 return value.
5834 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
5835 of bfd_cache_lookup().
5836 * sco5-core.c (sco5_core_file_p): Likewise.
5837 * trad-core.c (trad_unix_core_file_p): Likewise.
5838
5839 2004-05-05 Nick Clifton <nickc@redhat.com>
5840
5841 * cache.c (bfd_cache_lookup): Improve formatting.
5842 * archive.c: Fix formatting.
5843
5844 2004-05-05 Peter Barada <peter@the-baradas.com>
5845
5846 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
5847 * cpu-m68k.c(bfd_m68k_arch): Likewise.
5848 * bfd-in2.h(bfd_architecture): Regenerate.
5849
5850 2004-05-03 Alan Modra <amodra@bigpond.net.au>
5851
5852 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
5853 SEC_MERGE sections.
5854 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
5855 those against discarded link-once and SEC_MERGE section symbols.
5856
5857 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
5858
5859 * section.c (bfd_get_section_by_name_if): New.
5860 * bfd-in2.h: Regenerated.
5861
5862 2004-05-02 Alan Modra <amodra@bigpond.net.au>
5863
5864 * som.c (som_bfd_is_group_section): Define.
5865
5866 2004-05-01 Alan Modra <amodra@bigpond.net.au>
5867
5868 * section.c (bfd_make_section_anyway): Copy the whole
5869 bfd_hash_entry, not just "next" from existing entry.
5870
5871 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5872
5873 * elf.c (bfd_section_from_shdr): Maintain the section order in
5874 a section group.
5875 (special_sections): Add ".note.GNU-stack".
5876 (elf_fake_sections): Handle section group for relocatable
5877 link..
5878
5879 2004-04-30 H.J. Lu <hongjiu.lu@intel.com>
5880
5881 * section.c (bfd_sections_find_if): New.
5882 * bfd-in2.h: Regenerated.
5883
5884 2004-04-30 Alan Modra <amodra@bigpond.net.au>
5885
5886 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
5887
5888 * elf-bfd.h (bfd_elf_is_group_section): Declare.
5889 * elf.c (bfd_elf_is_group_section): New function.
5890 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
5891 * section.c (bfd_generic_is_group_section): New function.
5892 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
5893 (BFD_JUMP_TABLE_LINK): Adjust.
5894 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
5895 * aout-target.h (MY_bfd_is_group_section): Define.
5896 * aout-tic30.c (MY_bfd_is_group_section): Define.
5897 * bfd.c (bfd_is_group_section): Define.
5898 * binary.c (binary_bfd_is_group_section): Define.
5899 * bout.c (b_out_bfd_is_group_section): Define.
5900 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
5901 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
5902 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
5903 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
5904 * coffcode.h (coff_bfd_is_group_section): Define.
5905 * i386msdos.c (msdos_bfd_is_group_section): Define.
5906 * i386os9k.c (os9k_bfd_is_group_section): Define.
5907 * ieee.c (ieee_bfd_is_group_section): Define.
5908 * ihex.c (ihex_bfd_is_group_section): Define.
5909 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
5910 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
5911 * mmo.c (mmo_bfd_is_group_section): Define.
5912 * nlm-target.h (nlm_bfd_is_group_section): Define.
5913 * oasys.c (oasys_bfd_is_group_section): Define.
5914 * pef.c (bfd_pef_bfd_is_group_section): Define.
5915 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
5916 * srec.c (srec_bfd_is_group_section): Define.
5917 * tekhex.c (tekhex_bfd_is_group_section): Define.
5918 * versados.c (versados_bfd_is_group_section): Define.
5919 * vms.c (vms_bfd_is_group_section): Define.
5920 * xsym.c (bfd_sym_bfd_is_group_section): Define.
5921 * bfd-in2.h: Regenerate.
5922 * libbfd.h: Regenerate.
5923
5924 2004-04-30 Alan Modra <amodra@bigpond.net.au>
5925
5926 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
5927
5928 2004-04-30 Hans-Peter Nilsson <hp@axis.com>
5929
5930 * configure.in: Update version to 2.15.91.
5931 * configure: Regenerate.
5932
5933 2004-04-29 Brian Ford <ford@vss.fsi.com>
5934
5935 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
5936 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
5937 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
5938 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
5939 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
5940 .gnu.linkonce.wi. sections.
5941 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
5942 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
5943 .gnu.linkonce.wi..
5944 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
5945 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5946
5947 2004-04-28 Chris Demetriou <cgd@broadcom.com>
5948
5949 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
5950 * bfd-in2.h: Regenerate.
5951 * libbfd.h: Likewise.
5952
5953 2004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5954
5955 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
5956 dup_common fields.
5957 (setup_sections): Use som_subspace_dictionary_record struct instead
5958 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
5959 is_comdat, is_common or dup_common.
5960 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
5961 is_comdat, is_common and dup_common in section subspace_dict from
5962 copy_data.
5963 (som_begin_writing): Use som_subspace_dictionary_record struct.
5964 (som_finish_writing): Likewise.
5965 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
5966 is_common and dup_common flags in info for symbol. Add comment
5967 regarding linker support for these fields. Slightly reorganize
5968 function.
5969 (som_build_and_write_symbol_table): Set is_comdat, is_common and
5970 dup_common fields in symbol table from symbol info.
5971 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
5972 arguments. Set corresponding fields in copy_data. Change all callers.
5973 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
5974 symbol table.
5975 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
5976 * som.h (som_subspace_dictionary_record): Define.
5977 (som_copyable_section_data_struct): Add is_comdat, is_common and
5978 dup_common fields.
5979 (som_section_data_struct): Use som_subspace_dictionary_record struct
5980 instead of subspace_dictionary_record.
5981 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
5982
5983 2004-04-27 Bob Wilson <bob.wilson@acm.org>
5984
5985 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
5986 if set. Check reloc_done flag before applying relocations. Use
5987 output addresses, both when applying relocations and when comparing
5988 against the specified section.
5989 (elf_xtensa_relocate_section): Use output address to check if dynamic
5990 reloc is in a literal pool. Set section's reloc_done flag.
5991
5992 2004-04-27 H.J. Lu <hongjiu.lu@intel.com>
5993
5994 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
5995 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5996 section.
5997 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
5998 section.
5999
6000 2004-04-27 Alan Modra <amodra@bigpond.net.au>
6001
6002 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6003 structure field removed in 2004-04-24 patch.
6004 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6005
6006 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6007 Constify hdr arg.
6008 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6009 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6010 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6011 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6012 field before calling elf_backend_section_flags.
6013
6014 2004-04-24 Chris Demetriou <cgd@broadcom.com>
6015
6016 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6017 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6018 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6019 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6020 and BFD_RELOC_32_PCREL.
6021 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6022 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6023 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6024 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6025 (mips_elf_next_relocation): Move comment about matching HI/LO
6026 relocations to...
6027 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6028 R_MIPS_GNU_REL_HI16.
6029
6030 2004-04-23 Chris Demetriou <cgd@broadcom.com>
6031
6032 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6033 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6034 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6035 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6036 and update comments to reflect current usage.
6037 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6038 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6039 for MIPS_R_PCREL16.
6040 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6041 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6042 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6043 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6044 type number to be MIPS_R_PCREL16.
6045 (mips_relocate_section): Remove support for link-time relaxation
6046 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6047 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6048 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6049 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6050 relaxation of branches used by embedded-PIC.
6051 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6052 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6053 related members, update comment.
6054 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6055 code related to embedded-PIC.
6056 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6057 initialization of now-removed 'adjust' member of
6058 'struct ecoff_debug_info'.
6059
6060 2004-04-23 Chris Demetriou <cgd@broadcom.com>
6061
6062 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6063
6064 2004-04-21 Philip Blundell <pb@nexus.co.uk>
6065
6066 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6067 relocs for locally defined symbols during -shared final link.
6068 (elf32_arm_final_link_relocate): Likewise.
6069
6070 2004-04-22 Jakub Jelinek <jakub@redhat.com>
6071
6072 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6073 ELF_LINK_POINTER_EQUALITY_NEEDED.
6074 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6075 if r_type is not R_X86_64_PC32.
6076 (elf64_x86_64_finish_dynamic_symbol): If
6077 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6078 SHN_UNDEF symbols.
6079
6080 2004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6081
6082 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6083 (elf_backend_plt_sym_val): Define.
6084
6085 2004-04-22 Andrew Cagney <cagney@redhat.com>
6086
6087 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6088
6089 2004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6090
6091 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
6092 make_bfd_asection.
6093 * som.c (som_set_section_contents): Constantify second argument.
6094 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6095 (som_object_setup): Rework to avoid warning.
6096 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6097 Likewise.
6098
6099 2004-04-22 Andrew Cagney <cagney@redhat.com>
6100
6101 * cache.c (bfd_cache_close): Check for a previously closed file.
6102
6103 2004-04-22 Jakub Jelinek <jakub@redhat.com>
6104
6105 * bfd.c (bfd_get_synthetic_symtab): Define.
6106 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6107 NAME##_get_synthetic_symtab.
6108 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6109 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6110 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6111 relplt_name fields.
6112 (_bfd_elf_get_synthetic_symtab): New prototype.
6113 * elfcode.h (elf_get_synthetic_symtab): Define.
6114 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6115 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6116 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6117 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6118 * bfd-in2.h: Rebuilt.
6119 * libbfd.h: Rebuilt.
6120 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6121 (elf_backend_plt_sym_val): Define.
6122 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6123 (elf_backend_plt_sym_val): Define.
6124 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6125 (elf_backend_plt_sym_val): Define.
6126 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6127 (elf_backend_plt_sym_val): Define.
6128 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6129 (elf_backend_plt_sym_val): Define.
6130 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6131 (elf_backend_plt_sym_val): Define.
6132 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6133 (elf_backend_plt_sym_val): Define.
6134 * aout-target.h (MY_get_synthetic_symtab): Define.
6135 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6136 * coff-rs6000.c (rs6000coff_vec): Add
6137 _bfd_nodynamic_get_synthetic_symtab.
6138 (pmac_xcoff_vec): Likewise.
6139 * coff64-rs6000.c (rs6000coff64_vec): Add
6140 _bfd_nodynamic_get_synthetic_symtab.
6141 (aix5coff64_vec): Likewise.
6142 * sunos.c (MY_get_synthetic_symtab): Define.
6143 * vms.c (vms_get_synthetic_symtab): Define.
6144
6145 2004-04-22 Nick Clifton <nickc@redhat.com>
6146
6147 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6148
6149 2004-04-22 Peter Barada <peter@the-baradas.com>
6150
6151 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6152 * bfd2-in.h: Regenerate.
6153 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6154
6155 2004-04-21 Chris Demetriou <cgd@broadcom.com>
6156
6157 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6158 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6159 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6160 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6161 * bfd-in2.h: Regenerate.
6162
6163 2004-04-21 Bob Wilson <bob.wilson@acm.org>
6164
6165 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6166 require relocations against a weak symbol to reference the same
6167 symbol hash entry if not a final, static link.
6168 (get_cached_value, add_value_map): Add final_static_link argument.
6169 (remove_literals): Pass final_static_link argument as needed.
6170
6171 2004-04-21 Andrew Cagney <cagney@redhat.com>
6172
6173 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6174 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6175 (opncls_bwrite, opncls_bclose, opncls_bflush)
6176 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6177 bfd iovec that uses function callbacks.
6178 (bfd_close): Use the iovec's bclose.
6179 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6180 (cache_bclose, cache_bflush, cache_bstat)
6181 (cache_iovec): New functions and global variable, implement a
6182 cache "iovec", where applicable set bfd_error.
6183 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6184 * bfdio.c (struct bfd_iovec): Define.
6185 (real_read): Delete function.
6186 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6187 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6188 assume that bread and bwrite set bfd_error.
6189 * bfd.c (struct bfd): Add "iovec", update comments.
6190 * bfd-in2.h, libbfd.h: Re-generate.
6191
6192 2004-04-21 Andrew Cagney <cagney@redhat.com>
6193
6194 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6195
6196 2004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6197
6198 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6199 (bfd_elf_gc_sections): Fail if a shared object is being created.
6200 Do not fail if dynamic sections have been created. Instead call
6201 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6202 dynamically referenced symbols. Do not mark the whole graph
6203 rooted at .eh_frame, only the section proper.
6204
6205 2004-04-20 DJ Delorie <dj@redhat.com>
6206
6207 * reloc.c: Add BFD_RELOC_32_SECREL.
6208 * bfd-in2.h: Regenerate.
6209 * libbfd.h: Likewise.
6210 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6211 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6212 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6213
6214 2004-04-19 Jakub Jelinek <jakub@redhat.com>
6215
6216 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6217 relocs against hidden/protected undefweak symbols properly.
6218 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6219
6220 2004-04-18 Mark Kettenis <kettenis@gnu.org>
6221
6222 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6223 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6224 core files.
6225
6226 2004-04-17 Brian Ford <ford@vss.fsi.com>
6227
6228 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6229 filepos for the SizeOfHeaders field.
6230 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6231 overflow.
6232 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6233
6234 2004-04-16 Alan Modra <amodra@bigpond.net.au>
6235
6236 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6237 change reloc_done. Set and restore _cooked_size.
6238 (RETURN): Delete.
6239
6240 2004-04-15 Mark Kettenis <kettenis@gnu.org>
6241
6242 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6243 core files.
6244
6245 2004-04-15 Nick Clifton <nickc@redhat.com>
6246
6247 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6248
6249 2004-04-15 Alan Modra <amodra@bigpond.net.au>
6250
6251 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6252
6253 2004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6254
6255 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6256 when it is a definition.
6257
6258 2004-04-14 Alan Modra <amodra@bigpond.net.au>
6259
6260 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6261 when statically linking PIC code.
6262 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6263
6264 2004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6265
6266 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6267 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6268 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6269 * configure: Regenerate.
6270
6271 2004-04-08 Richard Sandiford <rsandifo@redhat.com>
6272
6273 * elflink.c: Include libiberty.h.
6274 * Makefile.am (elflink.lo): Depend on libiberty.h.
6275 * Makefile.in: Regenerate.
6276
6277 2004-04-06 Daniel Jacobowitz <drow@mvista.com>
6278
6279 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6280 ".MIPS.stubs".
6281
6282 2004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6283
6284 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6285 reserve the memory for dynamic linker
6286
6287 2004-04-05 Mark Kettenis <kettenis@gnu.org>
6288
6289 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6290 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6291
6292 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6293
6294 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6295 RELOC_FOR_GLOBAL_SYMBOL.
6296 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6297
6298 2004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6299
6300 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6301 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6302
6303 2004-04-01 Paul Brook <paul@codesourcery.com>
6304
6305 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6306 * elf32-arm.h (struct elf32_elf_section_map): New.
6307 (struct _arm_elf_section_data): New.
6308 (elf32_arm_section_data): Define.
6309 (struct elf32_arm_link_hash_table): Add byteswap_code.
6310 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6311 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6312 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6313 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6314 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6315 (bfd_elf32_new_section_hook, elf_backend_write_section,
6316 elf_backend_link_output_symbol_hook): Define.
6317
6318 2004-04-01 Andy Chittenden <achittenden@bluearc.com>
6319
6320 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6321 that keeps the characters in a B_INCL..B_EINCL range.
6322 (_bfd_link_section_stabs): When computing the sum of the
6323 characters in a B_INCL..B_EINCL range also keep a copy of those
6324 characters. Use this information to distinguish between
6325 include sections that have the same sum and the same length
6326 but which are nevertheless unique.
6327
6328 2004-03-31 Paul Brook <paul@codesourcery.com>
6329
6330 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6331 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6332
6333 2004-03-31 Andy Chittenden <achittenden@bluearc.com>
6334
6335 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6336 to 'sum_chars' and add field 'num_chars'.
6337 (_bfd_link_section_stabs): When computing the sum of the
6338 characters in a B_INCL..B_EINCL range also keep a count of the
6339 number of characters. Use this information to help distinguish
6340 between include sections when have the same sum but which
6341 nevertheless are still unique.
6342
6343 2004-03-31 Mattias Engdegård <mattias@virtutech.se>
6344
6345 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6346
6347 2004-03-30 Galit Heller <Galit.Heller@nsc.com>
6348 Tomer Levi <Tomer.Levi@nsc.com>
6349
6350 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6351 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6352 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6353 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6354 (cpu-cr16c.lo): New target.
6355 (elf32-cr16c.lo): Likewise.
6356 * Makefile.in: Regenerate.
6357 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6358 (bfd_archures_list): Add bfd_cr16c_arch.
6359 * config.bfd: Handle cr16c-*-elf*.
6360 * configure.in: Handle bfd_elf32_cr16c_vec.
6361 * configure: Regenerate.
6362 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6363 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6364 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6365 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6366 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6367 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6368 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6369 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6370 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6371 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6372 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6373 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6374 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6375 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6376 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6377 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6378 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6379 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6380 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6381 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6382 * targets.c (bfd_elf32_cr16c_vec): Declare.
6383 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6384 * cpu-cr16c.c: New file.
6385 * elf32-cr16c.c: Likewise.
6386 * libbfd.h: Regenerate.
6387 * bfd-in2.h: Likewise.
6388
6389 2004-03-30 Jakub Jelinek <jakub@redhat.com>
6390
6391 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6392
6393 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6394
6395 * Makefile.am: Remove all mention of elflink.h.
6396 * Makefile.in: Regenerate.
6397 * bfd-in.h (bfd_elf_discard_info): Declare.
6398 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6399 * bfd-in2.h: Regenerate.
6400 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6401 bfd_elf32_link_record_dynamic_symbol,
6402 bfd_elf64_link_record_dynamic_symbol,
6403 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6404 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6405 _bfd_elf32_link_record_local_dynamic_symbol,
6406 _bfd_elf64_link_record_local_dynamic_symbol,
6407 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6408 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6409 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6410 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6411 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6412 _bfd_elf32_reloc_symbol_deleted_p,
6413 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6414 (bfd_elf_link_record_dynamic_symbol,
6415 bfd_elf_link_record_local_dynamic_symbol,
6416 bfd_elf_final_link, bfd_elf_gc_sections,
6417 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6418 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6419 bfd_elf_reloc_symbol_deleted_p): Declare.
6420 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6421 * elf32-arm.h: Update for changed function names. Remove local
6422 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6423 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6424 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6425 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6426 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6427 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6428 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6429 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6430 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6431 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6432 (bfd_elfNN_print_symbol): Define.
6433 * elfcode.h: Don't include elflink.h.
6434 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6435 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6436 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6437 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6438 elf_link_record_local_dynamic_symbol): Don't define.
6439 * elflink.c: Update for changed function names. Move elflink.h
6440 code here.
6441 * elflink.h: Delete file.
6442 * po/SRC-POTFILES.in: Regenerate.
6443 * po/bfd.pot: Regenerate.
6444
6445 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6446
6447 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6448 "name" for global syms accidentally removed in 2004-03-20 change.
6449
6450 2004-03-27 Alan Modra <amodra@bigpond.net.au>
6451
6452 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6453 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6454 where Elf_External_* is different for 64 and 32 bit, with
6455 corresponding elf_size_info field.
6456 (struct elf_final_link_info): Use "bfd_byte *" instead
6457 of "Elf_External_Sym *" for external_syms and symbuf.
6458 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6459 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6460 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6461 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6462 (elf_link_sort_cmp2): Adjust.
6463 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6464 using ELF_R_SYM macro. Set u.sym_mask.
6465 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6466 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6467 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6468 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6469 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6470 swap_syn_out functions. Rearrange dyn swap in/out switch.
6471 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6472 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6473 (elf_link_flush_output_syms): Add elf_backend_data arg.
6474 (elf_link_check_versioned_symbol): Likewise.
6475 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6476 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6477 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6478 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6479 ELF_R_TYPE and ELF_R_INFO macros.
6480 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6481 based on size rather than using ELF_R_INFO.
6482 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6483 ELF_R_SYM macro.
6484 (struct alloc_got_off_arg): New.
6485 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6486 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6487 (elf_gc_allocate_got_offsets): Adjust.
6488 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6489 ELF_R_SYM. Use bfd_section_from_elf_index.
6490 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6491 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6492 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6493
6494 2004-03-26 Stan Shebs <shebs@apple.com>
6495
6496 Remove MPW support, no longer used.
6497 * config.bfd (powerpc-*-mpw*): Remove configuration.
6498 * mpw-config.in, mpw-make.sed: Remove files.
6499 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6500
6501 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6502
6503 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6504 (ppc64_elf_add_symbol_hook): New function.
6505 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6506 const from Elf_Internal_Sym param.
6507 * elflink.c (elf_link_add_object_symbols): Adjust.
6508 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6509 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6510 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6511 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6512 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6513 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6514 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6515 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6516 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6517 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6518 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6519 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6520 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6521 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6522 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6523 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6524
6525 2004-03-26 Alan Modra <amodra@bigpond.net.au>
6526
6527 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6528 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6529 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6530 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6531 (bfd_elf64_bfd_link_add_symbols): Delete.
6532 (bfd_elf_link_add_symbols): Declare.
6533 * elfcode.h (elf_bfd_link_add_symbols): Delete.
6534 * elflink.c: Include safe-ctype.h.
6535 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6536 make static.
6537 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6538 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6539 static.
6540 (elf_link_add_archive_symbols): Rename from
6541 _bfd_elf_link_add_archive_symbols, make static.
6542 (elf_link_add_object_symbols): New function. Corresponding
6543 elflink.h function converted to use elf_size_info.
6544 (bfd_elf_link_add_symbols): Likewise.
6545 (bfd_elf_size_dynamic_sections): Adjust.
6546 * elflink.h (elf_bfd_link_add_symbols): Delete.
6547 (elf_link_add_object_symbols): Delete.
6548 * elf32-gen.c (elf32_generic_link_add_symbols): Call
6549 bfd_elf_link_add_symbols.
6550 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6551
6552 2004-03-25 Alan Modra <amodra@bigpond.net.au>
6553
6554 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6555 and chained shared libs only if dynsym. Clear dynsym on forced-local.
6556
6557 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6558 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6559 (_bfd_elf_add_dt_needed_tag): Declare.
6560 (_bfd_elf_sort_symbol): Declare.
6561 (_bfd_elf_finalize_dynstr): Declare.
6562 (RELOC_FOR_GLOBAL_SYM): Formatting.
6563 * elfcode.h (elf_add_dynamic_entry): Delete.
6564 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
6565 elflink.h function converted to use elf_size_info.
6566 (_bfd_elf_add_dt_needed_tag): Likewise.
6567 (_bfd_elf_sort_symbol): Likewise.
6568 (_bfd_elf_finalize_dynstr): Likewise.
6569 (compute_bucket_count): Likewise.
6570 (bfd_elf_size_dynamic_sections): Likewise. Check result of
6571 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6572 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6573 * elflink.h: ..here.
6574 (sort_symbol, add_dt_needed_tag): Delete.
6575 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6576 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6577 Update all users.
6578 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
6579 * elf32-cris.c (add_dynamic_entry): Likewise.
6580 * elf32-hppa.c (add_dynamic_entry): Likewise.
6581 * elf32-i370.c (add_dynamic_entry): Likewise.
6582 * elf32-i386.c (add_dynamic_entry): Likewise.
6583 * elf32-m32r.c (add_dynamic_entry): Likewise.
6584 * elf32-m68k.c (add_dynamic_entry): Likewise.
6585 * elf32-ppc.c (add_dynamic_entry): Likewise.
6586 * elf32-s390.c (add_dynamic_entry): Likewise.
6587 * elf32-sh.c (add_dynamic_entry): Likewise.
6588 * elf32-sparc.c (add_dynamic_entry): Likewise.
6589 * elf32-vax.c (add_dynamic_entry): Likewise.
6590 * elf32-xtensa.c (add_dynamic_entry): Likewise.
6591 * elf64-alpha.c (add_dynamic_entry): Likewise.
6592 * elf64-hppa.c (add_dynamic_entry): Likewise.
6593 * elf64-ppc.c (add_dynamic_entry): Likewise.
6594 * elf64-s390.c (add_dynamic_entry): Likewise.
6595 * elf64-sparc.c (add_dynamic_entry): Likewise.
6596 * elf64-x86-64.c (add_dynamic_entry): Likewise.
6597 * elfxx-ia64.c (add_dynamic_entry): Likewise.
6598 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
6599 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
6600 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
6601 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6602
6603 2004-03-23 Paul Brook <paul@codesourcery.com>
6604
6605 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
6606
6607 2004-03-22 Bob Wilson <bob.wilson@acm.org>
6608
6609 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
6610 literal tables and check for relocs outside of literal pools.
6611 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
6612 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
6613 set DF_TEXTREL.
6614 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
6615 (elf_xtensa_relocate_section): Read literal tables and check for
6616 dynamic relocations in read-only sections and not in literal pools.
6617
6618 2004-03-23 Alan Modra <amodra@bigpond.net.au>
6619
6620 PR 51.
6621 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
6622
6623 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
6624
6625 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6626 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
6627 not defined by the executable, or defined in a DSO.
6628 <eliding run-time relocation of .got>: Initialize GOT entry for a
6629 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
6630 executable.
6631 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
6632 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
6633 a PLT reloc to GOT for an executable.
6634 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
6635 .got for a DSO and explain why.
6636 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
6637 and unreferenced symbols for which a PLT is defined. Adjust
6638 dynamic-symbol pruning correspondingly, to make sure we don't lose
6639 a dynamic symbol also defined by a DSO.
6640
6641 2004-03-22 Alan Modra <amodra@bigpond.net.au>
6642
6643 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
6644 and rel args. Group input and output args. Wrap to 80 columns.
6645 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6646 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
6647 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
6648 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
6649 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6650 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
6651 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
6652 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
6653 RELOC_FOR_GLOBAL_SYMBOL invocation.
6654
6655 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
6656
6657 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
6658 unresolved symbols in objects aren't allowed.
6659
6660 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
6661 unresolved symbols.
6662 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6663 (elf_hppa_unmark_useless_dynamic_symbols):
6664 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6665 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6666 (elf32_hppa_relocate_section): Likewise.
6667 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6668 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6669 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6670 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6671 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6672
6673 * elf-m10200.c (mn10200_elf_relocate_section): Use
6674 RELOC_FOR_GLOBAL_SYMBOL.
6675 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6676 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6677 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6678 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6679 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6680 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
6681 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6682 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
6683 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6684 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6685 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6686 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6687
6688 2004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6689
6690 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6691 (final_link_relocate): Likewise.
6692 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6693 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6694
6695 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6696
6697 * Makefile.am: Run "make dep-am".
6698 * Makefile.in: Regenerate.
6699 * aclocal.m4: Regenerate.
6700 * config.in: Regenerate.
6701 * po/bfd.pot: Regenerate.
6702
6703 2004-03-19 Alan Modra <amodra@bigpond.net.au>
6704 H.J. Lu <hongjiu.lu@intel.com>
6705
6706 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
6707 type and size change code to where it was previously. Remove
6708 dt_needed param. Treat old weak syms as strong if new sym is
6709 from a shared lib, even when old sym is from another shared
6710 lib. Remove unnecessary tests of oldweak and newweak. Correct
6711 comments.
6712 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
6713 _bfd_elf_merge_symbol calls.
6714 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
6715 dt_needed local var. Update comments.
6716 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
6717 (_bfd_elf_add_default_symbol): Likewise.
6718
6719 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
6720 strong syms in one shared object overriding weak syms in another.
6721
6722 2004-03-18 Alan Modra <amodra@bigpond.net.au>
6723
6724 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
6725 dyn_lib_class field. Rearrange for better packing.
6726 (elf_dt_soname): Delete.
6727 (elf_dyn_lib_class): Define.
6728 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
6729 (bfd_elf_set_dt_needed_soname): Delete.
6730 (bfd_elf_set_dyn_lib_class): New function.
6731 * elflink.h (add_dt_needed_tag): New function. Split out from..
6732 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
6733 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
6734 initialization of soname.
6735 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
6736 elf_dt_soname.
6737 * bfd-in.h (enum dynamic_lib_link_class): New.
6738 (bfd_elf_set_dt_needed_soname): Delete.
6739 (bfd_elf_set_dyn_lib_class): Declare.
6740 * bfd-in2.h: Regenerate.
6741
6742 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
6743 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
6744 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
6745 symbol loop. Instead use add_needed to flag tag as written.
6746
6747 2004-03-17 Nathan Sidwell <nathan@codesourcery.com>
6748
6749 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
6750 logic for null_input_bfd detection.
6751
6752 2004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6753
6754 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
6755
6756 2004-03-16 Mark Kettenis <kettenis@gnu.org>
6757
6758 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
6759 code.
6760
6761 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6762
6763 * elflink.c (elf_link_read_relocs_from_section): Don't use
6764 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
6765 (_bfd_elf_link_read_relocs): ..to here.
6766 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
6767
6768 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6769
6770 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
6771 values selected in configure.host. Require both to be defined
6772 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
6773 corresponding BFD_HOST vars with quotes.
6774 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
6775 Always require BFD_HOST_64_BIT_DEFINED.
6776 <file_ptr type>: Find off_t size before emitting message. Combine
6777 off_t and ftello64 conditional.
6778 * configure: Regenerate.
6779
6780 2004-03-16 Alan Modra <amodra@bigpond.net.au>
6781
6782 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
6783 aliasing warning. Remove trailing whitespace throughout file.
6784
6785 2004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6786
6787 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
6788 input_section in calls to get_dyn_name.
6789 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
6790 local symbols.
6791 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
6792
6793 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6794
6795 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
6796 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
6797 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
6798 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
6799 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
6800 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
6801 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
6802 when using long.
6803 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
6804 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6805 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6806 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
6807 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
6808 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
6809 (read_8_bytes, read_indirect_string, read_address): Likewise.
6810 (read_abbrevs, parse_comp_unit): Likewise.
6811 * targets.c (struct bfd_target): Likewise.
6812 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
6813 * hppabsd-core.c: Likewise. Formatting.
6814 * hpux-core.c: Likewise.
6815 * irix-core.c: Likewise.
6816 * netbsd-core.c: Likewise.
6817 * osf-core.c: Likewise.
6818 * ptrace-core.c: Likewise.
6819 * sco5-core.c: Likewise.
6820 * trad-core.c: Likewise.
6821 * configure: Regenerate.
6822 * bfd-in2.h: Regenerate.
6823
6824 2004-03-15 Alan Modra <amodra@bigpond.net.au>
6825
6826 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
6827 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
6828 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6829 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6830 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
6831 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
6832 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
6833 * libbfd.c: Likewise in function definitions.
6834 (bfd_put_8): Mask with 0xff rather than casting to char.
6835 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
6836 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
6837 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
6838 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
6839 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
6840 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
6841 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
6842 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
6843 (H_GET_64, H_GET_32, H_GET_16): Likewise.
6844 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
6845 * archive.c (do_slurp_coff_armap): Update swap prototype.
6846 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
6847 (tic54x_getl_signed_32): Likewise.
6848 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
6849 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
6850 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
6851 (bfd_getp_signed_32, bfd_putp32): Likewise.
6852 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
6853 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
6854 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
6855 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
6856 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
6857 bfd_h_getx_signed_16, bfd_h_putx16.
6858 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
6859 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
6860 * hpux-core.c: Likewise.
6861 * irix-core.c: Likewise.
6862 * netbsd-core.c: Likewise.
6863 * osf-core.c: Likewise.
6864 * ptrace-core.c: Likewise.
6865 * sco5-core.c: Likewise.
6866 * trad-core.c: Likewise.
6867 * bfd-in2.h: Regenerate.
6868
6869 2004-03-15 Matt Thomas <matt@3am-software.com>
6870
6871 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
6872 selected.
6873
6874 2004-03-13 Mark Kettenis <kettenis@gnu.org>
6875
6876 * config.bfd: Add x86_64-*-openbsd*.
6877 * configure.in (x86_64-*-openbsd*): Set COREFILE to
6878 netbsd-core.lo.
6879 * configure: Regenerate.
6880
6881 2004-03-12 Nick Clifton <nickc@redhat.com>
6882 Dave Murphy <wintermute2k4@ntlworld.com>
6883
6884 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
6885 if the input bfd does not contain any code.
6886
6887 2004-03-09 Steve Ellcey <sje@cup.hp.com>
6888
6889 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
6890
6891 2004-03-05 Fred Fish <fnf@redhat.com>
6892
6893 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
6894 mips16 symbols to be even rather than testing first for even/odd.
6895 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
6896
6897 2004-03-05 Nathan Sidwell <nathan@codesourcery.com>
6898
6899 * elf.c (map_sections_to_segments): Ignore .tbss sections for
6900 layout purposes.
6901
6902 2004-03-03 Alexandre Oliva <aoliva@redhat.com>
6903
6904 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
6905 undefined symbols as hash_new.
6906
6907 2003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
6908
6909 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
6910 * cpu-sh.c: Ditto.
6911 * elf32-sh.c: Ditto.
6912 * bfd-in2.h: Regenerate.
6913
6914 2004-03-02 Alexandre Oliva <aoliva@redhat.com>
6915
6916 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
6917 dynrelocs.
6918 (_frv_count_got_plt_entries): Initialize them.
6919 (frv_pic_relocs_info_find): Add insert argument. Adjust all
6920 callers.
6921 (frv_pic_relocs_info_for_global): Likewise.
6922 (frv_pic_relocs_info_for_local): Likewise.
6923 (frv_pic_merge_early_relocs_info): New.
6924 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
6925 another.
6926 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
6927 Check that we don't exceed the allocated count for entry.
6928 (_frv_add_rofixup): Likewise.
6929 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
6930 (elf32_frv_finish_dynamic_sections): Improve error message in case
6931 we emit too few rofixup entries.
6932
6933 2004-03-01 Richard Sandiford <rsandifo@redhat.com>
6934
6935 * archures.c (bfd_mach_fr450): New.
6936 * bfd-in2.h: Regenerate.
6937 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
6938 (arch_info_500): Link to it.
6939 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
6940 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
6941 (frv_elf_arch_extension_p): New function.
6942 (frv_elf_merge_private_bfd_data): Use it.
6943
6944 2004-02-28 H.J. Lu <hongjiu.lu@intel.com>
6945
6946 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
6947
6948 * elflink.h (is_global_data_symbol_definition): Moved to
6949 elflink.c.
6950 (elf_link_is_defined_archive_symbol): Likewise.
6951 (elf_link_add_archive_symbols): Likewise. Renamed to
6952 _bfd_elf_link_add_archive_symbols.
6953
6954 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
6955 of ELF symbol table entry from backend.
6956 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
6957 instead of elf_link_add_object_symbols.
6958
6959 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
6960
6961 * elf-bfd.h (struct elf_backend_data): Added
6962 elf_backend_can_make_relative_eh_frame,
6963 elf_backend_can_make_lsda_relative_eh_frame and
6964 elf_backend_encode_eh_address.
6965 (_bfd_elf_encode_eh_address): Declare.
6966 (_bfd_elf_can_make_relative): Declare.
6967 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
6968 hooks to decide whether to attempt to make_relative and
6969 make_lsda_relative.
6970 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
6971 (_bfd_elf_can_make_relative): New.
6972 (_bfd_elf_encode_eh_address): New.
6973 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
6974 (frv_elf_encode_eh_address): New.
6975 (elf_backend_can_make_relative_eh_frame): Define.
6976 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6977 (elf_backend_encode_eh_address): Define.
6978 * elfxx-target.h
6979 (elf_backend_can_make_relative_eh_frame): Define.
6980 (elf_backend_can_make_lsda_relative_eh_frame): Define.
6981 (elf_backend_encode_eh_address): Define.
6982 (elfNN_bed): Add them.
6983
6984 2004-02-27 Alexandre Oliva <aoliva@redhat.com>
6985
6986 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
6987 complain_on_overflow to signed.
6988
6989 2004-02-27 H.J. Lu <hongjiu.lu@intel.com>
6990
6991 * elflink.h (sort_symbol): New.
6992 (elf_link_add_object_symbols): Use a sorted symbol array for
6993 weakdef.
6994
6995 2004-02-27 Jakub Jelinek <jakub@redhat.com>
6996
6997 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6998 for pc relative relocs.
6999 (elf_s390_relocate_section): Likewise.
7000 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7001 for pc relative relocs.
7002 (elf_s390_relocate_section): Likewise.
7003
7004 2004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7005
7006 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7007 count_dyn_reloc.
7008
7009 2004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7010
7011 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7012 field to track if a relocation is against readonly section.
7013 (count_dyn_reloc): Take a new argument for rent->reltext.
7014 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7015 (get_reloc_section): Don't set ia64_info->reltext here.
7016 (allocate_dynrel_entries): Set ia64_info->reltext here.
7017
7018 2004-02-24 Alexandre Oliva <aoliva@redhat.com>
7019
7020 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7021 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7022 function's descriptor to symbol+offset, and map local undefweak
7023 symbol to NULL function descriptor.
7024 (elf32_frv_relocate_section): Likewise.
7025
7026 2004-02-23 Mark Kettenis <kettenis@gnu.org>
7027
7028 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7029 M_X86_64_NETBSD.
7030 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7031 (netbsd_core_file_p): Set architecture from machine ID for
7032 selected machines.
7033
7034 2004-02-23 Jakub Jelinek <jakub@redhat.com>
7035
7036 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7037 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7038
7039 2004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7040
7041 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7042 symbols with non-default visibility.
7043
7044 2004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7045
7046 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7047 IMAGE_SCN_MEM_WRITE on known sections only.
7048
7049 2004-02-20 Jakub Jelinek <jakub@redhat.com>
7050
7051 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7052 symbols used in PIE relocs.
7053
7054 2004-02-19 Jakub Jelinek <jakub@redhat.com>
7055
7056 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7057 .plt sh_entsize.
7058
7059 2004-02-18 Daniel Jacobowitz <drow@mvista.com>
7060
7061 * configure.in: Update version to 2.15.90.
7062 * configure: Regenerate.
7063
7064 2004-02-17 Daniel Jacobowitz <drow@mvista.com>
7065 Richard Sandiford <rsandifo@redhat.com>
7066
7067 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7068 _bfd_elf_symbol_refs_local_p to decide whether to decay
7069 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7070 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7071 relocs if the symbol wasn't defined by a regular object file.
7072 Don't check the symbol's dynindx.
7073
7074 2004-02-16 Andrew Cagney <cagney@redhat.com>
7075
7076 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7077 @bfd_file_ptr@.
7078 * bfd-in2.h: Re-generate.
7079
7080 2004-02-14 Andrew Cagney <cagney@redhat.com>
7081
7082 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7083 _LARGEFILE64_SOURCE.
7084
7085 2004-02-13 Andrew Cagney <cagney@redhat.com>
7086
7087 * elf.c (vma_page_aligned_bias): New function.
7088 (assign_file_positions_except_relocs)
7089 (assign_file_positions_for_segments): Replace broken modulo
7090 arithmetic with call to vma_page_aligned_bias.
7091
7092 2004-02-11 Andrew Cagney <cagney@redhat.com>
7093
7094 * bfd-in.h: Update copyright.
7095 (bfd_tell): Change return type to file_ptr.
7096 * bfd-in2.h: Re-generate.
7097 * cache.c: Update copyright.
7098 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7099 parameter.
7100 (close_one): Use real_ftell.
7101 * bfdio.c: Update copyright.
7102 (real_ftell, real_fseek): New functions.
7103 (bfd_tell): Use real_fseek and real_ftell, change return type to
7104 file_ptr.
7105 (bfd_seek): Use real_ftell and real_fseek, change type of
7106 file_position to a file_ptr.
7107 * libbfd-in.h: Update copyright.
7108 (real_ftell, real_fseek): Declare.
7109 * libbfd.h: Re-generate.
7110
7111 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7112 fseeko and fseeko64. Determine bfd_file_ptr.
7113 * configure: Re-generate.
7114 * config.in: Re-generate.
7115
7116 2004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7117
7118 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7119 * elf32-h8300.c: Likewise.
7120
7121 2004-02-09 Christian Vogel <vogelchr@vogel.cx>
7122 Nick Clifton <nickc@redhat.com>
7123
7124 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7125 GOT entries with no associated GOT subsection.
7126
7127 2004-02-09 Richard Sandiford <rsandifo@redhat.com>
7128
7129 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7130 * elf.c (swap_out_syms): Use it to decide whether local section
7131 symbols should be named.
7132 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7133 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7134 (elf_backend_name_local_section_symbols): Define.
7135 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7136
7137 2004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7138
7139 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7140 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7141 finalize pass.
7142
7143 2004-01-30 Alexandre Oliva <aoliva@redhat.com>
7144
7145 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7146 to bfd_link_hash_entry passed by reference to
7147 _bfd_generic_link_add_one_symbol.
7148
7149 2004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7150
7151 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7152 relocations against dynamic symbols.
7153
7154 2004-01-23 Daniel Jacobowitz <drow@mvista.com>
7155
7156 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7157 change.
7158
7159 2004-01-21 Tom Rix <tcrix@worldnet.att.net>
7160
7161 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7162 * bfd-in2.h, libbfd.h: Rebuilt.
7163
7164 2004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7165
7166 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7167 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7168 flag has been cleared.
7169
7170 2004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7171
7172 * coff-h8300.c: Add and adjust comments about relaxation.
7173 * elf32-h8300.c: Likewise.
7174
7175 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7176
7177 * coff-h8300.c: Fix comment typos.
7178 * elf32-h8300.c: Likewise.
7179
7180 2004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7181
7182 * coff-h8300.c: Add comments about relaxation.
7183 * elf32-h8300.c: Likewise.
7184
7185 2004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7186
7187 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7188 throughout.
7189 * aclocal.m4: Regenerate.
7190 * configure: Regenerate.
7191
7192 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7193
7194 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7195 mips_elf64_rtype_to_howto instead of using howto_table.
7196
7197 2004-01-13 Daniel Jacobowitz <drow@mvista.com>
7198
7199 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7200 the .plt section.
7201 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7202 relocs which would not use the PLT.
7203
7204 2004-01-13 Alan Modra <amodra@bigpond.net.au>
7205
7206 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7207 (ppc64_elf_gc_sweep_hook): Likewise.
7208 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7209
7210 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7211
7212 Adds linker relaxation support for bit manipulation insns like
7213 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
7214 bst, btst, bxor.
7215 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
7216 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
7217 * coff-h8300.c: Opcode for bit manipulation insn is checked in
7218 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7219
7220 2004-01-12 Alan Modra <amodra@bigpond.net.au>
7221
7222 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7223
7224 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7225
7226 * elf32-h8300.c: Fix formatting.
7227
7228 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7229
7230 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7231 dynamic object is present. Declare r_symndx and h in an inner
7232 scope.
7233 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7234
7235 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
7236
7237 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7238 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7239 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7240 identically. Do not emit PC24 relocations for shared libraries.
7241 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7242 identically. Don't adjust pc_count.
7243 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7244 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7245 adjust count for branch relocations.
7246 (allocate_dynrelocs): Correct typo in call to
7247 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7248 PC24 or PLT32 relocs when linking.
7249
7250 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7251
7252 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7253 relocation howto with ARM_26 one for consistency.
7254 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7255 that will be converted to ARM_26D ones, since we always want 'done'
7256 relocations to be reflected in section's data.
7257 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7258 offset.
7259 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7260 requested.
7261
7262 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7263
7264 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7265 are not partial_inplace during a relocatable link.
7266
7267 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7268
7269 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
7270 if no dynamic object is present. Declare r_symndx and h in an
7271 inner scope.
7272
7273 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7274
7275 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7276 trampoline if it is known out of range.
7277
7278 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
7279
7280 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7281 * elf32-frv.c (_frv_osec_readonly_p): New.
7282 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7283 undefweak symbol.
7284 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7285 (elf32_frv_relocate_section): Likewise. Error out if attempting
7286 to emit rofixups or dynamic relocs in read-only segments. Use
7287 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7288 dynamic relocations.
7289 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7290 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7291 relocations or fixups involving merged sections correctly. Avoid
7292 crash when undefined symbol is referenced by R_FRV_32 or
7293 R_FRV_FUNCDESC_VALUE.
7294 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7295 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7296 input section holding local symbol to addend of R_FRV_32 or
7297 R_FRV_FUNCDESC_VALUE dynamic relocation.
7298 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7299 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7300 (elf32_frv_always_size_sections): Don't store pointer to
7301 __stacksize symbol in sec_info.
7302 (elf32_frv_modify_segment_map): Look it up here.
7303 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7304 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7305 of the lazy PLT entry, not only its offset, as the low word of a
7306 function descriptor.
7307 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7308 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7309 if a hash table entry already exists but is not a definition.
7310 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7311 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7312 (_frv_add_rofixup): Don't inline.
7313 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7314 for undefweak symbols.
7315 (elf32_frv_relocate_section): Avoid crash while computing
7316 relocation when linking with shared library. Only emit rofixups
7317 and dynamic relocations for alloc&load sections. Mark binaries
7318 with inter-segment relocations for relocation as a unit.
7319 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7320 (DEFAULT_STACK_SIZE): New.
7321 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7322 emit rofixups or dynamic relocs when linking dynamic non-PIE
7323 executables.
7324 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7325 shared libs too. Reserve the last entry for the GOT pointer.
7326 (elf32_frv_finish_dynamic_sections): Emit it.
7327 (elf32_frv_always_size_sections): New.
7328 (elf32_frv_modify_segment_map): New.
7329 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7330 sections.
7331 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7332 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7333 (elf_backend_always_size_sections): New.
7334 (elf_backend_modify_segment_map): New.
7335 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7336 * config.bfd: Added frv-*-*linux*.
7337 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7338 ABS section, instead of crashing.
7339 (elf32_frv_relocate_section): Don't crash before warning about
7340 different segments in non-PIC relocation.
7341 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7342 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7343 relocs to undefweak symbols.
7344 (elf32_frv_relocate_section): Ditto for undefined symbols.
7345 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7346 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7347 gotfixup section was created.
7348 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7349 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7350 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7351 complain_overflow_signed.
7352 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7353 have not been allocated.
7354 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7355 privfd only if dynamic sections were created.
7356 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7357 for GPREL relocs. When linking relocatable FDPIC executables,
7358 emit warnings for relocations that would be illegal on PIE or
7359 shared libraries. Emit rofixup for R_FRV_32 only if input object
7360 is not FDPIC.
7361 (_frv_create_got_section): Define _gp symbol in the rofixup
7362 section.
7363 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7364 dynamic sections missing, error out requesting -melf32frvfd.
7365 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7366 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7367 computation of addends from section and global or local symbol
7368 value. Change return type to bfd_boolean, and return a failure if
7369 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7370 nonzero addend is required.
7371 (elf32_frv_relocate_section): Likewise. Print error for
7372 unsupported nonzero addends.
7373 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7374 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7375 force everything local.
7376 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7377 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7378 (frv_gotfixup_section): New.
7379 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7380 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7381 and relocsfdv.
7382 (_frv_add_rofixup): New.
7383 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7384 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7385 improve some ugly conditions.
7386 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7387 relocations in fdpic.
7388 (_frv_create_got_section): Create .rofixup.got section.
7389 (struct _frv_dynamic_got_info): Added fixups.
7390 (_frv_count_got_plt_entries): Account in-GOT relocations into
7391 relocs32, relocsfd and relocsfdv. Account them into relocs or
7392 fixups, as appropriate.
7393 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7394 sizing of gotrel.
7395 (elf32_frv_finish_dynamic_sections): Verify that the right number
7396 of relocations and fixups was generated.
7397 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7398 relocsfdv.
7399 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7400 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7401 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7402 descriptor of a (formerly-)global symbol is local.
7403 (struct frv_pic_relocs_info): Adjust comments.
7404 (_frv_emit_got_relocs_plt_entries): Adjust.
7405 (elf32_frv_relocate_section): Likewise.
7406 (_frv_count_got_plt_entries): Likewise.
7407 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7408 symbol's value to addend in the common preamble. Decay dynamic
7409 symbols to section+offset if they bind or call locally, for GOT
7410 and FUNCDESC_VALUE, respectively.
7411 (elf32_frv_relocate_section): Likewise.
7412 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7413 internal or hidden visibility.
7414 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7415 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7416 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7417 (elf32_frv_relocate_section): Pass relocation addend in. Use
7418 original relocation addend to look up the got relocs/plt entries
7419 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7420 processing relocations that reference .scommon symbols.
7421 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
7422 Introduce support for dynamic linking.
7423 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7424 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7425 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7426 (frv_reloc_type_lookup): Return REL howtos for executables and
7427 dynamic libraries.
7428 (frv_info_to_howto_rel): New.
7429 (struct frv_elf_link_hash_table): New.
7430 (frv_hash_table, frv_got_section, frv_gotrel_section,
7431 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7432 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7433 (frv_elf_link_hash_table_create): New.
7434 (struct frv_pic_relocs_info): New.
7435 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7436 (frv_pic_relocs_info_find): New.
7437 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7438 New.
7439 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7440 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7441 (_frv_emit_got_relocs_plt_entries): New.
7442 (elf32_frv_relocate_section): Add support for dynamic linking.
7443 Handle new relocations.
7444 (_frv_create_got_section): New.
7445 (elf32_frv_create_dynamic_sections): New.
7446 (ELF_DYNAMIC_INTERPRETER): New.
7447 (struct _frv_dynamic_got_info): New.
7448 (_frv_count_got_plt_entries): New.
7449 (struct _frv_dynamic_got_plt_info): New.
7450 (_frv_compute_got_alloc_data): New.
7451 (_frv_get_got_entry, _frv_get_fd_entry): New.
7452 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7453 (_frv_resolve_final_relocs_info): New.
7454 (elf32_frv_size_dynamic_sections): New.
7455 (elf32_frv_finish_dynamic_sections): New.
7456 (elf32_frv_adjust_dynamic_symbol): New.
7457 (elf32_frv_finish_dynamic_symbol): New.
7458 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7459 whole thing works.
7460 (elf_info_to_howto_rel): Define.
7461 (bfd_elf32_bfd_link_hash_table_create): Define.
7462 (elf_backend_create_dynamic_sections): Define.
7463 (elf_backend_adjust_dynamic_symbol): Define.
7464 (elf_backend_size_dynamic_sections): Define.
7465 (elf_backend_finish_dynamic_symbol): Define.
7466 (elf_backend_finish_dynamic_sections): Define.
7467 (elf_backend_want_got_sym): Define.
7468 (elf_backend_got_header_size): Define.
7469 (elf_backend_want_got_plt): Define.
7470 (elf_backend_plt_readonly): Define.
7471 (elf_backend_want_plt_sym): Define.
7472 (elf_backend_plt_header_size): Define.
7473 (elf_backend_may_use_rel_p): Define.
7474 (elf_backend_may_use_rela_p): Define.
7475 (elf_backend_default_use_rela_p): Define.
7476 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
7477 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7478 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7479 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7480 (frv_reloc_map): Map the corresponding BFD relocs to them.
7481 (frv_reloc_type_lookup): ... and back to BFD relocs.
7482 * reloc.c: New relocs.
7483 * bfd-in2.h, libbfd.h: Rebuilt.
7484 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
7485 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7486 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7487 R_FRV_FUNCDESC_GOTLO): New.
7488 (frv_reloc_map): Map the corresponding BFD relocs to them.
7489 (frv_reloc_type_lookup): ... and back to BFD relocs.
7490 * reloc.c: New relocs.
7491 * bfd-in2.h, libbfd.h: Rebuilt.
7492
7493 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7494
7495 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7496 targets to support pages of up to 64kB.
7497 (elf32_bed): Redefine to get a separate backend data structure for
7498 traditional targets.
7499 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7500 targets to support pages of up to 64kB.
7501 (elf64_bed): Redefine to get a separate backend data structure for
7502 traditional targets.
7503 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7504 targets to support pages of up to 64kB.
7505 (elf32_bed): Redefine to get a separate backend data structure for
7506 traditional targets.
7507
7508 2004-01-04 Mark Kettenis <kettenis@gnu.org>
7509
7510 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7511
7512 2004-01-02 Mark Kettenis <kettenis@gnu.org>
7513
7514 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7515 (elf_i386_grok_psinfo): Likewise.
7516
7517 2004-01-02 Bernardo Innocenti <bernie@develer.com>
7518
7519 * config.bfd: Add m68k-uClinux target.
7520
7521 2004-01-01 Grant Edwards <grante@visi.com>
7522
7523 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7524 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7525 (elf32_h8_gc_sweep_hook): New function.
7526 (elf_backend_gc_mark_hook): Define.
7527 (elf_backend_gc_sweep_hook): Define.
7528 (elf_backend_can_gc_sections): Define.
7529
7530 For older changes see ChangeLog-0203
7531 \f
7532 Local Variables:
7533 mode: change-log
7534 left-margin: 8
7535 fill-column: 74
7536 version-control: never
7537 End: