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