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