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