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