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