]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
* ld.texinfo (-Tbss, -Tdata, -Ttext): Document in terms of
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6e84a906
DJ
12003-03-31 Andreas Schwab <schwab@suse.de>
2 Daniel Jacobowitz <drow@mvista.com>
3
4 * simple.c (bfd_simple_get_relocated_section_contents): Add
5 parameter symbol_table. Optionally use it instead of the symbol
6 table from the bfd. Save and restore output offsets and output
7 sections around bfd_get_relocated_section_contents. Fix a memory
8 leak.
9 (simple_save_output_info, simple_restore_output_info): New
10 functions.
11 * bfd-in2.h: Regenerate.
12 * dwarf2.c (read_abbrevs): Use
13 bfd_simple_get_relocated_section_contents instead of
14 bfd_get_section_contents.
15 (decode_line_info): Likewise.
16 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
17 find_rela_addend.
18 (find_rela_addend): Remove.
19 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
20 debugging sections.
21 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
22 not bfd_zalloc.
23
5ed6aba4
NC
242003-03-31 David Heine <dlheine@suif.stanford.edu>
25
26 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
27 bfd_alloc.
28 * dwarf2.c (concat_filename): Always allocate space for the
29 returned filename.
30 (decode_line_info): Free the allocated filename returned by
31 concat_filename.
32 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
33 * elf.c (copy_private_bfd_data): Likewise.
34 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
35 * elflink.h (elf_link_sort_relocs): Fix memory leak.
36 * format.c (bfd_check_format_matches): Likewise.
37 * linker.c (bfd_generic_final_link): Likewise.
38 * opncls.c (find_separate_debug_info): Likewise.
39 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
40
5941afc1
L
412003-03-28 H.J. Lu <hjl@gnu.org>
42
43 * elflink.h (elf_link_add_object_symbols): Correctly combine
44 visibilities.
45
9d73f260
JJ
462003-03-27 Jakub Jelinek <jakub@redhat.com>
47
48 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
49 to -1 before recomputing got offsets.
50
a5ad465a
AS
512003-03-26 Andreas Schwab <schwab@suse.de>
52
53 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
54 (elf_m68k_relocate_section): Use it to correctly handle symbols
55 forced to be local.
56 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
57 entries for symbols that are forced to be local.
58
d0647110
AO
592003-03-25 Alexandre Oliva <aoliva@redhat.com>
60
61 * elfxx-mips.c (_bfd_mips_relax_section): New function.
62 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
63 * elfn32-mips.c, elf64-mips.c: Use it.
64
e16bb312
NC
652003-03-25 Stan Cox <scox@redhat.com>
66 Nick Clifton <nickc@redhat.com>
67
68 Contribute support for Intel's iWMMXt chip - an ARM variant:
69
70 * archures.c: Add bfd_mach_arm_iWMMXt.
71 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
72 * bfd-in2.h: Regenerate.
73 * libbfd.h: Regenerate.
74 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
75 object files to be linked with XScale ones.
76 (coff_arm_final_link_postscript): Update note section.
77 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
78 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
79 after identifying a coff binary.
80 * cpu-arm.c (processors): Add iWMMXt.
81 (arch_inf): Likewise.
82 * elf32-arm.h (arm_object_p): Handle note section.
83 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
84 be linked with XScale ones.
85 (elf32_arm_section_flags): New function: Set flags on note section.
86 (elf32_arm_final_write_processing): Handle note section.
87
25f14c34
DD
882003-03-21 DJ Delorie <dj@redhat.com>
89
90 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
91 _bfd_elf_rela_local_sym.
92
04b3329b
L
932003-03-20 H.J. Lu <hjl@gnu.org>
94
95 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
96 non-ELF outputs.
97
c25cfdf8
NC
982003-03-20 Nick Clifton <nickc@redhat.com>
99
100 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
101 $idata5 in case bfd_coff_final_link is not called.
102
3e1d7f19
JJ
1032003-03-19 Jakub Jelinek <jakub@redhat.com>
104
105 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
106 field.
107 (canon_reloc_count): Define.
108 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
109 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
110 reloc_count.
111 (sparc64_elf_canonicalize_reloc): New routine.
112 (bfd_elf64_canonicalize_reloc): Define.
113
3fa1d917
JJ
1142003-03-18 Jakub Jelinek <jakub@redhat.com>
115
116 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
117 againt mergeable sections. Take r_addend into account when caching
118 trampolines.
119
f86b235a
RH
1202003-03-18 Richard Henderson <rth@redhat.com>
121
122 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
123 local symbols that have no dyninfo.
124
49ae03bf
NC
1252003-03-14 Gene Smith <gene.smith@siemens.com>
126
127 * ieee.c (ieee_write_expression): Handle the case where symbol is
128 NULL.
129 General formatting improvements.
130
6a457e5c
NC
1312003-03-13 Nick Clifton <nickc@redhat.com>
132
133 * configure.in (LINGUAS): Add zh_CN.
134 * configure: Regenerate.
135 * po/zh_CN.po: New file.
136
93516ec3
NC
1372003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
138
139 * aout-cris.c (BYTES_IN_WORD): Don't define.
140 aout-encap.c: Likewise.
141 aout-ns32k.c: Likewise.
142 aout-tic30.c: Likewise.
143 hp300bsd.c: Likewise.
144 i386aout.c: Likewise.
145 i386dynix.c: Likewise.
146 i386linux.c: Likewise.
147 i386lynx.c: Likewise.
148 i386mach3.c: Likewise.
149 m68k4knetbsd.c: Likewise.
150 m68klinux.c: Likewise.
151 m68klynx.c: Likewise.
152 m68knetbsd.c: Likewise.
153 m88kmach3.c: Likewise.
154 mipsbsd.c: Likewise.
155 newsos3.c: Likewise.
156 sparclinux.c: Likewise.
157 sparclynx.c: Likewise.
158 sparcnetbsd.c: Likewise.
159 vaxbsd.c: Likewise. Fix comment formatting.
160
fee24f1c
AO
1612003-03-12 Alexandre Oliva <aoliva@redhat.com>
162
0b25d3e6
AO
163 * Reverted 2003-03-02's patch.
164
fee24f1c
AO
165 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
166 overridable.
167 * elf64-mips.c (mips_elf64_canonicalize_reloc,
168 mips_elf64_get_dynamic_reloc_upper_bound,
169 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
170 (bfd_elf64_get_canonicalize_reloc,
171 bfd_elf64_get_dynamic_reloc_upper_bound,
172 bfd_elf64_canonicalize_dynamic_reloc): Define.
173 (mips_elf64_slurp_reloc_table): Support dynamic.
174 (mips_elf64_slurp_one_reloc_table): Adjust.
175
64fb1839
NC
1762003-03-12 Nick Clifton <nickc@redhat.com>
177
178 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
179 'index' to 'offset' in test for zero value.
180
908488f1
AO
1812003-03-11 Alexandre Oliva <aoliva@redhat.com>
182
183 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
184 dynamic relocations pointing to local or section symbols, use the
185 NULL symbol instead. Document the choice to not emit an
186 additional R_MIPS_64 relocation.
187
e515b051
AM
1882003-03-11 Alan Modra <amodra@bigpond.net.au>
189
190 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
191 zero index dynamic tls relocs generated for the GOT. Tidy code.
192 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
193 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
194
a23b6845
AM
1952003-03-07 Alan Modra <amodra@bigpond.net.au>
196
87d243f1
AM
197 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
198 a tls_get_addr call.
199
a23b6845
AM
200 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
201 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
202 ELF_LINK_NON_GOT_REF from weakdef.
203 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
204 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
205 ELF_LINK_NON_GOT_REF from weakdef.
206 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
207 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
208 ELF_LINK_NON_GOT_REF from weakdef.
209
2d36fe5f
AH
2102003-03-06 Jakub Jelinek <jakub@redhat.com>
211 Andrew Haley <aph@redhat.com>
212
213 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
214 output is relocateable.
215
34f304a7
NC
2162003-03-06 Steven Konopa <skonopa@kgo.csc.com>
217
218 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
219 R_COMMENT.
220
7b609f53
AM
2212003-03-06 Alan Modra <amodra@bigpond.net.au>
222
223 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
224 error messages.
225 (ELIMINATE_COPY_RELOCS): Define to zero.
226 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
227 TLSLD relocs. Report reloc types on a number of errors. Optimize
228 LOCAL24PC check for non-local syms. Don't capitalize error messages.
229 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
230 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
231 calculating TLSLD relocs. Report reloc types on a number of errors.
232 Don't capitalize error messages.
233
6a0fb186
L
2342003-03-03 H.J. Lu <hjl@gnu.org>
235
236 * elfxx-ia64.c (USE_BRL): Removed.
237 (oor_ip): Removed.
238
34f304a7 2392003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
240
241 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
242 relocation (no special function), and make it non-partial_inplace.
243 (sh_elf_relax_section): When creating a bsr, use a consistent value
244 no matter if the symbol is extern or not; set addend to -4.
245 Don't swap load / non-load instructions for SH4.
246 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
247 rather than if the symbol is external to determine if adjusting the
248 offset makes sense. Adjust the addend too if appropriate.
249 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
250 relocation.
251
a9d68a1e
NC
2522003-03-03 Nick Clifton <nickc@redhat.com>
253
254 * po/da.po: Installed latest translation.
255
7c2be35c
TS
2562003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
257
258 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
259 R_MIPS_PC16 to rightshift 2.
260 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
261 (bfd_elf32_bfd_reloc_type_lookup): Support
262 BFD_RELOC_MIPSEMB_16_PCREL_S2.
263 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
264 R_MIPS_PC16 to rightshift 2.
265 (mips_elf64_howto_table_rela): Likewise.
266 (mips_reloc_map): Map to rightshifted BFD reloc.
267 * elfn32-mips.c: The same as in elf64-mips.c.
268 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
269 (mips_elf_calculate_relocation): Handle rightshifted addends for
270 R_MIPS_PC16.
271 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
272 MIPS Embedded PIC. Remove superfluous empty COMMENT.
273 * libbfd.h: Regenerate.
274 * bfd-in2.h: Regenerate.
275
484a4f9c
RH
2762003-02-28 Richard Henderson <rth@redhat.com>
277
278 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
279 for ltoff22x relaxation.
280
2ce40c65
AM
2812003-03-01 Alan Modra <amodra@bigpond.net.au>
282
283 * bfd-in.h (_bfd): Don't define.
284 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
285 * syms.c: Likewise.
286 * bfd-in2.h: Regenerate.
287
2c4c2bc0
RH
2882003-02-27 Richard Henderson <rth@redhat.com>
289
290 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
291 (elfNN_ia64_check_relocs): Set it.
292 (allocate_global_data_got): Check it.
293 (allocate_local_got): Likewise.
294 (allocate_dynrel_entries): Likewise.
295 (elfNN_ia64_relax_ldxmov): New.
296 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
297 (elfNN_ia64_choose_gp): Split out from ...
298 (elfNN_ia64_final_link): ... here.
299
c2852e88
AC
3002003-02-27 Andrew Cagney <cagney@redhat.com>
301
302 * bfd.c (struct bfd): Rename "struct _bfd".
303 * bfd-in.h: Update copyright.
304 (struct bfd): Rename "struct _bfd".
305 (_bfd): Define for backward compatibility.
306 * bfd-in2.h: Regenerate.
307
3f87cb70
AM
3082003-02-25 Alan Modra <amodra@bigpond.net.au>
309
3f9a32bd
AM
310 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
311 and rel_hdr2 when initially counting input relocs rather than after
312 creating output reloc sections.
4fabe71e
AM
313 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
314 sizes.
3f9a32bd 315
3f87cb70
AM
316 * Makefile.am: Run "make dep-am".
317 * Makefile.in: Regenerate.
318
07c6e936
NC
3192003-02-24 Kris Warkentin <kewarken@qnx.com>
320
321 * elf.c (elfcore_read_notes): Add check for QNX style core file.
322 (elfcore_grog_nto_note): New function.
323 (elfcore_grog_nto_gregs): New function.
324 (elfcore_grog_nto_status): New function.
325
aad5d350
AM
3262003-02-24 Alan Modra <amodra@bigpond.net.au>
327
328 * elflink.c (_bfd_elf_create_got_section): Check existing .got
329 section flags before concluding that we've already been called.
330 Don't use register keyword.
331 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
332 (_bfd_elf_create_linker_section): Formatting.
333
2ab1486e
NC
3342003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
335
336 * coff-h8300.c: Fix typo: intial -> initial.
337 * coff-ppc.c: Likewise.
338
70bccea4
AM
3392003-02-20 Alan Modra <amodra@bigpond.net.au>
340
341 * elf32-ppc.c: Formatting.
342 (allocate_dynrelocs): LD and GD relocs against the same sym need
343 separate GOT entries.
344 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
345 entries per symbol.
346
ee05f2fe
AM
3472003-02-19 Alan Modra <amodra@bigpond.net.au>
348
26e41594
AM
349 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
350 removal. Localize vars. Remove unnecessary dynobj test.
351 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
352 of INFO.
353 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
354 and optimize.
355 (elf_i386_relocate_section): Likewise.
356 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
357 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
358 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
359 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
360 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
361 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
362 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
363 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
364 Formatting.
365
f4656909
AM
366 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
367 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
368 test.
369 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
370 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
371 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
372 and optimize. Use ELIMINATE_COPY_RELOCS.
373 (ppc64_elf_relocate_section): Likewise.
374
ee05f2fe
AM
375 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
376 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
377 (ELIMINATE_COPY_RELOCS): Define.
378 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
379 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
380 (MUST_BE_DYN_RELOC): Define.
381 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
382 and optimize. Trim dyn_relocs.
383 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
384 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
385 track of pc_rel dyn relocs.
386 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
387 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
388 allocate_dynrelocs. Don't recalculate "sec".
389
7619e7c7
AM
3902003-02-18 Alan Modra <amodra@bigpond.net.au>
391
d881513a
AM
392 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
393 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
394 on invalid LD relocs.
395 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
396 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
397 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
398
7619e7c7
AM
399 * elf32-ppc.h: New file.
400 * elf32-ppc.c: Include elf32-ppc.h.
401 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
402 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
403 Add "tls_mask" field.
404 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
405 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
406 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
407 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
408 Make use of htab shortcuts throughout file.
409 (ppc_elf_link_hash_newfunc): Init tls_mask field.
410 (ppc_elf_link_hash_table_create): Init new fields.
411 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
412 (ppc_elf_howto_raw): Add tls relocs.
413 (ppc_elf_reloc_type_lookup): Handle them.
414 (ppc_elf_unhandled_reloc): New function.
415 (ppc_elf_create_got): Stash got section pointer in hash table,
416 return status. Make .rela.got too.
417 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
418 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
419 NON_GOT_REF set. Don't allocate space in .plt here..
420 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
421 not allocating plt entries unnecessarily. Allocate got entries here.
422 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
423 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
424 "info" during allocate_dynrelocs hash traversal. Use htab section
425 shortcuts rather than searching for named sections. Get rid of
426 "plt" and "strip" booleans.
427 (update_local_sym_info, bad_shared_reloc): New functions.
428 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
429 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
430 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
431 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
432 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
433 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
434 relocs that might use a plt entry. Set NON_GOT_REF too.
435 Enumerate all do-nothing relocs.
436 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
437 tls relocs and all plt relocs.
438 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
439 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
440 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
441 shortcuts.
442 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
443 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
444 entries and got relocs here. Warn on non-zero got reloc addend.
445 Split out branch taken/not taken reloc code into a separate switch
446 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
447 Split out HA reloc adjustments to separate switch statement. Don't
448 warn on reloc overflow if we've already warned about undefined.
449 Don't rebuild sym name when reporting errors. Report all possible
450 errors from _bfd_final_link_relocate.
451 (bfd_elf32_bfd_final_link): Don't define.
452
cd27b276
AM
4532003-02-18 Alan Modra <amodra@bigpond.net.au>
454
455 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
456 rebuild sym name when reporting errors.
457
ae9a127f
NC
4582003-02-17 Nick Clifton <nickc@redhat.com>
459
3f9a32bd 460 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
461 allow_shlib_undefined for shared libraries.
462 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
463 of allow_shlib_undefined.
464 * elf32-cris.c (cris_elf_relocate_section): Likewise.
465 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
466 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
467 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
468 * elf32-s390.c (elf_s390_relocate_section): Likewise.
469 * elf32-sh.c (sh_elf_relocate_section): Likewise.
470 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
471 * elf32-vax.c (elf_vax_relocate_section): Likewise.
472 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
473 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
474 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
475 * elf64-s390.c (elf_s390_relocate_section): Likewise.
476 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
477 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
478 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
479 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
480
b5f852ea
NC
4812003-02-17 Nick Clifton <nickc@redhat.com>
482
483 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
484 address field to use in the comparison.
3f9a32bd 485 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 486
3193e234
NC
4872003-02-14 Bob Wilson <bob.wilson@acm.org>
488
489 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
490 backends when checking if the generic ELF target should be used.
491
21efdc8d
NC
492 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
493 outside of functions, treat values as absolute addresses.
494
ed781d5d
NC
495 * bfd.c: Change embedded documentation to use consistent indentation
496 and to split up long lines. Change informal style of description
497 for functions lacking real documentation.
498 * coffcode.h: Break up long lines in embedded documentation.
499 * format.c: Likewise.
500 * targets.c: Likewise.
501 * libcoff.h: Regenerate.
502 * bfd-in2.h: Regenerate.
503
58ac9f71
AM
5042003-02-14 Alan Modra <amodra@bigpond.net.au>
505
506 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
507 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
508 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
509 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
510 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
511 (group_sections): Don't share a stub section if stubs are for a large
512 section. Adjust comment.
513 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
514 !stubs_always_before_branch.
515 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
516 treat undefined and undefweak specially when processing dyn relocs.
517
9147e853
JJ
5182003-02-13 Jakub Jelinek <jakub@redhat.com>
519
520 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
521
427bfd90
NC
5222003-02-13 Nick Clifton <nickc@redhat.com>
523
524 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
525 in computation of offset to insert into BL instruction.
526
42b5d0ea
NC
5272003-02-11 Uwe Stieber <uwe@wwws.de>
528
529 * config.bfd: Add support for kaOS as cross build target system.
530
a48ebf4d
AM
5312003-02-11 Alan Modra <amodra@bigpond.net.au>
532
533 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
534 .__tls_get_addr too.
535 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
536
c95b8a7a
KK
5372003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
538
539 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
540 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
541 (sh_elf_link_hash_newfunc): Remove the initialization of
542 tls_tpoff32 field.
543 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
544 for which tls_tpoff32 flag is set.
545 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
546 of the symbol includes the entry matched with the input_section
547 and having tls_tpoff32 flag on. When linking statically, set
548 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
549 is defined in this executable.
550 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
551
a779acda
JJ
5522003-02-10 Jakub Jelinek <jakub@redhat.com>
553
554 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
555 even if there is just non-empty .rela.plt.
556
fde78edd
NC
5572003-02-10 Nick Clifton <nickc@redhat.com>
558
559 * archures.c (bfd_mach_arm_ep9312): Define.
560 * bfd-in2.h: Regenerate.
561 * cpu-arm.c (processors[]): Add ep9312.
562 (bfd_arm_arch): Add ep9312.
563 * elf32-arm.h (elf32_arm_merge_private_data): Update error
564 messages and add test for Maverick floating point support.
565 (elf32_arm_print_private_bfd_data): Handle
566 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
567 (elf32_arm_object_p): New function.
568 (elf_backend_object_p): Define.
fde78edd 569
e7b938ca
AM
5702003-02-10 Alan Modra <amodra@bigpond.net.au>
571
572 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
573 variables, structure fields or function params to tls_mask or
574 similar to better reflect usage.
575 (struct got_entry): Comment.
576 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
577 (get_tls_mask): Rename from get_tls_type.
578
951fd09b
AM
5792003-02-09 Alan Modra <amodra@bigpond.net.au>
580
581 * elf64-ppc.c (TLS_GD_LD): Don't define..
582 (TLS_GD): ..define this instead and update all uses.
583 (TLS_TPRELGD): Define.
584 (ppc64_elf_link_hash_table_create): Tweak initialization of
585 init_refcount and init_offset.
586 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
587 Mark second slot of GD or LD toc entries.
588 (get_tls_type): Return an int. Distinguish toc GD and LD entries
589 from other tls types.
590 (ppc64_elf_tls_setup): New function, split out from..
591 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
592 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
593 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
594 return value to properly decide whether toc GD and LD entries can
595 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
596 to determine GD or LD rather than looking at TLS_LD flag. Don't
597 attempt to adjust got entry tls_type here..
598 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
599 look for possible merges.
600 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
601 optimization.
602 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
603 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
604 Make use of return value from get_tls_type to properly detect GD and
605 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
606 handle tls_get_addr removal when looking at REL24 relocs, do it when
607 looking at the previous reloc. Check reloc after DTPMOD64 to determine
608 GD or LD.
609 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
610
acc990f2
AM
6112003-02-08 Alan Modra <amodra@bigpond.net.au>
612
00b28bb0
AM
613 * elf32-hppa.c (group_sections): Don't share a stub section if
614 stubs are for a large section.
615
acc990f2
AM
616 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
617 stubs if !stubs_always_before_branch.
618
589e6347
NC
6192003-02-07 Nick Clifton <nickc@redhat.com>
620
621 * elf.c (swap_out_syms): Generate an error message if an
622 equivalent output section cannot be found for a symbol.
623
c328dc3f
JJ
6242003-02-07 Jakub Jelinek <jakub@redhat.com>
625
626 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
627 local_got_entries is NULL.
628
84f97cb6
AS
6292003-02-06 Andreas Schwab <schwab@suse.de>
630
631 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
632 (read_value): Add parameter is_signed, use signed extraction if
633 the value is signed.
634 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
635 encoding to read_value.
636
6349e628
AM
6372003-02-06 Alan Modra <amodra@bigpond.net.au>
638
639 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
640 plt info when called to transfer weak sym info.
641
411e1bfb
AM
6422003-02-05 Alan Modra <amodra@bigpond.net.au>
643
644 * reloc.c: Add PPC and PPC64 TLS relocs.
645 * libbfd.h: Regenerate.
646 * bfd-in2.h: Regenerate.
647 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
648 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
649 against a 32 bit field.
650 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
651 (_ppc64_elf_section_data): Add t_symndx and comments.
652 (ppc64_elf_section_data): Use elf_section_data macro.
653 (ppc64_elf_new_section_hook): American spelling.
654 (struct got_entry, struct plt_entry): New.
655 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
656 (struct ppc_stub_hash_entry): Add "addend" field.
657 (struct ppc_link_hash_entry): Add "tls_type".
658 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
659 TLS_EXPLICIT): Define.
660 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
661 (link_hash_newfunc): Init new fields.
58ac9f71 662 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
663 init_offset to NULL.
664 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
665 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
666 there.
667 (update_local_sym_info, update_plt_info): New functions.
668 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
669 handling to use got.glist rather than got.refcount. Likewise for PLT.
670 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
671 (func_desc_adjust): Adjust for new PLT list.
672 (ppc64_elf_adjust_dynamic_symbol): Likewise.
673 (get_sym_h, get_tls_type): New functions.
674 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
675 (ppc64_elf_tls_optimize): New function.
676 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
677 TLS relocs.
678 (ppc64_elf_size_dynamic_sections): Likewise.
679 (ppc_type_of_stub): Adjust for new PLT list.
680 (ppc_build_one_stub): Likewise.
681 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
682 calls specially.
683 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
684 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
685 init GOT entries that have a reloc. Generate GOT relocs here..
686 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
687 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
688
0cca5f05
AS
6892003-02-04 Andreas Schwab <schwab@suse.de>
690
691 * elf32-m68k.c (elf_m68k_hash_entry): Define.
692 (elf_m68k_link_hash_traverse): Remove.
693 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
694 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
695 reduce casting.
696 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
697 casting.
698 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
699 instead of elf_m68k_link_hash_traverse.
700 (elf_m68k_discard_copies): Change first parameter to pointer to
701 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
702 elf_m68k_link_hash_entry is needed.
703
5cab59f6
AM
7042003-02-04 Alan Modra <amodra@bigpond.net.au>
705
706 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
707 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
708 "got" union, and declare as gotplt_union. Use gotplt_uinion for
709 "plt" field.
710 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
711 Add "init_offset" field.
712 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
713 (elf_local_got_ents): Declare.
714 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
715 and "plt".
716 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
717 (_bfd_elf_link_hash_table_init): Set "init_offset".
718 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
719 from init_offset.
720 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
721
722 * elf.c (bfd_elf_local_sym_name): Split out from..
723 (group_signature): ..here.
724 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
725
68bfbfcc
AM
7262003-02-04 Alan Modra <amodra@bigpond.net.au>
727
728 * elf-bfd.h (enum elf_link_info_type): Remove.
729 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
730 to struct sec. Remove linkonce_p field.
731 (elf_linkonce_p): Delete.
732 (elf_discarded_section): Update for sec_info_type change.
733 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
734 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
735 (ELF_INFO_TYPE_NONE): Define.
736 (ELF_INFO_TYPE_STABS): Define.
737 (ELF_INFO_TYPE_MERGE): Define.
738 (ELF_INFO_TYPE_EH_FRAME): Define.
739 (ELF_INFO_TYPE_JUST_SYMS): Define.
740 (STD_SECTION): Update struct sec initializer.
741 * ecoff.c (bfd_debug_section): Likewise.
742 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
743 * elflink.h: Likewise.
744 * elf-eh-frame.c: Likewise.
745 * elf64-alpha.c: Likewise.
746 * elfxx-ia64.c: Likewise.
747 * elfxx-mips.c: Likewise.
748 * bfd-in2.h: Regenerate.
749
750 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
751 referring to used_by_bfd.
752 * elf64-sparc.c (sec_do_relax): Likewise.
753 * elf64-mmix.c (mmix_elf_section_data): Likewise.
754 * elfxx-mips.c (mips_elf_section_data): Likewise.
755 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
756 (ieee_get_section_contents): Likewise.
757 (ieee_new_section_hook): Formatting.
758 (ieee_canonicalize_reloc): Remove commented out code.
759 * mmo.c (mmo_section_data): Define. Use throughout file.
760 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
761
31f7ba04
NC
7622003-01-31 Graydon Hoare <graydon@redhat.com>
763
764 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
765 * Makefile.in: Regenerate.
766 * opncls.c (calc_crc32, get_debug_link_info,
767 seperate_debug_file_exists, find_seperate_debug_file): New
768 internal functions.
769 (bfd_follow_gnu_debuglink): New function. Follow the pointer
770 contained inside a .gnu_debuglink section.
771 * bfd-in2.h: Regenerate.
772
38985a1c
AO
7732003-01-29 Alexandre Oliva <aoliva@redhat.com>
774
775 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
776 entry->abfd when it's NULL.
777
4bb9a95f
AO
7782003-01-27 Alexandre Oliva <aoliva@redhat.com>
779
780 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
781 _bfd_elf_section_offset returning -2 the same way as -1.
782
f4416af6
AO
783 * elfxx-mips.c (mips_elf_multi_got): New function.
784 (struct mips_got_entry): Make symndx and gotidx signed. Moved
785 addend into union along with address and link hash entry.
786 (struct mips_got_info): Added bfd2got and next.
787 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
788 (mips_elf_got_section, mips_elf_create_got_section): Use
789 SEC_EXCLUDE bit to tell whether we really need the got
790 section. Take boolean arguments to disregard an excluded
791 section, or to create it as excluded. Adjust all callers.
792 Use mips_elf_got_section all over.
793 (mips_elf_local_got_index, mips_elf_got_page,
794 mips_elf_got16_entry): Take input bfd as argument, and pass it
795 on to mips_elf_create_local_got_entry.
796 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
797 Take input bfd as argument, and manage entries in the
798 appropriate GOT.
799 (mips_elf_got_offset_from_index): Take input bfd as argument,
800 and use it to adjust the GP offset of the bfd.
801 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
802 unreferenced GOT entries of global symbols to the end.
803 (mips_elf_record_global_got_symbol): Take input bfd as
804 argument. Add entries to the master GOT hash table.
805 (struct mips_elf_bfd2got_hash): New.
806 (struct mips_elf_got_per_bfd_arg): New.
807 (struct mips_elf_set_global_got_offset_arg): New.
808 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
809 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
810 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
811 mips_elf_merge_gots, mips_elf_set_global_got_offset,
812 mips_elf_resolve_final_got_entry,
813 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
814 mips_elf_got_for_ibfd): New functions.
815 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
816 (MIPS_ELF_GOT_MAX_SIZE): New macro.
817 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
818 (mips_elf_got_entry_hash): Take new fields into account. Use
819 mips_elf_hash_bfd_vma.
820 (mips_elf_got_entry_eq): Take new fields into account.
821 (mips_elf_create_got_section): Initialize new fields.
822 (mips_elf_calculate_relocation): Pass input_bfd to functions
823 that now take it. Adjust gp for the input_bfd.
824 (mips_elf_allocate_dynamic_relocation,
825 mips_elf_create_dynamic_relocation,
826 _bfd_mips_elf_create_dynamic_sections): Use...
827 (mips_elf_rel_dyn_section): New function. Borrow code from...
828 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
829 now take it. Create the got section if needed, even if
830 excluded, before recording a global got symbol. Move some
831 code to...
832 (mips_elf_record_local_got_symbol): New fn.
833 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
834 Compute multi-got global entries offsets. Move GOT code to...
835 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
836 if the GOT is too big.
837 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
838 undefweak symbol to zero. Generate dynamic relocations for
839 non-primary GOT entries for global symbols.
840 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
841 case. Generate dynamic relocations for local got entries.
842 Sort dynamic relocations on N64 too, using...
843 (sort_dynamic_relocs_64): New fns.
844 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
845 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
846
52b69c9e
AO
8472003-01-27 Alexandre Oliva <aoliva@redhat.com>
848
849 * bfd.c (struct _bfd): Added id field.
850 * opncls.c (_bfd_id_counter): New static variable.
851 (_bfd_new_bfd): Use it.
852 * bfd-in2.h: Rebuilt.
853
71e5db1c
AM
8542003-01-25 Alan Modra <amodra@bigpond.net.au>
855
856 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
857
b9734f35
JJ
8582003-01-25 Jakub Jelinek <jakub@redhat.com>
859
860 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
861 (elf32_sparc_rev32_howto): New variable.
862 (sparc_reloc_map): Add TLS relocs.
863 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
864 Handle REV32.
865 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
866 New functions.
867 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
868 struct elf32_sparc_link_hash_table):
869 New structures.
870 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
871 elf32_sparc_hash_table): Define.
872 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
873 create_got_section, elf32_sparc_create_dynamic_sections,
874 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
875 functions.
876 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
877 reference counting.
878 (elf32_sparc_gc_sweep_hook): Likewise.
879 (elf32_sparc_adjust_dynamic_symbol): Likewise.
880 (elf32_sparc_size_dynamic_sections): Likewise.
881 (elf32_sparc_relocate_section): Likewise.
882 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
883 New functions.
884 (elf32_sparc_object_p): Allocate backend private object data.
885 (bfd_elf32_bfd_link_hash_table_create,
886 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
887 elf_backend_can_refcount): Define.
888 (elf_backend_create_dynamic_sections): Define to
889 elf32_sparc_create_dynamic_sections.
890 * reloc.c: Add SPARC TLS relocs.
891 * bfd-in2.h, libbfd.h: Rebuilt.
892 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
893 (sparc_reloc_map): Likewise.
894
69fc87f1
MS
8952003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
896
897 * bfd-in2.h: Regenerate.
898 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
899 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
900 (elf_howto_table): Add TLS relocs.
901 (elf_s390_reloc_type_lookup): Likewise.
902 (elf_s390_link_hash_entry): Add tls_type.
903 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
904 New macros.
905 (elf_s390_link_hash_table): Add tls_ldm_got.
906 (link_hash_newfunc): Initialize tls_type.
907 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
908 (elf_s390_copy_indirect_symbol): Copy tls_type information.
909 (elf_s390_check_relocs): Support TLS relocs.
910 (elf_s390_gc_sweep_hook): Likewise.
911 (allocate_dynrelocs): Likewise.
912 (elf_s390_size_dynamic_sections): Likewise.
913 (elf_s390_relocate_section): Likewise.
914 (elf_s390_finish_dynamic_symbol): Likewise.
915 (bfd_elf32_mkobject): Define for TLS.
916 * elf64-s390.c: Same changes as for elf32-s390.c.
917 * libbfd.h: Regenerate.
918 * reloc.c: Add s390 TLS relocations.
919
9aa4e505
NC
9202003-01-24 Charles Lepple clepple.ghz.cc
921
922 * aclocal.m4: Fix name of --enable-install-libbfd switch.
923
5177500f
NC
9242003-01-23 Nick Clifton <nickc@redhat.com>
925
926 * Add sh2e support:
927
928 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
929
930 * archures.c (bfd_mach_sh2e): Added.
931 * bfd-in2.h: Rebuilt.
932 * cpu-sh.c (arch_info_struct): Added SH2e.
933 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
934
f0abc2a1
AM
9352003-01-23 Alan Modra <amodra@bigpond.net.au>
936
937 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
938 dynindx to an int. Rearrange for better packing.
939 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
940 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
941 * elf32-sh64.h: New. Split out from include/elf/sh.h.
942 (struct _sh64_elf_section_data): New struct.
943 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
944 * elf32-sh64-com.c: Include elf32-sh64.h.
945 * elf32-sh64.c: Likewise.
946 (sh64_elf_new_section_hook): New function.
947 (bfd_elf32_new_section_hook): Define.
948 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
949 (sh64_bfd_elf_copy_private_section_data): Likewise.
950 (sh64_elf_final_write_processing): Likewise.
951 * elf32-sparc.c (struct elf32_sparc_section_data): New.
952 (elf32_sparc_new_section_hook): New function.
953 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
954 (sec_do_relax): Define.
955 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
956 (elf32_sparc_relocate_section): Likewise.
957 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
958 * elf64-mmix.c (struct _mmix_elf_section_data): New.
959 (mmix_elf_section_data): Define. Use throughout file.
960 (mmix_elf_new_section_hook): New function.
961 (bfd_elf64_new_section_hook): Define.
962 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
963 (ppc64_elf_section_data): Define. Use throughout.
964 (ppc64_elf_new_section_hook): New function.
965 (bfd_elf64_new_section_hook): Define.
966 * elf64-sparc.c (struct sparc64_elf_section_data): New.
967 (sparc64_elf_new_section_hook): New function.
968 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
969 (sec_do_relax): Define.
970 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
971 (sparc64_elf_relocate_section): Likewise.
972 (bfd_elf64_new_section_hook): Define.
973 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
974 * elfxx-mips.c (struct _mips_elf_section_data): New.
975 (mips_elf_section_data): Define. Use throughout.
976 (_bfd_mips_elf_new_section_hook): New function.
977 (mips_elf_create_got_section): Don't alloc used_by_bfd.
978 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
979 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
980 * Makefile.am: Run "make dep-am".
981 * Makefile.in: Regenerate.
982
cc03ec80
RH
9832003-01-21 Richard Henderson <rth@redhat.com>
984
985 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
986 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
987 (elf64_alpha_adjust_dynamic_symbol): Set them.
988 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
989 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
990 symbol index when relaxing LDM to TPREL.
991 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
992 relocs, even if the target isn't locally defined.
993 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
994 (elf64_alpha_relocate_section): Likewise. Force TP-relative
995 relocs vs symndx 0 to the tp base.
996
da896d3f
NC
9972003-01-21 Fabio Alemagna <falemagn@aros.org>
998
999 * config.bfd: Handle i[3456]86-*-aros*.
1000
7fce784e
AS
10012003-01-21 Andreas Schwab <schwab@suse.de>
1002
1003 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
1004 (struct ppc_elf_link_hash_entry): Define.
1005 (ppc_elf_hash_entry): New function.
1006 (struct ppc_elf_link_hash_table): Define.
1007 (ppc_elf_hash_table): New function.
1008 (ppc_elf_link_hash_newfunc): New function.
1009 (ppc_elf_link_hash_table_create): New function.
1010 (ppc_elf_copy_indirect_symbol): New function.
1011 (allocate_dynrelocs): New function.
1012 (readonly_dynrelocs): New function.
1013 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
1014 relocs and determine DT_TEXTREL.
1015 (ppc_elf_check_relocs): Don't do that here, just count the
1016 dynamic relocs.
1017 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
1018 removed section.
1019 (bfd_elf32_bfd_link_hash_table_create): Define.
1020 (elf_backend_copy_indirect_symbol): Define.
1021
1bbc9cec
RH
10222003-01-21 Richard Henderson <rth@redhat.com>
1023
1024 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
1025 TPREL also get a reloc if shared. Remove SREL support.
1026 (elf64_alpha_emit_dynrel): New.
acc990f2 1027 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
1028 and GOTTPREL relocs to local symbols against the tp base.
1029 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
1030
1031 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
1032 use count before clobbering r_type.
1033 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
1034 ordering would mean dataflow inspection is necessary.
1035
0da35f8b
SS
10362003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
1037
1038 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 1039
571fe01f
NC
10402003-01-20 Fabio Alemagna <falemagn@aros.org>
1041
1042 * elf32-sh.c: Treat elfNN_bed like other macros defined in
1043 elfxx-target.h and #undef it before #define'ing it.
1044 * elf32-i386.c: Likewise.
acc990f2
AM
1045 * elf32-sh64.c: Likewise.
1046 * elf64-alpha.c: Likewise.
1047 * elf64-sh64.c: Likewise.
571fe01f 1048
5236c819
MS
10492003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1050
1051 * bfd-in2.h: Regenerate.
1052 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
1053 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
1054 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
1055 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
1056 R_390_PLTOFF32 and R_390_PLTOFF64.
1057 (elf_s390_reloc_type_lookup): Likewise.
1058 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
1059 of GOTPLT references to a function.
1060 (link_hash_newfunc): Initialize gotplt_refcount.
1061 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
1062 and creation of the got section out of the main switch. Add support
1063 for the gotoff, gotplt and pltoff relocations.
1064 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
1065 and pltoff.
1066 (elf_s390_adjust_gotplt): New function.
1067 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
1068 plt entries.
1069 (allocate_dynrelocs): Add comment.
1070 (elf_s390_relocate_section): Change r_type to unsigned. Add support
1071 for gotoff, gotplt and pltoff relocations.
1072 * elf64-s390.c: Same changes as for elf32-s390.c.
1073 * libbfd.h: Regenerate.
1074 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
1075 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
1076 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
1077 and BFD_RELOC_390_PLTOFF64.
1078
a823975a
JJ
10792003-01-18 Jakub Jelinek <jakub@redhat.com>
1080
1081 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
1082 R_IA64_TPREL64[LM]SB against non-global symbol properly.
1083
b3dfd7fe
JJ
10842003-01-16 Jakub Jelinek <jakub@redhat.com>
1085
1086 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
1087 self_dtpmod_done and self_dtpmod_offset.
1088 (allocate_global_data_got): Only use one got entry for all
1089 dtpmod relocs against local symbols.
1090 (allocate_dynrel_entries): Only need .rela.got entry for
1091 dtpmod against global symbol.
1092 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
1093 Reserve space in .rela.got for the local dtpmod entry.
1094 (set_got_entry): Initialize the common local dtpmod .got entry.
1095 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
1096 and R_IA_64_DTPREL64MSB.
1097
04c9666a
AM
10982003-01-16 Alan Modra <amodra@bigpond.net.au>
1099
1100 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
1101 (R_PPC_*): Rename all occurrences to R_PPC64_*.
1102 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
1103 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
1104 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
1105 relative relocs, not with absolute ones.
1106 * Makefile.am: Run "make dep-am".
1107 * Makefile.in: Regenerate.
1108 * po/SRC-POTFILES.in: Regenerate.
1109
c87f1ff7
AS
11102003-01-15 Andreas Schwab <schwab@suse.de>
1111
1112 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
1113 relocation against a non-allocated readonly section.
1114
86bbe32f
AM
11152003-01-10 Alan Modra <amodra@bigpond.net.au>
1116
1117 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
1118 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
1119
32d95f29
KD
11202002-01-08 Klee Dienes <kdienes@apple.com>
1121
1122 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
1123 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
1124 * Makefile.in: Regenerate.
acc990f2 1125
ab7d0aa0
AO
11262003-01-08 Alexandre Oliva <aoliva@redhat.com>
1127
1128 * elfn32-mips.c (prev_reloc_section): New.
1129 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
1130 (SET_RELOC_ADDEND): Parenthesize macro argument.
1131
95d0f04a
DA
11322003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
1133
1134 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
1135 adjust addil instructions if the symbol has no section.
1136
5c9e189c
DD
11372003-01-07 DJ Delorie <dj@redhat.com>
1138
1139 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
1140 partial_inplace.
1141
3e829b4a
AS
11422003-01-07 Andreas Schwab <schwab@suse.de>
1143
1144 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
1145 PC relative relocations.
1146 (elf_m68k_discard_copies): Set it here instead.
1147
a75473eb
SC
11482002-01-02 Ben Elliston <bje@redhat.com>
1149 Jeff Johnston <jjohnstn@redhat.com>
1150
1151 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
1152 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
1153 (BFD32_BACKENDS): Add elf32-iq2000.lo.
1154 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
1155 (cpu-iq2000.lo): New target.
1156 * Makefile.in: Regenerate.
1157 * config.bfd: Handle iq2000-*-elf.
1158 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
1159 (bfd_archures_list): Add bfd_iq2000_arch.
1160 * configure.in: Handle bfd_elf32_iq2000_vec.
1161 * configure: Regenerate.
acc990f2 1162 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
1163 and BFD_RELOC_IQ2000_UHI16.
1164 * targets.c (bfd_elf32_iq2000_vec): Declare.
1165 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
1166 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
1167 * cpu-iq2000.c: New file.
1168 * elf32-iq2000.c: Likewise.
1169 * libbfd.h: Regenerate.
1170 * bfd-in2.h: Likewise.
1171
64543e1a
RS
11722003-01-02 Richard Sandiford <rsandifo@redhat.com>
1173
1174 * elfxx-mips.c: Include libiberty.h.
1175 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
1176 (mips_set_isa_flags): New function, split out from...
1177 (_bfd_mips_elf_final_write_processing): ...here. Only call
1178 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
1179 (mips_mach_extensions): New array.
1180 (mips_32bit_flags_p): New function.
1181 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
1182 Use mips_32bit_flags_p to check if one binary is 32-bit and the
1183 other is 64-bit. When adopting IBFD's architecture, adopt the
1184 bfd_mach as well as the flags.
1185
4852a44e
NC
11862003-01-02 Nick Kelsey <nickk@ubicom.com>
1187
1188 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
1189 fix internal errors, fix bad code generation, fix incorrect stabs
1190 information, and improve ability to eliminate redundant page
1191 instructions. Added code to ip2k_final_link_relocate to self-verify
1192 the linker relaxation. Fix formatting problems.
1193
af7ee8bf
CD
11942002-12-30 Chris Demetriou <cgd@broadcom.com>
1195
1196 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
1197 * archures.c (bfd_mach_mipsisa32r2): New define.
1198 * bfd-in2.h: Regenerate.
1199 * cpu-mips.c (I_mipsisa32r2): New enum value.
1200 (arch_info_struct): Add entry for I_mipsisa32r2.
1201 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
1202 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
1203 (_bfd_mips_elf_final_write_processing): Add
1204 bfd_mach_mipsisa32r2 case.
1205 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
1206 binaries marked as using MIPS32 Release 2.
1207
2469cfa2
NC
12082002-12-30 Dmitry Diky <diwil@mail.ru>
1209
1210 * Makefile.am: Add msp430 target.
1211 * configure.in: Likewise.
1212 * Makefile.in: Regenerate.
1213 * configure: Regenerate.
1214 * archures.c: Add msp430 architecture vector.
1215 * config.bfd: Likewise.
1216 * reloc.c: Add msp430 relocs.
1217 * targets.c: Add msp320 target.
1218 * cpu-msp430.c: New file: msp430 cpu detection.
1219 * elf32-msp430.c: New file: msp430 reloc processing.
1220 * bfd-in2.h: Regenerate.
1221 * libbfd.h: Regenerate.
1222
eecdbe52
JJ
12232002-12-28 Jakub Jelinek <jakub@redhat.com>
1224
1225 * elf.c (elf_sort_sections): Don't reorder .tbss.
1226 (assign_file_positions_for_segments): Only adjust off/voff
1227 for increased alignment in PT_LOAD or PT_NOTE segment,
1228 but adjust p_filesz for .tbss too. in PT_LOAD consider
1229 .tbss to have zero memory size.
1230 (copy_private_bfd_data) [SECTION_SIZE]: Define.
1231 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
1232 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
1233 into PT_TLS segment. Never put SHF_TLS sections in
1234 segments other than PT_TLS or PT_LOAD.
1235
1236 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
1237 sh_entsize.
1238
213e90f4
DD
12392002-12-23 DJ Delorie <dj@redhat.com>
1240
1241 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
1242
75828352
AM
12432002-12-23 Alan Modra <amodra@bigpond.net.au>
1244
1245 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
1246
312b768e
NC
12472002-12-23 Nick Clifton <nickc@redhat.com>
1248
1249 * archures.c (bfd_arch_get_compatible): Add third parameter
1250 'accept_unknowns'. Only accept unknown format BFDs if
1251 accept_unknowns is true, or if the format is "binary".
acc990f2 1252 * bfd-in2.h: Regenerate.
312b768e 1253
63222ec9
NC
12542002-12-21 Nick Clifton <nickc@redhat.com>
1255
1256 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
1257 that subtracted 8 from pc relative relocations.
1258
19852a2a
KH
12592002-12-20 Kazu Hirata <kazu@cs.umass.edu>
1260
1261 * coff-h8300.c: Fix comment typos.
1262 * coffcode.h: Likewise.
1263 * cpu-cris.c: Likewise.
1264 * elf32-vax.c: Likewise.
1265 * genlink.h: Likewise.
1266 * linker.c: Likewise.
1267 * som.c: Likewise.
1268 * tekhex.c: Likewise.
1269 * vms-misc.c: Likewise.
1270
5fd63999
DD
12712002-12-20 DJ Delorie <dj@redhat.com>
1272
1273 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
1274 * libbfd.h: Regenerate.
1275 * bfd-in2.h: Regenerate.
1276 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
1277 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 1278
4ee79850
KH
12792002-12-19 Kazu Hirata <kazu@cs.umass.edu>
1280
1281 * doc/bfdint.texi: Fix typos.
1282
66e25bab
AM
12832002-12-20 Paul Eggert <eggert@twinsun.com>
1284
1285 Port to POSIX 1003.1-2001.
1286 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
1287 * configure.in (build-warnings): Likewise.
1288 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
1289 * aclocal.m4: Regenerate.
1290 * config.in: Regenerate.
1291 * configure: Regenerate.
1292
7dc77aaa
AM
12932002-12-19 Alan Modra <amodra@bigpond.net.au>
1294
0171ee92
AM
1295 * coff-h8300.c: Include libiberty.h.
1296 (h8300_reloc16_extra_cases): Check the hash table creator before
1297 referencing h8300 specific fields. Stash the hash table pointer
1298 in a local var. Comment typo fixes.
1299 (h8300_bfd_link_add_symbols): Likewise.
1300
7dc77aaa
AM
1301 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
1302 dst_mask comments.
1303 * bfd-in2.h: Regenerate.
1304
47388f4c
AM
13052002-12-18 Alan Modra <amodra@bigpond.net.au>
1306
1307 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
1308 code a little. Comment on dynamic relocs against section symbols.
1309
1b3e3744
AM
13102002-12-17 Roger Sayle <roger@eyesopen.com>
1311
1312 * configure.host (ia64-*-hpux*): Support 64 bit targets using
1313 the HP compiler's "long long".
1314
46f2b541
DD
13152002-12-16 Andrew MacLeod <amacleod@redhat.com>
1316
1317 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
1318 and R_XSTORMY16_HI16) howto entries.
1319 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 1320 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
1321 determine the start of the second reloc table.
1322
af738ea7
NC
13232002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
1324
1325 * ecofflink.c: Fix the reading of the debugging information
1326 of Tru64/Alpha binaries that are produced by recent Compaq
1327 compilers.
1328 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
1329 table.
1330 (lookup_line): Because of the strange information sometimes
1331 generated by Compaq's recent compilers, change how the FDR
1332 table is searched so that PDRs (procedure descriptors) are
1333 correctly found. Note that this change is really more of a hack;
1334 however, I have included extensive documentation as to why
1335 this is the best solution short of an extensive rewrite or
1336 another hack.
1337 (fdrtab_lookup): Add comments to explain the algorithm.
1338
5354b572
AO
13392002-12-12 Alexandre Oliva <aoliva@redhat.com>
1340
1341 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
1342 initializers to match struct declaration.
1343
ab3acfbe
AM
13442002-12-12 Alan Modra <amodra@bigpond.net.au>
1345
1346 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
1347 * elf.c (get_program_header_size): Likewise.
1348 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
1349 (m32r_elf_generic_reloc): Likewise.
1350 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
1351 * elflink.h (elf_bfd_discard_info): Likewise.
1352
6348e046
AM
13532002-12-12 Alan Modra <amodra@bigpond.net.au>
1354
1355 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
1356 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
1357 DT_RELSZ adjustment, not output section. Avoid writing tags when
1358 unchanged. Don't assume linker script is sane, adjust DT_REL too.
1359 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
1360 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
1361 DT_RELASZ adjustment, not output section. Avoid writing tags when
1362 unchanged. Adjust DT_RELA.
1363 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
1364 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
1365
2e7a68a8
AO
13662002-12-12 Alexandre Oliva <aoliva@redhat.com>
1367
1368 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
1369 addend by 4.
1370
b15e6682
AO
13712002-12-12 Alexandre Oliva <aoliva@redhat.com>
1372
1373 * elfxx-mips.c (struct mips_got_entry): New.
1374 (struct mips_got_info): Added got_entries field.
1375 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
1376 (mips_elf_local_got_index, mips_elf_got_page,
1377 mips_elf_got16_entry): Re-implement in terms of new...
1378 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
1379 Change return type.
1380 (mips_elf_highest): Warning clean-up.
1381 (mips_elf_create_got_section): Initialize got_entries.
1382 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
1383 local got size.
1384 (_bfd_mips_elf_size_dynamic_sections): Do not account for
1385 GOT_PAGE entries, since we now reuse GOT16 entries.
1386
e6af3a53
NC
13872002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
1388
1389 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
1390 read-only section that lies after .text and before .data to be
1391 written into the output file and included in a_text.
1392 (translate_to_native_sym_flags): If an otherwise unrepresentable
1393 section was merged with .text, convert its symbols to N_TEXT
1394 symbols.
1395 * libaout.h (aout_section_merge_with_text_p): New macro.
1396
cf3d882d
AM
13972002-12-08 Alan Modra <amodra@bigpond.net.au>
1398
1399 * bfd-in.h: Comment typo fix. Formatting.
1400 * bfd-in2.h: Regenerate.
1401 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
1402 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
1403 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
1404
2f9bd3f6
RH
14052002-12-05 Richard Henderson <rth@redhat.com>
1406
1407 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
1408 Only send PCREL21B though the plt. Fix installed reloc type.
1409 (elfNN_ia64_relocate_section): Give error for dynamic reloc
1410 against PCREL22 or PCREL64I; clean up error messages for
1411 branch relocs.
1412
d0112f73
KB
14132002-12-04 Kevin Buettner <kevinb@redhat.com>
1414
1415 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
1416 New functions.
1417 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1418
c10d9d8f
JW
14192002-12-04 David Mosberger <davidm@hpl.hp.com>
1420
1421 * cpu-ia64-opc.c: Add operand constant "ar.csd".
1422
d48770d4
L
14232002-12-04 H.J. Lu <hjl@gnu.org>
1424
1425 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
1426 BFD address when constructing local name.
1427
b6152c34
AS
14282002-12-04 Andreas Schwab <schwab@suse.de>
1429
1430 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
1431 member.
1432 (elf_m68k_link_hash_table_create): Initialize it.
1433 (elf_m68k_check_relocs): Handle symbols that are forced to be
1434 local due to visibility changes.
1435 (elf_m68k_adjust_dynamic_symbol): Likewise.
1436 (elf_m68k_size_dynamic_sections): Likewise.
1437 (elf_m68k_discard_copies): Likewise.
1438 (elf_m68k_relocate_section): Likewise.
1439
73374ef1
AM
14402002-12-04 Alan Modra <amodra@bigpond.net.au>
1441
1442 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
1443
c5c1944d
AM
14442002-12-04 Alan Modra <amodra@bigpond.net.au>
1445
1446 * srec.c (srec_write_symbols): Restore '$' prefix to address
1447 accidentally removed in 2002-04-04 change.
1448 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
1449
e1a9cb8e
NC
14502002-12-03 Nick Clifton <nickc@redhat.com>
1451
1452 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
1453 (apuinfo_list_add): New function: Add a value to the list.
1454 (apuinfo_list_length): New function: Return the number of
1455 values on the list.
1456 (apuinfo_list_element): New function: Return a value on the
1457 list.
1458 (apuinfo_list_finish): New function: Free the resources used
1459 by the list.
1460 (ppc_elf_begin_write_processing): New function. Scan the
1461 input bfds for apuinfo sections.
1462 (ppc_elf_write_section): New function: Delay the creation of
1463 the contents of an apuinfo section in an output bfd.
1464 (ppc_elf_final_write_processing): New function. Create the
1465 contents of an apuinfo section in an output bfd.
1466 (elf_backend_begin_write_processing): Define.
1467 (elf_backend_final_write_processing): Define.
1468 (elf_backend_write_section): Define.
e1a9cb8e 1469
a823923b
RH
14702002-12-03 Richard Henderson <rth@redhat.com>
1471
1472 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
1473
30491647
SC
14742002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1475
1476 Fix PR savannah/1417:
1477 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
1478 branch if it goes to the start of the deleted region.
1479
bc7c6a90
SC
14802002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1481
1482 * bfd-in2.h (bfd_mach_m6812): Rebuild.
1483 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
1484 bfd_mach_m6812s): Declare.
1485
1486 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
1487 (_bfd_m68hc12_elf_set_private_flags): Call it.
1488 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
1489 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
1490 report microcontroller incompatibilities (HC12 vs HCS12).
1491 (elf_backend_object_p): Update.
1492
b34976b6
AM
14932002-11-30 Alan Modra <amodra@bigpond.net.au>
1494
1495 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
1496 (enum bfd_boolean, boolean): Delete.
1497 (bfd_boolean): Typedef to an int.
1498 (FALSE, TRUE): Define.
1499 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
1500 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
1501 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
1502 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
1503 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
1504 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
1505 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
1506 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
1507 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
1508 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
1509 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
1510 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
1511 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
1512 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
1513 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
1514 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
1515 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
1516 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
1517 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
1518 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
1519 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
1520 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
1521 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
1522 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
1523 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
1524 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1525 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1526 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1527 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
1528 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1529 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1530 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1531 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
1532 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
1533 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1534 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
1535 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
1536 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
1537 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
1538 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
1539 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
1540 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
1541 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
1542 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
1543 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
1544 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
1545 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
1546 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 1547 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
1548 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
1549 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
1550 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
1551 of bfd_boolean vars with TRUE/FALSE. Formatting.
1552 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
1553
947216bf
AM
15542002-11-28 Alan Modra <amodra@bigpond.net.au>
1555
1556 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
1557 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
1558 with Elf_Internal_Rela.
1559 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
1560 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
1561 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
1562 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1563 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1564 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1565 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
1566 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1567 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1568 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
1569 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
1570 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
1571 throughout instead.
1572 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
1573 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
1574 Remove INLINE keyword.
1575 (elf_swap_reloc_in): Likewise. Also clear r_addend.
1576 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
1577 as a bfd_byte *.
1578 (elf_write_relocs): Consolidate REL and RELA code.
1579 (elf_slurp_reloc_table_from_section): Simplify REL code.
1580 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
1581 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
1582 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
1583 RELA code.
1584 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
1585 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
1586 (elf_link_output_relocs): Likewise.
1587 (elf_reloc_link_order): Likewise.
1588 (elf_finish_pointer_linker_section): Likewise.
1589 (struct elf_link_sort_rela): Remove union.
1590 (elf_link_sort_cmp1): Update to suit.
1591 (elf_link_sort_cmp2): Here too.
1592 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
1593 over-allocation for int_rels_per_ext_rel != 1 case.
1594 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
1595 * elf32-i386.c: Likewise.
1596 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
1597 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
1598 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
1599 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
1600 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1601 elf64-sparc.c, elf64-x86-64.c: Likewise.
1602 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
1603 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
1604 bfd_elf32_swap_reloc_in.
1605
1606 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
1607 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
1608 (mips_elf64_swap_reloc_in): Zero r_addend.
1609 (mips_elf64_be_swap_reloc_in): Likewise.
1610 (mips_elf64_slurp_one_reloc_table): Simplify.
1611
1612 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
1613 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1614 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1615
1448fa32
KK
16162002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1617
1618 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 1619 unresolved debugging relocs in dynamic applications.
1448fa32
KK
1620 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1621
73722af0
AM
16222002-11-26 Alan Modra <amodra@bigpond.net.au>
1623
1624 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
1625 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
1626 on a relocatable link. Comment typos.
1627 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
1628 in the order they are declared. Clear elf_hash_value too.
1629 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
1630 eh_info and tls_segment.
1631 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
1632 sorted when discarding relocs by turning them into R_*_NONE.
1633
1634 * libbfd.c (warn_deprecated): Comment spelling.
1635 * po/SRC-POTFILES.in: Regenerate.
1636
7c25b72c
RH
16372002-11-21 Richard Henderson <rth@redhat.com>
1638
1639 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
1640 arch's st_other bits when merging visibilities.
1641 (elf_link_output_extsym): Tidy clearing of visibility field.
1642
dc12c51f
AM
16432002-11-21 Alan Modra <amodra@bigpond.net.au>
1644
1645 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
1646 (SWAP_OUT_RELOC_OFFSET): Define.
1647
963f13ec
AO
16482002-11-20 Alexandre Oliva <aoliva@redhat.com>
1649
1650 * elf.c (_bfd_elf_link_hash_table_init): Make sure
1651 can_refcount is properly extended to the type of
1652 init_refcount.
1653
ee6423ed
AO
16542002-11-19 Alexandre Oliva <aoliva@redhat.com>
1655
4ffba85c
AO
1656 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
1657 (_bfd_mips_elf_relocate_section): Use it.
1658
ee6423ed
AO
1659 * elfxx-mips.c (MNAME): New macro.
1660 (_bfd_mips_elf_check_relocs): Use it.
1661 (_bfd_mips_elf_discard_info): Likewise.
1662 (_bfd_mips_elf_final_link): Likewise.
1663
cdcf6e38
AM
16642002-11-19 Alan Modra <amodra@bigpond.net.au>
1665
1666 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
1667 rel_hdr.sh_size too.
1668
93509525
KD
16692002-11-18 Klee Dienes <kdienes@apple.com>
1670
1671 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
1672 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
1673 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
1674 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
1675 Add dependencies for bfdwin.c, bfdio.c.
1676 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
1677 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
1678 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
1679 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
1680 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
1681 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
1682 bfd_get_size (moved from libbfd.c and bfd.c).
1683 * bfdwin.c New file. Contains _bfd_window_internal,
1684 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
1685 libbfd.c and bfd.c).
1686 * po/SRC-POTFILES.in: Regenerate.
1687 * po/bfd.pot: Regenerate.
1688 * libbfd.h: Regenerate.
1689 * bfd-in2.h: Regenerate.
1690 * aclocal.m4: Regenerate.
1691 * Makefile.in: Regenerate.
1692 * configure: Regenerate.
1693
3ae41454
AM
16942002-11-18 Klee Dienes <kdienes@apple.com>
1695
1696 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
1697
e514ac71
NC
16982002-11-15 Kazu Hirata <kazu@cs.umass.edu>
1699
1700 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
1701 jsr after a short jump.
1702 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1703
eddc4f81
KD
17042002-11-15 Klee Dienes <kdienes@apple.com>
1705
1706 * pef.c (bfd_pef_convert_architecture): Move declaration of
1707 ARCH_POWERPC and ARCH_M68K to the start of the function.
1708
51908eee
SS
17092002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
1710
1711 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
1712
3416d2e7
HPN
17132002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
1714
1715 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
1716 For bpo_gregs_section->contents, allocate _raw_size, not
1717 _cooked_size.
1718
b1c58715
AM
17192002-11-13 Klee Dienes <kdienes@apple.com>
1720
1721 * config.bfd: Add entries for powerpc-*-darwin and cousins.
1722
077ca68b
L
17232002-11-13 H.J. Lu <hjl@gnu.org>
1724
1725 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
1726
e84d6fca
AM
17272002-11-13 Klee Dienes <kdienes@apple.com>
1728 Alan Modra <amodra@bigpond.net.au>
1729
1730 * bfd.c (struct bfd_preserve): New.
1731 (bfd_preserve_save): New function.
1732 (bfd_preserve_restore): Ditto.
1733 (bfd_preserve_finish): Ditto.
1734 * bfd-in2.h: Regenerate.
1735 * mach-o.c: Formatting.
1736 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
1737 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
1738 (bfd_mach_o_core_p): Ditto.
1739 (bfd_mach_o_scan): Pass in mdata.
1740 * mach-o.h (bfd_mach_o_scan): Update prototype.
1741 * pef.c: Formatting.
1742 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
1743 (bfd_pef_xlib_object_p): Ditto.
1744 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
1745 * pef.h (bfd_pef_scan): Update prototype.
1746 * xsym.c: Formatting, K&R fixes.
1747 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
1748 (bfd_sym_scan): New function split out from bfd_sym_object_p.
1749 * xsym.h (bfd_sym_scan): Declare.
1750 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 1751 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
1752 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
1753
cd24c222
NC
17542002-11-12 Nick Clifton <nickc@redhat.com>
1755
1756 * po/da.po: Updated Danish translation.
1757
99eb2ac8
AM
17582002-11-12 Alan Modra <amodra@bigpond.net.au>
1759
d6fe2dc1
AM
1760 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
1761 relocatable link too.
1762 (elf_link_input_bfd): When emitting relocs, adjust offsets for
1763 eh_frame and stab sections. Zap deleted relocs.
1764 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
1765 (elf_bfd_discard_info): Run for relocatable link too.
1766 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
1767 Handle ld -r case.
1768 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
1769 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
1770
126495ed
AM
1771 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
1772 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
1773 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
1774 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
1775 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
1776 (struct elf_link_hash_table): Add eh_info.
1777 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
1778 (_bfd_elf_discard_section_eh_frame): Update prototype.
1779 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
1780 (_bfd_elf_write_section_eh_frame): Likewise.
1781 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
1782 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
1783 param. Get "hdr_info" from link hash table.
1784 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
1785 header section from link hash table. Save header section to elf_tdata.
1786 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
1787 header section from link hash table. Don't alloc hdr_info. Clear
1788 hdr_sec instead of setting "strip".
1789 (_bfd_elf_eh_frame_section_offset): Formatting.
1790 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
1791 Get header section from link hash table.
1792 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
1793 Get header section from link hash table.
1794 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
1795 (get_program_header_size): Likewise.
1796 (_bfd_elf_section_offset): Formatting.
1797 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
1798 section pointer in link hash table.
1799 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
1800 and _bfd_elf_write_section_eh_frame calls. Update comment about
1801 eh_frame entries.
1802 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
1803 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
1804
1805 * po/SRC-POTFILES.in: Regenerate.
1806
99eb2ac8
AM
1807 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
1808 relocs for discarded FDEs. Remove dead code.
1809 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
1810 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
1811 Tidy conditions under which stabs are edited. Formatting.
1812 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1813 from discarded relocs.
1814 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
1815 section adjustments after testing magic values.
1816
7c319a27
AM
18172002-11-12 Thomas Moestl <tmm@FreeBSD.org>
1818
1819 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
1820 references to large plt symbols.
1821
a95a4550
AM
18222002-11-12 Klee Dienes <kdienes@apple.com>
1823
1824 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
1825 looking for an unused section name.
1826
bc7eab72
KH
18272002-11-11 Kazu Hirata <kazu@cs.umass.edu>
1828
1829 * coff-h8300.c: Fix formatting.
1830 * elf32-h8300.c: Likewise.
1831 * reloc16.c: Likewise.
1832
52585bb8
AM
18332002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
1834
1835 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
1836 section when dynamic section unused; _bfd_strip_section_from_output
1837 instead.
1838
9f632188
AM
18392002-11-08 Alan Modra <amodra@bigpond.net.au>
1840
207b304b
AM
1841 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
1842 and sym_vec.
3b029f65 1843
9f632188
AM
1844 * dwarf2.c: Revert last change.
1845
ec4530b5
NC
18462002-11-07 Michal Ludvig <mludvig@suse.cz>
1847
1848 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
1849 _bfd_dwarf2_find_nearest_line): Use
1850 bfd_simple_get_relocated_section_contents() instead of
1851 bfd_get_section_contents().
1852 * reloc.c (bfd_perform_relocation): Add sanity check.
1853 * simple.c (simple_get_relocated_section_contents): If the section
1854 does not have any relocs associated with it, just return the
1855 unadjusted contents.
1856
205cfeb0
HPN
18572002-11-07 Hans-Peter Nilsson <hp@axis.com>
1858
1859 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
1860 case R_CRIS_32_GOT>: Correct test for filling in constant .got
1861 contents, enabling for a non-DSO, for symbols defined in the
1862 program with --export-dynamic.
1863
87e226ce
AM
18642002-11-07 Alan Modra <amodra@bigpond.net.au>
1865
1866 * elf64-ppc.c: Comment typo fixes.
1867 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
1868
235c4794
NC
18692002-11-07 Nick Clifton <nickc@redhat.com>
1870
1871 * po/da.po: Updated Danish translation.
1872
49179469
AO
18732002-11-06 Alexandre Oliva <aoliva@redhat.com>
1874
1875 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
1876 exactly three internal relocs per external reloc. Set reloc_count
1877 to the external reloc count.
1878
246178f2
NC
18792002-11-06 Klee Dienes <kdienes@apple.com>
1880
3ae41454 1881 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
1882 Fix comment formatting.
1883
3af9a47b
NC
18842002-11-06 Klee Dienes <kdienes@apple.com>
1885
3ae41454 1886 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
1887 xsym.lo.
1888 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
1889 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
1890 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
1891 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
1892 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
1893 sym.
3ae41454 1894 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
1895 * Makefile.in: Regenerate.
1896 * doc/Makefile.in: Regenerate.
3ae41454 1897 * bfd-in2.h: Regenerate.
3af9a47b
NC
1898 * xsym.c: New file. Contains support for the Apple/Metrowerks
1899 xSYM debugging format.
1900 * xsym.h: New file.
1901 * pef.c: New file. Contains support for the Apple Code Fragment
1902 Manager Preferred Executable Format
1903 * pef.h: New file.
1904 * pef-traceback.h: New file. Contains support for parsing PowerPC
1905 traceback tables as used by PEF executables (and perhaps other
1906 systems as well).
3ae41454 1907 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
1908 format.
1909 * mach-o.h: New file.
1910 * mach-o-target.c: New file. Declares the mach-o targets
1911 themselves. Included three times by mach-o.c; each time with a
1912 different set of macros set.
3ae41454 1913
b6821651 19142002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
1915
1916 * Makefile.am: Remove entries for elf32-qnx.[ch].
1917 * Makefile.in: Regenerate.
1918 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
1919 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
1920 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
1921 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
1922 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
1923 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
1924 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
1925 * configure: Regenerate.
1926 * elf32-qnx.c: Remove.
1927 * elf32-qnx.h: Remove.
1928 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
1929 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
1930 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
1931 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
1932 * elf32-i386.c: Remove QNX extended bfd support.
1933 * elf32-ppc.c: Remove QNX extended bfd support.
1934 * elf32-sh.c: Remove QNX extended bfd support.
1935 * elfarm-nabi.c: Remove QNX extended bfd support.
1936 * targets.c: Remove qnx vectors.
1937 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
1938 (elf_backend_is_contained_by_filepos): Remove.
1939 (elf_backend_copy_private_bfd_data_p): Remove.
1940 * po/SRC-POTFILES.in: Regenerate.
1941
b6821651
AM
19422002-11-06 David O'Brien <obrien@FreeBSD.org>
1943 Alan Modra <amodra@bigpond.net.au>
1944
1945 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
1946 dynamic relocs against section symbols for the output section vma.
1947
19482002-11-05 Alan Modra <amodra@bigpond.net.au>
1949
1950 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
1951 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
1952
08f74004
AM
19532002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1954 Alan Modra <amodra@bigpond.net.au>
1955
1956 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
1957 vectors in target_selvecs.
1958 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
1959 in target_selvecs.
1960 (sh-*-netbsdelf*): Likewise.
1961 * configure.in (assocvecs): New variable. Handle assocvecs like
1962 selvecs.
1963 * configure: Regenerate.
1964 * format.c (bfd_check_format_matches): Store bfd_target pointers
1965 in matching_vector instead of target names. Select first target
1966 from bfd_associated_vector that matches a list of ambiguous targets.
1967 * targets.c (_bfd_associated_vector): New array.
1968 (bfd_associated_vector): New variable.
1969 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
1970 * libbfd-in.h (bfd_associated_vector): Declare.
1971 * libbfd.h: Regenerate.
1972
89117aab
AM
19732002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
1974
1975 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
1976 non-NULL before dereferencing.
1977
5e9aae3e
KK
19782002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1979
1980 * vms.c (vms_object_p): Restore the start address when returning
1981 NULL.
1982
c97e73dd
AM
19832002-11-04 Alan Modra <amodra@bigpond.net.au>
1984 Hans-Peter Nilsson <hp@axis.com>
1985
1986 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
1987 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
1988 Set up a larger symshndxbuf, and write it out. Free it on
1989 exit rather than freeing symbuf twice. Correct section index
1990 on output section symbol loop.
1991 (elf_link_output_sym): Accumulate symbol extension section
1992 indices, reallocating symshndxbuf rather than writing it out.
1993 (elf_link_flush_output_syms): Don't flush symshndxbuf.
1994 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
1995 Use bfd_zalloc to clear i_shdrp[0] too.
1996
3463048e
SC
19972002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
1998
1999 * elf32-sh64-com.c (sh64_address_in_cranges): Use
2000 _raw_size of cranges section if _cooked_size not yet set.
2001
63a23799
HPN
20022002-11-03 Hans-Peter Nilsson <hp@axis.com>
2003
2004 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
2005 for bfd_elf32_swap_symbol_out.
2006
e68cc12e
DB
20072002-10-31 David O'Brien <obrien@FreeBSD.org>
2008
2009 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
2010 signed and unsigned in comparison.
2011
db4b6d01
DJ
20122002-10-30 Daniel Jacobowitz <drow@mvista.com>
2013
2014 * coffcode.h: Remove extraneous '\'.
2015
840f0243
L
20162002-10-28 H.J. Lu <hjl@gnu.org>
2017
2018 * Makefile.am (targets.lo): Depend on Makefile instead of
2019 config.status.
2020 (archures.lo): Likewise.
2021 * Makefile.in: Regenerated.
2022
05a7e2db
JT
20232002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
2024
2025 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
2026 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
2027 targ_selvecs.
2028
a0087177
JW
20292002-10-25 Jim Wilson <wilson@redhat.com>
2030
2031 * elf64-sh64.c (sh_elf64_relocate_section): Call
2032 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
2033 of SHF_MERGE section.
2034
8718ac9c
HPN
20352002-10-25 Hans-Peter Nilsson <hp@axis.com>
2036
2037 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
2038
d45913a0
DA
20392002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
2040
2041 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
2042 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
2043 unsigned int.
2044 (NAME(aout,final_link)): Cast enum used in assignment.
2045 (aout_link_write_symbols): Cast enums in comparisons, int values to
2046 boolean, enums in assignments to int.
2047 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
2048 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
2049 with unsigned ints.
2050 (aout_link_reloc_link_order): Cast enum to int in assignment.
2051 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
2052 calls to char *.
2053 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
2054 assignment.
2055 * bfd-in2.h (bfd_set_section_vma): Likewise.
2056 * bfd.c (bfd_record_phdr): Cast enums in assignments.
2057 * binary.c (bfd_alloc): Cast enum to long.
2058 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
2059 * dwarf2.c (read_abbrevs): Add casts to enum types.
2060 (read_attribute_value): Likewise.
2061 (arange_add): Cast result of bfd_zalloc call.
2062 (comp_unit_contains_address): Return true and false.
2063 (comp_unit_find_nearest_line): Cast return to boolean.
2064 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
2065 * gen-aout.c: define macro '_' if not defined.
2066 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
2067 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
2068 (bfd_write_bigendian_4byte_int): Cast return to boolean.
2069 (bfd_seek): Cast bfd_realloc to bfd_byte *.
2070 (bfd_generic_is_local_label_name): Cast return to boolean.
2071 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
2072 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
2073 struct bfd_hash_entry *.
2074 (_bfd_generic_link_hash_newfunc): likewise.
2075 (_bfd_generic_final_link): Cast enum to unsigned int.
2076 * merge.c (sec_merge_emit): Cast return to boolean.
2077 (merge_strings): Add casts to const unsigned char *.
2078 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
2079 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
2080 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
2081 struct bfd_hash_entry *.
2082 (bfd_set_section_content): Add cast to PTR in comparison.
2083 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
2084 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
2085 simple_dummy_unattached_reloc,
2086 bfd_simple_get_relocated_section_contents): Add K&R declarations and
2087 function definitions.
2088 * srec.c (S3Forced): Initialize to false.
2089 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
2090 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
2091 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
2092 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
2093 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
2094 comparisons.
2095
475c2a7e
JJ
20962002-10-23 Jakub Jelinek <jakub@redhat.com>
2097
2098 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
2099 relocs into shared lib non-allocated reloc sections.
2100
e82ce529
AM
21012002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2102
2103 * dwarf2.c (add_line_info): Ensure that the line_info_table is
2104 sorted even when given an out-of-order line sequence.
2105 (lookup_address_in_line_info_table): When an exact VMA match is
2106 not found, return line information with the closest VMA.
2107
f2482cb2
NC
21082002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
2109
2110 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
2111 HPUX 11.00 patch PHSS_26559.
2112
c1fd6598
AO
21132002-10-22 Alexandre Oliva <aoliva@redhat.com>
2114
2115 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
2116 the options section into a separate section unless IRIX 6
2117 compatibility is enabled.
2118
033fd5f9
AO
21192002-10-22 Alexandre Oliva <aoliva@redhat.com>
2120
2121 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
2122 into arrays.
2123 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
2124 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
2125 into account.
2126 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
2127 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
2128
ef485c01
AM
21292002-10-21 Graeme Peterson <gp@qnx.com>
2130
2131 * targets.c (_bfd_target_vector): Add missing qnx vectors.
2132
b50afec9
AM
21332002-10-21 Alan Modra <amodra@bigpond.net.au>
2134
2135 * targets.c (bfd_target_list): Don't return the default target twice.
2136
5fe39cae
AM
21372002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
2138
2139 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
2140 perror with bfd_perror.
2141
5d603aa9
L
21422002-10-19 H.J. Lu <hjl@gnu.org>
2143
2144 * elflink.h (elf_link_add_object_symbols): Correctly handle
2145 DT_RPATH and DT_RUNPATH.
2146
e377ab71
MK
21472002-10-19 Mark Kettenis <kettenis@gnu.org>
2148
2149 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
2150
0d09fec6
DC
21512002-10-17 Denis Chertykov <denisc@overta.ru>
2152
2153 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
2154 for ip2k port.
2155
acf8aed4
AM
21562002-10-17 Alan Modra <amodra@bigpond.net.au>
2157
2158 * elfxx-target.h (USE_REL): Don't define as 1.
2159 * elf32-arm.h (USE_REL): Provide a default define of 0.
2160 Use #if rather than #ifdef when testing USE_REL.
2161 * elf32-m32r.c: Likewise.
2162
2163 * elf32-arc.c (USE_REL): Define as 1.
2164 * elf32-d10v.c (USE_REL): Likewise.
2165 * elf32-m32r.c (USE_REL): Likewise.
2166 * elf32-m68hc11.c (USE_REL): Likewise.
2167 * elf32-m68hc12.c (USE_REL): Likewise.
2168 * elf32-or32.c (USE_REL): Likewise.
2169 * elfarm-nabi.c (USE_REL): Likewise.
2170
f52d1d64
JJ
21712002-10-16 Jakub Jelinek <jakub@redhat.com>
2172
2173 * config.bfd (s390-*-linux*): Add targ64_selvecs.
2174 (s390x-*-linux*): Add targ_selvecs.
2175
2bc3c89a
AM
21762002-10-16 Alan Modra <amodra@bigpond.net.au>
2177
2178 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 2179 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
2180 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
2181 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
2182 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
2183 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
2184 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
2185 (SOURCE_HFILES): Add elf32-qnx.h.
2186 (BUILD_HFILES): Add bfdver.h.
2187 Run "make dep-am".
2188 * Makefile.in: Regenerate.
2189 * configure.in Update bfd vector dependencies.
2190 * configure: Regenerate.
2191 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
2192 * elf32-i386qnx.c: Likewise.
2193 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
2194 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
2195 * elf32-sh-lin.c: Likewise.
2196 * elf32-shqnx.c: Likewise.
2197 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
2198 * elf32-sh64-nbsd.c: Likewise.
2199 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
2200 * elf64-sh64-nbsd.c: Likewise.
2201 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
2202 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
2203 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
2204 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
2205 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
2206 (elf_backend_is_contained_by_filepos): Likewise.
2207 (elf_backend_copy_private_bfd_data_p): Likewise.
2208 Globalize and move functions to..
2209 * elf32-qnx.c: ..here. New file.
2210 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
2211 emit target vectors when INCLUDE_SHMEDIA.
2212 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
2213 end of file.
2214 * elf64-sh64.c: Remove ELF_ARCH test.
2215 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
2216 * po/BLD-POTFILES.in: Regenerate.
2217 * po/SRC-POTFILES.in: Regenerate.
2218
90c9df85
AM
22192002-10-16 Alan Modra <amodra@bigpond.net.au>
2220
366f2964
AM
2221 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
2222 loaded with --just-symbols.
2223
90c9df85
AM
2224 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
2225 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2226 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2227 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2228
2238051f
RH
22292002-10-15 Richard Henderson <rth@redhat.com>
2230
2231 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
2232 (BFD64_BACKENDS_CFILES): Likewise.
2233 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
2234 * elf64-alpha-fbsd.c: Remove file, move code ...
2235 * elf64-alpha.c: ... here.
2236 * Makefile.in, configure: Rebuild.
2237
64e04ecd
RH
22382002-10-14 Richard Henderson <rth@redhat.com>
2239
2240 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
2241 VALUE, not ADDEND.
2242
396a6083
SC
22432002-10-14 Stephen Clarke <stephen.clarke@superh.com>
2244
2245 * elf32-sh.c (elf_sh_link_hash_entry): Replace
2246 datalabel_got_offset with union of datalabel_got
2247 offset and refcount.
2248 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
2249 (allocate_dynrelocs): Delete unnecessary code for
2250 STT_DATALABEL type. Create entry in got for
2251 datalabel version of symbol if datalabel_got.refcount > 0.
2252 (sh_elf_relocate_section): Use datalabel_got union.
2253 (sh_elf_gc_sweep_hook): Pull common code to initialize
2254 h and eh out of switch statement. Declare seen_stt_datalabel.
2255 Initialize it. Decrement datalabel_got.refcount for
2256 got relocs when seen_stt_datalabel is true.
2257 Decrement local_got_refcounts entry for datalabel got relocs
2258 of local symbols.
2259 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
2260 (sh_elf_check_relocs): Declare seen_stt_datalabel.
2261 Initialize it. When seen_stt_datalabel is true, increment
2262 datalabel_got refcount rather than got.refcount.
2263 (sh_elf_finish_dynamic_symbol): Create relocs to
2264 initialize got entry for datalabel version of symbol.
2265
6a0735ef
AM
22662002-10-14 Alan Modra <amodra@bigpond.net.au>
2267
2268 * Makefile.am: Run "make dep-am".
2269 (BFD_H_FILES): Remove version.h.
2270 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
2271 * version.h: ..to here.
2272 * configure.in (bfd_version_date): Remove.
2273 (AC_OUTPUT): Make bfdver.h from version.h.
2274 * bfd.c: #include "bfdver.h".
2275 * vms-hdr.c: Likewise.
2276 * Makefile.in: Regenerate.
2277 * bfd-in2.h: Regenerate.
2278 * configure: Regenerate.
2279 * po/SRC-POTFILES.in: Regenerate.
2280
686e4055
AM
22812002-10-14 Alan Modra <amodra@bigpond.net.au>
2282
2283 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
2284 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
2285 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
2286 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
2287 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
2288 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
2289 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
2290 bfd_mach_ip2022, bfd_mach_ip2022ext,
2291 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
2292 * bfd-in2.h: Regenerate.
2293
019dca2b
KK
22942002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2295
2296 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
2297 endian vector to targ_selvecs.
2298
bce03d3d
AO
22992002-10-13 Alexandre Oliva <aoliva@redhat.com>
2300
2301 * elfxx-mips.c (mips_elf_calculate_relocation): Take
2302 save_addend argument. Don't apply the 32-bit mask to a
2303 GPREL32 value if it's to be used in another relocation. Don't
2304 use forced-check computation of local_p to decide whether to
2305 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
2306 of the addend of a non-in-place GPREL16 relocation.
2307 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
2308 mips_elf_calculate_relocation().
2309
9b691193
SC
23102002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2311
2312 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
2313 with symbols in other sections if we relaxed something; the sections
2314 output offsets must be re-computed before.
2315
1f4c5b47
SC
23162002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2317
2318 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
2319 handling to use Elf_Internal_Sym.
2320 (m68hc11_elf_relax_delete_bytes): Likewise.
2321
5dc97655
KK
23222002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2323
2324 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
2325 sh_elf_object_p, dtpoff_base): New functions.
2326 (sh_elf_howto_table): Add TLS relocs.
2327 (sh_reloc_map): Likewise.
2328 (sh_elf_info_to_howto): Support TLS relocs.
2329 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
2330 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
2331 New macros.
2332 (sh_elf_obj_tdata): New.
2333 (elf_sh_link_hash_table): Add tls_ldm_got.
2334 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
2335 (allocate_dynrelocs): Support TLS relocs.
2336 (sh_elf_size_dynamic_sections): Likewise.
2337 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
2338 .rela.got section when found already. Return false after printing
2339 error about unresolvable relocation.
2340 (sh_elf_gc_sweep_hook): Support TLS relocs.
2341 (sh_elf_check_relocs): Likewise.
2342 (sh_elf_finish_dynamic_symbol): Likewise.
2343 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
2344 * reloc.c: Add SH TLS relocs.
2345 * bfd-in2.h, libbfd.h: Regenerate.
2346
6a0735ef
AM
23472002-10-11 Daniel Jacobowitz <drow@mvista.com>
2348
2349 * Makefile.in: Regenerated.
2350
af39267e
DJ
23512002-10-11 Daniel Jacobowitz <drow@mvista.com>
2352
2353 * Makefile.am: Run dep-am.
6a0735ef 2354 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
2355 (BFD32_LIBS): Add simple.lo.
2356 (BFD32_LIBS_CFILES): Add simple.c.
2357 * Makefile.in: Regenerated.
2358 * bfd-in2.h: Regenerated.
2359 * simple.c: New file.
2360
0be617ce
AM
23612002-10-11 Alan Modra <amodra@bigpond.net.au>
2362
14a793b2
AM
2363 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
2364 (record_thumb_to_arm_glue): Likewise.
2365 * ecoff.c (ecoff_link_add_externals): Likewise.
2366 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
2367 (record_thumb_to_arm_glue): Likewise.
2368 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2369 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2370 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2371 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2372 * elf64-ppc.c (func_desc_adjust): Likewise.
2373 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2374 (sh64_elf64_create_dynamic_sections): Likewise.
2375 * elflink.c (_bfd_elf_create_got_section): Likewise.
2376 (_bfd_elf_create_dynamic_sections): Likewise.
2377 (_bfd_elf_create_linker_section): Likewise.
2378 * elflink.h (elf_add_default_symbol): Likewise.
2379 (elf_link_create_dynamic_sections): Likewise.
2380 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2381 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
2382 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
2383 (_bfd_mips_elf_add_symbol_hook): Likewise.
2384 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2385 * linker.c (generic_link_add_symbol_list): Likewise.
2386 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2387
2388 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
2389
0be617ce 2390 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 2391 completely removed. Correct local sym adjustment.
0be617ce 2392
0a4ef3f4
SC
23932002-10-10 Stephen Clarke <stephen.clarke@superh.com>
2394
2395 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2396 Correct mistake in calculation of address of .got.
2397 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
2398 elf_sh64_pic_plt_entry_le): Likewise.
2399
efacd36e
SC
24002002-10-09 Richard Shann <richard.shann@superh.com>
2401 Stephen Clarke <stephen.clarke@superh.com>
2402
2403 * Makefile.am: Add entries for elf32-sh64-lin.c and
2404 elf64-sh64-lin.c. Regenerate.
2405 * Makefile.in: Regenerate.
2406 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
2407 to use sh64 vectors rather than sh vectors.
2408 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2409 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2410 * configure: Regenerate.
2411 * elf32-sh64-lin.c: New file.
2412 * elf64-sh64-lin.c: New file.
2413 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
2414 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2415
299bf759
L
24162002-10-08 H.J. Lu <hjl@gnu.org>
2417
2418 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
2419 IE->LE transition for R_386_TLS_IE.
2420
51020317
AM
24212002-10-08 Alan Modra <amodra@bigpond.net.au>
2422
2423 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
2424
a8fcf378
NC
24252002-10-07 Mark Elbrecht <snowball3@softhome.net>
2426
51020317
AM
2427 * cofflink.c (mark_relocs): Don't mark relocations in excluded
2428 sections.
a8fcf378 2429
a16d5acb
AM
24302002-10-07 Alan Modra <amodra@bigpond.net.au>
2431
a6b511bd
AM
2432 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
2433 code.
2434
a16d5acb
AM
2435 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
2436
7c4a37eb
AM
24372002-10-06 Alan Modra <amodra@bigpond.net.au>
2438
2439 * opncls.c: Formatting.
2440 (_bfd_new_bfd): Use a smaller section hash table.
2441
7c4ca42d
AO
24422002-10-05 Alexandre Oliva <aoliva@redhat.com>
2443
2444 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
2445 of the other two relocations packed with a REL32 to NONE.
2446
4989d792
SC
24472002-10-02 Stephen Clarke <stephen.clarke@superh.com>
2448
2449 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
2450 (sh_elf_link_hash_newfunc): Initialize it.
2451 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
2452 to got.refcount for symbols that are forced local or when
2453 we have direct got refs.
2454 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
2455 to correctly adjust got.refcount and plt.refcount.
2456 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
2457 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 2458
7c445aa3
JJ
24592002-10-01 Jakub Jelinek <jakub@redhat.com>
2460
2461 * elf32-i386.c (elf_i386_relocate_section): Fix
2462 movl foo@indntpoff, %eax IE->LE transition.
2463
abcf1d52
JJ
24642002-10-01 Jakub Jelinek <jakub@redhat.com>
2465
2466 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
2467 sequence and its transitions.
2468
a45bb67d
JJ
24692002-10-01 Jakub Jelinek <jakub@redhat.com>
2470
2471 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
2472 to st_value + addend in non-code sections.
2473 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
2474 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
2475
00707a0e 24762002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
2477 Ken Raeburn <raeburn@cygnus.com>
2478 Aldy Hernandez <aldyh@redhat.com>
2479 Eric Christopher <echristo@redhat.com>
2480 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
2481
2482 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
2483 (bfd_mach_mips5500): New.
2484 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
2485 (arch_info_struct): Add corresponding entries here.
2486 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
2487 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
2488 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
2489 bfd_mach_mips5400 and bfd_mach_mips5500.
2490 (_bfd_mips_elf_mach_extends_p): New function.
2491 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
2492 the EF_MIPS_MACH flags.
2493 * bfd-in2.h: Regenerate.
2494
624f0b25
JT
24952002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
2496
2497 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
2498 .got sections.
2499
b89fe0ee
AM
25002002-09-28 Alan Modra <amodra@bigpond.net.au>
2501
2502 * elf.c (map_sections_to_segments): Correct test for start of
2503 writable section in the same page as end of read-only section.
2504
b29635ba
JT
25052002-09-27 Matt Thomas <matt@3am-software.com>
2506
2507 * elf32-vax.c (elf_vax_check_relocs): Remove unused
2508 local_got_refcounts usage. Remove allocation of got slot.
2509 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
2510 Remove de-allocation of got slot.
2511 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
2512 traversal for elf_vax_instantiate_got_entries. Allow empty .got
2513 sections to be GC'ed.
2514 (elf_vax_instantiate_got_entries): New function.
2515 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
2516 tests that are now handled by elf_vax_instantiate_got_entries.
2517 Assert GOT entry falls within .got section size. Remove redundant
2518 comparisions. Fix comments.
2519
bffbf940
JJ
25202002-09-27 Jakub Jelinek <jakub@redhat.com>
2521
2522 * reloc.c: Add x86-64 TLS relocs.
2523 * bfd-in2.h, libbfd.h: Rebuilt.
2524 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
2525 relocs. Add TLS relocs.
2526 (x86_64_reloc_map): Add TLS relocs.
2527 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
2528 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
2529 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
2530 (elf64_x86_64_hash_entry): Define.
2531 (struct elf64_x86_64_obj_tdata): New.
2532 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
2533 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
2534 (link_hash_newfunc): Initialize tls_type.
2535 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
2536 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
2537 (elf64_x86_64_mkobject): New.
2538 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
2539 (elf64_x86_64_tls_transition): New.
2540 (elf64_x86_64_check_relocs): Add r_type variable and use it.
2541 Handle TLS relocs.
2542 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
2543 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
2544 (elf64_x86_64_size_dynamic_sections): Likewise.
2545 (dtpoff_base, tpoff): New.
2546 (elf64_x86_64_relocate_section): Handle TLS relocs.
2547 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
2548 entries.
2549 (bfd_elf64_mkobject): Define.
2550
2551 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
2552 DF_STATIC_TLS if shared.
2553
14366460
TS
25542002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2555
2556 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
2557 empty relocation sections.
2558
9f951329
AM
25592002-09-26 Alan Modra <amodra@bigpond.net.au>
2560
2561 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
2562 (ppc64_elf_build_stubs): Build them here instead.
2563
6b3ac709
JJ
25642002-09-24 Jakub Jelinek <jakub@redhat.com>
2565
2566 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
2567 addend into r_addend, not *r_offset.
2568 (elf32_sparc_finish_dynamic_symbol): Likewise.
2569 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
2570 R_SPARC_RELATIVE's r_offset.
2571
e2f6d277
NC
25722002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2573
2574 * dwarf2.c (decode_line_info): Update to correctly decode
2575 the (non-standard DWARF2) out-of-order address sequences
2576 generated by the Intel C++ 6.0 compiler for ia64-Linux.
2577
f3961b2b
DD
25782002-09-23 Mark Elbrecht <snowball3@softhome.net>
2579
2580 * config.bfd: For DJGPP targets, match with any cpu and any machine.
2581
ad34bc37
AM
25822002-09-23 Alan Modra <amodra@bigpond.net.au>
2583
2584 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
2585 for discarded FDEs. Remove redundant assignment.
2586 * elflink.h (elf_bfd_discard_info): Save edited relocs.
2587
82988bff
L
25882002-09-22 H.J. Lu <hjl@gnu.org>
2589
2590 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
2591 the relocation count between different .reloc sections.
2592
5ad8645c
AM
25932002-09-21 Alan Modra <amodra@bigpond.net.au>
2594
5f819128
AM
2595 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
2596 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
2597 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
2598 R_PPC_EMB_RELSDA.
2599
5ad8645c
AM
2600 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
2601 unsigned. Move "symcount" assignment out of loop.
2602 * Makefile.am: Run "make dep-am".
2603 * Makefile.in: Regenerate.
2604 * configure: Regenerate.
2605 * po/SRC-POTFILES.in: Regnerate.
2606
75936555
NC
26072002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2608
2609 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
2610 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
2611 (e.g. IRIX64).
2612
2243deae
L
26132002-09-19 Jakub Jelinek <jakub@redhat.com>
2614
2615 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
2616 even if generating R_PPC_RELATIVE reloc.
2617 (ppc_elf_relocate_section): Make sure relocation is performed
2618 if skip == -2. Clear memory at r_offset when creating dynamic
2619 relocation.
2620
37e55690
JJ
26212002-09-19 Jakub Jelinek <jakub@redhat.com>
2622
2623 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
2624 BFD_RELOC_386_TLS_GOTIE): Add.
2625 * bfd-in2.h, libbfd.h: Rebuilt.
2626 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
2627 and R_386_TLS_GOTIE.
2628 (elf_i386_reloc_type_lookup): Handle it.
2629 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
2630 char instead of enum, change GOT_* into defines.
2631 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
2632 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2633 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
2634 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
2635 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
2636 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2637 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2638 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2639 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
2640 tls_type is GOT_TLS_IE_BOTH.
2641 (elf_i386_size_dynamic_sections): Likewise.
2642 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2643 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2644 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
2645 all 4 GOT_TLS_* TLS types.
2646
8e67855b
NC
26472002-09-19 Nick Clifton <nickc@redhat.com>
2648
2649 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
2650 follow indirect links.
2651
1c59ba3f
NC
26522002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2653
2654 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
2655 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
2656 on 64 bit machines.
2657 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
2658 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
2659 ECOFF information: 'ioptMax' refers to the actual *size*
2660 of the optimization symtab, not the number of entries.
1c59ba3f 2661
9d7404b7
NC
26622002-09-19 Daniel Jacobowitz <drow@mvista.com>
2663
2664 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
2665 ELF_LINK_HASH_NEEDS_PLT logic.
2666
05a487dc
DJ
26672002-09-18 Daniel Jacobowitz <drow@mvista.com>
2668
2669 * elfcode.h (elf_slurp_reloc_table_from_section): Check
2670 correct relocation count.
2671
1f70368c
DJ
26722002-09-17 Daniel Jacobowitz <drow@mvista.com>
2673
2674 * bfd-in.h (bfd_get_dynamic_symcount): Define.
2675 * bfd.c (struct _bfd): Add dynsymcount.
2676 * bfd-in2.h: Regenerated.
2677 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
2678 abfd->dynsymcount.
2679 * elfcode.h (elf_slurp_reloc_table_from_section): Check
2680 for overflow.
2681
51020317 26822002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
2683
2684 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
2685 (mips_elf64_final_gp): Don't make up gp value.
2686 * elfn32-mips.c (mips_elf_final_gp): Likewise.
2687 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
2688 .MIPS.options/.options section.
2689
290062cc
DB
26902002-09-17 David O'Brien <obrien@FreeBSD.org>
2691
2692 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
2693 It is benign for FreeBSD < 4.1. Minor reformatting.
2694 * elf64-alpha-fbsd.c: Likewise.
2695
c5c1f40c
JJ
26962002-09-17 Jakub Jelinek <jakub@redhat.com>
2697
ca1eb0ba
JJ
2698 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
2699 addend.
c5c1f40c 2700
562ace6b
AM
27012002-09-17 Alan Modra <amodra@bigpond.net.au>
2702
2703 * elf64-alpha.c (alpha_elf_size_info): Make static.
2704
5af6ead6
AM
27052002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
2706
2707 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
2708 * cpu-tic4x.c: Ditto.
2709
cb9512fc
TS
27102002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2711
2712 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
2713 duplicate define.
2714
4ada7262
DB
27152002-09-16 Bruno Haible <bruno@clisp.org>
2716
2717 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
2718 by a target variant implementation.
2719 * elf64-alpha.c: Likewise.
2720 * elf32-i386-fbsd.c: New file.
2721 * elf64-alpha-fbsd.c: New file.
2722 * targets.c: Support bfd_elf32_i386_freebsd_vec and
2723 bfd_elf64_alpha_freebsd_vec.
2724 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
2725 bfd_elf64_alpha_freebsd_vec.
2726 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
2727 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
2728 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
2729 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
2730 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
2731 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
2732 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
2733
6a30718d
JJ
27342002-09-12 Jakub Jelinek <jakub@redhat.com>
2735
2736 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
2737 NULL.
2738 (elf_i386_relocate_section): Return false after printing error about
2739 unresolvable relocation.
2740
6cf9e9fe
NC
27412002-09-12 Nick Clifton <nickc@redhat.com>
2742
2743 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
2744 R_ARM_THM_PC11.
2745
10f469bf
DJ
27462002-09-11 Jeffrey Law <law@redhat.com>
2747
2748 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
2749
dc43ada5
NC
27502002-09-11 Andrew Haley <aph@cambridge.redhat.com>
2751
2752 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
2753 line_ptr before deciding we've found a symbol.
2754
e09f4395
NC
27552002-09-11 Nick Clifton <nickc@redhat.com>
2756
2757 * po/da.po: New Danish translation file.
2758 * configure.in (LINGUAS): Add 'da'.
2759 * configure: Regenerate.
2760
b3018b5f
NC
27612002-09-10 Michael Snyder <msnyder@redhat.com>
2762
2763 * irix-core.c (do_sections, do_sections64): New functions.
51020317 2764 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
2765 do_sections64, depending on corefile (32-bit or 64-bit).
2766
2f21f25e
RH
27672002-09-09 Richard Henderson <rth@redhat.com>
2768
2769 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
2770 and PCREL21F like PCREL21B.
2771
28b94e7c
KB
27722002-09-04 Kevin Buettner <kevinb@redhat.com>
2773
51020317
AM
2774 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
2775 vector.
28b94e7c 2776
5cec6941
NC
27772002-09-02 Nick Clifton <nickc@redhat.com>
2778
2779 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
2780 names instead of cryptically overloaded bfd_reloc error
2781 codes.
2782 (v850_elf_relocate_section): Likewise.
2783 (v850_elf_relax_section): Replace caching of external symbols
2784 with caching of internal symbols obtained from calling
2785 bfd_elf_get_elf_syms().
51020317 2786 Fixup problems with freeing cached allocated memory blocks.
5cec6941 2787
3b77b1d5
AM
27882002-09-02 Alan Modra <amodra@bigpond.net.au>
2789
638524b5
AM
2790 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
2791 (bfd_pj_arch): Use bfd_default_scan.
2792 * cpu-v850.c (scan): Remove.
2793 (N): Use bfd_default_scan.
2794 * cpu-z8k.c (scan_mach): Remove.
2795 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
2796 first. Use bfd_default_scan.
2797
250d94fd
AM
2798 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
2799 bfd_mach constants.
2800 (ecoff_get_magic): Likewise.
2801 * elf32-v850.c (v850_elf_object_p): Likewise.
2802 (v850_elf_final_write_processing): Likewise.
2803 * mipsbsd.c (MY(set_arch_mach)): Likewise.
2804 (MY(write_object_contents)): Likewise.
2805 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
2806 * coffcode.h (coff_write_object_contents): Likewise.
2807 (coff_set_arch_mach_hook): Add comment describing machine == 0.
2808 Remove unnecessary "machine" assignments.
2809 (coff_write_relocs): Test for the absolute section sym by testing
2810 section and flags.
2811
3b77b1d5
AM
2812 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
2813 and bfd_mach_i386_i386_intel_syntax.
250d94fd 2814 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 2815
e5b45b83
DA
28162002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
2817
2818 * bfd-in.h (align_power): Cast constants to bfd_vma type.
2819 * bfd-in2.h (align_power): Likewise.
2820
37f45cf8
AM
28212002-08-30 Alan Modra <amodra@bigpond.net.au>
2822
2823 * Makefile.am: Run "make dep-am".
2824 * Makefile.in: Regenerate.
2825
2826 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
2827 * cpu-powerpc.c (powerpc_compatible): Likewise.
2828 * cpu-rs6000.c (rs6000_compatible): Likewise.
2829
86aba9db
NC
28302002-08-28 Catherine Moore <clm@redhat.com>
2831
2832 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
2833 (v850-elf-reloc): Don't resolve pc relative relocs.
2834 (v850_elf_ignore_reloc): New routine.
2835 (v850_elf_final_link_relocate): Handle new relocs.
2836 (v850_elf_relax_delete_bytes ): New routine.
2837 (v850_elf_relax_section): New routine.
2838 (bfd_elf32_bfd_relax_section): Define.
2839 (HOWTO): New entries for new relocs.
2840 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
2841 (BFD_RELOC_V850_LONGJUMP): New reloc.
2842 (BFD_RELOC_V850_ALIGN): New reloc.
2843 * archures.c: Remove redundant v850ea architecture.
2844 * cpu-v850.c: Remove redundant v850ea support.
2845 * libbfd.h: Regenerate.
2846 * bfd-in2.h: Regenerated.
2847
026df7c5
NC
28482002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
2849
2850 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
2851 * configure.in: Add tic4x_coff vector files.
2852 * configure: Regenerate.
2853 * Makefile.am: Add tic4x target.
2854 * Makefile.in: Regenerate.
2855
28562002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
2857
2858 * archures.c: Add the BFD arch type tic4x.
2859 * bfd-in.h: Add BFD_IN_MEMORY flag.
2860 * coff-tic4x.c: New file.
2861 * coffswap.h (coff_swap_sym_out): Add preadjuster.
2862 * cpu-tic4x.c: New file.
2863 * targets.c: Added tic4x- in list of xvecs.
2864 * ticoff.h: New file.
2865 * bfd-in2.h: Regenerate.
2866
88f7bcd5
NC
28672002-08-27 Adam Nemet <anemet@lnxw.com>
2868
2869 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
2870 bit of DT_INIT and DT_FINI for Thumb functions.
2871
c8e48751
AM
28722002-08-26 Alan Modra <amodra@bigpond.net.au>
2873
2874 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
2875
2846975a
AM
28762002-08-26 Alan Modra <amodra@bigpond.net.au>
2877
2878 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
2879
067653c5
AM
28802002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2881
2882 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
2883 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
2884 Likewise.
2885 (struct elf_sh_pcrel_relocs_copied): Removed.
2886 (struct elf_sh_dyn_relocs): New.
2887 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
2888 field with dyn_relocs.
2889 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
2890 sections and sym_sec.
2891 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
2892 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
2893 (sh_elf_create_dynamic_sections): Use create_got_section instead
2894 of _bfd_elf_create_got_section.
2895 (sh_elf_check_relocs): Likewise.
2896 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
2897 sections.
2898 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
2899 sh_elf_relocate_section, sh_elf_check_relocs,
2900 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
2901 Likewise.
2902 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
2903 dynamic relocations and avoiding the copy relocation when we
2904 didn't find any dynamic relocations in the section which has
2905 contents or is read-only.
2906 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2907 (sh_elf_size_dynamic_sections): Don't reset the size of
2908 .rela.got section even if dynamic_sections_created flag is off.
2909 Don't use sh_elf_discard_copies. Scan all input bfd and use
2910 allocate_dynrelocs. Call readonly_dynrelocs to determine
2911 whether we need DT_TEXTREL.
2912 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
2913 whether the symbol was never referred to.
2914 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
2915 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
2916 (sh_elf_check_relocs): Call create_got_section if the short-cut
2917 to .got is null. Increment reference counters only instead of
2918 allocating space on dynamic sections here. Don't conditionalize
2919 uninitialized got.offset value when marking the symbol as a
2920 global offset table entry. Keep relocations for symbols satisfied
2921 by a dynamic library to avoid copy relocations for the symbol.
2922 Set dynobj field of an elf hash table if needed.
2923 (sh_elf_finish_dynamic_sections): Handle null section pointer
2924 correctly.
2925 (elf_backend_copy_indirect_symbol): Defined.
2926 (elf_backend_can_refcount): Defined.
2927
7e326afc
NC
29282002-08-23 Nick Clifton <nickc@redhat.com>
2929
2930 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
2931 previous change. Add comment explaining why.
2932
c8614e8e
AM
29332002-08-23 Stephen Clarke <stephen.clarke@superh.com>
2934
2935 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
2936 contents of .got.plt[2] to tr0, not address of .got.plt.
2937 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
2938 patching absolute plt entry. For shmedia plt entry, set bottom bit
2939 of branch to plt0 as this is a branch to an shmedia instruction.
2940 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
2941 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
2942 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
2943 branch to plt0.
2944 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
2945 patching absolute plt entry. For shmedia plt entry, branch to
2946 plt0 is now ptrel, so use relative offset. Set bottom bit of
2947 branch target as it is a branch to an shmedia instruction.
2948
3b587c71
AM
29492002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
2950 Richard Shann <richard.shann@superh.com>
2951
2952 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
2953 value if .init is an SHmedia function. Similarly for DT_FINI.
2954 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 2955
957dcaa8
AM
29562002-08-23 Stephen Clarke <stephen.clarke@superh.com>
2957
3b587c71 2958 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 2959 dynamic section.
3b587c71 2960 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 2961
a4263c47
NC
29622002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2963
2964 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 2965 byte read when reading the return address register column.
a4263c47 2966
db4ed121
NC
29672002-08-22 Nick Clifton <nickc@redhat.com>
2968
2969 * config.bfd: Add powepc64-*-*bsd* target.
2970
ed71e111
NC
29712002-08-22 Graeme Peterson <gp@qnx.com>
2972
2973 * Makefile.am: Add entries for elf32-shqnx.c
2974 * Makefile.in: Regenerate.
2975 * config.bfd: Add support sh-*-nto* target.
2976 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
2977 * configure: Regenerate.
2978 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
2979 * elf32-sh.c: Do not include elf32-target.h if
2980 ELF32_SH_C_INCLUDED is defined.
2981 * elf32-shqnx.c: New file: Support for QNX.
2982 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
2983
0ab72ee2
NC
29842002-08-22 Nick Clifton <nickc@redhat.com>
2985
75c83283
NC
2986 * po/tr.po: Updated Turkish translation.
2987
0ab72ee2
NC
2988 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
2989 symbols are not read.
2990
56780f18
AM
29912002-08-22 Alan Modra <amodra@bigpond.net.au>
2992
2993 * elf32-m68hc11.c: Formatting fixes.
2994 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
2995 * elf32-m68hc12.c: Formatting fixes.
2996 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
2997
b48fa14c
AM
29982002-08-22 Alan Modra <amodra@bigpond.net.au>
2999
a7c71b0c
AM
3000 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
3001 SEC_DATA.
3002 (pmac_xcoff_vec): Likewise.
3003 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3004 (aix5coff64_vec): Likewise.
3005
56780f18
AM
30062002-08-22 Alan Modra <amodra@bigpond.net.au>
3007
b48fa14c
AM
3008 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
3009 param to elf_backend_copy_indirect_symbol.
3010 (_bfd_elf_link_hash_copy_indirect): Likewise.
3011 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
3012 calls to copy_indirect_symbol.
3013 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
3014 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
3015 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3016 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3017 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3018 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
3019 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
3020 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3021 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3022 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
3023 test refcounts for "used" values.
3024
8c2ab17d
AM
30252002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
3026
3027 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
3028 argument declaration.
3029
d62b1198 30302002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
3031
3032 * archures.c (bfd_mach_ppc_e500): Added.
3033 * bfd-in2.h: Rebuilt.
d62b1198
EZ
3034 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
3035
9f88ba09
AM
30362002-08-19 Alan Modra <amodra@bigpond.net.au>
3037
3038 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
3039
df622259
AC
30402002-08-17 Andrew Cagney <ac131313@redhat.com>
3041
3042 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 3043 `bfd_byte'.
df622259 3044
44c410de
SC
30452002-08-17 Stan Cox <scox@redhat.com>
3046
3047 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
3048 IRIX 6 segment layout for NEWABI.
3049
4972a8e9
SC
30502002-08-16 Stephen Clarke <stephen.clarke@superh.com>
3051
3052 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
3053 symbols when looking for section referred to by a relocation.
3054 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 3055
c5cd6d62
AM
30562002-08-15 Alan Modra <amodra@bigpond.net.au>
3057
3058 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
3059
0741c7be
HPN
30602002-08-15 Hans-Peter Nilsson <hp@axis.com>
3061
3062 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
3063 missing check for whether the symbol is referenced by DSO before
3064 unexporting it as an unneeded dynamic symbol.
3065
e8d5d179
L
30662002-08-14 H.J. Lu <hjl@gnu.org>
3067
3068 * libbfd.h: Regenerate.
3069
e9229007
L
30702002-08-14 H.J. Lu <hjl@gnu.org>
3071
3072 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
3073
1fd03b5a
SC
30742002-08-14 Stephane Carrez <stcarrez@nerim.fr>
3075
3076 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
3077 instructions.
3078 (m68hc11_direct_relax): New to define table of relaxable instructions.
3079 (find_relaxable_insn): New, find a relaxable insn.
3080 (compare_reloc): New to compare two relocs.
3081 (m68hc11_elf_relax_section): New, relax text sections.
3082 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
3083 (elf32_m68hc11_check_relocs): New function for GC support.
3084 (elf32_m68hc11_relocate_section): New function for GC support.
3085 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
3086 (elf_backend_check_relocs): Likewise.
3087 (elf_backend_relocate_section): Likewise.
3088
c828c771
L
30892002-08-13 H.J. Lu <hjl@gnu.org>
3090
3091 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
3092 definitions in shared objects when checking symbol with
3093 undefined version.
3094
9b701e44
SC
30952002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3096
3097 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
3098 (elf32_m68hc11_gc_sweep_hook): Likewise.
3099 (elf_backend_gc_mark_hook): Define for GC section support.
3100 (elf_backend_gc_sweep_hook): Likewise.
3101 (elf_backend_can_gc_sections): Likewise.
3102
3103 * elf32-m68hc12.c: Likewise.
3104
96405e3c
SC
31052002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3106
3107 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
3108 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
3109 (_bfd_m68hc11_elf_set_private_flags): New function.
3110 Use them to set/check/print ELF flags specific to 68HC11.
3111
3112 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
3113 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
3114 (_bfd_m68hc12_elf_set_private_flags): New function.
3115 Use them to set/check/print ELF flags specific to 68HC12.
3116
dae78fb0
SC
31172002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3118
3119 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
3120 fix masks for PC-rel relocs.
3121 (m68hc11_elf_ignore_reloc): New function.
3122
3123 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
3124 68HC12 banked addressing relocs.
3125 (m68hc12_phys_addr): New to compute physical address of banked memory.
3126 (m68hc12_phys_page): Likewise for page.
3127 (m68hc12_addr_is_banked): New to see if address is in banked area.
3128 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
3129
3dbfec86
SC
31302002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3131
3132 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
3133 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
3134 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
3135 * bfd-in2.h: Regenerate.
3136
871da94f
L
31372002-08-12 H.J. Lu <hjl@gnu.org>
3138
3139 * elflink.h (elf_add_default_symbol): Preserve section across
3140 elf_merge_symbol.
3141
59bc061d
NC
31422002-08-09 Graeme Peterson <gp@qnx.com>
3143
51020317 3144 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
3145 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
3146 * Makefile.in: Regenerate.
3147 * config.bfd: Add support for powerpc{le}-*-nto targets.
3148 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
3149 * configure: Regenerate.
3150 * elf32-i386qnx.c: Moved backend functions into a QNX specific
3151 common file "elf32-qnx.h", and now include that file.
3152 * elf32-qnx.h: New file: QNX specific common elf backend.
3153 * elf32-ppc.c: Do not include elf32-target.h if
3154 ELF32_PPC_C_INCLUDED is defined.
3155 * elf32-ppcqnx.c: New file: Support for QNX.
3156 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
3157 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
3158
2b692c59
NC
31592002-08-09 Nick Clifton <nickc@redhat.com>
3160
3161 * po/sv.po: Updated Swedish translation.
3162
d0c7ff07
TS
31632002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3164
3165 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
3166 g->global_gotsym is NULL.
3167
d8bbe778
L
31682002-08-08 H.J. Lu <hjl@gnu.org>
3169
c5cd6d62 3170 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
3171 overrides an indirect versioned symbol.
3172
c366c25e
JJ
31732002-08-08 Jakub Jelinek <jakub@redhat.com>
3174
3175 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
3176 for R_386_TLS_TPOFF32 relocs against symndx 0.
3177
31941635
L
31782002-08-07 H.J. Lu <hjl@gnu.org>
3179
3180 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
3181 with undefined version if needed.
3182 (elf_link_assign_sym_version): Match a default symbol with a
3183 version without definition. No need to hide the default
3184 definition separately.
3185
0f3bd64f
AM
31862002-08-08 Alan Modra <amodra@bigpond.net.au>
3187
7330fb86
AM
3188 * elflink.h (elf_link_output_extsym): Don't output symbols from
3189 SEC_EXCLUDE sections.
3190
0f3bd64f
AM
3191 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
3192
a4aa0fb7
AM
31932002-08-07 Alan Modra <amodra@bigpond.net.au>
3194
3195 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
3196 entries.
3197
34ea4a36
TS
31982002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3199
3200 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
3201 mismatch.
3202
141ff970
TS
32032002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3204
3205 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
3206
28458e7e
TS
32072002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3208
3209 * elf32-mips.c (mips_reloc_map): Fix typo.
3210
0121a3da
AM
32112002-08-06 Alan Modra <amodra@bigpond.net.au>
3212
3213 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
3214
d006db6c
AM
32152002-08-06 Alan Modra <amodra@bigpond.net.au>
3216
3217 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
3218
8ea80f08
AM
32192002-08-06 Alan Modra <amodra@bigpond.net.au>
3220
2a52da53
AM
3221 * libxcoff.h: Use PARAMS on function declarations.
3222 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
3223 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
3224
8ea80f08
AM
3225 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
3226 addend.
3227 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
3228
cf9ab45b
AM
32292002-08-06 Alan Modra <amodra@bigpond.net.au>
3230
3231 * coff-rs6000.c: Formatting fixes.
3232 (xcoff_calculate_relocation): Use PARAMS in declaration.
3233 (xcoff_complain_overflow): Likewise.
3234 (xcoff_ppc_relocate_section): Use old-style function pointer call.
3235 (bfd_xcoff_backend_data): Remove useless comments.
3236 (rs6000coff_vec): Likewise.
3237 (bfd_pmac_xcoff_backend_data): Likewise.
3238 (pmac_xcoff_vec): Likewise.
8ea80f08 3239
cf9ab45b
AM
3240 * coff64-rs6000.c: Formatting fixes.
3241 (xcoff64_calculate_relocation): Use PARAMS in declaration.
3242 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
3243 (bfd_xcoff_backend_data): Remove useless comments.
3244 (rs6000coff64_vec): Likewise.
3245 (bfd_xcoff_aix5_backend_data): Likewise.
3246 (aix5coff64_vec): Likewise.
3247
48bfecdd
AM
32482002-08-06 Alan Modra <amodra@bigpond.net.au>
3249
a78eab4e
AM
3250 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
3251 mask entries. Use complain_overflow_dont for R_REF.
3252 (xcoff_reloc_type_ba): Revert last change.
3253 (xcoff_reloc_type_br): Likewise.
3254 (xcoff_reloc_type_crel): Likewise.
3255 (xcoff_ppc_relocate_section): Likewise.
3256 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
3257 (xcoff64_ppc_relocate_section): Likewise.
3258 (xcoff64_howto_table): Revert some of last change to mask entries.
3259 Use complain_overflow_dont for R_REF.
3260
48bfecdd
AM
3261 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
3262 relocs with bitsize == 16 have size = 1.
3263 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
3264 (xcoff_reloc_type_br): Likewise.
3265 (xcoff_reloc_type_crel): Likewise.
3266 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3267 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
3268 dst_mask adjustment.
3269 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3270 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
3271 bitsize == 16 have size = 1.
3272
fd13ed0c
DC
32732002-08-01 Denis Chertykov <denisc@overta.ru>
3274
3275 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
3276 (struct misc): New field isymbuf. All free_* fields removed.
3277 (symbol_value): Pass in internal syms. No need to swap syms in.
3278 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
3279 possibly cached info.
3280 (tidyup_after_error): Removed.
3281 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
3282 misc. Use new field.
3283 (adjust_all_relocations): Use internal syms. No need to swap syms
3284 in and out.
3285 (add_page_insn): Don't use removed fields of struct misc.
3286
24a1ba0f
NC
32872002-08-01 Nick Clifton <nickc@redhat.com>
3288
3289 * elf32-arm.h: Revert previous delta.
3290
a6903459
NC
32912002-08-01 Nick Clifton <nickc@redhat.com>
3292
3293 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
3294 * configure: Regenerate.
3295
39a2a3eb
L
32962002-07-31 H.J. Lu <hjl@gnu.org>
3297
3298 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
3299 selected.
3300
a0dfa6a8
L
33012002-07-31 H.J. Lu <hjl@gnu.org>
3302
3303 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
3304 is selected.
3305
cd67d266
JJ
33062002-07-31 Jakub Jelinek <jakub@redhat.com>
3307
3308 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
3309 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
3310
4eb6b71c
NC
33112002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3312
3313 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
3314 There is no 8 byte relocation type for this architecture.
3315 (do_ns32k_reloc): Use bfd_vma instead of native types.
3316 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
3317 returns void.
3318 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
3319 rely on generic code to do that.
3320 * aout-ns32k.c (howto_table): Add appropriate overflow detection
3321 to all table entries.
3322 (_bfd_ns32k_relocate_contents): put_data returns void.
3323 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
3324 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
3325 return void.
3326
f7c33884
NC
33272002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3328
3329 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
3330 archive object is target dependant.
3331
8f64befb
NC
33322002-07-31 Adam Nemet <anemet@lnxw.com>
3333
3334 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
3335 (THUMB_PLT_ENTRY_SIZE): New macro.
3336 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
3337 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
3338 ARM_PLT_ENTRY_SIZE.
3339 (elf32_arm_plt_entry): Likewise.
3340 (elf_backend_plt_header_size): Likewise.
3341 (elf32_thumb_plt0_entry): New global.
3342 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
3343 into .plt.thumb.
3344 (elf32_thumb_plt_entry): New global.
3345 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
3346 Thumb entries. Set the bottom bit of the corresponding GOT entry
3347 for a Thumb PLT entry.
3348 (struct elf32_arm_plt_entry_info): New structure.
3349 (struct elf32_arm_link_hash_entry, plt_info): New member of this
3350 type.
3351 (elf32_arm_link_hash_newfunc): Initialize new member.
3352 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
3353 relocations against the PLT.
3354 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
3355 first_rel_type if this is the first time we encounter the symbol.
3356 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
3357 Determine if relocation needs a PLT entry. Set first_rel_type if
3358 this is the first time we encounter the symbol
3359 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
3360 functions as well.
3361 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
3362 (elf32_arm_create_dynamic_sections): New function. Create the
3363 .plt.thumb section.
3364 (elf_backend_create_dynamic_sections): Call it.
3365
47badb7b
NC
33662002-07-31 Nick Clifton <nickc@redhat.com>
3367
3368 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
3369 'alternative' in order to avoid shadowing global symbol of the
3370 same name.
3371 * bfd-in2.h: Regenerate.
3372 * libbfd.h: Regenerate.
3373 * libcoff.h: Regenerate.
3374
8a397dad
TS
33752002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3376
3377 * Makefile.am: Add n32 ABI support.
3378 * Makefile.in: Regenerate.
3379 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
3380 bit vectors for mips*-*-linux targets as optional.
3381 * configure.in: Add n32 ABI vectors.
3382 * configure: Regenerate.
3383 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
3384 * elfn32-mips.c: New file, n32 ABI support.
3385 * targets.c: Add n32 ABI vectors.
3386
7e392df6 33872002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 3388
7e392df6
NC
3389 * elfarmqnx-nabi.c: New file: Support for QNX.
3390 * config.bfd: Add support for arm-*-nto target.
3391 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
3392 * configure: Regenerate.
3393 * Makefile.am: Add entries for elfarmqnx-nabi.c.
3394 * Makefile.in: Regenerate.
3395 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
3396 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
3397 * elfarm-nabi.c: Do not include elf32-arm.h if
3398 ELFARM_NABI_C_INCLUDED is defined.
3399 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 3400
7e392df6 34012002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 3402
83e1617e
NC
3403 * po/sv.po: Updated Swedish translation.
3404
704afa60
JJ
34052002-07-30 Jakub Jelinek <jakub@redhat.com>
3406
3407 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
3408
487e54f2
AM
34092002-07-30 Alan Modra <amodra@bigpond.net.au>
3410
3411 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
3412 * archive.c (bfd_generic_archive_p): Likewise.
3413 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
3414 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
3415 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
3416 (xcoff64_archive_p): Likewise.
3417 (xcoff64_openr_next_archived_file): Likewise.
3418 (xcoff64_archive_p): Clean up tdata properly on error.
3419 * coffgen.c (coff_real_object_p): Likewise.
3420 (coff_object_p): Release filehdr and opthdr.
3421 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
3422 * ieee.c (ieee_archive_p): Likewise.
3423 * ihex.c (ihex_object_p): Likewise.
3424 (ihex_mkobject): Always allocate tdata.
3425 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
3426 * srec.c (srec_mkobject): Always allocate tdata.
3427 (srec_object_p): Clean up tdata properly on error.
3428 (symbolsrec_object_p): Likewise.
3429 * versados.c (versados_object_p): Likewise.
3430 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
3431 and bfd_realloc instead of realloc.
3432 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
3433 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
3434 place of bfd_malloc, simplifying error freeing. Free hash table too.
3435 (vms_object_p): Clean up tdata on error.
3436 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
3437 (vms_close_and_cleanup): Adjust for bfd_alloc use.
3438
9d46020e
AM
34392002-07-30 Alan Modra <amodra@bigpond.net.au>
3440
3441 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
3442
fb39dac1
RS
34432002-07-26 Chris Demetriou <cgd@broadcom.com>
3444
3445 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
3446 flags into resulting BFD.
3447
7a624474
AM
34482002-07-26 Alan Modra <amodra@bigpond.net.au>
3449
3450 From John Reiser <jreiser@BitWagon.com>
3451 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
3452 tls_ldm_got.refcount.
3453
a4382ec6
TS
34542002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3455
3456 * elf64-mips.c: Update TODO comment.
3457 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
3458 mips_elf64_gprel16_reloca): Remove prototypes.
3459 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
3460 (UNUSED_RELOC): Replace by EMPTY_RELOC.
3461 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
3462 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
3463 R_MIPS_HIGHEST.
3464 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
3465 R_MIPS_GOT16. Remove wrong comments.
3466 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
3467 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
3468 from elf32-mips.c.
3469 (mips_elf64_hi16_reloc): Fix formatting.
3470 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
3471 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
3472 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
3473 (mips_elf64_gprel16_reloc): Make static. Add check for
3474 partial_inplace.
3475 (mips_elf64_gprel16_reloca): Remove.
3476 (mips_elf64_literal_reloc): New function.
3477 (mips_elf64_gprel32_reloc): Fix formatting.
3478 (mips_elf64_shift6_reloc): Fix comment. Make static.
3479 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
3480 elf32-mips.c.
3481 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
3482 elf32-mips.c
3483 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
3484 specific relocations.
3485 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
3486 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
3487 (ELF_MAXPAGESIZE): Add comment.
3488
219576a4
NC
34892002-07-25 Nick Clifton <nickc@redhat.com>
3490
3491 * po/sv.po: Updated Swedish translation.
3492 * po/es.po: Updated Spanish translation.
3493 * po/fr.po: Updated French translation.
3494
8c58d23b
AM
34952002-07-25 Alan Modra <amodra@bigpond.net.au>
3496
3497 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
3498 as elf_link_record_local_dynamic_symbol.
3499 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
3500 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
3501 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
3502 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
3503 attempt is made to record a symbol in a discarded section, and
3504 return `2' in that case.
3505
ff3063f5
NC
35062002-07-24 Nick Clifton <nickc@redhat.com>
3507
3508 * po/sv.po: Updated Swedish translation.
3509 * po/es.po: Updated Spanish translation.
3510
f0fe0e16
AM
35112002-07-23 Alan Modra <amodra@bigpond.net.au>
3512
c1fb5f8a
AM
3513 * po/SRC-POTFILES.in: Regenerate.
3514
f0fe0e16
AM
3515 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
3516 immediately. Remove code handling relocatable linking.
3517 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3518 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3519 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 3520 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
3521 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3522 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3523 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3524 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3525 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3526 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3527 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3528 * elf32-avr.c (elf_backend_rela_normal): Define.
3529 * elf32-cris.c: Likewise.
3530 * elf32-fr30.c: Likewise.
de2d743e 3531 * elf32-frv.c: Likewise.
f0fe0e16
AM
3532 * elf32-h8300.c: Likewise.
3533 * elf32-hppa.c: Likewise.
3534 * elf32-ip2k.c: Likewise.
3535 * elf32-sparc.c: Likewise.
3536 * elf32-v850.c: Likewise.
3537 * elf32-vax.c: Likewise.
3538 * elf64-hppa.c: Likewise.
3539 * elf64-sparc.c: Likewise.
3540 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 3541 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
3542 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3543 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3544 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3545 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3546 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3547 * elf-m10200.c (USE_RELA): Don't define.
3548 * elf-m10300.c: Likewise.
de2d743e 3549 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
3550 * elf32-i370.c: Likewise.
3551 * elf32-ip2k.c: Likewise.
3552 * elf32-m68k.c: Likewise.
3553 * elf32-mcore.c: Likewise.
3554 * elf32-ppc.c: Likewise.
3555 * elf32-s390.c: Likewise.
3556 * elf32-vax.c: Likewise.
3557 * elf64-ppc.c: Likewise.
3558 * elf64-s390.c: Likewise.
3559 * elf64-x86-64.c: Likewise.
3560 * elfxx-ia64.c: Likewise.
3561 * elf32-avr.c (USE_REL): Don't undef.
3562 * elf32-ip2k.c: Likewise.
3563
5e8d7549
NC
35642002-07-23 Nick Clifton <nickc@redhat.com>
3565
3566 * elf-bfd.h (struct elf_backend_data): Add new bitfield
3567 'want_p_paddr_set_to_zero'.
3568 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
3569 to false;
3570 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
3571 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
3572
9e12c7db
NC
35732002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
3574
3575 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
3576 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
3577 show the Copyright string.
3578 Minor formatting tidy ups.
3579
0461a601
NC
35802002-07-23 Nick Clifton <nickc@redhat.com>
3581
ff3063f5
NC
3582 * po/fr.po: Updated French translation.
3583 * po/sv.po: Updated Swedish translation.
0461a601 3584
fad2542d
AM
35852002-07-23 Alan Modra <amodra@bigpond.net.au>
3586
3587 * elflink.h (elf_link_input_bfd): Don't change internal symbols
3588 when outputting relocs.
3589
c0647bfc
JT
35902002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
3591
3592 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
3593 DT_PLTGOT into the dynamic section if there is a PLT.
3594
d01414a5
TS
35952002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3596
3597 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
3598 elf32-mips.c.
3599 (_bfd_mips_elf_write_section): Likewise.
3600 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
3601 (_bfd_mips_elf_write_section): Likewise.
3602 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
3603 (elf32_mips_write_section): Likewise.
3604 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
3605 (_bfd_mips_elf_write_section): Likewise.
3606
40c97fc6
AM
36072002-07-19 Alan Modra <amodra@bigpond.net.au>
3608
3609 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
3610 PT_IA_64_UNWIND segments for a given section.
3611
58378160
L
36122002-07-17 H.J. Lu <hjl@gnu.org>
3613
3614 * Makefile.am: Fix a typo.
3615 * Makefile.in: Regenerate.
3616
cf88bb9f
NC
36172002-07-15 Denis Chertykov <denisc@overta.ru>
3618 Frank Ch. Eigler <fche@redhat.com>
3619 Ben Elliston <bje@redhat.com>
3620 Alan Lehotsky <alehotsky@cygnus.com>
3621 John Healy <jhealy@redhat.com>
3622 Graham Stott <grahams@redhat.com>
3623 Jeff Johnston <jjohnstn@redhat.com>
3624
3625 * Makefile.am: Add support for ip2k.
3626 * Makefile.in: Regenerate.
3627 * doc/Makefile.in: Regenerate.
3628 * archures.c: Add support for ip2k.
3629 * config.bfd: Add support for ip2k.
3630 * configure.in: Add support for ip2k.
3631 * configure: Regenerate.
3632 * reloc.c: Add support for ip2k.
3633 * targets.c: Add support for ip2k.
3634 * bfd-in2.h: Regenerate.
3635 * libbfd.h: Regenerate.
3636 * cpu-ip2k.c: New file.
3637 * elf32-ip2k.c: New file.
3638
0dafd5f6
RE
36392002-07-17 Ian Rickards <irickard@arm.com>
3640
40c97fc6 3641 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
3642 just return the filename.
3643
36b08f12
AM
36442002-07-16 Moritz Jodeit <moritz@jodeit.org>
3645
3646 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
3647
58821868
AM
36482002-07-16 Alan Modra <amodra@bigpond.net.au>
3649
3650 * elflink.h: Formatting fixes, tidy prototypes.
3651 (elf_link_assign_sym_version): Move common code out of loop.
3652
c89583f8
AM
36532002-07-16 Alan Modra <amodra@bigpond.net.au>
3654
3655 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
3656 reloc section size is zero. Correct reloc output location.
3657
ba94744e
AM
36582002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
3659
3660 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
3661 the final type for the e_fsel selector when generating PA2.0W code.
3662 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
3663 relocations.
3664
96a94295
L
36652002-07-14 H.J. Lu <hjl@gnu.org>
3666
3667 * elflink.h (elf_link_assign_sym_version): Hide the default
3668 definition if there is a hidden versioned definition.
3669
6849c52f
HPN
36702002-07-12 Hans-Peter Nilsson <hp@axis.com>
3671
3672 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
3673 dynamic reference test in assertion when initializing GOT with
3674 static contents. Just assert that there are either no dynamic
3675 sections, the symbol is defined in the regular objects or that the
3676 symbol is undef weak. Tweak comment.
3677 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
3678 only if the symbol isn't defined in the program and isn't undef
3679 weak.
3680 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
3681 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
3682 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
3683 (elf_cris_discard_excess_program_dynamics): Don't consider
3684 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
3685
239e1f3a
AM
36862002-07-11 Alan Modra <amodra@bigpond.net.au>
3687
3688 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
3689 unresolved debugging relocs in dynamic applications.
3690 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3691 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3692 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3693 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3694 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3695 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3696
2f6d9989
AM
36972002-07-10 Alan Modra <amodra@bigpond.net.au>
3698
f5e87a1d
AM
3699 * elf64-ppc.c (ONES): Define.
3700 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
3701 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
3702 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
3703
2f6d9989
AM
3704 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
3705 (ppc64_elf_set_private_flags): Delete.
3706 (ppc64_elf_section_from_shdr): Delete.
3707 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
3708 (ppc64_elf_fake_sections): Delete.
3709 (bfd_elf64_bfd_set_private_flags): Don't define.
3710 (bfd_elf64_get_symbol_info): Likewise.
3711 (elf_backend_section_from_shdr): Likewise.
3712 (elf_backend_fake_sections): Likewise.
3713
0594c12d
AM
37142002-07-10 Marco Walther <Marco.Walther@sun.com>
3715
3716 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
3717 when not already set.
3718 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
3719 (elf_backend_fake_sections): Define.
3720
699cb9b8
AM
37212002-07-10 Alan Modra <amodra@bigpond.net.au>
3722
3723 * merge.c (_bfd_merge_section): Remove redundant output_section check.
3724 Formatting.
3725 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
3726
0a4787a0
HPN
37272002-07-09 Hans-Peter Nilsson <hp@axis.com>
3728
3729 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
3730 NULL sym_hashes to just before use.
3731 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
3732 symbol with non-default visibility.
3733 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
3734 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3735 Ditto.
3736 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
3737 symbol with non-default visibility.
3738 (cris_elf_check_relocs): At tests for local symbol before
3739 increasing h->plt.refcount, also check for non-default
3740 visibility. Ditto when checking for local symbol to eliminate
3741 pc-relative runtime relocs.
3742
aecc8f8a
AM
37432002-07-08 Alan Modra <amodra@bigpond.net.au>
3744
3745 * elf.c: Formatting.
3746 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
3747 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
3748 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
3749 segments.
3750
e9168c1e
MM
37512002-07-07 Mark Mitchell <mark@codesourcery.com>
3752 Alan Modra <amodra@bigpond.net.au>
3753
3754 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
3755 account the impact of relocation count overflow when computing
3756 section offsets.
3757 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
3758 or not to apply the PE COFF reloc overflow handling. Fix a
3759 fencepost error in deciding whether or not to use that technique.
3760
6cdc0ccc
AM
37612002-07-07 Alan Modra <amodra@bigpond.net.au>
3762
3763 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
3764 change type of locsyms.
3765 (bfd_elf_get_elf_syms): Declare.
3766 * elf.c (bfd_elf_get_elf_syms): New function.
3767 (group_signature): Use bfd_elf_get_elf_syms.
3768 (bfd_section_from_r_symndx): Likewise.
3769 * elfcode.h (elf_slurp_symbol_table): Likewise.
3770 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3771 (elf_link_add_object_symbols): Likewise. Reorganise to increase
3772 locality of various data structures. Properly free internal relocs.
3773 (elf_bfd_final_link): Properly free internal relocs.
3774 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
3775 (elf_link_input_bfd): Likewise.
3776 (elf_gc_mark): Likewise. Properly free internal relocs.
3777 (elf_gc_sweep): Properly free internal relocs.
3778 (elf_reloc_symbol_deleted_p): No need to swap syms in.
3779 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
3780 internal relocs.
3781 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
3782 Properly free possibly cached info.
3783 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
3784 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
3785 symbol swapping code.
3786 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
3787 Properly free possibly cached info.
3788 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
3789 (mn10300_elf_relax_delete_bytes): Likewise.
3790 (mn10300_elf_symbol_address_p): Likewise.
3791 (mn10300_elf_get_relocated_section_contents): Likewise.
3792 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
3793 (elf32_h8_relax_delete_bytes): Likewise.
3794 (elf32_h8_symbol_address_p): Likewise.
3795 (elf32_h8_get_relocated_section_contents): Likewise.
3796 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
3797 (m32r_elf_relax_delete_bytes): Likewise.
3798 (m32r_elf_get_relocated_section_contents): Likewise.
3799 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
3800 elf_section_data to determine whether cached.
3801 (sh_elf_relax_section): As above for elf-m10200.c.
3802 (sh_elf_relax_delete_bytes): Likewise.
3803 (sh_elf_get_relocated_section_contents): Likewise.
3804 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
3805 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
3806 reading of local syms.
3807 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3808 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
3809 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
3810 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
3811 relocs.
3812 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
3813 free internal relocs and section contents. Don't read symbols.
3814 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
3815 (elf32_hppa_size_stubs): Don't free local syms.
3816 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
3817 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
3818 possibly cached info.
3819 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3820 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
3821 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
3822 all_local_syms.
3823 (get_local_syms): Delete function.
3824 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
3825 on exit.
3826 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
3827
b3212001
JW
38282002-07-05 Jim Wilson <wilson@redhat.com>
3829
3830 * syms.c (decode_section_type): New.
3831 (bfd_decode_symclass): Call decode_section_type.
3832
894bb1ee
JJ
38332002-07-04 Jakub Jelinek <jakub@redhat.com>
3834
3835 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
3836 section content start.
3837 Reported by Michael Schumacher <mike@hightec-rt.com>.
3838
bc0ba537
AM
38392002-07-04 Alan Modra <amodra@bigpond.net.au>
3840
3841 * section.c (_bfd_strip_section_from_output): Remove unnecessary
3842 link order code. Don't actually remove the output section here;
3843 Just set a flag for the linker to do so.
3844 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
3845 sections when setting up output section dynsyms.
3846
797fc050
AM
38472002-07-04 Alan Modra <amodra@bigpond.net.au>
3848
3849 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
3850 fudge.
3851 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
3852 libs here instead.
3853
99881371
MS
38542002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
3855
3856 * elf64-s390.c (create_got_section): Set .got section alignment to
3857 8 bytes.
3858 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
3859
47d9a591
AM
38602002-07-02 Alan Modra <amodra@bigpond.net.au>
3861
3862 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
3863
179d3252
JT
38642002-07-01 Matt Thomas <matt@3am-software.com>
3865
3866 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
3867 to EF_VAX_*.
3868
4a14403c
TS
38692002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3870
3871 * elfxx-mips.c (ABI_64_P): Fix comment.
3872 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
3873 new section names for N64 ABI.
3874 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
3875 (mips_elf_calculate_relocation): Code formatting.
3876 (mips_elf_create_dynamic_relocation): Likewise.
3877 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
3878 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
3879 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
3880 in any NewABI.
3881 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
3882 for NewABI.
3883 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
3884 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
3885 here, too.
3886
607c0e09
AS
38872002-07-01 Andreas Schwab <schwab@suse.de>
3888
3889 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
3890 R_X86_64_64 to R_X86_64_RELATIVE.
3891
ba26fd96
AM
38922002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
3893
3894 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
3895 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
3896 Run "make dep-am".
3897 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
3898 host_aout_vec.
3899 * configure.in (vaxbsd_vec): Add.
3900 * targets.c (vaxbsd_vec): Add.
3901 * Makefile.in: Rebuild.
3902 * configure: Rebuild.
3903 * po/SRC-POTFILES.in: Rebuild.
3904
1e2f5b6e
AM
39052002-07-01 Alan Modra <amodra@bigpond.net.au>
3906
3907 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
3908 examining to gc_mark_hook, rather than the bfd.
3909 (elf_gc_sections): Adjust.
3910 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
3911 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
3912 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
3913 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
3914 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
3915 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
3916 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
3917 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
3918 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
3919 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
3920 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
3921 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
3922 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
3923 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
3924 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
3925 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
3926 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
3927 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
3928 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
3929 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
3930 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
3931 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
3932 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
3933 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
3934 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
3935 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
3936 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
3937 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
3938 redundant local sym tests.
3939 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
3940 (link_hash_newfunc): Init is_entry.
3941 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
3942 (ppc64_elf_link_hash_table_create): Init all_local_syms.
3943 (create_linkage_sections): Use bfd_make_section_anyway rather than
3944 bfd_make_section.
3945 (ppc64_elf_mark_entry_syms): New function.
3946 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
3947 up opd entry to function section map.
3948 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
3949 relocs that reference the opd section.
3950 (edit_opd): New function.
3951 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
3952 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
3953 (get_local_syms): Do so here. Exit if we already have local syms.
3954 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
3955 read local syms on non-ELF input.
3956 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
3957 than duplicating it's function here. Adjust free of internal
3958 relocs to suit.
3959 (ppc64_elf_relocate_section): Adjust local syms in opd section.
3960 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
3961 * elf32-hppa.c (elf32_hppa_size_stubs): Call
3962 _bfd_elf32_link_read_relocs rather than duplicating it's function
3963 here. Adjust free of internal relocs to suit.
3964
1b71fb54
AJ
39652002-07-01 Andreas Jaeger <aj@suse.de>
3966
3967 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
3968 are not allowed in shared libs code, enforce -fPIC.
3969
8d28f606
HPN
39702002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
3971
3972 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
3973 trailing zero-sequences when there's previous left-over data.
3974
5ac81c74
JL
39752002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
3976
3977 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
3978 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
3979 and opd_rel_sec in order for starting rela section. Check _raw_size.
3980 (elf_backend_reloc_type_class): Define.
3981
91a4d569
AM
39822002-06-27 Kevin Buettner <kevinb@redhat.com>
3983
3984 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
3985 DWARF2 formats.
3986
feee612b
AM
39872002-06-27 Alan Modra <amodra@bigpond.net.au>
3988
3989 * cpu-powerpc.c: Comment on ordering of arch_info.
3990 * elf32-ppc.c (ppc_elf_object_p): New function.
3991 (elf_backend_object_p): Define.
3992 * elf64-ppc.c (ppc64_elf_object_p): New function.
3993 (elf_backend_object_p): Define.
3994
a4e6cefc
JT
39952002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
3996
3997 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
3998 * configure: Regenerate.
3999
dae2dd0d
NC
40002002-06-25 Jason Eckhardt <jle@rice.edu>
4001
4002 * dwarf2.c (decode_line_info): Check unit->addr_size
4003 to read in the proper number of prologue bytes.
4004
680f9d5c
NC
40052002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
4006
4007 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
4008 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
4009 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
4010 been enabled.
dae2dd0d 4011
680f9d5c
NC
4012 * targets.c (_bfd_target_vector[]): Only include
4013 aix5coff64_vec if 64-bit bfd support has been enabled.
4014
d4c88bbb
AM
40152002-06-25 Alan Modra <amodra@bigpond.net.au>
4016
4017 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
4018 * elf32-hppa.c (hppa_add_stub): Likewise.
4019 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4020 * elflink.h (elf_add_default_symbol): Fix comment typo.
4021 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
4022 (elf_link_add_object_symbols): Likewise.
4023 (elf_link_assign_sym_version): Likewise.
4024 * hash.c (bfd_hash_lookup): Likewise.
4025 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4026 * section.c (bfd_get_unique_section_name): Likewise.
4027 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
4028 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
4029 (assign_section_numbers): Likewise.
4030 (_bfd_elfcore_make_pseudosection): Likewise.
4031 (elfcore_grok_lwpstatus): Likewise.
4032 (elfcore_grok_win32pstatus): Likewise.
4033 (elfcore_write_note): Constify input params. Use PTR instead of
4034 void *. Include terminating NUL in namesz. Correct padding.
4035 Support NULL "name" param. Use memcpy instead of strcpy.
4036 (elfcore_write_prpsinfo): Constify input params.
4037 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
4038 (elfcore_write_lwpstatus): Likewise.
4039 (elfcore_write_pstatus): Likewise.
4040 (elfcore_write_prfpreg): Likewise.
4041 (elfcore_write_prxfpreg): Likewise.
4042 * elf-bfd.h (elfcore_write_note): Update declaration.
4043 (elfcore_write_prpsinfo): Likewise.
4044 (elfcore_write_prstatus): Likewise.
4045 (elfcore_write_pstatus): Likewise.
4046 (elfcore_write_prfpreg): Likewise.
4047 (elfcore_write_prxfpreg): Likewise.
4048 (elfcore_write_lwpstatus): Likewise.
4049
b0ac09d2
NC
40502002-06-25 Jason Eckhardt <jle@rice.edu>
4051
4052 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
4053 symbols of type stProc and stStaticProc.
4054
40552002-06-25 Nick Clifton <nickc@redhat.com>
4056
4057 * ecoff.c: VArious formatting fixes.
4058
021d6096
AM
40592002-06-25 Alan Modra <amodra@bigpond.net.au>
4060
4061 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
4062
82e51918
AM
40632002-06-25 Alan Modra <amodra@bigpond.net.au>
4064
4065 * aout-adobe.c: Don't compare against "true" or "false.
4066 * aout-target.h: Likewise.
4067 * aoutx.h: Likewise.
4068 * archive.c: Likewise.
4069 * bout.c: Likewise.
4070 * cache.c: Likewise.
4071 * coff-a29k.c: Likewise.
4072 * coff-alpha.c: Likewise.
4073 * coff-i386.c: Likewise.
4074 * coff-mips.c: Likewise.
4075 * coff-or32.c: Likewise.
4076 * coff64-rs6000.c: Likewise.
4077 * coffcode.h: Likewise.
4078 * coffgen.c: Likewise.
4079 * cpu-ns32k.c: Likewise.
4080 * ecoff.c: Likewise.
4081 * ecofflink.c: Likewise.
4082 * elf.c: Likewise.
4083 * elf32-arm.h: Likewise.
4084 * elf32-cris.c: Likewise.
4085 * elf32-d30v.c: Likewise.
4086 * elf32-i386.c: Likewise.
4087 * elf32-mcore.c: Likewise.
4088 * elf32-ppc.c: Likewise.
4089 * elf32-sh.c: Likewise.
4090 * elf32-sh64.c: Likewise.
4091 * elf32-v850.c: Likewise.
4092 * elf64-alpha.c: Likewise.
4093 * elf64-sh64.c: Likewise.
4094 * elfcode.h: Likewise.
4095 * elfcore.h: Likewise.
4096 * elflink.h: Likewise.
4097 * elfxx-mips.c: Likewise.
4098 * i386os9k.c: Likewise.
4099 * ieee.c: Likewise.
4100 * libbfd.c: Likewise.
4101 * linker.c: Likewise.
4102 * mmo.c: Likewise.
4103 * nlm32-alpha.c: Likewise.
4104 * nlm32-i386.c: Likewise.
4105 * nlm32-ppc.c: Likewise.
4106 * nlm32-sparc.c: Likewise.
4107 * nlmcode.h: Likewise.
4108 * oasys.c: Likewise.
4109 * pdp11.c: Likewise.
4110 * peicode.h: Likewise.
4111 * reloc.c: Likewise.
4112 * som.c: Likewise.
4113 * srec.c: Likewise.
4114 * tekhex.c: Likewise.
4115 * vms.c: Likewise.
4116 * xcofflink.c: Likewise.
4117 * elf64-sparc.c: Edit comment to not use "== false".
4118
4119 * aoutf1.h: Don't use "? true : false".
4120 * ecoff.c: Likewise.
4121 * format.c: Likewise.
4122 * ieee.c: Likewise.
4123 * linker.c: Likewise.
4124 * mmo.c: Likewise.
4125 * oasys.c: Likewise.
4126
48fc70a2
AM
41272002-06-23 H.J. Lu <hjl@gnu.org>
4128
4129 * elflink.h (elf_link_add_archive_symbols): For the default
4130 version, check references with only one `@' first.
4131
47b7c2db
AM
41322002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
4133
4134 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
4135 function.
4136 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
4137 symbol table.
4138 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
4139 (elf64_hppa_size_dynamic_sections): Revise to use
4140 elf64_hppa_mark_milli_and_exported_functions.
4141 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
4142 symbols out of dynamic symbol table.
4143
f5d44ba0
AM
41442002-06-23 Alan Modra <amodra@bigpond.net.au>
4145
bb3fff1e
AM
4146 * Makefile.in: Regenerate.
4147 * libbfd.h: Regenerate.
4148 * bfd-in2.h: Regenerate.
4149 * configure: Regenerate.
4150 * po/SRC-POTFILES.in: Regenerate.
4151
f5d44ba0
AM
4152 * elflink.h: Comment typo fixes.
4153
41542002-06-23 H.J. Lu <hjl@gnu.org>
4155
4156 * elf-bfd.h (elf_link_loaded_list): New structure.
4157 (elf_link_hash_table): Add "loaded".
4158 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
4159 * elflink.h (elf_link_check_versioned_symbol): New function.
4160 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
4161
cc36acdf
NC
41622002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
4163
4164 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 4165 support an ELF style hash table, return true, indicating that
cc36acdf
NC
4166 nothing needed to be done, rather than false, indicating that the
4167 section's size could not be computed.
4168
4e5ba5b7
DB
41692002-06-18 Dave Brolley <brolley@redhat.com>
4170
4171 From Catherine Moore, Michael Meissner, Dave Brolley:
4172 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
4173 * targets.c: Support bfd_elf32_frv_vec.
4174 * reloc.c: Add FRV relocs.
4175 * configure.in: Add support for bfd-elf32-frv-vec.
4176 * config.bfd (targ_cpu): Add support for frv-*-elf.
4177 * archures.c: Add frv arch and machines.
4178 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
4179 (ALL_MACHINES_CFILES): Add cpu-frv.c.
4180 (BFD32_BACKENDS): Add elf32-frv.lo.
4181 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
4182 (cpu-frv.lo): New target.
4183 (elf32-frv.lo): New target.
4184 * cpu-frv.c: New file.
4185 * elf32-frv.c: New file.
4186
7ece0d85
JJ
41872002-06-18 Jakub Jelinek <jakub@redhat.com>
4188
4189 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
4190 e_shnum == 0.
4191 Only read the first section header if e_shoff is non-zero.
4192 Don't consider e_shstrndx if there are no sections.
4193
57fb03ac
TR
41942002-06-17 Tom Rix <trix@redhat.com>
4195
4196 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 4197 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
4198 complain_overflow_bitfield.
4199
341ca622
AM
42002002-06-17 Alan Modra <amodra@bigpond.net.au>
4201
767e34d1
AM
4202 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
4203 (bfd_fdopenr): Likewise.
4204 (bfd_openstreamr): Likewise.
4205 (bfd_openw): Likewise.
4206
341ca622
AM
4207 * targets.c: Sort target vecs.
4208 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
4209 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
4210 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
4211 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
4212 * configure.in: Sort target vecs. Add m88kmach3_vec.
4213 * configure: Regenerate.
4214
dfbbae4c
HPN
42152002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
4216
4217 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
4218 bpo_reloc_no to break sort order ties, not address of items.
4219
d663e1cd
JL
42202002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4221
4222 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
4223 Skip excluded sections in determing __gp value.
4224 (elf_hppa_final_link_relocate): Use the symbol's address in
4225 R_PARISC_FPTR64 relocations that don't need an opd entry.
4226 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
4227 (elf64_hppa_finalize_dynreloc): Likewise.
4228 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
4229 (elf64_hppa_finish_dynamic_symbol): Break up assert.
4230
a8295218
NC
42312002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
4232
4233 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4234 alignment for .bss, .data and .text sections so that sse and sse2
4235 code will work.
4236 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4237
42382002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
4239
4240 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
4241 sh[1234]*-elf*.
4242
3db4b612
JL
42432002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4244
2cb69dd3
JL
4245 * elflink.h (elf_bfd_final_link): Improve error handling for missing
4246 dynamic sections.
4247
3db4b612
JL
4248 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
4249 for a symbol that has no output section.
4250 (allocate_dynrel_entries): Correct comment.
4251 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
4252 unless we want one.
4253 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
4254 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
4255 with no section. Remove unnecessary parentheses.
4256
f3813499
TR
42572002-06-11 Tom Rix <trix@redhat.com>
4258
4259 * coffcode.h (coff_compute_section_file_positions): Add data
4260 section to AIX loader alignment check.
4261
f5d44ba0 4262 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
4263 alignment to 4 bytes.
4264 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
4265 power accessor macro.
4266 (do_shared_object_padding): Remove invalid assertion.
4267
0ebaf185
RS
42682002-06-10 Richard Sandiford <rsandifo@redhat.com>
4269
4270 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
4271 for removed output sections.
4272
ebe3e2d1
NC
42732002-06-10 Geoffrey Keating <geoffk@redhat.com>
4274
4275 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
4276 htab_alloc.
4277 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
4278
0b14c2aa
L
42792002-06-08 H.J. Lu <hjl@gnu.org>
4280
4281 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
4282 work around a long long bug in gcc 2.96 on mips.
4283
3c2bfad6
JT
42842002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
4285
4286 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
4287 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
4288 Regenerate dependency lists.
4289 * Makefile.in: Regenerate.
4290 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
4291 vax1knetbsd_vec to targ_selvecs.
4292 * configure.in: Add vax1knetbsd_vec.
4293 * configure: Regenerate.
4294 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
4295 * vax1knetbsd.c: New file.
4296 * vaxnetbsd.c: Update copyright years.
4297 (TARGET_PAGE_SIZE): Set to 0x1000.
4298 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
4299
91149be3
JT
43002002-06-08 Matt Thomas <matt@3am-software.com>
4301
4302 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
4303
21e15248
AM
43042002-06-08 Alan Modra <amodra@bigpond.net.au>
4305
4306 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
4307
986b7daa
AM
43082002-06-08 Alan Modra <amodra@bigpond.net.au>
4309
e90b95f6
AM
4310 * Makefile.am: Run "make dep-am".
4311 * Makefile.in: Regenerate.
4312
3f9c735e
AM
4313 * armnetbsd.c: Replace CONST with const.
4314 * corefile.c: Likewise.
4315 * elf32-dlx.c: Likewise.
4316 * elf64-mips.c: Likewise.
4317 * mmo.c: Likewise.
4318 * ns32knetbsd.c: Likewise.
4319
986b7daa
AM
4320 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
4321 table is elf64-sparc.
4322
5a659663
TS
43232002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4324
4325 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
4326 Fix RELA addends to get not shifted in the result. Don't do special
4327 handling of R_MIPS_64 for NewABI.
4328
9bab7074
AM
43292002-06-07 Alan Modra <amodra@bigpond.net.au>
4330
4331 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4332 (NAME(aout,slurp_reloc_table)): Likewise.
4333 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
4334 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
4335 (xcoff_write_archive_contents_big): Likewise.
4336 (xcoff_generate_rtinit): Likewise.
4337 (xcoff_generate_rtinit): Likewise, and check error return.
4338 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4339 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
4340 (coff_get_normalized_symtab): Likewise.
4341 (coff_make_empty_symbol): Likewise.
4342 (bfd_coff_set_symbol_class): Likewise.
4343 * cofflink.c (coff_link_add_symbols): Likewise.
4344 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
4345 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
4346 (bfd_ecoff_write_accumulated_debug): Likewise.
4347 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
4348 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
4349 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
4350 * ieee.c (do_with_relocs): Use bfd_zalloc.
4351 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
4352 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4353 (NAME(aout,slurp_reloc_table)): Likewise.
4354 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
4355 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
4356 * som.c (som_build_and_write_symbol_table): Likewise.
4357 (som_slurp_string_table): Likewise.
4358 (som_slurp_symbol_table): Likewise.
4359 (som_bfd_ar_write_symbol_stuff): Likewise.
4360 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
4361 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
4362 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
4363 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
4364 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
4365
1126897b
AM
43662002-06-07 Alan Modra <amodra@bigpond.net.au>
4367
4368 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
4369 "group" union.
4370 (elf_group_name): Update.
4371 (elf_group_id): Define.
4372 (bfd_elf_set_group_contents): Declare.
4373 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
4374 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
4375 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
4376 that sym for the signature.
4377 (_bfd_elf_compute_section_file_positions): Don't call
4378 set_group_contents for "ld -r" case.
4379 (swap_out_syms): Use bfd_zalloc.
4380 * elflink.h (elf_link_add_archive_symbols): Likewise.
4381 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4382 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
4383
3fad3c7c
AM
43842002-06-07 Alan Modra <amodra@bigpond.net.au>
4385
4386 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
4387 relocs in opd for non-shared too.
4388
10f469bf 43892002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
4390
4391 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
4392 relocations.
4393
7217313c
NC
43942002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
4395
4396 * merge.c: Include libiberty.h.
4397 * elf-strtab.c: Include libiberty.h.
4398
6cb22815
AM
43992002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
4400
4401 * peXXigen.c (pe_print_idata): Remove unused variable.
4402
1ed89aa9
NC
44032002-06-06 David Heine <dlheine@tensilica.com>
4404
4405 * elf.c (assign_file_positions_for_segments): Remove unallocated
4406 sections from the section to segment mapping for PT_LOAD segments.
4407 Update comment about empty loadable segments.
4408
644c4c80
RS
44092002-06-06 Richard Sandiford <rsandifo@redhat.com>
4410
4411 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
4412 is within the .stabstr section.
4413
f8ecb12b
AM
44142002-06-06 Alan Modra <amodra@bigpond.net.au>
4415
4416 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
4417 are "const PTR", not "const PTR *".
4418 (bfd_elf32_swap_symbol_in): Likewise.
4419 (bfd_elf64_swap_symbol_in): Likewise.
4420 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
4421 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4422 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4423 (elf_link_add_object_symbols): Likewise.
4424 (elf_link_record_local_dynamic_symbol): Likewise.
4425 (elf_link_input_bfd): Likewise.
4426 (elf_gc_mark): Likewise.
4427 (elf_reloc_symbol_deleted_p): Likewise.
4428 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4429 (mn10200_elf_relax_delete_bytes): Likewise.
4430 (mn10200_elf_symbol_address_p): Likewise.
4431 (mn10200_elf_get_relocated_section_contents): Likewise.
4432 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4433 (mn10300_elf_relax_section): Likewise.
4434 (mn10300_elf_relax_delete_bytes): Likewise.
4435 (mn10300_elf_symbol_address_p): Likewise.
4436 (mn10300_elf_get_relocated_section_contents): Likewise.
4437 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4438 (elf32_h8_relax_delete_bytes): Likewise.
4439 (elf32_h8_symbol_address_p): Likewise.
4440 (elf32_h8_get_relocated_section_contents): Likewise.
4441 * elf32-hppa.c (get_local_syms): Likewise.
4442 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4443 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4444 * elf32-sh.c (sh_elf_relax_section): Likewise.
4445 (sh_elf_relax_delete_bytes): Likewise.
4446 (sh_elf_get_relocated_section_contents): Likewise.
4447 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4448 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4449 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4450 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4451 * elf64-ppc.c (get_local_syms): Likewise.
4452 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4453 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4454
1ed89aa9 44552002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
4456
4457 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
4458
73ff0d56
AM
44592002-06-05 Alan Modra <amodra@bigpond.net.au>
4460
9dce4196
AM
4461 * elf.c (group_signature): Swap in the whole symbol, and handle
4462 extracting section symbol names.
4463 (setup_group): Add comment.
4464 (set_group_contents): When called from objcopy or ld, arrange for
4465 section contents to be written. Write group member output section
4466 indices to allow objcopy to reorganize sections.
4467 (_bfd_elf_copy_private_section_data): Copy group info.
4468
73ff0d56
AM
4469 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
4470 (bfd_elf32_swap_symbol_in): Update prototype.
4471 (bfd_elf64_swap_symbol_in): Likewise.
4472 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
4473 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4474 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4475 (elf_link_add_object_symbols): Likewise.
4476 (elf_link_record_local_dynamic_symbol): Likewise.
4477 (elf_link_input_bfd): Likewise.
4478 (elf_gc_mark): Likewise.
4479 (elf_reloc_symbol_deleted_p): Likewise.
4480 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4481 (mn10200_elf_relax_delete_bytes): Likewise.
4482 (mn10200_elf_symbol_address_p): Likewise.
4483 (mn10200_elf_get_relocated_section_contents): Likewise.
4484 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4485 (mn10300_elf_relax_section): Likewise.
4486 (mn10300_elf_relax_delete_bytes): Likewise.
4487 (mn10300_elf_symbol_address_p): Likewise.
4488 (mn10300_elf_get_relocated_section_contents): Likewise.
4489 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4490 (elf32_h8_relax_delete_bytes): Likewise.
4491 (elf32_h8_symbol_address_p): Likewise.
4492 (elf32_h8_get_relocated_section_contents): Likewise.
4493 * elf32-hppa.c (get_local_syms): Likewise.
4494 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4495 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4496 * elf32-sh.c (sh_elf_relax_section): Likewise.
4497 (sh_elf_relax_delete_bytes): Likewise.
4498 (sh_elf_get_relocated_section_contents): Likewise.
4499 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4500 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4501 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4502 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4503 * elf64-ppc.c (get_local_syms): Likewise.
4504 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4505 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4506 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
4507 * elf64-alpha.c (alpha_elf_size_info): Likewise.
4508 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4509 * elf64-mips.c (mips_elf64_size_info): Likewise.
4510 * elf64-s390.c (s390_elf64_size_info): Likewise.
4511 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4512
53bfd6b4
MR
45132002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4514
4515 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
4516 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
4517 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
4518 _bfd_mips_elf_ignore_discarded_relocs.
4519 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
4520
d4df96e6
L
45212002-06-05 H.J. Lu <hjl@gnu.org>
4522
4523 * elfxx-mips.c (mips_elf_calculate_relocation): Call
4524 _bfd_elf_rel_local_sym for STT_SECTION relocations against
4525 the SEC_MERGE section.
4526
e61463e1
AM
45272002-06-05 Alan Modra <amodra@bigpond.net.au>
4528
3cac74d0
AM
4529 * coff-alpha.c: Update copyright date.
4530 * coff-mips.c: Likewise.
4531 * xcoff-target.h: Likewise.
4532
e61463e1
AM
4533 * bfd-in.h: Remove "taken from the source" comment.
4534 * libbfd-in.h: Likewise.
4535 * libcoff-in.h: Likewise.
4536 * bfd-in2.h: Regenerate.
4537 * libbfd.h: Regenerate.
4538 * libcoff.h: Regenerate.
4539
4540 * elf.c (bfd_elf_discard_group): Return true.
4541 * elf-bfd.h (bfd_elf_discard_group): Declare.
4542 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
4543 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
4544 * bfd.c (bfd_discard_group): Define.
4545 * targets.c (struct bfd_target): Add _bfd_discard_group.
4546 (BFD_JUMP_TABLE_LINK): Here too.
4547 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
4548 * aout-adobe.c (aout_32_bfd_discard_group): Define.
4549 * aout-target.h (MY_bfd_discard_group): Define.
4550 * aout-tic30.c (MY_bfd_discard_group): Define.
4551 * binary.c (binary_bfd_discard_group): Define.
4552 * bout.c (b_out_bfd_discard_group): Define.
4553 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
4554 * coffcode.h (coff_bfd_discard_group): Define.
4555 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
4556 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
4557 * i386msdos.c (msdos_bfd_discard_group): Define.
4558 * i386os9k.c (os9k_bfd_discard_group): Define.
4559 * ieee.c (ieee_bfd_discard_group): Define.
4560 * ihex.c (ihex_bfd_discard_group): Define.
4561 * mmo.c (mmo_bfd_discard_group): Define.
4562 * nlm-target.h (nlm_bfd_discard_group): Define.
4563 * oasys.c (oasys_bfd_discard_group): Define.
4564 * ppcboot.c (ppcboot_bfd_discard_group): Define.
4565 * som.c (som_bfd_discard_group): Define.
4566 * srec.c (srec_bfd_discard_group): Define.
4567 * tekhex.c (tekhex_bfd_discard_group): Define.
4568 * versados.c (versados_bfd_discard_group): Define.
4569 * vms.c (vms_bfd_discard_group): Define.
4570 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
4571 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
4572 (aix5coff64_vec): Likewise.
4573 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
4574
9cba27b2
JT
45752002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4576
4577 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
4578 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
4579 (elf32-sh64-com.lo): New dependency list.
4580 * Makefile.in: Regenerate.
4581 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
4582 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
4583 elf32-sh64-com.lo.
4584 * configure: Regenerate.
4585 * elf32-sh64.c (sh64_address_in_cranges)
4586 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
4587 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
4588 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
4589 * elf32-sh64-com.c: ...here. New file.
4590
8d2c33be
AM
45912002-06-04 Alan Modra <amodra@bigpond.net.au>
4592
4593 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
4594 ATTRIBUTE_UNUSED on used params.
4595 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
4596 before calling bfd_section_from_elf_index on local syms.
4597 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4598
5b0e55b6
JT
45992002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4600
4601 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
4602 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
4603 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
4604 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
4605 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
4606 * Makefile.in: Regenerate.
4607 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
4608 (sh64-*-netbsd*): New targets.
4609 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
4610 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
4611 * configure: Regenerate.
4612 * elf32-sh64-nbsd.c: New file.
4613 * elf64-sh64-nbsd.c: New file.
4614 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
4615 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
4616 bfd_elf64_sh64lnbsd_vec.
4617
b885599b
AM
46182002-06-04 Alan Modra <amodra@bigpond.net.au>
4619
4620 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
4621 (bfd_section_from_shdr): Likewise. Set section name of group
4622 sections from signature.
4623 (group_signature): Split out from setup_group. Ensure symbol table
4624 is available.
4625 (bfd_elf_discard_group): New function.
4626 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
4627 .gnu.linkonce* sections if they are members of a group.
4628 (set_group_contents): Set GRP_COMDAT flag.
4629 * section.c (bfd_discard_group): New function.
4630 * bfd-in.h (bfd_elf_discard_group): Declare.
4631 * bfd-in2.h: Regenerate.
4632 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
4633 (elf_linkonce_p): Define.
4634
90937f86
AM
46352002-06-04 Alan Modra <amodra@bigpond.net.au>
4636
4637 * elf.c (bfd_section_from_shdr): Make "name" const.
4638 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
4639 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
4640 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
4641 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
4642 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
4643 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
4644 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
4645 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
4646 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
4647 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
4648 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
4649
cf6fb9ce
MR
46502002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4651
4652 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
4653 ABI.
4654
cedb70c5
KH
46552002-06-02 Kazu Hirata <kazu@cs.umass.edu>
4656
4657 * elf32-arc.c: Fix formatting.
4658 * elf32-arm.h: Likewise.
4659 * elf32-cris.c: Likewise.
4660 * elf32-dlx.c: Likewise.
4661 * elf32-hppa.c: Likewise.
4662 * elf32-i386.c: Likewise.
4663 * elf32-i386qnx.c: Likewise.
4664 * elf32-or32.c: Likewise.
4665 * elf32-s390.c: Likewise.
4666 * elf32-sh64.c: Likewise.
4667 * elf32-vax.c: Likewise.
4668 * elf32-xstormy16.c: Likewise.
4669 * elf64-alpha.c: Likewise.
4670 * elf64-mmix.c: Likewise.
4671 * elf64-ppc.c: Likewise.
4672 * elf64-s390.c: Likewise.
4673 * elf64-sh64.c: Likewise.
4674 * elf64-x86-64.c: Likewise.
4675
048d873d
RH
46762002-06-02 Richard Henderson <rth@redhat.com>
4677
4678 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
4679 null when there are no got entries for a symbol.
4680 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
4681 uninitialized variable warning.
4682
4a67a098
RH
46832002-06-01 Richard Henderson <rth@redhat.com>
4684
4685 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
4686 undefined symbols here.
4687 (elf64_alpha_relax_section): Do it here. Also test for not
4688 defined in the current module.
4689 (elf64_alpha_relocate_section_r): Split out of ...
4690 (elf64_alpha_relocate_section): ... here. Don't dereference
4691 NULL when looking up local got entries.
4692
f44f99a5
RH
46932002-06-01 Richard Henderson <rth@redhat.com>
4694
4695 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
4696 symbols from JSR relaxation.
4697 (elf64_alpha_size_plt_section_1): New.
4698 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
4699 (elf64_alpha_size_rela_got_1): ... here.
4700 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
4701 (elf64_alpha_size_rela_got_section): ... here.
4702 (elf64_alpha_size_plt_section): New.
4703 (elf64_alpha_relax_section): Call them.
4704 (elf64_alpha_size_got_sections): Remove output_bfd arg.
4705 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
4706
9e756d64
RH
47072002-06-01 Richard Henderson <rth@redhat.com>
4708
4709 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
4710 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
4711 in shared libraries. Fix DTPRELHI and TPRELHI value.
4712 (INSN_ADDQ, INSN_RDUNIQ): New.
4713 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
4714 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
4715 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
4716 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
4717 Handle GOTDTPREL and GOTTPREL relocations.
4718 (elf64_alpha_relax_gprelhilo): New.
4719 (elf64_alpha_relax_tls_get_addr): New.
4720 (elf64_alpha_relax_find_tls_segment): New.
4721 (elf64_alpha_relax_section): Handle TLS relocations.
4722 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
4723 (elf64_alpha_check_relocs): Set it.
4724
c853d7f6
RH
47252002-06-01 Richard Henderson <rth@redhat.com>
4726
b646261c
RH
4727 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
4728
c853d7f6
RH
4729 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
4730 check; don't suppress dynamic relocs for non-allocated sections.
4731
d7e41a96
RH
4732 * elf64-alpha.c: Remove dead code.
4733
5f333394
AM
47342002-05-31 Alan Modra <amodra@bigpond.net.au>
4735
08e0ee05
AM
4736 * bfd-in2.h: Regenerate.
4737 * libbfd.h: Regenerate.
4738 * po/SRC-POTFILES.in: Regenerate.
4739
5f333394
AM
4740 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
4741 space for bss .plt.
4742
caf47ea6
AM
47432002-05-31 Graeme Peterson <gp@qnx.com>
4744
4745 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
4746 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
4747 Run "make dep-am".
4748 * Makefile.in: Regenerate.
4749 * config.bfd: Add i[3456]86-*-nto-qnx* support.
4750 * configure.in: Add bfd_elf32_i386qnx_vec support.
4751 * configure: Regenerate.
4752 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
4753 is_contained_by_filepos, and copy_private_bfd_data_p.
4754 * elf.c (assign_file_positions_for_segments): Call backend
4755 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
4756 (IS_CONTAINED_BY_FILEPOS): Define.
4757 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
4758 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
4759 Fix non-K&R call to _bfd_error_handler.
4760 (_bfd_elf_copy_private_section_data): Use backend
4761 copy_private_bfd_data_p.
4762 * elf32-i386.c: Don't include elfxx-target.h when
4763 ELF32_I386_C_INCLUDED is defined.
4764 * elf32-i386qnx.c: New QNX elf backend file.
4765 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
4766 elf_backend_is_contained_by_filepos, and
4767 elf_backend_do_copy_private_bfd_data.
4768 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
4769
5bc56484
AM
47702002-05-31 Alan Modra <amodra@bigpond.net.au>
4771
4772 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
4773 Move other similar defines to start of file.
4774
1b164155
TR
47752002-05-30 Tom Rix <trix@redhat.com>
4776
4777 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
4778 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
4779
3765b1be
RH
47802002-05-30 Richard Henderson <rth@redhat.com>
4781
4782 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
4783 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
4784 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
4785 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
4786 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
4787 (struct alpha_elf_obj_tdata): Rename total_got_entries and
4788 n_local_got_entries to total_got_size and local_got_size.
4789 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
4790 (alpha_got_entry_size): New.
4791 (elf64_alpha_relax_with_lituse): Use it.
4792 (elf64_alpha_relax_without_lituse): Likewise.
4793 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
4794 (get_got_entry): New.
4795 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
4796 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
4797 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
4798 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
4799 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
4800 (elf64_alpha_calc_got_offsets): Likewise.
4801 (alpha_dynamic_entries_for_reloc): New.
4802 (elf64_alpha_calc_dynrel_sizes): Use it.
4803 (elf64_alpha_size_dynamic_sections): Likewise.
4804 (elf64_alpha_relocate_section): Handle TLS relocations.
4805 * reloc.c: Add Alpha TLS relocations.
4806 * bfd-in2.h, libbfd.h: Rebuild.
4807
5e226794
NC
48082002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4809
4810 * peXXigen.c (pe_print_idata): Remove double printed
4811 import table lines; add Bound-To comment.
4812
90ace9e9
JT
48132002-05-29 Matt Thomas <matt@3am-software.com>
4814
4815 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
4816 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
4817 (elf32-vax.lo): New rule.
4818 * Makefile.in: Regenerate.
4819 * configure.in (bfd_elf32_vax_vec)
4820 (vaxnetbsd_vec): New vectors.
4821 * configure: Regenerate.
4822 * config.bfd (vax-*-netbsdelf*)
4823 (vax-*-netbsdaout*)
4824 (vax-*-netbsd*): New targets.
4825 * elf32-vax.c: New file.
4826 * reloc.c: Add VAX relocations.
4827 * bfd-in2.h: Regenerate.
4828 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
4829
4a253e81
JT
48302002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
4831
4832 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
4833 and bfd_elf32_bigarm_vec to targ_selvecs.
4834
6e7c73dd
CF
48352002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4836
4837 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
4838 with auto-imported symbols.
4839
8afb0e02
NC
48402002-05-29 Adam Nemet <anemet@lnxw.com>
4841
4842 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
4843 sections only record bfd.
9bab7074 4844 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 4845 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 4846 * bfd-in2.h: Regenerate.
8afb0e02 4847
a95653f5
NC
48482002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
4849
4850 * syms.c (_bfd_stab_section_find_nearest_line): Move
4851 declaration and initialisation of saw_line and saw_func out of
4852 for loop.
4853
7cdc5bba
AM
48542002-05-29 Alan Modra <amodra@bigpond.net.au>
4855
4856 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
4857 (bfd_elf64_get_symbol_info): Define.
4858 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
4859
4c7aad1c
AM
48602002-05-29 Andrey Volkov <avolkov@transas.com>
4861
4862 * cpu-h8300.c: Make default h8300 machine first in machine list.
4863
d172d4ba
NC
48642002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
4865
4866 * config.bfd: Added DLX configuraton.
4867 * Makefile.am: Added DLX configuraton.
4868 * configure.in: Added DLX configuraton.
4869 * archures.c: Add DLX architecure.
4870 * reloc.c: Add DLX relocs.
4871 * targets.c: Added DLX target vector.
4872 * configure: Regenerate.
4873 * Makefile.in: Regenreate.
4874 * bfd-in2.h: Regenreate.
4875 * elf32-dlx.c: New file: Support DLX target.
4876 * cpu-dlx.c: New file: Support DLX target.
4877
d1329ca3
AM
48782002-05-25 Alan Modra <amodra@bigpond.net.au>
4879
428d0de3
AM
4880 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
4881
d1329ca3
AM
4882 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
4883 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
4884 strings to point inside function code sym string.
4885 (func_desc_adjust): Likewise.
4886 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
4887
3bab7989
ML
48882002-05-24 Michal Ludvig <mludvig@suse.cz>
4889
4890 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
4891 (elf64_x86_64_grok_psinfo): Added.
4892
436e8db0
NC
48932002-05-24 TAMURA Kent <kent@netbsd.org>
4894
4895 * config.bfd: Add a target for i386-netbsdpe.
4896
ea1e4b0d
AM
48972002-05-24 Alan Modra <amodra@bigpond.net.au>
4898
4899 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
4900 and is_func_descriptor.
4901 (func_desc_adjust): Hide function code sym in shared libs unless
4902 there is a matching exported function descriptor sym.
4903
13ae64f3
JJ
49042002-05-23 Jakub Jelinek <jakub@redhat.com>
4905
4906 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
4907 for symbols from SHF_TLS section.
4908 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
4909 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
4910 (map_sections_to_segments): Build PT_TLS segment if necessary.
4911 (assign_file_positions_for_segments): Likewise.
4912 (get_program_header_size): Account for PT_TLS segment.
4913 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
4914 SEC_THREAD_LOCAL sections to STT_TLS.
4915 * reloc.c: Add 386 and IA-64 TLS relocs.
4916 * section.c (SEC_THREAD_LOCAL): Define.
4917 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
4918 Remove.
4919 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
4920 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
4921 unconditionally.
4922 (struct elf_final_link_info): Add first_tls_sec.
4923 (elf_bfd_final_link): Set first_tls_sec.
4924 Compute elf_hash_table (info)->tls_segment.
4925 (elf_link_output_extsym): Handle STT_TLS symbols.
4926 (elf_link_input_bfd): Likewise.
4927 * syms.c (BSF_THREAD_LOCAL): Define.
4928 * bfd-in2.h: Rebuilt.
4929 * libbfd.h: Rebuilt.
4930 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
4931 elf_i386_mkobject, elf_i386_object_p): New functions.
4932 (elf_howto_table): Add TLS relocs.
4933 (elf_i386_reloc_type_lookup): Support TLS relocs.
4934 (elf_i386_info_to_howto_rel): Likewise.
4935 (struct elf_i386_link_hash_entry): Add tls_type.
4936 (struct elf_i386_obj_tdata): New.
4937 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
4938 New macros.
4939 (struct elf_i386_link_hash_table): Add tls_ldm_got.
4940 (link_hash_newfunc): Clear tls_type.
4941 (elf_i386_check_relocs): Support TLS relocs.
4942 (elf_i386_gc_sweep_hook): Likewise.
4943 (allocate_dynrelocs): Likewise.
4944 (elf_i386_size_dynamic_sections): Likewise.
4945 (elf_i386_relocate_section): Likewise.
4946 (elf_i386_finish_dynamic_symbol): Likewise.
4947 (bfd_elf32_mkobject, elf_backend_object_p): Define.
4948 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
4949 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
4950 want_tprel, want_dtpmod, want_dtprel.
4951 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
4952 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
4953 R_IA64_LTOFF_TPREL22.
4954 (elf_code_to_howto_index): Add TLS relocs.
4955 (elfNN_ia64_check_relocs): Support TLS relocs.
4956 (allocate_global_data_got): Account for TLS .got data.
4957 (allocate_dynrel_entries): Account for TLS dynamic relocations.
4958 (elfNN_ia64_install_value): Supprt TLS relocs.
4959 (set_got_entry): Support TLS relocs.
4960 (elfNN_ia64_relocate_section): Likewise.
4961
c62e1cc3
NC
49622002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
4963
4964 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
4965 BLX reloc round the relocation up rather than down.
4966 * coff-arm.c (coff_arm_relocate_section): Likewise.
4967
c5a43a5d
L
49682002-05-21 H.J. Lu (hjl@gnu.org)
4969
4970 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
4971 definition.
4972
afbe61cf
AM
49732002-05-22 Alan Modra <amodra@bigpond.net.au>
4974
4975 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
4976 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
4977
9c07fe7c
AM
49782002-05-22 Alan Modra <amodra@bigpond.net.au>
4979
4980 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
4981 unresolved relocs.
4982 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
4983
21611032
TS
49842002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4985
c5cd6d62 4986 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
4987 non-ELF targets.
4988
41241523
TS
49892002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4990
4991 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
4992 an error value.
4993 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
4994 return with false on error.
4995 (elf_link_input_bfd): Check reloc_emitter return value.
4996
658f2588
JT
49972002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
4998
4999 * config.bfd (armeb-*-netbsdelf*): New target.
5000
c862ae31
AM
50012002-05-20 Alan Modra <amodra@bigpond.net.au>
5002
5003 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
5004 at the plt call stub.
5005
6dd14845
TS
50062002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5007
5008 * cpu-mips.c (mips_compatible): Don't try to check machine
5009 compatibility.
5010
a58d9c34
TR
50112002-05-18 Tom Rix <trix@redhat.com>
5012
5013 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
5014
ef60b7ff
AM
50152002-05-17 Alan Modra <amodra@bigpond.net.au>
5016
5017 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
5018 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
5019 we've already warned about an undefined symbol. Report more
5020 detail on reloc errors.
5021
a703a6ea
AM
50222002-05-17 Alan Modra <amodra@bigpond.net.au>
5023
5024 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
5025 * configure.in: Invoke AM_INSTALL_LIBBFD.
5026 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
5027 (install_libbfd): .. New target.
5028 (uninstall_libbfd): Likewise.
5029 (install-bfdlibLTLIBRARIES): Likewise.
5030 (uninstall-bfdlibLTLIBRARIES): Likewise.
5031 (bfdlibdir): New.
5032 (bfdincludedir): New.
5033 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
5034 * aclocal.m4: Regenerate.
5035 * configure: Regenerate.
5036 * Makefile.in: Regenerate.
5037
2c13d98b
NC
50382002-05-17 Stuart Balfour <sbalfour@cisco.com>
5039
5040 * hash.c (bfd_hash_lookup): Remove computation of len from inside
5041 hash loop.
5042
629936c5
NC
50432002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
5044
5045 * config.bfd: Add targets for sh64-linux (little endian and
5046 big endian).
5047
e4cf60a8
NC
50482002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
5049
5050 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
5051 is located in the same section as the import table. Instead
5052 check, and if necessary load the section containing the thunk.
5053
d1e66cd4
NC
50542002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
5055
5056 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
5057 bfd_bread.
5058 (xcoff64_core_file_matches_executable_p): Replace bfd_read
5059 with bfd_bread.
d1e66cd4 5060
2d653fc7
AM
50612002-05-15 Alan Modra <amodra@bigpond.net.au>
5062
5063 * aix5ppc-core.c: Warning fixes.
5064 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
5065 * aout-target.h (MY_bfd_link_just_syms): Define.
5066 * aout-tic30.c (MY_bfd_link_just_syms): Define.
5067 * bfd.c (bfd_link_just_syms): Define.
5068 * binary.c (binary_bfd_link_just_syms): Define.
5069 * bout.c (b_out_bfd_link_just_syms): Define.
5070 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
5071 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5072 * coffcode.h (coff_bfd_link_just_syms): Define.
5073 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
5074 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
5075 (_bfd_elf_link_just_syms): Declare.
5076 * elf.c (_bfd_elf_link_just_syms): New function.
5077 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
5078 sections haven't already been discarded by the linker.
5079 * elflink.h (elf_link_add_object_symbols): Likewise for stab
5080 sections and SEC_MERGE sections.
5081 (elf_bfd_discard_info): Similarly here.
5082 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
5083 * i386msdos.c (msdos_bfd_link_just_syms): Define.
5084 * i386os9k.c (os9k_bfd_link_just_syms): Define.
5085 * ieee.c (ieee_bfd_link_just_syms): Define.
5086 * ihex.c (ihex_bfd_link_just_syms): Define.
5087 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
5088 (_bfd_generic_link_just_syms): Declare.
5089 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
5090 * linker.c (_bfd_generic_link_just_syms): New function.
5091 * mmo.c (mmo_bfd_link_just_syms): Define.
5092 * nlm-target.h (nlm_bfd_link_just_syms): Define.
5093 * oasys.c (oasys_bfd_link_just_syms): Define.
5094 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
5095 * som.c (som_bfd_link_just_syms): Define.
5096 * srec.c (srec_bfd_link_just_syms): Define.
5097 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
5098 (BFD_JUMP_TABLE_LINK): And here.
5099 * tekhex.c (tekhex_bfd_link_just_syms): Define.
5100 * versados.c (versados_bfd_link_just_syms): Define.
5101 * vms.c (vms_bfd_link_just_syms): Define.
5102 * libbfd.h: Regenerate.
5103 * bfd-in2.h: Regenerate.
5104
cb7394f2
TS
51052002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5106
5107 * elf32-mips.c: Remove superfluous definitions copied from
5108 elfxx-mips.c.
5109 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
5110 SGIish vectors to check the special case.
5111 (mips_elf_hi16_reloc): Fix comment.
5112 (mips_elf_got16_reloc): Likewise.
5113 (_bfd_mips_elf32_gprel16_reloc): Likewise.
5114 (elf_reloc_map): Code cleanup.
5115 (mips_reloc_map): Add comment.
5116 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
5117 (mips_elf32_rtype_to_howto): Likewise.
5118 (mips_elf32_discard_info): Likewise.
5119 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
5120 lead to IRIX compatibility now.
5121
8dc1a139
TS
51222002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5123
5124 * elfxx-mips.c: Call it IRIX, not Irix in comments.
5125
2051e1b5
JT
51262002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
5127
5128 * config.bfd (shle-*-netbsdelf*): Add target which includes
5129 sh64 support.
5130
83954261
AM
51312002-05-13 David Edelsohn <edelsohn@gnu.org>
5132
5133 * configure.in: Revert 2002-04-07. Instead, auto-configure
5134 HAVE_ST_C_IMPL.
5135 * configure: Regenerate.
5136 * config.in: Regenerate.
5137 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
5138 or AIX_5_CORE.
5139
a9bf1154
NC
51402002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5141
5142 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
5143 corefiles as well.2
5144 * configure: Regenerate.
5145
3129eb7a
AM
51462002-05-13 Alan Modra <amodra@bigpond.net.au>
5147
5148 * Makefile.am (install-data-local): Install headers to
5149 $(exec_prefix)/include.
5150 * Makefile.in: Regenerate.
5151
a9a32010
DJ
51522002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5153 Daniel Jacobowitz <drow@mvista.com>
5154
5155 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
5156 map BFD_RELOC_RVA.
5157
51582002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
5159
5160 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
5161 hppa*-*-openbsd*): New targets.
5162 * configure.in (alpha*-*-openbsd*): Set COREFILE.
5163 * configure: Regenerate.
5164
f1f0d9ab
TR
51652002-05-10 Tom Rix <trix@redhat.com>
5166
ea1e4b0d 5167 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
5168 xcoff64_ppc_relocate_section.
5169 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
5170 * libxcoff.h: Common xcoff_reloc_type function declaration.
5171
c432ba1a
AM
51722002-05-10 Alan Modra <amodra@bigpond.net.au>
5173
16a10388 5174 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 5175 added in 2002-05-09 commit.
16a10388 5176
c432ba1a
AM
5177 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
5178 don't look for stubs on all undefined syms.
5179
4a335f3d
AM
51802002-05-09 Alan Modra <amodra@bigpond.net.au>
5181
8fc39d5d
AM
5182 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
5183 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
5184 pcrel_offset.
5185
4a335f3d
AM
5186 * elf32-i386.c (elf_howto_table): Comments.
5187 (elf_i386_relocate_section): Handle more relocs for relocatable
5188 linking and against SEC_MERGE sections.
5189
41fcb14e
AM
51902002-05-08 Alan Modra <amodra@bigpond.net.au>
5191
5192 * elf32-ppc.c (ppc_elf_create_got): New function.
5193 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 5194 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
5195 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
5196 _bfd_elf_create_got_section.
5197
b491616a
AM
51982002-05-07 Alan Modra <amodra@bigpond.net.au>
5199
5200 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
5201 * elfxx-target.h (elf_backend_rela_normal): Define.
5202 (elfNN_bed): Init rela_normal.
5203 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
5204 for section symbols here if rela_normal. Simplify abs section test.
5205 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
5206 return immediately. Remove code handling relocatable linking.
5207 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5208 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5209 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5210 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5211 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5212 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5213 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5214 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5215 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5216 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5217 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5218 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5219 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5220 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5221 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
5222 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5223 * elf-m10200.c (elf_backend_rela_normal): Define.
5224 * elf-m10300.c (elf_backend_rela_normal): Define.
5225 * elf32-fr30.c (elf_backend_rela_normal): Define.
5226 * elf32-i370.c (elf_backend_rela_normal): Define.
5227 * elf32-i860.c (elf_backend_rela_normal): Define.
5228 * elf32-m68k.c (elf_backend_rela_normal): Define.
5229 * elf32-mcore.c (elf_backend_rela_normal): Define.
5230 * elf32-openrisc.c (elf_backend_rela_normal): Define.
5231 * elf32-ppc.c (elf_backend_rela_normal): Define.
5232 * elf32-s390.c (elf_backend_rela_normal): Define.
5233 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
5234 * elf64-ppc.c (elf_backend_rela_normal): Define.
5235 * elf64-s390.c (elf_backend_rela_normal): Define.
5236 * elf64-x86-64.c (elf_backend_rela_normal): Define.
5237 * elfxx-ia64.c (elf_backend_rela_normal): Define.
5238 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
5239 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
5240
df212a7e
NC
52412002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
5242
5243 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
5244 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
5245
3decf53c
AM
52462002-05-06 Alan Modra <amodra@bigpond.net.au>
5247
5248 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
5249 when not relocatable. Fix reloc_emitter call for K&R.
5250
f46c2da6
AM
52512002-05-04 Alan Modra <amodra@bigpond.net.au>
5252
5253 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
5254 reloading local sym addend mistakenly removed in 2002-05-01 change.
5255
5256 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
5257 (read_abbrevs): Change "offset" param to bfd_vma.
5258 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
5259 Change "abbrev_offset" to bfd_vma.
5260 (read_indirect_string): Use correct conversion chars in error
5261 message format string, cast bfd_vma's to unsigned long.
5262 (read_abbrevs): Likewise.
5263 (read_attribute_value): Likewise.
5264 (decode_line_info): Likewise.
5265 (scan_unit_for_functions): Likewise.
5266 (parse_comp_unit): Likewise.
5267
59862849
TR
52682002-05-04 Tom Rix <trix@redhat.com>
5269
5270 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
5271 (coff_swap_reloc_out): Same.
5272 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
5273 (xcoff_swap_reloc_out): Same.
5274 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
5275 case some 16 bit relocs. Add reloc value to output.
5276 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 5277 R_RBR. Improve names.
59862849
TR
5278 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
5279 (bfd_xcoff_backend_data): Update with new reloc swap names.
5280 (bfd_pmac_xcoff_backend_data) : Same.
5281 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
5282 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 5283 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 5284 R_POS. Add reloc value to output.
ea1e4b0d
AM
5285 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
5286 bit R_RBR. Improve names, masks.
59862849
TR
5287 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
5288 (bfd_xcoff_backend_data): Update with new reloc swap names.
5289 (bfd_xcoff_aix5_backend_data) : Same.
5290
b4655ea9
AM
52912002-05-04 Alan Modra <amodra@bigpond.net.au>
5292
5293 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
5294 bfd_count top_index, input_list, all_local_syms.
5295 (elf32_hppa_setup_section_lists): New function, split from
5296 elf32_hppa_size_stubs.
5297 (elf32_hppa_next_input_section): Likewise.
5298 (group_sections): Likewise.
5299 (get_local_syms): Likewise.
5300 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
5301 stubs on undefined syms too.
5302 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 5303 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
5304 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
5305 (elf32_hppa_next_input_section): Declare.
5306
301e3139
AM
53072002-05-04 Bob Byrnes <byrnes@curl.com>
5308
5309 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
5310 _bfd_new_bfd.
5311
7c5fcef7
L
53122002-05-03 H.J. Lu (hjl@gnu.org)
5313
5314 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
5315 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
5316 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
5317 to hide a global symbol.
5318 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 5319 forced_local to true.
7c5fcef7 5320
84de6048
RH
53212002-05-02 Richard Henderson <rth@redhat.com>
5322
5323 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
5324 vs SHN_UNDEF to zero.
5325
805fc799
AM
53262002-05-02 Alan Modra <amodra@bigpond.net.au>
5327
c061c2d8
AM
5328 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
5329 16 bit reloc.
5330 <R_PPC64_SECTOFF_DS>: Likewise.
5331 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5332 SECTOFF reloc.
5333 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
5334 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5335 SECTOFF reloc.
5336
805fc799
AM
5337 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
5338 (ppc64_elf_ha_reloc): New function.
5339 (ppc64_elf_brtaken_reloc): New function.
5340 (ppc64_elf_sectoff_reloc): New function.
5341 (ppc64_elf_sectoff_ha_reloc): New function.
5342 (ppc64_elf_toc_reloc): New function.
5343 (ppc64_elf_toc_ha_reloc): New function.
5344 (ppc64_elf_toc64_reloc): New function.
5345 (ppc64_elf_unhandled_reloc): New function.
5346 (ppc64_elf_howto_raw): Use the above.
5347 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
5348 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
5349 <R_PPC64_SECTOFF_DS>: Likewise.
5350 (IS_ABSOLUTE_RELOC): Update.
5351 (struct ppc_link_hash_table): Add have_undefweak.
5352 (ppc64_elf_link_hash_table_create): Init.
5353 (func_desc_adjust): Set have_undefweak.
5354 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
5355 add the .sfpr blr when have_undefweak.
5356 (ppc64_elf_setup_section_lists): Check hash table flavour.
5357 (ppc64_elf_next_input_section): Move output_section->owner test to
5358 ppc64elf.em.
5359 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
5360 and relocatable test. Return TOCstart and don't set elf_gp.
5361 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
5362 offset calculation. Add assert on weak sym branch tweaks.
5363 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
5364 (ppc64_elf_toc): Declare.
5365 (ppc64_elf_next_input_section): Update.
ea1e4b0d 5366
818c39a3
AM
53672002-05-01 Alan Modra <amodra@bigpond.net.au>
5368
5369 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
5370 file_name.
5371
721956f4
AM
53722002-05-01 Alan Modra <amodra@bigpond.net.au>
5373
5374 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
5375 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
5376 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
5377 call branches. Correct undefined weak destination.
5378 (ppc64_elf_func_desc_adjust): Always create at least one blr in
5379 .sfpr, and correct case where either only savef* or restf* is
5380 needed.
5381
5382 Long branch stubs, multiple stub sections.
5383 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
5384 (ppc64_elf_next_input_section): Declare.
5385 * elf64-ppc.c: Move linker-only prototypes.
5386 (STUB_SUFFIX): Define.
5387 (enum ppc_stub_type): New.
5388 (struct ppc_stub_hash_entry): New.
5389 (struct ppc_branch_hash_entry): New.
5390 (struct ppc_link_hash_entry): Add stub_cache, oh.
5391 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
5392 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
5393 Rename plt_overflow to stub_error.
5394 (ppc_stub_hash_lookup): Define.
5395 (ppc_branch_hash_lookup): Define.
5396 (stub_hash_newfunc): New function.
5397 (branch_hash_newfunc): New function.
5398 (link_hash_newfunc): Init new fields.
5399 (ppc64_elf_link_hash_table_create): Likewise.
5400 (ppc64_elf_link_hash_table_free): New function.
5401 (ppc_stub_name): New function.
5402 (ppc_get_stub_entry): New function.
5403 (ppc_add_stub): New function.
5404 (create_linkage_sections): Use bfd_make_section_anyway. Create
5405 .branch_lt and .rela.branch_lt sections. Don't create .stub.
5406 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
5407 and set up for plt call stubs. Link func and func desc syms.
5408 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
5409 (func_desc_adjust): Avoid hash lookup when func desc sym available
5410 via shortcut, and set links when processing.
5411 (ppc64_elf_hide_symbol): Likewise.
5412 (allocate_dynrelocs): Don't allocate stub section here.
5413 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
5414 Remove sstub code.
5415 (ppc_type_of_stub): New function.
5416 (build_one_stub): Delete.
5417 (ppc_build_one_stub): New function.
5418 (ppc_size_one_stub): New function.
5419 (ppc64_elf_setup_section_lists): New function.
5420 (ppc64_elf_next_input_section): New function.
5421 (group_sections): New function.
5422 (get_local_syms): New function.
5423 (ppc64_elf_size_stubs): Rewrite.
5424 (ppc64_elf_build_stubs): Rewrite.
5425 (ppc64_elf_relocate_section): Look up stub entry for REL24
5426 relocs. Don't propagate REL14* to dynamic objects. Look for long
5427 branch stubs if REL14* or REL24 relocs won't reach.
5428 (bfd_elf64_bfd_link_hash_table_free): Define.
5429
09c2219b
MM
54302002-04-30 Mark Mitchell <mark@codesourcery.com>
5431
c5cd6d62 5432 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 5433
07b678c0
TR
54342002-04-30 Tom Rix <trix@redhat.com>
5435
5436 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
5437 symbol names into the hash table.
5438
dbe341c6
TR
54392002-04-28 Tom Rix <trix@redhat.com>
5440
5441 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 5442 calulating relocations.
dbe341c6 5443 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
5444 (xcoff_ppc_relocate_section): Use relocation and complain function
5445 tables.
5446 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
5447 (xcoff_complain_overflow_signed_func): Same.
5448 (xcoff_complain_overflow_bitfield_func): Same.
5449 (xcoff_complain_overflow_dont_func): Same.
5450 (xcoff_reloc_type_crel): New recot function.
5451 (xcoff_reloc_type_br): Same.
5452 (xcoff_reloc_type_ba): Same.
5453 (xcoff_reloc_type_toc): Same.
5454 (xcoff_reloc_type_rel): Same.
5455 (xcoff_reloc_type_neg): Same.
5456 (xcoff_reloc_type_pos): Same.
5457 (xcoff_reloc_type_fail): Same.
5458 (xcoff_reloc_type_noop): Same.
5459 * libxcoff.h : Declare common parts for xcoff64.
5460 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 5461 and complain function tables.
dbe341c6 5462
985142a4
AM
54632002-04-28 Alan Modra <amodra@bigpond.net.au>
5464
5465 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
5466 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
5467
eba91044
AM
54682002-04-26 Alan Modra <amodra@bigpond.net.au>
5469
e54fdaa5
AM
5470 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
5471 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
5472
a50c1845
AM
5473 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
5474 same as the output before calling elf_link_input_bfd.
5475
eba91044
AM
5476 * coffcode.h (coff_compute_section_file_positions): Set
5477 section_tail after shuffling section list.
5478
3c25c5f6
NC
54792002-04-24 Christian Groessler <chris@groessler.org>
5480
5481 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
5482 addresses are 23bit with a special layout, not plain 32bit
5483 values. Prevent relocation of immediate values.
5484
40d32fc6
CD
54852002-04-24 Chris G. Demetriou <cgd@broadcom.com>
5486
5487 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
5488 MIPS-16 ASE flags are set, print something to indicate that.
5489
067fa4a6
AM
54902002-04-23 Alan Modra <amodra@bigpond.net.au>
5491
5492 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
5493 under which a plt call stub is used.
5494 (final_link_relocate): Similarly.
5495 (allocate_plt_static): Clear h-plabel except when plt entry is
5496 exclusively used for a plabel.
5497 (allocate_dynrelocs): Use the above to simplify plt sizing.
5498 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
5499 (elf32_hppa_link_hash_table_create): Init.
5500 (BL22_RP): Define.
5501 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
5502 (elf32_hppa_check_relocs): Set has_22bit_branch.
5503
5504 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
5505 (final_link_relocate): Likewise.
5506
af40ce3c
JJ
55072002-04-22 Jakub Jelinek <jakub@redhat.com>
5508
5509 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
5510 search table if some FDE is DW_EH_PE_aligned encoded either.
5511 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
5512
09ae86c2
JJ
55132002-04-22 Richard Smith <richard@ex-parrot.com>
5514 Jakub Jelinek <jakub@redhat.com>
5515
5516 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
5517 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
5518 encoded personality.
5519 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
5520 for CIE/FDE removal.
5521
deeb2cd7
TR
55222002-04-20 Tom Rix <trix@redhat.com>
5523
5524 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
5525
99dc0092
AM
55262002-04-20 Alan Modra <amodra@bigpond.net.au>
5527
aa3d5824
AM
5528 * archures.c (bfd_lookup_arch): Move the list order comment..
5529 (struct bfd_arch_info): ..to where it belongs.
5530 * bfd-in2.h: Regenerate.
5531
99dc0092
AM
5532 * archures.c (bfd_lookup_arch): Add comment on list order.
5533 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
5534 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
5535 is always at head of list.
5536
7831a775
NC
55372002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5538
5539 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
5540 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
5541 definition of these functions for ARM_WINCE builds as they are
5542 not used.
ea1e4b0d 5543 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
5544 for ARM_WINCE builds.
5545
55462002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5547
ea1e4b0d 5548 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
5549
55502002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
5551
5552 * cpu-sh.c (scan_mach): Delete.
5553 (arch_info_struct): Replace scan_mach with bfd_default_scan.
5554 (bfd_sh_arch): Likewise.
5555
3d8dbe36
NC
55562002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
5557
5558 * ihex.c (ihex_write_object_contents): Fix check for records
5559 crossing 64K boundaries.
5560
4ab82700
AM
55612002-04-16 Alan Modra <amodra@bigpond.net.au>
5562
5563 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
5564 type rather than just assuming entries are ELF.
5565 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5566 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5567 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
5568 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
5569 rather than elf_link_hash_entry.
5570
036fe0fe
RH
55712002-04-15 Richard Henderson <rth@redhat.com>
5572
5573 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
5574 n32 binaries.
5575
c4f3d130
NC
55762002-04-15 Michael Snyder <msnyder@redhat.com>
5577
5578 * opncls.c (bfd_close): Write contents if writeable.
5579 Minor formatting tidy-ups.
5580
4ab82700 55812002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
5582
5583 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
5584
0c04d169
MS
55852002-04-12 Michael Snyder <msnyder@redhat.com>
5586
5587 * bfd-in.h (bfd_get_section_lma): New access macro.
5588 Minor white-space fix-up.
5589
89d4966f
AM
55902002-04-12 Alan Modra <amodra@bigpond.net.au>
5591
5592 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
5593 header pad.
5594
8d0da3c2
DD
55952002-04-09 DJ Delorie <dj@redhat.com>
5596
5597 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
5598
05793179
NC
55992002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
5600
5601 * coffcode.h (coff_read_word): New.
5602 (coff_compute_checksum): New.
5603 (coff_apply_checksum): New.
5604 (coff_write_object_contents): Call coff_apply_checksum () to
5605 apply checksum to PE image.
5606
46fe4e66
AM
56072002-04-08 Randolph Chung <tausq@debian.org>
5608
5609 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
5610 (elf32_hppa_final_link): Split out sorting logic to..
5611 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
5612 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
5613
3b5b409c
AC
56142002-04-07 Andrew Cagney <ac131313@redhat.com>
5615
5616 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
5617 pattern.
5618 * configure: Re-generate.
5619
ac7b6ceb
AC
56202002-04-07 Andrew Cagney <ac131313@redhat.com>
5621
5622 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
5623 is greater or equal to 4.3.3.
5624 * configure: Regenerate.
5625 Fix PR gdb/344.
5626
44aa49bb
HPN
56272002-04-05 Hans-Peter Nilsson <hp@axis.com>
5628
5629 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
5630 R_CRIS_32_PCREL>: Fix typo in name.
5631 (cris_elf_check_relocs): Always create .rela.got here when
5632 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
5633 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
5634 assume it's created.
5635
e2d34d7d
DJ
56362002-04-04 Daniel Jacobowitz <drow@mvista.com>
5637
5638 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
5639 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
5640 define.
5641 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
5642 * bfd.c (bfd_link_hash_table_free): Define.
5643 * binary.c (binary_bfd_link_hash_table_free): Define.
5644 * bout.c (b_out_bfd_link_hash_table_free): Define.
5645 * coff-rs6000.c (rs6000coff_vec): Include
5646 _bfd_generic_link_hash_table_free.
5647 (pmac_xcoff_vec): Likewise.
5648 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5649 (aix5coff64_vec): Likewise.
5650 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
5651 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
5652 (bfd_elf32_bfd_link_hash_table_free): Define.
5653 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
5654 (bfd_elf32_bfd_link_hash_table_free): Define.
5655 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
5656 define.
5657 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
5658 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
5659 * ieee.c (ieee_bfd_link_hash_table_free): Define.
5660 * ihex.c (ihex_bfd_link_hash_table_free): Define.
5661 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
5662 (_bfd_generic_link_hash_table_free): Add prototype.
5663 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
5664 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
5665 * linker.c (_bfd_generic_link_hash_table_free): New function.
5666 * mmo.c (mmo_bfd_link_hash_table_free): Define.
5667 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
5668 * oasys.c (oasys_bfd_link_hash_table_free): Define.
5669 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
5670 * som.c (som_bfd_link_hash_table_free): Define.
5671 * srec.c (srec_bfd_link_hash_table_free): Define.
5672 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
5673 * versados.c (versados_bfd_link_hash_table_free): Define.
5674 * vms.c (vms_bfd_link_hash_table_free): New function.
5675 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
5676
5677 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
5678 instead of bfd_alloc.
5679 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
5680 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
5681 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
5682 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
5683 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
5684 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
5685 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
5686 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
5687 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
5688 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
5689 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
5690 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
5691 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
5692 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
5693 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
5694 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
5695 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
5696 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
5697 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
5698 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
5699 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
5700 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
5701 * m68klinux.c (linux_link_hash_table_create): Likewise.
5702 * sparclinux.c (linux_link_hash_table_create): Likewise.
5703 * sunos.c (sunos_link_hash_table_create): Likewise.
5704 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
5705
5706 * targets.c: Add _bfd_link_hash_table_free to xvec.
5707
5708 * bfd-in2.h: Regenerate.
5709 * libbfd.h: Regenerate.
5710 * libcoff.h: Regenerate.
5711
830629ab
AM
57122002-04-04 Alan Modra <amodra@bigpond.net.au>
5713
5714 * dep-in.sed: Cope with absolute paths.
5715 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
5716 Run "make dep-am".
5717 * Makefile.in: Regenerate.
5718 * coff-arm.c: Fix copyright date.
5719 * cpu-h8300.c: Likewise.
5720 * cpu-i370.c: Likewise.
5721 * cpu-s390.c: Likewise.
5722 * cpu-mips.c: Likewise.
5723 * po/SRC-POTFILES.in: Regenerate.
5724
c6e90b02
TS
57252002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5726
5727 * Makefile.am: Add elfxx-mips.c to the known backends.
5728 (elf32-mips.lo): remove dependency to coff/external.h.
5729 * Makefile.in: Regenerate.
5730 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
5731 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
5732 accordingly.
5733 * configure: Regenerate.
5734 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
5735 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
5736 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
5737 MIPS specific backend functions.
5738 * elf32-mips.c: Moved most code to elfxx-mips.c.
5739 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
5740 static.
5741 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
5742 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
5743 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
5744 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
5745 interface to allow selection of the right REL or RELA howto table.
5746 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
5747 static. Let it refuse n32 objects.
5748 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
5749 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
5750 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
5751 (elf32_mips_ignore_discarded_relocs): Rename from
5752 _bfd_elf32_mips_ignore_discarded_relocs.
5753 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
5754 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
5755 (elf_mips_howto_table_rela): Remove.
5756 * elf64-mips.c: Moved most code to elfxx-mips.c.
5757 (bfd_elf64_bfd_reloc_type_lookup): Make static.
5758 (mips_elf64_rtype_to_howto): New function.
5759 (mips_elf64_object_p): Likewise.
5760 (elf64_mips_irix_compat): Likewise.
5761 * elfxx-mips.c: New file containing common code merged together from
5762 elf32-mips.c and elf64-mips.c.
5763 * elfxx-mips.h: New file containing MIPS specific prototypes from
5764 elf-bfd.h.
5765 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
5766 elf_backend_mips_rtype_to_howto.
5767
d8dce692
AM
57682002-04-04 Alan Modra <amodra@bigpond.net.au>
5769
5770 * srec.c (MAXCHUNK, Chunk): Revise comments.
5771 (srec_write_record): Correct buffer size.
5772 (srec_write_header): Do without intermediate buffer.
5773 (srec_write_section): Validate Chunk.
5774 (srec_write_terminator): Pass NULL instead of dummy buffer.
5775 (srec_write_symbols): Pass file and symbol names directly to
5776 bfd_bwrite so sprintf won't overflow buffer.
5777
b88a866a
JJ
57782002-04-03 Jakub Jelinek <jakub@redhat.com>
5779
5780 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
5781 PC relative relocs against hidden symbols.
5782 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5783
d7866f04
AM
57842002-04-03 Alan Modra <amodra@bigpond.net.au>
5785
5786 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
5787 LMAs, loop over segments until p_vaddr and p_memsz specify an
5788 extent enclosing the section.
5789
9e81ee67
NC
57902002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
5791
5792 * ihex.c (ihex_write_object_contents): Do not allow records to
5793 cross a 64K boundary - wrap if necessary.
5794
d2b64500
JT
57952002-04-01 Nathan Williams <nathanw@wasabisystems.com>
5796
5797 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
5798 which caused the returned LWP ID to always be 0.
5799
e36f7d53
RH
58002002-04-01 Richard Henderson <rth@redhat.com>
5801
5802 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5803 (elf32_sparc_relocate_section): Use it to figure out when to
5804 initialize .got entries.
5805 * elf64-sparc.c: Similarly.
5806
e92d460e
AM
58072002-03-28 Alan Modra <amodra@bigpond.net.au>
5808
5809 * linker.c (link_action): Ignore duplicate warning syms.
5810 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
5811 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
5812 (elf_adjust_dynamic_symbol): Likewise.
5813 (elf_export_symbol): Likewise.
5814 (elf_link_find_version_dependencies): Likewise.
5815 (elf_link_assign_sym_version): Likewise.
5816 (elf_link_sec_merge_syms): Likewise.
5817 (elf_link_output_extsym): Likewise.
5818 (elf_gc_sweep_symbol): Likewise.
5819 (elf_gc_propagate_vtable_entries_used): Likewise.
5820 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5821 (elf_gc_allocate_got_offsets): Likewise.
5822 (elf_collect_hash_codes): Likewise.
5823 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
5824 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
5825 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
5826 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
5827 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
5828 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
5829 (elf_cris_discard_excess_dso_dynamics): Likewise.
5830 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
5831 (mark_PIC_calls): Likewise.
5832 (allocate_plt_static): Likewise.
5833 (allocate_dynrelocs): Likewise.
5834 (readonly_dynrelocs): Likewise.
5835 * elf32-i386.c (allocate_dynrelocs): Likewise.
5836 (readonly_dynrelocs): Likewise.
5837 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
5838 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
5839 * elf32-mips.c (mips_elf_output_extsym): Likewise.
5840 (mips_elf_sort_hash_table_f): Likewise.
5841 (mips_elf_check_mips16_stubs): Likewise.
5842 * elf32-s390.c (allocate_dynrelocs): Likewise.
5843 (readonly_dynrelocs): Likewise.
5844 * elf32-sh.c (sh_elf_discard_copies): Likewise.
5845 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
5846 (xstormy16_relax_plt_realloc): Likewise.
5847 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
5848 (elf64_alpha_output_extsym): Likewise.
5849 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
5850 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
5851 (mips_elf64_check_mips16_stubs): Likewise.
5852 (mips_elf64_output_extsym): Likewise.
5853 * elf64-ppc.c (func_desc_adjust): Likewise.
5854 (allocate_dynrelocs): Likewise.
5855 (readonly_dynrelocs): Likewise.
5856 * elf64-s390.c (allocate_dynrelocs): Likewise.
5857 (readonly_dynrelocs): Likewise.
5858 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
5859 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
5860 (readonly_dynrelocs): Likewise.
5861 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
5862 * aoutx.h (aout_link_write_other_symbol): Likewise.
5863 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
5864 (_bfd_coff_write_global_sym): Likewise.
5865 * i386linux.c (linux_tally_symbols): Likewise.
5866 * m68klinux.c (linux_tally_symbols): Likewise.
5867 * sparclinux.c (linux_tally_symbols): Likewise.
5868 * pdp11.c (aout_link_write_other_symbol): Likewise.
5869 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
5870 * xcofflink.c (xcoff_build_ldsyms): Likewise.
5871 (xcoff_write_global_symbol): Likewise.
5872
5873 * cofflink.c (_bfd_coff_final_link): Formatting.
5874 * cpu-mips.c (mips_compatible): Make static, prototype.
5875 * elf32-i386.c (elf_i386_check_relocs): Formatting.
5876 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
5877 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
5878 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
5879 (mips_elf64_final_link): Likewise.
5880 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
5881 prototype.
5882
2106126f
NC
58832002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
5884
5885 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
5886 (SWAP_OUT_RELOC_OFFSET): Define.
5887
b99d1833
AM
58882002-03-27 Gregory Steuck <greg@nest.cx>
5889
5890 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
5891 terminating NULL if empty symbol table.
5892 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
5893
ad43ed4c
L
58942002-03-26 H.J. Lu (hjl@gnu.org)
5895
5896 * elflink.h (elf_link_input_bfd): Revert the last change since
5897 the gcc exception handling isn't fixed yet.
5898
3851fca4
L
58992002-03-26 H.J. Lu (hjl@gnu.org)
5900
5901 * elflink.h (elf_link_input_bfd): Complain about relocations
5902 against local symbols in discarded sections.
5903
b91afed7
AM
59042002-03-26 Alan Modra <amodra@bigpond.net.au>
5905
5906 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
5907
dba143ef
AM
59082002-03-23 Alan Modra <amodra@bigpond.net.au>
5909
5910 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
5911 section file offset for !SEC_LOAD sections.
5912
ee29b9fb
RE
59132002-03-21 Richard Earnshaw <rearnsha@arm.com>
5914
830629ab
AM
5915 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
5916 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 5917
54327882
AM
59182002-03-21 Alan Modra <amodra@bigpond.net.au>
5919
5920 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
5921 Whitespace changes.
5922 * archive.c: Update copyright date.
5923 * bfd-in2.h: Regenerate.
5924 * libbfd.h: Regenerate.
5925 * Makefile.am: Run "make dep-am"
5926 * Makefile.in: Regenerate.
5927 * po/SRC-POTFILES.in: Regenerate.
5928
1ee24f27
DJ
59292002-03-20 Daniel Jacobowitz <drow@mvista.com>
5930
5931 * dwarf2.c (struct funcinfo): Move up.
5932 (lookup_address_in_function_table): New argument function_ptr.
5933 Set it.
5934 (lookup_address_in_line_table): New argument function. If function
5935 is non-NULL, use it to handle ``addr'' before the first line note of
5936 the function.
5937 (comp_unit_find_nearest_line): Update and swap calls to
5938 lookup_address_in_function_table and lookup_address_in_line_table.
5939 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
5940 N_SLINE encountered if we see an N_FUN before any N_SLINE.
5941
51b9608c
TR
59422002-03-20 Tom Rix <trix@redhat.com>
5943
ea1e4b0d 5944 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 5945 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 5946 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 5947
789c90aa
TR
59482002-03-19 Tom Rix <trix@redhat.com>
5949
ea1e4b0d 5950 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
5951 dynamic objects in archives.
5952
1da54d81
HPN
59532002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
5954
5955 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
5956 STT_NOTYPE symbols to STT_OBJECT.
5957
7831a775 59582002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
5959
5960 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
5961
eb1e0e80
NC
59622002-03-18 Tom Rix <trix@redhat.com>
5963
5964 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
5965 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
5966 * coff-rs6000 (do_pad) : New function for archive padding.
5967 (do_copy) : New function for object file copying in archives.
5968 (do_shared_object_padding) : New function for padding shared
5969 objects to their text section alignment in archives.
5970 (bfd_xcoff_ar_achive_set_magic) : Stub.
5971 (xcoff_write_armap_big) : Use do_copy and do_pad.
5972 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
5973 do_copy and do_pad.
5974 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 5975 bfd_xcoff_magic_number.
eb1e0e80
NC
5976 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
5977 fop.
5978 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
5979 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
5980 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
5981 * rs6000-core.c : Update copyright date.
ea1e4b0d 5982 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
5983 csectpp.
5984 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
5985 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
5986 (coff_set_flags) : Use bfd_xcoff_magic_number.
5987 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
5988 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
5989 * Makefile.am : Same.
5990 * config.bfd : Same.
5991 * targets.c : Same.
5992 * configure : Regnerate.
5993 * Makefile.in : Same.
5994 * bfd-in2.h : Same.
5995
a1c259a1
NC
59962002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
5997
5998 * po/fr.po: Updated version.
5999
4dae1ae7
AM
60002002-03-18 Alan Modra <amodra@bigpond.net.au>
6001
6002 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
6003 * libbfd.h: Regenerate.
6004 * archive.c (coff_write_armap): Pass on failures from
6005 bfd_write_bigendian_4byte_int.
6006
36b4f6e7
L
60072002-03-14 H.J. Lu <hjl@gnu.org>
6008
6009 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
6010 error to bfd_error_nonrepresentable_section for reinit_array
6011 section in DSO.
6012
a1aefc76
NC
60132002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6014
a181be0a
NC
6015 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
6016 OR it in rather than replacing previously selected flags.
6017
a1aefc76
NC
6018 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
6019 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
6020
c119f9b8
AM
60212002-03-14 Alan Modra <amodra@bigpond.net.au>
6022
6023 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
6024 (N): Use the above.
6025 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
6026 ensure reloc size matches before calling elf_link_input_bfd.
6027 Add an assert to check reloc size when counting output relocs.
6028
c295a511
NC
60292002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6030
6031 * mmo.c (mmo_get_loc): Return NULL rather than false.
6032
9ce88e60
NC
60332002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
6034
6035 * po/fr.po: Updated version.
6036
4ddafab0
AM
60372002-03-13 Alan Modra <amodra@bigpond.net.au>
6038
b74fa2cd
AM
6039 * archures.c (bfd_default_compatible): Test bits_per_word.
6040 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
6041 bfd_default_compatible.
6042 * cpu-i370.c (i370_compatible): Likewise.
6043 * cpu-sparc.c (sparc_compatible): Likewise.
6044 * cpu-h8300.c (compatible): Test in->arch == out->arch.
6045
40b829d4
AM
6046 * elflink.h: Formatting fixes.
6047 (elf_link_output_extsym): Merge undefined and undef weak cases.
6048
4ddafab0
AM
6049 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
6050 when word size of input matches output word size.
6051
dd53c801
AJ
60522002-03-12 Andreas Jaeger <aj@suse.de>
6053
6054 * cpu-i386.c (i386_compatible): New. Use it instead of
6055 bfd_default_compatible.
6056
aa066ac8
L
60572002-03-07 H.J. Lu (hjl@gnu.org)
6058
6059 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
6060 as the type for bfd_reloc_val.
6061
1bf42538
JL
60622002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
6063
6064 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
6065 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
6066 (elf_hppa_final_link_relocate): Correct relocations for indirect
6067 references to local data through the DLT. Fix .opd creation for
6068 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
6069 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
6070 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
6071 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6072 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
6073 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
6074 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6075
86eaf01e
JJ
60762002-03-05 Jakub Jelinek <jakub@redhat.com>
6077
6078 * merge.c (_bfd_merge_sections): Don't segfault if there
6079 is nothing to merge due to GC.
6080
c44233aa
AM
60812002-03-05 Alan Modra <amodra@bigpond.net.au>
6082
039cc25f
AM
6083 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
6084 symbols that have been forced local.
6085
c44233aa
AM
6086 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
6087 to output forced local syms for non-shared link.
6088 (elf_link_output_extsym): Tweak condition for calling backend
6089 adjust_dynamic_symbol so that previous behaviour is kept.
6090 Whitespace changes throughout file.
6091
25e27870
L
60922002-03-04 H.J. Lu <hjl@gnu.org>
6093
6094 * elf.c (bfd_section_from_shdr): Handle special sections,
6095 .init_array, .fini_array and .preinit_array.
6096 (elf_fake_sections): Likewise.
6097
6098 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
6099 DT entry only if the section is in output for .init_array,
6100 .fini_array and .preinit_array. Complain about .preinit_array
6101 section in DSO.
6102 (elf_bfd_final_link): Warn zero size for .init_array,
6103 .fini_array and .preinit_array sections.
6104
6105 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
6106 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
6107 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
6108 .preinit_array.
6109
bb2a49f2
AM
61102002-03-04 Alan Modra <amodra@bigpond.net.au>
6111
6112 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
6113 * configure: Regenerate.
6114
38487e5e
TR
61152002-03-02 Tom Rix <trix@redhat.com>
6116
c44233aa
AM
6117 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
6118 symbolic equiv.
38487e5e
TR
6119 * coff-rs6000.c (xcoff_howto_table): Same.
6120
30831527
RH
61212002-03-01 David Mosberger <davidm@hpl.hp.com>
6122
6123 * elflink.h (size_dynamic_sections): If section named
6124 ".preinit_array" exists, create DT_PREINIT_ARRAY and
6125 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
6126 ".init_array" and ".fini_array".
6127 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
6128 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
6129 DT_FINI_ARRAY.
6130
c8e5ddc8
AM
61312002-02-26 Andrew Macleod <amacleod@cygnus.com>
6132
6133 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
6134 dynsyms.
6135
96e0dda4
AM
61362002-02-25 Alan Modra <amodra@bigpond.net.au>
6137
1c5b6bf8
AM
6138 * elf64-hppa.h: Update copyright date.
6139
96e0dda4
AM
6140 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
6141 (ppc64_elf_relocate_section): Don't generate power4 style branch
6142 hints for *_BRTAKEN and *_BRNTAKEN relocs.
6143
0fb19cbc
JJ
61442002-02-22 Jakub Jelinek <jakub@redhat.com>
6145
6146 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
6147 last patch.
6148 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6149
c434dee6
AJ
61502002-02-21 Andreas Jaeger <aj@suse.de>
6151
6152 * elf64-x86-64.c: Major rework that introduces all recent changes
6153 to the x86-64 backend. Get a closer match to elf32-i386.
6154 (struct elf64_x86_64_dyn_relocs): Rename from
6155 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
6156 all users.
6157 (struct elf64_x86_64_link_hash_table): Add short cuts to some
6158 sections.
6159 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
6160 remove casts, initialize new hash members.
6161 (create_got_section): New.
6162 (elf64_x86_64_create_dynamic_sections): New.
6163 (elf64_x86_64_copy_indirect_symbol): New.
6164 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
6165 relocs, .got or .relgot here but do it in allocate_dynrelocs.
6166 Reference count possible .plt and .got entries. Don't test input
6167 section SEC_READONLY here to try to avoid copy relocs, and keep
6168 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
6169 DF_TEXTREL here. Delay setting of variables until needed. Cache
6170 pointer to "sreloc" section in elf_section_data. Tweak condition
6171 under which .got created. Report files with bad relocation
6172 section names.
6173 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
6174 Reference count possible .plt entries. Don't deallocate .got and
6175 .relgot space here.
6176 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
6177 do copy reloc processing for weakdefs. Remove redundant casts and
6178 aborts. Delay setting of vars until needed. Move creation of
6179 dynamic symbols and allocation of .plt and .rela.plt to
6180 allocate_dynrelocs. Replace BFD_ASSERT with abort.
6181 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6182 (allocate_dynrelocs): New.
6183 (readonly_dynrelocs): New.
6184 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
6185 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
6186 Zero out the dynamic allocated content space.
6187 (elf64_x86_64_discard_copies): Removed.
6188 (elf64_x86_64_relocate_section): Make use of dynamic section
6189 short-cuts. Localise vars, and delay setting. Better error
6190 reporting, replace BFD_ASSERT with abort. Check
6191 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
6192 regular object file and tread the weak definition as the normal
6193 one. Don't discard relocs for undefweak or undefined symbols and
6194 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
6195 relocs.
6196 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
6197 symbols that have been forced local. Use same test to decide if
6198 we can use a relative reloc for got as relocate_section. Expand
6199 SHN_UNDEF comment. Move expressions out of function calls.
6200 Replace BFD_ASSERT with abort.
6201 (bfd_elf64_bfd_final_link): Removed.
6202 (elf_backend_copy_indirect_symbol): Define.
6203
ff3a6ee3
TR
62042002-02-20 Tom Rix <trix@redhat.com>
6205
6206 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
6207 (_bfd_xcoff_reloc_type_lookup): Use it.
6208 * coff64-rs6000.c (xcoff64_howto_table): Same.
6209 (xcoff64_reloc_type_lookup): Same.
c434dee6 6210
a68d41fb
AM
62112002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
6212
6213 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
6214 little endian.
6215
befc3abb
MS
62162002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
6217
6218 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
6219 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
6220 * bfd-in2.h: Regenerate.
6221 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
6222 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
6223 with "s390:64-bit".
6224 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
6225 (elf_s390_reloc_type_lookup): Likewise.
6226 (elf_s390_check_relocs): Likewise.
6227 (elf_s390_gc_sweep_hook): Likewise.
6228 (elf_s390_relocate_section): Likewise.
6229 (elf_s390_object_p): Use renamed architecture define.
6230 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
6231
6eeeec9b
FCE
62322002-02-19 Frank Ch. Eigler <fche@redhat.com>
6233
6234 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
6235
0bb2d96a
JJ
62362002-02-19 Jakub Jelinek <jakub@redhat.com>
6237
6238 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
6239 absptr -> pcrel optimization for shared libs.
6240 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
6241 library cannot be converted to pcrel.
6242 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
6243 relative.
6244 * elf32-i386.c (elf_i386_relocate_section): If
6245 _bfd_elf_section_offset returned -2, skip, but make sure the
6246 relocation is installed.
6247 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
6248 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6249 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6250 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6251 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6252 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6253 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6254 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6255 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6256 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6257 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6258 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6259 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6260 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6261 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
6262 _bfd_elf_section_offset returning -2 the same way as -1.
6263 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
6264 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
6265 and BFD_ASSERT.
6266 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
6267
69f284c7
TR
62682002-02-18 Tom Rix <trix@redhat.com>
6269
6270 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
6271 (bfd_xcoff_size_dynamic_sections): Same.
6272 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
6273 (bfd_xcoff_size_dynamic_sections): Same.
6274 * coff-rs6000.c (xcoff_generate_rtinit): Same.
6275 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
6276 * libxcoff.h (struct xcoff_backend_data_rec): Same.
6277 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
6278 * bfd-in2.h: Regenerate.
6279
82bd7b59
AM
62802002-02-18 Alan Modra <amodra@bigpond.net.au>
6281
6282 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
6283 (struct ppc_link_hash_table): Add sfpr.
6284 (ppc64_elf_link_hash_table_create): Init it.
6285 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
6286 .glink out to..
6287 (create_linkage_sections): ..here. Make .sfpr too.
6288 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
6289 dynobj early.
6290 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
6291 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
6292 ._restf* functions, and create as needed.
6293 (func_desc_adjust): Only force_local for shared libs.
6294
ef1355e8
NC
62952002-02-18 David O'Brien <obrien@FreeBSD.org>
6296
6297 * configure.in: Bump version number post 2.12 branching.
6298 * configure: Regenerate.
6299
dfa36a69
HPN
63002002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
6301
6302 * mmo.c: Correct and improve comments.
6303 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
6304 zero-pad. Use input to fill up non-empty bfd buffer.
6305 (mmo_flush_chunk): New function.
6306 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
6307 changed. Don't emit location specifier if VMA is same as
6308 *LAST_VMAP after omitting leading zero contents. Call
6309 mmo_flush_chunk before emitting location specifier.
6310 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
6311 with mmo_write_loc_chunk calls.
6312 (mmo_internal_write_section): Call mmo_flush_chunk after
6313 mmo_write_chunk.
6314 (mmo_write_symbols_and_terminator): Move :Main to first position
6315 in symbol array. Add faked one if it does not exist if there are
6316 other symbols. Don't add it if there are no symbols at all. Move
6317 out test for value of :Main from symbol loop. Rename table
6318 fakemain to maintable and variable mainsym to fakemain.
6319
ccf00ab6
RH
63202002-02-15 Richard Henderson <rth@redhat.com>
6321
6322 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
6323 section with no got matches any got. Simplify error generaion.
6324
88eaccc2
AM
63252002-02-15 Alan Modra <amodra@bigpond.net.au>
6326
fd96f80f
AM
6327 Support arbitrary length fill patterns.
6328 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
6329 (_bfd_default_link_order): Remove bfd_fill_link_order code.
6330 Call default_data_link_order.
6331 (default_fill_link_order): Delete.
6332 (default_data_link_order): New function.
6333 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
6334 of bfd_fill_link_order with bfd_data_link_order.
6335 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
6336 * elf64-mips.c (mips_elf64_final_link): Likewise.
6337
88eaccc2
AM
6338 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
6339 Correct value returned in "end" for "0x<non-hex>".
6340
e2fd756b
NC
63412002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
6342
6343 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
6344 (scan): Test against 'mach' field in info structure.
6345
edd29cf9
AM
63462002-02-14 Alan Modra <amodra@bigpond.net.au>
6347
6348 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
6349
1e30956e 63502002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
6351
6352 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
6353 EF_M68000.
6354
bf36db18
NC
63552002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
6356
6357 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
6358 non-zero physical addresses when adjusting the LMAs of new
6359 sections.
bf36db18 6360
189c6563
AM
63612002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6362
6363 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
6364 from _bfd_elf_hppa_gen_reloc_type.
6365 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
6366 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
6367 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
6368 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
6369
e948afaf
AO
63702002-02-12 Alexandre Oliva <aoliva@redhat.com>
6371
6372 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
6373 loading its contents if there's nothing to do in it.
6374
19397422
AM
63752002-02-12 Alan Modra <amodra@bigpond.net.au>
6376
0ad3a73b
AM
6377 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
6378 64k boundary.
6379
19397422
AM
6380 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
6381 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
6382 (ppc64_elf_finish_dynamic_sections): Set values for them.
6383
51316059
MS
63842002-02-11 Michael Snyder <msnyder@redhat.com>
6385
6386 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
6387 * elf.c (elfcore_grok_pstatus): Add prototype.
6388 (elfcore_grok_lwpstatus): Add prototype.
6389 (elfcore_write_lwpstatus): New function.
6390 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
6391
518313c3
AO
63922002-02-11 Alexandre Oliva <aoliva@redhat.com>
6393
6394 * elf32-sh.c: Added missing prototypes.
6395 * elf32-sh64.c: Likewise.
6396 (sh_elf_align_loads): Mark unused args as such.
6397 * elf64-sh64.c: Added missing prototypes.
6398 (struct elf_sh64_link_hash_entry): Fix typo.
6399 (sh_elf64_relocate_section): Fix info argument passed to
6400 _bfd_elf_section_offset.
6401
2c73f9d8
AM
64022002-02-11 Alan Modra <amodra@bigpond.net.au>
6403
6404 * Makefile.am: "make dep-am".
6405 * Makefile.in: Regenerate.
6406 * aclocal.m4: Regenerate.
6407 * config.in: Regenerate.
6408 * configure: Regenerate.
6409
d426c6b0
DJ
64102002-02-10 Daniel Jacobowitz <drow@mvista.com>
6411
6412 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
6413 variable warnings.
6414 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
6415 comparison warning.
6416 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
6417 cast warnings for the common case.
6418
e58ee0cd
HPN
64192002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
6420
6421 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
6422 vectors.
6423 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
6424 vectors.
6425
7793f4d0
RH
64262002-02-09 Richard Henderson <rth@redhat.com>
6427
6428 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
6429 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
6430 (elf64_alpha_relocate_section): Likewise.
6431 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
6432 * bfd-in2.h, libbfd.h: Rebuild.
6433
7e799044
HPN
64342002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
6435
6436 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
6437 that base-plus-offset reloc accounting is consistent.
6438 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
6439 up to date for undefined symbols.
6440
027d73eb
EC
64412002-02-08 Eric Christopher <echristo@redhat.com>
6442
6443 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6444
6445 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
6446 sections for the O32 ABI.
6447
517662d4
CD
64482002-02-08 Chris Demetriou <cgd@broadcom.com>
6449
6450 * elf32-arm.h: Fix formatting of _("...").
6451 * elf32-d10v.c: Likewise.
6452 * elf32-m68k.c: Likewise.
6453 * elf32-mips.c: Likewise.
6454
5e37cc46
NC
64552002-02-08 Ivan Guzvinec <ivang@opencores.org>
6456
6457 * coff-or32.c: Fix compile time warning messages.
6458
fbca6ad9
AO
64592002-02-08 Alexandre Oliva <aoliva@redhat.com>
6460
6461 Contribute sh64-elf.
6462 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
6463 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
6464 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
6465 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
6466 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
6467 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
6468 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
6469 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
6470 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
6471 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
6472 New relocs.
6473 * libbfd.h, bfd-in2.h: Rebuilt.
6474 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
6475 (sh_reloc_map): Map them.
6476 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6477 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
6478 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
6479 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6480 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
6481 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
6482 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
6483 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
6484 datalabel_got_offset.
6485 (sh_elf_link_hash_newfunc): Initialize it.
6486 (sh_elf_relocate_section): Augment the scope of
6487 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
6488 GOT and GOTOFF handling to new SHmedia relocation types. Support
6489 GOT_BIAS.
6490 (sh_elf_check_relocs): Likewise.
6491 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
6492 PLT entries using movi_shori_putval. Support GOT_BIAS.
6493 (sh_elf_finish_dynamic_sections): Likewise.
6494 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
6495 relocation, it's now done by the caller.
6496 (GOT_BIAS): New.
6497 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
6498 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
6499 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
6500 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
6501 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
6502 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
6503 sh64_elf64_hash_table): New.
6504 (sh_elf64_howto_table): Introduce new relocs.
6505 (sh_elf64_info_to_howto): Accept new PIC relocs.
6506 (sh_elf64_relocate_section): Augment the scope of
6507 seen_stt_datalabel. Support new PIC relocs.
6508 (sh_elf64_check_relocs): Support new PIC relocs.
6509 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
6510 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
6511 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
6512 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
6513 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
6514 movi_shori_putval, movi_3shori_putval,
6515 sh64_elf64_create_dynamic_sections,
6516 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
6517 sh64_elf64_size_dynamic_sections,
6518 sh64_elf64_finish_dynamic_symbol,
6519 sh64_elf64_finish_dynamic_sections): New.
6520 (elf_backend_create_dynamic-sections,
6521 bfd_elf64_bfd_link_hash_table_create,
6522 elf_backend_adjust_dynamic_symbol,
6523 elf_backend_size_dynamic_sections,
6524 elf_backend_finish_dynamic_symbol,
6525 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6526 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6527 elf_backend_got_header_size, elf_backend_plt_header_size):
6528 Define.
6529 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
6530 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
6531 match official numbers and names; moved unmaching ones to the
6532 range 0xf2-0xff.
6533 * elf32-sh64.c, elf64-sh64.c: Likewise.
6534 2001-03-12 DJ Delorie <dj@redhat.com>
6535 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
6536 sections.
6537 2001-03-12 DJ Delorie <dj@redhat.com>
6538 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
6539 be aligned.
6540 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
6541 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
6542 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
6543 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
6544 .cranges section with SEC_SORT_ENTRIES set.
6545 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
6546 incoming sorted .cranges section.
6547 (sh64_bfd_elf_copy_private_section_data): New.
6548 (sh64_elf_final_write_processing): Only sort .cranges and modify
6549 start address if called by linker.
6550 2001-01-08 Ben Elliston <bje@redhat.com>
6551 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
6552 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
6553 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
6554 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6555 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
6556 line. Add comments before all entries.
6557 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
6558 comment.
6559 (sh_elf64_reloc): Correct head comment.
6560 (sh_elf64_relocate_section): Correct spacing.
6561 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
6562 instead call reloc_dangerous callback.
6563 <case R_SH_SHMEDIA_CODE>: New case.
6564 (sh_elf64_gc_mark_hook): Correct spacing.
6565 (sh_elf64_check_relocs): Ditto.
6566 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
6567 New case.
6568 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
6569 functions.
6570 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
6571 clarify describing comment. Add comments before all entries.
6572 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
6573 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
6574 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6575 Sort .cranges section in final link. Prepare to set bit 0 on
6576 entry address.
6577 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
6578 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
6579 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
6580 .cranges section.
6581 (sh64_backend_section_from_shdr): New, to recognize
6582 SHT_SH5_CR_SORTED on incoming .cranges section.
6583 (elf_backend_section_from_shdr): Define.
6584 (sh64_elf_final_write_processing): Sort outgoing .cranges
6585 section. (New, temporarily disabled:) Set bit 0 on entry address
6586 according to ISA type.
6587 (sh64_find_section_for_address): New.
6588 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
6589 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
6590 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
6591 bfd_malloc, not xmalloc.
6592 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
6593 global.
6594 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
6595 temporarily disabled) setting bit 0 on entry address.
6596 (elf_backend_final_write_processing): Define.
6597 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
6598 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
6599 be a proper relocation for PTA and PTB rather than a marker.
6600 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
6601 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
6602 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
6603 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
6604 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
6605 Zero src_mask.
6606 * elf64-sh64.c: Ditto.
6607 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
6608 * elf32-sh64.c: Include opcodes/sh64-opc.h
6609 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
6610 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
6611 parameters. No unused parameters. Caller changed.
6612 <case R_SH_PT_16>: New case.
6613 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
6614 * Makefile.in: Regenerate.
6615 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
6616 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
6617 all code sections.
6618 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6619 (sh64_elf_merge_private_data): Ditto.
6620 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
6621 to access stored section flags.
6622 (sh64_elf_final_write_processing): Return immediately unless
6623 called by linker. Use sh64_elf_section_data (cranges) to get size
6624 of linker-generated cranges entries.
6625 (sh64_elf_copy_private_data): Add missing "return true".
6626 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6627 (sh_elf64_merge_private_data): Ditto.
6628 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
6629 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
6630 elf64-sh64.c:sh64_elf_fake_sections.
6631 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
6632 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
6633 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
6634 (sh64_elf_final_write_processing): New.
6635 (elf_backend_final_write_processing): Define.
6636 (sh64_elf_fake_sections): Get header flags from tdata field.
6637 (sh64_elf_copy_private_data): Do not call
6638 sh64_elf_copy_private_data_internal, just copy e_flags field.
6639 (sh64_elf_merge_private_data): Do not call
6640 sh64_elf_copy_private_data_internal.
6641 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
6642 Remove EF_SH64_ABI64, let ELF size make difference.
6643 Remove SH64-specific BFD section flag.
6644 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
6645 containing SHmedia through elf_section_data (asect)->tdata
6646 non-zero, not using a BFD section flag.
6647 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
6648 (sh64_elf_merge_private_data): Similar.
6649 (elf_backend_section_flags): Don't define.
6650 (sh64_elf_backend_section_flags): Delete.
6651 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
6652 not EF_SH64_ABI64.
6653 (sh_elf64_merge_private_data): Similar.
6654 * section.c (Section flags definitions): Don't define
6655 SEC_SH_ISA_SHMEDIA.
6656 (bfd-in2.h): Regenerate.
6657 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
6658 Make DataLabel references work with partial linking.
6659 * elf32-sh64.c: Fix formatting.
6660 (sh64_elf_link_output_symbol_hook): New.
6661 (elf_backend_link_output_symbol_hook): Define to
6662 sh64_elf_link_output_symbol_hook.
6663 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
6664 undefined if partial linking. Adjust sanity check.
6665 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
6666 (elf_backend_link_output_symbol_hook): Define to
6667 sh64_elf64_link_output_symbol_hook.
6668 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
6669 undefined if partial linking. Adjust sanity check.
6670 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
6671 Implement semantics for inter-file DataLabel references.
6672 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
6673 (sh64_elf64_add_symbol_hook): New.
6674 (sh_elf64_relocate_section): If passing an indirect symbol with
6675 st_type STT_DATALABEL on the way to a symbol with st_other
6676 STO_SH5_ISA32, do not bitor 1 to the relocation.
6677 (elf_backend_add_symbol_hook): Define to
6678 sh64_elf64_add_symbol_hook.
6679 * elf64-sh32.c: Tweak comments.
6680 (DATALABEL_SUFFIX): Define.
6681 (sh64_elf_add_symbol_hook): New.
6682 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
6683 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
6684 symbol with st_type STT_DATALABEL on the way to a symbol with
6685 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
6686 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
6687 Pass through STT_DATALABEL.
6688 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
6689 (elf_backend_get_symbol_type): Define.
6690 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
6691 (elf_backend_get_symbol_type): Define.
6692 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
6693 * elf32-sh64.c: Tweak comments.
6694 (sh64_elf_copy_private_data_internal): Add prototype.
6695 (bfd_elf32_bfd_set_private_flags): Define.
6696 (sh64_elf_copy_private_data_internal): Compare machine name, not
6697 textual BFD target name, to check whether to copy section flag
6698 SHF_SH5_ISA32.
6699 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
6700 Tweak section-contents-type-mismatch message.
6701 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
6702 Validize reloc-types.
6703 * elf64-sh64.c: New file.
6704 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
6705 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
6706 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
6707 Regenerate dependencies.
6708 * Makefile.in: Regenerate.
6709 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
6710 bfd_elf64_sh64l_vec.
6711 * configure.in: Handle bfd_elf64_sh64_vec and
6712 bfd_elf64_sh64l_vec.
6713 * configure: Regenerate.
6714 * po/POTFILES.in: Regenerate.
6715 * po/bfd.pot: Regenerate.
6716 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
6717 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
6718 anything else but EF_SH64 and EF_SH64_ABI64.
6719 (sh64_elf_merge_private_data): Emit error for anything else but
6720 EF_SH64 and EF_SH64_ABI64.
6721 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
6722 from targ_selvecs.
6723 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
6724 bfd_elf32_sh64l_vec as a temporary measure.
6725 * configure: Regenerate.
6726 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
6727 * cpu-sh.c (arch_info_struct): Include sh5 item
6728 unconditionalized.
6729 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
6730 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
6731 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
6732 * elf32-sh64.c: Tweak comments.
6733 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
6734 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
6735 (sh64_elf_copy_private_data_internal): Wrap long line.
6736 (sh64_elf_merge_private_data): Rewrite to allow objects from
6737 SH64 subsets to be linked together.
6738 (INCLUDE_SHMEDIA): Define.
6739 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
6740 Parenthesize plus-expression inside or-expression.
6741 <global symbol>: Ditto.
6742 (sh_elf_set_mach_from_flags): Remove code refusing
6743 deleted EF_SH64_32BIT_ABI flag.
6744 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
6745 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
6746 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
6747 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
6748 (sh_elf_relocate_section) <local symbol>: Or 1 in
6749 calculation of relocation if sym->st_other & STO_SH5_ISA32.
6750 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
6751 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
6752 relocation.
6753 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
6754 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
6755 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
6756 Regenerate dependencies.
6757 * Makefile.in: Regenerate.
6758 * archures.c: Add bfd_mach_sh5.
6759 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
6760 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
6761 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
6762 * configure: Regenerate.
6763 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
6764 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
6765 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
6766 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
6767 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
6768 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
6769 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
6770 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
6771 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
6772 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
6773 in item for SH5.
6774 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
6775 for SHmedia relocs.
6776 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
6777 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
6778 shmedia_prepare_reloc, goto final_link_relocate if it returns
6779 non-zero, else fail as before.
6780 (sh_elf_set_mach_from_flags): Provide function only if not defined
6781 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
6782 (sh_elf_set_private_flags): Provide function only if not defined
6783 as a macro.
6784 (sh_elf_copy_private_data): Similar.
6785 (sh_elf_merge_private_data): Similar.
6786 * section.c (SEC_SH_ISA_SHMEDIA): New.
6787 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
6788 * elf32-sh64.c: New file.
6789 * libbfd.h: Regenerate.
6790 * bfd-in2.h: Regenerate.
6791 * po/POTFILES.in: Regenerate.
6792 * po/bfd.pot: Regenerate.
6793 * bfd-in2.h: Regenerate.
6794 * libbfd.h: Regenerate.
6795
e108f470
DJ
67962002-02-07 Daniel Jacobowitz <drow@mvista.com>
6797
6798 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
6799 been included, not drag it in.
6800 * bfd-in2.h: Regenerate.
6801
259d18a3
L
68022002-02-06 H.J. Lu (hjl@gnu.org)
6803
6804 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
6805 the mach and ISA fields if necessary.
6806
f13b834e
NC
68072002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
6808
6809 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
6810 ARM architecture when an F_ARM_5 flag is detected, since we cannot
6811 be sure exactly which architecture this represents.
6812
82f6addb
NC
68132002-02-05 Nick Clifton <nickc@redhat.com>
6814
6815 * po/tr.po: Updated translation.
6816
899f54f5
AM
68172002-02-05 Alan Modra <amodra@bigpond.net.au>
6818
6819 From Jimi X <jimix@watson.ibm.com>
6820 * archures (bfd_mach_ppc64): Define.
6821 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
6822 (bfd_powerpc_arch): Define.
6823 * bfd-in2.h: Regenerate.
6824 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
6825 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
6826 (bfd_powerpc_archs): Add default powerpc64 arch.
6827
248866a8
AM
68282002-02-05 Alan Modra <amodra@bigpond.net.au>
6829
6830 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
6831 against section syms in readonly sections. Don't do the global
6832 sym check if we find one.
6833 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
6834 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 6835 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
6836 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
6837 (elf_s390_grok_prstatus): Add missing prototype.
6838
4fa5c2a8
HPN
68392002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
6840
6841 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
6842 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
6843 Call bfd_get_section_by_name only once. Initialize
6844 bpodata->n_bpo_relocs_this_section.
6845 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
6846 referring to DSOs.
6847 (bpo_reloc_request_sort_fn): Don't use difference of values as
6848 return-value.
6849
537c972e
DB
68502002-02-02 David O'Brien <obrien@FreeBSD>
6851
6852 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
6853 version 4.5 and later the same as 5-CURRENT.
6854 * configure: Re-generate.
6855
006336b8
JT
68562002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
6857
6858 * config.bfd (hppa*-*-netbsd*): New target.
6859
6c571f00
PT
68602002-01-31 Philipp Thomas <pthomas@suse.de>
6861
19397422
AM
6862 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
6863 to front of message. Unify messages with elf32-arm.h. Use
6864 commas where neccessary.
6865 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
6866 ERROR in messages. Unify messages with coff-arm.c. Correct
6867 VFP/FPA error message.
6868 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
6869 APCS-32 for translation.
6c571f00 6870
930b4cb2
HPN
68712002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
6872
6873 Perform on-demand global register allocation from
6874 R_MMIX_BASE_PLUS_OFFSET relocs.
6875 * elf64-mmix.c (struct bpo_reloc_section_info, struct
6876 bpo_reloc_request, struct bpo_greg_section_info): New.
6877 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
6878 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
6879 _bfd_mmix_check_all_relocs,
6880 _bfd_mmix_prepare_linker_allocated_gregs,
6881 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
6882 (elf_mmix_howto_table): Correct src_mask for most relocs.
6883 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
6884 case.
6885 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
6886 case. Fix typo in comment. New label do_mmix_reloc.
6887 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
6888 store first object file with a base-plus-offset reloc. Call
6889 mmix_elf_check_common_relocs for the part common with mmo.
6890 (mmix_elf_final_link): Write out linker-allocated register
6891 contents section.
6892 (elf_backend_gc_sweep_hook): Define.
6893 (bfd_elf64_bfd_relax_section): Define.
6894
6895 * mmo.c: Don't include <ctype.h>
6896 (mmo_init): Correct init-once logic.
6897
3e36d993
TR
68982002-02-01 Tom Rix <trix@redhat.com>
6899
6900 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
6901
ba323545
AM
69022002-02-01 Alan Modra <amodra@bigpond.net.au>
6903
6904 * Makefile.am: Run "make dep-am"
6905 * Makefile.in: Regenerate.
6906
012884d6
DB
69072002-01-31 David O'Brien <obrien@FreeBSD>
6908
6909 * configure.in: Recognize the differences in core files from FreeBSD
6910 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
6911 5-CURRENT.
6912 * configure: Regenerate.
6913
3b16e843
NC
69142002-01-31 Ivan Guzvinec <ivang@opencores.org>
6915
6916 * coff-or32.c: New file.
6917 * cpu-or32.c: New file.
6918 * elf32-or32.c: New file.
6919 * archures.c: Add support for or32.
6920 * targets.c: Add support for or32.
6921 * bfd-in2.h: Regenerate.
7dc0ab31 6922 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
6923 coff_write_object_contents): Add support for or32.
6924 * config.bfd: Add target.
6925 * configure.in: Add support for or32.
6926 * configure: Regenerate.
6927 * Makefile.am: Add support for or32.
6928 * Makefile.in: Regenerate.
3b16e843
NC
6929 * po/SRC-POTFILES.in: Add or32 files.
6930 * po/bfd.pot: Regenerate.
7dc0ab31 6931
caf8ca8e
NC
69322002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
6933 Don Lindsay <lindsayd@cisco.com>
6934
6935 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
6936 false' with a return of a bfd_reloc_ error code.
6937
e5dfef09
HPN
69382002-01-31 Hans-Peter Nilsson <hp@axis.com>
6939
6940 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
6941 unexport unreferenced symbols when --export-dynamic. Call
6942 _bfd_elf_strtab_delref when unexporting.
6943
4e4770d0
DJ
69442002-01-30 Daniel Jacobowitz <drow@mvista.com>
6945
6946 * bfd-in.h: Include <stdbool.h> if it is available.
6947 * bfd-in2.h: Regenerated.
6948
e1fa50e7
AM
69492002-01-31 Alan Modra <amodra@bigpond.net.au>
6950
6951 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
6952 not go via the plt.
6953
b5f79c76
NC
69542002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
6955
b5f79c76
NC
6956 * archures.c: Tidy up formatting of embedded comments.
6957 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 6958 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
6959 * reloc.c: Tidy up formatting of ordinary & embedded comments.
6960 * section.c: Tidy up formatting of embedded comments.
6961 * syms.c: Tidy up formatting of embedded comments.
6962 * targets.c: Tidy up formatting of embedded comments.
6963
6964 * bfd-in2.h: Regenerate.
6965
ca09e32b
NC
69662002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
6967
6968 * vms-tir.c (cmd_name): New function.
6969 (tir_cmd_name): New function.
6970 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
6971 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
6972 Fix formatting.
7dc0ab31 6973
ca09e32b
NC
6974 * peXXigen.c (pe_print_idata): Rearrange message to aid in
6975 translation.
6976 (pe_print_pdata): Rearrange message to aid in translation.
6977
6978 * libbfd.c (warn_deprecated): Rearrange error message to aid in
6979 translation.
6980
6981 * ihex.c (ihex_write_object_contents): Fix spelling typo.
6982
6983 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
6984
6985 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
6986 message to aid in translation.
6987
6988 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
6989 to aid in translation.
6990
6991 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
6992
7dc0ab31 69932002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
6994
6995 * coff-arm.c, elf32-elf.h: Unify messages.
6996
05f64ac6
NC
69972002-01-30 Nick Clifton <nickc@redhat.com>
6998
6999 * po/sv.po: Updated translation.
7000
f5a3e38a
NC
70012002-01-30 Philipp Thomas <pthomas@suse.de>
7002
7003 * dwarf2.c (read_abbrev): Use full section name in error message.
7004 (decode_line_info): Likewise.
661a3fd4
NC
7005
7006 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
7007 message.
7008
d926e03d
AM
70092002-01-30 Alan Modra <amodra@bigpond.net.au>
7010
7011 * elf64-ppc.c (func_desc_adjust): Only provide missing function
7012 descriptor symbols for undefined function code syms. Clear
7013 ELF_LINK_NON_ELF so that they can stay weak.
7014
030d18fb 70152002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 7016 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
7017
7018 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
7019 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
7020 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
7021 generation.
7022 * bfd-in2.h: Regenerate.
7023
fcc76bea
CD
70242002-01-29 Chris Demetriou <cgd@broadcom.com>
7025
7026 * elf32-mips.c: Add additional comments about HI16 relocation
7027 processing.
7028 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
7029 pc-relative relocations. (Reverts change made on 2001-10-31.)
7030 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
7031 for pc-relative relocations.
7032 (mips_elf_calculate_relocation): Add a comment about a kludge
7033 in the R_MIPS_GNU_REL_HI16 handling.
7034 (_bfd_mips_elf_relocate_section): Implement that kludge;
7035 adjust pc-relative HI16 relocation for difference in HI16 and
7036 LO16 addresses, since it can't easily be done in
7037 mips_elf_calculate_relocation.
7038
f9cd9119
MS
70392002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
7040
7041 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
7042 relocations with PC32 relocations for undefined or weak symbols.
7043 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
7044 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
7045
702248bb
JT
70462002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
7047
7048 * elfcore.h (elf_core_file_p): Improve comment for last change.
7049
4867be41
DJ
70502002-01-27 Daniel Jacobowitz <drow@mvista.com>
7051
7052 * configure: Regenerated.
7053
a94cef6a
JT
70542002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
7055
7056 * elfcore.h (elf_core_file_p): Set the machine architecture
7057 before processing the program headers.
7058
7562a296
HPN
70592002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
7060
966abd70
HPN
7061 * configure.in <64-bit configuration>: If using gcc, check and
7062 emit error for egcs-1.1.2.
7063 * configure: Regenerate.
7064
e8eab623
NC
70652002-01-26 Egor Duda <deo@logos-m.ru>
7066
7067 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
7068 as possible to avoid stack corruption.
7069
73896efb
RH
70702002-01-26 Richard Henderson <rth@redhat.com>
7071
7072 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
7073 for non-allocated sections.
7074
70752002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
7076
7077 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
7078 prstat.pr_reg even if it is a struct.
7079
73896efb 70802002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 7081
c5cd6d62 7082 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 7083
3d66c4f7
NC
70842002-01-25 Philipp Thomas <pthomas@suse.de>
7085
7086 * coffgen.c (coff_print_symbol): Don't mark info message
7087 for translation.
7088
9460ecda
NC
70892002-01-25 Nick Clifton <nickc@redhat.com>
7090
7091 * po/fr.po: Updated translation.
7092 * po/es.po: Updated translation.
7093
cc9ff76a
AM
70942002-01-25 Philipp Thomas <pthomas@suse.de>
7095
7096 * coff-alpha.c (alpha_relocate_section): Unify warning message
7097 for GP relative relocations without GP defined.
7098 * coff-mips.c (mips_relocate_section): Likewise.
7099
c68836a9
AM
71002002-01-25 Alan Modra <amodra@bigpond.net.au>
7101
7102 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
7103 unsigned overflow when new_offset < old_offset.
7104
e8eab623 71052002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
7106
7107 * bfd.c (_bfd_abort): Fix typo.
7108
8ba89f17
RH
71092002-01-23 Richard Henderson <rth@redhat.com>
7110
7111 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
7112 plt entries for undefweak symbols.
7113
c6953948
NC
71142002-01-23 Steve Ellcey <sje@cup.hp.com>
7115
c5cd6d62 7116 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
7117 (bfd_elf64_ia64_hpux_big_vec): Ditto.
7118 (bfd_elf32_h8300_vec): Ditto.
7119
41bd81ab
AM
71202002-01-23 Alan Modra <amodra@bigpond.net.au>
7121
7122 * elf64-ppc.c: Remove stale part of ABI comment.
7123 (NO_OPD_RELOCS): Define.
7124 (ppc64_elf_check_relocs): Use it.
7125 (ppc64_elf_relocate_section): Here too.
7126 (build_one_stub): Don't point function syms at the stub. Instead,
7127 hijack plt.offset.
7128 (ppc64_elf_relocate_section): Check whether REL24 relocs should
7129 really go to the stub. Make all dynamic relocs in opd against
7130 locals.
7131 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
7132 plt.offset.
7133
f304919d
RH
71342002-01-22 Richard Henderson <rth@redhat.com>
7135
7136 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
7137
c0ef99a7
AM
71382002-01-22 Alan Modra <amodra@bigpond.net.au>
7139
60ee0d4a
AM
7140 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
7141 TOC_BASE_OFF adjustment.
7142
c0ef99a7
AM
7143 * Makefile.am: Run "make dep-am".
7144 * Makefile.in: Regenerate.
7145 * po/SRC-POTFILES.in: Regenerate.
7146
64328b46
AM
71472002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
7148
7149 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
7150 host defines.
7151
59953665 71522002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
7153
7154 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
7155 Check for and emit error if sgot is NULL at this point.
7156
9596feea
JT
71572002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
7158
7159 * config.bfd (ia64*-*-netbsd*): New target.
7160
7b45c6e1
AM
71612002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
7162
7163 * som.c (som_write_space_strings): Comment typo fix.
7164
e5094212
AM
71652002-01-21 Alan Modra <amodra@bigpond.net.au>
7166
e86ce104
AM
7167 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
7168 is_func_descriptor fields.
7169 (link_hash_newfunc): Init them.
7170 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
7171 dot are candidates for plt entries. When processing .opd relocs,
7172 set function descriptor strings to point inside function code
7173 string, and set new ppc_link_hash_entry fields.
7174 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
7175 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
7176 function descriptors. It's now done in..
7177 (func_desc_adjust): New.
7178 (ppc64_elf_func_desc_adjust): New.
7179 (define elf_backend_always_size_sections): Define.
7180 (ppc64_elf_hide_symbol): New.
7181 (define elf_backend_hide_symbol): Define.
7182 (allocate_dynrelocs): Remove code looking up function descriptors
7183 as that has been done earlier.
7184 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
7185 table.
7186 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
7187 up function descriptor.
7188 (build_one_stub): Look up the function code sym. Check for
7189 invalid plt offsets.
7190 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
7191 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
7192
e5094212
AM
7193 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
7194 boolean param.
7195 (_bfd_elf_link_hash_hide_symbol): Likewise.
7196 * elflink.h (elf_link_add_object_symbols): Adjust call to
7197 elf_backend_hide_symbol.
7198 (elf_fix_symbol_flags): Likewise.
7199 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
7200 than bfd_alloc.
7201 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
7202 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
7203 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
7204 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
7205 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
7206 and adjust to suit.
7207 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
7208 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
7209 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
7210
40b8271b
AM
72112002-01-18 Alan Modra <amodra@bigpond.net.au>
7212
7213 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
7214 dynamic function descriptor symbol, not the associated function
7215 symbol.
7216
55baa95b
EC
72172002-01-17 Eric Christopher <echristo@redhat.com>
7218
7219 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
7220
328577ad
NC
72212002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
7222
7223 * po/bfd.pot: Regenerate.
7224 * po/fr.po: Regenerate.
7225
af746e92
AM
72262002-01-17 Alan Modra <amodra@bigpond.net.au>
7227
7228 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
7229 Remove "Elf_Internal_Shdr *" param.
7230 (_bfd_mips_elf_section_from_bfd_section): Ditto.
7231 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
7232 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
7233 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
7234 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
7235 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
7236 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
7237 function to override special sections. Remove hdr arg from
7238 backend call, and don't loop.
7239
175e9962
EC
72402002-01-16 Eric Christopher <echristo@redhat.com>
7241
7242 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
7243 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
7244 relocations requiring gp0 and gp.
7245
96a846ea
RE
72462002-01-16 Richard Earnshaw <rearnsha@arm.com>
7247
175e9962 7248 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
7249 EF_ARM_VFP_FLOAT.
7250 (elf32_arm_print_private_bfd_data): Likewise.
7251
af3ae48d
NC
72522002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
7253
7254 * po/tr.po: Import new version.
7255
10ed1bba
AM
72562002-01-16 Alan Modra <amodra@bigpond.net.au>
7257
7258 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
7259 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
7260 (ORI_R0_R0_0): Correct.
7261
5d1634d7
AM
72622002-01-16 Alan Modra <amodra@bigpond.net.au>
7263
7264 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
7265 when plt_not_loaded.
7266 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
7267 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
7268 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
7269 (ppc64_elf_glink_code): Delete.
7270 (PPC64_ELF_GLINK_SIZE): Delete.
7271 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
7272 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
7273 ORI_R0_R0_0): Define.
7274 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
7275 (struct ppc_link_hash_table): Add sstub and plt_overflow.
7276 (ppc64_elf_link_hash_table_create): Init them.
7277 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
7278 Don't copy to shared lib.
7279 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
7280 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
7281 (allocate_dynrelocs <plt>): Don't change function sym here. Make
7282 room for .stub and .glink code.
7283 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
7284 DT_PPC64_GLINK.
7285 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
7286 bfd_elf64_bfd_final_link.
7287 (bfd_elf64_bfd_final_link): Don't define.
7288 (ppc64_elf_size_stubs): New.
7289 (build_plt_stub): New.
7290 (build_one_stub): New.
7291 (ppc64_elf_build_stubs): New.
7292 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
7293 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
7294 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
7295 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
7296 case output sections not separate. Adjust DT_RELASZ to not
7297 include plt relocs. Set reserved got entry. Set got and plt
7298 entry size.
7299 (elf_backend_got_header_size): Set to 8.
7300 * elf64-ppc.h: New file.
7301
c601ffdb
AM
73022002-01-16 Alan Modra <amodra@bigpond.net.au>
7303
7304 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
7305 sections, use bfd_section_list_remove.
7306 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7307 * elflink.h (elf_link_add_object_symbols): When removing all
7308 sections, use bfd_section_list_clear.
7309
8fb4cb7f
NC
73102002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7311
7312 * po/sv.po: New file: Swedish translation.
7313 * configure.in (ALL_LINGUAS): Add sv.
7314 * configure: Regenerate.
7315
d3c456e9
JJ
73162002-01-15 Jakub Jelinek <jakub@redhat.com>
7317
7318 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
7319 * elf.c (merge_sections_remove_hook): New function.
7320 (_bfd_elf_merge_sections): Pass it as 3rd argument to
7321 _bfd_merge_sections.
7322 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
7323 * libbfd.h: Rebuilt.
7324 * merge.c (_bfd_merge_sections): Add remove_hook argument.
7325 Call remove_hook if a SEC_EXCLUDE section is encountered.
7326
1f7fd478
NC
73272002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7328
7329 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
7330 (xstormy16_reloc_map): Initialise new field with correct howto
7331 table.
7332 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
7333 howto entry.
7334
b87011e9
MS
73352002-01-10 Michael Snyder <msnyder@redhat.com>
7336
7337 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
7338 (elfcore_write_pstatus): Use long instead of pid_t;
7339 * elf-bfd.h: Change prototypes to use long instead of pid_t;
7340
175e9962 73412002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
7342
7343 * elf.c: Update copyright years.
7344 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
7345 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
7346
7c76fa91
MS
73472002-01-08 Michael Snyder <msnyder@redhat.com>
7348
7349 Add capability to write corefile note sections, for gdb.
7350 * elf.c (elfcore_write_note): New function.
7351 (elfcore_write_prpsinfo): New function.
7352 (elfcore_write_prstatus): New function.
7353 (elfcore_write_pstatus): New function.
7354 (elfcore_write_prfpreg): New function.
7355 (elfcore_write_prxfpreg): New function.
97996af6 7356 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 7357
e1fddb6b
AO
73582002-01-08 Alexandre Oliva <aoliva@redhat.com>
7359
7360 * elf.c (elf_fake_sections): Propagate errors from
7361 elf_backend_fake_section.
7362
8d05742f
JT
73632002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
7364
7365 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
7366 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
7367 (elf32-sh-nbsd.lo): New rule.
7368 * Makefile.in: Regenerate.
7369 * config.bfd (sh*le-*-netbsdelf*): New target.
7370 (sh*-*-netbsdelf*): New target.
7371 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
7372 (bfd_elf32_shnbsd_vec): New vector.
7373 (bfd_elf32_shlnbsd_vec): New vector.
7374 * configure: Regenerate.
7375 * elf32-sh-nbsd.c: New file.
7376 * targets.c: Update copyright years.
175e9962 7377 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
7378 bfd_elf32_shnbsd_vec.
7379
1dba4cb4
AH
73802002-01-07 Aldy Hernandez <aldyh@redhat.com>
7381
7382 * coff-rs6000.c (READ20): Use bfd_scan_vma.
7383
47b22aef
GK
73842002-01-07 Geoffrey Keating <geoffk@redhat.com>
7385
7386 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
7387 of a symbol in a section that will be deleted.
7388
be2d1673
NC
73892002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
7390
7391 * po/es.po: New file: Spanish translation.
7392 * configure.in (ALL_LINGUAS): Add es.
7393 * configure: Regenerate.
7394
d9cf1b54
AM
73952002-01-06 Steve Ellcey <sje@cup.hp.com>
7396
7397 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
7398 argument so we can handle HP-UX specially.
7399 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
7400 (elfNN_hpux_backend_section_from_bfd_section): New for support
7401 of SHN_IA_64_ANSI_COMMON.
7402 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
7403 (is_unwind_section_name): Add special HP-UX support.
7404 (elfNN_ia64_section_from_shdr): Add support for more sections.
7405 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
7406 add support for more sections.
7407 (elfNN_ia64_additional_program_headers): Modify
7408 is_unwind_section_name call.
7409 (elfNN_ia64_modify_segment_map): Remove assumption that there is
7410 only one unwind section in segment.
7411
3f3c5c34
AM
74122002-01-06 Alan Modra <amodra@bigpond.net.au>
7413
7414 * syms.c (_bfd_generic_make_empty_symbol): New function.
7415 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
7416 _bfd_generic_make_empty_symbol.
7417 * libbfd.h: Regenerate.
7418 * bfd-in2.h: Regenerate.
7419 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
7420 (hppabsd_core_get_symtab_upper_bound): Don't define.
7421 (hppabsd_core_get_symtab): Likewise.
7422 (hppabsd_core_print_symbol): Likewise.
7423 (hppabsd_core_get_symbol_info): Likewise.
7424 (hppabsd_core_bfd_is_local_label_name): Likewise.
7425 (hppabsd_core_get_lineno): Likewise.
7426 (hppabsd_core_find_nearest_line): Likewise.
7427 (hppabsd_core_bfd_make_debug_symbol): Likewise.
7428 (hppabsd_core_read_minisymbols): Likewise.
7429 (hppabsd_core_minisymbol_to_symbol): Likewise.
7430 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
7431 Formatting fixes.
7432 * hpux-core.c: Similarly.
7433 * irix-core.c: Similarly.
7434 * osf-core.c: Similarly.
7435 * sco5-core.c: Similarly.
7436 * binary.c (binary_make_empty_symbol): Remove function, define as
7437 _bfd_generic_make_empty_symbol.
7438 * ihex.c (ihex_make_empty_symbol): Likewise.
7439 * mmo.c (mmo_make_empty_symbol): Likewise.
7440 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
7441 * srec.c (srec_make_empty_symbol): Likewise.
7442 * versados.c (versados_make_empty_symbol): Likewise.
7443 * vms.c (_bfd_vms_make_empty_symbol): Remove.
7444 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
7445 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
7446 rather than _bfd_vms_make_empty_symbol.
7447 * vms-misc.c (new_symbol): Likewise.
7448
3f0a7f7f
AM
74492002-01-05 Alan Modra <amodra@bigpond.net.au>
7450
9e7b37b3
AM
7451 * section.c (bfd_section_init): Remove unnecessary initialisations.
7452 (bfd_section_list_clear): New function.
7453 (bfd_section_list_remove, bfd_section_list_insert): New macros.
7454 (_bfd_strip_section_from_output): Use them.
7455 * coffcode.h (coff_set_alignment_hook): Likewise.
7456 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
7457 * elf64-mips.c (mips_elf64_final_link): Likewise.
7458 * elf64-mmix.c (mmix_elf_final_link): Likewise.
7459 * sunos.c (sunos_add_dynamic_symbols): Likewise.
7460 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
7461 * bfd-in2.h: Regenerate.
7462
7463 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
7464 rather than doing our own section handling. Clean up after errors
7465 with bfd_release and bfd_section_list_clear. Handle unexpected
7466 flags.
7467 * aoutf1.h (sunos4_core_file_p): Likewise.
7468 * aix386-core.c (aix386_core_file_p): Likewise.
7469 * cisco-core.c (cisco_core_file_validate): Likewise.
7470 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
7471 * trad-core.c (trad_unix_core_file_p): Likewise.
7472
7473 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
7474 with bfd_release and bfd_section_list_clear.
7475 * hpux-core.c (hpux_core_core_file_p): Likewise.
7476 * irix-core.c (irix_core_core_file_p): Likewise.
7477 * lynx-core.c (lynx_core_file_p): Likewise.
7478 * osf-core.c (osf_core_core_file_p): Likewise.
7479 * rs6000-core.c (rs6000coff_core_p): Likewise.
7480 * sco5-core.c (sco5_core_file_p): Likewise.
7481
3f0a7f7f
AM
7482 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
7483 sign extension adjustments without conditionals.
7484
a3aa38ee
JJ
74852002-01-04 Jakub Jelinek <jakub@redhat.com>
7486
7487 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
7488 CIE at .eh_frame start is removed due to no FDEs referencing it.
7489
8a8b2d4b
AJ
74902002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
7491
7492 * config.bfd (x86_64-*-netbsd*): New target.
7493 * configure.in (x86_64-*-netbsd*): Set COREFILE
7494 to netbsd-core.lo.
7495 * configure: Regenerated.
7496
04b5af89
TR
74972002-01-03 Tom Rix <trix@redhat.com>
7498
7499 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
7500 for recent bfd_make_section_anyway change.
7501
51c5503b
NC
75022002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
7503
7504 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7505 R_ARM_THM_PC11 reloc.
7506
07f7c046
NC
75072002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7508
7509 * configure.in (LINGUAS): Add ja.
7510 * configure: Regenerate.
7511 * po/ja.po: Import from translation project's web site.
7512
5eefb65f
NC
75132002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7514
7515 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
7516 messages to ease translation into other languages.
7517
39e90f10 7518For older changes see ChangeLog-0001
56882138
AM
7519\f
7520Local Variables:
7521mode: change-log
7522left-margin: 8
7523fill-column: 74
7524version-control: never
7525End: