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