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