]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
* lib/ld-lib.exp (is_elf_format): Match NetBSD ELF targets.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
cf3d882d
AM
12002-12-08 Alan Modra <amodra@bigpond.net.au>
2
3 * bfd-in.h: Comment typo fix. Formatting.
4 * bfd-in2.h: Regenerate.
5 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
6 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
7 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
8
2f9bd3f6
RH
92002-12-05 Richard Henderson <rth@redhat.com>
10
11 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
12 Only send PCREL21B though the plt. Fix installed reloc type.
13 (elfNN_ia64_relocate_section): Give error for dynamic reloc
14 against PCREL22 or PCREL64I; clean up error messages for
15 branch relocs.
16
d0112f73
KB
172002-12-04 Kevin Buettner <kevinb@redhat.com>
18
19 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
20 New functions.
21 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
22
c10d9d8f
JW
232002-12-04 David Mosberger <davidm@hpl.hp.com>
24
25 * cpu-ia64-opc.c: Add operand constant "ar.csd".
26
d48770d4
L
272002-12-04 H.J. Lu <hjl@gnu.org>
28
29 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
30 BFD address when constructing local name.
31
b6152c34
AS
322002-12-04 Andreas Schwab <schwab@suse.de>
33
34 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
35 member.
36 (elf_m68k_link_hash_table_create): Initialize it.
37 (elf_m68k_check_relocs): Handle symbols that are forced to be
38 local due to visibility changes.
39 (elf_m68k_adjust_dynamic_symbol): Likewise.
40 (elf_m68k_size_dynamic_sections): Likewise.
41 (elf_m68k_discard_copies): Likewise.
42 (elf_m68k_relocate_section): Likewise.
43
73374ef1
AM
442002-12-04 Alan Modra <amodra@bigpond.net.au>
45
46 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
47
c5c1944d
AM
482002-12-04 Alan Modra <amodra@bigpond.net.au>
49
50 * srec.c (srec_write_symbols): Restore '$' prefix to address
51 accidentally removed in 2002-04-04 change.
52 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
53
e1a9cb8e
NC
542002-12-03 Nick Clifton <nickc@redhat.com>
55
56 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
57 (apuinfo_list_add): New function: Add a value to the list.
58 (apuinfo_list_length): New function: Return the number of
59 values on the list.
60 (apuinfo_list_element): New function: Return a value on the
61 list.
62 (apuinfo_list_finish): New function: Free the resources used
63 by the list.
64 (ppc_elf_begin_write_processing): New function. Scan the
65 input bfds for apuinfo sections.
66 (ppc_elf_write_section): New function: Delay the creation of
67 the contents of an apuinfo section in an output bfd.
68 (ppc_elf_final_write_processing): New function. Create the
69 contents of an apuinfo section in an output bfd.
70 (elf_backend_begin_write_processing): Define.
71 (elf_backend_final_write_processing): Define.
72 (elf_backend_write_section): Define.
e1a9cb8e 73
a823923b
RH
742002-12-03 Richard Henderson <rth@redhat.com>
75
76 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
77
30491647
SC
782002-12-01 Stephane Carrez <stcarrez@nerim.fr>
79
80 Fix PR savannah/1417:
81 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
82 branch if it goes to the start of the deleted region.
83
bc7c6a90
SC
842002-12-01 Stephane Carrez <stcarrez@nerim.fr>
85
86 * bfd-in2.h (bfd_mach_m6812): Rebuild.
87 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
88 bfd_mach_m6812s): Declare.
89
90 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
91 (_bfd_m68hc12_elf_set_private_flags): Call it.
92 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
93 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
94 report microcontroller incompatibilities (HC12 vs HCS12).
95 (elf_backend_object_p): Update.
96
b34976b6
AM
972002-11-30 Alan Modra <amodra@bigpond.net.au>
98
99 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
100 (enum bfd_boolean, boolean): Delete.
101 (bfd_boolean): Typedef to an int.
102 (FALSE, TRUE): Define.
103 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
104 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
105 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
106 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
107 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
108 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
109 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
110 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
111 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
112 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
113 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
114 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
115 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
116 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
117 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
118 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
119 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
120 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
121 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
122 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
123 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
124 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
125 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
126 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
127 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
128 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
129 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
130 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
131 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
132 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
133 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
134 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
135 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
136 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
137 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
138 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
139 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
140 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
141 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
142 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
143 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
144 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
145 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
146 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
147 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
148 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
149 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
150 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 151 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
152 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
153 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
154 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
155 of bfd_boolean vars with TRUE/FALSE. Formatting.
156 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
157
947216bf
AM
1582002-11-28 Alan Modra <amodra@bigpond.net.au>
159
160 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
161 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
162 with Elf_Internal_Rela.
163 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
164 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
165 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
166 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
167 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
168 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
169 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
170 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
171 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
172 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
173 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
174 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
175 throughout instead.
176 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
177 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
178 Remove INLINE keyword.
179 (elf_swap_reloc_in): Likewise. Also clear r_addend.
180 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
181 as a bfd_byte *.
182 (elf_write_relocs): Consolidate REL and RELA code.
183 (elf_slurp_reloc_table_from_section): Simplify REL code.
184 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
185 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
186 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
187 RELA code.
188 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
189 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
190 (elf_link_output_relocs): Likewise.
191 (elf_reloc_link_order): Likewise.
192 (elf_finish_pointer_linker_section): Likewise.
193 (struct elf_link_sort_rela): Remove union.
194 (elf_link_sort_cmp1): Update to suit.
195 (elf_link_sort_cmp2): Here too.
196 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
197 over-allocation for int_rels_per_ext_rel != 1 case.
198 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
199 * elf32-i386.c: Likewise.
200 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
201 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
202 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
203 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
204 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
205 elf64-sparc.c, elf64-x86-64.c: Likewise.
206 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
207 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
208 bfd_elf32_swap_reloc_in.
209
210 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
211 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
212 (mips_elf64_swap_reloc_in): Zero r_addend.
213 (mips_elf64_be_swap_reloc_in): Likewise.
214 (mips_elf64_slurp_one_reloc_table): Simplify.
215
216 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
217 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
218 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
219
1448fa32
KK
2202002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
221
222 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 223 unresolved debugging relocs in dynamic applications.
1448fa32
KK
224 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
225
73722af0
AM
2262002-11-26 Alan Modra <amodra@bigpond.net.au>
227
228 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
229 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
230 on a relocatable link. Comment typos.
231 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
232 in the order they are declared. Clear elf_hash_value too.
233 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
234 eh_info and tls_segment.
235 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
236 sorted when discarding relocs by turning them into R_*_NONE.
237
238 * libbfd.c (warn_deprecated): Comment spelling.
239 * po/SRC-POTFILES.in: Regenerate.
240
7c25b72c
RH
2412002-11-21 Richard Henderson <rth@redhat.com>
242
243 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
244 arch's st_other bits when merging visibilities.
245 (elf_link_output_extsym): Tidy clearing of visibility field.
246
dc12c51f
AM
2472002-11-21 Alan Modra <amodra@bigpond.net.au>
248
249 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
250 (SWAP_OUT_RELOC_OFFSET): Define.
251
963f13ec
AO
2522002-11-20 Alexandre Oliva <aoliva@redhat.com>
253
254 * elf.c (_bfd_elf_link_hash_table_init): Make sure
255 can_refcount is properly extended to the type of
256 init_refcount.
257
ee6423ed
AO
2582002-11-19 Alexandre Oliva <aoliva@redhat.com>
259
4ffba85c
AO
260 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
261 (_bfd_mips_elf_relocate_section): Use it.
262
ee6423ed
AO
263 * elfxx-mips.c (MNAME): New macro.
264 (_bfd_mips_elf_check_relocs): Use it.
265 (_bfd_mips_elf_discard_info): Likewise.
266 (_bfd_mips_elf_final_link): Likewise.
267
cdcf6e38
AM
2682002-11-19 Alan Modra <amodra@bigpond.net.au>
269
270 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
271 rel_hdr.sh_size too.
272
93509525
KD
2732002-11-18 Klee Dienes <kdienes@apple.com>
274
275 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
276 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
277 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
278 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
279 Add dependencies for bfdwin.c, bfdio.c.
280 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
281 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
282 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
283 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
284 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
285 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
286 bfd_get_size (moved from libbfd.c and bfd.c).
287 * bfdwin.c New file. Contains _bfd_window_internal,
288 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
289 libbfd.c and bfd.c).
290 * po/SRC-POTFILES.in: Regenerate.
291 * po/bfd.pot: Regenerate.
292 * libbfd.h: Regenerate.
293 * bfd-in2.h: Regenerate.
294 * aclocal.m4: Regenerate.
295 * Makefile.in: Regenerate.
296 * configure: Regenerate.
297
3ae41454
AM
2982002-11-18 Klee Dienes <kdienes@apple.com>
299
300 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
301
e514ac71
NC
3022002-11-15 Kazu Hirata <kazu@cs.umass.edu>
303
304 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
305 jsr after a short jump.
306 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
307
eddc4f81
KD
3082002-11-15 Klee Dienes <kdienes@apple.com>
309
310 * pef.c (bfd_pef_convert_architecture): Move declaration of
311 ARCH_POWERPC and ARCH_M68K to the start of the function.
312
51908eee
SS
3132002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
314
315 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
316
3416d2e7
HPN
3172002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
318
319 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
320 For bpo_gregs_section->contents, allocate _raw_size, not
321 _cooked_size.
322
b1c58715
AM
3232002-11-13 Klee Dienes <kdienes@apple.com>
324
325 * config.bfd: Add entries for powerpc-*-darwin and cousins.
326
077ca68b
L
3272002-11-13 H.J. Lu <hjl@gnu.org>
328
329 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
330
e84d6fca
AM
3312002-11-13 Klee Dienes <kdienes@apple.com>
332 Alan Modra <amodra@bigpond.net.au>
333
334 * bfd.c (struct bfd_preserve): New.
335 (bfd_preserve_save): New function.
336 (bfd_preserve_restore): Ditto.
337 (bfd_preserve_finish): Ditto.
338 * bfd-in2.h: Regenerate.
339 * mach-o.c: Formatting.
340 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
341 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
342 (bfd_mach_o_core_p): Ditto.
343 (bfd_mach_o_scan): Pass in mdata.
344 * mach-o.h (bfd_mach_o_scan): Update prototype.
345 * pef.c: Formatting.
346 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
347 (bfd_pef_xlib_object_p): Ditto.
348 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
349 * pef.h (bfd_pef_scan): Update prototype.
350 * xsym.c: Formatting, K&R fixes.
351 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
352 (bfd_sym_scan): New function split out from bfd_sym_object_p.
353 * xsym.h (bfd_sym_scan): Declare.
354 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 355 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
356 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
357
cd24c222
NC
3582002-11-12 Nick Clifton <nickc@redhat.com>
359
360 * po/da.po: Updated Danish translation.
361
99eb2ac8
AM
3622002-11-12 Alan Modra <amodra@bigpond.net.au>
363
d6fe2dc1
AM
364 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
365 relocatable link too.
366 (elf_link_input_bfd): When emitting relocs, adjust offsets for
367 eh_frame and stab sections. Zap deleted relocs.
368 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
369 (elf_bfd_discard_info): Run for relocatable link too.
370 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
371 Handle ld -r case.
372 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
373 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
374
126495ed
AM
375 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
376 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
377 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
378 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
379 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
380 (struct elf_link_hash_table): Add eh_info.
381 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
382 (_bfd_elf_discard_section_eh_frame): Update prototype.
383 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
384 (_bfd_elf_write_section_eh_frame): Likewise.
385 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
386 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
387 param. Get "hdr_info" from link hash table.
388 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
389 header section from link hash table. Save header section to elf_tdata.
390 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
391 header section from link hash table. Don't alloc hdr_info. Clear
392 hdr_sec instead of setting "strip".
393 (_bfd_elf_eh_frame_section_offset): Formatting.
394 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
395 Get header section from link hash table.
396 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
397 Get header section from link hash table.
398 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
399 (get_program_header_size): Likewise.
400 (_bfd_elf_section_offset): Formatting.
401 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
402 section pointer in link hash table.
403 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
404 and _bfd_elf_write_section_eh_frame calls. Update comment about
405 eh_frame entries.
406 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
407 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
408
409 * po/SRC-POTFILES.in: Regenerate.
410
99eb2ac8
AM
411 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
412 relocs for discarded FDEs. Remove dead code.
413 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
414 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
415 Tidy conditions under which stabs are edited. Formatting.
416 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
417 from discarded relocs.
418 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
419 section adjustments after testing magic values.
420
7c319a27
AM
4212002-11-12 Thomas Moestl <tmm@FreeBSD.org>
422
423 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
424 references to large plt symbols.
425
a95a4550
AM
4262002-11-12 Klee Dienes <kdienes@apple.com>
427
428 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
429 looking for an unused section name.
430
bc7eab72
KH
4312002-11-11 Kazu Hirata <kazu@cs.umass.edu>
432
433 * coff-h8300.c: Fix formatting.
434 * elf32-h8300.c: Likewise.
435 * reloc16.c: Likewise.
436
52585bb8
AM
4372002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
438
439 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
440 section when dynamic section unused; _bfd_strip_section_from_output
441 instead.
442
9f632188
AM
4432002-11-08 Alan Modra <amodra@bigpond.net.au>
444
207b304b
AM
445 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
446 and sym_vec.
3b029f65 447
9f632188
AM
448 * dwarf2.c: Revert last change.
449
ec4530b5
NC
4502002-11-07 Michal Ludvig <mludvig@suse.cz>
451
452 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
453 _bfd_dwarf2_find_nearest_line): Use
454 bfd_simple_get_relocated_section_contents() instead of
455 bfd_get_section_contents().
456 * reloc.c (bfd_perform_relocation): Add sanity check.
457 * simple.c (simple_get_relocated_section_contents): If the section
458 does not have any relocs associated with it, just return the
459 unadjusted contents.
460
205cfeb0
HPN
4612002-11-07 Hans-Peter Nilsson <hp@axis.com>
462
463 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
464 case R_CRIS_32_GOT>: Correct test for filling in constant .got
465 contents, enabling for a non-DSO, for symbols defined in the
466 program with --export-dynamic.
467
87e226ce
AM
4682002-11-07 Alan Modra <amodra@bigpond.net.au>
469
470 * elf64-ppc.c: Comment typo fixes.
471 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
472
235c4794
NC
4732002-11-07 Nick Clifton <nickc@redhat.com>
474
475 * po/da.po: Updated Danish translation.
476
49179469
AO
4772002-11-06 Alexandre Oliva <aoliva@redhat.com>
478
479 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
480 exactly three internal relocs per external reloc. Set reloc_count
481 to the external reloc count.
482
246178f2
NC
4832002-11-06 Klee Dienes <kdienes@apple.com>
484
3ae41454 485 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
486 Fix comment formatting.
487
3af9a47b
NC
4882002-11-06 Klee Dienes <kdienes@apple.com>
489
3ae41454 490 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
491 xsym.lo.
492 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
493 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
494 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
495 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
496 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
497 sym.
3ae41454 498 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
499 * Makefile.in: Regenerate.
500 * doc/Makefile.in: Regenerate.
3ae41454 501 * bfd-in2.h: Regenerate.
3af9a47b
NC
502 * xsym.c: New file. Contains support for the Apple/Metrowerks
503 xSYM debugging format.
504 * xsym.h: New file.
505 * pef.c: New file. Contains support for the Apple Code Fragment
506 Manager Preferred Executable Format
507 * pef.h: New file.
508 * pef-traceback.h: New file. Contains support for parsing PowerPC
509 traceback tables as used by PEF executables (and perhaps other
510 systems as well).
3ae41454 511 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
512 format.
513 * mach-o.h: New file.
514 * mach-o-target.c: New file. Declares the mach-o targets
515 themselves. Included three times by mach-o.c; each time with a
516 different set of macros set.
3ae41454 517
b6821651 5182002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
519
520 * Makefile.am: Remove entries for elf32-qnx.[ch].
521 * Makefile.in: Regenerate.
522 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
523 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
524 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
525 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
526 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
527 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
528 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
529 * configure: Regenerate.
530 * elf32-qnx.c: Remove.
531 * elf32-qnx.h: Remove.
532 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
533 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
534 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
535 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
536 * elf32-i386.c: Remove QNX extended bfd support.
537 * elf32-ppc.c: Remove QNX extended bfd support.
538 * elf32-sh.c: Remove QNX extended bfd support.
539 * elfarm-nabi.c: Remove QNX extended bfd support.
540 * targets.c: Remove qnx vectors.
541 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
542 (elf_backend_is_contained_by_filepos): Remove.
543 (elf_backend_copy_private_bfd_data_p): Remove.
544 * po/SRC-POTFILES.in: Regenerate.
545
b6821651
AM
5462002-11-06 David O'Brien <obrien@FreeBSD.org>
547 Alan Modra <amodra@bigpond.net.au>
548
549 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
550 dynamic relocs against section symbols for the output section vma.
551
5522002-11-05 Alan Modra <amodra@bigpond.net.au>
553
554 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
555 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
556
08f74004
AM
5572002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
558 Alan Modra <amodra@bigpond.net.au>
559
560 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
561 vectors in target_selvecs.
562 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
563 in target_selvecs.
564 (sh-*-netbsdelf*): Likewise.
565 * configure.in (assocvecs): New variable. Handle assocvecs like
566 selvecs.
567 * configure: Regenerate.
568 * format.c (bfd_check_format_matches): Store bfd_target pointers
569 in matching_vector instead of target names. Select first target
570 from bfd_associated_vector that matches a list of ambiguous targets.
571 * targets.c (_bfd_associated_vector): New array.
572 (bfd_associated_vector): New variable.
573 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
574 * libbfd-in.h (bfd_associated_vector): Declare.
575 * libbfd.h: Regenerate.
576
89117aab
AM
5772002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
578
579 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
580 non-NULL before dereferencing.
581
5e9aae3e
KK
5822002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
583
584 * vms.c (vms_object_p): Restore the start address when returning
585 NULL.
586
c97e73dd
AM
5872002-11-04 Alan Modra <amodra@bigpond.net.au>
588 Hans-Peter Nilsson <hp@axis.com>
589
590 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
591 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
592 Set up a larger symshndxbuf, and write it out. Free it on
593 exit rather than freeing symbuf twice. Correct section index
594 on output section symbol loop.
595 (elf_link_output_sym): Accumulate symbol extension section
596 indices, reallocating symshndxbuf rather than writing it out.
597 (elf_link_flush_output_syms): Don't flush symshndxbuf.
598 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
599 Use bfd_zalloc to clear i_shdrp[0] too.
600
3463048e
SC
6012002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
602
603 * elf32-sh64-com.c (sh64_address_in_cranges): Use
604 _raw_size of cranges section if _cooked_size not yet set.
605
63a23799
HPN
6062002-11-03 Hans-Peter Nilsson <hp@axis.com>
607
608 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
609 for bfd_elf32_swap_symbol_out.
610
e68cc12e
DB
6112002-10-31 David O'Brien <obrien@FreeBSD.org>
612
613 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
614 signed and unsigned in comparison.
615
db4b6d01
DJ
6162002-10-30 Daniel Jacobowitz <drow@mvista.com>
617
618 * coffcode.h: Remove extraneous '\'.
619
840f0243
L
6202002-10-28 H.J. Lu <hjl@gnu.org>
621
622 * Makefile.am (targets.lo): Depend on Makefile instead of
623 config.status.
624 (archures.lo): Likewise.
625 * Makefile.in: Regenerated.
626
05a7e2db
JT
6272002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
628
629 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
630 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
631 targ_selvecs.
632
a0087177
JW
6332002-10-25 Jim Wilson <wilson@redhat.com>
634
635 * elf64-sh64.c (sh_elf64_relocate_section): Call
636 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
637 of SHF_MERGE section.
638
8718ac9c
HPN
6392002-10-25 Hans-Peter Nilsson <hp@axis.com>
640
641 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
642
d45913a0
DA
6432002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
644
645 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
646 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
647 unsigned int.
648 (NAME(aout,final_link)): Cast enum used in assignment.
649 (aout_link_write_symbols): Cast enums in comparisons, int values to
650 boolean, enums in assignments to int.
651 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
652 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
653 with unsigned ints.
654 (aout_link_reloc_link_order): Cast enum to int in assignment.
655 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
656 calls to char *.
657 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
658 assignment.
659 * bfd-in2.h (bfd_set_section_vma): Likewise.
660 * bfd.c (bfd_record_phdr): Cast enums in assignments.
661 * binary.c (bfd_alloc): Cast enum to long.
662 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
663 * dwarf2.c (read_abbrevs): Add casts to enum types.
664 (read_attribute_value): Likewise.
665 (arange_add): Cast result of bfd_zalloc call.
666 (comp_unit_contains_address): Return true and false.
667 (comp_unit_find_nearest_line): Cast return to boolean.
668 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
669 * gen-aout.c: define macro '_' if not defined.
670 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
671 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
672 (bfd_write_bigendian_4byte_int): Cast return to boolean.
673 (bfd_seek): Cast bfd_realloc to bfd_byte *.
674 (bfd_generic_is_local_label_name): Cast return to boolean.
675 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
676 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
677 struct bfd_hash_entry *.
678 (_bfd_generic_link_hash_newfunc): likewise.
679 (_bfd_generic_final_link): Cast enum to unsigned int.
680 * merge.c (sec_merge_emit): Cast return to boolean.
681 (merge_strings): Add casts to const unsigned char *.
682 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
683 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
684 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
685 struct bfd_hash_entry *.
686 (bfd_set_section_content): Add cast to PTR in comparison.
687 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
688 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
689 simple_dummy_unattached_reloc,
690 bfd_simple_get_relocated_section_contents): Add K&R declarations and
691 function definitions.
692 * srec.c (S3Forced): Initialize to false.
693 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
694 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
695 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
696 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
697 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
698 comparisons.
699
475c2a7e
JJ
7002002-10-23 Jakub Jelinek <jakub@redhat.com>
701
702 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
703 relocs into shared lib non-allocated reloc sections.
704
e82ce529
AM
7052002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
706
707 * dwarf2.c (add_line_info): Ensure that the line_info_table is
708 sorted even when given an out-of-order line sequence.
709 (lookup_address_in_line_info_table): When an exact VMA match is
710 not found, return line information with the closest VMA.
711
f2482cb2
NC
7122002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
713
714 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
715 HPUX 11.00 patch PHSS_26559.
716
c1fd6598
AO
7172002-10-22 Alexandre Oliva <aoliva@redhat.com>
718
719 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
720 the options section into a separate section unless IRIX 6
721 compatibility is enabled.
722
033fd5f9
AO
7232002-10-22 Alexandre Oliva <aoliva@redhat.com>
724
725 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
726 into arrays.
727 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
728 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
729 into account.
730 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
731 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
732
ef485c01
AM
7332002-10-21 Graeme Peterson <gp@qnx.com>
734
735 * targets.c (_bfd_target_vector): Add missing qnx vectors.
736
b50afec9
AM
7372002-10-21 Alan Modra <amodra@bigpond.net.au>
738
739 * targets.c (bfd_target_list): Don't return the default target twice.
740
5fe39cae
AM
7412002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
742
743 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
744 perror with bfd_perror.
745
5d603aa9
L
7462002-10-19 H.J. Lu <hjl@gnu.org>
747
748 * elflink.h (elf_link_add_object_symbols): Correctly handle
749 DT_RPATH and DT_RUNPATH.
750
e377ab71
MK
7512002-10-19 Mark Kettenis <kettenis@gnu.org>
752
753 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
754
0d09fec6
DC
7552002-10-17 Denis Chertykov <denisc@overta.ru>
756
757 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
758 for ip2k port.
759
acf8aed4
AM
7602002-10-17 Alan Modra <amodra@bigpond.net.au>
761
762 * elfxx-target.h (USE_REL): Don't define as 1.
763 * elf32-arm.h (USE_REL): Provide a default define of 0.
764 Use #if rather than #ifdef when testing USE_REL.
765 * elf32-m32r.c: Likewise.
766
767 * elf32-arc.c (USE_REL): Define as 1.
768 * elf32-d10v.c (USE_REL): Likewise.
769 * elf32-m32r.c (USE_REL): Likewise.
770 * elf32-m68hc11.c (USE_REL): Likewise.
771 * elf32-m68hc12.c (USE_REL): Likewise.
772 * elf32-or32.c (USE_REL): Likewise.
773 * elfarm-nabi.c (USE_REL): Likewise.
774
f52d1d64
JJ
7752002-10-16 Jakub Jelinek <jakub@redhat.com>
776
777 * config.bfd (s390-*-linux*): Add targ64_selvecs.
778 (s390x-*-linux*): Add targ_selvecs.
779
2bc3c89a
AM
7802002-10-16 Alan Modra <amodra@bigpond.net.au>
781
782 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 783 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
784 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
785 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
786 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
787 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
788 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
789 (SOURCE_HFILES): Add elf32-qnx.h.
790 (BUILD_HFILES): Add bfdver.h.
791 Run "make dep-am".
792 * Makefile.in: Regenerate.
793 * configure.in Update bfd vector dependencies.
794 * configure: Regenerate.
795 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
796 * elf32-i386qnx.c: Likewise.
797 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
798 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
799 * elf32-sh-lin.c: Likewise.
800 * elf32-shqnx.c: Likewise.
801 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
802 * elf32-sh64-nbsd.c: Likewise.
803 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
804 * elf64-sh64-nbsd.c: Likewise.
805 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
806 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
807 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
808 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
809 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
810 (elf_backend_is_contained_by_filepos): Likewise.
811 (elf_backend_copy_private_bfd_data_p): Likewise.
812 Globalize and move functions to..
813 * elf32-qnx.c: ..here. New file.
814 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
815 emit target vectors when INCLUDE_SHMEDIA.
816 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
817 end of file.
818 * elf64-sh64.c: Remove ELF_ARCH test.
819 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
820 * po/BLD-POTFILES.in: Regenerate.
821 * po/SRC-POTFILES.in: Regenerate.
822
90c9df85
AM
8232002-10-16 Alan Modra <amodra@bigpond.net.au>
824
366f2964
AM
825 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
826 loaded with --just-symbols.
827
90c9df85
AM
828 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
829 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
830 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
831 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
832
2238051f
RH
8332002-10-15 Richard Henderson <rth@redhat.com>
834
835 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
836 (BFD64_BACKENDS_CFILES): Likewise.
837 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
838 * elf64-alpha-fbsd.c: Remove file, move code ...
839 * elf64-alpha.c: ... here.
840 * Makefile.in, configure: Rebuild.
841
64e04ecd
RH
8422002-10-14 Richard Henderson <rth@redhat.com>
843
844 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
845 VALUE, not ADDEND.
846
396a6083
SC
8472002-10-14 Stephen Clarke <stephen.clarke@superh.com>
848
849 * elf32-sh.c (elf_sh_link_hash_entry): Replace
850 datalabel_got_offset with union of datalabel_got
851 offset and refcount.
852 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
853 (allocate_dynrelocs): Delete unnecessary code for
854 STT_DATALABEL type. Create entry in got for
855 datalabel version of symbol if datalabel_got.refcount > 0.
856 (sh_elf_relocate_section): Use datalabel_got union.
857 (sh_elf_gc_sweep_hook): Pull common code to initialize
858 h and eh out of switch statement. Declare seen_stt_datalabel.
859 Initialize it. Decrement datalabel_got.refcount for
860 got relocs when seen_stt_datalabel is true.
861 Decrement local_got_refcounts entry for datalabel got relocs
862 of local symbols.
863 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
864 (sh_elf_check_relocs): Declare seen_stt_datalabel.
865 Initialize it. When seen_stt_datalabel is true, increment
866 datalabel_got refcount rather than got.refcount.
867 (sh_elf_finish_dynamic_symbol): Create relocs to
868 initialize got entry for datalabel version of symbol.
869
6a0735ef
AM
8702002-10-14 Alan Modra <amodra@bigpond.net.au>
871
872 * Makefile.am: Run "make dep-am".
873 (BFD_H_FILES): Remove version.h.
874 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
875 * version.h: ..to here.
876 * configure.in (bfd_version_date): Remove.
877 (AC_OUTPUT): Make bfdver.h from version.h.
878 * bfd.c: #include "bfdver.h".
879 * vms-hdr.c: Likewise.
880 * Makefile.in: Regenerate.
881 * bfd-in2.h: Regenerate.
882 * configure: Regenerate.
883 * po/SRC-POTFILES.in: Regenerate.
884
686e4055
AM
8852002-10-14 Alan Modra <amodra@bigpond.net.au>
886
887 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
888 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
889 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
890 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
891 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
892 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
893 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
894 bfd_mach_ip2022, bfd_mach_ip2022ext,
895 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
896 * bfd-in2.h: Regenerate.
897
019dca2b
KK
8982002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
899
900 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
901 endian vector to targ_selvecs.
902
bce03d3d
AO
9032002-10-13 Alexandre Oliva <aoliva@redhat.com>
904
905 * elfxx-mips.c (mips_elf_calculate_relocation): Take
906 save_addend argument. Don't apply the 32-bit mask to a
907 GPREL32 value if it's to be used in another relocation. Don't
908 use forced-check computation of local_p to decide whether to
909 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
910 of the addend of a non-in-place GPREL16 relocation.
911 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
912 mips_elf_calculate_relocation().
913
9b691193
SC
9142002-10-12 Stephane Carrez <stcarrez@nerim.fr>
915
916 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
917 with symbols in other sections if we relaxed something; the sections
918 output offsets must be re-computed before.
919
1f4c5b47
SC
9202002-10-12 Stephane Carrez <stcarrez@nerim.fr>
921
922 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
923 handling to use Elf_Internal_Sym.
924 (m68hc11_elf_relax_delete_bytes): Likewise.
925
5dc97655
KK
9262002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
927
928 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
929 sh_elf_object_p, dtpoff_base): New functions.
930 (sh_elf_howto_table): Add TLS relocs.
931 (sh_reloc_map): Likewise.
932 (sh_elf_info_to_howto): Support TLS relocs.
933 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
934 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
935 New macros.
936 (sh_elf_obj_tdata): New.
937 (elf_sh_link_hash_table): Add tls_ldm_got.
938 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
939 (allocate_dynrelocs): Support TLS relocs.
940 (sh_elf_size_dynamic_sections): Likewise.
941 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
942 .rela.got section when found already. Return false after printing
943 error about unresolvable relocation.
944 (sh_elf_gc_sweep_hook): Support TLS relocs.
945 (sh_elf_check_relocs): Likewise.
946 (sh_elf_finish_dynamic_symbol): Likewise.
947 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
948 * reloc.c: Add SH TLS relocs.
949 * bfd-in2.h, libbfd.h: Regenerate.
950
6a0735ef
AM
9512002-10-11 Daniel Jacobowitz <drow@mvista.com>
952
953 * Makefile.in: Regenerated.
954
af39267e
DJ
9552002-10-11 Daniel Jacobowitz <drow@mvista.com>
956
957 * Makefile.am: Run dep-am.
6a0735ef 958 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
959 (BFD32_LIBS): Add simple.lo.
960 (BFD32_LIBS_CFILES): Add simple.c.
961 * Makefile.in: Regenerated.
962 * bfd-in2.h: Regenerated.
963 * simple.c: New file.
964
0be617ce
AM
9652002-10-11 Alan Modra <amodra@bigpond.net.au>
966
14a793b2
AM
967 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
968 (record_thumb_to_arm_glue): Likewise.
969 * ecoff.c (ecoff_link_add_externals): Likewise.
970 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
971 (record_thumb_to_arm_glue): Likewise.
972 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
973 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
974 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
975 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
976 * elf64-ppc.c (func_desc_adjust): Likewise.
977 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
978 (sh64_elf64_create_dynamic_sections): Likewise.
979 * elflink.c (_bfd_elf_create_got_section): Likewise.
980 (_bfd_elf_create_dynamic_sections): Likewise.
981 (_bfd_elf_create_linker_section): Likewise.
982 * elflink.h (elf_add_default_symbol): Likewise.
983 (elf_link_create_dynamic_sections): Likewise.
984 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
985 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
986 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
987 (_bfd_mips_elf_add_symbol_hook): Likewise.
988 (_bfd_mips_elf_create_dynamic_sections): Likewise.
989 * linker.c (generic_link_add_symbol_list): Likewise.
990 * xcofflink.c (xcoff_link_add_symbols): Likewise.
991
992 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
993
0be617ce 994 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 995 completely removed. Correct local sym adjustment.
0be617ce 996
0a4ef3f4
SC
9972002-10-10 Stephen Clarke <stephen.clarke@superh.com>
998
999 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1000 Correct mistake in calculation of address of .got.
1001 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
1002 elf_sh64_pic_plt_entry_le): Likewise.
1003
efacd36e
SC
10042002-10-09 Richard Shann <richard.shann@superh.com>
1005 Stephen Clarke <stephen.clarke@superh.com>
1006
1007 * Makefile.am: Add entries for elf32-sh64-lin.c and
1008 elf64-sh64-lin.c. Regenerate.
1009 * Makefile.in: Regenerate.
1010 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
1011 to use sh64 vectors rather than sh vectors.
1012 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
1013 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
1014 * configure: Regenerate.
1015 * elf32-sh64-lin.c: New file.
1016 * elf64-sh64-lin.c: New file.
1017 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
1018 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
1019
299bf759
L
10202002-10-08 H.J. Lu <hjl@gnu.org>
1021
1022 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
1023 IE->LE transition for R_386_TLS_IE.
1024
51020317
AM
10252002-10-08 Alan Modra <amodra@bigpond.net.au>
1026
1027 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
1028
a8fcf378
NC
10292002-10-07 Mark Elbrecht <snowball3@softhome.net>
1030
51020317
AM
1031 * cofflink.c (mark_relocs): Don't mark relocations in excluded
1032 sections.
a8fcf378 1033
a16d5acb
AM
10342002-10-07 Alan Modra <amodra@bigpond.net.au>
1035
a6b511bd
AM
1036 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
1037 code.
1038
a16d5acb
AM
1039 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
1040
7c4a37eb
AM
10412002-10-06 Alan Modra <amodra@bigpond.net.au>
1042
1043 * opncls.c: Formatting.
1044 (_bfd_new_bfd): Use a smaller section hash table.
1045
7c4ca42d
AO
10462002-10-05 Alexandre Oliva <aoliva@redhat.com>
1047
1048 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
1049 of the other two relocations packed with a REL32 to NONE.
1050
4989d792
SC
10512002-10-02 Stephen Clarke <stephen.clarke@superh.com>
1052
1053 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
1054 (sh_elf_link_hash_newfunc): Initialize it.
1055 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
1056 to got.refcount for symbols that are forced local or when
1057 we have direct got refs.
1058 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
1059 to correctly adjust got.refcount and plt.refcount.
1060 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
1061 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 1062
7c445aa3
JJ
10632002-10-01 Jakub Jelinek <jakub@redhat.com>
1064
1065 * elf32-i386.c (elf_i386_relocate_section): Fix
1066 movl foo@indntpoff, %eax IE->LE transition.
1067
abcf1d52
JJ
10682002-10-01 Jakub Jelinek <jakub@redhat.com>
1069
1070 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
1071 sequence and its transitions.
1072
a45bb67d
JJ
10732002-10-01 Jakub Jelinek <jakub@redhat.com>
1074
1075 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
1076 to st_value + addend in non-code sections.
1077 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
1078 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
1079
00707a0e 10802002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
1081 Ken Raeburn <raeburn@cygnus.com>
1082 Aldy Hernandez <aldyh@redhat.com>
1083 Eric Christopher <echristo@redhat.com>
1084 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
1085
1086 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
1087 (bfd_mach_mips5500): New.
1088 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
1089 (arch_info_struct): Add corresponding entries here.
1090 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
1091 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
1092 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
1093 bfd_mach_mips5400 and bfd_mach_mips5500.
1094 (_bfd_mips_elf_mach_extends_p): New function.
1095 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
1096 the EF_MIPS_MACH flags.
1097 * bfd-in2.h: Regenerate.
1098
624f0b25
JT
10992002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
1100
1101 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
1102 .got sections.
1103
b89fe0ee
AM
11042002-09-28 Alan Modra <amodra@bigpond.net.au>
1105
1106 * elf.c (map_sections_to_segments): Correct test for start of
1107 writable section in the same page as end of read-only section.
1108
b29635ba
JT
11092002-09-27 Matt Thomas <matt@3am-software.com>
1110
1111 * elf32-vax.c (elf_vax_check_relocs): Remove unused
1112 local_got_refcounts usage. Remove allocation of got slot.
1113 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
1114 Remove de-allocation of got slot.
1115 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
1116 traversal for elf_vax_instantiate_got_entries. Allow empty .got
1117 sections to be GC'ed.
1118 (elf_vax_instantiate_got_entries): New function.
1119 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
1120 tests that are now handled by elf_vax_instantiate_got_entries.
1121 Assert GOT entry falls within .got section size. Remove redundant
1122 comparisions. Fix comments.
1123
bffbf940
JJ
11242002-09-27 Jakub Jelinek <jakub@redhat.com>
1125
1126 * reloc.c: Add x86-64 TLS relocs.
1127 * bfd-in2.h, libbfd.h: Rebuilt.
1128 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
1129 relocs. Add TLS relocs.
1130 (x86_64_reloc_map): Add TLS relocs.
1131 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
1132 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
1133 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
1134 (elf64_x86_64_hash_entry): Define.
1135 (struct elf64_x86_64_obj_tdata): New.
1136 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
1137 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
1138 (link_hash_newfunc): Initialize tls_type.
1139 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
1140 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
1141 (elf64_x86_64_mkobject): New.
1142 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
1143 (elf64_x86_64_tls_transition): New.
1144 (elf64_x86_64_check_relocs): Add r_type variable and use it.
1145 Handle TLS relocs.
1146 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
1147 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
1148 (elf64_x86_64_size_dynamic_sections): Likewise.
1149 (dtpoff_base, tpoff): New.
1150 (elf64_x86_64_relocate_section): Handle TLS relocs.
1151 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
1152 entries.
1153 (bfd_elf64_mkobject): Define.
1154
1155 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
1156 DF_STATIC_TLS if shared.
1157
14366460
TS
11582002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1159
1160 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
1161 empty relocation sections.
1162
9f951329
AM
11632002-09-26 Alan Modra <amodra@bigpond.net.au>
1164
1165 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
1166 (ppc64_elf_build_stubs): Build them here instead.
1167
6b3ac709
JJ
11682002-09-24 Jakub Jelinek <jakub@redhat.com>
1169
1170 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
1171 addend into r_addend, not *r_offset.
1172 (elf32_sparc_finish_dynamic_symbol): Likewise.
1173 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
1174 R_SPARC_RELATIVE's r_offset.
1175
e2f6d277
NC
11762002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
1177
1178 * dwarf2.c (decode_line_info): Update to correctly decode
1179 the (non-standard DWARF2) out-of-order address sequences
1180 generated by the Intel C++ 6.0 compiler for ia64-Linux.
1181
f3961b2b
DD
11822002-09-23 Mark Elbrecht <snowball3@softhome.net>
1183
1184 * config.bfd: For DJGPP targets, match with any cpu and any machine.
1185
ad34bc37
AM
11862002-09-23 Alan Modra <amodra@bigpond.net.au>
1187
1188 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
1189 for discarded FDEs. Remove redundant assignment.
1190 * elflink.h (elf_bfd_discard_info): Save edited relocs.
1191
82988bff
L
11922002-09-22 H.J. Lu <hjl@gnu.org>
1193
1194 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
1195 the relocation count between different .reloc sections.
1196
5ad8645c
AM
11972002-09-21 Alan Modra <amodra@bigpond.net.au>
1198
5f819128
AM
1199 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
1200 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
1201 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
1202 R_PPC_EMB_RELSDA.
1203
5ad8645c
AM
1204 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
1205 unsigned. Move "symcount" assignment out of loop.
1206 * Makefile.am: Run "make dep-am".
1207 * Makefile.in: Regenerate.
1208 * configure: Regenerate.
1209 * po/SRC-POTFILES.in: Regnerate.
1210
75936555
NC
12112002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
1212
1213 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
1214 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
1215 (e.g. IRIX64).
1216
2243deae
L
12172002-09-19 Jakub Jelinek <jakub@redhat.com>
1218
1219 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
1220 even if generating R_PPC_RELATIVE reloc.
1221 (ppc_elf_relocate_section): Make sure relocation is performed
1222 if skip == -2. Clear memory at r_offset when creating dynamic
1223 relocation.
1224
37e55690
JJ
12252002-09-19 Jakub Jelinek <jakub@redhat.com>
1226
1227 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
1228 BFD_RELOC_386_TLS_GOTIE): Add.
1229 * bfd-in2.h, libbfd.h: Rebuilt.
1230 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
1231 and R_386_TLS_GOTIE.
1232 (elf_i386_reloc_type_lookup): Handle it.
1233 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
1234 char instead of enum, change GOT_* into defines.
1235 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
1236 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1237 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
1238 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
1239 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
1240 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1241 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1242 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1243 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
1244 tls_type is GOT_TLS_IE_BOTH.
1245 (elf_i386_size_dynamic_sections): Likewise.
1246 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
1247 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
1248 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
1249 all 4 GOT_TLS_* TLS types.
1250
8e67855b
NC
12512002-09-19 Nick Clifton <nickc@redhat.com>
1252
1253 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
1254 follow indirect links.
1255
1c59ba3f
NC
12562002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
1257
1258 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
1259 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
1260 on 64 bit machines.
1261 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
1262 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
1263 ECOFF information: 'ioptMax' refers to the actual *size*
1264 of the optimization symtab, not the number of entries.
1c59ba3f 1265
9d7404b7
NC
12662002-09-19 Daniel Jacobowitz <drow@mvista.com>
1267
1268 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
1269 ELF_LINK_HASH_NEEDS_PLT logic.
1270
05a487dc
DJ
12712002-09-18 Daniel Jacobowitz <drow@mvista.com>
1272
1273 * elfcode.h (elf_slurp_reloc_table_from_section): Check
1274 correct relocation count.
1275
1f70368c
DJ
12762002-09-17 Daniel Jacobowitz <drow@mvista.com>
1277
1278 * bfd-in.h (bfd_get_dynamic_symcount): Define.
1279 * bfd.c (struct _bfd): Add dynsymcount.
1280 * bfd-in2.h: Regenerated.
1281 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
1282 abfd->dynsymcount.
1283 * elfcode.h (elf_slurp_reloc_table_from_section): Check
1284 for overflow.
1285
51020317 12862002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
1287
1288 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
1289 (mips_elf64_final_gp): Don't make up gp value.
1290 * elfn32-mips.c (mips_elf_final_gp): Likewise.
1291 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
1292 .MIPS.options/.options section.
1293
290062cc
DB
12942002-09-17 David O'Brien <obrien@FreeBSD.org>
1295
1296 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
1297 It is benign for FreeBSD < 4.1. Minor reformatting.
1298 * elf64-alpha-fbsd.c: Likewise.
1299
c5c1f40c
JJ
13002002-09-17 Jakub Jelinek <jakub@redhat.com>
1301
ca1eb0ba
JJ
1302 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
1303 addend.
c5c1f40c 1304
562ace6b
AM
13052002-09-17 Alan Modra <amodra@bigpond.net.au>
1306
1307 * elf64-alpha.c (alpha_elf_size_info): Make static.
1308
5af6ead6
AM
13092002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
1310
1311 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
1312 * cpu-tic4x.c: Ditto.
1313
cb9512fc
TS
13142002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1315
1316 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
1317 duplicate define.
1318
4ada7262
DB
13192002-09-16 Bruno Haible <bruno@clisp.org>
1320
1321 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
1322 by a target variant implementation.
1323 * elf64-alpha.c: Likewise.
1324 * elf32-i386-fbsd.c: New file.
1325 * elf64-alpha-fbsd.c: New file.
1326 * targets.c: Support bfd_elf32_i386_freebsd_vec and
1327 bfd_elf64_alpha_freebsd_vec.
1328 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
1329 bfd_elf64_alpha_freebsd_vec.
1330 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
1331 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
1332 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
1333 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
1334 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
1335 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
1336 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
1337
6a30718d
JJ
13382002-09-12 Jakub Jelinek <jakub@redhat.com>
1339
1340 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
1341 NULL.
1342 (elf_i386_relocate_section): Return false after printing error about
1343 unresolvable relocation.
1344
6cf9e9fe
NC
13452002-09-12 Nick Clifton <nickc@redhat.com>
1346
1347 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
1348 R_ARM_THM_PC11.
1349
10f469bf
DJ
13502002-09-11 Jeffrey Law <law@redhat.com>
1351
1352 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
1353
dc43ada5
NC
13542002-09-11 Andrew Haley <aph@cambridge.redhat.com>
1355
1356 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
1357 line_ptr before deciding we've found a symbol.
1358
e09f4395
NC
13592002-09-11 Nick Clifton <nickc@redhat.com>
1360
1361 * po/da.po: New Danish translation file.
1362 * configure.in (LINGUAS): Add 'da'.
1363 * configure: Regenerate.
1364
b3018b5f
NC
13652002-09-10 Michael Snyder <msnyder@redhat.com>
1366
1367 * irix-core.c (do_sections, do_sections64): New functions.
51020317 1368 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
1369 do_sections64, depending on corefile (32-bit or 64-bit).
1370
2f21f25e
RH
13712002-09-09 Richard Henderson <rth@redhat.com>
1372
1373 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
1374 and PCREL21F like PCREL21B.
1375
28b94e7c
KB
13762002-09-04 Kevin Buettner <kevinb@redhat.com>
1377
51020317
AM
1378 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
1379 vector.
28b94e7c 1380
5cec6941
NC
13812002-09-02 Nick Clifton <nickc@redhat.com>
1382
1383 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
1384 names instead of cryptically overloaded bfd_reloc error
1385 codes.
1386 (v850_elf_relocate_section): Likewise.
1387 (v850_elf_relax_section): Replace caching of external symbols
1388 with caching of internal symbols obtained from calling
1389 bfd_elf_get_elf_syms().
51020317 1390 Fixup problems with freeing cached allocated memory blocks.
5cec6941 1391
3b77b1d5
AM
13922002-09-02 Alan Modra <amodra@bigpond.net.au>
1393
638524b5
AM
1394 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
1395 (bfd_pj_arch): Use bfd_default_scan.
1396 * cpu-v850.c (scan): Remove.
1397 (N): Use bfd_default_scan.
1398 * cpu-z8k.c (scan_mach): Remove.
1399 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
1400 first. Use bfd_default_scan.
1401
250d94fd
AM
1402 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
1403 bfd_mach constants.
1404 (ecoff_get_magic): Likewise.
1405 * elf32-v850.c (v850_elf_object_p): Likewise.
1406 (v850_elf_final_write_processing): Likewise.
1407 * mipsbsd.c (MY(set_arch_mach)): Likewise.
1408 (MY(write_object_contents)): Likewise.
1409 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
1410 * coffcode.h (coff_write_object_contents): Likewise.
1411 (coff_set_arch_mach_hook): Add comment describing machine == 0.
1412 Remove unnecessary "machine" assignments.
1413 (coff_write_relocs): Test for the absolute section sym by testing
1414 section and flags.
1415
3b77b1d5
AM
1416 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
1417 and bfd_mach_i386_i386_intel_syntax.
250d94fd 1418 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 1419
e5b45b83
DA
14202002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
1421
1422 * bfd-in.h (align_power): Cast constants to bfd_vma type.
1423 * bfd-in2.h (align_power): Likewise.
1424
37f45cf8
AM
14252002-08-30 Alan Modra <amodra@bigpond.net.au>
1426
1427 * Makefile.am: Run "make dep-am".
1428 * Makefile.in: Regenerate.
1429
1430 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
1431 * cpu-powerpc.c (powerpc_compatible): Likewise.
1432 * cpu-rs6000.c (rs6000_compatible): Likewise.
1433
86aba9db
NC
14342002-08-28 Catherine Moore <clm@redhat.com>
1435
1436 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
1437 (v850-elf-reloc): Don't resolve pc relative relocs.
1438 (v850_elf_ignore_reloc): New routine.
1439 (v850_elf_final_link_relocate): Handle new relocs.
1440 (v850_elf_relax_delete_bytes ): New routine.
1441 (v850_elf_relax_section): New routine.
1442 (bfd_elf32_bfd_relax_section): Define.
1443 (HOWTO): New entries for new relocs.
1444 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
1445 (BFD_RELOC_V850_LONGJUMP): New reloc.
1446 (BFD_RELOC_V850_ALIGN): New reloc.
1447 * archures.c: Remove redundant v850ea architecture.
1448 * cpu-v850.c: Remove redundant v850ea support.
1449 * libbfd.h: Regenerate.
1450 * bfd-in2.h: Regenerated.
1451
026df7c5
NC
14522002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
1453
1454 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
1455 * configure.in: Add tic4x_coff vector files.
1456 * configure: Regenerate.
1457 * Makefile.am: Add tic4x target.
1458 * Makefile.in: Regenerate.
1459
14602002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
1461
1462 * archures.c: Add the BFD arch type tic4x.
1463 * bfd-in.h: Add BFD_IN_MEMORY flag.
1464 * coff-tic4x.c: New file.
1465 * coffswap.h (coff_swap_sym_out): Add preadjuster.
1466 * cpu-tic4x.c: New file.
1467 * targets.c: Added tic4x- in list of xvecs.
1468 * ticoff.h: New file.
1469 * bfd-in2.h: Regenerate.
1470
88f7bcd5
NC
14712002-08-27 Adam Nemet <anemet@lnxw.com>
1472
1473 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
1474 bit of DT_INIT and DT_FINI for Thumb functions.
1475
c8e48751
AM
14762002-08-26 Alan Modra <amodra@bigpond.net.au>
1477
1478 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
1479
2846975a
AM
14802002-08-26 Alan Modra <amodra@bigpond.net.au>
1481
1482 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
1483
067653c5
AM
14842002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1485
1486 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
1487 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
1488 Likewise.
1489 (struct elf_sh_pcrel_relocs_copied): Removed.
1490 (struct elf_sh_dyn_relocs): New.
1491 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
1492 field with dyn_relocs.
1493 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
1494 sections and sym_sec.
1495 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
1496 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
1497 (sh_elf_create_dynamic_sections): Use create_got_section instead
1498 of _bfd_elf_create_got_section.
1499 (sh_elf_check_relocs): Likewise.
1500 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
1501 sections.
1502 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
1503 sh_elf_relocate_section, sh_elf_check_relocs,
1504 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
1505 Likewise.
1506 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
1507 dynamic relocations and avoiding the copy relocation when we
1508 didn't find any dynamic relocations in the section which has
1509 contents or is read-only.
1510 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1511 (sh_elf_size_dynamic_sections): Don't reset the size of
1512 .rela.got section even if dynamic_sections_created flag is off.
1513 Don't use sh_elf_discard_copies. Scan all input bfd and use
1514 allocate_dynrelocs. Call readonly_dynrelocs to determine
1515 whether we need DT_TEXTREL.
1516 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
1517 whether the symbol was never referred to.
1518 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
1519 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
1520 (sh_elf_check_relocs): Call create_got_section if the short-cut
1521 to .got is null. Increment reference counters only instead of
1522 allocating space on dynamic sections here. Don't conditionalize
1523 uninitialized got.offset value when marking the symbol as a
1524 global offset table entry. Keep relocations for symbols satisfied
1525 by a dynamic library to avoid copy relocations for the symbol.
1526 Set dynobj field of an elf hash table if needed.
1527 (sh_elf_finish_dynamic_sections): Handle null section pointer
1528 correctly.
1529 (elf_backend_copy_indirect_symbol): Defined.
1530 (elf_backend_can_refcount): Defined.
1531
7e326afc
NC
15322002-08-23 Nick Clifton <nickc@redhat.com>
1533
1534 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
1535 previous change. Add comment explaining why.
1536
c8614e8e
AM
15372002-08-23 Stephen Clarke <stephen.clarke@superh.com>
1538
1539 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
1540 contents of .got.plt[2] to tr0, not address of .got.plt.
1541 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
1542 patching absolute plt entry. For shmedia plt entry, set bottom bit
1543 of branch to plt0 as this is a branch to an shmedia instruction.
1544 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
1545 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
1546 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
1547 branch to plt0.
1548 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
1549 patching absolute plt entry. For shmedia plt entry, branch to
1550 plt0 is now ptrel, so use relative offset. Set bottom bit of
1551 branch target as it is a branch to an shmedia instruction.
1552
3b587c71
AM
15532002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
1554 Richard Shann <richard.shann@superh.com>
1555
1556 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
1557 value if .init is an SHmedia function. Similarly for DT_FINI.
1558 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 1559
957dcaa8
AM
15602002-08-23 Stephen Clarke <stephen.clarke@superh.com>
1561
3b587c71 1562 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 1563 dynamic section.
3b587c71 1564 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 1565
a4263c47
NC
15662002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1567
1568 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 1569 byte read when reading the return address register column.
a4263c47 1570
db4ed121
NC
15712002-08-22 Nick Clifton <nickc@redhat.com>
1572
1573 * config.bfd: Add powepc64-*-*bsd* target.
1574
ed71e111
NC
15752002-08-22 Graeme Peterson <gp@qnx.com>
1576
1577 * Makefile.am: Add entries for elf32-shqnx.c
1578 * Makefile.in: Regenerate.
1579 * config.bfd: Add support sh-*-nto* target.
1580 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
1581 * configure: Regenerate.
1582 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
1583 * elf32-sh.c: Do not include elf32-target.h if
1584 ELF32_SH_C_INCLUDED is defined.
1585 * elf32-shqnx.c: New file: Support for QNX.
1586 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
1587
0ab72ee2
NC
15882002-08-22 Nick Clifton <nickc@redhat.com>
1589
75c83283
NC
1590 * po/tr.po: Updated Turkish translation.
1591
0ab72ee2
NC
1592 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
1593 symbols are not read.
1594
56780f18
AM
15952002-08-22 Alan Modra <amodra@bigpond.net.au>
1596
1597 * elf32-m68hc11.c: Formatting fixes.
1598 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
1599 * elf32-m68hc12.c: Formatting fixes.
1600 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
1601
b48fa14c
AM
16022002-08-22 Alan Modra <amodra@bigpond.net.au>
1603
a7c71b0c
AM
1604 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
1605 SEC_DATA.
1606 (pmac_xcoff_vec): Likewise.
1607 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1608 (aix5coff64_vec): Likewise.
1609
56780f18
AM
16102002-08-22 Alan Modra <amodra@bigpond.net.au>
1611
b48fa14c
AM
1612 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
1613 param to elf_backend_copy_indirect_symbol.
1614 (_bfd_elf_link_hash_copy_indirect): Likewise.
1615 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
1616 calls to copy_indirect_symbol.
1617 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
1618 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
1619 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1620 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1621 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
1622 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
1623 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1624 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1625 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1626 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
1627 test refcounts for "used" values.
1628
8c2ab17d
AM
16292002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
1630
1631 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
1632 argument declaration.
1633
d62b1198 16342002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
1635
1636 * archures.c (bfd_mach_ppc_e500): Added.
1637 * bfd-in2.h: Rebuilt.
d62b1198
EZ
1638 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
1639
9f88ba09
AM
16402002-08-19 Alan Modra <amodra@bigpond.net.au>
1641
1642 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
1643
df622259
AC
16442002-08-17 Andrew Cagney <ac131313@redhat.com>
1645
1646 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 1647 `bfd_byte'.
df622259 1648
44c410de
SC
16492002-08-17 Stan Cox <scox@redhat.com>
1650
1651 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
1652 IRIX 6 segment layout for NEWABI.
1653
4972a8e9
SC
16542002-08-16 Stephen Clarke <stephen.clarke@superh.com>
1655
1656 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
1657 symbols when looking for section referred to by a relocation.
1658 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 1659
c5cd6d62
AM
16602002-08-15 Alan Modra <amodra@bigpond.net.au>
1661
1662 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
1663
0741c7be
HPN
16642002-08-15 Hans-Peter Nilsson <hp@axis.com>
1665
1666 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
1667 missing check for whether the symbol is referenced by DSO before
1668 unexporting it as an unneeded dynamic symbol.
1669
e8d5d179
L
16702002-08-14 H.J. Lu <hjl@gnu.org>
1671
1672 * libbfd.h: Regenerate.
1673
e9229007
L
16742002-08-14 H.J. Lu <hjl@gnu.org>
1675
1676 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
1677
1fd03b5a
SC
16782002-08-14 Stephane Carrez <stcarrez@nerim.fr>
1679
1680 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
1681 instructions.
1682 (m68hc11_direct_relax): New to define table of relaxable instructions.
1683 (find_relaxable_insn): New, find a relaxable insn.
1684 (compare_reloc): New to compare two relocs.
1685 (m68hc11_elf_relax_section): New, relax text sections.
1686 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
1687 (elf32_m68hc11_check_relocs): New function for GC support.
1688 (elf32_m68hc11_relocate_section): New function for GC support.
1689 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
1690 (elf_backend_check_relocs): Likewise.
1691 (elf_backend_relocate_section): Likewise.
1692
c828c771
L
16932002-08-13 H.J. Lu <hjl@gnu.org>
1694
1695 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
1696 definitions in shared objects when checking symbol with
1697 undefined version.
1698
9b701e44
SC
16992002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1700
1701 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
1702 (elf32_m68hc11_gc_sweep_hook): Likewise.
1703 (elf_backend_gc_mark_hook): Define for GC section support.
1704 (elf_backend_gc_sweep_hook): Likewise.
1705 (elf_backend_can_gc_sections): Likewise.
1706
1707 * elf32-m68hc12.c: Likewise.
1708
96405e3c
SC
17092002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1710
1711 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
1712 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
1713 (_bfd_m68hc11_elf_set_private_flags): New function.
1714 Use them to set/check/print ELF flags specific to 68HC11.
1715
1716 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
1717 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
1718 (_bfd_m68hc12_elf_set_private_flags): New function.
1719 Use them to set/check/print ELF flags specific to 68HC12.
1720
dae78fb0
SC
17212002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1722
1723 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
1724 fix masks for PC-rel relocs.
1725 (m68hc11_elf_ignore_reloc): New function.
1726
1727 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
1728 68HC12 banked addressing relocs.
1729 (m68hc12_phys_addr): New to compute physical address of banked memory.
1730 (m68hc12_phys_page): Likewise for page.
1731 (m68hc12_addr_is_banked): New to see if address is in banked area.
1732 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
1733
3dbfec86
SC
17342002-08-13 Stephane Carrez <stcarrez@nerim.fr>
1735
1736 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
1737 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
1738 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
1739 * bfd-in2.h: Regenerate.
1740
871da94f
L
17412002-08-12 H.J. Lu <hjl@gnu.org>
1742
1743 * elflink.h (elf_add_default_symbol): Preserve section across
1744 elf_merge_symbol.
1745
59bc061d
NC
17462002-08-09 Graeme Peterson <gp@qnx.com>
1747
51020317 1748 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
1749 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
1750 * Makefile.in: Regenerate.
1751 * config.bfd: Add support for powerpc{le}-*-nto targets.
1752 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
1753 * configure: Regenerate.
1754 * elf32-i386qnx.c: Moved backend functions into a QNX specific
1755 common file "elf32-qnx.h", and now include that file.
1756 * elf32-qnx.h: New file: QNX specific common elf backend.
1757 * elf32-ppc.c: Do not include elf32-target.h if
1758 ELF32_PPC_C_INCLUDED is defined.
1759 * elf32-ppcqnx.c: New file: Support for QNX.
1760 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
1761 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
1762
2b692c59
NC
17632002-08-09 Nick Clifton <nickc@redhat.com>
1764
1765 * po/sv.po: Updated Swedish translation.
1766
d0c7ff07
TS
17672002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1768
1769 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
1770 g->global_gotsym is NULL.
1771
d8bbe778
L
17722002-08-08 H.J. Lu <hjl@gnu.org>
1773
c5cd6d62 1774 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
1775 overrides an indirect versioned symbol.
1776
c366c25e
JJ
17772002-08-08 Jakub Jelinek <jakub@redhat.com>
1778
1779 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
1780 for R_386_TLS_TPOFF32 relocs against symndx 0.
1781
31941635
L
17822002-08-07 H.J. Lu <hjl@gnu.org>
1783
1784 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
1785 with undefined version if needed.
1786 (elf_link_assign_sym_version): Match a default symbol with a
1787 version without definition. No need to hide the default
1788 definition separately.
1789
0f3bd64f
AM
17902002-08-08 Alan Modra <amodra@bigpond.net.au>
1791
7330fb86
AM
1792 * elflink.h (elf_link_output_extsym): Don't output symbols from
1793 SEC_EXCLUDE sections.
1794
0f3bd64f
AM
1795 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
1796
a4aa0fb7
AM
17972002-08-07 Alan Modra <amodra@bigpond.net.au>
1798
1799 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
1800 entries.
1801
34ea4a36
TS
18022002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1803
1804 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
1805 mismatch.
1806
141ff970
TS
18072002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1808
1809 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
1810
28458e7e
TS
18112002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1812
1813 * elf32-mips.c (mips_reloc_map): Fix typo.
1814
0121a3da
AM
18152002-08-06 Alan Modra <amodra@bigpond.net.au>
1816
1817 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
1818
d006db6c
AM
18192002-08-06 Alan Modra <amodra@bigpond.net.au>
1820
1821 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
1822
8ea80f08
AM
18232002-08-06 Alan Modra <amodra@bigpond.net.au>
1824
2a52da53
AM
1825 * libxcoff.h: Use PARAMS on function declarations.
1826 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
1827 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1828
8ea80f08
AM
1829 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
1830 addend.
1831 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
1832
cf9ab45b
AM
18332002-08-06 Alan Modra <amodra@bigpond.net.au>
1834
1835 * coff-rs6000.c: Formatting fixes.
1836 (xcoff_calculate_relocation): Use PARAMS in declaration.
1837 (xcoff_complain_overflow): Likewise.
1838 (xcoff_ppc_relocate_section): Use old-style function pointer call.
1839 (bfd_xcoff_backend_data): Remove useless comments.
1840 (rs6000coff_vec): Likewise.
1841 (bfd_pmac_xcoff_backend_data): Likewise.
1842 (pmac_xcoff_vec): Likewise.
8ea80f08 1843
cf9ab45b
AM
1844 * coff64-rs6000.c: Formatting fixes.
1845 (xcoff64_calculate_relocation): Use PARAMS in declaration.
1846 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
1847 (bfd_xcoff_backend_data): Remove useless comments.
1848 (rs6000coff64_vec): Likewise.
1849 (bfd_xcoff_aix5_backend_data): Likewise.
1850 (aix5coff64_vec): Likewise.
1851
48bfecdd
AM
18522002-08-06 Alan Modra <amodra@bigpond.net.au>
1853
a78eab4e
AM
1854 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
1855 mask entries. Use complain_overflow_dont for R_REF.
1856 (xcoff_reloc_type_ba): Revert last change.
1857 (xcoff_reloc_type_br): Likewise.
1858 (xcoff_reloc_type_crel): Likewise.
1859 (xcoff_ppc_relocate_section): Likewise.
1860 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
1861 (xcoff64_ppc_relocate_section): Likewise.
1862 (xcoff64_howto_table): Revert some of last change to mask entries.
1863 Use complain_overflow_dont for R_REF.
1864
48bfecdd
AM
1865 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
1866 relocs with bitsize == 16 have size = 1.
1867 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
1868 (xcoff_reloc_type_br): Likewise.
1869 (xcoff_reloc_type_crel): Likewise.
1870 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1871 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
1872 dst_mask adjustment.
1873 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1874 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
1875 bitsize == 16 have size = 1.
1876
fd13ed0c
DC
18772002-08-01 Denis Chertykov <denisc@overta.ru>
1878
1879 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
1880 (struct misc): New field isymbuf. All free_* fields removed.
1881 (symbol_value): Pass in internal syms. No need to swap syms in.
1882 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
1883 possibly cached info.
1884 (tidyup_after_error): Removed.
1885 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
1886 misc. Use new field.
1887 (adjust_all_relocations): Use internal syms. No need to swap syms
1888 in and out.
1889 (add_page_insn): Don't use removed fields of struct misc.
1890
24a1ba0f
NC
18912002-08-01 Nick Clifton <nickc@redhat.com>
1892
1893 * elf32-arm.h: Revert previous delta.
1894
a6903459
NC
18952002-08-01 Nick Clifton <nickc@redhat.com>
1896
1897 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
1898 * configure: Regenerate.
1899
39a2a3eb
L
19002002-07-31 H.J. Lu <hjl@gnu.org>
1901
1902 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
1903 selected.
1904
a0dfa6a8
L
19052002-07-31 H.J. Lu <hjl@gnu.org>
1906
1907 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
1908 is selected.
1909
cd67d266
JJ
19102002-07-31 Jakub Jelinek <jakub@redhat.com>
1911
1912 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
1913 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
1914
4eb6b71c
NC
19152002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1916
1917 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
1918 There is no 8 byte relocation type for this architecture.
1919 (do_ns32k_reloc): Use bfd_vma instead of native types.
1920 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
1921 returns void.
1922 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
1923 rely on generic code to do that.
1924 * aout-ns32k.c (howto_table): Add appropriate overflow detection
1925 to all table entries.
1926 (_bfd_ns32k_relocate_contents): put_data returns void.
1927 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
1928 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
1929 return void.
1930
f7c33884
NC
19312002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1932
1933 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
1934 archive object is target dependant.
1935
8f64befb
NC
19362002-07-31 Adam Nemet <anemet@lnxw.com>
1937
1938 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
1939 (THUMB_PLT_ENTRY_SIZE): New macro.
1940 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
1941 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
1942 ARM_PLT_ENTRY_SIZE.
1943 (elf32_arm_plt_entry): Likewise.
1944 (elf_backend_plt_header_size): Likewise.
1945 (elf32_thumb_plt0_entry): New global.
1946 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
1947 into .plt.thumb.
1948 (elf32_thumb_plt_entry): New global.
1949 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
1950 Thumb entries. Set the bottom bit of the corresponding GOT entry
1951 for a Thumb PLT entry.
1952 (struct elf32_arm_plt_entry_info): New structure.
1953 (struct elf32_arm_link_hash_entry, plt_info): New member of this
1954 type.
1955 (elf32_arm_link_hash_newfunc): Initialize new member.
1956 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
1957 relocations against the PLT.
1958 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
1959 first_rel_type if this is the first time we encounter the symbol.
1960 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
1961 Determine if relocation needs a PLT entry. Set first_rel_type if
1962 this is the first time we encounter the symbol
1963 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
1964 functions as well.
1965 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
1966 (elf32_arm_create_dynamic_sections): New function. Create the
1967 .plt.thumb section.
1968 (elf_backend_create_dynamic_sections): Call it.
1969
47badb7b
NC
19702002-07-31 Nick Clifton <nickc@redhat.com>
1971
1972 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
1973 'alternative' in order to avoid shadowing global symbol of the
1974 same name.
1975 * bfd-in2.h: Regenerate.
1976 * libbfd.h: Regenerate.
1977 * libcoff.h: Regenerate.
1978
8a397dad
TS
19792002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1980
1981 * Makefile.am: Add n32 ABI support.
1982 * Makefile.in: Regenerate.
1983 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
1984 bit vectors for mips*-*-linux targets as optional.
1985 * configure.in: Add n32 ABI vectors.
1986 * configure: Regenerate.
1987 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
1988 * elfn32-mips.c: New file, n32 ABI support.
1989 * targets.c: Add n32 ABI vectors.
1990
7e392df6 19912002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 1992
7e392df6
NC
1993 * elfarmqnx-nabi.c: New file: Support for QNX.
1994 * config.bfd: Add support for arm-*-nto target.
1995 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
1996 * configure: Regenerate.
1997 * Makefile.am: Add entries for elfarmqnx-nabi.c.
1998 * Makefile.in: Regenerate.
1999 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
2000 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
2001 * elfarm-nabi.c: Do not include elf32-arm.h if
2002 ELFARM_NABI_C_INCLUDED is defined.
2003 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 2004
7e392df6 20052002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 2006
83e1617e
NC
2007 * po/sv.po: Updated Swedish translation.
2008
704afa60
JJ
20092002-07-30 Jakub Jelinek <jakub@redhat.com>
2010
2011 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
2012
487e54f2
AM
20132002-07-30 Alan Modra <amodra@bigpond.net.au>
2014
2015 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
2016 * archive.c (bfd_generic_archive_p): Likewise.
2017 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
2018 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
2019 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
2020 (xcoff64_archive_p): Likewise.
2021 (xcoff64_openr_next_archived_file): Likewise.
2022 (xcoff64_archive_p): Clean up tdata properly on error.
2023 * coffgen.c (coff_real_object_p): Likewise.
2024 (coff_object_p): Release filehdr and opthdr.
2025 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
2026 * ieee.c (ieee_archive_p): Likewise.
2027 * ihex.c (ihex_object_p): Likewise.
2028 (ihex_mkobject): Always allocate tdata.
2029 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
2030 * srec.c (srec_mkobject): Always allocate tdata.
2031 (srec_object_p): Clean up tdata properly on error.
2032 (symbolsrec_object_p): Likewise.
2033 * versados.c (versados_object_p): Likewise.
2034 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
2035 and bfd_realloc instead of realloc.
2036 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
2037 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
2038 place of bfd_malloc, simplifying error freeing. Free hash table too.
2039 (vms_object_p): Clean up tdata on error.
2040 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
2041 (vms_close_and_cleanup): Adjust for bfd_alloc use.
2042
9d46020e
AM
20432002-07-30 Alan Modra <amodra@bigpond.net.au>
2044
2045 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
2046
fb39dac1
RS
20472002-07-26 Chris Demetriou <cgd@broadcom.com>
2048
2049 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
2050 flags into resulting BFD.
2051
7a624474
AM
20522002-07-26 Alan Modra <amodra@bigpond.net.au>
2053
2054 From John Reiser <jreiser@BitWagon.com>
2055 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
2056 tls_ldm_got.refcount.
2057
a4382ec6
TS
20582002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2059
2060 * elf64-mips.c: Update TODO comment.
2061 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
2062 mips_elf64_gprel16_reloca): Remove prototypes.
2063 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
2064 (UNUSED_RELOC): Replace by EMPTY_RELOC.
2065 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
2066 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
2067 R_MIPS_HIGHEST.
2068 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
2069 R_MIPS_GOT16. Remove wrong comments.
2070 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
2071 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
2072 from elf32-mips.c.
2073 (mips_elf64_hi16_reloc): Fix formatting.
2074 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
2075 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
2076 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
2077 (mips_elf64_gprel16_reloc): Make static. Add check for
2078 partial_inplace.
2079 (mips_elf64_gprel16_reloca): Remove.
2080 (mips_elf64_literal_reloc): New function.
2081 (mips_elf64_gprel32_reloc): Fix formatting.
2082 (mips_elf64_shift6_reloc): Fix comment. Make static.
2083 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
2084 elf32-mips.c.
2085 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
2086 elf32-mips.c
2087 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
2088 specific relocations.
2089 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
2090 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
2091 (ELF_MAXPAGESIZE): Add comment.
2092
219576a4
NC
20932002-07-25 Nick Clifton <nickc@redhat.com>
2094
2095 * po/sv.po: Updated Swedish translation.
2096 * po/es.po: Updated Spanish translation.
2097 * po/fr.po: Updated French translation.
2098
8c58d23b
AM
20992002-07-25 Alan Modra <amodra@bigpond.net.au>
2100
2101 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
2102 as elf_link_record_local_dynamic_symbol.
2103 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
2104 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
2105 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
2106 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
2107 attempt is made to record a symbol in a discarded section, and
2108 return `2' in that case.
2109
ff3063f5
NC
21102002-07-24 Nick Clifton <nickc@redhat.com>
2111
2112 * po/sv.po: Updated Swedish translation.
2113 * po/es.po: Updated Spanish translation.
2114
f0fe0e16
AM
21152002-07-23 Alan Modra <amodra@bigpond.net.au>
2116
c1fb5f8a
AM
2117 * po/SRC-POTFILES.in: Regenerate.
2118
f0fe0e16
AM
2119 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
2120 immediately. Remove code handling relocatable linking.
2121 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2122 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2123 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 2124 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
2125 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2126 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2127 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2128 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2129 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2130 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2131 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2132 * elf32-avr.c (elf_backend_rela_normal): Define.
2133 * elf32-cris.c: Likewise.
2134 * elf32-fr30.c: Likewise.
de2d743e 2135 * elf32-frv.c: Likewise.
f0fe0e16
AM
2136 * elf32-h8300.c: Likewise.
2137 * elf32-hppa.c: Likewise.
2138 * elf32-ip2k.c: Likewise.
2139 * elf32-sparc.c: Likewise.
2140 * elf32-v850.c: Likewise.
2141 * elf32-vax.c: Likewise.
2142 * elf64-hppa.c: Likewise.
2143 * elf64-sparc.c: Likewise.
2144 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 2145 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
2146 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2147 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2148 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2149 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2150 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2151 * elf-m10200.c (USE_RELA): Don't define.
2152 * elf-m10300.c: Likewise.
de2d743e 2153 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
2154 * elf32-i370.c: Likewise.
2155 * elf32-ip2k.c: Likewise.
2156 * elf32-m68k.c: Likewise.
2157 * elf32-mcore.c: Likewise.
2158 * elf32-ppc.c: Likewise.
2159 * elf32-s390.c: Likewise.
2160 * elf32-vax.c: Likewise.
2161 * elf64-ppc.c: Likewise.
2162 * elf64-s390.c: Likewise.
2163 * elf64-x86-64.c: Likewise.
2164 * elfxx-ia64.c: Likewise.
2165 * elf32-avr.c (USE_REL): Don't undef.
2166 * elf32-ip2k.c: Likewise.
2167
5e8d7549
NC
21682002-07-23 Nick Clifton <nickc@redhat.com>
2169
2170 * elf-bfd.h (struct elf_backend_data): Add new bitfield
2171 'want_p_paddr_set_to_zero'.
2172 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
2173 to false;
2174 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
2175 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
2176
9e12c7db
NC
21772002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
2178
2179 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
2180 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
2181 show the Copyright string.
2182 Minor formatting tidy ups.
2183
0461a601
NC
21842002-07-23 Nick Clifton <nickc@redhat.com>
2185
ff3063f5
NC
2186 * po/fr.po: Updated French translation.
2187 * po/sv.po: Updated Swedish translation.
0461a601 2188
fad2542d
AM
21892002-07-23 Alan Modra <amodra@bigpond.net.au>
2190
2191 * elflink.h (elf_link_input_bfd): Don't change internal symbols
2192 when outputting relocs.
2193
c0647bfc
JT
21942002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
2195
2196 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
2197 DT_PLTGOT into the dynamic section if there is a PLT.
2198
d01414a5
TS
21992002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2200
2201 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
2202 elf32-mips.c.
2203 (_bfd_mips_elf_write_section): Likewise.
2204 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
2205 (_bfd_mips_elf_write_section): Likewise.
2206 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
2207 (elf32_mips_write_section): Likewise.
2208 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
2209 (_bfd_mips_elf_write_section): Likewise.
2210
40c97fc6
AM
22112002-07-19 Alan Modra <amodra@bigpond.net.au>
2212
2213 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
2214 PT_IA_64_UNWIND segments for a given section.
2215
58378160
L
22162002-07-17 H.J. Lu <hjl@gnu.org>
2217
2218 * Makefile.am: Fix a typo.
2219 * Makefile.in: Regenerate.
2220
cf88bb9f
NC
22212002-07-15 Denis Chertykov <denisc@overta.ru>
2222 Frank Ch. Eigler <fche@redhat.com>
2223 Ben Elliston <bje@redhat.com>
2224 Alan Lehotsky <alehotsky@cygnus.com>
2225 John Healy <jhealy@redhat.com>
2226 Graham Stott <grahams@redhat.com>
2227 Jeff Johnston <jjohnstn@redhat.com>
2228
2229 * Makefile.am: Add support for ip2k.
2230 * Makefile.in: Regenerate.
2231 * doc/Makefile.in: Regenerate.
2232 * archures.c: Add support for ip2k.
2233 * config.bfd: Add support for ip2k.
2234 * configure.in: Add support for ip2k.
2235 * configure: Regenerate.
2236 * reloc.c: Add support for ip2k.
2237 * targets.c: Add support for ip2k.
2238 * bfd-in2.h: Regenerate.
2239 * libbfd.h: Regenerate.
2240 * cpu-ip2k.c: New file.
2241 * elf32-ip2k.c: New file.
2242
0dafd5f6
RE
22432002-07-17 Ian Rickards <irickard@arm.com>
2244
40c97fc6 2245 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
2246 just return the filename.
2247
36b08f12
AM
22482002-07-16 Moritz Jodeit <moritz@jodeit.org>
2249
2250 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
2251
58821868
AM
22522002-07-16 Alan Modra <amodra@bigpond.net.au>
2253
2254 * elflink.h: Formatting fixes, tidy prototypes.
2255 (elf_link_assign_sym_version): Move common code out of loop.
2256
c89583f8
AM
22572002-07-16 Alan Modra <amodra@bigpond.net.au>
2258
2259 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
2260 reloc section size is zero. Correct reloc output location.
2261
ba94744e
AM
22622002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
2263
2264 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
2265 the final type for the e_fsel selector when generating PA2.0W code.
2266 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
2267 relocations.
2268
96a94295
L
22692002-07-14 H.J. Lu <hjl@gnu.org>
2270
2271 * elflink.h (elf_link_assign_sym_version): Hide the default
2272 definition if there is a hidden versioned definition.
2273
6849c52f
HPN
22742002-07-12 Hans-Peter Nilsson <hp@axis.com>
2275
2276 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
2277 dynamic reference test in assertion when initializing GOT with
2278 static contents. Just assert that there are either no dynamic
2279 sections, the symbol is defined in the regular objects or that the
2280 symbol is undef weak. Tweak comment.
2281 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
2282 only if the symbol isn't defined in the program and isn't undef
2283 weak.
2284 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
2285 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
2286 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
2287 (elf_cris_discard_excess_program_dynamics): Don't consider
2288 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
2289
239e1f3a
AM
22902002-07-11 Alan Modra <amodra@bigpond.net.au>
2291
2292 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
2293 unresolved debugging relocs in dynamic applications.
2294 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2295 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2296 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2297 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2298 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2299 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2300
2f6d9989
AM
23012002-07-10 Alan Modra <amodra@bigpond.net.au>
2302
f5e87a1d
AM
2303 * elf64-ppc.c (ONES): Define.
2304 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
2305 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
2306 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
2307
2f6d9989
AM
2308 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
2309 (ppc64_elf_set_private_flags): Delete.
2310 (ppc64_elf_section_from_shdr): Delete.
2311 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
2312 (ppc64_elf_fake_sections): Delete.
2313 (bfd_elf64_bfd_set_private_flags): Don't define.
2314 (bfd_elf64_get_symbol_info): Likewise.
2315 (elf_backend_section_from_shdr): Likewise.
2316 (elf_backend_fake_sections): Likewise.
2317
0594c12d
AM
23182002-07-10 Marco Walther <Marco.Walther@sun.com>
2319
2320 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
2321 when not already set.
2322 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
2323 (elf_backend_fake_sections): Define.
2324
699cb9b8
AM
23252002-07-10 Alan Modra <amodra@bigpond.net.au>
2326
2327 * merge.c (_bfd_merge_section): Remove redundant output_section check.
2328 Formatting.
2329 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
2330
0a4787a0
HPN
23312002-07-09 Hans-Peter Nilsson <hp@axis.com>
2332
2333 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
2334 NULL sym_hashes to just before use.
2335 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
2336 symbol with non-default visibility.
2337 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
2338 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2339 Ditto.
2340 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
2341 symbol with non-default visibility.
2342 (cris_elf_check_relocs): At tests for local symbol before
2343 increasing h->plt.refcount, also check for non-default
2344 visibility. Ditto when checking for local symbol to eliminate
2345 pc-relative runtime relocs.
2346
aecc8f8a
AM
23472002-07-08 Alan Modra <amodra@bigpond.net.au>
2348
2349 * elf.c: Formatting.
2350 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
2351 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
2352 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
2353 segments.
2354
e9168c1e
MM
23552002-07-07 Mark Mitchell <mark@codesourcery.com>
2356 Alan Modra <amodra@bigpond.net.au>
2357
2358 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
2359 account the impact of relocation count overflow when computing
2360 section offsets.
2361 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
2362 or not to apply the PE COFF reloc overflow handling. Fix a
2363 fencepost error in deciding whether or not to use that technique.
2364
6cdc0ccc
AM
23652002-07-07 Alan Modra <amodra@bigpond.net.au>
2366
2367 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
2368 change type of locsyms.
2369 (bfd_elf_get_elf_syms): Declare.
2370 * elf.c (bfd_elf_get_elf_syms): New function.
2371 (group_signature): Use bfd_elf_get_elf_syms.
2372 (bfd_section_from_r_symndx): Likewise.
2373 * elfcode.h (elf_slurp_symbol_table): Likewise.
2374 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2375 (elf_link_add_object_symbols): Likewise. Reorganise to increase
2376 locality of various data structures. Properly free internal relocs.
2377 (elf_bfd_final_link): Properly free internal relocs.
2378 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
2379 (elf_link_input_bfd): Likewise.
2380 (elf_gc_mark): Likewise. Properly free internal relocs.
2381 (elf_gc_sweep): Properly free internal relocs.
2382 (elf_reloc_symbol_deleted_p): No need to swap syms in.
2383 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
2384 internal relocs.
2385 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
2386 Properly free possibly cached info.
2387 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
2388 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
2389 symbol swapping code.
2390 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
2391 Properly free possibly cached info.
2392 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
2393 (mn10300_elf_relax_delete_bytes): Likewise.
2394 (mn10300_elf_symbol_address_p): Likewise.
2395 (mn10300_elf_get_relocated_section_contents): Likewise.
2396 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
2397 (elf32_h8_relax_delete_bytes): Likewise.
2398 (elf32_h8_symbol_address_p): Likewise.
2399 (elf32_h8_get_relocated_section_contents): Likewise.
2400 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
2401 (m32r_elf_relax_delete_bytes): Likewise.
2402 (m32r_elf_get_relocated_section_contents): Likewise.
2403 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
2404 elf_section_data to determine whether cached.
2405 (sh_elf_relax_section): As above for elf-m10200.c.
2406 (sh_elf_relax_delete_bytes): Likewise.
2407 (sh_elf_get_relocated_section_contents): Likewise.
2408 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
2409 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
2410 reading of local syms.
2411 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2412 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
2413 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
2414 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
2415 relocs.
2416 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
2417 free internal relocs and section contents. Don't read symbols.
2418 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
2419 (elf32_hppa_size_stubs): Don't free local syms.
2420 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
2421 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
2422 possibly cached info.
2423 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2424 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
2425 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
2426 all_local_syms.
2427 (get_local_syms): Delete function.
2428 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
2429 on exit.
2430 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
2431
b3212001
JW
24322002-07-05 Jim Wilson <wilson@redhat.com>
2433
2434 * syms.c (decode_section_type): New.
2435 (bfd_decode_symclass): Call decode_section_type.
2436
894bb1ee
JJ
24372002-07-04 Jakub Jelinek <jakub@redhat.com>
2438
2439 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
2440 section content start.
2441 Reported by Michael Schumacher <mike@hightec-rt.com>.
2442
bc0ba537
AM
24432002-07-04 Alan Modra <amodra@bigpond.net.au>
2444
2445 * section.c (_bfd_strip_section_from_output): Remove unnecessary
2446 link order code. Don't actually remove the output section here;
2447 Just set a flag for the linker to do so.
2448 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
2449 sections when setting up output section dynsyms.
2450
797fc050
AM
24512002-07-04 Alan Modra <amodra@bigpond.net.au>
2452
2453 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
2454 fudge.
2455 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
2456 libs here instead.
2457
99881371
MS
24582002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
2459
2460 * elf64-s390.c (create_got_section): Set .got section alignment to
2461 8 bytes.
2462 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
2463
47d9a591
AM
24642002-07-02 Alan Modra <amodra@bigpond.net.au>
2465
2466 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
2467
179d3252
JT
24682002-07-01 Matt Thomas <matt@3am-software.com>
2469
2470 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
2471 to EF_VAX_*.
2472
4a14403c
TS
24732002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2474
2475 * elfxx-mips.c (ABI_64_P): Fix comment.
2476 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
2477 new section names for N64 ABI.
2478 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
2479 (mips_elf_calculate_relocation): Code formatting.
2480 (mips_elf_create_dynamic_relocation): Likewise.
2481 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
2482 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
2483 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
2484 in any NewABI.
2485 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
2486 for NewABI.
2487 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
2488 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
2489 here, too.
2490
607c0e09
AS
24912002-07-01 Andreas Schwab <schwab@suse.de>
2492
2493 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
2494 R_X86_64_64 to R_X86_64_RELATIVE.
2495
ba26fd96
AM
24962002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
2497
2498 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
2499 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
2500 Run "make dep-am".
2501 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
2502 host_aout_vec.
2503 * configure.in (vaxbsd_vec): Add.
2504 * targets.c (vaxbsd_vec): Add.
2505 * Makefile.in: Rebuild.
2506 * configure: Rebuild.
2507 * po/SRC-POTFILES.in: Rebuild.
2508
1e2f5b6e
AM
25092002-07-01 Alan Modra <amodra@bigpond.net.au>
2510
2511 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
2512 examining to gc_mark_hook, rather than the bfd.
2513 (elf_gc_sections): Adjust.
2514 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
2515 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
2516 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
2517 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
2518 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
2519 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
2520 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
2521 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
2522 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
2523 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
2524 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
2525 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
2526 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
2527 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
2528 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
2529 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
2530 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
2531 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
2532 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
2533 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
2534 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
2535 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
2536 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
2537 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2538 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
2539 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
2540 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
2541 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
2542 redundant local sym tests.
2543 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
2544 (link_hash_newfunc): Init is_entry.
2545 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
2546 (ppc64_elf_link_hash_table_create): Init all_local_syms.
2547 (create_linkage_sections): Use bfd_make_section_anyway rather than
2548 bfd_make_section.
2549 (ppc64_elf_mark_entry_syms): New function.
2550 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
2551 up opd entry to function section map.
2552 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
2553 relocs that reference the opd section.
2554 (edit_opd): New function.
2555 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
2556 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
2557 (get_local_syms): Do so here. Exit if we already have local syms.
2558 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
2559 read local syms on non-ELF input.
2560 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
2561 than duplicating it's function here. Adjust free of internal
2562 relocs to suit.
2563 (ppc64_elf_relocate_section): Adjust local syms in opd section.
2564 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
2565 * elf32-hppa.c (elf32_hppa_size_stubs): Call
2566 _bfd_elf32_link_read_relocs rather than duplicating it's function
2567 here. Adjust free of internal relocs to suit.
2568
1b71fb54
AJ
25692002-07-01 Andreas Jaeger <aj@suse.de>
2570
2571 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
2572 are not allowed in shared libs code, enforce -fPIC.
2573
8d28f606
HPN
25742002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
2575
2576 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
2577 trailing zero-sequences when there's previous left-over data.
2578
5ac81c74
JL
25792002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
2580
2581 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
2582 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
2583 and opd_rel_sec in order for starting rela section. Check _raw_size.
2584 (elf_backend_reloc_type_class): Define.
2585
91a4d569
AM
25862002-06-27 Kevin Buettner <kevinb@redhat.com>
2587
2588 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
2589 DWARF2 formats.
2590
feee612b
AM
25912002-06-27 Alan Modra <amodra@bigpond.net.au>
2592
2593 * cpu-powerpc.c: Comment on ordering of arch_info.
2594 * elf32-ppc.c (ppc_elf_object_p): New function.
2595 (elf_backend_object_p): Define.
2596 * elf64-ppc.c (ppc64_elf_object_p): New function.
2597 (elf_backend_object_p): Define.
2598
a4e6cefc
JT
25992002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
2600
2601 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
2602 * configure: Regenerate.
2603
dae2dd0d
NC
26042002-06-25 Jason Eckhardt <jle@rice.edu>
2605
2606 * dwarf2.c (decode_line_info): Check unit->addr_size
2607 to read in the proper number of prologue bytes.
2608
680f9d5c
NC
26092002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
2610
2611 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
2612 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
2613 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
2614 been enabled.
dae2dd0d 2615
680f9d5c
NC
2616 * targets.c (_bfd_target_vector[]): Only include
2617 aix5coff64_vec if 64-bit bfd support has been enabled.
2618
d4c88bbb
AM
26192002-06-25 Alan Modra <amodra@bigpond.net.au>
2620
2621 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
2622 * elf32-hppa.c (hppa_add_stub): Likewise.
2623 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2624 * elflink.h (elf_add_default_symbol): Fix comment typo.
2625 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
2626 (elf_link_add_object_symbols): Likewise.
2627 (elf_link_assign_sym_version): Likewise.
2628 * hash.c (bfd_hash_lookup): Likewise.
2629 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2630 * section.c (bfd_get_unique_section_name): Likewise.
2631 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2632 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
2633 (assign_section_numbers): Likewise.
2634 (_bfd_elfcore_make_pseudosection): Likewise.
2635 (elfcore_grok_lwpstatus): Likewise.
2636 (elfcore_grok_win32pstatus): Likewise.
2637 (elfcore_write_note): Constify input params. Use PTR instead of
2638 void *. Include terminating NUL in namesz. Correct padding.
2639 Support NULL "name" param. Use memcpy instead of strcpy.
2640 (elfcore_write_prpsinfo): Constify input params.
2641 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
2642 (elfcore_write_lwpstatus): Likewise.
2643 (elfcore_write_pstatus): Likewise.
2644 (elfcore_write_prfpreg): Likewise.
2645 (elfcore_write_prxfpreg): Likewise.
2646 * elf-bfd.h (elfcore_write_note): Update declaration.
2647 (elfcore_write_prpsinfo): Likewise.
2648 (elfcore_write_prstatus): Likewise.
2649 (elfcore_write_pstatus): Likewise.
2650 (elfcore_write_prfpreg): Likewise.
2651 (elfcore_write_prxfpreg): Likewise.
2652 (elfcore_write_lwpstatus): Likewise.
2653
b0ac09d2
NC
26542002-06-25 Jason Eckhardt <jle@rice.edu>
2655
2656 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
2657 symbols of type stProc and stStaticProc.
2658
26592002-06-25 Nick Clifton <nickc@redhat.com>
2660
2661 * ecoff.c: VArious formatting fixes.
2662
021d6096
AM
26632002-06-25 Alan Modra <amodra@bigpond.net.au>
2664
2665 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
2666
82e51918
AM
26672002-06-25 Alan Modra <amodra@bigpond.net.au>
2668
2669 * aout-adobe.c: Don't compare against "true" or "false.
2670 * aout-target.h: Likewise.
2671 * aoutx.h: Likewise.
2672 * archive.c: Likewise.
2673 * bout.c: Likewise.
2674 * cache.c: Likewise.
2675 * coff-a29k.c: Likewise.
2676 * coff-alpha.c: Likewise.
2677 * coff-i386.c: Likewise.
2678 * coff-mips.c: Likewise.
2679 * coff-or32.c: Likewise.
2680 * coff64-rs6000.c: Likewise.
2681 * coffcode.h: Likewise.
2682 * coffgen.c: Likewise.
2683 * cpu-ns32k.c: Likewise.
2684 * ecoff.c: Likewise.
2685 * ecofflink.c: Likewise.
2686 * elf.c: Likewise.
2687 * elf32-arm.h: Likewise.
2688 * elf32-cris.c: Likewise.
2689 * elf32-d30v.c: Likewise.
2690 * elf32-i386.c: Likewise.
2691 * elf32-mcore.c: Likewise.
2692 * elf32-ppc.c: Likewise.
2693 * elf32-sh.c: Likewise.
2694 * elf32-sh64.c: Likewise.
2695 * elf32-v850.c: Likewise.
2696 * elf64-alpha.c: Likewise.
2697 * elf64-sh64.c: Likewise.
2698 * elfcode.h: Likewise.
2699 * elfcore.h: Likewise.
2700 * elflink.h: Likewise.
2701 * elfxx-mips.c: Likewise.
2702 * i386os9k.c: Likewise.
2703 * ieee.c: Likewise.
2704 * libbfd.c: Likewise.
2705 * linker.c: Likewise.
2706 * mmo.c: Likewise.
2707 * nlm32-alpha.c: Likewise.
2708 * nlm32-i386.c: Likewise.
2709 * nlm32-ppc.c: Likewise.
2710 * nlm32-sparc.c: Likewise.
2711 * nlmcode.h: Likewise.
2712 * oasys.c: Likewise.
2713 * pdp11.c: Likewise.
2714 * peicode.h: Likewise.
2715 * reloc.c: Likewise.
2716 * som.c: Likewise.
2717 * srec.c: Likewise.
2718 * tekhex.c: Likewise.
2719 * vms.c: Likewise.
2720 * xcofflink.c: Likewise.
2721 * elf64-sparc.c: Edit comment to not use "== false".
2722
2723 * aoutf1.h: Don't use "? true : false".
2724 * ecoff.c: Likewise.
2725 * format.c: Likewise.
2726 * ieee.c: Likewise.
2727 * linker.c: Likewise.
2728 * mmo.c: Likewise.
2729 * oasys.c: Likewise.
2730
48fc70a2
AM
27312002-06-23 H.J. Lu <hjl@gnu.org>
2732
2733 * elflink.h (elf_link_add_archive_symbols): For the default
2734 version, check references with only one `@' first.
2735
47b7c2db
AM
27362002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
2737
2738 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
2739 function.
2740 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
2741 symbol table.
2742 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
2743 (elf64_hppa_size_dynamic_sections): Revise to use
2744 elf64_hppa_mark_milli_and_exported_functions.
2745 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
2746 symbols out of dynamic symbol table.
2747
f5d44ba0
AM
27482002-06-23 Alan Modra <amodra@bigpond.net.au>
2749
bb3fff1e
AM
2750 * Makefile.in: Regenerate.
2751 * libbfd.h: Regenerate.
2752 * bfd-in2.h: Regenerate.
2753 * configure: Regenerate.
2754 * po/SRC-POTFILES.in: Regenerate.
2755
f5d44ba0
AM
2756 * elflink.h: Comment typo fixes.
2757
27582002-06-23 H.J. Lu <hjl@gnu.org>
2759
2760 * elf-bfd.h (elf_link_loaded_list): New structure.
2761 (elf_link_hash_table): Add "loaded".
2762 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
2763 * elflink.h (elf_link_check_versioned_symbol): New function.
2764 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
2765
cc36acdf
NC
27662002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
2767
2768 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 2769 support an ELF style hash table, return true, indicating that
cc36acdf
NC
2770 nothing needed to be done, rather than false, indicating that the
2771 section's size could not be computed.
2772
4e5ba5b7
DB
27732002-06-18 Dave Brolley <brolley@redhat.com>
2774
2775 From Catherine Moore, Michael Meissner, Dave Brolley:
2776 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
2777 * targets.c: Support bfd_elf32_frv_vec.
2778 * reloc.c: Add FRV relocs.
2779 * configure.in: Add support for bfd-elf32-frv-vec.
2780 * config.bfd (targ_cpu): Add support for frv-*-elf.
2781 * archures.c: Add frv arch and machines.
2782 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
2783 (ALL_MACHINES_CFILES): Add cpu-frv.c.
2784 (BFD32_BACKENDS): Add elf32-frv.lo.
2785 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
2786 (cpu-frv.lo): New target.
2787 (elf32-frv.lo): New target.
2788 * cpu-frv.c: New file.
2789 * elf32-frv.c: New file.
2790
7ece0d85
JJ
27912002-06-18 Jakub Jelinek <jakub@redhat.com>
2792
2793 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
2794 e_shnum == 0.
2795 Only read the first section header if e_shoff is non-zero.
2796 Don't consider e_shstrndx if there are no sections.
2797
57fb03ac
TR
27982002-06-17 Tom Rix <trix@redhat.com>
2799
2800 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 2801 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
2802 complain_overflow_bitfield.
2803
341ca622
AM
28042002-06-17 Alan Modra <amodra@bigpond.net.au>
2805
767e34d1
AM
2806 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
2807 (bfd_fdopenr): Likewise.
2808 (bfd_openstreamr): Likewise.
2809 (bfd_openw): Likewise.
2810
341ca622
AM
2811 * targets.c: Sort target vecs.
2812 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
2813 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
2814 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
2815 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
2816 * configure.in: Sort target vecs. Add m88kmach3_vec.
2817 * configure: Regenerate.
2818
dfbbae4c
HPN
28192002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
2820
2821 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
2822 bpo_reloc_no to break sort order ties, not address of items.
2823
d663e1cd
JL
28242002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
2825
2826 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
2827 Skip excluded sections in determing __gp value.
2828 (elf_hppa_final_link_relocate): Use the symbol's address in
2829 R_PARISC_FPTR64 relocations that don't need an opd entry.
2830 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
2831 (elf64_hppa_finalize_dynreloc): Likewise.
2832 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
2833 (elf64_hppa_finish_dynamic_symbol): Break up assert.
2834
a8295218
NC
28352002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
2836
2837 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2838 alignment for .bss, .data and .text sections so that sse and sse2
2839 code will work.
2840 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2841
28422002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
2843
2844 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
2845 sh[1234]*-elf*.
2846
3db4b612
JL
28472002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2848
2cb69dd3
JL
2849 * elflink.h (elf_bfd_final_link): Improve error handling for missing
2850 dynamic sections.
2851
3db4b612
JL
2852 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
2853 for a symbol that has no output section.
2854 (allocate_dynrel_entries): Correct comment.
2855 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
2856 unless we want one.
2857 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
2858 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
2859 with no section. Remove unnecessary parentheses.
2860
f3813499
TR
28612002-06-11 Tom Rix <trix@redhat.com>
2862
2863 * coffcode.h (coff_compute_section_file_positions): Add data
2864 section to AIX loader alignment check.
2865
f5d44ba0 2866 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
2867 alignment to 4 bytes.
2868 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
2869 power accessor macro.
2870 (do_shared_object_padding): Remove invalid assertion.
2871
0ebaf185
RS
28722002-06-10 Richard Sandiford <rsandifo@redhat.com>
2873
2874 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
2875 for removed output sections.
2876
ebe3e2d1
NC
28772002-06-10 Geoffrey Keating <geoffk@redhat.com>
2878
2879 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
2880 htab_alloc.
2881 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
2882
0b14c2aa
L
28832002-06-08 H.J. Lu <hjl@gnu.org>
2884
2885 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
2886 work around a long long bug in gcc 2.96 on mips.
2887
3c2bfad6
JT
28882002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
2889
2890 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
2891 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
2892 Regenerate dependency lists.
2893 * Makefile.in: Regenerate.
2894 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
2895 vax1knetbsd_vec to targ_selvecs.
2896 * configure.in: Add vax1knetbsd_vec.
2897 * configure: Regenerate.
2898 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
2899 * vax1knetbsd.c: New file.
2900 * vaxnetbsd.c: Update copyright years.
2901 (TARGET_PAGE_SIZE): Set to 0x1000.
2902 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
2903
91149be3
JT
29042002-06-08 Matt Thomas <matt@3am-software.com>
2905
2906 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
2907
21e15248
AM
29082002-06-08 Alan Modra <amodra@bigpond.net.au>
2909
2910 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
2911
986b7daa
AM
29122002-06-08 Alan Modra <amodra@bigpond.net.au>
2913
e90b95f6
AM
2914 * Makefile.am: Run "make dep-am".
2915 * Makefile.in: Regenerate.
2916
3f9c735e
AM
2917 * armnetbsd.c: Replace CONST with const.
2918 * corefile.c: Likewise.
2919 * elf32-dlx.c: Likewise.
2920 * elf64-mips.c: Likewise.
2921 * mmo.c: Likewise.
2922 * ns32knetbsd.c: Likewise.
2923
986b7daa
AM
2924 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
2925 table is elf64-sparc.
2926
5a659663
TS
29272002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2928
2929 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
2930 Fix RELA addends to get not shifted in the result. Don't do special
2931 handling of R_MIPS_64 for NewABI.
2932
9bab7074
AM
29332002-06-07 Alan Modra <amodra@bigpond.net.au>
2934
2935 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2936 (NAME(aout,slurp_reloc_table)): Likewise.
2937 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
2938 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
2939 (xcoff_write_archive_contents_big): Likewise.
2940 (xcoff_generate_rtinit): Likewise.
2941 (xcoff_generate_rtinit): Likewise, and check error return.
2942 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2943 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
2944 (coff_get_normalized_symtab): Likewise.
2945 (coff_make_empty_symbol): Likewise.
2946 (bfd_coff_set_symbol_class): Likewise.
2947 * cofflink.c (coff_link_add_symbols): Likewise.
2948 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
2949 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
2950 (bfd_ecoff_write_accumulated_debug): Likewise.
2951 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
2952 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
2953 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
2954 * ieee.c (do_with_relocs): Use bfd_zalloc.
2955 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
2956 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2957 (NAME(aout,slurp_reloc_table)): Likewise.
2958 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
2959 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
2960 * som.c (som_build_and_write_symbol_table): Likewise.
2961 (som_slurp_string_table): Likewise.
2962 (som_slurp_symbol_table): Likewise.
2963 (som_bfd_ar_write_symbol_stuff): Likewise.
2964 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
2965 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
2966 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
2967 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
2968 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
2969
1126897b
AM
29702002-06-07 Alan Modra <amodra@bigpond.net.au>
2971
2972 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
2973 "group" union.
2974 (elf_group_name): Update.
2975 (elf_group_id): Define.
2976 (bfd_elf_set_group_contents): Declare.
2977 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
2978 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
2979 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
2980 that sym for the signature.
2981 (_bfd_elf_compute_section_file_positions): Don't call
2982 set_group_contents for "ld -r" case.
2983 (swap_out_syms): Use bfd_zalloc.
2984 * elflink.h (elf_link_add_archive_symbols): Likewise.
2985 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2986 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
2987
3fad3c7c
AM
29882002-06-07 Alan Modra <amodra@bigpond.net.au>
2989
2990 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
2991 relocs in opd for non-shared too.
2992
10f469bf 29932002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
2994
2995 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
2996 relocations.
2997
7217313c
NC
29982002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
2999
3000 * merge.c: Include libiberty.h.
3001 * elf-strtab.c: Include libiberty.h.
3002
6cb22815
AM
30032002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
3004
3005 * peXXigen.c (pe_print_idata): Remove unused variable.
3006
1ed89aa9
NC
30072002-06-06 David Heine <dlheine@tensilica.com>
3008
3009 * elf.c (assign_file_positions_for_segments): Remove unallocated
3010 sections from the section to segment mapping for PT_LOAD segments.
3011 Update comment about empty loadable segments.
3012
644c4c80
RS
30132002-06-06 Richard Sandiford <rsandifo@redhat.com>
3014
3015 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
3016 is within the .stabstr section.
3017
f8ecb12b
AM
30182002-06-06 Alan Modra <amodra@bigpond.net.au>
3019
3020 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
3021 are "const PTR", not "const PTR *".
3022 (bfd_elf32_swap_symbol_in): Likewise.
3023 (bfd_elf64_swap_symbol_in): Likewise.
3024 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
3025 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
3026 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3027 (elf_link_add_object_symbols): Likewise.
3028 (elf_link_record_local_dynamic_symbol): Likewise.
3029 (elf_link_input_bfd): Likewise.
3030 (elf_gc_mark): Likewise.
3031 (elf_reloc_symbol_deleted_p): Likewise.
3032 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3033 (mn10200_elf_relax_delete_bytes): Likewise.
3034 (mn10200_elf_symbol_address_p): Likewise.
3035 (mn10200_elf_get_relocated_section_contents): Likewise.
3036 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3037 (mn10300_elf_relax_section): Likewise.
3038 (mn10300_elf_relax_delete_bytes): Likewise.
3039 (mn10300_elf_symbol_address_p): Likewise.
3040 (mn10300_elf_get_relocated_section_contents): Likewise.
3041 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3042 (elf32_h8_relax_delete_bytes): Likewise.
3043 (elf32_h8_symbol_address_p): Likewise.
3044 (elf32_h8_get_relocated_section_contents): Likewise.
3045 * elf32-hppa.c (get_local_syms): Likewise.
3046 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3047 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3048 * elf32-sh.c (sh_elf_relax_section): Likewise.
3049 (sh_elf_relax_delete_bytes): Likewise.
3050 (sh_elf_get_relocated_section_contents): Likewise.
3051 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3052 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3053 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3054 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3055 * elf64-ppc.c (get_local_syms): Likewise.
3056 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3057 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3058
1ed89aa9 30592002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
3060
3061 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
3062
73ff0d56
AM
30632002-06-05 Alan Modra <amodra@bigpond.net.au>
3064
9dce4196
AM
3065 * elf.c (group_signature): Swap in the whole symbol, and handle
3066 extracting section symbol names.
3067 (setup_group): Add comment.
3068 (set_group_contents): When called from objcopy or ld, arrange for
3069 section contents to be written. Write group member output section
3070 indices to allow objcopy to reorganize sections.
3071 (_bfd_elf_copy_private_section_data): Copy group info.
3072
73ff0d56
AM
3073 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
3074 (bfd_elf32_swap_symbol_in): Update prototype.
3075 (bfd_elf64_swap_symbol_in): Likewise.
3076 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
3077 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
3078 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3079 (elf_link_add_object_symbols): Likewise.
3080 (elf_link_record_local_dynamic_symbol): Likewise.
3081 (elf_link_input_bfd): Likewise.
3082 (elf_gc_mark): Likewise.
3083 (elf_reloc_symbol_deleted_p): Likewise.
3084 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
3085 (mn10200_elf_relax_delete_bytes): Likewise.
3086 (mn10200_elf_symbol_address_p): Likewise.
3087 (mn10200_elf_get_relocated_section_contents): Likewise.
3088 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
3089 (mn10300_elf_relax_section): Likewise.
3090 (mn10300_elf_relax_delete_bytes): Likewise.
3091 (mn10300_elf_symbol_address_p): Likewise.
3092 (mn10300_elf_get_relocated_section_contents): Likewise.
3093 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3094 (elf32_h8_relax_delete_bytes): Likewise.
3095 (elf32_h8_symbol_address_p): Likewise.
3096 (elf32_h8_get_relocated_section_contents): Likewise.
3097 * elf32-hppa.c (get_local_syms): Likewise.
3098 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
3099 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3100 * elf32-sh.c (sh_elf_relax_section): Likewise.
3101 (sh_elf_relax_delete_bytes): Likewise.
3102 (sh_elf_get_relocated_section_contents): Likewise.
3103 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
3104 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
3105 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
3106 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3107 * elf64-ppc.c (get_local_syms): Likewise.
3108 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
3109 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
3110 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
3111 * elf64-alpha.c (alpha_elf_size_info): Likewise.
3112 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3113 * elf64-mips.c (mips_elf64_size_info): Likewise.
3114 * elf64-s390.c (s390_elf64_size_info): Likewise.
3115 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3116
53bfd6b4
MR
31172002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3118
3119 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
3120 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
3121 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
3122 _bfd_mips_elf_ignore_discarded_relocs.
3123 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
3124
d4df96e6
L
31252002-06-05 H.J. Lu <hjl@gnu.org>
3126
3127 * elfxx-mips.c (mips_elf_calculate_relocation): Call
3128 _bfd_elf_rel_local_sym for STT_SECTION relocations against
3129 the SEC_MERGE section.
3130
e61463e1
AM
31312002-06-05 Alan Modra <amodra@bigpond.net.au>
3132
3cac74d0
AM
3133 * coff-alpha.c: Update copyright date.
3134 * coff-mips.c: Likewise.
3135 * xcoff-target.h: Likewise.
3136
e61463e1
AM
3137 * bfd-in.h: Remove "taken from the source" comment.
3138 * libbfd-in.h: Likewise.
3139 * libcoff-in.h: Likewise.
3140 * bfd-in2.h: Regenerate.
3141 * libbfd.h: Regenerate.
3142 * libcoff.h: Regenerate.
3143
3144 * elf.c (bfd_elf_discard_group): Return true.
3145 * elf-bfd.h (bfd_elf_discard_group): Declare.
3146 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
3147 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
3148 * bfd.c (bfd_discard_group): Define.
3149 * targets.c (struct bfd_target): Add _bfd_discard_group.
3150 (BFD_JUMP_TABLE_LINK): Here too.
3151 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
3152 * aout-adobe.c (aout_32_bfd_discard_group): Define.
3153 * aout-target.h (MY_bfd_discard_group): Define.
3154 * aout-tic30.c (MY_bfd_discard_group): Define.
3155 * binary.c (binary_bfd_discard_group): Define.
3156 * bout.c (b_out_bfd_discard_group): Define.
3157 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
3158 * coffcode.h (coff_bfd_discard_group): Define.
3159 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
3160 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
3161 * i386msdos.c (msdos_bfd_discard_group): Define.
3162 * i386os9k.c (os9k_bfd_discard_group): Define.
3163 * ieee.c (ieee_bfd_discard_group): Define.
3164 * ihex.c (ihex_bfd_discard_group): Define.
3165 * mmo.c (mmo_bfd_discard_group): Define.
3166 * nlm-target.h (nlm_bfd_discard_group): Define.
3167 * oasys.c (oasys_bfd_discard_group): Define.
3168 * ppcboot.c (ppcboot_bfd_discard_group): Define.
3169 * som.c (som_bfd_discard_group): Define.
3170 * srec.c (srec_bfd_discard_group): Define.
3171 * tekhex.c (tekhex_bfd_discard_group): Define.
3172 * versados.c (versados_bfd_discard_group): Define.
3173 * vms.c (vms_bfd_discard_group): Define.
3174 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
3175 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
3176 (aix5coff64_vec): Likewise.
3177 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
3178
9cba27b2
JT
31792002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
3180
3181 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
3182 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
3183 (elf32-sh64-com.lo): New dependency list.
3184 * Makefile.in: Regenerate.
3185 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
3186 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
3187 elf32-sh64-com.lo.
3188 * configure: Regenerate.
3189 * elf32-sh64.c (sh64_address_in_cranges)
3190 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
3191 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
3192 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
3193 * elf32-sh64-com.c: ...here. New file.
3194
8d2c33be
AM
31952002-06-04 Alan Modra <amodra@bigpond.net.au>
3196
3197 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
3198 ATTRIBUTE_UNUSED on used params.
3199 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
3200 before calling bfd_section_from_elf_index on local syms.
3201 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
3202
5b0e55b6
JT
32032002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
3204
3205 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
3206 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
3207 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
3208 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
3209 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
3210 * Makefile.in: Regenerate.
3211 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
3212 (sh64-*-netbsd*): New targets.
3213 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
3214 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
3215 * configure: Regenerate.
3216 * elf32-sh64-nbsd.c: New file.
3217 * elf64-sh64-nbsd.c: New file.
3218 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
3219 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
3220 bfd_elf64_sh64lnbsd_vec.
3221
b885599b
AM
32222002-06-04 Alan Modra <amodra@bigpond.net.au>
3223
3224 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
3225 (bfd_section_from_shdr): Likewise. Set section name of group
3226 sections from signature.
3227 (group_signature): Split out from setup_group. Ensure symbol table
3228 is available.
3229 (bfd_elf_discard_group): New function.
3230 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
3231 .gnu.linkonce* sections if they are members of a group.
3232 (set_group_contents): Set GRP_COMDAT flag.
3233 * section.c (bfd_discard_group): New function.
3234 * bfd-in.h (bfd_elf_discard_group): Declare.
3235 * bfd-in2.h: Regenerate.
3236 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
3237 (elf_linkonce_p): Define.
3238
90937f86
AM
32392002-06-04 Alan Modra <amodra@bigpond.net.au>
3240
3241 * elf.c (bfd_section_from_shdr): Make "name" const.
3242 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
3243 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
3244 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
3245 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
3246 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
3247 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
3248 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
3249 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
3250 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
3251 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
3252 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
3253
cf6fb9ce
MR
32542002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3255
3256 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
3257 ABI.
3258
cedb70c5
KH
32592002-06-02 Kazu Hirata <kazu@cs.umass.edu>
3260
3261 * elf32-arc.c: Fix formatting.
3262 * elf32-arm.h: Likewise.
3263 * elf32-cris.c: Likewise.
3264 * elf32-dlx.c: Likewise.
3265 * elf32-hppa.c: Likewise.
3266 * elf32-i386.c: Likewise.
3267 * elf32-i386qnx.c: Likewise.
3268 * elf32-or32.c: Likewise.
3269 * elf32-s390.c: Likewise.
3270 * elf32-sh64.c: Likewise.
3271 * elf32-vax.c: Likewise.
3272 * elf32-xstormy16.c: Likewise.
3273 * elf64-alpha.c: Likewise.
3274 * elf64-mmix.c: Likewise.
3275 * elf64-ppc.c: Likewise.
3276 * elf64-s390.c: Likewise.
3277 * elf64-sh64.c: Likewise.
3278 * elf64-x86-64.c: Likewise.
3279
048d873d
RH
32802002-06-02 Richard Henderson <rth@redhat.com>
3281
3282 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
3283 null when there are no got entries for a symbol.
3284 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
3285 uninitialized variable warning.
3286
4a67a098
RH
32872002-06-01 Richard Henderson <rth@redhat.com>
3288
3289 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
3290 undefined symbols here.
3291 (elf64_alpha_relax_section): Do it here. Also test for not
3292 defined in the current module.
3293 (elf64_alpha_relocate_section_r): Split out of ...
3294 (elf64_alpha_relocate_section): ... here. Don't dereference
3295 NULL when looking up local got entries.
3296
f44f99a5
RH
32972002-06-01 Richard Henderson <rth@redhat.com>
3298
3299 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
3300 symbols from JSR relaxation.
3301 (elf64_alpha_size_plt_section_1): New.
3302 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
3303 (elf64_alpha_size_rela_got_1): ... here.
3304 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
3305 (elf64_alpha_size_rela_got_section): ... here.
3306 (elf64_alpha_size_plt_section): New.
3307 (elf64_alpha_relax_section): Call them.
3308 (elf64_alpha_size_got_sections): Remove output_bfd arg.
3309 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
3310
9e756d64
RH
33112002-06-01 Richard Henderson <rth@redhat.com>
3312
3313 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
3314 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
3315 in shared libraries. Fix DTPRELHI and TPRELHI value.
3316 (INSN_ADDQ, INSN_RDUNIQ): New.
3317 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
3318 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
3319 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
3320 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
3321 Handle GOTDTPREL and GOTTPREL relocations.
3322 (elf64_alpha_relax_gprelhilo): New.
3323 (elf64_alpha_relax_tls_get_addr): New.
3324 (elf64_alpha_relax_find_tls_segment): New.
3325 (elf64_alpha_relax_section): Handle TLS relocations.
3326 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
3327 (elf64_alpha_check_relocs): Set it.
3328
c853d7f6
RH
33292002-06-01 Richard Henderson <rth@redhat.com>
3330
b646261c
RH
3331 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
3332
c853d7f6
RH
3333 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
3334 check; don't suppress dynamic relocs for non-allocated sections.
3335
d7e41a96
RH
3336 * elf64-alpha.c: Remove dead code.
3337
5f333394
AM
33382002-05-31 Alan Modra <amodra@bigpond.net.au>
3339
08e0ee05
AM
3340 * bfd-in2.h: Regenerate.
3341 * libbfd.h: Regenerate.
3342 * po/SRC-POTFILES.in: Regenerate.
3343
5f333394
AM
3344 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
3345 space for bss .plt.
3346
caf47ea6
AM
33472002-05-31 Graeme Peterson <gp@qnx.com>
3348
3349 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
3350 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
3351 Run "make dep-am".
3352 * Makefile.in: Regenerate.
3353 * config.bfd: Add i[3456]86-*-nto-qnx* support.
3354 * configure.in: Add bfd_elf32_i386qnx_vec support.
3355 * configure: Regenerate.
3356 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
3357 is_contained_by_filepos, and copy_private_bfd_data_p.
3358 * elf.c (assign_file_positions_for_segments): Call backend
3359 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
3360 (IS_CONTAINED_BY_FILEPOS): Define.
3361 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
3362 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
3363 Fix non-K&R call to _bfd_error_handler.
3364 (_bfd_elf_copy_private_section_data): Use backend
3365 copy_private_bfd_data_p.
3366 * elf32-i386.c: Don't include elfxx-target.h when
3367 ELF32_I386_C_INCLUDED is defined.
3368 * elf32-i386qnx.c: New QNX elf backend file.
3369 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
3370 elf_backend_is_contained_by_filepos, and
3371 elf_backend_do_copy_private_bfd_data.
3372 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
3373
5bc56484
AM
33742002-05-31 Alan Modra <amodra@bigpond.net.au>
3375
3376 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
3377 Move other similar defines to start of file.
3378
1b164155
TR
33792002-05-30 Tom Rix <trix@redhat.com>
3380
3381 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
3382 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
3383
3765b1be
RH
33842002-05-30 Richard Henderson <rth@redhat.com>
3385
3386 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
3387 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
3388 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
3389 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
3390 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
3391 (struct alpha_elf_obj_tdata): Rename total_got_entries and
3392 n_local_got_entries to total_got_size and local_got_size.
3393 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
3394 (alpha_got_entry_size): New.
3395 (elf64_alpha_relax_with_lituse): Use it.
3396 (elf64_alpha_relax_without_lituse): Likewise.
3397 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
3398 (get_got_entry): New.
3399 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
3400 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
3401 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
3402 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
3403 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
3404 (elf64_alpha_calc_got_offsets): Likewise.
3405 (alpha_dynamic_entries_for_reloc): New.
3406 (elf64_alpha_calc_dynrel_sizes): Use it.
3407 (elf64_alpha_size_dynamic_sections): Likewise.
3408 (elf64_alpha_relocate_section): Handle TLS relocations.
3409 * reloc.c: Add Alpha TLS relocations.
3410 * bfd-in2.h, libbfd.h: Rebuild.
3411
5e226794
NC
34122002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
3413
3414 * peXXigen.c (pe_print_idata): Remove double printed
3415 import table lines; add Bound-To comment.
3416
90ace9e9
JT
34172002-05-29 Matt Thomas <matt@3am-software.com>
3418
3419 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
3420 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
3421 (elf32-vax.lo): New rule.
3422 * Makefile.in: Regenerate.
3423 * configure.in (bfd_elf32_vax_vec)
3424 (vaxnetbsd_vec): New vectors.
3425 * configure: Regenerate.
3426 * config.bfd (vax-*-netbsdelf*)
3427 (vax-*-netbsdaout*)
3428 (vax-*-netbsd*): New targets.
3429 * elf32-vax.c: New file.
3430 * reloc.c: Add VAX relocations.
3431 * bfd-in2.h: Regenerate.
3432 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
3433
4a253e81
JT
34342002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
3435
3436 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
3437 and bfd_elf32_bigarm_vec to targ_selvecs.
3438
6e7c73dd
CF
34392002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
3440
3441 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
3442 with auto-imported symbols.
3443
8afb0e02
NC
34442002-05-29 Adam Nemet <anemet@lnxw.com>
3445
3446 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
3447 sections only record bfd.
9bab7074 3448 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 3449 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 3450 * bfd-in2.h: Regenerate.
8afb0e02 3451
a95653f5
NC
34522002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
3453
3454 * syms.c (_bfd_stab_section_find_nearest_line): Move
3455 declaration and initialisation of saw_line and saw_func out of
3456 for loop.
3457
7cdc5bba
AM
34582002-05-29 Alan Modra <amodra@bigpond.net.au>
3459
3460 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
3461 (bfd_elf64_get_symbol_info): Define.
3462 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
3463
4c7aad1c
AM
34642002-05-29 Andrey Volkov <avolkov@transas.com>
3465
3466 * cpu-h8300.c: Make default h8300 machine first in machine list.
3467
d172d4ba
NC
34682002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
3469
3470 * config.bfd: Added DLX configuraton.
3471 * Makefile.am: Added DLX configuraton.
3472 * configure.in: Added DLX configuraton.
3473 * archures.c: Add DLX architecure.
3474 * reloc.c: Add DLX relocs.
3475 * targets.c: Added DLX target vector.
3476 * configure: Regenerate.
3477 * Makefile.in: Regenreate.
3478 * bfd-in2.h: Regenreate.
3479 * elf32-dlx.c: New file: Support DLX target.
3480 * cpu-dlx.c: New file: Support DLX target.
3481
d1329ca3
AM
34822002-05-25 Alan Modra <amodra@bigpond.net.au>
3483
428d0de3
AM
3484 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
3485
d1329ca3
AM
3486 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
3487 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
3488 strings to point inside function code sym string.
3489 (func_desc_adjust): Likewise.
3490 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
3491
3bab7989
ML
34922002-05-24 Michal Ludvig <mludvig@suse.cz>
3493
3494 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
3495 (elf64_x86_64_grok_psinfo): Added.
3496
436e8db0
NC
34972002-05-24 TAMURA Kent <kent@netbsd.org>
3498
3499 * config.bfd: Add a target for i386-netbsdpe.
3500
ea1e4b0d
AM
35012002-05-24 Alan Modra <amodra@bigpond.net.au>
3502
3503 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
3504 and is_func_descriptor.
3505 (func_desc_adjust): Hide function code sym in shared libs unless
3506 there is a matching exported function descriptor sym.
3507
13ae64f3
JJ
35082002-05-23 Jakub Jelinek <jakub@redhat.com>
3509
3510 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
3511 for symbols from SHF_TLS section.
3512 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
3513 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
3514 (map_sections_to_segments): Build PT_TLS segment if necessary.
3515 (assign_file_positions_for_segments): Likewise.
3516 (get_program_header_size): Account for PT_TLS segment.
3517 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
3518 SEC_THREAD_LOCAL sections to STT_TLS.
3519 * reloc.c: Add 386 and IA-64 TLS relocs.
3520 * section.c (SEC_THREAD_LOCAL): Define.
3521 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
3522 Remove.
3523 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
3524 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
3525 unconditionally.
3526 (struct elf_final_link_info): Add first_tls_sec.
3527 (elf_bfd_final_link): Set first_tls_sec.
3528 Compute elf_hash_table (info)->tls_segment.
3529 (elf_link_output_extsym): Handle STT_TLS symbols.
3530 (elf_link_input_bfd): Likewise.
3531 * syms.c (BSF_THREAD_LOCAL): Define.
3532 * bfd-in2.h: Rebuilt.
3533 * libbfd.h: Rebuilt.
3534 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
3535 elf_i386_mkobject, elf_i386_object_p): New functions.
3536 (elf_howto_table): Add TLS relocs.
3537 (elf_i386_reloc_type_lookup): Support TLS relocs.
3538 (elf_i386_info_to_howto_rel): Likewise.
3539 (struct elf_i386_link_hash_entry): Add tls_type.
3540 (struct elf_i386_obj_tdata): New.
3541 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
3542 New macros.
3543 (struct elf_i386_link_hash_table): Add tls_ldm_got.
3544 (link_hash_newfunc): Clear tls_type.
3545 (elf_i386_check_relocs): Support TLS relocs.
3546 (elf_i386_gc_sweep_hook): Likewise.
3547 (allocate_dynrelocs): Likewise.
3548 (elf_i386_size_dynamic_sections): Likewise.
3549 (elf_i386_relocate_section): Likewise.
3550 (elf_i386_finish_dynamic_symbol): Likewise.
3551 (bfd_elf32_mkobject, elf_backend_object_p): Define.
3552 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
3553 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
3554 want_tprel, want_dtpmod, want_dtprel.
3555 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
3556 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
3557 R_IA64_LTOFF_TPREL22.
3558 (elf_code_to_howto_index): Add TLS relocs.
3559 (elfNN_ia64_check_relocs): Support TLS relocs.
3560 (allocate_global_data_got): Account for TLS .got data.
3561 (allocate_dynrel_entries): Account for TLS dynamic relocations.
3562 (elfNN_ia64_install_value): Supprt TLS relocs.
3563 (set_got_entry): Support TLS relocs.
3564 (elfNN_ia64_relocate_section): Likewise.
3565
c62e1cc3
NC
35662002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3567
3568 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
3569 BLX reloc round the relocation up rather than down.
3570 * coff-arm.c (coff_arm_relocate_section): Likewise.
3571
c5a43a5d
L
35722002-05-21 H.J. Lu (hjl@gnu.org)
3573
3574 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
3575 definition.
3576
afbe61cf
AM
35772002-05-22 Alan Modra <amodra@bigpond.net.au>
3578
3579 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
3580 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
3581
9c07fe7c
AM
35822002-05-22 Alan Modra <amodra@bigpond.net.au>
3583
3584 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
3585 unresolved relocs.
3586 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
3587
21611032
TS
35882002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3589
c5cd6d62 3590 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
3591 non-ELF targets.
3592
41241523
TS
35932002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3594
3595 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
3596 an error value.
3597 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
3598 return with false on error.
3599 (elf_link_input_bfd): Check reloc_emitter return value.
3600
658f2588
JT
36012002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
3602
3603 * config.bfd (armeb-*-netbsdelf*): New target.
3604
c862ae31
AM
36052002-05-20 Alan Modra <amodra@bigpond.net.au>
3606
3607 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
3608 at the plt call stub.
3609
6dd14845
TS
36102002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3611
3612 * cpu-mips.c (mips_compatible): Don't try to check machine
3613 compatibility.
3614
a58d9c34
TR
36152002-05-18 Tom Rix <trix@redhat.com>
3616
3617 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
3618
ef60b7ff
AM
36192002-05-17 Alan Modra <amodra@bigpond.net.au>
3620
3621 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
3622 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
3623 we've already warned about an undefined symbol. Report more
3624 detail on reloc errors.
3625
a703a6ea
AM
36262002-05-17 Alan Modra <amodra@bigpond.net.au>
3627
3628 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
3629 * configure.in: Invoke AM_INSTALL_LIBBFD.
3630 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
3631 (install_libbfd): .. New target.
3632 (uninstall_libbfd): Likewise.
3633 (install-bfdlibLTLIBRARIES): Likewise.
3634 (uninstall-bfdlibLTLIBRARIES): Likewise.
3635 (bfdlibdir): New.
3636 (bfdincludedir): New.
3637 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
3638 * aclocal.m4: Regenerate.
3639 * configure: Regenerate.
3640 * Makefile.in: Regenerate.
3641
2c13d98b
NC
36422002-05-17 Stuart Balfour <sbalfour@cisco.com>
3643
3644 * hash.c (bfd_hash_lookup): Remove computation of len from inside
3645 hash loop.
3646
629936c5
NC
36472002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
3648
3649 * config.bfd: Add targets for sh64-linux (little endian and
3650 big endian).
3651
e4cf60a8
NC
36522002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
3653
3654 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
3655 is located in the same section as the import table. Instead
3656 check, and if necessary load the section containing the thunk.
3657
d1e66cd4
NC
36582002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
3659
3660 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
3661 bfd_bread.
3662 (xcoff64_core_file_matches_executable_p): Replace bfd_read
3663 with bfd_bread.
d1e66cd4 3664
2d653fc7
AM
36652002-05-15 Alan Modra <amodra@bigpond.net.au>
3666
3667 * aix5ppc-core.c: Warning fixes.
3668 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
3669 * aout-target.h (MY_bfd_link_just_syms): Define.
3670 * aout-tic30.c (MY_bfd_link_just_syms): Define.
3671 * bfd.c (bfd_link_just_syms): Define.
3672 * binary.c (binary_bfd_link_just_syms): Define.
3673 * bout.c (b_out_bfd_link_just_syms): Define.
3674 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
3675 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
3676 * coffcode.h (coff_bfd_link_just_syms): Define.
3677 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
3678 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
3679 (_bfd_elf_link_just_syms): Declare.
3680 * elf.c (_bfd_elf_link_just_syms): New function.
3681 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
3682 sections haven't already been discarded by the linker.
3683 * elflink.h (elf_link_add_object_symbols): Likewise for stab
3684 sections and SEC_MERGE sections.
3685 (elf_bfd_discard_info): Similarly here.
3686 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
3687 * i386msdos.c (msdos_bfd_link_just_syms): Define.
3688 * i386os9k.c (os9k_bfd_link_just_syms): Define.
3689 * ieee.c (ieee_bfd_link_just_syms): Define.
3690 * ihex.c (ihex_bfd_link_just_syms): Define.
3691 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
3692 (_bfd_generic_link_just_syms): Declare.
3693 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
3694 * linker.c (_bfd_generic_link_just_syms): New function.
3695 * mmo.c (mmo_bfd_link_just_syms): Define.
3696 * nlm-target.h (nlm_bfd_link_just_syms): Define.
3697 * oasys.c (oasys_bfd_link_just_syms): Define.
3698 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
3699 * som.c (som_bfd_link_just_syms): Define.
3700 * srec.c (srec_bfd_link_just_syms): Define.
3701 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
3702 (BFD_JUMP_TABLE_LINK): And here.
3703 * tekhex.c (tekhex_bfd_link_just_syms): Define.
3704 * versados.c (versados_bfd_link_just_syms): Define.
3705 * vms.c (vms_bfd_link_just_syms): Define.
3706 * libbfd.h: Regenerate.
3707 * bfd-in2.h: Regenerate.
3708
cb7394f2
TS
37092002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3710
3711 * elf32-mips.c: Remove superfluous definitions copied from
3712 elfxx-mips.c.
3713 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
3714 SGIish vectors to check the special case.
3715 (mips_elf_hi16_reloc): Fix comment.
3716 (mips_elf_got16_reloc): Likewise.
3717 (_bfd_mips_elf32_gprel16_reloc): Likewise.
3718 (elf_reloc_map): Code cleanup.
3719 (mips_reloc_map): Add comment.
3720 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
3721 (mips_elf32_rtype_to_howto): Likewise.
3722 (mips_elf32_discard_info): Likewise.
3723 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
3724 lead to IRIX compatibility now.
3725
8dc1a139
TS
37262002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3727
3728 * elfxx-mips.c: Call it IRIX, not Irix in comments.
3729
2051e1b5
JT
37302002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
3731
3732 * config.bfd (shle-*-netbsdelf*): Add target which includes
3733 sh64 support.
3734
83954261
AM
37352002-05-13 David Edelsohn <edelsohn@gnu.org>
3736
3737 * configure.in: Revert 2002-04-07. Instead, auto-configure
3738 HAVE_ST_C_IMPL.
3739 * configure: Regenerate.
3740 * config.in: Regenerate.
3741 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
3742 or AIX_5_CORE.
3743
a9bf1154
NC
37442002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
3745
3746 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
3747 corefiles as well.2
3748 * configure: Regenerate.
3749
3129eb7a
AM
37502002-05-13 Alan Modra <amodra@bigpond.net.au>
3751
3752 * Makefile.am (install-data-local): Install headers to
3753 $(exec_prefix)/include.
3754 * Makefile.in: Regenerate.
3755
a9a32010
DJ
37562002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
3757 Daniel Jacobowitz <drow@mvista.com>
3758
3759 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
3760 map BFD_RELOC_RVA.
3761
37622002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
3763
3764 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
3765 hppa*-*-openbsd*): New targets.
3766 * configure.in (alpha*-*-openbsd*): Set COREFILE.
3767 * configure: Regenerate.
3768
f1f0d9ab
TR
37692002-05-10 Tom Rix <trix@redhat.com>
3770
ea1e4b0d 3771 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
3772 xcoff64_ppc_relocate_section.
3773 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
3774 * libxcoff.h: Common xcoff_reloc_type function declaration.
3775
c432ba1a
AM
37762002-05-10 Alan Modra <amodra@bigpond.net.au>
3777
16a10388 3778 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 3779 added in 2002-05-09 commit.
16a10388 3780
c432ba1a
AM
3781 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
3782 don't look for stubs on all undefined syms.
3783
4a335f3d
AM
37842002-05-09 Alan Modra <amodra@bigpond.net.au>
3785
8fc39d5d
AM
3786 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
3787 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
3788 pcrel_offset.
3789
4a335f3d
AM
3790 * elf32-i386.c (elf_howto_table): Comments.
3791 (elf_i386_relocate_section): Handle more relocs for relocatable
3792 linking and against SEC_MERGE sections.
3793
41fcb14e
AM
37942002-05-08 Alan Modra <amodra@bigpond.net.au>
3795
3796 * elf32-ppc.c (ppc_elf_create_got): New function.
3797 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 3798 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
3799 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
3800 _bfd_elf_create_got_section.
3801
b491616a
AM
38022002-05-07 Alan Modra <amodra@bigpond.net.au>
3803
3804 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
3805 * elfxx-target.h (elf_backend_rela_normal): Define.
3806 (elfNN_bed): Init rela_normal.
3807 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
3808 for section symbols here if rela_normal. Simplify abs section test.
3809 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
3810 return immediately. Remove code handling relocatable linking.
3811 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3812 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3813 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3814 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3815 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3816 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3817 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3818 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3819 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3820 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3821 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3822 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3823 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3824 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3825 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
3826 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3827 * elf-m10200.c (elf_backend_rela_normal): Define.
3828 * elf-m10300.c (elf_backend_rela_normal): Define.
3829 * elf32-fr30.c (elf_backend_rela_normal): Define.
3830 * elf32-i370.c (elf_backend_rela_normal): Define.
3831 * elf32-i860.c (elf_backend_rela_normal): Define.
3832 * elf32-m68k.c (elf_backend_rela_normal): Define.
3833 * elf32-mcore.c (elf_backend_rela_normal): Define.
3834 * elf32-openrisc.c (elf_backend_rela_normal): Define.
3835 * elf32-ppc.c (elf_backend_rela_normal): Define.
3836 * elf32-s390.c (elf_backend_rela_normal): Define.
3837 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
3838 * elf64-ppc.c (elf_backend_rela_normal): Define.
3839 * elf64-s390.c (elf_backend_rela_normal): Define.
3840 * elf64-x86-64.c (elf_backend_rela_normal): Define.
3841 * elfxx-ia64.c (elf_backend_rela_normal): Define.
3842 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
3843 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
3844
df212a7e
NC
38452002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
3846
3847 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
3848 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
3849
3decf53c
AM
38502002-05-06 Alan Modra <amodra@bigpond.net.au>
3851
3852 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
3853 when not relocatable. Fix reloc_emitter call for K&R.
3854
f46c2da6
AM
38552002-05-04 Alan Modra <amodra@bigpond.net.au>
3856
3857 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
3858 reloading local sym addend mistakenly removed in 2002-05-01 change.
3859
3860 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
3861 (read_abbrevs): Change "offset" param to bfd_vma.
3862 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
3863 Change "abbrev_offset" to bfd_vma.
3864 (read_indirect_string): Use correct conversion chars in error
3865 message format string, cast bfd_vma's to unsigned long.
3866 (read_abbrevs): Likewise.
3867 (read_attribute_value): Likewise.
3868 (decode_line_info): Likewise.
3869 (scan_unit_for_functions): Likewise.
3870 (parse_comp_unit): Likewise.
3871
59862849
TR
38722002-05-04 Tom Rix <trix@redhat.com>
3873
3874 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
3875 (coff_swap_reloc_out): Same.
3876 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
3877 (xcoff_swap_reloc_out): Same.
3878 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
3879 case some 16 bit relocs. Add reloc value to output.
3880 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 3881 R_RBR. Improve names.
59862849
TR
3882 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
3883 (bfd_xcoff_backend_data): Update with new reloc swap names.
3884 (bfd_pmac_xcoff_backend_data) : Same.
3885 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
3886 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 3887 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 3888 R_POS. Add reloc value to output.
ea1e4b0d
AM
3889 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
3890 bit R_RBR. Improve names, masks.
59862849
TR
3891 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
3892 (bfd_xcoff_backend_data): Update with new reloc swap names.
3893 (bfd_xcoff_aix5_backend_data) : Same.
3894
b4655ea9
AM
38952002-05-04 Alan Modra <amodra@bigpond.net.au>
3896
3897 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
3898 bfd_count top_index, input_list, all_local_syms.
3899 (elf32_hppa_setup_section_lists): New function, split from
3900 elf32_hppa_size_stubs.
3901 (elf32_hppa_next_input_section): Likewise.
3902 (group_sections): Likewise.
3903 (get_local_syms): Likewise.
3904 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
3905 stubs on undefined syms too.
3906 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 3907 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
3908 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
3909 (elf32_hppa_next_input_section): Declare.
3910
301e3139
AM
39112002-05-04 Bob Byrnes <byrnes@curl.com>
3912
3913 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
3914 _bfd_new_bfd.
3915
7c5fcef7
L
39162002-05-03 H.J. Lu (hjl@gnu.org)
3917
3918 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
3919 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
3920 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
3921 to hide a global symbol.
3922 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 3923 forced_local to true.
7c5fcef7 3924
84de6048
RH
39252002-05-02 Richard Henderson <rth@redhat.com>
3926
3927 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
3928 vs SHN_UNDEF to zero.
3929
805fc799
AM
39302002-05-02 Alan Modra <amodra@bigpond.net.au>
3931
c061c2d8
AM
3932 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
3933 16 bit reloc.
3934 <R_PPC64_SECTOFF_DS>: Likewise.
3935 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3936 SECTOFF reloc.
3937 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
3938 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3939 SECTOFF reloc.
3940
805fc799
AM
3941 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
3942 (ppc64_elf_ha_reloc): New function.
3943 (ppc64_elf_brtaken_reloc): New function.
3944 (ppc64_elf_sectoff_reloc): New function.
3945 (ppc64_elf_sectoff_ha_reloc): New function.
3946 (ppc64_elf_toc_reloc): New function.
3947 (ppc64_elf_toc_ha_reloc): New function.
3948 (ppc64_elf_toc64_reloc): New function.
3949 (ppc64_elf_unhandled_reloc): New function.
3950 (ppc64_elf_howto_raw): Use the above.
3951 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
3952 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
3953 <R_PPC64_SECTOFF_DS>: Likewise.
3954 (IS_ABSOLUTE_RELOC): Update.
3955 (struct ppc_link_hash_table): Add have_undefweak.
3956 (ppc64_elf_link_hash_table_create): Init.
3957 (func_desc_adjust): Set have_undefweak.
3958 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
3959 add the .sfpr blr when have_undefweak.
3960 (ppc64_elf_setup_section_lists): Check hash table flavour.
3961 (ppc64_elf_next_input_section): Move output_section->owner test to
3962 ppc64elf.em.
3963 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
3964 and relocatable test. Return TOCstart and don't set elf_gp.
3965 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
3966 offset calculation. Add assert on weak sym branch tweaks.
3967 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
3968 (ppc64_elf_toc): Declare.
3969 (ppc64_elf_next_input_section): Update.
ea1e4b0d 3970
818c39a3
AM
39712002-05-01 Alan Modra <amodra@bigpond.net.au>
3972
3973 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
3974 file_name.
3975
721956f4
AM
39762002-05-01 Alan Modra <amodra@bigpond.net.au>
3977
3978 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
3979 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
3980 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
3981 call branches. Correct undefined weak destination.
3982 (ppc64_elf_func_desc_adjust): Always create at least one blr in
3983 .sfpr, and correct case where either only savef* or restf* is
3984 needed.
3985
3986 Long branch stubs, multiple stub sections.
3987 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
3988 (ppc64_elf_next_input_section): Declare.
3989 * elf64-ppc.c: Move linker-only prototypes.
3990 (STUB_SUFFIX): Define.
3991 (enum ppc_stub_type): New.
3992 (struct ppc_stub_hash_entry): New.
3993 (struct ppc_branch_hash_entry): New.
3994 (struct ppc_link_hash_entry): Add stub_cache, oh.
3995 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
3996 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
3997 Rename plt_overflow to stub_error.
3998 (ppc_stub_hash_lookup): Define.
3999 (ppc_branch_hash_lookup): Define.
4000 (stub_hash_newfunc): New function.
4001 (branch_hash_newfunc): New function.
4002 (link_hash_newfunc): Init new fields.
4003 (ppc64_elf_link_hash_table_create): Likewise.
4004 (ppc64_elf_link_hash_table_free): New function.
4005 (ppc_stub_name): New function.
4006 (ppc_get_stub_entry): New function.
4007 (ppc_add_stub): New function.
4008 (create_linkage_sections): Use bfd_make_section_anyway. Create
4009 .branch_lt and .rela.branch_lt sections. Don't create .stub.
4010 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
4011 and set up for plt call stubs. Link func and func desc syms.
4012 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
4013 (func_desc_adjust): Avoid hash lookup when func desc sym available
4014 via shortcut, and set links when processing.
4015 (ppc64_elf_hide_symbol): Likewise.
4016 (allocate_dynrelocs): Don't allocate stub section here.
4017 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
4018 Remove sstub code.
4019 (ppc_type_of_stub): New function.
4020 (build_one_stub): Delete.
4021 (ppc_build_one_stub): New function.
4022 (ppc_size_one_stub): New function.
4023 (ppc64_elf_setup_section_lists): New function.
4024 (ppc64_elf_next_input_section): New function.
4025 (group_sections): New function.
4026 (get_local_syms): New function.
4027 (ppc64_elf_size_stubs): Rewrite.
4028 (ppc64_elf_build_stubs): Rewrite.
4029 (ppc64_elf_relocate_section): Look up stub entry for REL24
4030 relocs. Don't propagate REL14* to dynamic objects. Look for long
4031 branch stubs if REL14* or REL24 relocs won't reach.
4032 (bfd_elf64_bfd_link_hash_table_free): Define.
4033
09c2219b
MM
40342002-04-30 Mark Mitchell <mark@codesourcery.com>
4035
c5cd6d62 4036 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 4037
07b678c0
TR
40382002-04-30 Tom Rix <trix@redhat.com>
4039
4040 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
4041 symbol names into the hash table.
4042
dbe341c6
TR
40432002-04-28 Tom Rix <trix@redhat.com>
4044
4045 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 4046 calulating relocations.
dbe341c6 4047 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
4048 (xcoff_ppc_relocate_section): Use relocation and complain function
4049 tables.
4050 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
4051 (xcoff_complain_overflow_signed_func): Same.
4052 (xcoff_complain_overflow_bitfield_func): Same.
4053 (xcoff_complain_overflow_dont_func): Same.
4054 (xcoff_reloc_type_crel): New recot function.
4055 (xcoff_reloc_type_br): Same.
4056 (xcoff_reloc_type_ba): Same.
4057 (xcoff_reloc_type_toc): Same.
4058 (xcoff_reloc_type_rel): Same.
4059 (xcoff_reloc_type_neg): Same.
4060 (xcoff_reloc_type_pos): Same.
4061 (xcoff_reloc_type_fail): Same.
4062 (xcoff_reloc_type_noop): Same.
4063 * libxcoff.h : Declare common parts for xcoff64.
4064 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 4065 and complain function tables.
dbe341c6 4066
985142a4
AM
40672002-04-28 Alan Modra <amodra@bigpond.net.au>
4068
4069 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
4070 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
4071
eba91044
AM
40722002-04-26 Alan Modra <amodra@bigpond.net.au>
4073
e54fdaa5
AM
4074 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
4075 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
4076
a50c1845
AM
4077 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
4078 same as the output before calling elf_link_input_bfd.
4079
eba91044
AM
4080 * coffcode.h (coff_compute_section_file_positions): Set
4081 section_tail after shuffling section list.
4082
3c25c5f6
NC
40832002-04-24 Christian Groessler <chris@groessler.org>
4084
4085 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
4086 addresses are 23bit with a special layout, not plain 32bit
4087 values. Prevent relocation of immediate values.
4088
40d32fc6
CD
40892002-04-24 Chris G. Demetriou <cgd@broadcom.com>
4090
4091 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
4092 MIPS-16 ASE flags are set, print something to indicate that.
4093
067fa4a6
AM
40942002-04-23 Alan Modra <amodra@bigpond.net.au>
4095
4096 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
4097 under which a plt call stub is used.
4098 (final_link_relocate): Similarly.
4099 (allocate_plt_static): Clear h-plabel except when plt entry is
4100 exclusively used for a plabel.
4101 (allocate_dynrelocs): Use the above to simplify plt sizing.
4102 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
4103 (elf32_hppa_link_hash_table_create): Init.
4104 (BL22_RP): Define.
4105 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
4106 (elf32_hppa_check_relocs): Set has_22bit_branch.
4107
4108 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
4109 (final_link_relocate): Likewise.
4110
af40ce3c
JJ
41112002-04-22 Jakub Jelinek <jakub@redhat.com>
4112
4113 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
4114 search table if some FDE is DW_EH_PE_aligned encoded either.
4115 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
4116
09ae86c2
JJ
41172002-04-22 Richard Smith <richard@ex-parrot.com>
4118 Jakub Jelinek <jakub@redhat.com>
4119
4120 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
4121 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
4122 encoded personality.
4123 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
4124 for CIE/FDE removal.
4125
deeb2cd7
TR
41262002-04-20 Tom Rix <trix@redhat.com>
4127
4128 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
4129
99dc0092
AM
41302002-04-20 Alan Modra <amodra@bigpond.net.au>
4131
aa3d5824
AM
4132 * archures.c (bfd_lookup_arch): Move the list order comment..
4133 (struct bfd_arch_info): ..to where it belongs.
4134 * bfd-in2.h: Regenerate.
4135
99dc0092
AM
4136 * archures.c (bfd_lookup_arch): Add comment on list order.
4137 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
4138 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
4139 is always at head of list.
4140
7831a775
NC
41412002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
4142
4143 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
4144 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
4145 definition of these functions for ARM_WINCE builds as they are
4146 not used.
ea1e4b0d 4147 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
4148 for ARM_WINCE builds.
4149
41502002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
4151
ea1e4b0d 4152 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
4153
41542002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
4155
4156 * cpu-sh.c (scan_mach): Delete.
4157 (arch_info_struct): Replace scan_mach with bfd_default_scan.
4158 (bfd_sh_arch): Likewise.
4159
3d8dbe36
NC
41602002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
4161
4162 * ihex.c (ihex_write_object_contents): Fix check for records
4163 crossing 64K boundaries.
4164
4ab82700
AM
41652002-04-16 Alan Modra <amodra@bigpond.net.au>
4166
4167 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
4168 type rather than just assuming entries are ELF.
4169 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4170 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4171 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
4172 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
4173 rather than elf_link_hash_entry.
4174
036fe0fe
RH
41752002-04-15 Richard Henderson <rth@redhat.com>
4176
4177 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
4178 n32 binaries.
4179
c4f3d130
NC
41802002-04-15 Michael Snyder <msnyder@redhat.com>
4181
4182 * opncls.c (bfd_close): Write contents if writeable.
4183 Minor formatting tidy-ups.
4184
4ab82700 41852002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
4186
4187 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
4188
0c04d169
MS
41892002-04-12 Michael Snyder <msnyder@redhat.com>
4190
4191 * bfd-in.h (bfd_get_section_lma): New access macro.
4192 Minor white-space fix-up.
4193
89d4966f
AM
41942002-04-12 Alan Modra <amodra@bigpond.net.au>
4195
4196 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
4197 header pad.
4198
8d0da3c2
DD
41992002-04-09 DJ Delorie <dj@redhat.com>
4200
4201 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
4202
05793179
NC
42032002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
4204
4205 * coffcode.h (coff_read_word): New.
4206 (coff_compute_checksum): New.
4207 (coff_apply_checksum): New.
4208 (coff_write_object_contents): Call coff_apply_checksum () to
4209 apply checksum to PE image.
4210
46fe4e66
AM
42112002-04-08 Randolph Chung <tausq@debian.org>
4212
4213 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
4214 (elf32_hppa_final_link): Split out sorting logic to..
4215 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
4216 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
4217
3b5b409c
AC
42182002-04-07 Andrew Cagney <ac131313@redhat.com>
4219
4220 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
4221 pattern.
4222 * configure: Re-generate.
4223
ac7b6ceb
AC
42242002-04-07 Andrew Cagney <ac131313@redhat.com>
4225
4226 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
4227 is greater or equal to 4.3.3.
4228 * configure: Regenerate.
4229 Fix PR gdb/344.
4230
44aa49bb
HPN
42312002-04-05 Hans-Peter Nilsson <hp@axis.com>
4232
4233 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
4234 R_CRIS_32_PCREL>: Fix typo in name.
4235 (cris_elf_check_relocs): Always create .rela.got here when
4236 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
4237 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
4238 assume it's created.
4239
e2d34d7d
DJ
42402002-04-04 Daniel Jacobowitz <drow@mvista.com>
4241
4242 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
4243 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
4244 define.
4245 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
4246 * bfd.c (bfd_link_hash_table_free): Define.
4247 * binary.c (binary_bfd_link_hash_table_free): Define.
4248 * bout.c (b_out_bfd_link_hash_table_free): Define.
4249 * coff-rs6000.c (rs6000coff_vec): Include
4250 _bfd_generic_link_hash_table_free.
4251 (pmac_xcoff_vec): Likewise.
4252 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4253 (aix5coff64_vec): Likewise.
4254 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
4255 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
4256 (bfd_elf32_bfd_link_hash_table_free): Define.
4257 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
4258 (bfd_elf32_bfd_link_hash_table_free): Define.
4259 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
4260 define.
4261 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
4262 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
4263 * ieee.c (ieee_bfd_link_hash_table_free): Define.
4264 * ihex.c (ihex_bfd_link_hash_table_free): Define.
4265 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
4266 (_bfd_generic_link_hash_table_free): Add prototype.
4267 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
4268 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
4269 * linker.c (_bfd_generic_link_hash_table_free): New function.
4270 * mmo.c (mmo_bfd_link_hash_table_free): Define.
4271 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
4272 * oasys.c (oasys_bfd_link_hash_table_free): Define.
4273 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
4274 * som.c (som_bfd_link_hash_table_free): Define.
4275 * srec.c (srec_bfd_link_hash_table_free): Define.
4276 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
4277 * versados.c (versados_bfd_link_hash_table_free): Define.
4278 * vms.c (vms_bfd_link_hash_table_free): New function.
4279 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
4280
4281 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
4282 instead of bfd_alloc.
4283 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
4284 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
4285 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
4286 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
4287 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
4288 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
4289 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
4290 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
4291 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
4292 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
4293 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
4294 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
4295 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
4296 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
4297 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
4298 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
4299 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
4300 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
4301 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
4302 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
4303 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
4304 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
4305 * m68klinux.c (linux_link_hash_table_create): Likewise.
4306 * sparclinux.c (linux_link_hash_table_create): Likewise.
4307 * sunos.c (sunos_link_hash_table_create): Likewise.
4308 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
4309
4310 * targets.c: Add _bfd_link_hash_table_free to xvec.
4311
4312 * bfd-in2.h: Regenerate.
4313 * libbfd.h: Regenerate.
4314 * libcoff.h: Regenerate.
4315
830629ab
AM
43162002-04-04 Alan Modra <amodra@bigpond.net.au>
4317
4318 * dep-in.sed: Cope with absolute paths.
4319 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
4320 Run "make dep-am".
4321 * Makefile.in: Regenerate.
4322 * coff-arm.c: Fix copyright date.
4323 * cpu-h8300.c: Likewise.
4324 * cpu-i370.c: Likewise.
4325 * cpu-s390.c: Likewise.
4326 * cpu-mips.c: Likewise.
4327 * po/SRC-POTFILES.in: Regenerate.
4328
c6e90b02
TS
43292002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4330
4331 * Makefile.am: Add elfxx-mips.c to the known backends.
4332 (elf32-mips.lo): remove dependency to coff/external.h.
4333 * Makefile.in: Regenerate.
4334 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
4335 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
4336 accordingly.
4337 * configure: Regenerate.
4338 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
4339 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
4340 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
4341 MIPS specific backend functions.
4342 * elf32-mips.c: Moved most code to elfxx-mips.c.
4343 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
4344 static.
4345 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
4346 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
4347 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
4348 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
4349 interface to allow selection of the right REL or RELA howto table.
4350 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
4351 static. Let it refuse n32 objects.
4352 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
4353 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
4354 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
4355 (elf32_mips_ignore_discarded_relocs): Rename from
4356 _bfd_elf32_mips_ignore_discarded_relocs.
4357 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
4358 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
4359 (elf_mips_howto_table_rela): Remove.
4360 * elf64-mips.c: Moved most code to elfxx-mips.c.
4361 (bfd_elf64_bfd_reloc_type_lookup): Make static.
4362 (mips_elf64_rtype_to_howto): New function.
4363 (mips_elf64_object_p): Likewise.
4364 (elf64_mips_irix_compat): Likewise.
4365 * elfxx-mips.c: New file containing common code merged together from
4366 elf32-mips.c and elf64-mips.c.
4367 * elfxx-mips.h: New file containing MIPS specific prototypes from
4368 elf-bfd.h.
4369 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
4370 elf_backend_mips_rtype_to_howto.
4371
d8dce692
AM
43722002-04-04 Alan Modra <amodra@bigpond.net.au>
4373
4374 * srec.c (MAXCHUNK, Chunk): Revise comments.
4375 (srec_write_record): Correct buffer size.
4376 (srec_write_header): Do without intermediate buffer.
4377 (srec_write_section): Validate Chunk.
4378 (srec_write_terminator): Pass NULL instead of dummy buffer.
4379 (srec_write_symbols): Pass file and symbol names directly to
4380 bfd_bwrite so sprintf won't overflow buffer.
4381
b88a866a
JJ
43822002-04-03 Jakub Jelinek <jakub@redhat.com>
4383
4384 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
4385 PC relative relocs against hidden symbols.
4386 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4387
d7866f04
AM
43882002-04-03 Alan Modra <amodra@bigpond.net.au>
4389
4390 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
4391 LMAs, loop over segments until p_vaddr and p_memsz specify an
4392 extent enclosing the section.
4393
9e81ee67
NC
43942002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
4395
4396 * ihex.c (ihex_write_object_contents): Do not allow records to
4397 cross a 64K boundary - wrap if necessary.
4398
d2b64500
JT
43992002-04-01 Nathan Williams <nathanw@wasabisystems.com>
4400
4401 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
4402 which caused the returned LWP ID to always be 0.
4403
e36f7d53
RH
44042002-04-01 Richard Henderson <rth@redhat.com>
4405
4406 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4407 (elf32_sparc_relocate_section): Use it to figure out when to
4408 initialize .got entries.
4409 * elf64-sparc.c: Similarly.
4410
e92d460e
AM
44112002-03-28 Alan Modra <amodra@bigpond.net.au>
4412
4413 * linker.c (link_action): Ignore duplicate warning syms.
4414 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
4415 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
4416 (elf_adjust_dynamic_symbol): Likewise.
4417 (elf_export_symbol): Likewise.
4418 (elf_link_find_version_dependencies): Likewise.
4419 (elf_link_assign_sym_version): Likewise.
4420 (elf_link_sec_merge_syms): Likewise.
4421 (elf_link_output_extsym): Likewise.
4422 (elf_gc_sweep_symbol): Likewise.
4423 (elf_gc_propagate_vtable_entries_used): Likewise.
4424 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4425 (elf_gc_allocate_got_offsets): Likewise.
4426 (elf_collect_hash_codes): Likewise.
4427 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
4428 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
4429 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4430 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
4431 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
4432 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
4433 (elf_cris_discard_excess_dso_dynamics): Likewise.
4434 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
4435 (mark_PIC_calls): Likewise.
4436 (allocate_plt_static): Likewise.
4437 (allocate_dynrelocs): Likewise.
4438 (readonly_dynrelocs): Likewise.
4439 * elf32-i386.c (allocate_dynrelocs): Likewise.
4440 (readonly_dynrelocs): Likewise.
4441 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
4442 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
4443 * elf32-mips.c (mips_elf_output_extsym): Likewise.
4444 (mips_elf_sort_hash_table_f): Likewise.
4445 (mips_elf_check_mips16_stubs): Likewise.
4446 * elf32-s390.c (allocate_dynrelocs): Likewise.
4447 (readonly_dynrelocs): Likewise.
4448 * elf32-sh.c (sh_elf_discard_copies): Likewise.
4449 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
4450 (xstormy16_relax_plt_realloc): Likewise.
4451 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
4452 (elf64_alpha_output_extsym): Likewise.
4453 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
4454 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
4455 (mips_elf64_check_mips16_stubs): Likewise.
4456 (mips_elf64_output_extsym): Likewise.
4457 * elf64-ppc.c (func_desc_adjust): Likewise.
4458 (allocate_dynrelocs): Likewise.
4459 (readonly_dynrelocs): Likewise.
4460 * elf64-s390.c (allocate_dynrelocs): Likewise.
4461 (readonly_dynrelocs): Likewise.
4462 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
4463 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
4464 (readonly_dynrelocs): Likewise.
4465 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
4466 * aoutx.h (aout_link_write_other_symbol): Likewise.
4467 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
4468 (_bfd_coff_write_global_sym): Likewise.
4469 * i386linux.c (linux_tally_symbols): Likewise.
4470 * m68klinux.c (linux_tally_symbols): Likewise.
4471 * sparclinux.c (linux_tally_symbols): Likewise.
4472 * pdp11.c (aout_link_write_other_symbol): Likewise.
4473 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
4474 * xcofflink.c (xcoff_build_ldsyms): Likewise.
4475 (xcoff_write_global_symbol): Likewise.
4476
4477 * cofflink.c (_bfd_coff_final_link): Formatting.
4478 * cpu-mips.c (mips_compatible): Make static, prototype.
4479 * elf32-i386.c (elf_i386_check_relocs): Formatting.
4480 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
4481 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
4482 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
4483 (mips_elf64_final_link): Likewise.
4484 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
4485 prototype.
4486
2106126f
NC
44872002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
4488
4489 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
4490 (SWAP_OUT_RELOC_OFFSET): Define.
4491
b99d1833
AM
44922002-03-27 Gregory Steuck <greg@nest.cx>
4493
4494 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
4495 terminating NULL if empty symbol table.
4496 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
4497
ad43ed4c
L
44982002-03-26 H.J. Lu (hjl@gnu.org)
4499
4500 * elflink.h (elf_link_input_bfd): Revert the last change since
4501 the gcc exception handling isn't fixed yet.
4502
3851fca4
L
45032002-03-26 H.J. Lu (hjl@gnu.org)
4504
4505 * elflink.h (elf_link_input_bfd): Complain about relocations
4506 against local symbols in discarded sections.
4507
b91afed7
AM
45082002-03-26 Alan Modra <amodra@bigpond.net.au>
4509
4510 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
4511
dba143ef
AM
45122002-03-23 Alan Modra <amodra@bigpond.net.au>
4513
4514 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
4515 section file offset for !SEC_LOAD sections.
4516
ee29b9fb
RE
45172002-03-21 Richard Earnshaw <rearnsha@arm.com>
4518
830629ab
AM
4519 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
4520 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 4521
54327882
AM
45222002-03-21 Alan Modra <amodra@bigpond.net.au>
4523
4524 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
4525 Whitespace changes.
4526 * archive.c: Update copyright date.
4527 * bfd-in2.h: Regenerate.
4528 * libbfd.h: Regenerate.
4529 * Makefile.am: Run "make dep-am"
4530 * Makefile.in: Regenerate.
4531 * po/SRC-POTFILES.in: Regenerate.
4532
1ee24f27
DJ
45332002-03-20 Daniel Jacobowitz <drow@mvista.com>
4534
4535 * dwarf2.c (struct funcinfo): Move up.
4536 (lookup_address_in_function_table): New argument function_ptr.
4537 Set it.
4538 (lookup_address_in_line_table): New argument function. If function
4539 is non-NULL, use it to handle ``addr'' before the first line note of
4540 the function.
4541 (comp_unit_find_nearest_line): Update and swap calls to
4542 lookup_address_in_function_table and lookup_address_in_line_table.
4543 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
4544 N_SLINE encountered if we see an N_FUN before any N_SLINE.
4545
51b9608c
TR
45462002-03-20 Tom Rix <trix@redhat.com>
4547
ea1e4b0d 4548 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 4549 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 4550 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 4551
789c90aa
TR
45522002-03-19 Tom Rix <trix@redhat.com>
4553
ea1e4b0d 4554 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
4555 dynamic objects in archives.
4556
1da54d81
HPN
45572002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
4558
4559 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
4560 STT_NOTYPE symbols to STT_OBJECT.
4561
7831a775 45622002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
4563
4564 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
4565
eb1e0e80
NC
45662002-03-18 Tom Rix <trix@redhat.com>
4567
4568 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
4569 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
4570 * coff-rs6000 (do_pad) : New function for archive padding.
4571 (do_copy) : New function for object file copying in archives.
4572 (do_shared_object_padding) : New function for padding shared
4573 objects to their text section alignment in archives.
4574 (bfd_xcoff_ar_achive_set_magic) : Stub.
4575 (xcoff_write_armap_big) : Use do_copy and do_pad.
4576 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
4577 do_copy and do_pad.
4578 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 4579 bfd_xcoff_magic_number.
eb1e0e80
NC
4580 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
4581 fop.
4582 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
4583 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
4584 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
4585 * rs6000-core.c : Update copyright date.
ea1e4b0d 4586 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
4587 csectpp.
4588 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
4589 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
4590 (coff_set_flags) : Use bfd_xcoff_magic_number.
4591 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
4592 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
4593 * Makefile.am : Same.
4594 * config.bfd : Same.
4595 * targets.c : Same.
4596 * configure : Regnerate.
4597 * Makefile.in : Same.
4598 * bfd-in2.h : Same.
4599
a1c259a1
NC
46002002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
4601
4602 * po/fr.po: Updated version.
4603
4dae1ae7
AM
46042002-03-18 Alan Modra <amodra@bigpond.net.au>
4605
4606 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
4607 * libbfd.h: Regenerate.
4608 * archive.c (coff_write_armap): Pass on failures from
4609 bfd_write_bigendian_4byte_int.
4610
36b4f6e7
L
46112002-03-14 H.J. Lu <hjl@gnu.org>
4612
4613 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
4614 error to bfd_error_nonrepresentable_section for reinit_array
4615 section in DSO.
4616
a1aefc76
NC
46172002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
4618
a181be0a
NC
4619 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
4620 OR it in rather than replacing previously selected flags.
4621
a1aefc76
NC
4622 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
4623 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
4624
c119f9b8
AM
46252002-03-14 Alan Modra <amodra@bigpond.net.au>
4626
4627 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
4628 (N): Use the above.
4629 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
4630 ensure reloc size matches before calling elf_link_input_bfd.
4631 Add an assert to check reloc size when counting output relocs.
4632
c295a511
NC
46332002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
4634
4635 * mmo.c (mmo_get_loc): Return NULL rather than false.
4636
9ce88e60
NC
46372002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
4638
4639 * po/fr.po: Updated version.
4640
4ddafab0
AM
46412002-03-13 Alan Modra <amodra@bigpond.net.au>
4642
b74fa2cd
AM
4643 * archures.c (bfd_default_compatible): Test bits_per_word.
4644 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
4645 bfd_default_compatible.
4646 * cpu-i370.c (i370_compatible): Likewise.
4647 * cpu-sparc.c (sparc_compatible): Likewise.
4648 * cpu-h8300.c (compatible): Test in->arch == out->arch.
4649
40b829d4
AM
4650 * elflink.h: Formatting fixes.
4651 (elf_link_output_extsym): Merge undefined and undef weak cases.
4652
4ddafab0
AM
4653 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
4654 when word size of input matches output word size.
4655
dd53c801
AJ
46562002-03-12 Andreas Jaeger <aj@suse.de>
4657
4658 * cpu-i386.c (i386_compatible): New. Use it instead of
4659 bfd_default_compatible.
4660
aa066ac8
L
46612002-03-07 H.J. Lu (hjl@gnu.org)
4662
4663 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
4664 as the type for bfd_reloc_val.
4665
1bf42538
JL
46662002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
4667
4668 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
4669 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
4670 (elf_hppa_final_link_relocate): Correct relocations for indirect
4671 references to local data through the DLT. Fix .opd creation for
4672 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
4673 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
4674 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
4675 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4676 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
4677 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
4678 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
4679
86eaf01e
JJ
46802002-03-05 Jakub Jelinek <jakub@redhat.com>
4681
4682 * merge.c (_bfd_merge_sections): Don't segfault if there
4683 is nothing to merge due to GC.
4684
c44233aa
AM
46852002-03-05 Alan Modra <amodra@bigpond.net.au>
4686
039cc25f
AM
4687 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
4688 symbols that have been forced local.
4689
c44233aa
AM
4690 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
4691 to output forced local syms for non-shared link.
4692 (elf_link_output_extsym): Tweak condition for calling backend
4693 adjust_dynamic_symbol so that previous behaviour is kept.
4694 Whitespace changes throughout file.
4695
25e27870
L
46962002-03-04 H.J. Lu <hjl@gnu.org>
4697
4698 * elf.c (bfd_section_from_shdr): Handle special sections,
4699 .init_array, .fini_array and .preinit_array.
4700 (elf_fake_sections): Likewise.
4701
4702 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
4703 DT entry only if the section is in output for .init_array,
4704 .fini_array and .preinit_array. Complain about .preinit_array
4705 section in DSO.
4706 (elf_bfd_final_link): Warn zero size for .init_array,
4707 .fini_array and .preinit_array sections.
4708
4709 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
4710 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
4711 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
4712 .preinit_array.
4713
bb2a49f2
AM
47142002-03-04 Alan Modra <amodra@bigpond.net.au>
4715
4716 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
4717 * configure: Regenerate.
4718
38487e5e
TR
47192002-03-02 Tom Rix <trix@redhat.com>
4720
c44233aa
AM
4721 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
4722 symbolic equiv.
38487e5e
TR
4723 * coff-rs6000.c (xcoff_howto_table): Same.
4724
30831527
RH
47252002-03-01 David Mosberger <davidm@hpl.hp.com>
4726
4727 * elflink.h (size_dynamic_sections): If section named
4728 ".preinit_array" exists, create DT_PREINIT_ARRAY and
4729 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
4730 ".init_array" and ".fini_array".
4731 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
4732 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
4733 DT_FINI_ARRAY.
4734
c8e5ddc8
AM
47352002-02-26 Andrew Macleod <amacleod@cygnus.com>
4736
4737 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
4738 dynsyms.
4739
96e0dda4
AM
47402002-02-25 Alan Modra <amodra@bigpond.net.au>
4741
1c5b6bf8
AM
4742 * elf64-hppa.h: Update copyright date.
4743
96e0dda4
AM
4744 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
4745 (ppc64_elf_relocate_section): Don't generate power4 style branch
4746 hints for *_BRTAKEN and *_BRNTAKEN relocs.
4747
0fb19cbc
JJ
47482002-02-22 Jakub Jelinek <jakub@redhat.com>
4749
4750 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
4751 last patch.
4752 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4753
c434dee6
AJ
47542002-02-21 Andreas Jaeger <aj@suse.de>
4755
4756 * elf64-x86-64.c: Major rework that introduces all recent changes
4757 to the x86-64 backend. Get a closer match to elf32-i386.
4758 (struct elf64_x86_64_dyn_relocs): Rename from
4759 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
4760 all users.
4761 (struct elf64_x86_64_link_hash_table): Add short cuts to some
4762 sections.
4763 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
4764 remove casts, initialize new hash members.
4765 (create_got_section): New.
4766 (elf64_x86_64_create_dynamic_sections): New.
4767 (elf64_x86_64_copy_indirect_symbol): New.
4768 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
4769 relocs, .got or .relgot here but do it in allocate_dynrelocs.
4770 Reference count possible .plt and .got entries. Don't test input
4771 section SEC_READONLY here to try to avoid copy relocs, and keep
4772 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
4773 DF_TEXTREL here. Delay setting of variables until needed. Cache
4774 pointer to "sreloc" section in elf_section_data. Tweak condition
4775 under which .got created. Report files with bad relocation
4776 section names.
4777 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
4778 Reference count possible .plt entries. Don't deallocate .got and
4779 .relgot space here.
4780 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
4781 do copy reloc processing for weakdefs. Remove redundant casts and
4782 aborts. Delay setting of vars until needed. Move creation of
4783 dynamic symbols and allocation of .plt and .rela.plt to
4784 allocate_dynrelocs. Replace BFD_ASSERT with abort.
4785 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4786 (allocate_dynrelocs): New.
4787 (readonly_dynrelocs): New.
4788 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
4789 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
4790 Zero out the dynamic allocated content space.
4791 (elf64_x86_64_discard_copies): Removed.
4792 (elf64_x86_64_relocate_section): Make use of dynamic section
4793 short-cuts. Localise vars, and delay setting. Better error
4794 reporting, replace BFD_ASSERT with abort. Check
4795 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
4796 regular object file and tread the weak definition as the normal
4797 one. Don't discard relocs for undefweak or undefined symbols and
4798 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
4799 relocs.
4800 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
4801 symbols that have been forced local. Use same test to decide if
4802 we can use a relative reloc for got as relocate_section. Expand
4803 SHN_UNDEF comment. Move expressions out of function calls.
4804 Replace BFD_ASSERT with abort.
4805 (bfd_elf64_bfd_final_link): Removed.
4806 (elf_backend_copy_indirect_symbol): Define.
4807
ff3a6ee3
TR
48082002-02-20 Tom Rix <trix@redhat.com>
4809
4810 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
4811 (_bfd_xcoff_reloc_type_lookup): Use it.
4812 * coff64-rs6000.c (xcoff64_howto_table): Same.
4813 (xcoff64_reloc_type_lookup): Same.
c434dee6 4814
a68d41fb
AM
48152002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
4816
4817 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
4818 little endian.
4819
befc3abb
MS
48202002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
4821
4822 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
4823 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
4824 * bfd-in2.h: Regenerate.
4825 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
4826 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
4827 with "s390:64-bit".
4828 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
4829 (elf_s390_reloc_type_lookup): Likewise.
4830 (elf_s390_check_relocs): Likewise.
4831 (elf_s390_gc_sweep_hook): Likewise.
4832 (elf_s390_relocate_section): Likewise.
4833 (elf_s390_object_p): Use renamed architecture define.
4834 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
4835
6eeeec9b
FCE
48362002-02-19 Frank Ch. Eigler <fche@redhat.com>
4837
4838 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
4839
0bb2d96a
JJ
48402002-02-19 Jakub Jelinek <jakub@redhat.com>
4841
4842 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
4843 absptr -> pcrel optimization for shared libs.
4844 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
4845 library cannot be converted to pcrel.
4846 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
4847 relative.
4848 * elf32-i386.c (elf_i386_relocate_section): If
4849 _bfd_elf_section_offset returned -2, skip, but make sure the
4850 relocation is installed.
4851 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
4852 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4853 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4854 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4855 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4856 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4857 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4858 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4859 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4860 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4861 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4862 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4863 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4864 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4865 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
4866 _bfd_elf_section_offset returning -2 the same way as -1.
4867 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
4868 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
4869 and BFD_ASSERT.
4870 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
4871
69f284c7
TR
48722002-02-18 Tom Rix <trix@redhat.com>
4873
4874 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
4875 (bfd_xcoff_size_dynamic_sections): Same.
4876 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
4877 (bfd_xcoff_size_dynamic_sections): Same.
4878 * coff-rs6000.c (xcoff_generate_rtinit): Same.
4879 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
4880 * libxcoff.h (struct xcoff_backend_data_rec): Same.
4881 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
4882 * bfd-in2.h: Regenerate.
4883
82bd7b59
AM
48842002-02-18 Alan Modra <amodra@bigpond.net.au>
4885
4886 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
4887 (struct ppc_link_hash_table): Add sfpr.
4888 (ppc64_elf_link_hash_table_create): Init it.
4889 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
4890 .glink out to..
4891 (create_linkage_sections): ..here. Make .sfpr too.
4892 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
4893 dynobj early.
4894 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
4895 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
4896 ._restf* functions, and create as needed.
4897 (func_desc_adjust): Only force_local for shared libs.
4898
ef1355e8
NC
48992002-02-18 David O'Brien <obrien@FreeBSD.org>
4900
4901 * configure.in: Bump version number post 2.12 branching.
4902 * configure: Regenerate.
4903
dfa36a69
HPN
49042002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
4905
4906 * mmo.c: Correct and improve comments.
4907 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
4908 zero-pad. Use input to fill up non-empty bfd buffer.
4909 (mmo_flush_chunk): New function.
4910 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
4911 changed. Don't emit location specifier if VMA is same as
4912 *LAST_VMAP after omitting leading zero contents. Call
4913 mmo_flush_chunk before emitting location specifier.
4914 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
4915 with mmo_write_loc_chunk calls.
4916 (mmo_internal_write_section): Call mmo_flush_chunk after
4917 mmo_write_chunk.
4918 (mmo_write_symbols_and_terminator): Move :Main to first position
4919 in symbol array. Add faked one if it does not exist if there are
4920 other symbols. Don't add it if there are no symbols at all. Move
4921 out test for value of :Main from symbol loop. Rename table
4922 fakemain to maintable and variable mainsym to fakemain.
4923
ccf00ab6
RH
49242002-02-15 Richard Henderson <rth@redhat.com>
4925
4926 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
4927 section with no got matches any got. Simplify error generaion.
4928
88eaccc2
AM
49292002-02-15 Alan Modra <amodra@bigpond.net.au>
4930
fd96f80f
AM
4931 Support arbitrary length fill patterns.
4932 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
4933 (_bfd_default_link_order): Remove bfd_fill_link_order code.
4934 Call default_data_link_order.
4935 (default_fill_link_order): Delete.
4936 (default_data_link_order): New function.
4937 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
4938 of bfd_fill_link_order with bfd_data_link_order.
4939 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
4940 * elf64-mips.c (mips_elf64_final_link): Likewise.
4941
88eaccc2
AM
4942 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
4943 Correct value returned in "end" for "0x<non-hex>".
4944
e2fd756b
NC
49452002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
4946
4947 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
4948 (scan): Test against 'mach' field in info structure.
4949
edd29cf9
AM
49502002-02-14 Alan Modra <amodra@bigpond.net.au>
4951
4952 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
4953
1e30956e 49542002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
4955
4956 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
4957 EF_M68000.
4958
bf36db18
NC
49592002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
4960
4961 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
4962 non-zero physical addresses when adjusting the LMAs of new
4963 sections.
bf36db18 4964
189c6563
AM
49652002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4966
4967 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
4968 from _bfd_elf_hppa_gen_reloc_type.
4969 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
4970 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
4971 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
4972 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
4973
e948afaf
AO
49742002-02-12 Alexandre Oliva <aoliva@redhat.com>
4975
4976 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
4977 loading its contents if there's nothing to do in it.
4978
19397422
AM
49792002-02-12 Alan Modra <amodra@bigpond.net.au>
4980
0ad3a73b
AM
4981 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
4982 64k boundary.
4983
19397422
AM
4984 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
4985 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
4986 (ppc64_elf_finish_dynamic_sections): Set values for them.
4987
51316059
MS
49882002-02-11 Michael Snyder <msnyder@redhat.com>
4989
4990 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
4991 * elf.c (elfcore_grok_pstatus): Add prototype.
4992 (elfcore_grok_lwpstatus): Add prototype.
4993 (elfcore_write_lwpstatus): New function.
4994 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
4995
518313c3
AO
49962002-02-11 Alexandre Oliva <aoliva@redhat.com>
4997
4998 * elf32-sh.c: Added missing prototypes.
4999 * elf32-sh64.c: Likewise.
5000 (sh_elf_align_loads): Mark unused args as such.
5001 * elf64-sh64.c: Added missing prototypes.
5002 (struct elf_sh64_link_hash_entry): Fix typo.
5003 (sh_elf64_relocate_section): Fix info argument passed to
5004 _bfd_elf_section_offset.
5005
2c73f9d8
AM
50062002-02-11 Alan Modra <amodra@bigpond.net.au>
5007
5008 * Makefile.am: "make dep-am".
5009 * Makefile.in: Regenerate.
5010 * aclocal.m4: Regenerate.
5011 * config.in: Regenerate.
5012 * configure: Regenerate.
5013
d426c6b0
DJ
50142002-02-10 Daniel Jacobowitz <drow@mvista.com>
5015
5016 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
5017 variable warnings.
5018 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
5019 comparison warning.
5020 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
5021 cast warnings for the common case.
5022
e58ee0cd
HPN
50232002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
5024
5025 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
5026 vectors.
5027 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
5028 vectors.
5029
7793f4d0
RH
50302002-02-09 Richard Henderson <rth@redhat.com>
5031
5032 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
5033 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
5034 (elf64_alpha_relocate_section): Likewise.
5035 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
5036 * bfd-in2.h, libbfd.h: Rebuild.
5037
7e799044
HPN
50382002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
5039
5040 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
5041 that base-plus-offset reloc accounting is consistent.
5042 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
5043 up to date for undefined symbols.
5044
027d73eb
EC
50452002-02-08 Eric Christopher <echristo@redhat.com>
5046
5047 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5048
5049 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
5050 sections for the O32 ABI.
5051
517662d4
CD
50522002-02-08 Chris Demetriou <cgd@broadcom.com>
5053
5054 * elf32-arm.h: Fix formatting of _("...").
5055 * elf32-d10v.c: Likewise.
5056 * elf32-m68k.c: Likewise.
5057 * elf32-mips.c: Likewise.
5058
5e37cc46
NC
50592002-02-08 Ivan Guzvinec <ivang@opencores.org>
5060
5061 * coff-or32.c: Fix compile time warning messages.
5062
fbca6ad9
AO
50632002-02-08 Alexandre Oliva <aoliva@redhat.com>
5064
5065 Contribute sh64-elf.
5066 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
5067 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
5068 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
5069 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
5070 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
5071 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
5072 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
5073 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
5074 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
5075 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
5076 New relocs.
5077 * libbfd.h, bfd-in2.h: Rebuilt.
5078 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
5079 (sh_reloc_map): Map them.
5080 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5081 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
5082 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
5083 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5084 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
5085 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
5086 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
5087 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
5088 datalabel_got_offset.
5089 (sh_elf_link_hash_newfunc): Initialize it.
5090 (sh_elf_relocate_section): Augment the scope of
5091 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
5092 GOT and GOTOFF handling to new SHmedia relocation types. Support
5093 GOT_BIAS.
5094 (sh_elf_check_relocs): Likewise.
5095 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
5096 PLT entries using movi_shori_putval. Support GOT_BIAS.
5097 (sh_elf_finish_dynamic_sections): Likewise.
5098 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
5099 relocation, it's now done by the caller.
5100 (GOT_BIAS): New.
5101 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
5102 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
5103 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
5104 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
5105 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
5106 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
5107 sh64_elf64_hash_table): New.
5108 (sh_elf64_howto_table): Introduce new relocs.
5109 (sh_elf64_info_to_howto): Accept new PIC relocs.
5110 (sh_elf64_relocate_section): Augment the scope of
5111 seen_stt_datalabel. Support new PIC relocs.
5112 (sh_elf64_check_relocs): Support new PIC relocs.
5113 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
5114 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
5115 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
5116 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
5117 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
5118 movi_shori_putval, movi_3shori_putval,
5119 sh64_elf64_create_dynamic_sections,
5120 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
5121 sh64_elf64_size_dynamic_sections,
5122 sh64_elf64_finish_dynamic_symbol,
5123 sh64_elf64_finish_dynamic_sections): New.
5124 (elf_backend_create_dynamic-sections,
5125 bfd_elf64_bfd_link_hash_table_create,
5126 elf_backend_adjust_dynamic_symbol,
5127 elf_backend_size_dynamic_sections,
5128 elf_backend_finish_dynamic_symbol,
5129 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5130 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5131 elf_backend_got_header_size, elf_backend_plt_header_size):
5132 Define.
5133 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
5134 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
5135 match official numbers and names; moved unmaching ones to the
5136 range 0xf2-0xff.
5137 * elf32-sh64.c, elf64-sh64.c: Likewise.
5138 2001-03-12 DJ Delorie <dj@redhat.com>
5139 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
5140 sections.
5141 2001-03-12 DJ Delorie <dj@redhat.com>
5142 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
5143 be aligned.
5144 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
5145 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
5146 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
5147 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
5148 .cranges section with SEC_SORT_ENTRIES set.
5149 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
5150 incoming sorted .cranges section.
5151 (sh64_bfd_elf_copy_private_section_data): New.
5152 (sh64_elf_final_write_processing): Only sort .cranges and modify
5153 start address if called by linker.
5154 2001-01-08 Ben Elliston <bje@redhat.com>
5155 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
5156 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
5157 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
5158 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
5159 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
5160 line. Add comments before all entries.
5161 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
5162 comment.
5163 (sh_elf64_reloc): Correct head comment.
5164 (sh_elf64_relocate_section): Correct spacing.
5165 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
5166 instead call reloc_dangerous callback.
5167 <case R_SH_SHMEDIA_CODE>: New case.
5168 (sh_elf64_gc_mark_hook): Correct spacing.
5169 (sh_elf64_check_relocs): Ditto.
5170 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
5171 New case.
5172 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
5173 functions.
5174 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
5175 clarify describing comment. Add comments before all entries.
5176 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
5177 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
5178 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
5179 Sort .cranges section in final link. Prepare to set bit 0 on
5180 entry address.
5181 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
5182 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
5183 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
5184 .cranges section.
5185 (sh64_backend_section_from_shdr): New, to recognize
5186 SHT_SH5_CR_SORTED on incoming .cranges section.
5187 (elf_backend_section_from_shdr): Define.
5188 (sh64_elf_final_write_processing): Sort outgoing .cranges
5189 section. (New, temporarily disabled:) Set bit 0 on entry address
5190 according to ISA type.
5191 (sh64_find_section_for_address): New.
5192 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
5193 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
5194 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
5195 bfd_malloc, not xmalloc.
5196 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
5197 global.
5198 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
5199 temporarily disabled) setting bit 0 on entry address.
5200 (elf_backend_final_write_processing): Define.
5201 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
5202 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
5203 be a proper relocation for PTA and PTB rather than a marker.
5204 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
5205 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
5206 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
5207 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
5208 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
5209 Zero src_mask.
5210 * elf64-sh64.c: Ditto.
5211 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
5212 * elf32-sh64.c: Include opcodes/sh64-opc.h
5213 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
5214 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
5215 parameters. No unused parameters. Caller changed.
5216 <case R_SH_PT_16>: New case.
5217 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
5218 * Makefile.in: Regenerate.
5219 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
5220 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
5221 all code sections.
5222 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5223 (sh64_elf_merge_private_data): Ditto.
5224 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
5225 to access stored section flags.
5226 (sh64_elf_final_write_processing): Return immediately unless
5227 called by linker. Use sh64_elf_section_data (cranges) to get size
5228 of linker-generated cranges entries.
5229 (sh64_elf_copy_private_data): Add missing "return true".
5230 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
5231 (sh_elf64_merge_private_data): Ditto.
5232 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
5233 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
5234 elf64-sh64.c:sh64_elf_fake_sections.
5235 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
5236 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
5237 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
5238 (sh64_elf_final_write_processing): New.
5239 (elf_backend_final_write_processing): Define.
5240 (sh64_elf_fake_sections): Get header flags from tdata field.
5241 (sh64_elf_copy_private_data): Do not call
5242 sh64_elf_copy_private_data_internal, just copy e_flags field.
5243 (sh64_elf_merge_private_data): Do not call
5244 sh64_elf_copy_private_data_internal.
5245 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
5246 Remove EF_SH64_ABI64, let ELF size make difference.
5247 Remove SH64-specific BFD section flag.
5248 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
5249 containing SHmedia through elf_section_data (asect)->tdata
5250 non-zero, not using a BFD section flag.
5251 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
5252 (sh64_elf_merge_private_data): Similar.
5253 (elf_backend_section_flags): Don't define.
5254 (sh64_elf_backend_section_flags): Delete.
5255 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
5256 not EF_SH64_ABI64.
5257 (sh_elf64_merge_private_data): Similar.
5258 * section.c (Section flags definitions): Don't define
5259 SEC_SH_ISA_SHMEDIA.
5260 (bfd-in2.h): Regenerate.
5261 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
5262 Make DataLabel references work with partial linking.
5263 * elf32-sh64.c: Fix formatting.
5264 (sh64_elf_link_output_symbol_hook): New.
5265 (elf_backend_link_output_symbol_hook): Define to
5266 sh64_elf_link_output_symbol_hook.
5267 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
5268 undefined if partial linking. Adjust sanity check.
5269 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
5270 (elf_backend_link_output_symbol_hook): Define to
5271 sh64_elf64_link_output_symbol_hook.
5272 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
5273 undefined if partial linking. Adjust sanity check.
5274 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
5275 Implement semantics for inter-file DataLabel references.
5276 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
5277 (sh64_elf64_add_symbol_hook): New.
5278 (sh_elf64_relocate_section): If passing an indirect symbol with
5279 st_type STT_DATALABEL on the way to a symbol with st_other
5280 STO_SH5_ISA32, do not bitor 1 to the relocation.
5281 (elf_backend_add_symbol_hook): Define to
5282 sh64_elf64_add_symbol_hook.
5283 * elf64-sh32.c: Tweak comments.
5284 (DATALABEL_SUFFIX): Define.
5285 (sh64_elf_add_symbol_hook): New.
5286 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
5287 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
5288 symbol with st_type STT_DATALABEL on the way to a symbol with
5289 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
5290 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
5291 Pass through STT_DATALABEL.
5292 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
5293 (elf_backend_get_symbol_type): Define.
5294 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
5295 (elf_backend_get_symbol_type): Define.
5296 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
5297 * elf32-sh64.c: Tweak comments.
5298 (sh64_elf_copy_private_data_internal): Add prototype.
5299 (bfd_elf32_bfd_set_private_flags): Define.
5300 (sh64_elf_copy_private_data_internal): Compare machine name, not
5301 textual BFD target name, to check whether to copy section flag
5302 SHF_SH5_ISA32.
5303 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
5304 Tweak section-contents-type-mismatch message.
5305 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
5306 Validize reloc-types.
5307 * elf64-sh64.c: New file.
5308 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
5309 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
5310 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
5311 Regenerate dependencies.
5312 * Makefile.in: Regenerate.
5313 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
5314 bfd_elf64_sh64l_vec.
5315 * configure.in: Handle bfd_elf64_sh64_vec and
5316 bfd_elf64_sh64l_vec.
5317 * configure: Regenerate.
5318 * po/POTFILES.in: Regenerate.
5319 * po/bfd.pot: Regenerate.
5320 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
5321 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
5322 anything else but EF_SH64 and EF_SH64_ABI64.
5323 (sh64_elf_merge_private_data): Emit error for anything else but
5324 EF_SH64 and EF_SH64_ABI64.
5325 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
5326 from targ_selvecs.
5327 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
5328 bfd_elf32_sh64l_vec as a temporary measure.
5329 * configure: Regenerate.
5330 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
5331 * cpu-sh.c (arch_info_struct): Include sh5 item
5332 unconditionalized.
5333 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
5334 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
5335 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
5336 * elf32-sh64.c: Tweak comments.
5337 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
5338 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
5339 (sh64_elf_copy_private_data_internal): Wrap long line.
5340 (sh64_elf_merge_private_data): Rewrite to allow objects from
5341 SH64 subsets to be linked together.
5342 (INCLUDE_SHMEDIA): Define.
5343 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
5344 Parenthesize plus-expression inside or-expression.
5345 <global symbol>: Ditto.
5346 (sh_elf_set_mach_from_flags): Remove code refusing
5347 deleted EF_SH64_32BIT_ABI flag.
5348 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
5349 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
5350 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
5351 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
5352 (sh_elf_relocate_section) <local symbol>: Or 1 in
5353 calculation of relocation if sym->st_other & STO_SH5_ISA32.
5354 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
5355 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
5356 relocation.
5357 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
5358 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
5359 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
5360 Regenerate dependencies.
5361 * Makefile.in: Regenerate.
5362 * archures.c: Add bfd_mach_sh5.
5363 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
5364 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
5365 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
5366 * configure: Regenerate.
5367 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
5368 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
5369 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
5370 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
5371 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
5372 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
5373 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
5374 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
5375 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
5376 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
5377 in item for SH5.
5378 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
5379 for SHmedia relocs.
5380 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
5381 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
5382 shmedia_prepare_reloc, goto final_link_relocate if it returns
5383 non-zero, else fail as before.
5384 (sh_elf_set_mach_from_flags): Provide function only if not defined
5385 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
5386 (sh_elf_set_private_flags): Provide function only if not defined
5387 as a macro.
5388 (sh_elf_copy_private_data): Similar.
5389 (sh_elf_merge_private_data): Similar.
5390 * section.c (SEC_SH_ISA_SHMEDIA): New.
5391 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
5392 * elf32-sh64.c: New file.
5393 * libbfd.h: Regenerate.
5394 * bfd-in2.h: Regenerate.
5395 * po/POTFILES.in: Regenerate.
5396 * po/bfd.pot: Regenerate.
5397 * bfd-in2.h: Regenerate.
5398 * libbfd.h: Regenerate.
5399
e108f470
DJ
54002002-02-07 Daniel Jacobowitz <drow@mvista.com>
5401
5402 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
5403 been included, not drag it in.
5404 * bfd-in2.h: Regenerate.
5405
259d18a3
L
54062002-02-06 H.J. Lu (hjl@gnu.org)
5407
5408 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
5409 the mach and ISA fields if necessary.
5410
f13b834e
NC
54112002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
5412
5413 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
5414 ARM architecture when an F_ARM_5 flag is detected, since we cannot
5415 be sure exactly which architecture this represents.
5416
82f6addb
NC
54172002-02-05 Nick Clifton <nickc@redhat.com>
5418
5419 * po/tr.po: Updated translation.
5420
899f54f5
AM
54212002-02-05 Alan Modra <amodra@bigpond.net.au>
5422
5423 From Jimi X <jimix@watson.ibm.com>
5424 * archures (bfd_mach_ppc64): Define.
5425 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
5426 (bfd_powerpc_arch): Define.
5427 * bfd-in2.h: Regenerate.
5428 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
5429 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
5430 (bfd_powerpc_archs): Add default powerpc64 arch.
5431
248866a8
AM
54322002-02-05 Alan Modra <amodra@bigpond.net.au>
5433
5434 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
5435 against section syms in readonly sections. Don't do the global
5436 sym check if we find one.
5437 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
5438 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 5439 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
5440 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
5441 (elf_s390_grok_prstatus): Add missing prototype.
5442
4fa5c2a8
HPN
54432002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
5444
5445 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
5446 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
5447 Call bfd_get_section_by_name only once. Initialize
5448 bpodata->n_bpo_relocs_this_section.
5449 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
5450 referring to DSOs.
5451 (bpo_reloc_request_sort_fn): Don't use difference of values as
5452 return-value.
5453
537c972e
DB
54542002-02-02 David O'Brien <obrien@FreeBSD>
5455
5456 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
5457 version 4.5 and later the same as 5-CURRENT.
5458 * configure: Re-generate.
5459
006336b8
JT
54602002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
5461
5462 * config.bfd (hppa*-*-netbsd*): New target.
5463
6c571f00
PT
54642002-01-31 Philipp Thomas <pthomas@suse.de>
5465
19397422
AM
5466 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
5467 to front of message. Unify messages with elf32-arm.h. Use
5468 commas where neccessary.
5469 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
5470 ERROR in messages. Unify messages with coff-arm.c. Correct
5471 VFP/FPA error message.
5472 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
5473 APCS-32 for translation.
6c571f00 5474
930b4cb2
HPN
54752002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
5476
5477 Perform on-demand global register allocation from
5478 R_MMIX_BASE_PLUS_OFFSET relocs.
5479 * elf64-mmix.c (struct bpo_reloc_section_info, struct
5480 bpo_reloc_request, struct bpo_greg_section_info): New.
5481 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
5482 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
5483 _bfd_mmix_check_all_relocs,
5484 _bfd_mmix_prepare_linker_allocated_gregs,
5485 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
5486 (elf_mmix_howto_table): Correct src_mask for most relocs.
5487 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
5488 case.
5489 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
5490 case. Fix typo in comment. New label do_mmix_reloc.
5491 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
5492 store first object file with a base-plus-offset reloc. Call
5493 mmix_elf_check_common_relocs for the part common with mmo.
5494 (mmix_elf_final_link): Write out linker-allocated register
5495 contents section.
5496 (elf_backend_gc_sweep_hook): Define.
5497 (bfd_elf64_bfd_relax_section): Define.
5498
5499 * mmo.c: Don't include <ctype.h>
5500 (mmo_init): Correct init-once logic.
5501
3e36d993
TR
55022002-02-01 Tom Rix <trix@redhat.com>
5503
5504 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
5505
ba323545
AM
55062002-02-01 Alan Modra <amodra@bigpond.net.au>
5507
5508 * Makefile.am: Run "make dep-am"
5509 * Makefile.in: Regenerate.
5510
012884d6
DB
55112002-01-31 David O'Brien <obrien@FreeBSD>
5512
5513 * configure.in: Recognize the differences in core files from FreeBSD
5514 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
5515 5-CURRENT.
5516 * configure: Regenerate.
5517
3b16e843
NC
55182002-01-31 Ivan Guzvinec <ivang@opencores.org>
5519
5520 * coff-or32.c: New file.
5521 * cpu-or32.c: New file.
5522 * elf32-or32.c: New file.
5523 * archures.c: Add support for or32.
5524 * targets.c: Add support for or32.
5525 * bfd-in2.h: Regenerate.
7dc0ab31 5526 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
5527 coff_write_object_contents): Add support for or32.
5528 * config.bfd: Add target.
5529 * configure.in: Add support for or32.
5530 * configure: Regenerate.
5531 * Makefile.am: Add support for or32.
5532 * Makefile.in: Regenerate.
3b16e843
NC
5533 * po/SRC-POTFILES.in: Add or32 files.
5534 * po/bfd.pot: Regenerate.
7dc0ab31 5535
caf8ca8e
NC
55362002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
5537 Don Lindsay <lindsayd@cisco.com>
5538
5539 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
5540 false' with a return of a bfd_reloc_ error code.
5541
e5dfef09
HPN
55422002-01-31 Hans-Peter Nilsson <hp@axis.com>
5543
5544 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
5545 unexport unreferenced symbols when --export-dynamic. Call
5546 _bfd_elf_strtab_delref when unexporting.
5547
4e4770d0
DJ
55482002-01-30 Daniel Jacobowitz <drow@mvista.com>
5549
5550 * bfd-in.h: Include <stdbool.h> if it is available.
5551 * bfd-in2.h: Regenerated.
5552
e1fa50e7
AM
55532002-01-31 Alan Modra <amodra@bigpond.net.au>
5554
5555 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
5556 not go via the plt.
5557
b5f79c76
NC
55582002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
5559
b5f79c76
NC
5560 * archures.c: Tidy up formatting of embedded comments.
5561 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 5562 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
5563 * reloc.c: Tidy up formatting of ordinary & embedded comments.
5564 * section.c: Tidy up formatting of embedded comments.
5565 * syms.c: Tidy up formatting of embedded comments.
5566 * targets.c: Tidy up formatting of embedded comments.
5567
5568 * bfd-in2.h: Regenerate.
5569
ca09e32b
NC
55702002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
5571
5572 * vms-tir.c (cmd_name): New function.
5573 (tir_cmd_name): New function.
5574 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
5575 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
5576 Fix formatting.
7dc0ab31 5577
ca09e32b
NC
5578 * peXXigen.c (pe_print_idata): Rearrange message to aid in
5579 translation.
5580 (pe_print_pdata): Rearrange message to aid in translation.
5581
5582 * libbfd.c (warn_deprecated): Rearrange error message to aid in
5583 translation.
5584
5585 * ihex.c (ihex_write_object_contents): Fix spelling typo.
5586
5587 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
5588
5589 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
5590 message to aid in translation.
5591
5592 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
5593 to aid in translation.
5594
5595 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
5596
7dc0ab31 55972002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
5598
5599 * coff-arm.c, elf32-elf.h: Unify messages.
5600
05f64ac6
NC
56012002-01-30 Nick Clifton <nickc@redhat.com>
5602
5603 * po/sv.po: Updated translation.
5604
f5a3e38a
NC
56052002-01-30 Philipp Thomas <pthomas@suse.de>
5606
5607 * dwarf2.c (read_abbrev): Use full section name in error message.
5608 (decode_line_info): Likewise.
661a3fd4
NC
5609
5610 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
5611 message.
5612
d926e03d
AM
56132002-01-30 Alan Modra <amodra@bigpond.net.au>
5614
5615 * elf64-ppc.c (func_desc_adjust): Only provide missing function
5616 descriptor symbols for undefined function code syms. Clear
5617 ELF_LINK_NON_ELF so that they can stay weak.
5618
030d18fb 56192002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 5620 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
5621
5622 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
5623 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
5624 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
5625 generation.
5626 * bfd-in2.h: Regenerate.
5627
fcc76bea
CD
56282002-01-29 Chris Demetriou <cgd@broadcom.com>
5629
5630 * elf32-mips.c: Add additional comments about HI16 relocation
5631 processing.
5632 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
5633 pc-relative relocations. (Reverts change made on 2001-10-31.)
5634 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
5635 for pc-relative relocations.
5636 (mips_elf_calculate_relocation): Add a comment about a kludge
5637 in the R_MIPS_GNU_REL_HI16 handling.
5638 (_bfd_mips_elf_relocate_section): Implement that kludge;
5639 adjust pc-relative HI16 relocation for difference in HI16 and
5640 LO16 addresses, since it can't easily be done in
5641 mips_elf_calculate_relocation.
5642
f9cd9119
MS
56432002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
5644
5645 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
5646 relocations with PC32 relocations for undefined or weak symbols.
5647 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
5648 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
5649
702248bb
JT
56502002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
5651
5652 * elfcore.h (elf_core_file_p): Improve comment for last change.
5653
4867be41
DJ
56542002-01-27 Daniel Jacobowitz <drow@mvista.com>
5655
5656 * configure: Regenerated.
5657
a94cef6a
JT
56582002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
5659
5660 * elfcore.h (elf_core_file_p): Set the machine architecture
5661 before processing the program headers.
5662
7562a296
HPN
56632002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
5664
966abd70
HPN
5665 * configure.in <64-bit configuration>: If using gcc, check and
5666 emit error for egcs-1.1.2.
5667 * configure: Regenerate.
5668
e8eab623
NC
56692002-01-26 Egor Duda <deo@logos-m.ru>
5670
5671 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
5672 as possible to avoid stack corruption.
5673
73896efb
RH
56742002-01-26 Richard Henderson <rth@redhat.com>
5675
5676 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
5677 for non-allocated sections.
5678
56792002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
5680
5681 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
5682 prstat.pr_reg even if it is a struct.
5683
73896efb 56842002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 5685
c5cd6d62 5686 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 5687
3d66c4f7
NC
56882002-01-25 Philipp Thomas <pthomas@suse.de>
5689
5690 * coffgen.c (coff_print_symbol): Don't mark info message
5691 for translation.
5692
9460ecda
NC
56932002-01-25 Nick Clifton <nickc@redhat.com>
5694
5695 * po/fr.po: Updated translation.
5696 * po/es.po: Updated translation.
5697
cc9ff76a
AM
56982002-01-25 Philipp Thomas <pthomas@suse.de>
5699
5700 * coff-alpha.c (alpha_relocate_section): Unify warning message
5701 for GP relative relocations without GP defined.
5702 * coff-mips.c (mips_relocate_section): Likewise.
5703
c68836a9
AM
57042002-01-25 Alan Modra <amodra@bigpond.net.au>
5705
5706 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
5707 unsigned overflow when new_offset < old_offset.
5708
e8eab623 57092002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
5710
5711 * bfd.c (_bfd_abort): Fix typo.
5712
8ba89f17
RH
57132002-01-23 Richard Henderson <rth@redhat.com>
5714
5715 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
5716 plt entries for undefweak symbols.
5717
c6953948
NC
57182002-01-23 Steve Ellcey <sje@cup.hp.com>
5719
c5cd6d62 5720 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
5721 (bfd_elf64_ia64_hpux_big_vec): Ditto.
5722 (bfd_elf32_h8300_vec): Ditto.
5723
41bd81ab
AM
57242002-01-23 Alan Modra <amodra@bigpond.net.au>
5725
5726 * elf64-ppc.c: Remove stale part of ABI comment.
5727 (NO_OPD_RELOCS): Define.
5728 (ppc64_elf_check_relocs): Use it.
5729 (ppc64_elf_relocate_section): Here too.
5730 (build_one_stub): Don't point function syms at the stub. Instead,
5731 hijack plt.offset.
5732 (ppc64_elf_relocate_section): Check whether REL24 relocs should
5733 really go to the stub. Make all dynamic relocs in opd against
5734 locals.
5735 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
5736 plt.offset.
5737
f304919d
RH
57382002-01-22 Richard Henderson <rth@redhat.com>
5739
5740 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
5741
c0ef99a7
AM
57422002-01-22 Alan Modra <amodra@bigpond.net.au>
5743
60ee0d4a
AM
5744 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
5745 TOC_BASE_OFF adjustment.
5746
c0ef99a7
AM
5747 * Makefile.am: Run "make dep-am".
5748 * Makefile.in: Regenerate.
5749 * po/SRC-POTFILES.in: Regenerate.
5750
64328b46
AM
57512002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
5752
5753 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
5754 host defines.
5755
59953665 57562002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
5757
5758 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
5759 Check for and emit error if sgot is NULL at this point.
5760
9596feea
JT
57612002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
5762
5763 * config.bfd (ia64*-*-netbsd*): New target.
5764
7b45c6e1
AM
57652002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
5766
5767 * som.c (som_write_space_strings): Comment typo fix.
5768
e5094212
AM
57692002-01-21 Alan Modra <amodra@bigpond.net.au>
5770
e86ce104
AM
5771 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
5772 is_func_descriptor fields.
5773 (link_hash_newfunc): Init them.
5774 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
5775 dot are candidates for plt entries. When processing .opd relocs,
5776 set function descriptor strings to point inside function code
5777 string, and set new ppc_link_hash_entry fields.
5778 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
5779 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
5780 function descriptors. It's now done in..
5781 (func_desc_adjust): New.
5782 (ppc64_elf_func_desc_adjust): New.
5783 (define elf_backend_always_size_sections): Define.
5784 (ppc64_elf_hide_symbol): New.
5785 (define elf_backend_hide_symbol): Define.
5786 (allocate_dynrelocs): Remove code looking up function descriptors
5787 as that has been done earlier.
5788 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
5789 table.
5790 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
5791 up function descriptor.
5792 (build_one_stub): Look up the function code sym. Check for
5793 invalid plt offsets.
5794 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
5795 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
5796
e5094212
AM
5797 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
5798 boolean param.
5799 (_bfd_elf_link_hash_hide_symbol): Likewise.
5800 * elflink.h (elf_link_add_object_symbols): Adjust call to
5801 elf_backend_hide_symbol.
5802 (elf_fix_symbol_flags): Likewise.
5803 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
5804 than bfd_alloc.
5805 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
5806 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
5807 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
5808 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
5809 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
5810 and adjust to suit.
5811 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
5812 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
5813 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
5814
40b8271b
AM
58152002-01-18 Alan Modra <amodra@bigpond.net.au>
5816
5817 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
5818 dynamic function descriptor symbol, not the associated function
5819 symbol.
5820
55baa95b
EC
58212002-01-17 Eric Christopher <echristo@redhat.com>
5822
5823 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
5824
328577ad
NC
58252002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
5826
5827 * po/bfd.pot: Regenerate.
5828 * po/fr.po: Regenerate.
5829
af746e92
AM
58302002-01-17 Alan Modra <amodra@bigpond.net.au>
5831
5832 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
5833 Remove "Elf_Internal_Shdr *" param.
5834 (_bfd_mips_elf_section_from_bfd_section): Ditto.
5835 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
5836 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
5837 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
5838 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
5839 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
5840 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
5841 function to override special sections. Remove hdr arg from
5842 backend call, and don't loop.
5843
175e9962
EC
58442002-01-16 Eric Christopher <echristo@redhat.com>
5845
5846 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
5847 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
5848 relocations requiring gp0 and gp.
5849
96a846ea
RE
58502002-01-16 Richard Earnshaw <rearnsha@arm.com>
5851
175e9962 5852 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
5853 EF_ARM_VFP_FLOAT.
5854 (elf32_arm_print_private_bfd_data): Likewise.
5855
af3ae48d
NC
58562002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
5857
5858 * po/tr.po: Import new version.
5859
10ed1bba
AM
58602002-01-16 Alan Modra <amodra@bigpond.net.au>
5861
5862 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
5863 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
5864 (ORI_R0_R0_0): Correct.
5865
5d1634d7
AM
58662002-01-16 Alan Modra <amodra@bigpond.net.au>
5867
5868 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
5869 when plt_not_loaded.
5870 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
5871 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
5872 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
5873 (ppc64_elf_glink_code): Delete.
5874 (PPC64_ELF_GLINK_SIZE): Delete.
5875 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
5876 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
5877 ORI_R0_R0_0): Define.
5878 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
5879 (struct ppc_link_hash_table): Add sstub and plt_overflow.
5880 (ppc64_elf_link_hash_table_create): Init them.
5881 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
5882 Don't copy to shared lib.
5883 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
5884 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
5885 (allocate_dynrelocs <plt>): Don't change function sym here. Make
5886 room for .stub and .glink code.
5887 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
5888 DT_PPC64_GLINK.
5889 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
5890 bfd_elf64_bfd_final_link.
5891 (bfd_elf64_bfd_final_link): Don't define.
5892 (ppc64_elf_size_stubs): New.
5893 (build_plt_stub): New.
5894 (build_one_stub): New.
5895 (ppc64_elf_build_stubs): New.
5896 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
5897 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
5898 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
5899 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
5900 case output sections not separate. Adjust DT_RELASZ to not
5901 include plt relocs. Set reserved got entry. Set got and plt
5902 entry size.
5903 (elf_backend_got_header_size): Set to 8.
5904 * elf64-ppc.h: New file.
5905
c601ffdb
AM
59062002-01-16 Alan Modra <amodra@bigpond.net.au>
5907
5908 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
5909 sections, use bfd_section_list_remove.
5910 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
5911 * elflink.h (elf_link_add_object_symbols): When removing all
5912 sections, use bfd_section_list_clear.
5913
8fb4cb7f
NC
59142002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5915
5916 * po/sv.po: New file: Swedish translation.
5917 * configure.in (ALL_LINGUAS): Add sv.
5918 * configure: Regenerate.
5919
d3c456e9
JJ
59202002-01-15 Jakub Jelinek <jakub@redhat.com>
5921
5922 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
5923 * elf.c (merge_sections_remove_hook): New function.
5924 (_bfd_elf_merge_sections): Pass it as 3rd argument to
5925 _bfd_merge_sections.
5926 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
5927 * libbfd.h: Rebuilt.
5928 * merge.c (_bfd_merge_sections): Add remove_hook argument.
5929 Call remove_hook if a SEC_EXCLUDE section is encountered.
5930
1f7fd478
NC
59312002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5932
5933 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
5934 (xstormy16_reloc_map): Initialise new field with correct howto
5935 table.
5936 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
5937 howto entry.
5938
b87011e9
MS
59392002-01-10 Michael Snyder <msnyder@redhat.com>
5940
5941 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
5942 (elfcore_write_pstatus): Use long instead of pid_t;
5943 * elf-bfd.h: Change prototypes to use long instead of pid_t;
5944
175e9962 59452002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
5946
5947 * elf.c: Update copyright years.
5948 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
5949 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
5950
7c76fa91
MS
59512002-01-08 Michael Snyder <msnyder@redhat.com>
5952
5953 Add capability to write corefile note sections, for gdb.
5954 * elf.c (elfcore_write_note): New function.
5955 (elfcore_write_prpsinfo): New function.
5956 (elfcore_write_prstatus): New function.
5957 (elfcore_write_pstatus): New function.
5958 (elfcore_write_prfpreg): New function.
5959 (elfcore_write_prxfpreg): New function.
97996af6 5960 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 5961
e1fddb6b
AO
59622002-01-08 Alexandre Oliva <aoliva@redhat.com>
5963
5964 * elf.c (elf_fake_sections): Propagate errors from
5965 elf_backend_fake_section.
5966
8d05742f
JT
59672002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
5968
5969 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
5970 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
5971 (elf32-sh-nbsd.lo): New rule.
5972 * Makefile.in: Regenerate.
5973 * config.bfd (sh*le-*-netbsdelf*): New target.
5974 (sh*-*-netbsdelf*): New target.
5975 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
5976 (bfd_elf32_shnbsd_vec): New vector.
5977 (bfd_elf32_shlnbsd_vec): New vector.
5978 * configure: Regenerate.
5979 * elf32-sh-nbsd.c: New file.
5980 * targets.c: Update copyright years.
175e9962 5981 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
5982 bfd_elf32_shnbsd_vec.
5983
1dba4cb4
AH
59842002-01-07 Aldy Hernandez <aldyh@redhat.com>
5985
5986 * coff-rs6000.c (READ20): Use bfd_scan_vma.
5987
47b22aef
GK
59882002-01-07 Geoffrey Keating <geoffk@redhat.com>
5989
5990 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
5991 of a symbol in a section that will be deleted.
5992
be2d1673
NC
59932002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
5994
5995 * po/es.po: New file: Spanish translation.
5996 * configure.in (ALL_LINGUAS): Add es.
5997 * configure: Regenerate.
5998
d9cf1b54
AM
59992002-01-06 Steve Ellcey <sje@cup.hp.com>
6000
6001 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
6002 argument so we can handle HP-UX specially.
6003 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
6004 (elfNN_hpux_backend_section_from_bfd_section): New for support
6005 of SHN_IA_64_ANSI_COMMON.
6006 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
6007 (is_unwind_section_name): Add special HP-UX support.
6008 (elfNN_ia64_section_from_shdr): Add support for more sections.
6009 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
6010 add support for more sections.
6011 (elfNN_ia64_additional_program_headers): Modify
6012 is_unwind_section_name call.
6013 (elfNN_ia64_modify_segment_map): Remove assumption that there is
6014 only one unwind section in segment.
6015
3f3c5c34
AM
60162002-01-06 Alan Modra <amodra@bigpond.net.au>
6017
6018 * syms.c (_bfd_generic_make_empty_symbol): New function.
6019 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
6020 _bfd_generic_make_empty_symbol.
6021 * libbfd.h: Regenerate.
6022 * bfd-in2.h: Regenerate.
6023 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
6024 (hppabsd_core_get_symtab_upper_bound): Don't define.
6025 (hppabsd_core_get_symtab): Likewise.
6026 (hppabsd_core_print_symbol): Likewise.
6027 (hppabsd_core_get_symbol_info): Likewise.
6028 (hppabsd_core_bfd_is_local_label_name): Likewise.
6029 (hppabsd_core_get_lineno): Likewise.
6030 (hppabsd_core_find_nearest_line): Likewise.
6031 (hppabsd_core_bfd_make_debug_symbol): Likewise.
6032 (hppabsd_core_read_minisymbols): Likewise.
6033 (hppabsd_core_minisymbol_to_symbol): Likewise.
6034 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
6035 Formatting fixes.
6036 * hpux-core.c: Similarly.
6037 * irix-core.c: Similarly.
6038 * osf-core.c: Similarly.
6039 * sco5-core.c: Similarly.
6040 * binary.c (binary_make_empty_symbol): Remove function, define as
6041 _bfd_generic_make_empty_symbol.
6042 * ihex.c (ihex_make_empty_symbol): Likewise.
6043 * mmo.c (mmo_make_empty_symbol): Likewise.
6044 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
6045 * srec.c (srec_make_empty_symbol): Likewise.
6046 * versados.c (versados_make_empty_symbol): Likewise.
6047 * vms.c (_bfd_vms_make_empty_symbol): Remove.
6048 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
6049 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
6050 rather than _bfd_vms_make_empty_symbol.
6051 * vms-misc.c (new_symbol): Likewise.
6052
3f0a7f7f
AM
60532002-01-05 Alan Modra <amodra@bigpond.net.au>
6054
9e7b37b3
AM
6055 * section.c (bfd_section_init): Remove unnecessary initialisations.
6056 (bfd_section_list_clear): New function.
6057 (bfd_section_list_remove, bfd_section_list_insert): New macros.
6058 (_bfd_strip_section_from_output): Use them.
6059 * coffcode.h (coff_set_alignment_hook): Likewise.
6060 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
6061 * elf64-mips.c (mips_elf64_final_link): Likewise.
6062 * elf64-mmix.c (mmix_elf_final_link): Likewise.
6063 * sunos.c (sunos_add_dynamic_symbols): Likewise.
6064 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
6065 * bfd-in2.h: Regenerate.
6066
6067 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
6068 rather than doing our own section handling. Clean up after errors
6069 with bfd_release and bfd_section_list_clear. Handle unexpected
6070 flags.
6071 * aoutf1.h (sunos4_core_file_p): Likewise.
6072 * aix386-core.c (aix386_core_file_p): Likewise.
6073 * cisco-core.c (cisco_core_file_validate): Likewise.
6074 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
6075 * trad-core.c (trad_unix_core_file_p): Likewise.
6076
6077 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
6078 with bfd_release and bfd_section_list_clear.
6079 * hpux-core.c (hpux_core_core_file_p): Likewise.
6080 * irix-core.c (irix_core_core_file_p): Likewise.
6081 * lynx-core.c (lynx_core_file_p): Likewise.
6082 * osf-core.c (osf_core_core_file_p): Likewise.
6083 * rs6000-core.c (rs6000coff_core_p): Likewise.
6084 * sco5-core.c (sco5_core_file_p): Likewise.
6085
3f0a7f7f
AM
6086 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
6087 sign extension adjustments without conditionals.
6088
a3aa38ee
JJ
60892002-01-04 Jakub Jelinek <jakub@redhat.com>
6090
6091 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
6092 CIE at .eh_frame start is removed due to no FDEs referencing it.
6093
8a8b2d4b
AJ
60942002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
6095
6096 * config.bfd (x86_64-*-netbsd*): New target.
6097 * configure.in (x86_64-*-netbsd*): Set COREFILE
6098 to netbsd-core.lo.
6099 * configure: Regenerated.
6100
04b5af89
TR
61012002-01-03 Tom Rix <trix@redhat.com>
6102
6103 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
6104 for recent bfd_make_section_anyway change.
6105
51c5503b
NC
61062002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
6107
6108 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6109 R_ARM_THM_PC11 reloc.
6110
07f7c046
NC
61112002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
6112
6113 * configure.in (LINGUAS): Add ja.
6114 * configure: Regenerate.
6115 * po/ja.po: Import from translation project's web site.
6116
5eefb65f
NC
61172002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
6118
6119 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
6120 messages to ease translation into other languages.
6121
39e90f10 6122For older changes see ChangeLog-0001
56882138
AM
6123\f
6124Local Variables:
6125mode: change-log
6126left-margin: 8
6127fill-column: 74
6128version-control: never
6129End: