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