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