* config/tc-arm.c (do_iwmmxt_byte_addr): Reject control
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
98a96df7
CF
12003-10-16 Pavel Roskin <proski@gnu.org>
2
3 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
4 for sections which lack size info.
5
2cefff79
DS
62003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
7
8 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
9 mingw32.
10
3e0e1ef1
L
112003-10-16 H.J. Lu <hongjiu.lu@intel.com>
12
13 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
14 undefined patterns with '*'.
15
9da84788
L
162003-10-16 H.J. Lu <hongjiu.lu@intel.com>
17
18 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
19 use the last CIE from a different section.
20 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
21 size of the output section.
22
ac393995
RM
232003-10-07 Roland McGrath <roland@redhat.com>
24
25 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
26 new section from p_align header field.
27
7aaa0689
L
282003-10-16 H.J. Lu <hongjiu.lu@intel.com>
29
30 * elf32-xtensa.c (xtensa_read_table_entries): The external size
31 of entry is 8 bytes.
32
6cee3f79
AC
332003-10-15 Andrew Cagney <cagney@redhat.com>
34
35 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
36 with NAME##_canonicalize_symtab.
37 * libcoff-in.h (coff_canonicalize_symtab): Update.
38 * xsym.h (bfd_sym_canonicalize_symtab): Update.
39 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
40 * coffgen.c (coff_canonicalize_symtab): Update.
41 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
42 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
43 * ieee.c (ieee_vec): Update comment.
44 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
45 * mmo.c (mmo_canonicalize_symtab): Update.
46 * nlm-target.h (nlm_canonicalize_symtab): Update.
47 * nlmcode.h (nlm_canonicalize_symtab): Update.
48 * i386msdos.c (msdos_canonicalize_symtab): Update.
49 * hp300hpux.c (MY (canonicalize_symtab)): Update.
50 * oasys.c (oasys_canonicalize_symtab): Update.
51 * som.c (som_canonicalize_symtab): Update.
52 * pef.c (bfd_pef_canonicalize_symtab): Update.
53 * nlmcode.h (nlm_canonicalize_symtab): Update.
54 * xsym.c (bfd_sym_canonicalize_symtab): Update.
55 * vms.c (vms_canonicalize_symtab): Update.
56 * versados.c (versados_canonicalize_symtab): Update.
57 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
58 * ieee.c (ieee_canonicalize_symtab): Update.
59 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
60 * reloc.c: Update comment.
61 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
62 * coff64-rs6000.c (aix5coff64_vec): Update.
63 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
64 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
65 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
66 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
67 * hp300hpux.c (MY_canonicalize_symtab): Update.
68 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
69 * aout-tic30.c (MY_canonicalize_symtab): Update.
70 * aout-target.h (MY_canonicalize_symtab): Update.
71 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
72 * elf.c (_bfd_elf_canonicalize_symtab): Update.
73 * elfcode.h (elf_canonicalize_symtab): Update.
74 * ihex.c (ihex_canonicalize_symtab): Update.
75 * tekhex.c (tekhex_canonicalize_symtab): Update.
76 * binary.c (binary_canonicalize_symtab): Update.
77 * srec.c (srec_canonicalize_symtab): Update.
78
6288878d
KH
792003-10-15 Kazu Hirata <kazu@cs.umass.edu>
80
81 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
82
46e993b9
KK
832003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
84
85 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
86 relocations.
87 (sh_elf_check_relocs): Likewise.
88
89 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
90 (sh64_elf_merge_symbol_attribute): New.
91 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
92 (sh64_elf64_merge_symbol_attribute): New.
93
9bf7216d
KK
942003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
95
96 * elf-bfd.h (struct elf_backend_data): New function pointer member
97 elf_backend_merge_symbol_attribute.
98 * elflink.h (elf_link_add_object_symbols): Adjust call to
99 elf_backend_merge_symbol_attribute if the backend defined it.
100 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
101 (elfNN_bed): Add that to the initializer.
102
b614a702
BW
1032003-10-14 Bob Wilson <bob.wilson@acm.org>
104
105 * elf32-xtensa.c (get_is_linkonce_section): Delete.
106 (xtensa_is_property_section, xtensa_is_littable_section): Use
107 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
108 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
109 (xtensa_get_property_section_name): Check section name instead of
110 calling get_is_linkonce_section. Remove unused bfd parameter. Use
111 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
112 linkonce section names by appending ".xt.insn" or ".xt.lit".
113 (xtensa_read_table_entries): Remove bfd argument in call to
114 xtensa_get_property_section_name. Free section name when done.
115 (elf_xtensa_combine_prop_entries): Free leaking table.
116
98a8deaf
RS
1172003-10-13 Richard Sandiford <rsandifo@redht.com>
118
119 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
120 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
121 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
122 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
123 that were needed.
124 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
125 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
126
3f7deb8a
L
1272003-10-13 H.J. Lu <hongjiu.lu@intel.com>
128
129 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
130 (bfd_elf64_ia64_after_parse): Likewise.
131 * bfd-in2.h: Regenerated.
132
133 * elfxx-ia64.c (oor_ip): New.
134 (oor_branch_size): Likewise.
135 (bfd_elfNN_ia64_after_parse): Likewise.
136 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
137 equals sizeof (oor_ip).
138
0c72ffe0
KK
1392003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
140
141 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
142 renumbering of some relocation numbers.
143
8d6ad26e
AM
1442003-10-11 Alan Modra <amodra@bigpond.net.au>
145
146 * coff-sh.c: Move definition of MAP and guard more code with
147 COFF_IMAGE_WITH_PE.
a7f49d81
AM
148
149 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 150 * bfd-in2.h: Regenerate.
a7f49d81 151
ede6aaf3
L
1522003-10-10 H.J. Lu <hongjiu.lu@intel.com>
153
154 * Makefile.am: Run "make dep-am".
155 * Makefile.in: Regenerate.
156 * doc/Makefile.in: Likewise.
157
a3aa4448
L
1582003-10-09 H.J. Lu <hongjiu.lu@intel.com>
159
160 * cofflink.c: Include "safe-ctype.h".
161 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
162
9c8ee639
DB
1632003-10-08 Dave Brolley <brolley@redhat.com>
164 On behalf of Michael Snyder <msnyder@redhat.com>
165
166 * archures.c: Add FRV fr550 machine.
167 * cpu-frv.c: Ditto.
168 * elf32-frv.c: Ditto.
169 * bfd-in2.h: Regenerate.
170
6a691779
TS
1712003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
172
173 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
174 for non-SGI N64 ABI. Improve code consitency.
175
b15b52ef
AO
1762003-10-07 Alexandre Oliva <aoliva@redhat.com>
177
178 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
179 rightshift to 2.
180
cd339148
NS
1812003-10-07 Nathan Sidwell <nathan@codesourcery.com>
182
29ca8dc5
NS
183 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
184 parameter.
185 * cofflink.c (coff_link_add_symbols): Deal with split stab
186 sections.
187 * elflink.h (elf_link_add_object_symbols): Deal with split stab
188 sections.
189 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
190 * libbfd.h: Regenerated.
191
cd339148
NS
192 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
193 overflow, set reloc start position to after the count
194 reloc. Subtract one from num relocs. Give error on 0xffff relocs
195 and no overflow.
196 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
197 overflow.
198 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
199 0xffff.
200
10cf14ea
L
2012003-10-06 H.J. Lu <hongjiu.lu@intel.com>
202
203 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
204 last CIE/FDE if needed.
205
afa105f8
NC
2062003-10-06 Nick Clifton <nickc@redhat.com>
207
208 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
209 BFD64 is enabled.
210
85cf2a8a
NC
2112003-10-06 Matt Thomas <matt@3am-software.com>
212
8d6ad26e 213 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 214
4615568e
NC
2152003-10-06 Robert Millan <robertmh@gnu.org>
216
217 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
218 * config.bfd: Likewise.
219 * configure: Regenerate.
220
8b7cf393
CG
2212003-10-04 Christian Groessler <chris@groessler.org>
222
223 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
224 and R_CALLR.
225
0a6a3ebe
SC
2262003-10-04 Stephane Carrez <stcarrez@nerim.fr>
227
228 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
229 * elf32-m68hc11.c: Likewise.
230 * elf32-m68hc12.c: Likewise.
231 * elf32-m68hc1x.h: Likewise.
232
17e58af0
SC
2332003-10-04 Stephane Carrez <stcarrez@nerim.fr>
234
235 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
236 of flags between HC12 and HCS12.
237
27c630ba
NC
2382003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
239
240 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
241 which become empty after merging.
242
1fc0d173
JJ
2432003-09-30 Jakub Jelinek <jakub@redhat.com>
244
245 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
246 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
247
5f74bc13
CD
2482003-09-30 Chris Demetriou <cgd@broadcom.com>
249
250 * archures.c (bfd_mach_mipsisa64r2): New define.
251 * bfd-in2.h: Regenerate.
252 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
253 * cpu-mips.c (I_mipsisa64r2): New enum value.
254 (arch_info_struct): Add entry for I_mipsisa64r2.
255 * elfxx-mips.c (_bfd_elf_mips_mach)
256 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
257 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
258 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
259
b59dd4a5
L
2602003-09-29 H.J. Lu <hongjiu.lu@intel.com>
261
262 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
263 Handle SHN_IA_64_ANSI_COMMON.
264 (elf_backend_section_from_bfd_section): Defined.
265
243ef1e0
L
2662003-09-26 H.J. Lu <hongjiu.lu@intel.com>
267
268 * elflink.c (elf_link_read_relocs_from_section): Add an argument
269 of a pointer to section. Check bad symbol index.
270 (_bfd_elf_link_read_relocs): Modify calls to
271 elf_link_read_relocs_from_section.
272
d38eb334
DD
2732003-09-23 DJ Delorie <dj@redhat.com>
274
275 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
276 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
277 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
278 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
279 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
280 R_SH_PSHA, R_SH_PSHL added.
281 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
282 (sh_elf_relocate_section): Support new relocs.
283
f0578e28
BW
2842003-09-23 Bob Wilson <bob.wilson@acm.org>
285
286 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
287 dynamic relocation offsets.
288
010b84c1
AM
2892003-09-23 Alan Modra <alan@modra.org>
290
291 * simple.c (bfd_simple_get_relocated_section_contents): Free the
292 hash table using _bfd_generic_link_hash_table_free.
293
7dcb9820
AM
2942003-09-23 Alan Modra <alan@modra.org>
295
296 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
297 type of prefix_length and suffix_length to int. Rename "attributes"
298 to "attr". Comment.
299 (_bfd_elf_get_sec_type_attr): Update prototype.
300 * elf.c (get_special_section): Rewrite.
301 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
302 attr and type pointers.
303 (_bfd_elf_new_section_hook): Adjust for above.
304 (special_sections): Merge suffix with prefix. Set
305 prefix_length for all entries. Set suffix_length appropriately.
306 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
307 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
308 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
309 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
310 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
311 * elf32-v850.c (v850_elf_special_sections): Likewise.
312 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
313 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
314 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
315 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
316 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
317 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
318 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
319 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
320
61bcf373
DJ
3212003-09-21 Daniel Jacobowitz <drow@mvista.com>
322
323 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
324 ->got if the section already exists.
325
8bfd78b3
NS
3262003-09-19 Nathan Sidwell <nathan@codesourcery.com>
327
328 * dwarf2.c (decode_line_info): Cope with an initially empty
329 filename table.
330
6726e1ea
L
3312003-09-18 H.J. Lu <hongjiu.lu@intel.com>
332
333 * acinclude.m4: Include ../config/accross.m4.
334 * aclocal.m4: Regenerated.
335
336 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
337 or long long.
338 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
339 (host64): Remove if HOST_64BIT_TYPE is set to long.
340
341 * configure.in (HOST_64BIT_TYPE): Set according to the size of
342 long and long long.
343 (HOST_U_64BIT_TYPE): Likewise.
344 (host64): Likewise.
345 * configure: Regenerated.
346
5de3bf90
AM
3472003-09-19 Alan Modra <amodra@bigpond.net.au>
348
349 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
350 since some ABIs round up the size of the struct.
351
9e4d8df3
L
3522003-09-18 H.J. Lu <hongjiu.lu@intel.com>
353
354 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
355 the old symbol is undefined and the new symbol is defined.
356
228ce064
AS
3572003-09-18 Andreas Schwab <schwab@suse.de>
358
359 * simple.c (bfd_simple_get_relocated_section_contents): Use
360 _bfd_generic_link_hash_table_create instead of
361 bfd_link_hash_table_create.
362
fdbdabdd
L
3632003-09-10 H.J. Lu <hongjiu.lu@intel.com>
364
365 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
366 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
367
a252afa4
DA
3682003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
369 Randolph Chung <randolph@tausq.org>
370
371 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
372 hppa_link_hash_newfunc, hppa_build_one_stub,
373 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
374 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
375 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
376 for generating import stubs for calls to statically linked PIC
377 functions.
378 (hppa_type_of_stub): Don't generate an import stub for calls to
379 statically linked pic functions. Generate import stubs for calls
380 in a shared object, to functions not in a regular file, and to
381 defined weak functions. Add new argument INFO.
382 (hppa_build_one_stub): Don't undef ADDIL_DP.
383 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
384 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
385 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
386 non-shared link. Convert instructions that use the the linkage table
387 pointer, or a facsimile thereof, to use the global data pointer when
388 the reloc has been changed.
389
42acdc7c
JB
3902003-09-08 Joel Brobecker <brobecker@gnat.com>
391
392 * archures.c: Add new machine names for hppa.
393 * bfd-in2.h: Regenerate.
394 * cpu-hppa.c: Use the new machine names.
395
2a0e29b4
SC
3962003-09-06 Stephane Carrez <stcarrez@nerim.fr>
397
398 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
399 all_local_syms member.
400 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
401 to get the local symbols.
402
3f533aa9
SC
4032003-09-06 Stephane Carrez <stcarrez@nerim.fr>
404
405 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
406 (elf_backend_special_sections): Define.a
407
408 PR savannah/4950:
409 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
410 section is read-only.
411
8ad30312
NC
4122003-09-04 Nick Clifton <nickc@redhat.com>
413
414 * archures.c (bfd_mach_v850e1): Define.
415 * bfd-in2.h: Regenerate.
416 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
417 (arch_info_struct): Include an entry for bfd_mach_v850e1.
418 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
419 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
420 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
421 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
422 linked with v850e binaries. Mark the output as v850e.
5de3bf90 423
3922a8c1
NC
4242003-09-03 Nick Clifton <nickc@redhat.com>
425
5de3bf90 426 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
427 symbols that are used in relocs.
428
13dfd2d0
NC
4292003-08-30 Robert Millan <robertmh@gnu.org>
430
431 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
432 * config.bfd: Likewise.
433 * configure: Regenerate.
434
1c0881dd
CG
4352003-08-31 Christian Groessler <chris@groessler.org>
436
437 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
438 instead of returning bfd_reloc_continue.
439
ac0e732e
AJ
4402003-08-31 Andreas Jaeger <aj@suse.de>
441
442 * merge.c: Update to ISO C90.
443
ec317fb1
ILT
4442003-08-27 Ian Lance Taylor <ian@airs.com>
445
49c97a80
ILT
446 * configure.in: Check for strtoull.
447 * bfd.c (bfd_scan_vma): Use strtoull when available.
448 * configure, config.in: Regenerate.
449
ec317fb1
ILT
450 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
451 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
452 __GNUC__ when deciding whether to use long long for
453 BFD_HOST_64_BIT.
454 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
455
d539b3aa
CG
4562003-08-27 Christian Groessler <chris@groessler.org>
457
458 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
459 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
460 functions.
461 (elf32_i860_howto_table): Insert the new functions as
462 'special_function's in the proper reloc type entries.
463
73052b5e
RS
4642003-08-27 Richard Sandiford <rsandifo@redhat.com>
465
466 * elf32-frv.c (elf32_frv_relocate_section): Use
467 _bfd_elf_rela_local_sym.
468
2c848f79
MS
4692003-08-26 Michael Snyder <msnyder@redhat.com>
470
471 * cpu-frv.c: Remove unused enum.
472
980491e6
MR
4732003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
474
475 * reloc.c: Fix documentation for MIPS ELF relocations.
476 libbfd.h: Regenerate.
477 bfd-in2.h: Regenerate.
478
6d1227b8
JE
4792003-08-24 Jason Eckhardt <jle@rice.edu>
480
5de3bf90 481 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 482
f680ea79
JE
4832003-08-24 Jason Eckhardt <jle@rice.edu>
484
485 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
486 shift by 2 before storing the relocated value.
487
c28b1c28
JE
4882003-08-23 Jason Eckhardt <jle@rice.edu>
489
5de3bf90 490 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
491 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
492 LOWn, SPLITn, and BRADDR.
493 (RTYPE2HOWTO): Check that the r_type is within the howto_table
494 before trying to access the entry.
495 (coff_i860_rtype_to_howto): Likewise.
496 (coff_i860_reloc_type_lookup): New function.
497 (i860_reloc_processing): New function.
498 (coff_bfd_reloc_type_lookup): Define macro.
499 (RELOC_PROCESSING): Define macro.
500 Minor formatting adjustments.
501
40a0491a
AM
5022003-08-23 Alan Modra <amodra@bigpond.net.au>
503
504 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
505
69bbc4c0
L
5062003-08-22 H.J. Lu <hongjiu.lu@intel.com>
507
508 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
509 .got section at 8 bytes.
510
8b956130
NC
5112003-08-21 Nick Clifton <nickc@redhat.com>
512
85db1db4 513 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 514
6c21aa76
NC
5152003-08-21 Randolph Chung <tausq@debian.org>
516
517 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
518 can have OSABI=Linux or OSABI=SysV. Check for both.
519 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
520
3673a93e
NC
5212003-08-21 Nick Clifton <nickc@redhat.com>
522
523 * po/sv.po: Updated Swedish translation.
524
427b80f4
RS
5252003-08-20 Richard Sandiford <rsandifo@redhat.com>
526
527 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
528
560e09e9
NC
5292003-08-20 Nick Clifton <nickc@redhat.com>
530
531 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
532 replace some duplicated code in most elfxx-xxxx.c files. This
533 version uses the new fields in bfd_link_info.
534
40a0491a
AM
535 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
536 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
537 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
538 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
539 * elf32-i386.c (elf_i386_relocate_section): Likewise.
540 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
541 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
542 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
543 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
544 * elf32-s390.c (elf_s390_relocate_section): Likewise.
545 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
546 * elf32-vax.c (elf_vax_relocate_section): Likewise.
547 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
548 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
549 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
550 * elf64-s390.c (elf_s390_relocate_section): Likewise.
551 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
552 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
553 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
554
555 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
556 elf_hppa_remark_useless_dynamic_symbols,
557 elf_hppa_relocate_section): Use the new fields in
558 bfd_link_info structure.
559 * elf32-sh.c (sh_elf_relocate_section): Likewise.
560 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
561 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
562 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
563 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
564 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
565
566 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
567 undefined symbols in shared libraries. Remove redundant test
568 of shlib_undefined when reporting references to forced local
569 symbols.
560e09e9 570
4091ea4e
L
5712003-08-18 Andreas Schwab <schwab@suse.de>
572
573 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
574 executables.
575
b0cdc7bc
HPN
5762003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
577
578 * simple.c (bfd_simple_get_relocated_section_contents): Move
579 reloc_done hack to before first bfd_section_size call. Change all
580 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
581
c1993d04
AM
5822003-08-16 Alan Modra <amodra@bigpond.net.au>
583
584 * elf64-ppc.c: Don't include elf/ppc.h.
585
792b4a53
RS
5862003-08-14 Richard Sandiford <rsandifo@redhat.com>
587
588 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
589 code to work with 64-bit bfds.
590
fdc09da8
AM
5912003-08-14 Alan Modra <amodra@bigpond.net.au>
592
593 * dep-in.sed: Remove libintl.h.
594 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
595 (POTFILES.in): Remove target.
596 * Makefile.in: Regenerate.
597
ee87f2da
AM
5982003-08-12 Alan Modra <amodra@bigpond.net.au>
599
600 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
601 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
602 use the function sym from the previous reloc.
603
15f40dfc
JJ
6042003-08-11 Jakub Jelinek <jakub@redhat.com>
605
606 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
607 fatal if -pie.
608 * elf32-s390.c (elf_s390_relocate_section): Likewise.
609 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
610 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
611 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
612 * elf64-s390.c (elf_s390_relocate_section): Likewise.
613 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
614 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
615 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
616 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
617 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
618 on undefined symbols if -pie.
619 * elf32-sh.c (sh_elf_relocate_section): Likewise.
620
6ab189d5
AM
6212003-08-11 Alan Modra <amodra@bigpond.net.au>
622
623 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
624 branch to __libc_start_main.
625
3b260895
NC
6262003-08-08 Dmitry Diky <diwil@mail.ru>
627
6ab189d5
AM
628 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
629 gcc order.
3b260895
NC
630 * cpu-msp430.c: Likewise.
631 * elf32-msp430.c: Likewise.
632 * bfd-in2.h: Regenerate.
633
c39a58e6
AM
6342003-08-07 Alan Modra <amodra@bigpond.net.au>
635
9c5bfbb7
AM
636 * elfxx-target.h: Remove PTR cast.
637 * targets.c (bfd_target): Make backend_data const void *.
638 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
639 * elf-m10300.c: Likewise.
640 * elf.c: Likewise.
641 * elf32-hppa.c: Likewise.
642 * elf32-i386.c: Likewise.
643 * elf32-m68hc1x.c: Likewise.
644 * elf32-ppc.c: Likewise.
645 * elf32-s390.c: Likewise.
646 * elf32-sh.c: Likewise.
647 * elf32-sh64.c: Likewise.
648 * elf32-sparc.c: Likewise.
649 * elf32-xtensa.c: Likewise.
650 * elf64-mips.c: Likewise.
651 * elf64-ppc.c: Likewise.
652 * elf64-s390.c: Likewise.
653 * elf64-sh64.c: Likewise.
654 * elf64-sparc.c: Likewise.
655 * elf64-x86-64.c: Likewise.
656 * elfcode.h: Likewise.
657 * elfcore.h: Likewise.
658 * elflink.c: Likewise.
659 * elflink.h: Likewise.
660 * elfxx-ia64.c: Likewise.
661 * elfxx-mips.c: Likewise.
662 * elfxx-mips.h: Likewise.
663 * elf.c (prep_headers): Remove useless check for null backend_data.
664 * bfd-in2.h: Regenerate.
665
c39a58e6
AM
666 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
667 (NAME): Use ## rather than CONCAT4 macro.
668 * elfcode.h: Remove one remaining PARAMS macro.
669 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
670 * elf-strtab.c: Likewise.
671 * elf-hppa.h: Likewise.
672 * elf32-hppa.h: Likewise.
673 * elf32-hppa.c: Likewise.
674 (elf32_hppa_add_symbol_hook): Delete.
675 (elf_backend_add_symbol_hook): Don't define.
676 * libhppa.h: Convert to C90. Replace INLINE with inline.
677
97b639ba
AM
6782003-08-06 Alan Modra <amodra@bigpond.net.au>
679
680 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
681 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
682 function descriptors, but warn.
683 (ppc_build_one_stub): Remove a couple of vars. Move code creating
684 stub syms so that we can avoid a stub sym if we already have a
685 plt sym. Do not redefine an existing symbol.
686 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
687 glink.
688
9e7d479d
NC
6892003-08-06 Nick Clifton <nickc@redhat.com>
690
691 * po/fr.po: Updated French translation.
692
77f3d027
AM
6932003-08-06 Alan Modra <amodra@bigpond.net.au>
694
695 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
696 SEC_LINKER_CREATED.
697
50d6c878
DJ
6982003-08-05 Daniel Jacobowitz <drow@mvista.com>
699
700 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
701 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
702
14abcef9
NC
7032003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
704
4a21a492 705 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
706 message if the line number table could not be read.
707
8c675694
NC
7082003-08-04 Nick Clifton <nickc@redhat.com>
709
710 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
711 to messages produced for .gnu.warning.SYMBOL sections.
712
268b6b39
AM
7132003-08-04 Alan Modra <amodra@bigpond.net.au>
714
715 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
716 * elfcore.h: Likewise.
717 * elflink.c: Likewise.
718 * elflink.h: Likewise.
719 * elf.c (sym_is_global): Remove INLINE.
720 (align_file_position): Replace INLINE with inline.
721 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
722 (elf_file_p): Replace INLINE with inline.
723
866f48b7
KK
7242003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
725
726 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
727
8651fcf9
L
7282003-08-01 H.J. Lu <hongjiu.lu@intel.com>
729
730 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
731
37cd2629
L
7322003-08-01 H.J. Lu <hongjiu.lu@intel.com>
733
734 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
735 ElfNN_External_Rela instead of Elf64_External_Rela.
736
91fb2a9d
NC
7372003-08-01 Nick Clifton <nickc@redhat.com>
738
739 * config.bfd: Add code to catch obsolete configurations and warn
740 about them unless --enable-obsolete is used. Use this to mark
741 vax-vms port as obsolete.
742
e656e369
AM
7432003-07-30 Alan Modra <amodra@bigpond.net.au>
744
745 * elf32-ppc.c (ppc_elf_install_value): Tidy.
746 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
747 Formatting.
748 * elfxx-target.h: Remove PARAMS macro. Formatting.
749
50bc7936
AM
7502003-07-30 Alan Modra <amodra@bigpond.net.au>
751
752 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
753 * elf64-ppc.c (get_fdh): New function, split out from
754 ppc64_elf_edit_opd.
755 (ppc64_elf_check_relocs): Use get_fdh.
756 (func_desc_adjust): Likewise. Tidy.
757 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
758 exit. Use get_fdh. Account for superfluous dynamic relocs.
759 (ppc64_elf_relocate_section): Warning fix.
760
a62d170c
JE
7612003-07-30 Jason Eckhardt <jle@rice.edu>
762
763 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
764
7734b6e9
JE
7652003-07-30 Jason Eckhardt <jle@rice.edu>
766
767 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
768
37f4508b
AM
7692003-07-30 Randolph Chung <tausq@debian.org>
770
771 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
772 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
773
217aa764
AM
7742003-07-30 Alan Modra <amodra@bigpond.net.au>
775
776 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
777 Replace PTR with void *. Formatting.
778 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
779 (make_mapping): Likewise.
780
494dac0c
AM
7812003-07-29 Alan Modra <amodra@bigpond.net.au>
782
783 * elf64-ppc.c (func_desc_adjust): Give linker created function
784 descriptor symbols a size and type.
785 (ppc64_elf_relocate_section): Correct lq insn test.
786
deaaf2f3
EC
7872003-07-28 Eric Christopher <echristo@redhat.com>
788
789 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
790 (ppc_elf_install_value): New function.
791 (ppc_elf_sort_rela): Remove.
792 (ppc_elf_relax_section): Rewrite. Remove old relaxation
793 and replace with out of range branch stubs.
794 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
795
709e685d
AO
7962003-07-29 Alexandre Oliva <aoliva@redhat.com>
797
798 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
799 from input_bfd.
800
36c506c5
AM
8012003-07-28 Alan Modra <amodra@bigpond.net.au>
802
803 * elf.c (special_sections): Set attributes for .got and .plt.
804
5d35169e
AM
8052003-07-27 Alan Modra <amodra@bigpond.net.au>
806
807 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
808 on function descriptors.
809 (ELIMINATE_COPY_RELOCS): Expand comment.
810 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
811 Do include ".toc1".
812
3cddba1e
L
8132003-07-25 H.J. Lu <hongjiu.lu@intel.com>
814
815 * elf.c (_bfd_elf_new_section_hook): Set the default section
816 type to SHT_NULL.
817 (elf_fake_sections): Set the section type based on asect->flags
818 if it is SHT_NULL. Don't abort on processor specific section
819 types.
820
d622ef4b
L
8212003-07-25 H.J. Lu <hongjiu.lu@intel.com>
822
823 * bfd-in2.h: Regenerated.
824
2f89ff8d
L
8252003-07-25 H.J. Lu <hongjiu.lu@intel.com>
826
827 * elf-bfd.h (bfd_elf_special_section): New.
828 (elf_backend_data): Add special_sections, a pointer to
829 bfd_elf_special_section.
830 (elf_section_type). New.
831 (elf_section_flags): New.
832 (_bfd_elf_get_sec_type_attr): New.
833
834 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
835 real section type/flags.
836 (special_sections): New.
837 (get_special_section): New.
838 (_bfd_elf_get_sec_type_attr): New.
839 (_bfd_elf_new_section_hook): Check special_section to set
840 elf_section_type and elf_section_flags.
841 (elf_fake_sections): Don't use section name to set ELF section
842 data.
843
844 * elf32-m32r.c (m32r_elf_special_sections): New.
845 (elf_backend_special_sections): Defined.
846
847 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
848 (elf_backend_special_sections): Defined.
849
850 * elf32-mcore.c (mcore_elf_special_sections): New.
851 (elf_backend_special_sections): Defined.
852
853 * elf32-ppc.c (ppc_elf_special_sections): New.
854 (elf_backend_special_sections): Defined.
855
856 * elf32-sh64.c (sh64_elf_special_sections): New.
857 (elf_backend_special_sections): Defined.
858
859 * elf32-v850.c (v850_elf_special_sections): New.
860 (elf_backend_special_sections): Defined.
861
862 * elf32-xtensa.c (elf_xtensa_special_sections): New.
863 (elf_backend_special_sections): Defined.
864
865 * elf64-alpha.c (elf64_alpha_special_sections): New.
866 (elf_backend_special_sections): Defined.
867
868 * elf64-hppa.c (elf64_hppa_special_sections): New.
869 (elf_backend_special_sections): Defined.
870
871 * elf64-ppc.c (ppc64_elf_special_sections): New.
872 (elf_backend_special_sections): Defined.
873
874 * elf64-sh64.c (sh64_elf64_special_sections): New.
875 (elf_backend_special_sections): Defined.
876
877 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
878 (elf_backend_special_sections): Defined.
879
880 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
881
882 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
883 (elf_backend_special_sections): Defined.
884
885 * elfxx-target.h (elf_backend_special_sections): New. Default
886 to NULL.
887 (elfNN_bed): Initialize special_sections.
888
889 * section.c (bfd_abs_section): Remove const.
890 (bfd_und_section): Likewise.
891 (bfd_com_section): Likewise.
892 (bfd_ind_section): Likewise.
893
20650579
NC
8942003-07-24 Nick Clifton <nickc@redhat.com>
895
896 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
897 sections are assigned the LOAD attribute.
898
deaaf2f3 8992003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
900
901 * elf32-sh.c: Convert to C90. Replace PTR with void *.
902 * elf32-sh64-com.c: Likewise.
903 * elf32-sh64.c: Likewise.
904 * elf32-sh64.h: Likewise.
905 * elf64-sh64.c: Likewise.
906
3d85aebe
KK
9072003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
908
909 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
910 (allocate_dynrelocs): Likewise.
911 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
912 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
913
834d807b
NC
9142003-07-24 Nick Clifton <nickc@redhat.com>
915
916 * po/fr.po: Updated French translation.
917
571b5725
BW
9182003-07-23 Bob Wilson <bob.wilson@acm.org>
919
920 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
921 near the beginning of the file. Swap order of arguments. Call
922 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
923 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
924 (elf_xtensa_relocate_section): Likewise.
925 (shrink_dynamic_reloc_sections): Likewise.
926
b536dc1e
BW
9272003-07-23 Bob Wilson <bob.wilson@acm.org>
928
929 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
930 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
931 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
932 first printing an error message.
933 (elf_xtensa_finish_dynamic_sections): Likewise.
934 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
935 discarding literal table entries.
936 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
937 (elf_xtensa_do_asm_simplify): Likewise.
938
7f888330
SC
9392003-07-23 Stephane Carrez <stcarrez@nerim.fr>
940
941 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
942 we have a local symbol in common section.
943
ecc27c31
L
9442003-07-22 H.J. Lu <hongjiu.lu@intel.com>
945
946 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
947 weak symbols.
948
f9f3cf65
NC
9492003-07-22 Nick Clifton <nickc@redhat.com>
950
951 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
952 expected RS6000 storage classes.
953
bb32e54f
L
9542003-07-21 H.J. Lu <hongjiu.lu@intel.com>
955
956 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
957 output_bfd unused to silence gcc.
958
796f2a93
NC
9592003-07-21 Nick Clifton <nickc@redhat.com>
960
961 * po/sv.po: Updated Swedish translation.
962
f6c52c13
AM
9632003-07-21 Alan Modra <amodra@bigpond.net.au>
964
965 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
966 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
967 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
968 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
969 now done in _bfd_elf_symbol_refs_local_p.
970 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
971 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
972 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
973
aa37626c
L
9742003-07-18 H.J. Lu <hongjiu.lu@intel.com>
975
976 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
977
1e364ec9
L
9782003-07-18 H.J. Lu <hongjiu.lu@intel.com>
979
980 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
981 (SYMBOL_CALLS_LOCAL): Likewise.
982
983 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
984 immediately if symbol isn't defined locally.
985
986a241f
RH
9862003-07-18 Richard Henderson <rth@redhat.com>
987
988 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
989 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
990 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
991 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
992 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
993 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
994 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
995 Update all callers to provide the relocation being resolved.
996
ac4b3dd8
NC
9972003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
998
999 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1000 targ_cflags.
1001
6c37ac4d
NC
10022003-07-17 Nick Clifton <nickc@redhat.com>
1003
1004 * po/es.po: New Spanish translation.
1005 * po/sv.po: New Swedish translation.
1006 * po/opcodes.pot: Regenerate.
1007
02e6ad56
RH
10082003-07-16 Richard Henderson <rth@redhat.com>
1009
1010 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1011 * elfxx-ia64.c, targets.c: Likewise.
1012
5686517c
RH
10132003-07-16 Richard Henderson <rth@redhat.com>
1014
1015 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1016 for symbols defined locally plus -Bsymbolic. Tidy logic.
1017
5a7ea749
RS
10182003-07-15 Richard Sandiford <rsandifo@redhat.com>
1019
1020 * archures.c (bfd_mach_mips7000): New.
1021 * bfd-in2.h: Regenerated.
1022 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1023 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1024 (mips_mach_extensions): Add an entry for it.
1025
76bff705
NC
10262003-07-14 Nick Clifton <nickc@redhat.com>
1027
1028 * po/tr.po: Update with latest version.
1029 * po/SRC-POTFILES.in: Regenerate.
1030 * po/bfd.pot: Regenerate.
1031 * Makfile.in: Regenerate.
1032 * configure: Regenerate.
1033
d0facd1b
NC
10342003-07-12 Jeff Baker <jbaker@qnx.com>
1035
1036 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1037 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1038 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1039 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1040
bcb9b88d
NC
10412003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1042
1043 * coffcode.h (coff_set_section_contents): Set the
1044 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1045
7a9823f1
RS
10462003-07-11 Richard Sandiford <rsandifo@redhat.com>
1047
1048 * bfd-in.h (bfd_h8300_pad_address): Declare.
1049 * bfd-in2.h: Regenerate.
1050 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1051 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1052 addresses before checking whether they can be relaxed.
1053 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1054 Don't complain about overflows in general 8-bit relocations.
1055 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1056 Fix handling of R_H8_DIR24A8.
1057
c6baf75e
RS
10582003-07-11 Richard Sandiford <rsandifo@redhat.com>
1059
1060 * elf32-h8300.c: Convert function prototypes and definitions
1061 to C90 syntax.
1062 * coff-h8300.c: Likewise.
1063 * cpu-h8300.c: Likewise.
1064
fce00800
AM
10652003-07-11 Alan Modra <amodra@bigpond.net.au>
1066
1067 * po/SRC-POTFILES.in: Regenerate.
1068 * po/bfd.pot: Likewise.
1069
e901de89
BW
10702003-07-10 Bob Wilson <bob.wilson@acm.org>
1071
1072 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1073 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1074 .xt.lit.plt section.
1075 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1076 and allocate memory for it.
1077 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1078 section to the .got.loc section.
1079 (elf_xtensa_finish_dynamic_sections): Fix up call to
1080 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1081 the address of .got.loc.
1082 (relax_property_section): Shrink .got.loc to match changes in any
1083 literal table section.
1084 (xtensa_is_property_section): Change to match
1085 xtensa_get_property_section_name.
1086 (xtensa_is_littable_section): New.
1087
eff26f78
L
10882003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1089
1090 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1091 -1LL.
1092
942e0f42
AM
10932003-07-10 Alan Modra <amodra@bigpond.net.au>
1094
1095 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1096 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1097 Run "make dep-am".
1098 * Makefile.in: Regenerate.
1099
73c3cd1c
AO
11002003-07-10 Alexandre Oliva <aoliva@redhat.com>
1101
1102 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1103 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1104 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1105 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1106 * elf32-am33lin.c: Rename global functions.
1107 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1108 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1109 * configure.in (bfd_elf32_am33lin_vec): Added.
1110 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1111 (elf32-am33lin.lo): List dependencies.
1112 * aclocal.m4, configure, Makefile.in: Rebuilt.
1113 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1114 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1115 ELF_ARCH was not defined before.
1116 (elf_symbol_leading_char): Define if not defined.
1117 * elf32-am33lin.c: Override the definitions above.
1118 * targets.c (bfd_elf32_am33lin_vec): New.
1119
03a12831
AO
11202003-07-09 Alexandre Oliva <aoliva@redhat.com>
1121
1122 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1123 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1124 pcrel_relocs_copied.
1125 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1126 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1127 ld-linux.so.2 to ld.so.1.
1128 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1129 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1130 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1131 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1132 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1133 .rela.* section contents with bfd_zalloc.
1134 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1135 * elf-m10300.c: Added declarations for functions missing them.
1136 Merge some shared-library changes from the i386 back-end. Use
1137 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1138 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1139 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1140 members of elf_link_hash_entry. Adjusted references.
1141 (mn10300_elf_final_link_relocate): dynobj was already loaded
1142 into a local variable, use it.
1143 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1144 * elf-m10300.c: Add missing function prototypes.
1145 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1146 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1147 relocation for dynamic relocations.
1148 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1149 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1150 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1151 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1152 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1153 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1154 adress is already known at the time we compute relaxations.
1155 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1156 and PLT32 to narrower relocations.
1157 * libbfd.h, bfd-in2.h: Rebuilt.
1158 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1159 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1160 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1161 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1162 BFD_RELOC_MN10300_RELATIVE): New relocs.
1163 * libbfd.h, bfd-in2.h: Rebuilt.
1164 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1165 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1166 fields.
1167 (elf_mn10300_howto): Defined new relocation types.
1168 (mn10300_reloc_map): Map them.
1169 (_bfd_mn10300_elf_create_got_section): New fn.
1170 (mn10300_elf_check_relocs): Handle PIC relocs.
1171 (mn10300_elf_final_link_relocate): Likewise.
1172 (mn10300_elf_relocate_section): Handle DSOs.
1173 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1174 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1175 elf_mn10300_pic_plt_entry): New.
1176 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1177 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1178 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1179 elf_mn10300_plt_reloc_offset: New macros.
1180 (ELF_DYNAMIC_INTERPRETER): Likewise.
1181 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1182 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1183 (_bfd_mn10300_elf_discard_copies): Likewise.
1184 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1185 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1186 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1187 (elf_backend_can_gc_sections,
1188 elf_backend_create_dynamic_sections,
1189 elf_backend_adjust_dynamic_sections,
1190 elf_backend_size_dynamic_sections,
1191 elf_backend_finish_dynamic_symbol,
1192 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1193 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1194 elf_backend_got_header_size, elf_backend_plt_header_size): New
1195 macros.
1196
b08fa4d3
AO
11972003-07-09 Alexandre Oliva <aoliva@redhat.com>
1198
1199 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1200 * elf-m10300.c (compute_function_info): Account for AM33
1201 registers in `movm' when computing stack space for `call' when
1202 linking for AM33/2.0 link.
1203 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1204 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1205 * bfd-in2.h: Rebuilt.
1206 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1207 * elf-m10300.c: Updated.
1208 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1209 * archures.c (bfd_mach_am332): Defined.
1210 * bfd-in2.h: Rebuilt.
1211 * cpu-m10300.c (bfd_am332_arch): Defined.
1212 (bfd_am33_arch): Chained with am33-2.
1213 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1214 (_bfd_mn10300_elf_final_write_processing): Likewise.
1215
201933ea
L
12162003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1217
1218 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1219
e717da7e
AM
12202003-07-10 Alan Modra <amodra@bigpond.net.au>
1221
1222 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1223 (struct ppc64_elf_obj_tdata): New.
1224 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1225 (ppc64_elf_mkobject): New function.
1226 (struct got_entry): Add "owner". Move "tls_type".
1227 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1228 (ppc64_elf_init_stub_bfd): New function.
1229 (create_got_section): Create header .got in dynobj. Create .got
1230 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1231 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1232 Look for dynobj .got, and test it.
1233 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1234 (update_local_sym_info): Likewise.
1235 (ppc64_elf_check_relocs): Likewise.
1236 (ppc64_elf_gc_sweep_hook): Likewise.
1237 (ppc64_elf_tls_optimize): Likewise.
1238 (allocate_dynrelocs): Likewise.
1239 (ppc64_elf_size_dynamic_sections): Likewise.
1240 (ppc64_elf_relocate_section): Likewise.
1241 (ppc64_elf_next_toc_section): Update comment.
1242 (toc_adjusting_stub_needed): Remove unneeded cast.
1243 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1244 testing section flags.
1245 (ppc64_elf_build_stubs): Likewise.
1246 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1247 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1248 (func_desc_adjust): Copy over dynamic info for undef weaks.
1249 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1250 (ppc64_elf_size_stubs): Update prototype.
1251 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1252 input sections rather than scanning dynobj.
1253
18ad015f
RS
12542003-07-09 Richard Sandiford <rsandifo@redhat.com>
1255
1256 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1257 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1258 (mips_elf_create_msym_section): Delete.
1259 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1260 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1261 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1262 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1263 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1264 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1265 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1266
e10609d3
RS
12672003-07-09 Richard Sandiford <rsandifo@redhat.com>
1268
1269 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1270 symbols protected.
1271
0d591ff7
RS
12722003-07-09 Richard Sandiford <rsandifo@redhat.com>
1273
1274 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1275 of relocations whose offset is -2.
1276
fdd07405
RS
12772003-07-09 Richard Sandiford <rsandifo@redhat.com>
1278
1279 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1280 forced-local symbols like other locals. Don't create relocations
1281 against STN_UNDEF in irix objects.
1282
d2fba50d
RS
12832003-07-09 Richard Sandiford <rsandifo@redhat.com>
1284
1285 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1286 compatible objects, add the values of defined external symbols
1287 to the addend.
1288
6eaa6adc
RS
12892003-07-09 Richard Sandiford <rsandifo@redhat.com>
1290
1291 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1292 initialize a GOT entry to the symbol's st_value.
1293
0c83546a
AM
12942003-07-08 Alan Modra <amodra@bigpond.net.au>
1295
43c40ab2
AM
1296 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1297 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1298 (ppc_elf_tdata): Define.
1299 (elf_local_ptr_offsets): Adjust.
1300 (ppc_elf_mkobject): New function.
1301 (bfd_elf32_mkobject): Define.
1302
0c83546a
AM
1303 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1304 * elfcore.h (elf_core_file_p): Likewise.
1305 * section.c (bfd_section_init): Remove prototype.
1306
58111eb7
AM
13072003-07-08 Alan Modra <amodra@bigpond.net.au>
1308
1309 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1310 field.
1311 (enum elf_linker_section_enum): Delete.
1312 (struct elf_linker_section): Delete.
1313 (struct elf_linker_section_pointers): Delete.
1314 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1315 Make linker_section_pointers a void**.
1316 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1317 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1318 of old item in elf-bfd.h.
1319 (struct elf_linker_section): Likewise.
1320 (struct elf_linker_section_pointers): Likewise.
1321 (elf_local_ptr_offsets): Define.
1322 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1323 (ppc_elf_link_hash_newfunc): Init it.
1324 (struct ppc_elf_link_hash_table): Add sbss.
1325 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1326 individual fields.
1327 (elf_create_linker_section): Fold into..
1328 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1329 Make rela section here if shared.
1330 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1331 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1332 clearing in a loop.
1333 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1334 section here.
1335 (ppc_elf_check_relocs): Adjust.
1336 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1337 creating .sbss by hand.
1338 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1339
15f8604d
JJ
13402003-07-04 Jakub Jelinek <jakub@redhat.com>
1341
1342 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1343 complain_overflow_bitfield.
1344 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1345 complain_overflow_bitfield.
1346
3368a7fb
JJ
13472003-07-04 Jakub Jelinek <jakub@redhat.com>
1348
1349 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1350 true even if -pie.
1351
9203ba99
JJ
13522003-07-04 Jakub Jelinek <jakub@redhat.com>
1353
1354 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1355 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1356 !info->executable.
1357 (get_fptr): For -pie create .opd as writable section and create
1358 .rela.opd as well.
1359 (elfNN_ia64_check_relocs): Change info->shared into
1360 !info->executable.
1361 (allocate_fptr): Likewise.
1362 (allocate_dynrel_entries): Account for a relative reloc for -pie
1363 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1364 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1365 section if -pie.
1366 (set_got_entry): Don't create a relative reloc if -pie
1367 want_ltoff_fptr for undefweak symbol.
1368 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1369 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1370 @fptr().
1371
1372 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1373 even if -pie.
1374 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1375 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1376 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1377 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1378 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1379 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1380 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1381 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1382 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1383
e0a868d1 13842003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1385
1386 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1387 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1388 <R_H8_DIR32A16>: Fix type of relocation.
1389
35cad4c4
KK
13902003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1391
1392 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1393 sections were created already. Remove unnecessary tests of
1394 the previous change.
1395
03151a5a
KK
13962003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1397
1398 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1399 bfd_make_section for existing sections.
1400
003d627e
AM
14012003-07-04 Alan Modra <amodra@bigpond.net.au>
1402
2293c499
AM
1403 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1404 create_got_section if we already have done so.
1405 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1406 (sh_elf_check_relocs): Likewise.
1407 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1408 htab->root.dynobj instead.
1409 (sh_elf_check_relocs): Likewise.
1410 (sh_elf_finish_dynamic_sections): Likewise.
1411
003d627e
AM
1412 * section.c (bfd_make_section): Return NULL for existing section.
1413
fa681e5d
AM
14142003-07-04 Alan Modra <amodra@bigpond.net.au>
1415
1416 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1417 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1418
1419 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1420 (_bfd_elf_find_pointer_linker_section): Likewise.
1421 (bfd_elf32_create_pointer_linker_section): Likewise.
1422 (bfd_elf32_finish_pointer_linker_section): Likewise.
1423 (bfd_elf64_create_pointer_linker_section): Likewise.
1424 (bfd_elf64_finish_pointer_linker_section): Likewise.
1425 (_bfd_elf_make_linker_section_rela): Likewise.
1426 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1427 (elf_finish_pointer_linker_section): Likewise.
1428 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1429 (_bfd_elf_create_linker_section): Move this function..
1430 (_bfd_elf_find_pointer_linker_section): ..and this..
1431 * elflink.h (elf_create_pointer_linker_section): ..and this..
1432 (elf_finish_pointer_linker_section): ..and this..
1433 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1434 calls.
1435 (elf_create_linker_section): Convert to C90, tidy.
1436 (elf_find_pointer_linker_section): Likewise.
1437 (elf_create_pointer_linker_section): Likewise.
1438 (elf_finish_pointer_linker_section): Likewise.
1439 * elf32-i370.c: Delete #if 0 code.
1440
772119ce
AM
14412003-07-02 Alan Modra <amodra@bigpond.net.au>
1442
1443 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1444 _restf* to be satisfied by shared libs, and always force them local.
1445 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1446 Correct test for "bl".
1447 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1448 primary opcode 31.
1449
bd1ea41b
MS
14502003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1451
1452 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1453 (s390_tls_reloc): New function.
1454 (elf_howto_table): Add long displacement relocations R_390_20,
1455 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1456 (elf_s390_reloc_type_lookup): Likewise.
1457 (elf_s390_check_relocs): Likewise.
1458 (elf_s390_gc_sweep_hook): Likewise.
1459 (elf_s390_relocate_section): Likewise.
1460 * elf64-s390.c: Same changes as for elf32-s390.c.
1461 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1462 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1463 BFD_RELOC_390_TLS_GOTIE20.
1464 * bfd-in2.h: Regenerate.
1465 * libbfd.h: Likewise.
1466
113202d6
AM
14672003-06-30 Alan Modra <amodra@bigpond.net.au>
1468
1469 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1470 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1471
c58b9523
AM
14722003-06-29 Alan Modra <amodra@bigpond.net.au>
1473
1474 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1475 Replace PTR with void *. Formatting.
1476 * archive64.c: Likewise.
1477 * archures.c: Likewise.
1478 * bfd-in.h: Likewise.
1479 * bfd.c: Likewise.
1480 * bfdio.c: Likewise.
1481 * bfdwin.c: Likewise.
1482 * cache.c: Likewise.
1483 * corefile.c: Likewise.
1484 * format.c: Likewise.
1485 * init.c: Likewise.
1486 * libbfd-in.h: Likewise.
1487 * libbfd.c: Likewise.
1488 * linker.c: Likewise.
1489 * opncls.c: Likewise.
1490 * reloc.c: Likewise.
1491 * section.c: Likewise.
1492 * simple.c: Likewise.
1493 * syms.c: Likewise.
1494 * targets.c: Likewise.
1495 * bfd-in2.h: Regenerate.
1496 * libbfd.h: Regenerate.
1497
1498 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1499 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1500 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1501 (bfd_getb64): Rewrite without parens.
1502 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1503 * cache.c (insert, snip): Remove INLINE.
1504 * linker.c (bfd_link_add_undef): Likewise.
1505
27482721
AJ
15062003-06-29 Andreas Jaeger <aj@suse.de>
1507
1508 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1509 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1510 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1511 trim plt entries. Move undefweak non-default visibility test ...
1512 (allocate_dynrelocs): ... from here.
1513 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1514 Change all callers.
1515 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1516 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1517 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1518 dynreloc and .got relocs.
1519 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1520 for .got relocs.
27482721 1521
2b86c02e
TS
15222003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1523
1524 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1525
e7c81c25
NC
15262003-06-27 Nick Clifton <nickc@redhat.com>
1527
1528 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1529 bfd_add_gnu_debuglink_section and only create the section, do not
1530 fill in its contents.
1531 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1532 contents of a .gnu-debuglink section.
1533 * bfd-in2.h: Regenerate.
1534
72b4917c
TS
15352003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1536
1537 * elfxx-mips.c: Revert .got alignment to 2**4.
1538
91709090
TS
15392003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1540
1541 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1542
7a79a000
TS
15432003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1544
1545 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1546 relocation header setup.
1547
e47cd125
AM
15482003-06-25 Alan Modra <amodra@bigpond.net.au>
1549
1550 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1551 (ppc_elf_reloc_type_lookup): Modify comment.
1552 (ppc_elf_info_to_howto): Ditto.
1553 (ppc_elf_relocate_section): Ditto.
1554 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1555
1049f94e
AM
15562003-06-25 Alan Modra <amodra@bigpond.net.au>
1557
1558 * aout-ns32k.c: Correct spelling of "relocatable".
1559 * aoutx.h: Likewise.
1560 * bfd-in.h: Likewise.
1561 * bfd.c: Likewise.
1562 * bout.c: Likewise.
1563 * coff-a29k.c: Likewise.
1564 * coff-alpha.c: Likewise.
1565 * coff-arm.c: Likewise.
1566 * coff-i386.c: Likewise.
1567 * coff-i860.c: Likewise.
1568 * coff-i960.c: Likewise.
1569 * coff-m68k.c: Likewise.
1570 * coff-m88k.c: Likewise.
1571 * coff-mcore.c: Likewise.
1572 * coff-mips.c: Likewise.
1573 * coff-or32.c: Likewise.
1574 * coff-ppc.c: Likewise.
1575 * coff-rs6000.c: Likewise.
1576 * coff-sh.c: Likewise.
1577 * coff-tic80.c: Likewise.
1578 * coff64-rs6000.c: Likewise.
1579 * cofflink.c: Likewise.
1580 * cpu-ns32k.c: Likewise.
1581 * ecoff.c: Likewise.
1582 * ecofflink.c: Likewise.
1583 * elf-bfd.h: Likewise.
1584 * elf-eh-frame.c: Likewise.
1585 * elf-hppa.h: Likewise.
1586 * elf-m10200.c: Likewise.
1587 * elf-m10300.c: Likewise.
1588 * elf.c: Likewise.
1589 * elf32-arm.h: Likewise.
1590 * elf32-avr.c: Likewise.
1591 * elf32-cris.c: Likewise.
1592 * elf32-d10v.c: Likewise.
1593 * elf32-dlx.c: Likewise.
1594 * elf32-fr30.c: Likewise.
1595 * elf32-frv.c: Likewise.
1596 * elf32-h8300.c: Likewise.
1597 * elf32-hppa.c: Likewise.
1598 * elf32-i370.c: Likewise.
1599 * elf32-i386.c: Likewise.
1600 * elf32-i860.c: Likewise.
1601 * elf32-i960.c: Likewise.
1602 * elf32-ip2k.c: Likewise.
1603 * elf32-iq2000.c: Likewise.
1604 * elf32-m32r.c: Likewise.
1605 * elf32-m68hc11.c: Likewise.
1606 * elf32-m68hc1x.c: Likewise.
1607 * elf32-m68k.c: Likewise.
1608 * elf32-mcore.c: Likewise.
1609 * elf32-mips.c: Likewise.
1610 * elf32-msp430.c: Likewise.
1611 * elf32-openrisc.c: Likewise.
1612 * elf32-ppc.c: Likewise.
1613 * elf32-s390.c: Likewise.
1614 * elf32-sh.c: Likewise.
1615 * elf32-sh64.c: Likewise.
1616 * elf32-sparc.c: Likewise.
1617 * elf32-v850.c: Likewise.
1618 * elf32-vax.c: Likewise.
1619 * elf32-xstormy16.c: Likewise.
1620 * elf32-xtensa.c: Likewise.
1621 * elf64-alpha.c: Likewise.
1622 * elf64-hppa.c: Likewise.
1623 * elf64-mips.c: Likewise.
1624 * elf64-mmix.c: Likewise.
1625 * elf64-ppc.c: Likewise.
1626 * elf64-s390.c: Likewise.
1627 * elf64-sh64.c: Likewise.
1628 * elf64-sparc.c: Likewise.
1629 * elf64-x86-64.c: Likewise.
1630 * elfcode.h: Likewise.
1631 * elflink.h: Likewise.
1632 * elfn32-mips.c: Likewise.
1633 * elfxx-ia64.c: Likewise.
1634 * elfxx-mips.c: Likewise.
1635 * i386linux.c: Likewise.
1636 * ieee.c: Likewise.
1637 * libcoff-in.h: Likewise.
1638 * linker.c: Likewise.
1639 * m68klinux.c: Likewise.
1640 * pdp11.c: Likewise.
1641 * pe-mips.c: Likewise.
1642 * peXXigen.c: Likewise.
1643 * reloc.c: Likewise.
1644 * reloc16.c: Likewise.
1645 * sparclinux.c: Likewise.
1646 * sunos.c: Likewise.
1647 * syms.c: Likewise.
1648 * versados.c: Likewise.
1649 * vms.c: Likewise.
1650 * xcofflink.c: Likewise.
1651 * bfd-in2.h: Regenerate.
1652 * libcoff.h: Regenerate.
1653 * libbfd.h: Regenerate.
1654
55fd94b0
AM
16552003-06-24 Alan Modra <amodra@bigpond.net.au>
1656
d85f2c7d
AM
1657 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1658 local sym errors.
1659
55fd94b0
AM
1660 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1661 prototypes and casts. Replace PTR with void *. Formatting.
1662 * elf32-ppc.c: Likewise. Break long strings too.
1663 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1664 (ppc_elf_unhandled_reloc): Internationalize error message.
1665 * elf32-ppc.h: Remove PARAMS.
1666
88810f8c
MM
16672003-06-23 Mark Mitchell <mark@codesourcery.com>
1668
1669 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1670 APUinfo slots.
1671 (ppc_elf_final_write_processing): Likewise.
1672
6e35c4da
L
16732003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1674
1675 * elflink.h (elf_link_input_bfd): Check raw size when using
1676 kept_section to preserve debug information discarded by
1677 linkonce.
1678
8f3bab57
AM
16792003-06-20 Alan Modra <amodra@bigpond.net.au>
1680
1681 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1682 (ppc64_elf_setup_section_lists): Set it.
1683 (ppc64_elf_relocate_section): Check sym section id against top_id.
1684 (ppc_build_one_stub): Comment on top_id.
1685
efbc813e
NC
16862003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1687
1688 * config.bfd: Add tic4x-*-rtems*.
1689
4ce794b7
AM
16902003-06-20 Alan Modra <amodra@bigpond.net.au>
1691
1692 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1693 prototypes and casts. Replace PTR with void *. Format copyright.
1694 Mention ABI links.
1695 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1696 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1697 (ppc_type_of_stub): Make r_type an enum.
1698 (ppc64_elf_size_stubs): Likewise.
1699 * elf64-ppc.h: Remove PARAMS macro.
1700
d2a300cf
AM
17012003-06-19 Alan Modra <amodra@bigpond.net.au>
1702
3254fd24
AM
1703 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1704 elf hash tab fields.
1705
d2a300cf
AM
1706 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1707 (ppc64_elf_info_to_howto): Likewise.
1708 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1709 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1710
83615de0
AM
17112003-06-19 Alan Modra <amodra@bigpond.net.au>
1712
1713 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1714 reloc overflow on discarded eh_frame entries.
1715
9b5ecbd0
AM
17162003-06-19 Alan Modra <amodra@bigpond.net.au>
1717
1718 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1719 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1720 Return error condition.
1721 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1722 that have has_gp_reloc set.
1723 (struct ppc_link_hash_table): Add stub_count.
1724 (ppc_build_one_stub): Increment it.
1725 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1726 individual fields.
1727 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1728
64c456e1
AM
17292003-06-18 Alan Modra <amodra@bigpond.net.au>
1730
1731 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1732 size calculation from addend. Round size up.
1733
3dab95d3
HPN
17342003-06-18 Hans-Peter Nilsson <hp@axis.com>
1735
1736 * elf32-cris.c (cris_elf_relocate_section) <case
1737 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1738 symbol from a normal object or an undefined weak symbol.
1739
0b13192e
AM
17402003-06-18 Alan Modra <amodra@bigpond.net.au>
1741
1742 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1743 R_PPC64_TOC relocs.
1744
f97b9cb8
L
17452003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1746
1747 * section.c (struct sec): Put back kept_section.
1748 (STD_SECTION): Put back kept_section initialization.
1749 * bfd-in2.h: Regenerate.
1750
1751 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1752 sections for relocateable output. Use kept_section to preserve
1753 debug information discarded by linkonce.
1754
9f1c3a0a
L
17552003-06-17 Roland McGrath <roland@redhat.com>
1756
1757 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1758 segment-relative relocation between different segments.
1759
734b6cf9
AM
17602003-06-17 Alan Modra <amodra@bigpond.net.au>
1761
1cf1f670
AM
1762 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1763 optimizations earlier.
1764
734b6cf9
AM
1765 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1766 Restore previous input_list type.
1767 (ppc64_elf_link_hash_table_create): Undo last change.
1768 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1769 per output section, but don't bother with bfd_abs_section marker.
1770 (ppc64_elf_next_input_section): Adjust for multiple input section
1771 lists.
1772 (group_sections): Likewise.
1773
23fbd6fa
JJ
17742003-06-17 Jakub Jelinek <jakub@redhat.com>
1775
1776 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1777 *r_offset == r_addend for RELATIVE relocs against .got.
1778
dad27d18
AM
17792003-06-17 Alan Modra <amodra@bigpond.net.au>
1780
1781 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1782
b613960a
NC
17832003-06-17 Nick Clifton <nickc@redhat.com>
1784
1785 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1786 in the vtable_entries_used array to allow for the accessing
1787 the largest element.
b613960a 1788
000732f7
AM
17892003-06-17 Alan Modra <amodra@bigpond.net.au>
1790
3d6f9012
AM
1791 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1792 input_list.
1793 (ppc64_elf_link_hash_table_create): Init input_list here.
1794 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1795 per output section. Set toc_off for abs and other standard sections.
1796 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1797 (ppc64_elf_next_input_section): Adjust for single input section list.
1798 Don't set toc_curr from input bfds that haven't set elf_gp.
1799 (group_sections): Adjust for single input section list.
1800
000732f7
AM
1801 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1802
81407a69
AM
18032003-06-16 Alan Modra <amodra@bigpond.net.au>
1804
1805 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1806 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1807 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1808 got section for RELATIVE relocs. Fix wrong comment. Change condition
1809 under which dynamic relocs update the section contents.
1810
a06a29f2
NC
18112003-06-13 Robert Millan <zeratul2@wanadoo.es>
1812
1813 * config.bfd: Add i386-netbsd-gnu target.
1814
7d1ebfb2
NC
18152003-06-12 Nick Clifton <nickc@redhat.com>
1816
1817 * opncls.c (calc_crc32): Rename to
1818 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1819 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1820 hard-coded ".gnu_debuglink" in the code.
81407a69 1821 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1822 xmalloc with a call to malloc.
81407a69 1823 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1824 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1825 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1826 section to a bfd.
1827 * bfd-in2.h: Regenerate.
1828
18292003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1830
7d1ebfb2
NC
1831 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1832 New target (was i[3-7]86-*-openbsd* before).
1833 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1834 (vax-*-openbsd*): New target.
1835
d80dcc6a
TS
18362003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1837
1838 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1839 for n32, too.
1840 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1841 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1842 (mips_elf_create_got_section): Likewise.
1843 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1844
a7ebbfdf
TS
18452003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1846
1847 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1848 (elf_mips_howto_table_rel): Use it.
1849 (gprel32_with_gp): Move prototype.
1850 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1851 Use mips_elf_generic_reloc.
1852 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1853 Code cleanup.
1854 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1855 zero addend.
1856 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1857 as in the other *_gprel*_reloc functions.
1858 (gprel32_with_gp): Handle partial_inplace properly.
1859 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1860 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1861 Do addend handling directly instead of calling
1862 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1863 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1864 of zero addend. Handle partial_inplace properly.
1865 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1866 addend.
1867 (mips_elf64_gprel16_reloc): Likewise.
1868 (mips_elf64_literal_reloc): Likewise.
1869 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1870 logic as in the other *_gprel*_reloc functions. Handle
1871 partial_inplace properly.
1872 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1873 addend. Handle partial_inplace properly.
1874 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1875 of calling _bfd_mips_elf_gprel16_with_gp.
1876 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1877 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1878 of zero addend.
1879 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1880 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1881 of calling _bfd_mips_elf_gprel16_with_gp.
1882 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1883 partial_inplace properly. Fix wrong addend handling. Fix overflow
1884 check.
1885 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1886 exported.
1887 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1888 (_bfd_mips_elf_relocate_section): Likewise.
1889 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1890 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1891 (_bfd_mips_elf_sign_extend): New prototype.
1892
49ba19a4 18932003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1894
49ba19a4
NC
1895 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1896 New target (was sparc-*-openbsd* before).
1897 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 1898
de6e5e1a
NC
1899 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1900 * configure: Regenerate.
1901
3b443373
L
19022003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1903
1904 * po/Make-in (DESTDIR): New.
1905 (install-data-yes): Support $(DESTDIR).
1906 (uninstall): Likewise.
1907
795bb480
AM
19082003-06-11 Alan Modra <amodra@bigpond.net.au>
1909
1910 * Makefile.am (config.status): Depend on version.h.
1911 Run "make dep-am".
1912 * Makefile.in: Regenerate.
1913 * po/SRC-POTFILES.in: Regenerate.
1914
adadcc0c
AM
19152003-06-10 Alan Modra <amodra@bigpond.net.au>
1916 Gary Hade <garyhade@us.ibm.com>
1917
1918 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1919
f4984206
RS
19202003-06-10 Richard Sandiford <rsandifo@redhat.com>
1921
1922 * archures.c (bfd_mach_h8300sxn): New architecture.
1923 * bfd-in2.h: Regenerate.
1924 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1925 (h8300sxn_info_struct): New.
1926 (h8300sx_info_struct): Link to it.
1927 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1928 (elf32_h8_final_write_processing): Likewise.
1929
ad8e1ba5
AM
19302003-06-08 Alan Modra <amodra@bigpond.net.au>
1931
1932 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1933 elfxx-target.h so that we can use elf_backend_got_header_size.
1934 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1935 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1936 associated macros.
1937 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1938 dst_mask.
1939 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1940 ppc_stub_plt_branch_r2off.
1941 (struct ppc_stub_hash_entry): Reorganize.
1942 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1943 toc_curr, toc_off and emit_stub_syms.
1944 (ppc64_elf_link_hash_table_create): Init them.
1945 (ppc_stub_name): Correct string size.
1946 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1947 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1948 used.
1949 (ppc_type_of_stub): Tweak root.type test.
1950 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1951 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1952 ppc_stub_plt_branch_r2off.
1953 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1954 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1955 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1956 Initialize elf_gp and toc_curr.
1957 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1958 (ppc64_elf_next_input_section): Set toc_off.
1959 (group_sections): Ensure groups have the same TOC.
1960 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1961 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1962 Build new glink stub.
1963 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1964 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1965 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1966 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1967 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1968 (STD_SECTION): Update.
1969 * ecoff.c (bfd_debug_section): Update comment.
1970 * bfd-in2.h: Regenerate.
1971
90fff0d4
DJ
19722003-06-05 Daniel Jacobowitz <drow@mvista.com>
1973
1974 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1975 NULL function pointers.
1976
c82b20e4
DJ
19772003-06-05 Daniel Jacobowitz <drow@mvista.com>
1978
1979 * simple.c (bfd_simple_get_relocated_section_contents): Call
1980 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1981
53d4437a
SS
19822003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1983
5a5b9651
SS
1984 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1985 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1986 swaptables.
1987 * coff-tic4x.c: Ditto
53d4437a
SS
1988 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1989 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
1990 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1991 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1992 swap tables.
53d4437a
SS
1993 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1994 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1995 * coff-apollo.c: Ditto
1996 * coff-arm.c: Ditto
1997 * coff-h8300.c: Ditto
1998 * coff-h8500.c: Ditto
1999 * coff-i960.c: Ditto
2000 * coff-m68k.c: Ditto
2001 * coff-m88k.c: Ditto
2002 * coff-mcore.c: Ditto
2003 * coff-sh.c: Ditto
2004 * coff-sparc.c: Ditto
2005 * coff-tic80.c: Ditto
2006 * coff-we32k.c: Ditto
2007 * coff-z8k.c: Ditto
2008 * coff-w65.c: Ditto
2009
736694c8
SS
20102003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2011
2012 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2013 initialization bug
2014
9ee5e499
JJ
20152003-06-03 Jakub Jelinek <jakub@redhat.com>
2016
2017 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2018 (bfd_section_from_phdr): Likewise.
2019 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2020 (get_program_header_size): Count with PT_GNU_STACK.
2021 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2022 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2023
6f6f27f8
L
20242003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2025
2026 * elflink.h (elf_link_input_bfd): Call linker error_handler
2027 for discarded definitions.
2028
a3b6428f
NC
20292003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2030
2031 * syms.c (decode_section_type): Return 'n' if section flags are
2032 SEC_HAS_CONTENTS && SEC_READONLY.
2033
e30ddb24
NC
20342003-06-03 Nick Clifton <nickc@redhat.com>
2035
2036 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2037 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2038 (v850_elf_reloc_map): Likewise.
2039 (v850_elf_check_relocs): Likewise.
2040 (v850_elf_perform_relocation): Likewise.
2041 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2042 to make R_V850_REl32 pc-relative.
adadcc0c 2043
2558b9a9
KK
20442003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2045
2046 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2047 and DT_DEBUG dynamic tag even for position independent executables.
2048 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2049
f15398ef
DJ
20502003-06-02 Daniel Jacobowitz <drow@mvista.com>
2051
2052 * config.bfd: Move obsolete entries out of the range of the
2053 targmatch sed script.
2054
cad28985
DJ
20552003-06-02 Daniel Jacobowitz <drow@mvista.com>
2056
2057 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2058
f2c822e3
JJ
20592003-05-31 Jakub Jelinek <jakub@redhat.com>
2060
2061 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2062 plt entries, not just 8191.
2063
c9c27aad
DJ
20642003-05-30 Daniel Jacobowitz <drow@mvista.com>
2065
2066 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2067 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2068
36af4a4e
JJ
20692003-05-30 Ulrich Drepper <drepper@redhat.com>
2070 Jakub Jelinek <jakub@redhat.com>
2071
2072 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2073 instead of info->shared where appropriate.
2074 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2075 * elflink.c (_bfd_elf_create_got_section): Likewise.
2076 (_bfd_elf_link_create_dynamic_sections): Likewise.
2077 (_bfd_elf_link_assign_sym_version): Likewise.
2078 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2079 and DT_DEBUG dynamic tag even for position independent executables.
2080 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2081 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2082 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2083 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2084 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2085 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2086 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2087 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2088 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2089
f8843e87
AM
20902003-05-30 Kris Warkentin <kewarken@qnx.com>
2091
2092 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2093 signalled thread.
2094 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2095
29e1a6e4
NC
20962003-05-29 Nick Clifton <nickc@redhat.com>
2097
2098 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2099 Tidy up formatting.
2100 * Makefile.am: Add dependency on safe-ctype.h.
2101 * Makefile.in: Regenerate.
2102
4b555070
TS
21032003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2104
2105 * elfxx-mips.c: Don't force symbols local unconditionally.
2106
0236e03e
L
21072003-05-28 Alan Modra <amodra@bigpond.net.au>
2108
2109 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2110 undefined_symbol call.
2111
9e4aeb93
RS
21122003-05-27 Richard Sandiford <rsandifo@redhat.com>
2113
2114 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2115 (mips_elf_link_hash_table): Likewise.
2116
d0c728db
TS
21172003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2118
2119 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2120 R_MIPS_GNU_REL16_S2 support.
2121 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2122 (mips_elf64_rtype_to_howto): Use it.
2123 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2124 R_MIPS_GNU_REL16_S2 support.
2125 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2126 (mips_elf_n32_rtype_to_howto): Use it.
2127
759ebd76
DA
21282003-05-21 Stuart F. Downing <sdowning@fame.com>
2129
2130 * som.h: Define PA_2_0 before including a.out.h
2131
143d77c5
EC
21322003-05-07 Eric Christopher <echristo@redhat.com>
2133 Alexandre Oliva <aoliva@redhat.com>
2134
2135 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2136 pic tests, change to warning.
2137 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2138
cea3d58d
NC
21392003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2140
2141 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2142 well as shle-...-netbsdelf. Remove duplicate entry.
2143
385a4c14
NC
21442003-05-21 Nick Clifton <nickc@redhat.com>
2145
60e42408
NC
2146 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2147 for X_STORMY16_REL_12 reloc.
2148
385a4c14 2149 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2150 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2151 (bfd_elf_get_runpath_list): Likewise.
2152
129b8c20
RM
21532003-05-19 Roland McGrath <roland@redhat.com>
2154
2155 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2156 * bfd-in.h: Declare it.
2157 * bfd-in2.h: Regenerated.
2158 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2159 * elf-bfd.h (struct elf_backend_data): New function pointer member
2160 elf_backend_bfd_from_remote_memory.
2161 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2162 Declare them.
2163 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2164 (elfNN_bed): Add that to the initializer.
2165
21662003-05-15 Roland McGrath <roland@redhat.com>
2167
2168 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2169
22d5e339
L
21702003-05-20 Jakub Jelinek <jakub@redhat.com>
2171
2172 * elflink.h (elf_link_output_extsym): Only issue error about !=
2173 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2174
21752003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2176
2177 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2178 when removing the old definition for symbols with non-default
2179 visibility.
2180
b645cb17
JE
21812003-05-18 Jason Eckhardt <jle@rice.edu>
2182
2183 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2184
d2ff124f
AS
21852003-05-17 Andreas Schwab <schwab@suse.de>
2186
2187 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2188 elf_section_data during processing of pc-relative and absolute
2189 relocations.
2190 (elf_m68k_relocate_section): Use the cached reloc section instead
2191 of computing it again. Fix handling of visibility. Don't modify
2192 addend when copying over a relocation into the output.
2193
9c7a29a3
AM
21942003-05-17 Alan Modra <amodra@bigpond.net.au>
2195
2196 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2197 to trim plt entries. Move undefweak non-default visibility test..
2198 (allocate_dynrelocs): ..from here.
2199 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2200 dynamic_sections_created here. Update comment. Move undefweak
2201 non-default visibility test..
2202 (allocate_dynrelocs): ..from here. Fix comment.
2203 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2204 to trim plt entries. Move undefweak non-default visibility test..
2205 (allocate_dynrelocs): ..from here. Fix comment.
2206 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2207 STV_DEFAULT rather than comparing with zero.
2208 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2209 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2210
9bcf4de0
TS
22112003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2212
2213 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2214 pointers.
2215 (_bfd_set_gp_value): Likewise.
2216
5d1db417
MS
22172003-05-16 Michael Snyder <msnyder@redhat.com>
2218 From Bernd Schmidt <bernds@redhat.com>
2219 * archures.c (bfd_mach_h8300sx): New.
2220 * bfd-in2.h: Regenerate.
2221 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2222 (h8300sx_info_struct): New.
2223 (h8300s_info_struct): Link to it.
2224 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2225 (elf32_h8_final_write_processing): Likewise.
2226 (elf32_h8_relax_section): Likewise.
2227
80c7c40a
NC
22282003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2229
2230 * config.bfd: Accept i[3-7]86 variants.
2231 * configure.host: Likewise.
2232 * configure.in: Likewise.
2233 * configure: Regenerate.
2234
c1be741f
L
22352003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2236
2237 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2238 symbol.
2239
a15d9d3a
L
22402003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2241
2242 * elflink.h (elf_link_check_versioned_symbol): Also allow
2243 the base version.
2244
09695f56
AM
22452003-05-15 Alan Modra <amodra@bigpond.net.au>
2246 H.J. Lu <hongjiu.lu@intel.com>
2247
2248 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2249 (elf_i386_relocate_section): Likewise.
2250 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2251 (ppc_elf_relocate_section): Likewise.
2252 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2253 (ppc64_elf_relocate_section): Likewise.
2254
40f62fa0
TS
22552003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2256
2257 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2258
47247ced
SC
22592003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2260
2261 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2262 processor capability, allow merge of HC12 and HCS12 in some cases.
2263 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2264 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2265 (bfd_m68hc12_arch): Link it.
2266 (scan_mach): New function.
2267
32dfa85d
AH
22682003-05-13 Andrew Haley <aph@redhat.com>
2269
2270 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2271
586119b3
AM
22722003-05-13 Alan Modra <amodra@bigpond.net.au>
2273 H.J. Lu <hongjiu.lu@intel.com>
2274
2275 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2276 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2277 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2278 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2279 (ppc_elf_relocate_section): Likewise.
2280 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2281 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2282 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2283 relocs need no other types.
2284 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2285 dynreloc check.
2286 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2287 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2288 .got relocs.
2289
04e534c3
KK
22902003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2291
2292 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2293 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2294 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2295 visibility, a) don't allocate plt entries, b) don't allocate
2296 .got relocs, c) discard dyn rel space
adadcc0c
AM
2297 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2298 don't generate dynamic relocs.
04e534c3
KK
2299 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2300 for weakdefs when symbol already adjusted.
2301
0afb2dc0
NC
23022003-05-12 Nick Clifton <nickc@redhat.com>
2303
2304 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2305 overflow detection for R_XSTORMY16_16 reloc.
2306
9d29900b
NC
23072003-05-12 Paul Clarke <paulc@senet.com.au>
2308
2309 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2310
a48c6a54
JE
23112003-05-11 Jason Eckhardt <jle@rice.edu>
2312
2313 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2314 adjust upper bits.
2315 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2316 proper place.
2317 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2318 proper place.
2319
44f745a6
AS
23202003-05-11 Andreas Schwab <schwab@suse.de>
2321
2322 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2323 complicated tests for unresolvable relocs with a simple direct
2324 scheme using "unresolved_reloc" var. Report some detail on
2325 bfd_reloc_outofrange and similar errors.
2326
4ec72bde
MS
23272003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2328
2329 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2330 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2331 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2332 * elf64-s390.c: Likewise.
2333
64285810
MS
23342003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2335
2336 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2337 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2338 ELF_LINK_NON_GOT_REF from weakdef.
2339 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2340 already been adjusted before treating it specially.
2341 * el64-s390.c: Likwise.
2342
82058a73
MS
23432003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2344
2345 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2346 non-default visibility, a) don't make them dynamic, b) discard
2347 space for dynamic relocs.
2348 (elf_s390_relocate_section): Initialize the GOT entries and skip
2349 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2350 symbols with non-default visibility.
2351 * elf64-s390.c: Likewise.
2352
60d8b524
AM
23532003-05-09 Alan Modra <amodra@bigpond.net.au>
2354
2355 * cpu-arm.c (arm_check_note): Warning fix.
2356 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2357 to keep relocs if edited.
2358 (iq2000_elf_print_private_bfd_data): Return TRUE.
2359 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2360 ELF64_R_SYM.
2361 (elfNN_ia64_relax_ldxmov): Warning fix.
2362 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2363 * xtensa-modules.c (get_num_opcodes): Warning fix.
2364
e57b5356
AM
23652003-05-09 Andrey Petrov <petrov@netbsd.org>
2366
2367 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2368
45d6a902
AM
23692003-05-09 Alan Modra <amodra@bigpond.net.au>
2370
2371 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2372 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2373 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2374 (bfd_elf_record_link_assignment): Move from elflink.h.
2375 (_bfd_elf_merge_symbol): Likewise.
2376 (_bfd_elf_add_default_symbol): Likewise.
2377 (_bfd_elf_export_symbol): Likewise.
2378 (_bfd_elf_link_find_version_dependencies): Likewise.
2379 (_bfd_elf_link_assign_sym_version): Likewise.
2380 (_bfd_elf_link_read_relocs): Likewise.
2381 (_bfd_elf_link_size_reloc_section): Likewise.
2382 (_bfd_elf_fix_symbol_flags): Likewise.
2383 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2384 (_bfd_elf_link_sec_merge_syms): Likewise.
2385 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2386 and bed->s->sizeof_rela.
2387 (_bfd_elf_link_output_relocs): Likewise.
2388 * elf-bfd.h (struct elf_size_info): Rename file_align to
2389 log_file_align.
2390 (struct elf_info_failed): Move from elflink.h.
2391 (struct elf_assign_sym_version_info): Likewise.
2392 (struct elf_find_verdep_info): Likewise.
2393 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2394 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2395 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2396 _bfd_elf_link_assign_sym_version,
2397 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2398 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2399 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2400 _bfd_elf_link_sec_merge_syms): Declare.
2401 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2402 (_bfd_elf32_link_read_relocs): Likewise.
2403 (bfd_elf64_link_create_dynamic_sections): Likewise.
2404 (_bfd_elf64_link_read_relocs): Likewise.
2405 * elflink.h: Move lots o' stuff elsewhere.
2406 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2407 (bfd_elf64_record_link_assignment): Likewise.
2408 (bfd_elf_record_link_assignment): Declare.
2409 * bfd-in2.h: Regenerate.
2410 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2411 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2412 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2413 (assign_file_positions_for_segments): Likewise.
2414 (assign_file_positions_except_relocs): Likewise.
2415 (swap_out_syms, elfcore_write_note): Likewise.
2416 * elf-m10200.c: Adjust for changed function names.
2417 * elf-m10300.c: Likewise.
2418 * elf32-arm.h: Likewise.
2419 * elf32-h8300.c: Likewise.
2420 * elf32-hppa.c: Likewise.
2421 * elf32-ip2k.c: Likewise.
2422 * elf32-m32r.c: Likewise.
2423 * elf32-m68hc11.c: Likewise.
2424 * elf32-m68hc1x.c: Likewise.
2425 * elf32-m68k.c: Likewise.
2426 * elf32-mips.c: Likewise.
2427 * elf32-ppc.c: Likewise.
2428 * elf32-sh.c: Likewise.
2429 * elf32-v850.c: Likewise.
2430 * elf32-xtensa.c: Likewise.
2431 * elf64-alpha.c: Likewise.
2432 * elf64-hppa.c: Likewise.
2433 * elf64-mmix.c: Likewise.
2434 * elf64-ppc.c: Likewise.
2435 * elf64-sh64.c: Likewise.
2436 * elfxx-ia64.c: Likewise.
2437 * elfxx-mips.c: Likewise.
2438 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2439 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2440 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2441 * elf64-mips.c (mips_elf64_size_info): Likewise.
2442 * elf64-s390.c (s390_elf64_size_info): Likewise.
2443 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2444
bf1e742e
L
24452003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2446
2447 * elflink.h (elf_add_default_symbol): After skipping the
2448 unversioned symbol, go to non-default one.
2449
6a32c710
L
24502003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2451
2452 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2453 want_plt field.
2454 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2455 for symbols with non-default visibility.
2456
71552942
L
24572003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2458
2459 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2460 case that a DSO references a hidden symbol which may be
2461 satisfied by a versioned symbol in another DSO.
2462 (elf_link_output_extsym): Check versioned definition for hidden
2463 symbol referenced by a DSO.
2464
208c2cd6
NC
24652003-05-07 Nick Clifton <nickc@redhat.com>
2466
2467 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2468 R_XSTORMY16_16 reloc to ignore overflows.
2469
aa701218
AO
24702003-05-06 Alexandre Oliva <aoliva@redhat.com>
2471
2472 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2473 error message for mixing different-endian files. Check for ABI
2474 compatibility of input files with the selected emulation.
2475
4e795f50
AM
24762003-05-05 Alan Modra <amodra@bigpond.net.au>
2477
2478 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2479 non-default visibility, a) don't make them dynamic, b) discard
2480 space for dynamic relocs.
2481 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2482
2483 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2484 non-default visibility, a) don't allocate plt entries, b) don't
2485 allocate .got relocs, c) discard dyn rel space,
2486 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2487 don't generate dynamic relocs.
2488 * elf64-ppc.c (allocate_dynrelocs): As above.
2489 (ppc64_elf_relocate_section): As above.
2490
4bc6e03a
AJ
24912003-05-05 Andreas Jaeger <aj@suse.de>
2492
2493 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2494 relocation entries for weak undefined symbols with non-default
2495 visibility.
2496 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2497 skip R_386_32/R_386_PC32 for weak undefined symbols with
2498 non-default visibility.
2499
ef5aade5
L
25002003-05-04 H.J. Lu <hjl@gnu.org>
2501
2502 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2503 relocation entries for weak undefined symbols with non-default
2504 visibility.
2505 (elf_i386_relocate_section): Initialize the GOT entries and
2506 skip R_386_32/R_386_PC32 for weak undefined symbols with
2507 non-default visibility.
129b8c20 2508
ef5aade5
L
2509 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2510 descriptors for weak undefined symbols with non-default
2511 visibility.
2512 (allocate_dynrel_entries): Don't allocate relocation entries
2513 for symbols resolved to 0.
2514 (set_got_entry): Don't install dynamic relocation for weak
2515 undefined symbols with non-default visibility.
2516 (set_pltoff_entry): Likewise.
2517
2518 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2519 with non-default visibility.
2520 (elf_link_output_extsym): Don't make weak undefined symbols
2521 with non-default visibility dynamic.
2522
c424e0e9
L
25232003-05-04 H.J. Lu <hjl@gnu.org>
2524
2525 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2526
d31e3dfe
L
25272003-05-04 H.J. Lu <hjl@gnu.org>
2528
2529 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2530 symbol dynamic. Check indirection when removing the old
2531 definition for symbols with non-default visibility.
2532 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2533
4d2e1ff0
NC
25342003-05-02 Nick Clifton <nickc@redhat.com>
2535
2536 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2537 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2538 unsigned overflow.
2539
d40d037c
AJ
25402003-05-02 Andreas Jaeger <aj@suse.de>
2541
2542 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2543 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2544 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2545 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2546 ELF_LINK_NON_GOT_REF from weakdef.
2547
c5d1701e
NC
25482003-05-02 Charles Lepple <clepple@ghz.cc>
2549 Nick Clifton <nickc@redhat.com>
2550
2551 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2552 * aclocal.m4: Regenerate.
2553 * configure: Regenerate.
2554 * Makefile.in: Regenerate.
2555
81848ca0
AM
25562003-05-01 Alan Modra <amodra@bigpond.net.au>
2557
2558 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2559 weakdef sym has already been adjusted before treating it specially.
2560 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2561 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2562 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2563 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2564
c7996ad6
L
25652003-04-28 H.J. Lu <hjl@gnu.org>
2566
2567 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2568 the relax finalize pass.
2569
2570 * section.c (struct sec): Add need_finalize_relax and remove
2571 flag11.
2572 (STD_SECTION): Update struct sec initializer.
2573 * bfd-in2.h: Regenerated.
2574
f006af20
L
25752003-04-28 H.J. Lu <hjl@gnu.org>
2576
2577 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2578 to copy any information related to dynamic linking when we flip
2579 the indirection.
2580
1b1fe8fe
L
25812003-04-27 H.J. Lu <hjl@gnu.org>
2582
2583 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2584 (ELF_LINK_DYNAMIC_WEAK): New.
2585
2586 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2587 a symbol should be skipped. Ignore definitions in dynamic
2588 objects for symbols with non-default visibility.
2589 (elf_add_default_symbol): Adjusted.
2590 (elf_link_add_object_symbols): Check if a symbol should be
2591 skipped. Don't merge the visibility field with the one from
2592 a dynamic object.
2593 (elf_link_check_versioned_symbol): Use undef_bfd.
2594 (elf_link_output_extsym): Warn if a forced local symbol is
2595 referenced from dynamic objects. Make non-weak undefined symbol
2596 with non-default visibility a fatal error.
2597
052a450c
DJ
25982003-04-27 Daniel Jacobowitz <drow@mvista.com>
2599
2600 * configure.in: Bump version on HEAD to 2.14.90.
2601 * configure: Regenerated.
2602
d204f4c0
SC
26032003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2604
2605 PR savannah/3331:
2606 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2607 when we couldn't relax something.
2608
3c0a515d
L
26092003-04-25 Alan Modra <amodra@bigpond.net.au>
2610
2611 * elflink.h (elf_merge_symbol): When we find a regular definition
2612 for an indirect symbol, flip the indirection so that the old
2613 direct symbol now points to the new definition.
2614
d145330d
RM
26152003-04-24 Roland McGrath <roland@redhat.com>
2616
2617 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2618
fc0bffd6
AM
26192003-04-24 Alan Modra <amodra@bigpond.net.au>
2620
2621 * elf32-ppc.c: Formatting and comment fixes.
2622 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2623 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2624
26252003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2626
2627 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2628 * bfd-in2.h: Rebuilt.
2629 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2630 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2631 & H8300SNMAGIC.
2632 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2633 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2634 (h8300sn_info_struct, h8300hn_info_struct): New.
2635 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2636 (elf32_h8_final_write_processing): Likewise.
2637
267fb3c1
KK
26382003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2639
2640 * elf32-sh.c (tpoff): New.
2641 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2642 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2643 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2644 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2645 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2646 (dtpoff_base): Fix wrong indentation.
2647 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2648 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2649 R_SH_TLS_TPOFF32 relocations.
2650
ef230218
JR
26512003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2652
2653 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2654 * cpu-sh.c: Likewise.
2655 * elf32-sh.c: Likewise.
2656 * reloc.c (bfd_reloc_code_real): Likewise.
2657 * elf32-sh64-com.c: Change comment to refer to SuperH.
2658 * elf32-sh64.c: Likewise.
2659 * elf64-sh64.c: Likewise.
2660 * bfd-in2.h (enum bfd_architecture): Regenerate.
2661
8c29f035
AM
26622003-04-23 Alan Modra <amodra@bigpond.net.au>
2663
2664 From Julien LEMOINE <speedblue@debian.org>
2665 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2666 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2667
26597c86
NC
26682003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2669
2670 * archures.c: Replace references to Mitsubishi M32R with references
2671 to Renesas M32R.
2672 * relocs.c: Likewise.
2673 * bfd-in2.h: Regenerate.
2674
cc13e3ef
RH
26752003-04-21 Richard Henderson <rth@redhat.com>
2676
2677 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2678 executable when a symbol is defined both regular and dynamic.
2679
f5a6f915
SC
26802003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2681
2682 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2683 (elf32-m68hc1x.lo): Update dependencies
2684 * configure.in: Add elf32-m68hc1x.lo.
2685 * configure: Rebuild.
2686 * Makefile.in: Rebuild.
2687
3a65329d
SC
26882003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2689
2690 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2691 (m68hc11_elf_hash_table_create): New function.
2692 (elf32_m68hc11_link_hash_table_free): New function.
2693 (stub_hash_newfunc): New function.
2694 (m68hc11_add_stub): New function.
2695 (elf32_m68hc11_add_symbol_hook): New function.
2696 (elf32_m68hc11_setup_section_lists): New function.
2697 (elf32_m68hc11_next_input_section): New function.
2698 (elf32_m68hc11_size_stubs): New function.
2699 (elf32_m68hc11_build_stubs): New function.
2700 (m68hc11_get_relocation_value): New function.
2701 (elf32_m68hc11_relocate_section): Call the above to redirect
2702 some relocations to the trampoline code.
2703 (m68hc11_elf_export_one_stub): New function.
2704 (m68hc11_elf_set_symbol): New function.
2705 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2706 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2707 is not yet initialized.
2708
2709 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2710 (elf32_m68hc11_stub_hash_entry): New struct.
2711 (m68hc11_page_info): Add trampoline handler address.
2712 (m68hc11_elf_link_hash_table): Add stubs generation members.
2713 (elf32_m68hc11_add_symbol_hook): Declare.
2714 (elf32_m68hc11_setup_section_lists): Declare.
2715 (elf32_m68hc11_size_stubs): Declare.
2716 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2717
3a65329d
SC
2718 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2719 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2720 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2721 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2722 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2723 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2724 (bfd_elf32_bfd_link_hash_table_create): Define.
2725 (elf_backend_add_symbol_hook): Define.
2726 (m68hc11_elf_bfd_link_hash_table_create): New function.
2727 (m68hc11_elf_build_one_stub): New function.
2728 (m68hc11_elf_size_one_stub): New function.
2729 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2730 (bfd_elf32_bfd_link_hash_table_create): Define.
2731
2732 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2733 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2734 (m68hc12_phys_addr): Ditto.
2735 (m68hc12_phys_page): Ditto.
2736 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2737 (elf32_m68hc11_gc_mark_hook): Likewise.
2738 (elf32_m68hc11_gc_sweep_hook): Likewise.
2739 (elf32_m68hc11_check_relocs): Likewise.
2740 (elf32_m68hc11_relocate_section): Likewise.
2741 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2742 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2743 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2744 (m68hc12_elf_build_one_stub): New function.
2745 (m68hc12_elf_size_one_stub): New function.
2746 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2747 (elf_backend_add_symbol_hook): Define.
2748 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2749
4081944f
NC
27502003-04-18 Nick Clifton <nickc@redhat.com>
2751
2752 * format.c (bfd_check_format_matches): Only check associated
2753 vector if the matching_vector has been created.
2754
060dc71d
AO
27552003-04-15 Alexandre Oliva <aoliva@redhat.com>
2756
2757 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2758 2003-04-09's change.
2759
a3476bef
NC
27602003-04-15 Brian Ford <ford@vss.fsi.com>
2761
2762 * peicode.h (coff_swap_scnhdr_in): If a section holds
2763 uninitialized data and is from an object file or from an
2764 executable image that has not initialized the s_size field, or if
2765 the physical size is padded, use the virtual size (stored in
2766 s_paddr) instead.
2767
ca4fa240
NC
27682003-04-15 H.J. Lu <hjl@gnu.org>
2769
2770 * elflink.h (elf_link_add_object_symbols): Properly report
2771 filename for alignment reduction.
2772
c2dcd04e
NC
27732003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2774
2775 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2776 * reloc.c: Likewise.
2777 * coff-h8300.c: Likewise.
2778 * coff-h8500.c: Likewise.
2779 * coff-sh.c: Likewise.
2780 * cpu-h8300.c: Likewise.
2781 * cpu-sh.c: Likewise.
2782 * elf32-h8300.c: Likewise.
2783 * elf32-sh.c: Likewise.
2784 * elf32-sh64-com.c: Likewise.
2785 * elf32-sh64.c: Likewise.
2786 * elf64-sh64.c: Likewise.
2787 * bfd-in2.h: Regenerate.
2788
f7661995
NC
27892003-04-14 H.J. Lu <hjl@gnu.org>
2790
2791 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2792 alignment for common symbols. Warn reducing alignment for
2793 common symbols. Report old filename when symbol size changes.
2794
93a2b7ae
AO
27952003-04-12 Alexandre Oliva <aoliva@redhat.com>
2796
2797 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2798 occurrences of the same test changed in the previous patch.
2799 Optimize.
2800
0176c794
AO
28012003-04-11 Alexandre Oliva <aoliva@redhat.com>
2802
2803 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2804 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2805 GOT_DISP/addend only if the symbol got a global GOT entry.
2806
0fdc1bf1
AO
28072003-04-10 Alexandre Oliva <aoliva@redhat.com>
2808
2809 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2810 GOT_PAGE/GOT_OFST referencing overridable symbol to
2811 GOT_DISP/addend.
2812 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2813 global symbol as GOT_DISP.
2814
9b8c98a4
BW
28152003-04-10 Bob Wilson <bob.wilson@acm.org>
2816
2817 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2818 next relocation on an undefined symbol.
2819
ec1659c8
RH
28202003-04-09 Richard Henderson <rth@redhat.com>
2821
2822 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2823 Ignore relocations against r_symndx == 0.
2824
7dfb07f7
L
28252003-04-09 H.J. Lu <hjl@gnu.org>
2826
2827 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2828 FALSE for undefined symbols.
2829 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2830
a3805e4e
AO
28312003-04-09 Alexandre Oliva <aoliva@redhat.com>
2832
2833 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2834 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2835 addr_size.
2836
69931e60
AO
28372003-04-08 Alexandre Oliva <aoliva@redhat.com>
2838
2839 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2840 pointer size from ABI, not arch_bits_per_address.
2841
59a8c196
KB
28422003-04-07 Kevin Buettner <kevinb@redhat.com>
2843
2844 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2845 constants for n32 ABI.
2846
8e16317c
NC
28472003-04-06 Andrew Cagney <cagney@redhat.com>
2848
2849 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2850 free that leads to GDB vs BFD memory corruption.
2851
196486be
SC
28522003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2853
2854 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2855 symbols that mark the end of the section.
2856 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2857 converting to a relative branch so that the offset is computed after
2858 the relaxation; also relocate a jsr into a bsr if possible but don't
2859 relax them if they are to a far symbol as we need to call the
2860 trampoline code.
2861 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2862
be33c5dd
SS
28632003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2864
2865 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2866 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2867 * bfd-in2.h: Regenerate
2868 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2869 * cpu-tic4x.c: Ditto
2870
ff0c9faf
NC
28712003-04-03 Nick Clifton <nickc@redhat.com>
2872
2873 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2874 differently for object files and executables.
2875 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2876 for object files or for executables who have not already
2877 initialised the field.
2878 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2879 the PE format bfd is an executable.
2880
2b98e6c0
AM
28812003-04-03 Alan Modra <amodra@bigpond.net.au>
2882
2883 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2884 here as it's too early to reliably determine locality.
2885 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 2886 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 2887
92403579
BW
28882003-04-02 Bob Wilson <bob.wilson@acm.org>
2889
2890 * xtensa-modules.c: Remove comment indicating that this is a
2891 generated file.
2892
c45a316a
AM
28932003-04-02 Alan Modra <amodra@bigpond.net.au>
2894
2895 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2896
e0001a05
NC
28972003-04-01 Bob Wilson <bob.wilson@acm.org>
2898
8c29f035
AM
2899 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2900 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2901 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2902 xtensa-modules.lo.
2903 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2904 xtensa-modules.c.
2905 (cpu-xtensa.lo): New target.
2906 (elf32-xtensa.lo): Likewise.
2907 (xtensa-isa.lo): Likewise.
2908 (xtensa-modules.lo): Likewise.
2909 * Makefile.in: Regenerate.
2910 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2911 (bfd_archures_list): Add bfd_xtensa_arch.
2912 * config.bfd: Handle xtensa-*-*.
2913 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2914 * configure: Regenerate.
2915 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2916 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2917 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2918 (bfd_elf32_xtensa_le_vec): Likewise.
2919 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2920 * cpu-xtensa.c: New file.
2921 * elf32-xtensa.c: Likewise.
2922 * xtensa-isa.c: Likewise.
2923 * xtensa-modules.c: Likewise.
2924 * libbfd.h: Regenerate.
2925 * bfd-in2.h: Likewise.
e0001a05 2926
5a6c6817
NC
29272003-04-01 Nick Clifton <nickc@redhat.com>
2928
2929 * archures.c (bfd_mach_arm_unknown): Define.
2930 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2931 bfd_arm_get_mach_from_notes): Prototype.
2932 * bfd-in2.h: Regenerate.
2933 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2934 bfd_arm_merge_machines.
2935 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2936 * coffcode.h (coff_set_arch_mach_hook): Call
2937 bfd_arm_get_mach_from_notes.
2938 * coffgen.c (coff_real_object_p): Revert previous delta.
2939 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2940 .note section.
2941 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2942 binaries compiled for different architectures..
2943 (bfd_arm_update_notes): New function: Update an ARM note section.
2944 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2945 number from an ARM note section.
2946 * elf32-arm.h (elf32_arm_object_p): Use
2947 bfd_arm_get_mach_from_notes.
2948 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2949 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 2950
0cc1cf99
BE
29512003-04-01 Ben Elliston <bje@wasabisystems.com>
2952
2953 * dwarf2.c (read_attribute_value): Correct typo in comment.
2954
af3ef9fe
NC
29552003-04-01 Nick Clifton <nickc@redhat.com>
2956
2957 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2958 instead of concat().
2959 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
2960 (add_line_info): Make a copy of the filename when storing it into
2961 the info structure.
af3ef9fe 2962
6e84a906
DJ
29632003-03-31 Andreas Schwab <schwab@suse.de>
2964 Daniel Jacobowitz <drow@mvista.com>
2965
2966 * simple.c (bfd_simple_get_relocated_section_contents): Add
2967 parameter symbol_table. Optionally use it instead of the symbol
2968 table from the bfd. Save and restore output offsets and output
2969 sections around bfd_get_relocated_section_contents. Fix a memory
2970 leak.
2971 (simple_save_output_info, simple_restore_output_info): New
2972 functions.
2973 * bfd-in2.h: Regenerate.
2974 * dwarf2.c (read_abbrevs): Use
2975 bfd_simple_get_relocated_section_contents instead of
2976 bfd_get_section_contents.
2977 (decode_line_info): Likewise.
2978 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2979 find_rela_addend.
2980 (find_rela_addend): Remove.
2981 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2982 debugging sections.
2983 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2984 not bfd_zalloc.
2985
5ed6aba4
NC
29862003-03-31 David Heine <dlheine@suif.stanford.edu>
2987
2988 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2989 bfd_alloc.
2990 * dwarf2.c (concat_filename): Always allocate space for the
2991 returned filename.
2992 (decode_line_info): Free the allocated filename returned by
2993 concat_filename.
2994 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2995 * elf.c (copy_private_bfd_data): Likewise.
2996 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2997 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2998 * format.c (bfd_check_format_matches): Likewise.
2999 * linker.c (bfd_generic_final_link): Likewise.
3000 * opncls.c (find_separate_debug_info): Likewise.
3001 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3002
5941afc1
L
30032003-03-28 H.J. Lu <hjl@gnu.org>
3004
3005 * elflink.h (elf_link_add_object_symbols): Correctly combine
3006 visibilities.
3007
9d73f260
JJ
30082003-03-27 Jakub Jelinek <jakub@redhat.com>
3009
3010 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3011 to -1 before recomputing got offsets.
3012
a5ad465a
AS
30132003-03-26 Andreas Schwab <schwab@suse.de>
3014
3015 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3016 (elf_m68k_relocate_section): Use it to correctly handle symbols
3017 forced to be local.
3018 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3019 entries for symbols that are forced to be local.
3020
d0647110
AO
30212003-03-25 Alexandre Oliva <aoliva@redhat.com>
3022
3023 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3024 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3025 * elfn32-mips.c, elf64-mips.c: Use it.
3026
e16bb312
NC
30272003-03-25 Stan Cox <scox@redhat.com>
3028 Nick Clifton <nickc@redhat.com>
8c29f035 3029
9b5ecbd0 3030 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3031
3032 * archures.c: Add bfd_mach_arm_iWMMXt.
3033 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3034 * bfd-in2.h: Regenerate.
3035 * libbfd.h: Regenerate.
3036 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3037 object files to be linked with XScale ones.
3038 (coff_arm_final_link_postscript): Update note section.
3039 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3040 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3041 after identifying a coff binary.
3042 * cpu-arm.c (processors): Add iWMMXt.
3043 (arch_inf): Likewise.
3044 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3045 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3046 be linked with XScale ones.
3047 (elf32_arm_section_flags): New function: Set flags on note section.
3048 (elf32_arm_final_write_processing): Handle note section.
3049
25f14c34
DD
30502003-03-21 DJ Delorie <dj@redhat.com>
3051
3052 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3053 _bfd_elf_rela_local_sym.
3054
04b3329b
L
30552003-03-20 H.J. Lu <hjl@gnu.org>
3056
3057 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3058 non-ELF outputs.
3059
c25cfdf8
NC
30602003-03-20 Nick Clifton <nickc@redhat.com>
3061
3062 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3063 $idata5 in case bfd_coff_final_link is not called.
3064
3e1d7f19
JJ
30652003-03-19 Jakub Jelinek <jakub@redhat.com>
3066
3067 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3068 field.
3069 (canon_reloc_count): Define.
3070 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3071 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3072 reloc_count.
3073 (sparc64_elf_canonicalize_reloc): New routine.
3074 (bfd_elf64_canonicalize_reloc): Define.
3075
3fa1d917
JJ
30762003-03-18 Jakub Jelinek <jakub@redhat.com>
3077
3078 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3079 againt mergeable sections. Take r_addend into account when caching
3080 trampolines.
3081
f86b235a
RH
30822003-03-18 Richard Henderson <rth@redhat.com>
3083
8c29f035
AM
3084 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3085 local symbols that have no dyninfo.
f86b235a 3086
49ae03bf
NC
30872003-03-14 Gene Smith <gene.smith@siemens.com>
3088
3089 * ieee.c (ieee_write_expression): Handle the case where symbol is
3090 NULL.
3091 General formatting improvements.
3092
6a457e5c
NC
30932003-03-13 Nick Clifton <nickc@redhat.com>
3094
3095 * configure.in (LINGUAS): Add zh_CN.
3096 * configure: Regenerate.
3097 * po/zh_CN.po: New file.
3098
93516ec3
NC
30992003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3100
3101 * aout-cris.c (BYTES_IN_WORD): Don't define.
3102 aout-encap.c: Likewise.
3103 aout-ns32k.c: Likewise.
3104 aout-tic30.c: Likewise.
3105 hp300bsd.c: Likewise.
3106 i386aout.c: Likewise.
3107 i386dynix.c: Likewise.
3108 i386linux.c: Likewise.
3109 i386lynx.c: Likewise.
3110 i386mach3.c: Likewise.
3111 m68k4knetbsd.c: Likewise.
3112 m68klinux.c: Likewise.
3113 m68klynx.c: Likewise.
3114 m68knetbsd.c: Likewise.
3115 m88kmach3.c: Likewise.
3116 mipsbsd.c: Likewise.
3117 newsos3.c: Likewise.
3118 sparclinux.c: Likewise.
3119 sparclynx.c: Likewise.
3120 sparcnetbsd.c: Likewise.
3121 vaxbsd.c: Likewise. Fix comment formatting.
3122
fee24f1c
AO
31232003-03-12 Alexandre Oliva <aoliva@redhat.com>
3124
0b25d3e6
AO
3125 * Reverted 2003-03-02's patch.
3126
fee24f1c
AO
3127 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3128 overridable.
3129 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3130 mips_elf64_get_dynamic_reloc_upper_bound,
3131 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3132 (bfd_elf64_get_canonicalize_reloc,
3133 bfd_elf64_get_dynamic_reloc_upper_bound,
3134 bfd_elf64_canonicalize_dynamic_reloc): Define.
3135 (mips_elf64_slurp_reloc_table): Support dynamic.
3136 (mips_elf64_slurp_one_reloc_table): Adjust.
3137
64fb1839
NC
31382003-03-12 Nick Clifton <nickc@redhat.com>
3139
3140 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3141 'index' to 'offset' in test for zero value.
3142
908488f1
AO
31432003-03-11 Alexandre Oliva <aoliva@redhat.com>
3144
3145 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3146 dynamic relocations pointing to local or section symbols, use the
3147 NULL symbol instead. Document the choice to not emit an
3148 additional R_MIPS_64 relocation.
3149
e515b051
AM
31502003-03-11 Alan Modra <amodra@bigpond.net.au>
3151
3152 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3153 zero index dynamic tls relocs generated for the GOT. Tidy code.
3154 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3155 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3156
a23b6845
AM
31572003-03-07 Alan Modra <amodra@bigpond.net.au>
3158
87d243f1
AM
3159 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3160 a tls_get_addr call.
3161
a23b6845
AM
3162 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3163 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3164 ELF_LINK_NON_GOT_REF from weakdef.
3165 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3166 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3167 ELF_LINK_NON_GOT_REF from weakdef.
3168 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3169 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3170 ELF_LINK_NON_GOT_REF from weakdef.
3171
2d36fe5f
AH
31722003-03-06 Jakub Jelinek <jakub@redhat.com>
3173 Andrew Haley <aph@redhat.com>
3174
3175 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3176 output is relocateable.
3177
34f304a7
NC
31782003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3179
3180 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3181 R_COMMENT.
3182
7b609f53
AM
31832003-03-06 Alan Modra <amodra@bigpond.net.au>
3184
3185 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3186 error messages.
3187 (ELIMINATE_COPY_RELOCS): Define to zero.
3188 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3189 TLSLD relocs. Report reloc types on a number of errors. Optimize
3190 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3191 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3192 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3193 calculating TLSLD relocs. Report reloc types on a number of errors.
3194 Don't capitalize error messages.
3195
6a0fb186
L
31962003-03-03 H.J. Lu <hjl@gnu.org>
3197
3198 * elfxx-ia64.c (USE_BRL): Removed.
3199 (oor_ip): Removed.
3200
34f304a7 32012003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3202
3203 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3204 relocation (no special function), and make it non-partial_inplace.
3205 (sh_elf_relax_section): When creating a bsr, use a consistent value
3206 no matter if the symbol is extern or not; set addend to -4.
3207 Don't swap load / non-load instructions for SH4.
3208 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3209 rather than if the symbol is external to determine if adjusting the
3210 offset makes sense. Adjust the addend too if appropriate.
3211 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3212 relocation.
3213
a9d68a1e
NC
32142003-03-03 Nick Clifton <nickc@redhat.com>
3215
3216 * po/da.po: Installed latest translation.
3217
7c2be35c
TS
32182003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3219
3220 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3221 R_MIPS_PC16 to rightshift 2.
3222 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3223 (bfd_elf32_bfd_reloc_type_lookup): Support
3224 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3225 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3226 R_MIPS_PC16 to rightshift 2.
3227 (mips_elf64_howto_table_rela): Likewise.
3228 (mips_reloc_map): Map to rightshifted BFD reloc.
3229 * elfn32-mips.c: The same as in elf64-mips.c.
3230 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3231 (mips_elf_calculate_relocation): Handle rightshifted addends for
3232 R_MIPS_PC16.
3233 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3234 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3235 * libbfd.h: Regenerate.
3236 * bfd-in2.h: Regenerate.
3237
484a4f9c
RH
32382003-02-28 Richard Henderson <rth@redhat.com>
3239
3240 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3241 for ltoff22x relaxation.
3242
2ce40c65
AM
32432003-03-01 Alan Modra <amodra@bigpond.net.au>
3244
3245 * bfd-in.h (_bfd): Don't define.
3246 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3247 * syms.c: Likewise.
3248 * bfd-in2.h: Regenerate.
3249
2c4c2bc0
RH
32502003-02-27 Richard Henderson <rth@redhat.com>
3251
3252 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3253 (elfNN_ia64_check_relocs): Set it.
3254 (allocate_global_data_got): Check it.
3255 (allocate_local_got): Likewise.
3256 (allocate_dynrel_entries): Likewise.
3257 (elfNN_ia64_relax_ldxmov): New.
3258 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3259 (elfNN_ia64_choose_gp): Split out from ...
3260 (elfNN_ia64_final_link): ... here.
8c29f035 3261
c2852e88
AC
32622003-02-27 Andrew Cagney <cagney@redhat.com>
3263
3264 * bfd.c (struct bfd): Rename "struct _bfd".
3265 * bfd-in.h: Update copyright.
3266 (struct bfd): Rename "struct _bfd".
3267 (_bfd): Define for backward compatibility.
3268 * bfd-in2.h: Regenerate.
3269
3f87cb70
AM
32702003-02-25 Alan Modra <amodra@bigpond.net.au>
3271
3f9a32bd
AM
3272 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3273 and rel_hdr2 when initially counting input relocs rather than after
3274 creating output reloc sections.
4fabe71e
AM
3275 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3276 sizes.
3f9a32bd 3277
3f87cb70
AM
3278 * Makefile.am: Run "make dep-am".
3279 * Makefile.in: Regenerate.
3280
07c6e936
NC
32812003-02-24 Kris Warkentin <kewarken@qnx.com>
3282
3283 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3284 (elfcore_grog_nto_note): New function.
3285 (elfcore_grog_nto_gregs): New function.
3286 (elfcore_grog_nto_status): New function.
3287
aad5d350
AM
32882003-02-24 Alan Modra <amodra@bigpond.net.au>
3289
3290 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3291 section flags before concluding that we've already been called.
3292 Don't use register keyword.
3293 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3294 (_bfd_elf_create_linker_section): Formatting.
3295
2ab1486e
NC
32962003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3297
3298 * coff-h8300.c: Fix typo: intial -> initial.
3299 * coff-ppc.c: Likewise.
3300
70bccea4
AM
33012003-02-20 Alan Modra <amodra@bigpond.net.au>
3302
3303 * elf32-ppc.c: Formatting.
3304 (allocate_dynrelocs): LD and GD relocs against the same sym need
3305 separate GOT entries.
3306 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3307 entries per symbol.
3308
ee05f2fe
AM
33092003-02-19 Alan Modra <amodra@bigpond.net.au>
3310
26e41594
AM
3311 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3312 removal. Localize vars. Remove unnecessary dynobj test.
3313 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3314 of INFO.
3315 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3316 and optimize.
3317 (elf_i386_relocate_section): Likewise.
3318 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3319 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3320 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3321 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3322 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3323 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3324 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3325 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3326 Formatting.
3327
f4656909
AM
3328 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3329 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3330 test.
3331 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3332 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3333 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3334 and optimize. Use ELIMINATE_COPY_RELOCS.
3335 (ppc64_elf_relocate_section): Likewise.
3336
ee05f2fe
AM
3337 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3338 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3339 (ELIMINATE_COPY_RELOCS): Define.
3340 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3341 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3342 (MUST_BE_DYN_RELOC): Define.
3343 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3344 and optimize. Trim dyn_relocs.
3345 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3346 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3347 track of pc_rel dyn relocs.
3348 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3349 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3350 allocate_dynrelocs. Don't recalculate "sec".
3351
7619e7c7
AM
33522003-02-18 Alan Modra <amodra@bigpond.net.au>
3353
d881513a
AM
3354 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3355 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3356 on invalid LD relocs.
3357 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3358 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3359 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3360
7619e7c7
AM
3361 * elf32-ppc.h: New file.
3362 * elf32-ppc.c: Include elf32-ppc.h.
3363 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3364 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3365 Add "tls_mask" field.
3366 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3367 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3368 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3369 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3370 Make use of htab shortcuts throughout file.
3371 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3372 (ppc_elf_link_hash_table_create): Init new fields.
3373 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3374 (ppc_elf_howto_raw): Add tls relocs.
3375 (ppc_elf_reloc_type_lookup): Handle them.
3376 (ppc_elf_unhandled_reloc): New function.
3377 (ppc_elf_create_got): Stash got section pointer in hash table,
3378 return status. Make .rela.got too.
3379 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3380 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3381 NON_GOT_REF set. Don't allocate space in .plt here..
3382 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3383 not allocating plt entries unnecessarily. Allocate got entries here.
3384 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3385 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3386 "info" during allocate_dynrelocs hash traversal. Use htab section
3387 shortcuts rather than searching for named sections. Get rid of
3388 "plt" and "strip" booleans.
3389 (update_local_sym_info, bad_shared_reloc): New functions.
3390 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3391 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3392 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3393 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3394 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3395 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3396 relocs that might use a plt entry. Set NON_GOT_REF too.
3397 Enumerate all do-nothing relocs.
3398 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3399 tls relocs and all plt relocs.
3400 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3401 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3402 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3403 shortcuts.
3404 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3405 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3406 entries and got relocs here. Warn on non-zero got reloc addend.
3407 Split out branch taken/not taken reloc code into a separate switch
3408 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3409 Split out HA reloc adjustments to separate switch statement. Don't
3410 warn on reloc overflow if we've already warned about undefined.
3411 Don't rebuild sym name when reporting errors. Report all possible
3412 errors from _bfd_final_link_relocate.
3413 (bfd_elf32_bfd_final_link): Don't define.
3414
cd27b276
AM
34152003-02-18 Alan Modra <amodra@bigpond.net.au>
3416
3417 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3418 rebuild sym name when reporting errors.
3419
ae9a127f
NC
34202003-02-17 Nick Clifton <nickc@redhat.com>
3421
3f9a32bd 3422 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3423 allow_shlib_undefined for shared libraries.
3424 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3425 of allow_shlib_undefined.
3426 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3427 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3428 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3429 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3430 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3431 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3432 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3433 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3434 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3435 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3436 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3437 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3438 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3439 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3440 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3441 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3442
b5f852ea
NC
34432003-02-17 Nick Clifton <nickc@redhat.com>
3444
3445 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3446 address field to use in the comparison.
3f9a32bd 3447 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3448
3193e234
NC
34492003-02-14 Bob Wilson <bob.wilson@acm.org>
3450
3451 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3452 backends when checking if the generic ELF target should be used.
3453
21efdc8d
NC
3454 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3455 outside of functions, treat values as absolute addresses.
3456
ed781d5d
NC
3457 * bfd.c: Change embedded documentation to use consistent indentation
3458 and to split up long lines. Change informal style of description
3459 for functions lacking real documentation.
3460 * coffcode.h: Break up long lines in embedded documentation.
3461 * format.c: Likewise.
3462 * targets.c: Likewise.
3463 * libcoff.h: Regenerate.
3464 * bfd-in2.h: Regenerate.
3465
58ac9f71
AM
34662003-02-14 Alan Modra <amodra@bigpond.net.au>
3467
3468 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3469 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3470 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3471 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3472 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3473 (group_sections): Don't share a stub section if stubs are for a large
3474 section. Adjust comment.
3475 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3476 !stubs_always_before_branch.
3477 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3478 treat undefined and undefweak specially when processing dyn relocs.
3479
9147e853
JJ
34802003-02-13 Jakub Jelinek <jakub@redhat.com>
3481
3482 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3483
427bfd90
NC
34842003-02-13 Nick Clifton <nickc@redhat.com>
3485
3486 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3487 in computation of offset to insert into BL instruction.
3488
42b5d0ea
NC
34892003-02-11 Uwe Stieber <uwe@wwws.de>
3490
3491 * config.bfd: Add support for kaOS as cross build target system.
3492
a48ebf4d
AM
34932003-02-11 Alan Modra <amodra@bigpond.net.au>
3494
3495 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3496 .__tls_get_addr too.
3497 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3498
c95b8a7a
KK
34992003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3500
3501 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3502 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3503 (sh_elf_link_hash_newfunc): Remove the initialization of
3504 tls_tpoff32 field.
3505 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3506 for which tls_tpoff32 flag is set.
3507 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3508 of the symbol includes the entry matched with the input_section
3509 and having tls_tpoff32 flag on. When linking statically, set
3510 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3511 is defined in this executable.
3512 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3513
a779acda
JJ
35142003-02-10 Jakub Jelinek <jakub@redhat.com>
3515
3516 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3517 even if there is just non-empty .rela.plt.
3518
fde78edd
NC
35192003-02-10 Nick Clifton <nickc@redhat.com>
3520
3521 * archures.c (bfd_mach_arm_ep9312): Define.
3522 * bfd-in2.h: Regenerate.
3523 * cpu-arm.c (processors[]): Add ep9312.
3524 (bfd_arm_arch): Add ep9312.
3525 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3526 messages and add test for Maverick floating point support.
3527 (elf32_arm_print_private_bfd_data): Handle
3528 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3529 (elf32_arm_object_p): New function.
3530 (elf_backend_object_p): Define.
fde78edd 3531
e7b938ca
AM
35322003-02-10 Alan Modra <amodra@bigpond.net.au>
3533
3534 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3535 variables, structure fields or function params to tls_mask or
3536 similar to better reflect usage.
3537 (struct got_entry): Comment.
9b5ecbd0 3538 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3539 (get_tls_mask): Rename from get_tls_type.
3540
951fd09b
AM
35412003-02-09 Alan Modra <amodra@bigpond.net.au>
3542
3543 * elf64-ppc.c (TLS_GD_LD): Don't define..
3544 (TLS_GD): ..define this instead and update all uses.
3545 (TLS_TPRELGD): Define.
3546 (ppc64_elf_link_hash_table_create): Tweak initialization of
3547 init_refcount and init_offset.
3548 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3549 Mark second slot of GD or LD toc entries.
3550 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3551 from other tls types.
3552 (ppc64_elf_tls_setup): New function, split out from..
3553 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3554 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3555 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3556 return value to properly decide whether toc GD and LD entries can
3557 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3558 to determine GD or LD rather than looking at TLS_LD flag. Don't
3559 attempt to adjust got entry tls_type here..
3560 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3561 look for possible merges.
3562 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3563 optimization.
3564 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3565 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3566 Make use of return value from get_tls_type to properly detect GD and
3567 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3568 handle tls_get_addr removal when looking at REL24 relocs, do it when
3569 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3570 GD or LD.
3571 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3572
acc990f2
AM
35732003-02-08 Alan Modra <amodra@bigpond.net.au>
3574
00b28bb0
AM
3575 * elf32-hppa.c (group_sections): Don't share a stub section if
3576 stubs are for a large section.
3577
acc990f2
AM
3578 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3579 stubs if !stubs_always_before_branch.
3580
589e6347
NC
35812003-02-07 Nick Clifton <nickc@redhat.com>
3582
3583 * elf.c (swap_out_syms): Generate an error message if an
3584 equivalent output section cannot be found for a symbol.
3585
c328dc3f
JJ
35862003-02-07 Jakub Jelinek <jakub@redhat.com>
3587
3588 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3589 local_got_entries is NULL.
3590
84f97cb6
AS
35912003-02-06 Andreas Schwab <schwab@suse.de>
3592
3593 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3594 (read_value): Add parameter is_signed, use signed extraction if
3595 the value is signed.
3596 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3597 encoding to read_value.
3598
6349e628
AM
35992003-02-06 Alan Modra <amodra@bigpond.net.au>
3600
3601 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3602 plt info when called to transfer weak sym info.
3603
411e1bfb
AM
36042003-02-05 Alan Modra <amodra@bigpond.net.au>
3605
3606 * reloc.c: Add PPC and PPC64 TLS relocs.
3607 * libbfd.h: Regenerate.
3608 * bfd-in2.h: Regenerate.
3609 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3610 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3611 against a 32 bit field.
3612 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3613 (_ppc64_elf_section_data): Add t_symndx and comments.
3614 (ppc64_elf_section_data): Use elf_section_data macro.
3615 (ppc64_elf_new_section_hook): American spelling.
3616 (struct got_entry, struct plt_entry): New.
3617 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3618 (struct ppc_stub_hash_entry): Add "addend" field.
3619 (struct ppc_link_hash_entry): Add "tls_type".
3620 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3621 TLS_EXPLICIT): Define.
3622 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3623 (link_hash_newfunc): Init new fields.
58ac9f71 3624 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3625 init_offset to NULL.
3626 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3627 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3628 there.
3629 (update_local_sym_info, update_plt_info): New functions.
3630 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3631 handling to use got.glist rather than got.refcount. Likewise for PLT.
3632 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3633 (func_desc_adjust): Adjust for new PLT list.
3634 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3635 (get_sym_h, get_tls_type): New functions.
3636 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3637 (ppc64_elf_tls_optimize): New function.
3638 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3639 TLS relocs.
3640 (ppc64_elf_size_dynamic_sections): Likewise.
3641 (ppc_type_of_stub): Adjust for new PLT list.
3642 (ppc_build_one_stub): Likewise.
3643 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3644 calls specially.
3645 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3646 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3647 init GOT entries that have a reloc. Generate GOT relocs here..
3648 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3649 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3650
0cca5f05
AS
36512003-02-04 Andreas Schwab <schwab@suse.de>
3652
3653 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3654 (elf_m68k_link_hash_traverse): Remove.
3655 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3656 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3657 reduce casting.
3658 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3659 casting.
3660 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3661 instead of elf_m68k_link_hash_traverse.
3662 (elf_m68k_discard_copies): Change first parameter to pointer to
3663 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3664 elf_m68k_link_hash_entry is needed.
3665
5cab59f6
AM
36662003-02-04 Alan Modra <amodra@bigpond.net.au>
3667
3668 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3669 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3670 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3671 "plt" field.
3672 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3673 Add "init_offset" field.
3674 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3675 (elf_local_got_ents): Declare.
3676 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3677 and "plt".
3678 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3679 (_bfd_elf_link_hash_table_init): Set "init_offset".
3680 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3681 from init_offset.
3682 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3683
3684 * elf.c (bfd_elf_local_sym_name): Split out from..
3685 (group_signature): ..here.
3686 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3687
68bfbfcc
AM
36882003-02-04 Alan Modra <amodra@bigpond.net.au>
3689
3690 * elf-bfd.h (enum elf_link_info_type): Remove.
3691 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3692 to struct sec. Remove linkonce_p field.
3693 (elf_linkonce_p): Delete.
3694 (elf_discarded_section): Update for sec_info_type change.
3695 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3696 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3697 (ELF_INFO_TYPE_NONE): Define.
3698 (ELF_INFO_TYPE_STABS): Define.
3699 (ELF_INFO_TYPE_MERGE): Define.
3700 (ELF_INFO_TYPE_EH_FRAME): Define.
3701 (ELF_INFO_TYPE_JUST_SYMS): Define.
3702 (STD_SECTION): Update struct sec initializer.
3703 * ecoff.c (bfd_debug_section): Likewise.
3704 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3705 * elflink.h: Likewise.
3706 * elf-eh-frame.c: Likewise.
3707 * elf64-alpha.c: Likewise.
3708 * elfxx-ia64.c: Likewise.
3709 * elfxx-mips.c: Likewise.
3710 * bfd-in2.h: Regenerate.
3711
3712 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3713 referring to used_by_bfd.
3714 * elf64-sparc.c (sec_do_relax): Likewise.
3715 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3716 * elfxx-mips.c (mips_elf_section_data): Likewise.
3717 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3718 (ieee_get_section_contents): Likewise.
3719 (ieee_new_section_hook): Formatting.
3720 (ieee_canonicalize_reloc): Remove commented out code.
3721 * mmo.c (mmo_section_data): Define. Use throughout file.
3722 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3723
31f7ba04
NC
37242003-01-31 Graydon Hoare <graydon@redhat.com>
3725
3726 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3727 * Makefile.in: Regenerate.
3728 * opncls.c (calc_crc32, get_debug_link_info,
3729 seperate_debug_file_exists, find_seperate_debug_file): New
3730 internal functions.
3731 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3732 contained inside a .gnu_debuglink section.
3733 * bfd-in2.h: Regenerate.
3734
38985a1c
AO
37352003-01-29 Alexandre Oliva <aoliva@redhat.com>
3736
3737 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3738 entry->abfd when it's NULL.
3739
4bb9a95f
AO
37402003-01-27 Alexandre Oliva <aoliva@redhat.com>
3741
3742 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3743 _bfd_elf_section_offset returning -2 the same way as -1.
3744
f4416af6
AO
3745 * elfxx-mips.c (mips_elf_multi_got): New function.
3746 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3747 addend into union along with address and link hash entry.
3748 (struct mips_got_info): Added bfd2got and next.
3749 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3750 (mips_elf_got_section, mips_elf_create_got_section): Use
3751 SEC_EXCLUDE bit to tell whether we really need the got
3752 section. Take boolean arguments to disregard an excluded
3753 section, or to create it as excluded. Adjust all callers.
3754 Use mips_elf_got_section all over.
3755 (mips_elf_local_got_index, mips_elf_got_page,
3756 mips_elf_got16_entry): Take input bfd as argument, and pass it
3757 on to mips_elf_create_local_got_entry.
3758 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3759 Take input bfd as argument, and manage entries in the
3760 appropriate GOT.
3761 (mips_elf_got_offset_from_index): Take input bfd as argument,
3762 and use it to adjust the GP offset of the bfd.
3763 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3764 unreferenced GOT entries of global symbols to the end.
3765 (mips_elf_record_global_got_symbol): Take input bfd as
3766 argument. Add entries to the master GOT hash table.
3767 (struct mips_elf_bfd2got_hash): New.
3768 (struct mips_elf_got_per_bfd_arg): New.
3769 (struct mips_elf_set_global_got_offset_arg): New.
3770 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3771 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3772 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3773 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3774 mips_elf_resolve_final_got_entry,
3775 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3776 mips_elf_got_for_ibfd): New functions.
3777 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3778 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3779 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3780 (mips_elf_got_entry_hash): Take new fields into account. Use
3781 mips_elf_hash_bfd_vma.
3782 (mips_elf_got_entry_eq): Take new fields into account.
3783 (mips_elf_create_got_section): Initialize new fields.
3784 (mips_elf_calculate_relocation): Pass input_bfd to functions
3785 that now take it. Adjust gp for the input_bfd.
3786 (mips_elf_allocate_dynamic_relocation,
3787 mips_elf_create_dynamic_relocation,
3788 _bfd_mips_elf_create_dynamic_sections): Use...
3789 (mips_elf_rel_dyn_section): New function. Borrow code from...
3790 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3791 now take it. Create the got section if needed, even if
3792 excluded, before recording a global got symbol. Move some
3793 code to...
3794 (mips_elf_record_local_got_symbol): New fn.
3795 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3796 Compute multi-got global entries offsets. Move GOT code to...
3797 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3798 if the GOT is too big.
3799 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3800 undefweak symbol to zero. Generate dynamic relocations for
3801 non-primary GOT entries for global symbols.
3802 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3803 case. Generate dynamic relocations for local got entries.
3804 Sort dynamic relocations on N64 too, using...
3805 (sort_dynamic_relocs_64): New fns.
3806 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3807 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3808
52b69c9e
AO
38092003-01-27 Alexandre Oliva <aoliva@redhat.com>
3810
3811 * bfd.c (struct _bfd): Added id field.
3812 * opncls.c (_bfd_id_counter): New static variable.
3813 (_bfd_new_bfd): Use it.
3814 * bfd-in2.h: Rebuilt.
3815
71e5db1c
AM
38162003-01-25 Alan Modra <amodra@bigpond.net.au>
3817
3818 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3819
b9734f35
JJ
38202003-01-25 Jakub Jelinek <jakub@redhat.com>
3821
3822 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3823 (elf32_sparc_rev32_howto): New variable.
3824 (sparc_reloc_map): Add TLS relocs.
3825 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3826 Handle REV32.
3827 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3828 New functions.
3829 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3830 struct elf32_sparc_link_hash_table):
3831 New structures.
3832 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3833 elf32_sparc_hash_table): Define.
3834 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3835 create_got_section, elf32_sparc_create_dynamic_sections,
3836 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3837 functions.
3838 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3839 reference counting.
3840 (elf32_sparc_gc_sweep_hook): Likewise.
3841 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3842 (elf32_sparc_size_dynamic_sections): Likewise.
3843 (elf32_sparc_relocate_section): Likewise.
3844 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3845 New functions.
3846 (elf32_sparc_object_p): Allocate backend private object data.
3847 (bfd_elf32_bfd_link_hash_table_create,
3848 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3849 elf_backend_can_refcount): Define.
3850 (elf_backend_create_dynamic_sections): Define to
3851 elf32_sparc_create_dynamic_sections.
3852 * reloc.c: Add SPARC TLS relocs.
3853 * bfd-in2.h, libbfd.h: Rebuilt.
3854 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3855 (sparc_reloc_map): Likewise.
3856
69fc87f1
MS
38572003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3858
3859 * bfd-in2.h: Regenerate.
3860 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3861 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3862 (elf_howto_table): Add TLS relocs.
3863 (elf_s390_reloc_type_lookup): Likewise.
3864 (elf_s390_link_hash_entry): Add tls_type.
3865 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3866 New macros.
3867 (elf_s390_link_hash_table): Add tls_ldm_got.
3868 (link_hash_newfunc): Initialize tls_type.
3869 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3870 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3871 (elf_s390_check_relocs): Support TLS relocs.
3872 (elf_s390_gc_sweep_hook): Likewise.
3873 (allocate_dynrelocs): Likewise.
3874 (elf_s390_size_dynamic_sections): Likewise.
3875 (elf_s390_relocate_section): Likewise.
3876 (elf_s390_finish_dynamic_symbol): Likewise.
3877 (bfd_elf32_mkobject): Define for TLS.
3878 * elf64-s390.c: Same changes as for elf32-s390.c.
3879 * libbfd.h: Regenerate.
3880 * reloc.c: Add s390 TLS relocations.
3881
c5d1701e 38822003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
3883
3884 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3885
5177500f
NC
38862003-01-23 Nick Clifton <nickc@redhat.com>
3887
3888 * Add sh2e support:
5177500f 3889 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
3890 * archures.c (bfd_mach_sh2e): Added.
3891 * bfd-in2.h: Rebuilt.
3892 * cpu-sh.c (arch_info_struct): Added SH2e.
3893 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 3894
f0abc2a1
AM
38952003-01-23 Alan Modra <amodra@bigpond.net.au>
3896
3897 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3898 dynindx to an int. Rearrange for better packing.
3899 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3900 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3901 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3902 (struct _sh64_elf_section_data): New struct.
3903 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3904 * elf32-sh64-com.c: Include elf32-sh64.h.
3905 * elf32-sh64.c: Likewise.
3906 (sh64_elf_new_section_hook): New function.
3907 (bfd_elf32_new_section_hook): Define.
3908 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3909 (sh64_bfd_elf_copy_private_section_data): Likewise.
3910 (sh64_elf_final_write_processing): Likewise.
3911 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3912 (elf32_sparc_new_section_hook): New function.
3913 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3914 (sec_do_relax): Define.
3915 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3916 (elf32_sparc_relocate_section): Likewise.
3917 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3918 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3919 (mmix_elf_section_data): Define. Use throughout file.
3920 (mmix_elf_new_section_hook): New function.
3921 (bfd_elf64_new_section_hook): Define.
3922 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3923 (ppc64_elf_section_data): Define. Use throughout.
3924 (ppc64_elf_new_section_hook): New function.
3925 (bfd_elf64_new_section_hook): Define.
3926 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3927 (sparc64_elf_new_section_hook): New function.
3928 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3929 (sec_do_relax): Define.
3930 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3931 (sparc64_elf_relocate_section): Likewise.
3932 (bfd_elf64_new_section_hook): Define.
3933 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3934 * elfxx-mips.c (struct _mips_elf_section_data): New.
3935 (mips_elf_section_data): Define. Use throughout.
3936 (_bfd_mips_elf_new_section_hook): New function.
3937 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3938 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3939 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3940 * Makefile.am: Run "make dep-am".
3941 * Makefile.in: Regenerate.
3942
cc03ec80
RH
39432003-01-21 Richard Henderson <rth@redhat.com>
3944
3945 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3946 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3947 (elf64_alpha_adjust_dynamic_symbol): Set them.
3948 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3949 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3950 symbol index when relaxing LDM to TPREL.
3951 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3952 relocs, even if the target isn't locally defined.
3953 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3954 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3955 relocs vs symndx 0 to the tp base.
3956
da896d3f
NC
39572003-01-21 Fabio Alemagna <falemagn@aros.org>
3958
3959 * config.bfd: Handle i[3456]86-*-aros*.
3960
7fce784e
AS
39612003-01-21 Andreas Schwab <schwab@suse.de>
3962
3963 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3964 (struct ppc_elf_link_hash_entry): Define.
3965 (ppc_elf_hash_entry): New function.
3966 (struct ppc_elf_link_hash_table): Define.
3967 (ppc_elf_hash_table): New function.
3968 (ppc_elf_link_hash_newfunc): New function.
3969 (ppc_elf_link_hash_table_create): New function.
3970 (ppc_elf_copy_indirect_symbol): New function.
3971 (allocate_dynrelocs): New function.
3972 (readonly_dynrelocs): New function.
3973 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3974 relocs and determine DT_TEXTREL.
3975 (ppc_elf_check_relocs): Don't do that here, just count the
3976 dynamic relocs.
3977 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3978 removed section.
3979 (bfd_elf32_bfd_link_hash_table_create): Define.
3980 (elf_backend_copy_indirect_symbol): Define.
3981
1bbc9cec
RH
39822003-01-21 Richard Henderson <rth@redhat.com>
3983
3984 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3985 TPREL also get a reloc if shared. Remove SREL support.
3986 (elf64_alpha_emit_dynrel): New.
acc990f2 3987 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
3988 and GOTTPREL relocs to local symbols against the tp base.
3989 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3990
3991 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3992 use count before clobbering r_type.
3993 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3994 ordering would mean dataflow inspection is necessary.
3995
0da35f8b
SS
39962003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3997
3998 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 3999
571fe01f
NC
40002003-01-20 Fabio Alemagna <falemagn@aros.org>
4001
4002 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4003 elfxx-target.h and #undef it before #define'ing it.
4004 * elf32-i386.c: Likewise.
acc990f2
AM
4005 * elf32-sh64.c: Likewise.
4006 * elf64-alpha.c: Likewise.
4007 * elf64-sh64.c: Likewise.
571fe01f 4008
5236c819
MS
40092003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4010
4011 * bfd-in2.h: Regenerate.
4012 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4013 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4014 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4015 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4016 R_390_PLTOFF32 and R_390_PLTOFF64.
4017 (elf_s390_reloc_type_lookup): Likewise.
4018 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4019 of GOTPLT references to a function.
4020 (link_hash_newfunc): Initialize gotplt_refcount.
4021 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4022 and creation of the got section out of the main switch. Add support
4023 for the gotoff, gotplt and pltoff relocations.
4024 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4025 and pltoff.
4026 (elf_s390_adjust_gotplt): New function.
4027 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4028 plt entries.
4029 (allocate_dynrelocs): Add comment.
4030 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4031 for gotoff, gotplt and pltoff relocations.
4032 * elf64-s390.c: Same changes as for elf32-s390.c.
4033 * libbfd.h: Regenerate.
4034 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4035 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4036 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4037 and BFD_RELOC_390_PLTOFF64.
4038
a823975a
JJ
40392003-01-18 Jakub Jelinek <jakub@redhat.com>
4040
4041 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4042 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4043
b3dfd7fe
JJ
40442003-01-16 Jakub Jelinek <jakub@redhat.com>
4045
4046 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4047 self_dtpmod_done and self_dtpmod_offset.
4048 (allocate_global_data_got): Only use one got entry for all
4049 dtpmod relocs against local symbols.
4050 (allocate_dynrel_entries): Only need .rela.got entry for
4051 dtpmod against global symbol.
4052 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4053 Reserve space in .rela.got for the local dtpmod entry.
4054 (set_got_entry): Initialize the common local dtpmod .got entry.
4055 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4056 and R_IA_64_DTPREL64MSB.
4057
04c9666a
AM
40582003-01-16 Alan Modra <amodra@bigpond.net.au>
4059
4060 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4061 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4062 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4063 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4064 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4065 relative relocs, not with absolute ones.
4066 * Makefile.am: Run "make dep-am".
4067 * Makefile.in: Regenerate.
4068 * po/SRC-POTFILES.in: Regenerate.
4069
c87f1ff7
AS
40702003-01-15 Andreas Schwab <schwab@suse.de>
4071
4072 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4073 relocation against a non-allocated readonly section.
4074
86bbe32f
AM
40752003-01-10 Alan Modra <amodra@bigpond.net.au>
4076
4077 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4078 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4079
32d95f29
KD
40802002-01-08 Klee Dienes <kdienes@apple.com>
4081
4082 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4083 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4084 * Makefile.in: Regenerate.
acc990f2 4085
ab7d0aa0
AO
40862003-01-08 Alexandre Oliva <aoliva@redhat.com>
4087
4088 * elfn32-mips.c (prev_reloc_section): New.
4089 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4090 (SET_RELOC_ADDEND): Parenthesize macro argument.
4091
95d0f04a
DA
40922003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4093
4094 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4095 adjust addil instructions if the symbol has no section.
4096
5c9e189c
DD
40972003-01-07 DJ Delorie <dj@redhat.com>
4098
4099 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4100 partial_inplace.
4101
3e829b4a
AS
41022003-01-07 Andreas Schwab <schwab@suse.de>
4103
4104 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4105 PC relative relocations.
4106 (elf_m68k_discard_copies): Set it here instead.
4107
a75473eb
SC
41082002-01-02 Ben Elliston <bje@redhat.com>
4109 Jeff Johnston <jjohnstn@redhat.com>
4110
4111 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4112 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4113 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4114 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4115 (cpu-iq2000.lo): New target.
4116 * Makefile.in: Regenerate.
4117 * config.bfd: Handle iq2000-*-elf.
4118 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4119 (bfd_archures_list): Add bfd_iq2000_arch.
4120 * configure.in: Handle bfd_elf32_iq2000_vec.
4121 * configure: Regenerate.
acc990f2 4122 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4123 and BFD_RELOC_IQ2000_UHI16.
4124 * targets.c (bfd_elf32_iq2000_vec): Declare.
4125 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4126 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4127 * cpu-iq2000.c: New file.
4128 * elf32-iq2000.c: Likewise.
4129 * libbfd.h: Regenerate.
4130 * bfd-in2.h: Likewise.
4131
64543e1a
RS
41322003-01-02 Richard Sandiford <rsandifo@redhat.com>
4133
4134 * elfxx-mips.c: Include libiberty.h.
4135 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4136 (mips_set_isa_flags): New function, split out from...
4137 (_bfd_mips_elf_final_write_processing): ...here. Only call
4138 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4139 (mips_mach_extensions): New array.
4140 (mips_32bit_flags_p): New function.
4141 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4142 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4143 other is 64-bit. When adopting IBFD's architecture, adopt the
4144 bfd_mach as well as the flags.
4145
4852a44e
NC
41462003-01-02 Nick Kelsey <nickk@ubicom.com>
4147
4148 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4149 fix internal errors, fix bad code generation, fix incorrect stabs
4150 information, and improve ability to eliminate redundant page
4151 instructions. Added code to ip2k_final_link_relocate to self-verify
4152 the linker relaxation. Fix formatting problems.
4153
af7ee8bf
CD
41542002-12-30 Chris Demetriou <cgd@broadcom.com>
4155
4156 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4157 * archures.c (bfd_mach_mipsisa32r2): New define.
4158 * bfd-in2.h: Regenerate.
4159 * cpu-mips.c (I_mipsisa32r2): New enum value.
4160 (arch_info_struct): Add entry for I_mipsisa32r2.
4161 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4162 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4163 (_bfd_mips_elf_final_write_processing): Add
4164 bfd_mach_mipsisa32r2 case.
4165 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4166 binaries marked as using MIPS32 Release 2.
4167
2469cfa2
NC
41682002-12-30 Dmitry Diky <diwil@mail.ru>
4169
4170 * Makefile.am: Add msp430 target.
4171 * configure.in: Likewise.
4172 * Makefile.in: Regenerate.
4173 * configure: Regenerate.
4174 * archures.c: Add msp430 architecture vector.
4175 * config.bfd: Likewise.
4176 * reloc.c: Add msp430 relocs.
4177 * targets.c: Add msp320 target.
4178 * cpu-msp430.c: New file: msp430 cpu detection.
4179 * elf32-msp430.c: New file: msp430 reloc processing.
4180 * bfd-in2.h: Regenerate.
4181 * libbfd.h: Regenerate.
4182
eecdbe52
JJ
41832002-12-28 Jakub Jelinek <jakub@redhat.com>
4184
4185 * elf.c (elf_sort_sections): Don't reorder .tbss.
4186 (assign_file_positions_for_segments): Only adjust off/voff
4187 for increased alignment in PT_LOAD or PT_NOTE segment,
4188 but adjust p_filesz for .tbss too. in PT_LOAD consider
4189 .tbss to have zero memory size.
4190 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4191 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4192 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4193 into PT_TLS segment. Never put SHF_TLS sections in
4194 segments other than PT_TLS or PT_LOAD.
4195
4196 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4197 sh_entsize.
4198
213e90f4
DD
41992002-12-23 DJ Delorie <dj@redhat.com>
4200
4201 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4202
75828352
AM
42032002-12-23 Alan Modra <amodra@bigpond.net.au>
4204
4205 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4206
312b768e
NC
42072002-12-23 Nick Clifton <nickc@redhat.com>
4208
4209 * archures.c (bfd_arch_get_compatible): Add third parameter
4210 'accept_unknowns'. Only accept unknown format BFDs if
4211 accept_unknowns is true, or if the format is "binary".
acc990f2 4212 * bfd-in2.h: Regenerate.
312b768e 4213
63222ec9
NC
42142002-12-21 Nick Clifton <nickc@redhat.com>
4215
4216 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4217 that subtracted 8 from pc relative relocations.
4218
19852a2a
KH
42192002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4220
4221 * coff-h8300.c: Fix comment typos.
4222 * coffcode.h: Likewise.
4223 * cpu-cris.c: Likewise.
4224 * elf32-vax.c: Likewise.
4225 * genlink.h: Likewise.
4226 * linker.c: Likewise.
4227 * som.c: Likewise.
4228 * tekhex.c: Likewise.
4229 * vms-misc.c: Likewise.
4230
5fd63999
DD
42312002-12-20 DJ Delorie <dj@redhat.com>
4232
4233 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4234 * libbfd.h: Regenerate.
4235 * bfd-in2.h: Regenerate.
4236 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4237 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4238
4ee79850
KH
42392002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4240
4241 * doc/bfdint.texi: Fix typos.
4242
66e25bab
AM
42432002-12-20 Paul Eggert <eggert@twinsun.com>
4244
4245 Port to POSIX 1003.1-2001.
4246 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4247 * configure.in (build-warnings): Likewise.
4248 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4249 * aclocal.m4: Regenerate.
4250 * config.in: Regenerate.
4251 * configure: Regenerate.
4252
7dc77aaa
AM
42532002-12-19 Alan Modra <amodra@bigpond.net.au>
4254
0171ee92
AM
4255 * coff-h8300.c: Include libiberty.h.
4256 (h8300_reloc16_extra_cases): Check the hash table creator before
4257 referencing h8300 specific fields. Stash the hash table pointer
4258 in a local var. Comment typo fixes.
4259 (h8300_bfd_link_add_symbols): Likewise.
4260
1049f94e 4261 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4262 dst_mask comments.
4263 * bfd-in2.h: Regenerate.
4264
47388f4c
AM
42652002-12-18 Alan Modra <amodra@bigpond.net.au>
4266
4267 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4268 code a little. Comment on dynamic relocs against section symbols.
4269
1b3e3744
AM
42702002-12-17 Roger Sayle <roger@eyesopen.com>
4271
4272 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4273 the HP compiler's "long long".
4274
46f2b541
DD
42752002-12-16 Andrew MacLeod <amacleod@redhat.com>
4276
4277 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4278 and R_XSTORMY16_HI16) howto entries.
4279 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4280 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4281 determine the start of the second reloc table.
4282
af738ea7
NC
42832002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4284
4285 * ecofflink.c: Fix the reading of the debugging information
4286 of Tru64/Alpha binaries that are produced by recent Compaq
4287 compilers.
4288 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4289 table.
4290 (lookup_line): Because of the strange information sometimes
4291 generated by Compaq's recent compilers, change how the FDR
4292 table is searched so that PDRs (procedure descriptors) are
4293 correctly found. Note that this change is really more of a hack;
4294 however, I have included extensive documentation as to why
4295 this is the best solution short of an extensive rewrite or
4296 another hack.
4297 (fdrtab_lookup): Add comments to explain the algorithm.
4298
5354b572
AO
42992002-12-12 Alexandre Oliva <aoliva@redhat.com>
4300
4301 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4302 initializers to match struct declaration.
4303
ab3acfbe
AM
43042002-12-12 Alan Modra <amodra@bigpond.net.au>
4305
4306 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4307 * elf.c (get_program_header_size): Likewise.
4308 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4309 (m32r_elf_generic_reloc): Likewise.
4310 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4311 * elflink.h (elf_bfd_discard_info): Likewise.
4312
6348e046
AM
43132002-12-12 Alan Modra <amodra@bigpond.net.au>
4314
4315 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4316 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4317 DT_RELSZ adjustment, not output section. Avoid writing tags when
4318 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4319 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4320 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4321 DT_RELASZ adjustment, not output section. Avoid writing tags when
4322 unchanged. Adjust DT_RELA.
4323 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4324 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4325
2e7a68a8
AO
43262002-12-12 Alexandre Oliva <aoliva@redhat.com>
4327
4328 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4329 addend by 4.
4330
b15e6682
AO
43312002-12-12 Alexandre Oliva <aoliva@redhat.com>
4332
4333 * elfxx-mips.c (struct mips_got_entry): New.
4334 (struct mips_got_info): Added got_entries field.
4335 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4336 (mips_elf_local_got_index, mips_elf_got_page,
4337 mips_elf_got16_entry): Re-implement in terms of new...
4338 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4339 Change return type.
4340 (mips_elf_highest): Warning clean-up.
4341 (mips_elf_create_got_section): Initialize got_entries.
4342 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4343 local got size.
4344 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4345 GOT_PAGE entries, since we now reuse GOT16 entries.
4346
e6af3a53
NC
43472002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4348
4349 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4350 read-only section that lies after .text and before .data to be
4351 written into the output file and included in a_text.
4352 (translate_to_native_sym_flags): If an otherwise unrepresentable
4353 section was merged with .text, convert its symbols to N_TEXT
4354 symbols.
4355 * libaout.h (aout_section_merge_with_text_p): New macro.
4356
cf3d882d
AM
43572002-12-08 Alan Modra <amodra@bigpond.net.au>
4358
4359 * bfd-in.h: Comment typo fix. Formatting.
4360 * bfd-in2.h: Regenerate.
4361 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4362 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4363 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4364
2f9bd3f6
RH
43652002-12-05 Richard Henderson <rth@redhat.com>
4366
4367 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4368 Only send PCREL21B though the plt. Fix installed reloc type.
4369 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4370 against PCREL22 or PCREL64I; clean up error messages for
4371 branch relocs.
4372
d0112f73
KB
43732002-12-04 Kevin Buettner <kevinb@redhat.com>
4374
4375 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4376 New functions.
4377 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4378
c10d9d8f
JW
43792002-12-04 David Mosberger <davidm@hpl.hp.com>
4380
4381 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4382
d48770d4
L
43832002-12-04 H.J. Lu <hjl@gnu.org>
4384
4385 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4386 BFD address when constructing local name.
4387
b6152c34
AS
43882002-12-04 Andreas Schwab <schwab@suse.de>
4389
4390 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4391 member.
4392 (elf_m68k_link_hash_table_create): Initialize it.
4393 (elf_m68k_check_relocs): Handle symbols that are forced to be
4394 local due to visibility changes.
4395 (elf_m68k_adjust_dynamic_symbol): Likewise.
4396 (elf_m68k_size_dynamic_sections): Likewise.
4397 (elf_m68k_discard_copies): Likewise.
4398 (elf_m68k_relocate_section): Likewise.
4399
73374ef1
AM
44002002-12-04 Alan Modra <amodra@bigpond.net.au>
4401
4402 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4403
c5c1944d
AM
44042002-12-04 Alan Modra <amodra@bigpond.net.au>
4405
4406 * srec.c (srec_write_symbols): Restore '$' prefix to address
4407 accidentally removed in 2002-04-04 change.
4408 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4409
e1a9cb8e
NC
44102002-12-03 Nick Clifton <nickc@redhat.com>
4411
4412 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4413 (apuinfo_list_add): New function: Add a value to the list.
4414 (apuinfo_list_length): New function: Return the number of
4415 values on the list.
4416 (apuinfo_list_element): New function: Return a value on the
4417 list.
4418 (apuinfo_list_finish): New function: Free the resources used
4419 by the list.
4420 (ppc_elf_begin_write_processing): New function. Scan the
4421 input bfds for apuinfo sections.
4422 (ppc_elf_write_section): New function: Delay the creation of
4423 the contents of an apuinfo section in an output bfd.
4424 (ppc_elf_final_write_processing): New function. Create the
4425 contents of an apuinfo section in an output bfd.
4426 (elf_backend_begin_write_processing): Define.
4427 (elf_backend_final_write_processing): Define.
4428 (elf_backend_write_section): Define.
e1a9cb8e 4429
a823923b
RH
44302002-12-03 Richard Henderson <rth@redhat.com>
4431
4432 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4433
30491647
SC
44342002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4435
4436 Fix PR savannah/1417:
4437 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4438 branch if it goes to the start of the deleted region.
4439
bc7c6a90
SC
44402002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4441
4442 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4443 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4444 bfd_mach_m6812s): Declare.
4445
4446 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4447 (_bfd_m68hc12_elf_set_private_flags): Call it.
4448 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4449 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4450 report microcontroller incompatibilities (HC12 vs HCS12).
4451 (elf_backend_object_p): Update.
4452
b34976b6
AM
44532002-11-30 Alan Modra <amodra@bigpond.net.au>
4454
4455 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4456 (enum bfd_boolean, boolean): Delete.
4457 (bfd_boolean): Typedef to an int.
4458 (FALSE, TRUE): Define.
4459 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4460 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4461 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4462 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4463 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4464 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4465 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4466 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4467 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4468 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4469 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4470 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4471 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4472 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4473 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4474 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4475 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4476 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4477 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4478 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4479 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4480 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4481 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4482 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4483 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4484 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4485 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4486 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4487 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4488 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4489 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4490 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4491 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4492 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4493 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4494 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4495 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4496 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4497 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4498 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4499 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4500 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4501 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4502 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4503 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4504 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4505 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4506 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4507 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4508 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4509 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4510 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4511 of bfd_boolean vars with TRUE/FALSE. Formatting.
4512 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4513
947216bf
AM
45142002-11-28 Alan Modra <amodra@bigpond.net.au>
4515
4516 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4517 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4518 with Elf_Internal_Rela.
4519 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4520 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4521 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4522 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4523 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4524 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4525 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4526 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4527 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4528 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4529 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4530 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4531 throughout instead.
4532 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4533 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4534 Remove INLINE keyword.
4535 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4536 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4537 as a bfd_byte *.
4538 (elf_write_relocs): Consolidate REL and RELA code.
4539 (elf_slurp_reloc_table_from_section): Simplify REL code.
4540 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4541 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4542 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4543 RELA code.
4544 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4545 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4546 (elf_link_output_relocs): Likewise.
4547 (elf_reloc_link_order): Likewise.
4548 (elf_finish_pointer_linker_section): Likewise.
4549 (struct elf_link_sort_rela): Remove union.
4550 (elf_link_sort_cmp1): Update to suit.
4551 (elf_link_sort_cmp2): Here too.
4552 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4553 over-allocation for int_rels_per_ext_rel != 1 case.
4554 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4555 * elf32-i386.c: Likewise.
4556 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4557 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4558 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4559 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4560 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4561 elf64-sparc.c, elf64-x86-64.c: Likewise.
4562 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4563 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4564 bfd_elf32_swap_reloc_in.
4565
4566 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4567 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4568 (mips_elf64_swap_reloc_in): Zero r_addend.
4569 (mips_elf64_be_swap_reloc_in): Likewise.
4570 (mips_elf64_slurp_one_reloc_table): Simplify.
4571
4572 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4573 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4574 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4575
1448fa32
KK
45762002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4577
4578 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4579 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4580 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4581
73722af0
AM
45822002-11-26 Alan Modra <amodra@bigpond.net.au>
4583
4584 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4585 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4586 on a relocatable link. Comment typos.
4587 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4588 in the order they are declared. Clear elf_hash_value too.
4589 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4590 eh_info and tls_segment.
4591 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4592 sorted when discarding relocs by turning them into R_*_NONE.
4593
4594 * libbfd.c (warn_deprecated): Comment spelling.
4595 * po/SRC-POTFILES.in: Regenerate.
4596
7c25b72c
RH
45972002-11-21 Richard Henderson <rth@redhat.com>
4598
4599 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4600 arch's st_other bits when merging visibilities.
4601 (elf_link_output_extsym): Tidy clearing of visibility field.
4602
dc12c51f
AM
46032002-11-21 Alan Modra <amodra@bigpond.net.au>
4604
4605 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4606 (SWAP_OUT_RELOC_OFFSET): Define.
4607
963f13ec
AO
46082002-11-20 Alexandre Oliva <aoliva@redhat.com>
4609
4610 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4611 can_refcount is properly extended to the type of
4612 init_refcount.
4613
ee6423ed
AO
46142002-11-19 Alexandre Oliva <aoliva@redhat.com>
4615
4ffba85c
AO
4616 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4617 (_bfd_mips_elf_relocate_section): Use it.
4618
ee6423ed
AO
4619 * elfxx-mips.c (MNAME): New macro.
4620 (_bfd_mips_elf_check_relocs): Use it.
4621 (_bfd_mips_elf_discard_info): Likewise.
4622 (_bfd_mips_elf_final_link): Likewise.
4623
cdcf6e38
AM
46242002-11-19 Alan Modra <amodra@bigpond.net.au>
4625
4626 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4627 rel_hdr.sh_size too.
4628
93509525
KD
46292002-11-18 Klee Dienes <kdienes@apple.com>
4630
4631 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4632 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4633 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4634 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4635 Add dependencies for bfdwin.c, bfdio.c.
4636 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4637 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4638 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4639 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4640 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4641 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4642 bfd_get_size (moved from libbfd.c and bfd.c).
4643 * bfdwin.c New file. Contains _bfd_window_internal,
4644 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4645 libbfd.c and bfd.c).
4646 * po/SRC-POTFILES.in: Regenerate.
4647 * po/bfd.pot: Regenerate.
4648 * libbfd.h: Regenerate.
4649 * bfd-in2.h: Regenerate.
4650 * aclocal.m4: Regenerate.
4651 * Makefile.in: Regenerate.
4652 * configure: Regenerate.
4653
3ae41454
AM
46542002-11-18 Klee Dienes <kdienes@apple.com>
4655
4656 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4657
e514ac71
NC
46582002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4659
4660 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4661 jsr after a short jump.
4662 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4663
eddc4f81
KD
46642002-11-15 Klee Dienes <kdienes@apple.com>
4665
4666 * pef.c (bfd_pef_convert_architecture): Move declaration of
4667 ARCH_POWERPC and ARCH_M68K to the start of the function.
4668
51908eee
SS
46692002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4670
4671 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4672
3416d2e7
HPN
46732002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4674
4675 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4676 For bpo_gregs_section->contents, allocate _raw_size, not
4677 _cooked_size.
4678
b1c58715
AM
46792002-11-13 Klee Dienes <kdienes@apple.com>
4680
4681 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4682
077ca68b
L
46832002-11-13 H.J. Lu <hjl@gnu.org>
4684
4685 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4686
e84d6fca
AM
46872002-11-13 Klee Dienes <kdienes@apple.com>
4688 Alan Modra <amodra@bigpond.net.au>
4689
4690 * bfd.c (struct bfd_preserve): New.
4691 (bfd_preserve_save): New function.
4692 (bfd_preserve_restore): Ditto.
4693 (bfd_preserve_finish): Ditto.
4694 * bfd-in2.h: Regenerate.
4695 * mach-o.c: Formatting.
4696 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4697 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4698 (bfd_mach_o_core_p): Ditto.
4699 (bfd_mach_o_scan): Pass in mdata.
4700 * mach-o.h (bfd_mach_o_scan): Update prototype.
4701 * pef.c: Formatting.
4702 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4703 (bfd_pef_xlib_object_p): Ditto.
4704 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4705 * pef.h (bfd_pef_scan): Update prototype.
4706 * xsym.c: Formatting, K&R fixes.
4707 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4708 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4709 * xsym.h (bfd_sym_scan): Declare.
4710 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4711 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4712 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4713
cd24c222
NC
47142002-11-12 Nick Clifton <nickc@redhat.com>
4715
4716 * po/da.po: Updated Danish translation.
4717
99eb2ac8
AM
47182002-11-12 Alan Modra <amodra@bigpond.net.au>
4719
d6fe2dc1
AM
4720 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4721 relocatable link too.
4722 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4723 eh_frame and stab sections. Zap deleted relocs.
4724 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4725 (elf_bfd_discard_info): Run for relocatable link too.
4726 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4727 Handle ld -r case.
4728 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4729 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4730
126495ed
AM
4731 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4732 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4733 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4734 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4735 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4736 (struct elf_link_hash_table): Add eh_info.
4737 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4738 (_bfd_elf_discard_section_eh_frame): Update prototype.
4739 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4740 (_bfd_elf_write_section_eh_frame): Likewise.
4741 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4742 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4743 param. Get "hdr_info" from link hash table.
4744 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4745 header section from link hash table. Save header section to elf_tdata.
4746 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4747 header section from link hash table. Don't alloc hdr_info. Clear
4748 hdr_sec instead of setting "strip".
4749 (_bfd_elf_eh_frame_section_offset): Formatting.
4750 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4751 Get header section from link hash table.
4752 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4753 Get header section from link hash table.
4754 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4755 (get_program_header_size): Likewise.
4756 (_bfd_elf_section_offset): Formatting.
4757 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4758 section pointer in link hash table.
4759 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4760 and _bfd_elf_write_section_eh_frame calls. Update comment about
4761 eh_frame entries.
4762 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4763 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4764
4765 * po/SRC-POTFILES.in: Regenerate.
4766
99eb2ac8
AM
4767 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4768 relocs for discarded FDEs. Remove dead code.
4769 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4770 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4771 Tidy conditions under which stabs are edited. Formatting.
4772 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4773 from discarded relocs.
4774 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4775 section adjustments after testing magic values.
4776
7c319a27
AM
47772002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4778
4779 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4780 references to large plt symbols.
4781
a95a4550
AM
47822002-11-12 Klee Dienes <kdienes@apple.com>
4783
4784 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4785 looking for an unused section name.
4786
bc7eab72
KH
47872002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4788
4789 * coff-h8300.c: Fix formatting.
4790 * elf32-h8300.c: Likewise.
4791 * reloc16.c: Likewise.
4792
52585bb8
AM
47932002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4794
4795 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4796 section when dynamic section unused; _bfd_strip_section_from_output
4797 instead.
4798
9f632188
AM
47992002-11-08 Alan Modra <amodra@bigpond.net.au>
4800
207b304b
AM
4801 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4802 and sym_vec.
3b029f65 4803
9f632188
AM
4804 * dwarf2.c: Revert last change.
4805
ec4530b5
NC
48062002-11-07 Michal Ludvig <mludvig@suse.cz>
4807
9b5ecbd0 4808 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4809 _bfd_dwarf2_find_nearest_line): Use
4810 bfd_simple_get_relocated_section_contents() instead of
4811 bfd_get_section_contents().
4812 * reloc.c (bfd_perform_relocation): Add sanity check.
4813 * simple.c (simple_get_relocated_section_contents): If the section
4814 does not have any relocs associated with it, just return the
4815 unadjusted contents.
4816
205cfeb0
HPN
48172002-11-07 Hans-Peter Nilsson <hp@axis.com>
4818
4819 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4820 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4821 contents, enabling for a non-DSO, for symbols defined in the
4822 program with --export-dynamic.
4823
87e226ce
AM
48242002-11-07 Alan Modra <amodra@bigpond.net.au>
4825
4826 * elf64-ppc.c: Comment typo fixes.
4827 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4828
235c4794
NC
48292002-11-07 Nick Clifton <nickc@redhat.com>
4830
4831 * po/da.po: Updated Danish translation.
4832
49179469
AO
48332002-11-06 Alexandre Oliva <aoliva@redhat.com>
4834
4835 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4836 exactly three internal relocs per external reloc. Set reloc_count
4837 to the external reloc count.
4838
246178f2
NC
48392002-11-06 Klee Dienes <kdienes@apple.com>
4840
3ae41454 4841 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4842 Fix comment formatting.
4843
3af9a47b
NC
48442002-11-06 Klee Dienes <kdienes@apple.com>
4845
3ae41454 4846 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4847 xsym.lo.
4848 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4849 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4850 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4851 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4852 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4853 sym.
3ae41454 4854 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
4855 * Makefile.in: Regenerate.
4856 * doc/Makefile.in: Regenerate.
3ae41454 4857 * bfd-in2.h: Regenerate.
3af9a47b
NC
4858 * xsym.c: New file. Contains support for the Apple/Metrowerks
4859 xSYM debugging format.
4860 * xsym.h: New file.
4861 * pef.c: New file. Contains support for the Apple Code Fragment
4862 Manager Preferred Executable Format
4863 * pef.h: New file.
4864 * pef-traceback.h: New file. Contains support for parsing PowerPC
4865 traceback tables as used by PEF executables (and perhaps other
4866 systems as well).
3ae41454 4867 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
4868 format.
4869 * mach-o.h: New file.
4870 * mach-o-target.c: New file. Declares the mach-o targets
4871 themselves. Included three times by mach-o.c; each time with a
4872 different set of macros set.
3ae41454 4873
b6821651 48742002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
4875
4876 * Makefile.am: Remove entries for elf32-qnx.[ch].
4877 * Makefile.in: Regenerate.
4878 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4879 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4880 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4881 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4882 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4883 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4884 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4885 * configure: Regenerate.
4886 * elf32-qnx.c: Remove.
4887 * elf32-qnx.h: Remove.
4888 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4889 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
4890 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4891 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
4892 * elf32-i386.c: Remove QNX extended bfd support.
4893 * elf32-ppc.c: Remove QNX extended bfd support.
4894 * elf32-sh.c: Remove QNX extended bfd support.
4895 * elfarm-nabi.c: Remove QNX extended bfd support.
4896 * targets.c: Remove qnx vectors.
4897 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4898 (elf_backend_is_contained_by_filepos): Remove.
4899 (elf_backend_copy_private_bfd_data_p): Remove.
4900 * po/SRC-POTFILES.in: Regenerate.
4901
b6821651
AM
49022002-11-06 David O'Brien <obrien@FreeBSD.org>
4903 Alan Modra <amodra@bigpond.net.au>
4904
4905 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4906 dynamic relocs against section symbols for the output section vma.
4907
49082002-11-05 Alan Modra <amodra@bigpond.net.au>
4909
4910 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4911 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4912
08f74004
AM
49132002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4914 Alan Modra <amodra@bigpond.net.au>
4915
4916 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4917 vectors in target_selvecs.
4918 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4919 in target_selvecs.
4920 (sh-*-netbsdelf*): Likewise.
4921 * configure.in (assocvecs): New variable. Handle assocvecs like
4922 selvecs.
4923 * configure: Regenerate.
4924 * format.c (bfd_check_format_matches): Store bfd_target pointers
4925 in matching_vector instead of target names. Select first target
4926 from bfd_associated_vector that matches a list of ambiguous targets.
4927 * targets.c (_bfd_associated_vector): New array.
4928 (bfd_associated_vector): New variable.
4929 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4930 * libbfd-in.h (bfd_associated_vector): Declare.
4931 * libbfd.h: Regenerate.
4932
89117aab
AM
49332002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4934
4935 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4936 non-NULL before dereferencing.
4937
5e9aae3e
KK
49382002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4939
4940 * vms.c (vms_object_p): Restore the start address when returning
4941 NULL.
4942
c97e73dd
AM
49432002-11-04 Alan Modra <amodra@bigpond.net.au>
4944 Hans-Peter Nilsson <hp@axis.com>
4945
4946 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4947 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4948 Set up a larger symshndxbuf, and write it out. Free it on
4949 exit rather than freeing symbuf twice. Correct section index
4950 on output section symbol loop.
4951 (elf_link_output_sym): Accumulate symbol extension section
4952 indices, reallocating symshndxbuf rather than writing it out.
4953 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4954 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4955 Use bfd_zalloc to clear i_shdrp[0] too.
4956
3463048e
SC
49572002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4958
4959 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4960 _raw_size of cranges section if _cooked_size not yet set.
4961
63a23799
HPN
49622002-11-03 Hans-Peter Nilsson <hp@axis.com>
4963
4964 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4965 for bfd_elf32_swap_symbol_out.
4966
e68cc12e
DB
49672002-10-31 David O'Brien <obrien@FreeBSD.org>
4968
4969 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4970 signed and unsigned in comparison.
4971
db4b6d01
DJ
49722002-10-30 Daniel Jacobowitz <drow@mvista.com>
4973
4974 * coffcode.h: Remove extraneous '\'.
4975
840f0243
L
49762002-10-28 H.J. Lu <hjl@gnu.org>
4977
4978 * Makefile.am (targets.lo): Depend on Makefile instead of
4979 config.status.
4980 (archures.lo): Likewise.
4981 * Makefile.in: Regenerated.
4982
05a7e2db
JT
49832002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4984
4985 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4986 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4987 targ_selvecs.
4988
a0087177
JW
49892002-10-25 Jim Wilson <wilson@redhat.com>
4990
4991 * elf64-sh64.c (sh_elf64_relocate_section): Call
4992 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4993 of SHF_MERGE section.
4994
8718ac9c
HPN
49952002-10-25 Hans-Peter Nilsson <hp@axis.com>
4996
4997 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4998
d45913a0
DA
49992002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5000
5001 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5002 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5003 unsigned int.
5004 (NAME(aout,final_link)): Cast enum used in assignment.
5005 (aout_link_write_symbols): Cast enums in comparisons, int values to
5006 boolean, enums in assignments to int.
5007 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5008 (aout_link_input_section_ext): Likewise. Cast enums used in
5009 comparisons with unsigned ints.
d45913a0
DA
5010 (aout_link_reloc_link_order): Cast enum to int in assignment.
5011 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5012 calls to char *.
5013 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5014 assignment.
5015 * bfd-in2.h (bfd_set_section_vma): Likewise.
5016 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5017 * binary.c (bfd_alloc): Cast enum to long.
5018 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5019 * dwarf2.c (read_abbrevs): Add casts to enum types.
5020 (read_attribute_value): Likewise.
5021 (arange_add): Cast result of bfd_zalloc call.
5022 (comp_unit_contains_address): Return true and false.
5023 (comp_unit_find_nearest_line): Cast return to boolean.
5024 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5025 * gen-aout.c: define macro '_' if not defined.
5026 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5027 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5028 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5029 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5030 (bfd_generic_is_local_label_name): Cast return to boolean.
5031 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5032 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5033 struct bfd_hash_entry *.
5034 (_bfd_generic_link_hash_newfunc): likewise.
5035 (_bfd_generic_final_link): Cast enum to unsigned int.
5036 * merge.c (sec_merge_emit): Cast return to boolean.
5037 (merge_strings): Add casts to const unsigned char *.
5038 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5039 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5040 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5041 to struct bfd_hash_entry *.
d45913a0
DA
5042 (bfd_set_section_content): Add cast to PTR in comparison.
5043 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5044 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5045 simple_dummy_unattached_reloc,
5046 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5047 function definitions.
5048 * srec.c (S3Forced): Initialize to false.
5049 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5050 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5051 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5052 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5053 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5054 comparisons.
5055
475c2a7e
JJ
50562002-10-23 Jakub Jelinek <jakub@redhat.com>
5057
5058 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5059 relocs into shared lib non-allocated reloc sections.
5060
e82ce529
AM
50612002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5062
5063 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5064 sorted even when given an out-of-order line sequence.
5065 (lookup_address_in_line_info_table): When an exact VMA match is
5066 not found, return line information with the closest VMA.
5067
f2482cb2
NC
50682002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5069
5070 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5071 HPUX 11.00 patch PHSS_26559.
5072
c1fd6598
AO
50732002-10-22 Alexandre Oliva <aoliva@redhat.com>
5074
5075 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5076 the options section into a separate section unless IRIX 6
5077 compatibility is enabled.
5078
033fd5f9
AO
50792002-10-22 Alexandre Oliva <aoliva@redhat.com>
5080
5081 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5082 into arrays.
5083 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5084 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5085 into account.
5086 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5087 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5088
ef485c01
AM
50892002-10-21 Graeme Peterson <gp@qnx.com>
5090
5091 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5092
b50afec9
AM
50932002-10-21 Alan Modra <amodra@bigpond.net.au>
5094
5095 * targets.c (bfd_target_list): Don't return the default target twice.
5096
5fe39cae
AM
50972002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5098
5099 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5100 perror with bfd_perror.
5101
5d603aa9
L
51022002-10-19 H.J. Lu <hjl@gnu.org>
5103
5104 * elflink.h (elf_link_add_object_symbols): Correctly handle
5105 DT_RPATH and DT_RUNPATH.
5106
e377ab71
MK
51072002-10-19 Mark Kettenis <kettenis@gnu.org>
5108
5109 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5110
0d09fec6
DC
51112002-10-17 Denis Chertykov <denisc@overta.ru>
5112
5113 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5114 for ip2k port.
5115
acf8aed4
AM
51162002-10-17 Alan Modra <amodra@bigpond.net.au>
5117
5118 * elfxx-target.h (USE_REL): Don't define as 1.
5119 * elf32-arm.h (USE_REL): Provide a default define of 0.
5120 Use #if rather than #ifdef when testing USE_REL.
5121 * elf32-m32r.c: Likewise.
5122
5123 * elf32-arc.c (USE_REL): Define as 1.
5124 * elf32-d10v.c (USE_REL): Likewise.
5125 * elf32-m32r.c (USE_REL): Likewise.
5126 * elf32-m68hc11.c (USE_REL): Likewise.
5127 * elf32-m68hc12.c (USE_REL): Likewise.
5128 * elf32-or32.c (USE_REL): Likewise.
5129 * elfarm-nabi.c (USE_REL): Likewise.
5130
f52d1d64
JJ
51312002-10-16 Jakub Jelinek <jakub@redhat.com>
5132
5133 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5134 (s390x-*-linux*): Add targ_selvecs.
5135
2bc3c89a
AM
51362002-10-16 Alan Modra <amodra@bigpond.net.au>
5137
5138 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5139 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5140 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5141 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5142 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5143 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5144 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5145 (SOURCE_HFILES): Add elf32-qnx.h.
5146 (BUILD_HFILES): Add bfdver.h.
5147 Run "make dep-am".
5148 * Makefile.in: Regenerate.
5149 * configure.in Update bfd vector dependencies.
5150 * configure: Regenerate.
5151 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5152 * elf32-i386qnx.c: Likewise.
5153 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5154 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5155 * elf32-sh-lin.c: Likewise.
5156 * elf32-shqnx.c: Likewise.
5157 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5158 * elf32-sh64-nbsd.c: Likewise.
5159 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5160 * elf64-sh64-nbsd.c: Likewise.
5161 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5162 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5163 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5164 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5165 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5166 (elf_backend_is_contained_by_filepos): Likewise.
5167 (elf_backend_copy_private_bfd_data_p): Likewise.
5168 Globalize and move functions to..
5169 * elf32-qnx.c: ..here. New file.
5170 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5171 emit target vectors when INCLUDE_SHMEDIA.
5172 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5173 end of file.
5174 * elf64-sh64.c: Remove ELF_ARCH test.
5175 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5176 * po/BLD-POTFILES.in: Regenerate.
5177 * po/SRC-POTFILES.in: Regenerate.
5178
90c9df85
AM
51792002-10-16 Alan Modra <amodra@bigpond.net.au>
5180
366f2964
AM
5181 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5182 loaded with --just-symbols.
5183
90c9df85
AM
5184 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5185 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5186 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5187 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5188
2238051f
RH
51892002-10-15 Richard Henderson <rth@redhat.com>
5190
5191 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5192 (BFD64_BACKENDS_CFILES): Likewise.
5193 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5194 * elf64-alpha-fbsd.c: Remove file, move code ...
5195 * elf64-alpha.c: ... here.
5196 * Makefile.in, configure: Rebuild.
5197
64e04ecd
RH
51982002-10-14 Richard Henderson <rth@redhat.com>
5199
5200 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5201 VALUE, not ADDEND.
5202
396a6083
SC
52032002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5204
5205 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5206 datalabel_got_offset with union of datalabel_got
5207 offset and refcount.
5208 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5209 (allocate_dynrelocs): Delete unnecessary code for
5210 STT_DATALABEL type. Create entry in got for
5211 datalabel version of symbol if datalabel_got.refcount > 0.
5212 (sh_elf_relocate_section): Use datalabel_got union.
5213 (sh_elf_gc_sweep_hook): Pull common code to initialize
5214 h and eh out of switch statement. Declare seen_stt_datalabel.
5215 Initialize it. Decrement datalabel_got.refcount for
5216 got relocs when seen_stt_datalabel is true.
5217 Decrement local_got_refcounts entry for datalabel got relocs
5218 of local symbols.
5219 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5220 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5221 Initialize it. When seen_stt_datalabel is true, increment
5222 datalabel_got refcount rather than got.refcount.
5223 (sh_elf_finish_dynamic_symbol): Create relocs to
5224 initialize got entry for datalabel version of symbol.
5225
6a0735ef
AM
52262002-10-14 Alan Modra <amodra@bigpond.net.au>
5227
5228 * Makefile.am: Run "make dep-am".
5229 (BFD_H_FILES): Remove version.h.
5230 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5231 * version.h: ..to here.
5232 * configure.in (bfd_version_date): Remove.
5233 (AC_OUTPUT): Make bfdver.h from version.h.
5234 * bfd.c: #include "bfdver.h".
5235 * vms-hdr.c: Likewise.
5236 * Makefile.in: Regenerate.
5237 * bfd-in2.h: Regenerate.
5238 * configure: Regenerate.
5239 * po/SRC-POTFILES.in: Regenerate.
5240
686e4055
AM
52412002-10-14 Alan Modra <amodra@bigpond.net.au>
5242
5243 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5244 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5245 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5246 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5247 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5248 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5249 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5250 bfd_mach_ip2022, bfd_mach_ip2022ext,
5251 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5252 * bfd-in2.h: Regenerate.
5253
019dca2b
KK
52542002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5255
5256 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5257 endian vector to targ_selvecs.
5258
bce03d3d
AO
52592002-10-13 Alexandre Oliva <aoliva@redhat.com>
5260
5261 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5262 save_addend argument. Don't apply the 32-bit mask to a
5263 GPREL32 value if it's to be used in another relocation. Don't
5264 use forced-check computation of local_p to decide whether to
5265 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5266 of the addend of a non-in-place GPREL16 relocation.
5267 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5268 mips_elf_calculate_relocation().
5269
9b691193
SC
52702002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5271
5272 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5273 with symbols in other sections if we relaxed something; the sections
5274 output offsets must be re-computed before.
5275
1f4c5b47
SC
52762002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5277
5278 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5279 handling to use Elf_Internal_Sym.
5280 (m68hc11_elf_relax_delete_bytes): Likewise.
5281
5dc97655
KK
52822002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5283
5284 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5285 sh_elf_object_p, dtpoff_base): New functions.
5286 (sh_elf_howto_table): Add TLS relocs.
5287 (sh_reloc_map): Likewise.
5288 (sh_elf_info_to_howto): Support TLS relocs.
5289 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5290 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5291 New macros.
5292 (sh_elf_obj_tdata): New.
5293 (elf_sh_link_hash_table): Add tls_ldm_got.
5294 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5295 (allocate_dynrelocs): Support TLS relocs.
5296 (sh_elf_size_dynamic_sections): Likewise.
5297 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5298 .rela.got section when found already. Return false after printing
5299 error about unresolvable relocation.
5300 (sh_elf_gc_sweep_hook): Support TLS relocs.
5301 (sh_elf_check_relocs): Likewise.
5302 (sh_elf_finish_dynamic_symbol): Likewise.
5303 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5304 * reloc.c: Add SH TLS relocs.
5305 * bfd-in2.h, libbfd.h: Regenerate.
5306
6a0735ef
AM
53072002-10-11 Daniel Jacobowitz <drow@mvista.com>
5308
5309 * Makefile.in: Regenerated.
5310
af39267e
DJ
53112002-10-11 Daniel Jacobowitz <drow@mvista.com>
5312
5313 * Makefile.am: Run dep-am.
6a0735ef 5314 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5315 (BFD32_LIBS): Add simple.lo.
5316 (BFD32_LIBS_CFILES): Add simple.c.
5317 * Makefile.in: Regenerated.
5318 * bfd-in2.h: Regenerated.
5319 * simple.c: New file.
5320
0be617ce
AM
53212002-10-11 Alan Modra <amodra@bigpond.net.au>
5322
14a793b2
AM
5323 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5324 (record_thumb_to_arm_glue): Likewise.
5325 * ecoff.c (ecoff_link_add_externals): Likewise.
5326 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5327 (record_thumb_to_arm_glue): Likewise.
5328 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5329 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5330 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5331 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5332 * elf64-ppc.c (func_desc_adjust): Likewise.
5333 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5334 (sh64_elf64_create_dynamic_sections): Likewise.
5335 * elflink.c (_bfd_elf_create_got_section): Likewise.
5336 (_bfd_elf_create_dynamic_sections): Likewise.
5337 (_bfd_elf_create_linker_section): Likewise.
5338 * elflink.h (elf_add_default_symbol): Likewise.
5339 (elf_link_create_dynamic_sections): Likewise.
5340 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5341 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5342 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5343 (_bfd_mips_elf_add_symbol_hook): Likewise.
5344 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5345 * linker.c (generic_link_add_symbol_list): Likewise.
5346 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5347
5348 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5349
0be617ce 5350 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5351 completely removed. Correct local sym adjustment.
0be617ce 5352
0a4ef3f4
SC
53532002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5354
5355 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5356 Correct mistake in calculation of address of .got.
5357 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5358 elf_sh64_pic_plt_entry_le): Likewise.
5359
efacd36e
SC
53602002-10-09 Richard Shann <richard.shann@superh.com>
5361 Stephen Clarke <stephen.clarke@superh.com>
5362
5363 * Makefile.am: Add entries for elf32-sh64-lin.c and
5364 elf64-sh64-lin.c. Regenerate.
5365 * Makefile.in: Regenerate.
9b5ecbd0 5366 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5367 to use sh64 vectors rather than sh vectors.
5368 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5369 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5370 * configure: Regenerate.
5371 * elf32-sh64-lin.c: New file.
5372 * elf64-sh64-lin.c: New file.
5373 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5374 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5375
299bf759
L
53762002-10-08 H.J. Lu <hjl@gnu.org>
5377
5378 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5379 IE->LE transition for R_386_TLS_IE.
5380
51020317
AM
53812002-10-08 Alan Modra <amodra@bigpond.net.au>
5382
5383 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5384
a8fcf378
NC
53852002-10-07 Mark Elbrecht <snowball3@softhome.net>
5386
51020317
AM
5387 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5388 sections.
a8fcf378 5389
a16d5acb
AM
53902002-10-07 Alan Modra <amodra@bigpond.net.au>
5391
a6b511bd
AM
5392 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5393 code.
5394
a16d5acb
AM
5395 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5396
7c4a37eb
AM
53972002-10-06 Alan Modra <amodra@bigpond.net.au>
5398
5399 * opncls.c: Formatting.
5400 (_bfd_new_bfd): Use a smaller section hash table.
5401
7c4ca42d
AO
54022002-10-05 Alexandre Oliva <aoliva@redhat.com>
5403
5404 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5405 of the other two relocations packed with a REL32 to NONE.
5406
4989d792
SC
54072002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5408
5409 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5410 (sh_elf_link_hash_newfunc): Initialize it.
5411 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5412 to got.refcount for symbols that are forced local or when
5413 we have direct got refs.
5414 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5415 to correctly adjust got.refcount and plt.refcount.
5416 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5417 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5418
7c445aa3
JJ
54192002-10-01 Jakub Jelinek <jakub@redhat.com>
5420
5421 * elf32-i386.c (elf_i386_relocate_section): Fix
5422 movl foo@indntpoff, %eax IE->LE transition.
5423
abcf1d52
JJ
54242002-10-01 Jakub Jelinek <jakub@redhat.com>
5425
5426 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5427 sequence and its transitions.
5428
a45bb67d
JJ
54292002-10-01 Jakub Jelinek <jakub@redhat.com>
5430
5431 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5432 to st_value + addend in non-code sections.
5433 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5434 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5435
00707a0e 54362002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5437 Ken Raeburn <raeburn@cygnus.com>
5438 Aldy Hernandez <aldyh@redhat.com>
5439 Eric Christopher <echristo@redhat.com>
5440 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5441
5442 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5443 (bfd_mach_mips5500): New.
5444 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5445 (arch_info_struct): Add corresponding entries here.
5446 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5447 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5448 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5449 bfd_mach_mips5400 and bfd_mach_mips5500.
5450 (_bfd_mips_elf_mach_extends_p): New function.
5451 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5452 the EF_MIPS_MACH flags.
5453 * bfd-in2.h: Regenerate.
5454
624f0b25
JT
54552002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5456
5457 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5458 .got sections.
5459
b89fe0ee
AM
54602002-09-28 Alan Modra <amodra@bigpond.net.au>
5461
5462 * elf.c (map_sections_to_segments): Correct test for start of
5463 writable section in the same page as end of read-only section.
5464
b29635ba
JT
54652002-09-27 Matt Thomas <matt@3am-software.com>
5466
5467 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5468 local_got_refcounts usage. Remove allocation of got slot.
5469 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5470 Remove de-allocation of got slot.
5471 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5472 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5473 sections to be GC'ed.
5474 (elf_vax_instantiate_got_entries): New function.
5475 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5476 tests that are now handled by elf_vax_instantiate_got_entries.
5477 Assert GOT entry falls within .got section size. Remove redundant
5478 comparisions. Fix comments.
5479
bffbf940
JJ
54802002-09-27 Jakub Jelinek <jakub@redhat.com>
5481
5482 * reloc.c: Add x86-64 TLS relocs.
5483 * bfd-in2.h, libbfd.h: Rebuilt.
5484 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5485 relocs. Add TLS relocs.
5486 (x86_64_reloc_map): Add TLS relocs.
5487 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5488 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5489 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5490 (elf64_x86_64_hash_entry): Define.
5491 (struct elf64_x86_64_obj_tdata): New.
5492 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5493 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5494 (link_hash_newfunc): Initialize tls_type.
5495 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5496 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5497 (elf64_x86_64_mkobject): New.
5498 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5499 (elf64_x86_64_tls_transition): New.
5500 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5501 Handle TLS relocs.
5502 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5503 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5504 (elf64_x86_64_size_dynamic_sections): Likewise.
5505 (dtpoff_base, tpoff): New.
5506 (elf64_x86_64_relocate_section): Handle TLS relocs.
5507 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5508 entries.
5509 (bfd_elf64_mkobject): Define.
5510
5511 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5512 DF_STATIC_TLS if shared.
5513
14366460
TS
55142002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5515
5516 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5517 empty relocation sections.
5518
9f951329
AM
55192002-09-26 Alan Modra <amodra@bigpond.net.au>
5520
5521 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5522 (ppc64_elf_build_stubs): Build them here instead.
5523
6b3ac709
JJ
55242002-09-24 Jakub Jelinek <jakub@redhat.com>
5525
5526 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5527 addend into r_addend, not *r_offset.
5528 (elf32_sparc_finish_dynamic_symbol): Likewise.
5529 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5530 R_SPARC_RELATIVE's r_offset.
5531
e2f6d277
NC
55322002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5533
5534 * dwarf2.c (decode_line_info): Update to correctly decode
5535 the (non-standard DWARF2) out-of-order address sequences
5536 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5537
f3961b2b
DD
55382002-09-23 Mark Elbrecht <snowball3@softhome.net>
5539
5540 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5541
ad34bc37
AM
55422002-09-23 Alan Modra <amodra@bigpond.net.au>
5543
5544 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5545 for discarded FDEs. Remove redundant assignment.
5546 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5547
82988bff
L
55482002-09-22 H.J. Lu <hjl@gnu.org>
5549
5550 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5551 the relocation count between different .reloc sections.
5552
5ad8645c
AM
55532002-09-21 Alan Modra <amodra@bigpond.net.au>
5554
5f819128
AM
5555 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5556 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5557 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5558 R_PPC_EMB_RELSDA.
5559
5ad8645c
AM
5560 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5561 unsigned. Move "symcount" assignment out of loop.
5562 * Makefile.am: Run "make dep-am".
5563 * Makefile.in: Regenerate.
5564 * configure: Regenerate.
5565 * po/SRC-POTFILES.in: Regnerate.
5566
75936555
NC
55672002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5568
5569 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5570 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5571 (e.g. IRIX64).
5572
2243deae
L
55732002-09-19 Jakub Jelinek <jakub@redhat.com>
5574
5575 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5576 even if generating R_PPC_RELATIVE reloc.
5577 (ppc_elf_relocate_section): Make sure relocation is performed
5578 if skip == -2. Clear memory at r_offset when creating dynamic
5579 relocation.
5580
37e55690
JJ
55812002-09-19 Jakub Jelinek <jakub@redhat.com>
5582
5583 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5584 BFD_RELOC_386_TLS_GOTIE): Add.
5585 * bfd-in2.h, libbfd.h: Rebuilt.
5586 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5587 and R_386_TLS_GOTIE.
5588 (elf_i386_reloc_type_lookup): Handle it.
5589 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5590 char instead of enum, change GOT_* into defines.
5591 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5592 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5593 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5594 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5595 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5596 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5597 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5598 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5599 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5600 tls_type is GOT_TLS_IE_BOTH.
5601 (elf_i386_size_dynamic_sections): Likewise.
5602 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5603 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5604 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5605 all 4 GOT_TLS_* TLS types.
5606
8e67855b
NC
56072002-09-19 Nick Clifton <nickc@redhat.com>
5608
5609 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5610 follow indirect links.
5611
1c59ba3f
NC
56122002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5613
5614 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5615 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5616 on 64 bit machines.
5617 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5618 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5619 ECOFF information: 'ioptMax' refers to the actual *size*
5620 of the optimization symtab, not the number of entries.
1c59ba3f 5621
9d7404b7
NC
56222002-09-19 Daniel Jacobowitz <drow@mvista.com>
5623
5624 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5625 ELF_LINK_HASH_NEEDS_PLT logic.
5626
05a487dc
DJ
56272002-09-18 Daniel Jacobowitz <drow@mvista.com>
5628
5629 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5630 correct relocation count.
5631
1f70368c
DJ
56322002-09-17 Daniel Jacobowitz <drow@mvista.com>
5633
5634 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5635 * bfd.c (struct _bfd): Add dynsymcount.
5636 * bfd-in2.h: Regenerated.
5637 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5638 abfd->dynsymcount.
5639 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5640 for overflow.
5641
51020317 56422002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5643
5644 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5645 (mips_elf64_final_gp): Don't make up gp value.
5646 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5647 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5648 .MIPS.options/.options section.
5649
290062cc
DB
56502002-09-17 David O'Brien <obrien@FreeBSD.org>
5651
5652 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5653 It is benign for FreeBSD < 4.1. Minor reformatting.
5654 * elf64-alpha-fbsd.c: Likewise.
5655
c5c1f40c
JJ
56562002-09-17 Jakub Jelinek <jakub@redhat.com>
5657
ca1eb0ba
JJ
5658 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5659 addend.
c5c1f40c 5660
562ace6b
AM
56612002-09-17 Alan Modra <amodra@bigpond.net.au>
5662
5663 * elf64-alpha.c (alpha_elf_size_info): Make static.
5664
5af6ead6
AM
56652002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5666
5667 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5668 * cpu-tic4x.c: Ditto.
5669
cb9512fc
TS
56702002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5671
5672 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5673 duplicate define.
5674
4ada7262
DB
56752002-09-16 Bruno Haible <bruno@clisp.org>
5676
5677 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5678 by a target variant implementation.
5679 * elf64-alpha.c: Likewise.
5680 * elf32-i386-fbsd.c: New file.
5681 * elf64-alpha-fbsd.c: New file.
5682 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5683 bfd_elf64_alpha_freebsd_vec.
5684 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5685 bfd_elf64_alpha_freebsd_vec.
5686 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5687 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5688 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5689 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5690 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5691 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5692 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5693
6a30718d
JJ
56942002-09-12 Jakub Jelinek <jakub@redhat.com>
5695
5696 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5697 NULL.
5698 (elf_i386_relocate_section): Return false after printing error about
5699 unresolvable relocation.
5700
6cf9e9fe
NC
57012002-09-12 Nick Clifton <nickc@redhat.com>
5702
5703 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5704 R_ARM_THM_PC11.
5705
10f469bf
DJ
57062002-09-11 Jeffrey Law <law@redhat.com>
5707
5708 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5709
dc43ada5
NC
57102002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5711
5712 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5713 line_ptr before deciding we've found a symbol.
5714
e09f4395
NC
57152002-09-11 Nick Clifton <nickc@redhat.com>
5716
5717 * po/da.po: New Danish translation file.
5718 * configure.in (LINGUAS): Add 'da'.
5719 * configure: Regenerate.
5720
b3018b5f
NC
57212002-09-10 Michael Snyder <msnyder@redhat.com>
5722
5723 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5724 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5725 do_sections64, depending on corefile (32-bit or 64-bit).
5726
2f21f25e
RH
57272002-09-09 Richard Henderson <rth@redhat.com>
5728
5729 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5730 and PCREL21F like PCREL21B.
5731
28b94e7c
KB
57322002-09-04 Kevin Buettner <kevinb@redhat.com>
5733
51020317
AM
5734 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5735 vector.
28b94e7c 5736
5cec6941
NC
57372002-09-02 Nick Clifton <nickc@redhat.com>
5738
5739 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5740 names instead of cryptically overloaded bfd_reloc error
5741 codes.
5742 (v850_elf_relocate_section): Likewise.
5743 (v850_elf_relax_section): Replace caching of external symbols
5744 with caching of internal symbols obtained from calling
5745 bfd_elf_get_elf_syms().
51020317 5746 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5747
3b77b1d5
AM
57482002-09-02 Alan Modra <amodra@bigpond.net.au>
5749
638524b5
AM
5750 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5751 (bfd_pj_arch): Use bfd_default_scan.
5752 * cpu-v850.c (scan): Remove.
5753 (N): Use bfd_default_scan.
5754 * cpu-z8k.c (scan_mach): Remove.
5755 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5756 first. Use bfd_default_scan.
5757
250d94fd
AM
5758 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5759 bfd_mach constants.
5760 (ecoff_get_magic): Likewise.
5761 * elf32-v850.c (v850_elf_object_p): Likewise.
5762 (v850_elf_final_write_processing): Likewise.
5763 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5764 (MY(write_object_contents)): Likewise.
5765 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5766 * coffcode.h (coff_write_object_contents): Likewise.
5767 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5768 Remove unnecessary "machine" assignments.
5769 (coff_write_relocs): Test for the absolute section sym by testing
5770 section and flags.
5771
3b77b1d5
AM
5772 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5773 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5774 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5775
e5b45b83
DA
57762002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5777
5778 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5779 * bfd-in2.h (align_power): Likewise.
5780
37f45cf8
AM
57812002-08-30 Alan Modra <amodra@bigpond.net.au>
5782
5783 * Makefile.am: Run "make dep-am".
5784 * Makefile.in: Regenerate.
5785
5786 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5787 * cpu-powerpc.c (powerpc_compatible): Likewise.
5788 * cpu-rs6000.c (rs6000_compatible): Likewise.
5789
86aba9db
NC
57902002-08-28 Catherine Moore <clm@redhat.com>
5791
9b5ecbd0 5792 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5793 (v850-elf-reloc): Don't resolve pc relative relocs.
5794 (v850_elf_ignore_reloc): New routine.
5795 (v850_elf_final_link_relocate): Handle new relocs.
5796 (v850_elf_relax_delete_bytes ): New routine.
5797 (v850_elf_relax_section): New routine.
5798 (bfd_elf32_bfd_relax_section): Define.
5799 (HOWTO): New entries for new relocs.
5800 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5801 (BFD_RELOC_V850_LONGJUMP): New reloc.
5802 (BFD_RELOC_V850_ALIGN): New reloc.
5803 * archures.c: Remove redundant v850ea architecture.
5804 * cpu-v850.c: Remove redundant v850ea support.
5805 * libbfd.h: Regenerate.
5806 * bfd-in2.h: Regenerated.
5807
026df7c5
NC
58082002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5809
5810 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5811 * configure.in: Add tic4x_coff vector files.
5812 * configure: Regenerate.
5813 * Makefile.am: Add tic4x target.
5814 * Makefile.in: Regenerate.
5815
58162002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5817
5818 * archures.c: Add the BFD arch type tic4x.
5819 * bfd-in.h: Add BFD_IN_MEMORY flag.
5820 * coff-tic4x.c: New file.
5821 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5822 * cpu-tic4x.c: New file.
5823 * targets.c: Added tic4x- in list of xvecs.
5824 * ticoff.h: New file.
5825 * bfd-in2.h: Regenerate.
5826
88f7bcd5
NC
58272002-08-27 Adam Nemet <anemet@lnxw.com>
5828
5829 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5830 bit of DT_INIT and DT_FINI for Thumb functions.
5831
c8e48751
AM
58322002-08-26 Alan Modra <amodra@bigpond.net.au>
5833
5834 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5835
2846975a
AM
58362002-08-26 Alan Modra <amodra@bigpond.net.au>
5837
5838 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5839
067653c5
AM
58402002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5841
5842 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5843 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5844 Likewise.
5845 (struct elf_sh_pcrel_relocs_copied): Removed.
5846 (struct elf_sh_dyn_relocs): New.
5847 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5848 field with dyn_relocs.
5849 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5850 sections and sym_sec.
5851 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5852 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5853 (sh_elf_create_dynamic_sections): Use create_got_section instead
5854 of _bfd_elf_create_got_section.
5855 (sh_elf_check_relocs): Likewise.
5856 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5857 sections.
5858 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5859 sh_elf_relocate_section, sh_elf_check_relocs,
5860 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5861 Likewise.
5862 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5863 dynamic relocations and avoiding the copy relocation when we
5864 didn't find any dynamic relocations in the section which has
5865 contents or is read-only.
5866 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5867 (sh_elf_size_dynamic_sections): Don't reset the size of
5868 .rela.got section even if dynamic_sections_created flag is off.
5869 Don't use sh_elf_discard_copies. Scan all input bfd and use
5870 allocate_dynrelocs. Call readonly_dynrelocs to determine
5871 whether we need DT_TEXTREL.
5872 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5873 whether the symbol was never referred to.
5874 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5875 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5876 (sh_elf_check_relocs): Call create_got_section if the short-cut
5877 to .got is null. Increment reference counters only instead of
5878 allocating space on dynamic sections here. Don't conditionalize
5879 uninitialized got.offset value when marking the symbol as a
5880 global offset table entry. Keep relocations for symbols satisfied
5881 by a dynamic library to avoid copy relocations for the symbol.
5882 Set dynobj field of an elf hash table if needed.
5883 (sh_elf_finish_dynamic_sections): Handle null section pointer
5884 correctly.
5885 (elf_backend_copy_indirect_symbol): Defined.
5886 (elf_backend_can_refcount): Defined.
5887
7e326afc
NC
58882002-08-23 Nick Clifton <nickc@redhat.com>
5889
5890 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5891 previous change. Add comment explaining why.
5892
c8614e8e
AM
58932002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5894
5895 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5896 contents of .got.plt[2] to tr0, not address of .got.plt.
5897 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5898 patching absolute plt entry. For shmedia plt entry, set bottom bit
5899 of branch to plt0 as this is a branch to an shmedia instruction.
5900 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5901 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5902 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5903 branch to plt0.
5904 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5905 patching absolute plt entry. For shmedia plt entry, branch to
5906 plt0 is now ptrel, so use relative offset. Set bottom bit of
5907 branch target as it is a branch to an shmedia instruction.
5908
3b587c71
AM
59092002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5910 Richard Shann <richard.shann@superh.com>
5911
5912 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5913 value if .init is an SHmedia function. Similarly for DT_FINI.
5914 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 5915
957dcaa8
AM
59162002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5917
3b587c71 5918 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 5919 dynamic section.
3b587c71 5920 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 5921
a4263c47
NC
59222002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5923
5924 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 5925 byte read when reading the return address register column.
a4263c47 5926
db4ed121
NC
59272002-08-22 Nick Clifton <nickc@redhat.com>
5928
5929 * config.bfd: Add powepc64-*-*bsd* target.
5930
ed71e111
NC
59312002-08-22 Graeme Peterson <gp@qnx.com>
5932
5933 * Makefile.am: Add entries for elf32-shqnx.c
5934 * Makefile.in: Regenerate.
5935 * config.bfd: Add support sh-*-nto* target.
5936 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5937 * configure: Regenerate.
5938 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5939 * elf32-sh.c: Do not include elf32-target.h if
5940 ELF32_SH_C_INCLUDED is defined.
5941 * elf32-shqnx.c: New file: Support for QNX.
5942 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5943
0ab72ee2
NC
59442002-08-22 Nick Clifton <nickc@redhat.com>
5945
75c83283
NC
5946 * po/tr.po: Updated Turkish translation.
5947
0ab72ee2
NC
5948 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5949 symbols are not read.
5950
56780f18
AM
59512002-08-22 Alan Modra <amodra@bigpond.net.au>
5952
5953 * elf32-m68hc11.c: Formatting fixes.
5954 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5955 * elf32-m68hc12.c: Formatting fixes.
5956 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5957
b48fa14c
AM
59582002-08-22 Alan Modra <amodra@bigpond.net.au>
5959
a7c71b0c
AM
5960 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5961 SEC_DATA.
5962 (pmac_xcoff_vec): Likewise.
5963 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5964 (aix5coff64_vec): Likewise.
5965
56780f18
AM
59662002-08-22 Alan Modra <amodra@bigpond.net.au>
5967
b48fa14c
AM
5968 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5969 param to elf_backend_copy_indirect_symbol.
5970 (_bfd_elf_link_hash_copy_indirect): Likewise.
5971 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5972 calls to copy_indirect_symbol.
5973 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5974 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5975 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5976 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5977 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5978 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5979 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5980 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5981 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5982 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5983 test refcounts for "used" values.
5984
8c2ab17d
AM
59852002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5986
5987 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5988 argument declaration.
5989
d62b1198 59902002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
5991
5992 * archures.c (bfd_mach_ppc_e500): Added.
5993 * bfd-in2.h: Rebuilt.
d62b1198
EZ
5994 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5995
9f88ba09
AM
59962002-08-19 Alan Modra <amodra@bigpond.net.au>
5997
5998 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5999
df622259
AC
60002002-08-17 Andrew Cagney <ac131313@redhat.com>
6001
6002 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6003 `bfd_byte'.
df622259 6004
44c410de
SC
60052002-08-17 Stan Cox <scox@redhat.com>
6006
6007 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6008 IRIX 6 segment layout for NEWABI.
6009
4972a8e9
SC
60102002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6011
1049f94e 6012 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6013 symbols when looking for section referred to by a relocation.
1049f94e 6014 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6015
c5cd6d62
AM
60162002-08-15 Alan Modra <amodra@bigpond.net.au>
6017
6018 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6019
0741c7be
HPN
60202002-08-15 Hans-Peter Nilsson <hp@axis.com>
6021
6022 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6023 missing check for whether the symbol is referenced by DSO before
6024 unexporting it as an unneeded dynamic symbol.
6025
e8d5d179
L
60262002-08-14 H.J. Lu <hjl@gnu.org>
6027
6028 * libbfd.h: Regenerate.
6029
e9229007
L
60302002-08-14 H.J. Lu <hjl@gnu.org>
6031
6032 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6033
1fd03b5a
SC
60342002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6035
6036 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6037 instructions.
6038 (m68hc11_direct_relax): New to define table of relaxable instructions.
6039 (find_relaxable_insn): New, find a relaxable insn.
6040 (compare_reloc): New to compare two relocs.
6041 (m68hc11_elf_relax_section): New, relax text sections.
6042 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6043 (elf32_m68hc11_check_relocs): New function for GC support.
6044 (elf32_m68hc11_relocate_section): New function for GC support.
6045 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6046 (elf_backend_check_relocs): Likewise.
6047 (elf_backend_relocate_section): Likewise.
6048
c828c771
L
60492002-08-13 H.J. Lu <hjl@gnu.org>
6050
6051 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6052 definitions in shared objects when checking symbol with
6053 undefined version.
6054
9b701e44
SC
60552002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6056
6057 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6058 (elf32_m68hc11_gc_sweep_hook): Likewise.
6059 (elf_backend_gc_mark_hook): Define for GC section support.
6060 (elf_backend_gc_sweep_hook): Likewise.
6061 (elf_backend_can_gc_sections): Likewise.
6062
6063 * elf32-m68hc12.c: Likewise.
6064
96405e3c
SC
60652002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6066
6067 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6068 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6069 (_bfd_m68hc11_elf_set_private_flags): New function.
6070 Use them to set/check/print ELF flags specific to 68HC11.
6071
6072 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6073 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6074 (_bfd_m68hc12_elf_set_private_flags): New function.
6075 Use them to set/check/print ELF flags specific to 68HC12.
6076
dae78fb0
SC
60772002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6078
6079 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6080 fix masks for PC-rel relocs.
6081 (m68hc11_elf_ignore_reloc): New function.
6082
6083 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6084 68HC12 banked addressing relocs.
6085 (m68hc12_phys_addr): New to compute physical address of banked memory.
6086 (m68hc12_phys_page): Likewise for page.
6087 (m68hc12_addr_is_banked): New to see if address is in banked area.
6088 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6089
3dbfec86
SC
60902002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6091
6092 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6093 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6094 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6095 * bfd-in2.h: Regenerate.
6096
871da94f
L
60972002-08-12 H.J. Lu <hjl@gnu.org>
6098
6099 * elflink.h (elf_add_default_symbol): Preserve section across
6100 elf_merge_symbol.
6101
59bc061d
NC
61022002-08-09 Graeme Peterson <gp@qnx.com>
6103
51020317 6104 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6105 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6106 * Makefile.in: Regenerate.
6107 * config.bfd: Add support for powerpc{le}-*-nto targets.
6108 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6109 * configure: Regenerate.
6110 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6111 common file "elf32-qnx.h", and now include that file.
6112 * elf32-qnx.h: New file: QNX specific common elf backend.
6113 * elf32-ppc.c: Do not include elf32-target.h if
6114 ELF32_PPC_C_INCLUDED is defined.
6115 * elf32-ppcqnx.c: New file: Support for QNX.
6116 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6117 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6118
2b692c59
NC
61192002-08-09 Nick Clifton <nickc@redhat.com>
6120
6121 * po/sv.po: Updated Swedish translation.
6122
d0c7ff07
TS
61232002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6124
6125 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6126 g->global_gotsym is NULL.
6127
d8bbe778
L
61282002-08-08 H.J. Lu <hjl@gnu.org>
6129
c5cd6d62 6130 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6131 overrides an indirect versioned symbol.
6132
c366c25e
JJ
61332002-08-08 Jakub Jelinek <jakub@redhat.com>
6134
6135 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6136 for R_386_TLS_TPOFF32 relocs against symndx 0.
6137
31941635
L
61382002-08-07 H.J. Lu <hjl@gnu.org>
6139
6140 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6141 with undefined version if needed.
6142 (elf_link_assign_sym_version): Match a default symbol with a
6143 version without definition. No need to hide the default
6144 definition separately.
6145
0f3bd64f
AM
61462002-08-08 Alan Modra <amodra@bigpond.net.au>
6147
7330fb86
AM
6148 * elflink.h (elf_link_output_extsym): Don't output symbols from
6149 SEC_EXCLUDE sections.
6150
0f3bd64f
AM
6151 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6152
a4aa0fb7
AM
61532002-08-07 Alan Modra <amodra@bigpond.net.au>
6154
6155 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6156 entries.
6157
34ea4a36
TS
61582002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6159
6160 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6161 mismatch.
6162
141ff970
TS
61632002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6164
6165 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6166
28458e7e
TS
61672002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6168
6169 * elf32-mips.c (mips_reloc_map): Fix typo.
6170
0121a3da
AM
61712002-08-06 Alan Modra <amodra@bigpond.net.au>
6172
6173 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6174
d006db6c
AM
61752002-08-06 Alan Modra <amodra@bigpond.net.au>
6176
6177 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6178
8ea80f08
AM
61792002-08-06 Alan Modra <amodra@bigpond.net.au>
6180
2a52da53
AM
6181 * libxcoff.h: Use PARAMS on function declarations.
6182 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6183 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6184
8ea80f08
AM
6185 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6186 addend.
6187 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6188
cf9ab45b
AM
61892002-08-06 Alan Modra <amodra@bigpond.net.au>
6190
6191 * coff-rs6000.c: Formatting fixes.
6192 (xcoff_calculate_relocation): Use PARAMS in declaration.
6193 (xcoff_complain_overflow): Likewise.
6194 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6195 (bfd_xcoff_backend_data): Remove useless comments.
6196 (rs6000coff_vec): Likewise.
6197 (bfd_pmac_xcoff_backend_data): Likewise.
6198 (pmac_xcoff_vec): Likewise.
8ea80f08 6199
cf9ab45b
AM
6200 * coff64-rs6000.c: Formatting fixes.
6201 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6202 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6203 (bfd_xcoff_backend_data): Remove useless comments.
6204 (rs6000coff64_vec): Likewise.
6205 (bfd_xcoff_aix5_backend_data): Likewise.
6206 (aix5coff64_vec): Likewise.
6207
48bfecdd
AM
62082002-08-06 Alan Modra <amodra@bigpond.net.au>
6209
a78eab4e
AM
6210 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6211 mask entries. Use complain_overflow_dont for R_REF.
6212 (xcoff_reloc_type_ba): Revert last change.
6213 (xcoff_reloc_type_br): Likewise.
6214 (xcoff_reloc_type_crel): Likewise.
6215 (xcoff_ppc_relocate_section): Likewise.
6216 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6217 (xcoff64_ppc_relocate_section): Likewise.
6218 (xcoff64_howto_table): Revert some of last change to mask entries.
6219 Use complain_overflow_dont for R_REF.
6220
48bfecdd
AM
6221 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6222 relocs with bitsize == 16 have size = 1.
6223 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6224 (xcoff_reloc_type_br): Likewise.
6225 (xcoff_reloc_type_crel): Likewise.
6226 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6227 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6228 dst_mask adjustment.
6229 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6230 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6231 bitsize == 16 have size = 1.
6232
fd13ed0c
DC
62332002-08-01 Denis Chertykov <denisc@overta.ru>
6234
6235 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6236 (struct misc): New field isymbuf. All free_* fields removed.
6237 (symbol_value): Pass in internal syms. No need to swap syms in.
6238 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6239 possibly cached info.
6240 (tidyup_after_error): Removed.
6241 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6242 misc. Use new field.
6243 (adjust_all_relocations): Use internal syms. No need to swap syms
6244 in and out.
6245 (add_page_insn): Don't use removed fields of struct misc.
6246
24a1ba0f
NC
62472002-08-01 Nick Clifton <nickc@redhat.com>
6248
6249 * elf32-arm.h: Revert previous delta.
6250
a6903459
NC
62512002-08-01 Nick Clifton <nickc@redhat.com>
6252
6253 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6254 * configure: Regenerate.
6255
39a2a3eb
L
62562002-07-31 H.J. Lu <hjl@gnu.org>
6257
6258 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6259 selected.
6260
a0dfa6a8
L
62612002-07-31 H.J. Lu <hjl@gnu.org>
6262
6263 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6264 is selected.
6265
cd67d266
JJ
62662002-07-31 Jakub Jelinek <jakub@redhat.com>
6267
6268 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6269 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6270
4eb6b71c
NC
62712002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6272
6273 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6274 There is no 8 byte relocation type for this architecture.
6275 (do_ns32k_reloc): Use bfd_vma instead of native types.
6276 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6277 returns void.
6278 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6279 rely on generic code to do that.
6280 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6281 to all table entries.
6282 (_bfd_ns32k_relocate_contents): put_data returns void.
6283 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6284 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6285 return void.
6286
f7c33884
NC
62872002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6288
6289 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6290 archive object is target dependant.
6291
8f64befb
NC
62922002-07-31 Adam Nemet <anemet@lnxw.com>
6293
6294 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6295 (THUMB_PLT_ENTRY_SIZE): New macro.
6296 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6297 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6298 ARM_PLT_ENTRY_SIZE.
6299 (elf32_arm_plt_entry): Likewise.
6300 (elf_backend_plt_header_size): Likewise.
6301 (elf32_thumb_plt0_entry): New global.
6302 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6303 into .plt.thumb.
6304 (elf32_thumb_plt_entry): New global.
6305 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6306 Thumb entries. Set the bottom bit of the corresponding GOT entry
6307 for a Thumb PLT entry.
6308 (struct elf32_arm_plt_entry_info): New structure.
6309 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6310 type.
6311 (elf32_arm_link_hash_newfunc): Initialize new member.
6312 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6313 relocations against the PLT.
6314 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6315 first_rel_type if this is the first time we encounter the symbol.
6316 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6317 Determine if relocation needs a PLT entry. Set first_rel_type if
6318 this is the first time we encounter the symbol
6319 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6320 functions as well.
6321 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6322 (elf32_arm_create_dynamic_sections): New function. Create the
6323 .plt.thumb section.
6324 (elf_backend_create_dynamic_sections): Call it.
6325
47badb7b
NC
63262002-07-31 Nick Clifton <nickc@redhat.com>
6327
6328 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6329 'alternative' in order to avoid shadowing global symbol of the
6330 same name.
6331 * bfd-in2.h: Regenerate.
6332 * libbfd.h: Regenerate.
6333 * libcoff.h: Regenerate.
6334
8a397dad
TS
63352002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6336
6337 * Makefile.am: Add n32 ABI support.
6338 * Makefile.in: Regenerate.
6339 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6340 bit vectors for mips*-*-linux targets as optional.
6341 * configure.in: Add n32 ABI vectors.
6342 * configure: Regenerate.
6343 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6344 * elfn32-mips.c: New file, n32 ABI support.
6345 * targets.c: Add n32 ABI vectors.
6346
7e392df6 63472002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6348
7e392df6
NC
6349 * elfarmqnx-nabi.c: New file: Support for QNX.
6350 * config.bfd: Add support for arm-*-nto target.
6351 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6352 * configure: Regenerate.
6353 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6354 * Makefile.in: Regenerate.
6355 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6356 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6357 * elfarm-nabi.c: Do not include elf32-arm.h if
6358 ELFARM_NABI_C_INCLUDED is defined.
6359 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6360
7e392df6 63612002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6362
83e1617e
NC
6363 * po/sv.po: Updated Swedish translation.
6364
704afa60
JJ
63652002-07-30 Jakub Jelinek <jakub@redhat.com>
6366
6367 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6368
487e54f2
AM
63692002-07-30 Alan Modra <amodra@bigpond.net.au>
6370
6371 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6372 * archive.c (bfd_generic_archive_p): Likewise.
6373 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6374 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6375 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6376 (xcoff64_archive_p): Likewise.
6377 (xcoff64_openr_next_archived_file): Likewise.
6378 (xcoff64_archive_p): Clean up tdata properly on error.
6379 * coffgen.c (coff_real_object_p): Likewise.
6380 (coff_object_p): Release filehdr and opthdr.
6381 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6382 * ieee.c (ieee_archive_p): Likewise.
6383 * ihex.c (ihex_object_p): Likewise.
6384 (ihex_mkobject): Always allocate tdata.
6385 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6386 * srec.c (srec_mkobject): Always allocate tdata.
6387 (srec_object_p): Clean up tdata properly on error.
6388 (symbolsrec_object_p): Likewise.
6389 * versados.c (versados_object_p): Likewise.
6390 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6391 and bfd_realloc instead of realloc.
6392 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6393 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6394 place of bfd_malloc, simplifying error freeing. Free hash table too.
6395 (vms_object_p): Clean up tdata on error.
6396 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6397 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6398
9d46020e
AM
63992002-07-30 Alan Modra <amodra@bigpond.net.au>
6400
6401 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6402
fb39dac1
RS
64032002-07-26 Chris Demetriou <cgd@broadcom.com>
6404
6405 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6406 flags into resulting BFD.
6407
7a624474
AM
64082002-07-26 Alan Modra <amodra@bigpond.net.au>
6409
6410 From John Reiser <jreiser@BitWagon.com>
6411 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6412 tls_ldm_got.refcount.
6413
a4382ec6
TS
64142002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6415
6416 * elf64-mips.c: Update TODO comment.
6417 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6418 mips_elf64_gprel16_reloca): Remove prototypes.
6419 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6420 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6421 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6422 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6423 R_MIPS_HIGHEST.
6424 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6425 R_MIPS_GOT16. Remove wrong comments.
6426 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6427 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6428 from elf32-mips.c.
6429 (mips_elf64_hi16_reloc): Fix formatting.
6430 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6431 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6432 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6433 (mips_elf64_gprel16_reloc): Make static. Add check for
6434 partial_inplace.
6435 (mips_elf64_gprel16_reloca): Remove.
6436 (mips_elf64_literal_reloc): New function.
6437 (mips_elf64_gprel32_reloc): Fix formatting.
6438 (mips_elf64_shift6_reloc): Fix comment. Make static.
6439 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6440 elf32-mips.c.
6441 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6442 elf32-mips.c
6443 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6444 specific relocations.
6445 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6446 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6447 (ELF_MAXPAGESIZE): Add comment.
6448
219576a4
NC
64492002-07-25 Nick Clifton <nickc@redhat.com>
6450
6451 * po/sv.po: Updated Swedish translation.
6452 * po/es.po: Updated Spanish translation.
6453 * po/fr.po: Updated French translation.
6454
8c58d23b
AM
64552002-07-25 Alan Modra <amodra@bigpond.net.au>
6456
6457 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6458 as elf_link_record_local_dynamic_symbol.
6459 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6460 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6461 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6462 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6463 attempt is made to record a symbol in a discarded section, and
6464 return `2' in that case.
6465
ff3063f5
NC
64662002-07-24 Nick Clifton <nickc@redhat.com>
6467
6468 * po/sv.po: Updated Swedish translation.
6469 * po/es.po: Updated Spanish translation.
6470
f0fe0e16
AM
64712002-07-23 Alan Modra <amodra@bigpond.net.au>
6472
c1fb5f8a
AM
6473 * po/SRC-POTFILES.in: Regenerate.
6474
f0fe0e16
AM
6475 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6476 immediately. Remove code handling relocatable linking.
6477 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6478 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6479 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6480 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6481 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6482 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6483 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6484 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6485 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6486 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6487 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6488 * elf32-avr.c (elf_backend_rela_normal): Define.
6489 * elf32-cris.c: Likewise.
6490 * elf32-fr30.c: Likewise.
de2d743e 6491 * elf32-frv.c: Likewise.
f0fe0e16
AM
6492 * elf32-h8300.c: Likewise.
6493 * elf32-hppa.c: Likewise.
6494 * elf32-ip2k.c: Likewise.
6495 * elf32-sparc.c: Likewise.
6496 * elf32-v850.c: Likewise.
6497 * elf32-vax.c: Likewise.
6498 * elf64-hppa.c: Likewise.
6499 * elf64-sparc.c: Likewise.
6500 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6501 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6502 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6503 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6504 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6505 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6506 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6507 * elf-m10200.c (USE_RELA): Don't define.
6508 * elf-m10300.c: Likewise.
de2d743e 6509 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6510 * elf32-i370.c: Likewise.
6511 * elf32-ip2k.c: Likewise.
6512 * elf32-m68k.c: Likewise.
6513 * elf32-mcore.c: Likewise.
6514 * elf32-ppc.c: Likewise.
6515 * elf32-s390.c: Likewise.
6516 * elf32-vax.c: Likewise.
6517 * elf64-ppc.c: Likewise.
6518 * elf64-s390.c: Likewise.
6519 * elf64-x86-64.c: Likewise.
6520 * elfxx-ia64.c: Likewise.
6521 * elf32-avr.c (USE_REL): Don't undef.
6522 * elf32-ip2k.c: Likewise.
6523
5e8d7549
NC
65242002-07-23 Nick Clifton <nickc@redhat.com>
6525
6526 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6527 'want_p_paddr_set_to_zero'.
6528 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6529 to false;
6530 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6531 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6532
9e12c7db
NC
65332002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6534
6535 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6536 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6537 show the Copyright string.
6538 Minor formatting tidy ups.
6539
0461a601
NC
65402002-07-23 Nick Clifton <nickc@redhat.com>
6541
ff3063f5
NC
6542 * po/fr.po: Updated French translation.
6543 * po/sv.po: Updated Swedish translation.
0461a601 6544
fad2542d
AM
65452002-07-23 Alan Modra <amodra@bigpond.net.au>
6546
6547 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6548 when outputting relocs.
6549
c0647bfc
JT
65502002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6551
6552 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6553 DT_PLTGOT into the dynamic section if there is a PLT.
6554
d01414a5
TS
65552002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6556
6557 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6558 elf32-mips.c.
6559 (_bfd_mips_elf_write_section): Likewise.
6560 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6561 (_bfd_mips_elf_write_section): Likewise.
6562 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6563 (elf32_mips_write_section): Likewise.
6564 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6565 (_bfd_mips_elf_write_section): Likewise.
6566
40c97fc6
AM
65672002-07-19 Alan Modra <amodra@bigpond.net.au>
6568
6569 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6570 PT_IA_64_UNWIND segments for a given section.
6571
58378160
L
65722002-07-17 H.J. Lu <hjl@gnu.org>
6573
6574 * Makefile.am: Fix a typo.
6575 * Makefile.in: Regenerate.
6576
cf88bb9f
NC
65772002-07-15 Denis Chertykov <denisc@overta.ru>
6578 Frank Ch. Eigler <fche@redhat.com>
6579 Ben Elliston <bje@redhat.com>
6580 Alan Lehotsky <alehotsky@cygnus.com>
6581 John Healy <jhealy@redhat.com>
6582 Graham Stott <grahams@redhat.com>
6583 Jeff Johnston <jjohnstn@redhat.com>
6584
6585 * Makefile.am: Add support for ip2k.
6586 * Makefile.in: Regenerate.
6587 * doc/Makefile.in: Regenerate.
6588 * archures.c: Add support for ip2k.
6589 * config.bfd: Add support for ip2k.
6590 * configure.in: Add support for ip2k.
6591 * configure: Regenerate.
6592 * reloc.c: Add support for ip2k.
6593 * targets.c: Add support for ip2k.
6594 * bfd-in2.h: Regenerate.
6595 * libbfd.h: Regenerate.
6596 * cpu-ip2k.c: New file.
6597 * elf32-ip2k.c: New file.
6598
0dafd5f6
RE
65992002-07-17 Ian Rickards <irickard@arm.com>
6600
40c97fc6 6601 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6602 just return the filename.
6603
36b08f12
AM
66042002-07-16 Moritz Jodeit <moritz@jodeit.org>
6605
6606 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6607
58821868
AM
66082002-07-16 Alan Modra <amodra@bigpond.net.au>
6609
6610 * elflink.h: Formatting fixes, tidy prototypes.
6611 (elf_link_assign_sym_version): Move common code out of loop.
6612
c89583f8
AM
66132002-07-16 Alan Modra <amodra@bigpond.net.au>
6614
6615 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6616 reloc section size is zero. Correct reloc output location.
6617
ba94744e
AM
66182002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6619
6620 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6621 the final type for the e_fsel selector when generating PA2.0W code.
6622 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6623 relocations.
6624
96a94295
L
66252002-07-14 H.J. Lu <hjl@gnu.org>
6626
6627 * elflink.h (elf_link_assign_sym_version): Hide the default
6628 definition if there is a hidden versioned definition.
6629
6849c52f
HPN
66302002-07-12 Hans-Peter Nilsson <hp@axis.com>
6631
6632 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6633 dynamic reference test in assertion when initializing GOT with
6634 static contents. Just assert that there are either no dynamic
6635 sections, the symbol is defined in the regular objects or that the
6636 symbol is undef weak. Tweak comment.
6637 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6638 only if the symbol isn't defined in the program and isn't undef
6639 weak.
6640 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6641 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6642 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6643 (elf_cris_discard_excess_program_dynamics): Don't consider
6644 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6645
239e1f3a
AM
66462002-07-11 Alan Modra <amodra@bigpond.net.au>
6647
6648 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6649 unresolved debugging relocs in dynamic applications.
6650 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6651 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6652 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6653 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6654 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6655 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6656
2f6d9989
AM
66572002-07-10 Alan Modra <amodra@bigpond.net.au>
6658
f5e87a1d
AM
6659 * elf64-ppc.c (ONES): Define.
6660 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6661 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6662 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6663
2f6d9989
AM
6664 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6665 (ppc64_elf_set_private_flags): Delete.
6666 (ppc64_elf_section_from_shdr): Delete.
6667 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6668 (ppc64_elf_fake_sections): Delete.
6669 (bfd_elf64_bfd_set_private_flags): Don't define.
6670 (bfd_elf64_get_symbol_info): Likewise.
6671 (elf_backend_section_from_shdr): Likewise.
6672 (elf_backend_fake_sections): Likewise.
6673
0594c12d
AM
66742002-07-10 Marco Walther <Marco.Walther@sun.com>
6675
6676 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6677 when not already set.
6678 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6679 (elf_backend_fake_sections): Define.
6680
699cb9b8
AM
66812002-07-10 Alan Modra <amodra@bigpond.net.au>
6682
6683 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6684 Formatting.
6685 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6686
0a4787a0
HPN
66872002-07-09 Hans-Peter Nilsson <hp@axis.com>
6688
6689 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6690 NULL sym_hashes to just before use.
6691 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6692 symbol with non-default visibility.
6693 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6694 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6695 Ditto.
6696 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6697 symbol with non-default visibility.
6698 (cris_elf_check_relocs): At tests for local symbol before
6699 increasing h->plt.refcount, also check for non-default
6700 visibility. Ditto when checking for local symbol to eliminate
6701 pc-relative runtime relocs.
6702
aecc8f8a
AM
67032002-07-08 Alan Modra <amodra@bigpond.net.au>
6704
6705 * elf.c: Formatting.
6706 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6707 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6708 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6709 segments.
6710
e9168c1e
MM
67112002-07-07 Mark Mitchell <mark@codesourcery.com>
6712 Alan Modra <amodra@bigpond.net.au>
6713
6714 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6715 account the impact of relocation count overflow when computing
6716 section offsets.
6717 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6718 or not to apply the PE COFF reloc overflow handling. Fix a
6719 fencepost error in deciding whether or not to use that technique.
6720
6cdc0ccc
AM
67212002-07-07 Alan Modra <amodra@bigpond.net.au>
6722
6723 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6724 change type of locsyms.
6725 (bfd_elf_get_elf_syms): Declare.
6726 * elf.c (bfd_elf_get_elf_syms): New function.
6727 (group_signature): Use bfd_elf_get_elf_syms.
6728 (bfd_section_from_r_symndx): Likewise.
6729 * elfcode.h (elf_slurp_symbol_table): Likewise.
6730 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6731 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6732 locality of various data structures. Properly free internal relocs.
6733 (elf_bfd_final_link): Properly free internal relocs.
6734 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6735 (elf_link_input_bfd): Likewise.
6736 (elf_gc_mark): Likewise. Properly free internal relocs.
6737 (elf_gc_sweep): Properly free internal relocs.
6738 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6739 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6740 internal relocs.
6741 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6742 Properly free possibly cached info.
6743 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6744 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6745 symbol swapping code.
6746 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6747 Properly free possibly cached info.
6748 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6749 (mn10300_elf_relax_delete_bytes): Likewise.
6750 (mn10300_elf_symbol_address_p): Likewise.
6751 (mn10300_elf_get_relocated_section_contents): Likewise.
6752 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6753 (elf32_h8_relax_delete_bytes): Likewise.
6754 (elf32_h8_symbol_address_p): Likewise.
6755 (elf32_h8_get_relocated_section_contents): Likewise.
6756 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6757 (m32r_elf_relax_delete_bytes): Likewise.
6758 (m32r_elf_get_relocated_section_contents): Likewise.
6759 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6760 elf_section_data to determine whether cached.
6761 (sh_elf_relax_section): As above for elf-m10200.c.
6762 (sh_elf_relax_delete_bytes): Likewise.
6763 (sh_elf_get_relocated_section_contents): Likewise.
6764 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6765 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6766 reading of local syms.
6767 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6768 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6769 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6770 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6771 relocs.
6772 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6773 free internal relocs and section contents. Don't read symbols.
6774 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6775 (elf32_hppa_size_stubs): Don't free local syms.
6776 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6777 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6778 possibly cached info.
6779 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6780 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6781 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6782 all_local_syms.
6783 (get_local_syms): Delete function.
6784 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6785 on exit.
6786 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6787
b3212001
JW
67882002-07-05 Jim Wilson <wilson@redhat.com>
6789
6790 * syms.c (decode_section_type): New.
6791 (bfd_decode_symclass): Call decode_section_type.
6792
894bb1ee
JJ
67932002-07-04 Jakub Jelinek <jakub@redhat.com>
6794
6795 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6796 section content start.
6797 Reported by Michael Schumacher <mike@hightec-rt.com>.
6798
bc0ba537
AM
67992002-07-04 Alan Modra <amodra@bigpond.net.au>
6800
9b5ecbd0 6801 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
6802 link order code. Don't actually remove the output section here;
6803 Just set a flag for the linker to do so.
6804 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6805 sections when setting up output section dynsyms.
6806
797fc050
AM
68072002-07-04 Alan Modra <amodra@bigpond.net.au>
6808
6809 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6810 fudge.
6811 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6812 libs here instead.
6813
99881371
MS
68142002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6815
6816 * elf64-s390.c (create_got_section): Set .got section alignment to
6817 8 bytes.
6818 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6819
47d9a591
AM
68202002-07-02 Alan Modra <amodra@bigpond.net.au>
6821
6822 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6823
179d3252
JT
68242002-07-01 Matt Thomas <matt@3am-software.com>
6825
6826 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6827 to EF_VAX_*.
6828
4a14403c
TS
68292002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6830
6831 * elfxx-mips.c (ABI_64_P): Fix comment.
6832 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6833 new section names for N64 ABI.
6834 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6835 (mips_elf_calculate_relocation): Code formatting.
6836 (mips_elf_create_dynamic_relocation): Likewise.
6837 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6838 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6839 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6840 in any NewABI.
6841 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6842 for NewABI.
6843 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6844 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6845 here, too.
6846
607c0e09
AS
68472002-07-01 Andreas Schwab <schwab@suse.de>
6848
6849 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6850 R_X86_64_64 to R_X86_64_RELATIVE.
6851
ba26fd96
AM
68522002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6853
6854 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6855 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6856 Run "make dep-am".
6857 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6858 host_aout_vec.
6859 * configure.in (vaxbsd_vec): Add.
6860 * targets.c (vaxbsd_vec): Add.
6861 * Makefile.in: Rebuild.
6862 * configure: Rebuild.
6863 * po/SRC-POTFILES.in: Rebuild.
6864
1e2f5b6e
AM
68652002-07-01 Alan Modra <amodra@bigpond.net.au>
6866
6867 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6868 examining to gc_mark_hook, rather than the bfd.
6869 (elf_gc_sections): Adjust.
6870 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6871 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6872 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6873 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6874 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6875 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6876 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6877 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6878 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6879 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6880 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6881 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6882 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6883 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6884 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6885 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6886 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6887 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6888 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6889 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6890 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6891 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6892 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6893 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6894 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6895 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6896 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6897 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6898 redundant local sym tests.
6899 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6900 (link_hash_newfunc): Init is_entry.
6901 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6902 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6903 (create_linkage_sections): Use bfd_make_section_anyway rather than
6904 bfd_make_section.
6905 (ppc64_elf_mark_entry_syms): New function.
6906 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6907 up opd entry to function section map.
6908 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6909 relocs that reference the opd section.
6910 (edit_opd): New function.
6911 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6912 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6913 (get_local_syms): Do so here. Exit if we already have local syms.
6914 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6915 read local syms on non-ELF input.
6916 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6917 than duplicating it's function here. Adjust free of internal
6918 relocs to suit.
6919 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6920 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6921 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6922 _bfd_elf32_link_read_relocs rather than duplicating it's function
6923 here. Adjust free of internal relocs to suit.
6924
1b71fb54
AJ
69252002-07-01 Andreas Jaeger <aj@suse.de>
6926
6927 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6928 are not allowed in shared libs code, enforce -fPIC.
6929
8d28f606
HPN
69302002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6931
6932 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6933 trailing zero-sequences when there's previous left-over data.
6934
5ac81c74
JL
69352002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6936
6937 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6938 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6939 and opd_rel_sec in order for starting rela section. Check _raw_size.
6940 (elf_backend_reloc_type_class): Define.
6941
91a4d569
AM
69422002-06-27 Kevin Buettner <kevinb@redhat.com>
6943
6944 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6945 DWARF2 formats.
6946
feee612b
AM
69472002-06-27 Alan Modra <amodra@bigpond.net.au>
6948
6949 * cpu-powerpc.c: Comment on ordering of arch_info.
6950 * elf32-ppc.c (ppc_elf_object_p): New function.
6951 (elf_backend_object_p): Define.
6952 * elf64-ppc.c (ppc64_elf_object_p): New function.
6953 (elf_backend_object_p): Define.
6954
a4e6cefc
JT
69552002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6956
6957 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6958 * configure: Regenerate.
6959
dae2dd0d
NC
69602002-06-25 Jason Eckhardt <jle@rice.edu>
6961
6962 * dwarf2.c (decode_line_info): Check unit->addr_size
6963 to read in the proper number of prologue bytes.
6964
680f9d5c
NC
69652002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6966
6967 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6968 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
6969 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6970 been enabled.
dae2dd0d 6971
680f9d5c
NC
6972 * targets.c (_bfd_target_vector[]): Only include
6973 aix5coff64_vec if 64-bit bfd support has been enabled.
6974
d4c88bbb
AM
69752002-06-25 Alan Modra <amodra@bigpond.net.au>
6976
6977 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6978 * elf32-hppa.c (hppa_add_stub): Likewise.
6979 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6980 * elflink.h (elf_add_default_symbol): Fix comment typo.
6981 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6982 (elf_link_add_object_symbols): Likewise.
6983 (elf_link_assign_sym_version): Likewise.
6984 * hash.c (bfd_hash_lookup): Likewise.
6985 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6986 * section.c (bfd_get_unique_section_name): Likewise.
6987 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6988 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6989 (assign_section_numbers): Likewise.
6990 (_bfd_elfcore_make_pseudosection): Likewise.
6991 (elfcore_grok_lwpstatus): Likewise.
6992 (elfcore_grok_win32pstatus): Likewise.
6993 (elfcore_write_note): Constify input params. Use PTR instead of
6994 void *. Include terminating NUL in namesz. Correct padding.
6995 Support NULL "name" param. Use memcpy instead of strcpy.
6996 (elfcore_write_prpsinfo): Constify input params.
6997 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6998 (elfcore_write_lwpstatus): Likewise.
6999 (elfcore_write_pstatus): Likewise.
7000 (elfcore_write_prfpreg): Likewise.
7001 (elfcore_write_prxfpreg): Likewise.
7002 * elf-bfd.h (elfcore_write_note): Update declaration.
7003 (elfcore_write_prpsinfo): Likewise.
7004 (elfcore_write_prstatus): Likewise.
7005 (elfcore_write_pstatus): Likewise.
7006 (elfcore_write_prfpreg): Likewise.
7007 (elfcore_write_prxfpreg): Likewise.
7008 (elfcore_write_lwpstatus): Likewise.
7009
b0ac09d2
NC
70102002-06-25 Jason Eckhardt <jle@rice.edu>
7011
7012 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7013 symbols of type stProc and stStaticProc.
7014
70152002-06-25 Nick Clifton <nickc@redhat.com>
7016
7017 * ecoff.c: VArious formatting fixes.
7018
021d6096
AM
70192002-06-25 Alan Modra <amodra@bigpond.net.au>
7020
7021 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7022
82e51918
AM
70232002-06-25 Alan Modra <amodra@bigpond.net.au>
7024
7025 * aout-adobe.c: Don't compare against "true" or "false.
7026 * aout-target.h: Likewise.
7027 * aoutx.h: Likewise.
7028 * archive.c: Likewise.
7029 * bout.c: Likewise.
7030 * cache.c: Likewise.
7031 * coff-a29k.c: Likewise.
7032 * coff-alpha.c: Likewise.
7033 * coff-i386.c: Likewise.
7034 * coff-mips.c: Likewise.
7035 * coff-or32.c: Likewise.
7036 * coff64-rs6000.c: Likewise.
7037 * coffcode.h: Likewise.
7038 * coffgen.c: Likewise.
7039 * cpu-ns32k.c: Likewise.
7040 * ecoff.c: Likewise.
7041 * ecofflink.c: Likewise.
7042 * elf.c: Likewise.
7043 * elf32-arm.h: Likewise.
7044 * elf32-cris.c: Likewise.
7045 * elf32-d30v.c: Likewise.
7046 * elf32-i386.c: Likewise.
7047 * elf32-mcore.c: Likewise.
7048 * elf32-ppc.c: Likewise.
7049 * elf32-sh.c: Likewise.
7050 * elf32-sh64.c: Likewise.
7051 * elf32-v850.c: Likewise.
7052 * elf64-alpha.c: Likewise.
7053 * elf64-sh64.c: Likewise.
7054 * elfcode.h: Likewise.
7055 * elfcore.h: Likewise.
7056 * elflink.h: Likewise.
7057 * elfxx-mips.c: Likewise.
7058 * i386os9k.c: Likewise.
7059 * ieee.c: Likewise.
7060 * libbfd.c: Likewise.
7061 * linker.c: Likewise.
7062 * mmo.c: Likewise.
7063 * nlm32-alpha.c: Likewise.
7064 * nlm32-i386.c: Likewise.
7065 * nlm32-ppc.c: Likewise.
7066 * nlm32-sparc.c: Likewise.
7067 * nlmcode.h: Likewise.
7068 * oasys.c: Likewise.
7069 * pdp11.c: Likewise.
7070 * peicode.h: Likewise.
7071 * reloc.c: Likewise.
7072 * som.c: Likewise.
7073 * srec.c: Likewise.
7074 * tekhex.c: Likewise.
7075 * vms.c: Likewise.
7076 * xcofflink.c: Likewise.
7077 * elf64-sparc.c: Edit comment to not use "== false".
7078
7079 * aoutf1.h: Don't use "? true : false".
7080 * ecoff.c: Likewise.
7081 * format.c: Likewise.
7082 * ieee.c: Likewise.
7083 * linker.c: Likewise.
7084 * mmo.c: Likewise.
7085 * oasys.c: Likewise.
7086
48fc70a2
AM
70872002-06-23 H.J. Lu <hjl@gnu.org>
7088
7089 * elflink.h (elf_link_add_archive_symbols): For the default
7090 version, check references with only one `@' first.
7091
47b7c2db
AM
70922002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7093
7094 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7095 function.
9b5ecbd0 7096 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7097 symbol table.
7098 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7099 (elf64_hppa_size_dynamic_sections): Revise to use
7100 elf64_hppa_mark_milli_and_exported_functions.
7101 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7102 symbols out of dynamic symbol table.
7103
f5d44ba0
AM
71042002-06-23 Alan Modra <amodra@bigpond.net.au>
7105
bb3fff1e
AM
7106 * Makefile.in: Regenerate.
7107 * libbfd.h: Regenerate.
7108 * bfd-in2.h: Regenerate.
7109 * configure: Regenerate.
7110 * po/SRC-POTFILES.in: Regenerate.
7111
f5d44ba0
AM
7112 * elflink.h: Comment typo fixes.
7113
71142002-06-23 H.J. Lu <hjl@gnu.org>
7115
7116 * elf-bfd.h (elf_link_loaded_list): New structure.
7117 (elf_link_hash_table): Add "loaded".
7118 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7119 * elflink.h (elf_link_check_versioned_symbol): New function.
7120 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7121
cc36acdf
NC
71222002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7123
7124 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7125 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7126 nothing needed to be done, rather than false, indicating that the
7127 section's size could not be computed.
7128
4e5ba5b7
DB
71292002-06-18 Dave Brolley <brolley@redhat.com>
7130
7131 From Catherine Moore, Michael Meissner, Dave Brolley:
7132 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7133 * targets.c: Support bfd_elf32_frv_vec.
7134 * reloc.c: Add FRV relocs.
7135 * configure.in: Add support for bfd-elf32-frv-vec.
7136 * config.bfd (targ_cpu): Add support for frv-*-elf.
7137 * archures.c: Add frv arch and machines.
7138 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7139 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7140 (BFD32_BACKENDS): Add elf32-frv.lo.
7141 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7142 (cpu-frv.lo): New target.
7143 (elf32-frv.lo): New target.
7144 * cpu-frv.c: New file.
7145 * elf32-frv.c: New file.
7146
7ece0d85
JJ
71472002-06-18 Jakub Jelinek <jakub@redhat.com>
7148
7149 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7150 e_shnum == 0.
7151 Only read the first section header if e_shoff is non-zero.
7152 Don't consider e_shstrndx if there are no sections.
7153
57fb03ac
TR
71542002-06-17 Tom Rix <trix@redhat.com>
7155
7156 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7157 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7158 complain_overflow_bitfield.
7159
341ca622
AM
71602002-06-17 Alan Modra <amodra@bigpond.net.au>
7161
767e34d1
AM
7162 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7163 (bfd_fdopenr): Likewise.
7164 (bfd_openstreamr): Likewise.
7165 (bfd_openw): Likewise.
7166
341ca622
AM
7167 * targets.c: Sort target vecs.
7168 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7169 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7170 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7171 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7172 * configure.in: Sort target vecs. Add m88kmach3_vec.
7173 * configure: Regenerate.
7174
dfbbae4c
HPN
71752002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7176
7177 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7178 bpo_reloc_no to break sort order ties, not address of items.
7179
d663e1cd
JL
71802002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7181
7182 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7183 Skip excluded sections in determing __gp value.
7184 (elf_hppa_final_link_relocate): Use the symbol's address in
7185 R_PARISC_FPTR64 relocations that don't need an opd entry.
7186 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7187 (elf64_hppa_finalize_dynreloc): Likewise.
7188 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7189 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7190
a8295218
NC
71912002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7192
7193 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7194 alignment for .bss, .data and .text sections so that sse and sse2
7195 code will work.
7196 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7197
71982002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7199
7200 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7201 sh[1234]*-elf*.
7202
3db4b612
JL
72032002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7204
2cb69dd3
JL
7205 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7206 dynamic sections.
7207
3db4b612
JL
7208 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7209 for a symbol that has no output section.
7210 (allocate_dynrel_entries): Correct comment.
7211 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7212 unless we want one.
7213 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7214 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7215 with no section. Remove unnecessary parentheses.
7216
f3813499
TR
72172002-06-11 Tom Rix <trix@redhat.com>
7218
7219 * coffcode.h (coff_compute_section_file_positions): Add data
7220 section to AIX loader alignment check.
7221
f5d44ba0 7222 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7223 alignment to 4 bytes.
7224 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7225 power accessor macro.
7226 (do_shared_object_padding): Remove invalid assertion.
7227
0ebaf185
RS
72282002-06-10 Richard Sandiford <rsandifo@redhat.com>
7229
7230 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7231 for removed output sections.
7232
ebe3e2d1
NC
72332002-06-10 Geoffrey Keating <geoffk@redhat.com>
7234
7235 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7236 htab_alloc.
7237 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7238
0b14c2aa
L
72392002-06-08 H.J. Lu <hjl@gnu.org>
7240
7241 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7242 work around a long long bug in gcc 2.96 on mips.
7243
3c2bfad6
JT
72442002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7245
7246 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7247 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7248 Regenerate dependency lists.
7249 * Makefile.in: Regenerate.
7250 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7251 vax1knetbsd_vec to targ_selvecs.
7252 * configure.in: Add vax1knetbsd_vec.
7253 * configure: Regenerate.
7254 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7255 * vax1knetbsd.c: New file.
7256 * vaxnetbsd.c: Update copyright years.
7257 (TARGET_PAGE_SIZE): Set to 0x1000.
7258 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7259
91149be3
JT
72602002-06-08 Matt Thomas <matt@3am-software.com>
7261
7262 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7263
21e15248
AM
72642002-06-08 Alan Modra <amodra@bigpond.net.au>
7265
7266 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7267
986b7daa
AM
72682002-06-08 Alan Modra <amodra@bigpond.net.au>
7269
e90b95f6
AM
7270 * Makefile.am: Run "make dep-am".
7271 * Makefile.in: Regenerate.
7272
3f9c735e
AM
7273 * armnetbsd.c: Replace CONST with const.
7274 * corefile.c: Likewise.
7275 * elf32-dlx.c: Likewise.
7276 * elf64-mips.c: Likewise.
7277 * mmo.c: Likewise.
7278 * ns32knetbsd.c: Likewise.
7279
986b7daa
AM
7280 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7281 table is elf64-sparc.
7282
5a659663
TS
72832002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7284
7285 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7286 Fix RELA addends to get not shifted in the result. Don't do special
7287 handling of R_MIPS_64 for NewABI.
7288
9bab7074
AM
72892002-06-07 Alan Modra <amodra@bigpond.net.au>
7290
7291 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7292 (NAME(aout,slurp_reloc_table)): Likewise.
7293 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7294 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7295 (xcoff_write_archive_contents_big): Likewise.
7296 (xcoff_generate_rtinit): Likewise.
7297 (xcoff_generate_rtinit): Likewise, and check error return.
7298 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7299 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7300 (coff_get_normalized_symtab): Likewise.
7301 (coff_make_empty_symbol): Likewise.
7302 (bfd_coff_set_symbol_class): Likewise.
7303 * cofflink.c (coff_link_add_symbols): Likewise.
7304 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7305 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7306 (bfd_ecoff_write_accumulated_debug): Likewise.
7307 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7308 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7309 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7310 * ieee.c (do_with_relocs): Use bfd_zalloc.
7311 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7312 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7313 (NAME(aout,slurp_reloc_table)): Likewise.
7314 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7315 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7316 * som.c (som_build_and_write_symbol_table): Likewise.
7317 (som_slurp_string_table): Likewise.
7318 (som_slurp_symbol_table): Likewise.
7319 (som_bfd_ar_write_symbol_stuff): Likewise.
7320 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7321 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7322 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7323 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7324 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7325
1126897b
AM
73262002-06-07 Alan Modra <amodra@bigpond.net.au>
7327
7328 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7329 "group" union.
7330 (elf_group_name): Update.
7331 (elf_group_id): Define.
7332 (bfd_elf_set_group_contents): Declare.
7333 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7334 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7335 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7336 that sym for the signature.
7337 (_bfd_elf_compute_section_file_positions): Don't call
7338 set_group_contents for "ld -r" case.
7339 (swap_out_syms): Use bfd_zalloc.
7340 * elflink.h (elf_link_add_archive_symbols): Likewise.
7341 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7342 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7343
3fad3c7c
AM
73442002-06-07 Alan Modra <amodra@bigpond.net.au>
7345
7346 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7347 relocs in opd for non-shared too.
7348
10f469bf 73492002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7350
7351 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7352 relocations.
7353
7217313c
NC
73542002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7355
7356 * merge.c: Include libiberty.h.
7357 * elf-strtab.c: Include libiberty.h.
7358
6cb22815
AM
73592002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7360
7361 * peXXigen.c (pe_print_idata): Remove unused variable.
7362
1ed89aa9
NC
73632002-06-06 David Heine <dlheine@tensilica.com>
7364
7365 * elf.c (assign_file_positions_for_segments): Remove unallocated
7366 sections from the section to segment mapping for PT_LOAD segments.
7367 Update comment about empty loadable segments.
7368
644c4c80
RS
73692002-06-06 Richard Sandiford <rsandifo@redhat.com>
7370
7371 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7372 is within the .stabstr section.
7373
f8ecb12b
AM
73742002-06-06 Alan Modra <amodra@bigpond.net.au>
7375
7376 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7377 are "const PTR", not "const PTR *".
7378 (bfd_elf32_swap_symbol_in): Likewise.
7379 (bfd_elf64_swap_symbol_in): Likewise.
7380 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7381 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7382 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7383 (elf_link_add_object_symbols): Likewise.
7384 (elf_link_record_local_dynamic_symbol): Likewise.
7385 (elf_link_input_bfd): Likewise.
7386 (elf_gc_mark): Likewise.
7387 (elf_reloc_symbol_deleted_p): Likewise.
7388 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7389 (mn10200_elf_relax_delete_bytes): Likewise.
7390 (mn10200_elf_symbol_address_p): Likewise.
7391 (mn10200_elf_get_relocated_section_contents): Likewise.
7392 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7393 (mn10300_elf_relax_section): Likewise.
7394 (mn10300_elf_relax_delete_bytes): Likewise.
7395 (mn10300_elf_symbol_address_p): Likewise.
7396 (mn10300_elf_get_relocated_section_contents): Likewise.
7397 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7398 (elf32_h8_relax_delete_bytes): Likewise.
7399 (elf32_h8_symbol_address_p): Likewise.
7400 (elf32_h8_get_relocated_section_contents): Likewise.
7401 * elf32-hppa.c (get_local_syms): Likewise.
7402 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7403 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7404 * elf32-sh.c (sh_elf_relax_section): Likewise.
7405 (sh_elf_relax_delete_bytes): Likewise.
7406 (sh_elf_get_relocated_section_contents): Likewise.
7407 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7408 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7409 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7410 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7411 * elf64-ppc.c (get_local_syms): Likewise.
7412 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7413 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7414
1ed89aa9 74152002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7416
7417 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7418
73ff0d56
AM
74192002-06-05 Alan Modra <amodra@bigpond.net.au>
7420
9dce4196
AM
7421 * elf.c (group_signature): Swap in the whole symbol, and handle
7422 extracting section symbol names.
7423 (setup_group): Add comment.
7424 (set_group_contents): When called from objcopy or ld, arrange for
7425 section contents to be written. Write group member output section
7426 indices to allow objcopy to reorganize sections.
7427 (_bfd_elf_copy_private_section_data): Copy group info.
7428
73ff0d56
AM
7429 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7430 (bfd_elf32_swap_symbol_in): Update prototype.
7431 (bfd_elf64_swap_symbol_in): Likewise.
7432 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7433 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7434 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7435 (elf_link_add_object_symbols): Likewise.
7436 (elf_link_record_local_dynamic_symbol): Likewise.
7437 (elf_link_input_bfd): Likewise.
7438 (elf_gc_mark): Likewise.
7439 (elf_reloc_symbol_deleted_p): Likewise.
7440 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7441 (mn10200_elf_relax_delete_bytes): Likewise.
7442 (mn10200_elf_symbol_address_p): Likewise.
7443 (mn10200_elf_get_relocated_section_contents): Likewise.
7444 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7445 (mn10300_elf_relax_section): Likewise.
7446 (mn10300_elf_relax_delete_bytes): Likewise.
7447 (mn10300_elf_symbol_address_p): Likewise.
7448 (mn10300_elf_get_relocated_section_contents): Likewise.
7449 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7450 (elf32_h8_relax_delete_bytes): Likewise.
7451 (elf32_h8_symbol_address_p): Likewise.
7452 (elf32_h8_get_relocated_section_contents): Likewise.
7453 * elf32-hppa.c (get_local_syms): Likewise.
7454 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7455 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7456 * elf32-sh.c (sh_elf_relax_section): Likewise.
7457 (sh_elf_relax_delete_bytes): Likewise.
7458 (sh_elf_get_relocated_section_contents): Likewise.
7459 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7460 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7461 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7462 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7463 * elf64-ppc.c (get_local_syms): Likewise.
7464 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7465 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7466 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7467 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7468 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7469 * elf64-mips.c (mips_elf64_size_info): Likewise.
7470 * elf64-s390.c (s390_elf64_size_info): Likewise.
7471 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7472
53bfd6b4
MR
74732002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7474
7475 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7476 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7477 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7478 _bfd_mips_elf_ignore_discarded_relocs.
7479 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7480
d4df96e6
L
74812002-06-05 H.J. Lu <hjl@gnu.org>
7482
7483 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7484 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7485 the SEC_MERGE section.
7486
e61463e1
AM
74872002-06-05 Alan Modra <amodra@bigpond.net.au>
7488
3cac74d0
AM
7489 * coff-alpha.c: Update copyright date.
7490 * coff-mips.c: Likewise.
7491 * xcoff-target.h: Likewise.
7492
e61463e1
AM
7493 * bfd-in.h: Remove "taken from the source" comment.
7494 * libbfd-in.h: Likewise.
7495 * libcoff-in.h: Likewise.
7496 * bfd-in2.h: Regenerate.
7497 * libbfd.h: Regenerate.
7498 * libcoff.h: Regenerate.
7499
7500 * elf.c (bfd_elf_discard_group): Return true.
7501 * elf-bfd.h (bfd_elf_discard_group): Declare.
7502 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7503 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7504 * bfd.c (bfd_discard_group): Define.
7505 * targets.c (struct bfd_target): Add _bfd_discard_group.
7506 (BFD_JUMP_TABLE_LINK): Here too.
7507 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7508 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7509 * aout-target.h (MY_bfd_discard_group): Define.
7510 * aout-tic30.c (MY_bfd_discard_group): Define.
7511 * binary.c (binary_bfd_discard_group): Define.
7512 * bout.c (b_out_bfd_discard_group): Define.
7513 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7514 * coffcode.h (coff_bfd_discard_group): Define.
7515 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7516 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7517 * i386msdos.c (msdos_bfd_discard_group): Define.
7518 * i386os9k.c (os9k_bfd_discard_group): Define.
7519 * ieee.c (ieee_bfd_discard_group): Define.
7520 * ihex.c (ihex_bfd_discard_group): Define.
7521 * mmo.c (mmo_bfd_discard_group): Define.
7522 * nlm-target.h (nlm_bfd_discard_group): Define.
7523 * oasys.c (oasys_bfd_discard_group): Define.
7524 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7525 * som.c (som_bfd_discard_group): Define.
7526 * srec.c (srec_bfd_discard_group): Define.
7527 * tekhex.c (tekhex_bfd_discard_group): Define.
7528 * versados.c (versados_bfd_discard_group): Define.
7529 * vms.c (vms_bfd_discard_group): Define.
7530 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7531 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7532 (aix5coff64_vec): Likewise.
7533 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7534
9cba27b2
JT
75352002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7536
7537 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7538 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7539 (elf32-sh64-com.lo): New dependency list.
7540 * Makefile.in: Regenerate.
7541 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7542 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7543 elf32-sh64-com.lo.
7544 * configure: Regenerate.
7545 * elf32-sh64.c (sh64_address_in_cranges)
7546 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7547 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7548 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7549 * elf32-sh64-com.c: ...here. New file.
7550
8d2c33be
AM
75512002-06-04 Alan Modra <amodra@bigpond.net.au>
7552
7553 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7554 ATTRIBUTE_UNUSED on used params.
7555 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7556 before calling bfd_section_from_elf_index on local syms.
7557 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7558
5b0e55b6
JT
75592002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7560
7561 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7562 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7563 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7564 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7565 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7566 * Makefile.in: Regenerate.
7567 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7568 (sh64-*-netbsd*): New targets.
7569 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7570 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7571 * configure: Regenerate.
7572 * elf32-sh64-nbsd.c: New file.
7573 * elf64-sh64-nbsd.c: New file.
7574 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7575 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7576 bfd_elf64_sh64lnbsd_vec.
7577
b885599b
AM
75782002-06-04 Alan Modra <amodra@bigpond.net.au>
7579
7580 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7581 (bfd_section_from_shdr): Likewise. Set section name of group
7582 sections from signature.
7583 (group_signature): Split out from setup_group. Ensure symbol table
7584 is available.
7585 (bfd_elf_discard_group): New function.
7586 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7587 .gnu.linkonce* sections if they are members of a group.
7588 (set_group_contents): Set GRP_COMDAT flag.
7589 * section.c (bfd_discard_group): New function.
7590 * bfd-in.h (bfd_elf_discard_group): Declare.
7591 * bfd-in2.h: Regenerate.
7592 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7593 (elf_linkonce_p): Define.
7594
90937f86
AM
75952002-06-04 Alan Modra <amodra@bigpond.net.au>
7596
7597 * elf.c (bfd_section_from_shdr): Make "name" const.
7598 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7599 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7600 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7601 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7602 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7603 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7604 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7605 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7606 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7607 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7608 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7609
cf6fb9ce
MR
76102002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7611
7612 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7613 ABI.
7614
cedb70c5
KH
76152002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7616
7617 * elf32-arc.c: Fix formatting.
7618 * elf32-arm.h: Likewise.
7619 * elf32-cris.c: Likewise.
7620 * elf32-dlx.c: Likewise.
7621 * elf32-hppa.c: Likewise.
7622 * elf32-i386.c: Likewise.
7623 * elf32-i386qnx.c: Likewise.
7624 * elf32-or32.c: Likewise.
7625 * elf32-s390.c: Likewise.
7626 * elf32-sh64.c: Likewise.
7627 * elf32-vax.c: Likewise.
7628 * elf32-xstormy16.c: Likewise.
7629 * elf64-alpha.c: Likewise.
7630 * elf64-mmix.c: Likewise.
7631 * elf64-ppc.c: Likewise.
7632 * elf64-s390.c: Likewise.
7633 * elf64-sh64.c: Likewise.
7634 * elf64-x86-64.c: Likewise.
7635
048d873d
RH
76362002-06-02 Richard Henderson <rth@redhat.com>
7637
7638 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7639 null when there are no got entries for a symbol.
7640 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7641 uninitialized variable warning.
7642
4a67a098
RH
76432002-06-01 Richard Henderson <rth@redhat.com>
7644
7645 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7646 undefined symbols here.
7647 (elf64_alpha_relax_section): Do it here. Also test for not
7648 defined in the current module.
7649 (elf64_alpha_relocate_section_r): Split out of ...
7650 (elf64_alpha_relocate_section): ... here. Don't dereference
7651 NULL when looking up local got entries.
7652
f44f99a5
RH
76532002-06-01 Richard Henderson <rth@redhat.com>
7654
7655 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7656 symbols from JSR relaxation.
7657 (elf64_alpha_size_plt_section_1): New.
7658 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7659 (elf64_alpha_size_rela_got_1): ... here.
7660 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7661 (elf64_alpha_size_rela_got_section): ... here.
7662 (elf64_alpha_size_plt_section): New.
7663 (elf64_alpha_relax_section): Call them.
7664 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7665 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7666
9e756d64
RH
76672002-06-01 Richard Henderson <rth@redhat.com>
7668
7669 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7670 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7671 in shared libraries. Fix DTPRELHI and TPRELHI value.
7672 (INSN_ADDQ, INSN_RDUNIQ): New.
7673 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7674 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7675 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7676 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7677 Handle GOTDTPREL and GOTTPREL relocations.
7678 (elf64_alpha_relax_gprelhilo): New.
7679 (elf64_alpha_relax_tls_get_addr): New.
7680 (elf64_alpha_relax_find_tls_segment): New.
7681 (elf64_alpha_relax_section): Handle TLS relocations.
7682 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7683 (elf64_alpha_check_relocs): Set it.
7684
c853d7f6
RH
76852002-06-01 Richard Henderson <rth@redhat.com>
7686
b646261c
RH
7687 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7688
c853d7f6
RH
7689 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7690 check; don't suppress dynamic relocs for non-allocated sections.
7691
d7e41a96
RH
7692 * elf64-alpha.c: Remove dead code.
7693
5f333394
AM
76942002-05-31 Alan Modra <amodra@bigpond.net.au>
7695
08e0ee05
AM
7696 * bfd-in2.h: Regenerate.
7697 * libbfd.h: Regenerate.
7698 * po/SRC-POTFILES.in: Regenerate.
7699
5f333394
AM
7700 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7701 space for bss .plt.
7702
caf47ea6
AM
77032002-05-31 Graeme Peterson <gp@qnx.com>
7704
7705 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7706 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7707 Run "make dep-am".
7708 * Makefile.in: Regenerate.
7709 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7710 * configure.in: Add bfd_elf32_i386qnx_vec support.
7711 * configure: Regenerate.
7712 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7713 is_contained_by_filepos, and copy_private_bfd_data_p.
7714 * elf.c (assign_file_positions_for_segments): Call backend
7715 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7716 (IS_CONTAINED_BY_FILEPOS): Define.
7717 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7718 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7719 Fix non-K&R call to _bfd_error_handler.
7720 (_bfd_elf_copy_private_section_data): Use backend
7721 copy_private_bfd_data_p.
7722 * elf32-i386.c: Don't include elfxx-target.h when
7723 ELF32_I386_C_INCLUDED is defined.
7724 * elf32-i386qnx.c: New QNX elf backend file.
7725 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7726 elf_backend_is_contained_by_filepos, and
7727 elf_backend_do_copy_private_bfd_data.
7728 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7729
5bc56484
AM
77302002-05-31 Alan Modra <amodra@bigpond.net.au>
7731
7732 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7733 Move other similar defines to start of file.
7734
1b164155
TR
77352002-05-30 Tom Rix <trix@redhat.com>
7736
7737 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7738 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7739
3765b1be
RH
77402002-05-30 Richard Henderson <rth@redhat.com>
7741
7742 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7743 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7744 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7745 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7746 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7747 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7748 n_local_got_entries to total_got_size and local_got_size.
7749 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7750 (alpha_got_entry_size): New.
7751 (elf64_alpha_relax_with_lituse): Use it.
7752 (elf64_alpha_relax_without_lituse): Likewise.
7753 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7754 (get_got_entry): New.
7755 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7756 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7757 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7758 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7759 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7760 (elf64_alpha_calc_got_offsets): Likewise.
7761 (alpha_dynamic_entries_for_reloc): New.
7762 (elf64_alpha_calc_dynrel_sizes): Use it.
7763 (elf64_alpha_size_dynamic_sections): Likewise.
7764 (elf64_alpha_relocate_section): Handle TLS relocations.
7765 * reloc.c: Add Alpha TLS relocations.
7766 * bfd-in2.h, libbfd.h: Rebuild.
7767
5e226794
NC
77682002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7769
7770 * peXXigen.c (pe_print_idata): Remove double printed
7771 import table lines; add Bound-To comment.
7772
90ace9e9
JT
77732002-05-29 Matt Thomas <matt@3am-software.com>
7774
7775 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7776 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7777 (elf32-vax.lo): New rule.
7778 * Makefile.in: Regenerate.
7779 * configure.in (bfd_elf32_vax_vec)
7780 (vaxnetbsd_vec): New vectors.
7781 * configure: Regenerate.
7782 * config.bfd (vax-*-netbsdelf*)
7783 (vax-*-netbsdaout*)
7784 (vax-*-netbsd*): New targets.
7785 * elf32-vax.c: New file.
7786 * reloc.c: Add VAX relocations.
7787 * bfd-in2.h: Regenerate.
7788 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7789
4a253e81
JT
77902002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7791
7792 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7793 and bfd_elf32_bigarm_vec to targ_selvecs.
7794
6e7c73dd
CF
77952002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7796
7797 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7798 with auto-imported symbols.
7799
8afb0e02
NC
78002002-05-29 Adam Nemet <anemet@lnxw.com>
7801
7802 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7803 sections only record bfd.
9bab7074 7804 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7805 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7806 * bfd-in2.h: Regenerate.
8afb0e02 7807
a95653f5
NC
78082002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7809
7810 * syms.c (_bfd_stab_section_find_nearest_line): Move
7811 declaration and initialisation of saw_line and saw_func out of
7812 for loop.
7813
7cdc5bba
AM
78142002-05-29 Alan Modra <amodra@bigpond.net.au>
7815
7816 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7817 (bfd_elf64_get_symbol_info): Define.
7818 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7819
4c7aad1c
AM
78202002-05-29 Andrey Volkov <avolkov@transas.com>
7821
7822 * cpu-h8300.c: Make default h8300 machine first in machine list.
7823
d172d4ba
NC
78242002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7825
7826 * config.bfd: Added DLX configuraton.
7827 * Makefile.am: Added DLX configuraton.
7828 * configure.in: Added DLX configuraton.
7829 * archures.c: Add DLX architecure.
7830 * reloc.c: Add DLX relocs.
7831 * targets.c: Added DLX target vector.
7832 * configure: Regenerate.
7833 * Makefile.in: Regenreate.
7834 * bfd-in2.h: Regenreate.
7835 * elf32-dlx.c: New file: Support DLX target.
7836 * cpu-dlx.c: New file: Support DLX target.
7837
d1329ca3
AM
78382002-05-25 Alan Modra <amodra@bigpond.net.au>
7839
428d0de3
AM
7840 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7841
d1329ca3
AM
7842 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7843 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7844 strings to point inside function code sym string.
7845 (func_desc_adjust): Likewise.
7846 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7847
3bab7989
ML
78482002-05-24 Michal Ludvig <mludvig@suse.cz>
7849
7850 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7851 (elf64_x86_64_grok_psinfo): Added.
7852
436e8db0
NC
78532002-05-24 TAMURA Kent <kent@netbsd.org>
7854
7855 * config.bfd: Add a target for i386-netbsdpe.
7856
ea1e4b0d
AM
78572002-05-24 Alan Modra <amodra@bigpond.net.au>
7858
7859 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7860 and is_func_descriptor.
7861 (func_desc_adjust): Hide function code sym in shared libs unless
7862 there is a matching exported function descriptor sym.
7863
13ae64f3
JJ
78642002-05-23 Jakub Jelinek <jakub@redhat.com>
7865
7866 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7867 for symbols from SHF_TLS section.
7868 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7869 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7870 (map_sections_to_segments): Build PT_TLS segment if necessary.
7871 (assign_file_positions_for_segments): Likewise.
7872 (get_program_header_size): Account for PT_TLS segment.
7873 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7874 SEC_THREAD_LOCAL sections to STT_TLS.
7875 * reloc.c: Add 386 and IA-64 TLS relocs.
7876 * section.c (SEC_THREAD_LOCAL): Define.
7877 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7878 Remove.
7879 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7880 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7881 unconditionally.
7882 (struct elf_final_link_info): Add first_tls_sec.
7883 (elf_bfd_final_link): Set first_tls_sec.
7884 Compute elf_hash_table (info)->tls_segment.
7885 (elf_link_output_extsym): Handle STT_TLS symbols.
7886 (elf_link_input_bfd): Likewise.
7887 * syms.c (BSF_THREAD_LOCAL): Define.
7888 * bfd-in2.h: Rebuilt.
7889 * libbfd.h: Rebuilt.
7890 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7891 elf_i386_mkobject, elf_i386_object_p): New functions.
7892 (elf_howto_table): Add TLS relocs.
7893 (elf_i386_reloc_type_lookup): Support TLS relocs.
7894 (elf_i386_info_to_howto_rel): Likewise.
7895 (struct elf_i386_link_hash_entry): Add tls_type.
7896 (struct elf_i386_obj_tdata): New.
7897 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7898 New macros.
7899 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7900 (link_hash_newfunc): Clear tls_type.
7901 (elf_i386_check_relocs): Support TLS relocs.
7902 (elf_i386_gc_sweep_hook): Likewise.
7903 (allocate_dynrelocs): Likewise.
7904 (elf_i386_size_dynamic_sections): Likewise.
7905 (elf_i386_relocate_section): Likewise.
7906 (elf_i386_finish_dynamic_symbol): Likewise.
7907 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7908 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7909 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7910 want_tprel, want_dtpmod, want_dtprel.
7911 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7912 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7913 R_IA64_LTOFF_TPREL22.
7914 (elf_code_to_howto_index): Add TLS relocs.
7915 (elfNN_ia64_check_relocs): Support TLS relocs.
7916 (allocate_global_data_got): Account for TLS .got data.
7917 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7918 (elfNN_ia64_install_value): Supprt TLS relocs.
7919 (set_got_entry): Support TLS relocs.
7920 (elfNN_ia64_relocate_section): Likewise.
7921
c62e1cc3
NC
79222002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7923
7924 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7925 BLX reloc round the relocation up rather than down.
7926 * coff-arm.c (coff_arm_relocate_section): Likewise.
7927
c5a43a5d
L
79282002-05-21 H.J. Lu (hjl@gnu.org)
7929
7930 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7931 definition.
7932
afbe61cf
AM
79332002-05-22 Alan Modra <amodra@bigpond.net.au>
7934
7935 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7936 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7937
9c07fe7c
AM
79382002-05-22 Alan Modra <amodra@bigpond.net.au>
7939
7940 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7941 unresolved relocs.
7942 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7943
21611032
TS
79442002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7945
c5cd6d62 7946 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
7947 non-ELF targets.
7948
41241523
TS
79492002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7950
7951 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7952 an error value.
7953 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7954 return with false on error.
7955 (elf_link_input_bfd): Check reloc_emitter return value.
7956
658f2588
JT
79572002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7958
7959 * config.bfd (armeb-*-netbsdelf*): New target.
7960
c862ae31
AM
79612002-05-20 Alan Modra <amodra@bigpond.net.au>
7962
7963 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7964 at the plt call stub.
7965
6dd14845
TS
79662002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7967
7968 * cpu-mips.c (mips_compatible): Don't try to check machine
7969 compatibility.
7970
a58d9c34
TR
79712002-05-18 Tom Rix <trix@redhat.com>
7972
9b5ecbd0 7973 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 7974
ef60b7ff
AM
79752002-05-17 Alan Modra <amodra@bigpond.net.au>
7976
7977 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7978 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7979 we've already warned about an undefined symbol. Report more
7980 detail on reloc errors.
7981
a703a6ea
AM
79822002-05-17 Alan Modra <amodra@bigpond.net.au>
7983
7984 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7985 * configure.in: Invoke AM_INSTALL_LIBBFD.
7986 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7987 (install_libbfd): .. New target.
7988 (uninstall_libbfd): Likewise.
7989 (install-bfdlibLTLIBRARIES): Likewise.
7990 (uninstall-bfdlibLTLIBRARIES): Likewise.
7991 (bfdlibdir): New.
7992 (bfdincludedir): New.
7993 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7994 * aclocal.m4: Regenerate.
7995 * configure: Regenerate.
7996 * Makefile.in: Regenerate.
7997
2c13d98b
NC
79982002-05-17 Stuart Balfour <sbalfour@cisco.com>
7999
8000 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8001 hash loop.
8002
629936c5
NC
80032002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8004
8005 * config.bfd: Add targets for sh64-linux (little endian and
8006 big endian).
8007
e4cf60a8
NC
80082002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8009
8010 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8011 is located in the same section as the import table. Instead
8012 check, and if necessary load the section containing the thunk.
8013
d1e66cd4
NC
80142002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8015
8016 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8017 bfd_bread.
8018 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8019 with bfd_bread.
d1e66cd4 8020
2d653fc7
AM
80212002-05-15 Alan Modra <amodra@bigpond.net.au>
8022
8023 * aix5ppc-core.c: Warning fixes.
8024 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8025 * aout-target.h (MY_bfd_link_just_syms): Define.
8026 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8027 * bfd.c (bfd_link_just_syms): Define.
8028 * binary.c (binary_bfd_link_just_syms): Define.
8029 * bout.c (b_out_bfd_link_just_syms): Define.
8030 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8031 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8032 * coffcode.h (coff_bfd_link_just_syms): Define.
8033 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8034 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8035 (_bfd_elf_link_just_syms): Declare.
8036 * elf.c (_bfd_elf_link_just_syms): New function.
8037 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8038 sections haven't already been discarded by the linker.
8039 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8040 sections and SEC_MERGE sections.
8041 (elf_bfd_discard_info): Similarly here.
8042 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8043 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8044 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8045 * ieee.c (ieee_bfd_link_just_syms): Define.
8046 * ihex.c (ihex_bfd_link_just_syms): Define.
8047 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8048 (_bfd_generic_link_just_syms): Declare.
8049 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8050 * linker.c (_bfd_generic_link_just_syms): New function.
8051 * mmo.c (mmo_bfd_link_just_syms): Define.
8052 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8053 * oasys.c (oasys_bfd_link_just_syms): Define.
8054 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8055 * som.c (som_bfd_link_just_syms): Define.
8056 * srec.c (srec_bfd_link_just_syms): Define.
8057 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8058 (BFD_JUMP_TABLE_LINK): And here.
8059 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8060 * versados.c (versados_bfd_link_just_syms): Define.
8061 * vms.c (vms_bfd_link_just_syms): Define.
8062 * libbfd.h: Regenerate.
8063 * bfd-in2.h: Regenerate.
8064
cb7394f2
TS
80652002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8066
8067 * elf32-mips.c: Remove superfluous definitions copied from
8068 elfxx-mips.c.
8069 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8070 SGIish vectors to check the special case.
8071 (mips_elf_hi16_reloc): Fix comment.
8072 (mips_elf_got16_reloc): Likewise.
8073 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8074 (elf_reloc_map): Code cleanup.
8075 (mips_reloc_map): Add comment.
8076 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8077 (mips_elf32_rtype_to_howto): Likewise.
8078 (mips_elf32_discard_info): Likewise.
8079 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8080 lead to IRIX compatibility now.
8081
8dc1a139
TS
80822002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8083
8084 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8085
2051e1b5
JT
80862002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8087
8088 * config.bfd (shle-*-netbsdelf*): Add target which includes
8089 sh64 support.
8090
83954261
AM
80912002-05-13 David Edelsohn <edelsohn@gnu.org>
8092
8093 * configure.in: Revert 2002-04-07. Instead, auto-configure
8094 HAVE_ST_C_IMPL.
8095 * configure: Regenerate.
8096 * config.in: Regenerate.
8097 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8098 or AIX_5_CORE.
8099
a9bf1154
NC
81002002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8101
8102 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8103 corefiles as well.2
8104 * configure: Regenerate.
8105
3129eb7a
AM
81062002-05-13 Alan Modra <amodra@bigpond.net.au>
8107
8108 * Makefile.am (install-data-local): Install headers to
8109 $(exec_prefix)/include.
8110 * Makefile.in: Regenerate.
8111
a9a32010
DJ
81122002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8113 Daniel Jacobowitz <drow@mvista.com>
8114
8115 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8116 map BFD_RELOC_RVA.
8117
81182002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8119
8120 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8121 hppa*-*-openbsd*): New targets.
8122 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8123 * configure: Regenerate.
8124
f1f0d9ab
TR
81252002-05-10 Tom Rix <trix@redhat.com>
8126
ea1e4b0d 8127 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8128 xcoff64_ppc_relocate_section.
8129 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8130 * libxcoff.h: Common xcoff_reloc_type function declaration.
8131
c432ba1a
AM
81322002-05-10 Alan Modra <amodra@bigpond.net.au>
8133
16a10388 8134 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8135 added in 2002-05-09 commit.
16a10388 8136
c432ba1a
AM
8137 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8138 don't look for stubs on all undefined syms.
8139
4a335f3d
AM
81402002-05-09 Alan Modra <amodra@bigpond.net.au>
8141
8fc39d5d
AM
8142 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8143 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8144 pcrel_offset.
8145
4a335f3d
AM
8146 * elf32-i386.c (elf_howto_table): Comments.
8147 (elf_i386_relocate_section): Handle more relocs for relocatable
8148 linking and against SEC_MERGE sections.
8149
41fcb14e
AM
81502002-05-08 Alan Modra <amodra@bigpond.net.au>
8151
8152 * elf32-ppc.c (ppc_elf_create_got): New function.
8153 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8154 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8155 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8156 _bfd_elf_create_got_section.
8157
b491616a
AM
81582002-05-07 Alan Modra <amodra@bigpond.net.au>
8159
8160 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8161 * elfxx-target.h (elf_backend_rela_normal): Define.
8162 (elfNN_bed): Init rela_normal.
8163 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8164 for section symbols here if rela_normal. Simplify abs section test.
8165 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8166 return immediately. Remove code handling relocatable linking.
8167 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8168 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8169 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8170 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8171 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8172 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8173 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8174 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8175 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8176 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8177 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8178 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8179 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8180 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8181 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8182 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8183 * elf-m10200.c (elf_backend_rela_normal): Define.
8184 * elf-m10300.c (elf_backend_rela_normal): Define.
8185 * elf32-fr30.c (elf_backend_rela_normal): Define.
8186 * elf32-i370.c (elf_backend_rela_normal): Define.
8187 * elf32-i860.c (elf_backend_rela_normal): Define.
8188 * elf32-m68k.c (elf_backend_rela_normal): Define.
8189 * elf32-mcore.c (elf_backend_rela_normal): Define.
8190 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8191 * elf32-ppc.c (elf_backend_rela_normal): Define.
8192 * elf32-s390.c (elf_backend_rela_normal): Define.
8193 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8194 * elf64-ppc.c (elf_backend_rela_normal): Define.
8195 * elf64-s390.c (elf_backend_rela_normal): Define.
8196 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8197 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8198 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8199 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8200
df212a7e
NC
82012002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8202
8203 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8204 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8205
3decf53c
AM
82062002-05-06 Alan Modra <amodra@bigpond.net.au>
8207
8208 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8209 when not relocatable. Fix reloc_emitter call for K&R.
8210
f46c2da6
AM
82112002-05-04 Alan Modra <amodra@bigpond.net.au>
8212
8213 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8214 reloading local sym addend mistakenly removed in 2002-05-01 change.
8215
8216 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8217 (read_abbrevs): Change "offset" param to bfd_vma.
8218 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8219 Change "abbrev_offset" to bfd_vma.
8220 (read_indirect_string): Use correct conversion chars in error
8221 message format string, cast bfd_vma's to unsigned long.
8222 (read_abbrevs): Likewise.
8223 (read_attribute_value): Likewise.
8224 (decode_line_info): Likewise.
8225 (scan_unit_for_functions): Likewise.
8226 (parse_comp_unit): Likewise.
8227
59862849
TR
82282002-05-04 Tom Rix <trix@redhat.com>
8229
8230 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8231 (coff_swap_reloc_out): Same.
8232 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8233 (xcoff_swap_reloc_out): Same.
8234 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8235 case some 16 bit relocs. Add reloc value to output.
8236 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8237 R_RBR. Improve names.
59862849
TR
8238 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8239 (bfd_xcoff_backend_data): Update with new reloc swap names.
8240 (bfd_pmac_xcoff_backend_data) : Same.
8241 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8242 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8243 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8244 R_POS. Add reloc value to output.
ea1e4b0d
AM
8245 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8246 bit R_RBR. Improve names, masks.
59862849
TR
8247 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8248 (bfd_xcoff_backend_data): Update with new reloc swap names.
8249 (bfd_xcoff_aix5_backend_data) : Same.
8250
b4655ea9
AM
82512002-05-04 Alan Modra <amodra@bigpond.net.au>
8252
8253 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8254 bfd_count top_index, input_list, all_local_syms.
8255 (elf32_hppa_setup_section_lists): New function, split from
8256 elf32_hppa_size_stubs.
8257 (elf32_hppa_next_input_section): Likewise.
8258 (group_sections): Likewise.
8259 (get_local_syms): Likewise.
8260 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8261 stubs on undefined syms too.
8262 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8263 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8264 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8265 (elf32_hppa_next_input_section): Declare.
8266
301e3139
AM
82672002-05-04 Bob Byrnes <byrnes@curl.com>
8268
8269 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8270 _bfd_new_bfd.
8271
7c5fcef7
L
82722002-05-03 H.J. Lu (hjl@gnu.org)
8273
8274 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8275 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8276 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8277 to hide a global symbol.
8278 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8279 forced_local to true.
7c5fcef7 8280
84de6048
RH
82812002-05-02 Richard Henderson <rth@redhat.com>
8282
8283 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8284 vs SHN_UNDEF to zero.
8285
805fc799
AM
82862002-05-02 Alan Modra <amodra@bigpond.net.au>
8287
c061c2d8
AM
8288 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8289 16 bit reloc.
8290 <R_PPC64_SECTOFF_DS>: Likewise.
8291 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8292 SECTOFF reloc.
8293 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8294 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8295 SECTOFF reloc.
8296
805fc799
AM
8297 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8298 (ppc64_elf_ha_reloc): New function.
8299 (ppc64_elf_brtaken_reloc): New function.
8300 (ppc64_elf_sectoff_reloc): New function.
8301 (ppc64_elf_sectoff_ha_reloc): New function.
8302 (ppc64_elf_toc_reloc): New function.
8303 (ppc64_elf_toc_ha_reloc): New function.
8304 (ppc64_elf_toc64_reloc): New function.
8305 (ppc64_elf_unhandled_reloc): New function.
8306 (ppc64_elf_howto_raw): Use the above.
8307 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8308 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8309 <R_PPC64_SECTOFF_DS>: Likewise.
8310 (IS_ABSOLUTE_RELOC): Update.
8311 (struct ppc_link_hash_table): Add have_undefweak.
8312 (ppc64_elf_link_hash_table_create): Init.
8313 (func_desc_adjust): Set have_undefweak.
8314 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8315 add the .sfpr blr when have_undefweak.
8316 (ppc64_elf_setup_section_lists): Check hash table flavour.
8317 (ppc64_elf_next_input_section): Move output_section->owner test to
8318 ppc64elf.em.
8319 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8320 and relocatable test. Return TOCstart and don't set elf_gp.
8321 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8322 offset calculation. Add assert on weak sym branch tweaks.
8323 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8324 (ppc64_elf_toc): Declare.
8325 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8326
818c39a3
AM
83272002-05-01 Alan Modra <amodra@bigpond.net.au>
8328
8329 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8330 file_name.
8331
721956f4
AM
83322002-05-01 Alan Modra <amodra@bigpond.net.au>
8333
8334 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8335 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8336 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8337 call branches. Correct undefined weak destination.
8338 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8339 .sfpr, and correct case where either only savef* or restf* is
8340 needed.
8341
8342 Long branch stubs, multiple stub sections.
8343 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8344 (ppc64_elf_next_input_section): Declare.
8345 * elf64-ppc.c: Move linker-only prototypes.
8346 (STUB_SUFFIX): Define.
8347 (enum ppc_stub_type): New.
8348 (struct ppc_stub_hash_entry): New.
8349 (struct ppc_branch_hash_entry): New.
8350 (struct ppc_link_hash_entry): Add stub_cache, oh.
8351 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8352 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8353 Rename plt_overflow to stub_error.
8354 (ppc_stub_hash_lookup): Define.
8355 (ppc_branch_hash_lookup): Define.
8356 (stub_hash_newfunc): New function.
8357 (branch_hash_newfunc): New function.
8358 (link_hash_newfunc): Init new fields.
8359 (ppc64_elf_link_hash_table_create): Likewise.
8360 (ppc64_elf_link_hash_table_free): New function.
8361 (ppc_stub_name): New function.
8362 (ppc_get_stub_entry): New function.
8363 (ppc_add_stub): New function.
8364 (create_linkage_sections): Use bfd_make_section_anyway. Create
8365 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8366 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8367 and set up for plt call stubs. Link func and func desc syms.
8368 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8369 (func_desc_adjust): Avoid hash lookup when func desc sym available
8370 via shortcut, and set links when processing.
8371 (ppc64_elf_hide_symbol): Likewise.
8372 (allocate_dynrelocs): Don't allocate stub section here.
8373 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8374 Remove sstub code.
8375 (ppc_type_of_stub): New function.
8376 (build_one_stub): Delete.
8377 (ppc_build_one_stub): New function.
8378 (ppc_size_one_stub): New function.
8379 (ppc64_elf_setup_section_lists): New function.
8380 (ppc64_elf_next_input_section): New function.
8381 (group_sections): New function.
8382 (get_local_syms): New function.
8383 (ppc64_elf_size_stubs): Rewrite.
8384 (ppc64_elf_build_stubs): Rewrite.
8385 (ppc64_elf_relocate_section): Look up stub entry for REL24
8386 relocs. Don't propagate REL14* to dynamic objects. Look for long
8387 branch stubs if REL14* or REL24 relocs won't reach.
8388 (bfd_elf64_bfd_link_hash_table_free): Define.
8389
09c2219b
MM
83902002-04-30 Mark Mitchell <mark@codesourcery.com>
8391
c5cd6d62 8392 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8393
07b678c0
TR
83942002-04-30 Tom Rix <trix@redhat.com>
8395
8396 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8397 symbol names into the hash table.
8398
dbe341c6
TR
83992002-04-28 Tom Rix <trix@redhat.com>
8400
8401 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8402 calulating relocations.
dbe341c6 8403 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8404 (xcoff_ppc_relocate_section): Use relocation and complain function
8405 tables.
8406 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8407 (xcoff_complain_overflow_signed_func): Same.
8408 (xcoff_complain_overflow_bitfield_func): Same.
8409 (xcoff_complain_overflow_dont_func): Same.
8410 (xcoff_reloc_type_crel): New recot function.
8411 (xcoff_reloc_type_br): Same.
8412 (xcoff_reloc_type_ba): Same.
8413 (xcoff_reloc_type_toc): Same.
8414 (xcoff_reloc_type_rel): Same.
8415 (xcoff_reloc_type_neg): Same.
8416 (xcoff_reloc_type_pos): Same.
8417 (xcoff_reloc_type_fail): Same.
8418 (xcoff_reloc_type_noop): Same.
8419 * libxcoff.h : Declare common parts for xcoff64.
8420 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8421 and complain function tables.
dbe341c6 8422
985142a4
AM
84232002-04-28 Alan Modra <amodra@bigpond.net.au>
8424
8425 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8426 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8427
eba91044
AM
84282002-04-26 Alan Modra <amodra@bigpond.net.au>
8429
e54fdaa5
AM
8430 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8431 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8432
a50c1845
AM
8433 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8434 same as the output before calling elf_link_input_bfd.
8435
eba91044
AM
8436 * coffcode.h (coff_compute_section_file_positions): Set
8437 section_tail after shuffling section list.
8438
3c25c5f6
NC
84392002-04-24 Christian Groessler <chris@groessler.org>
8440
8441 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8442 addresses are 23bit with a special layout, not plain 32bit
8443 values. Prevent relocation of immediate values.
8444
40d32fc6
CD
84452002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8446
8447 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8448 MIPS-16 ASE flags are set, print something to indicate that.
8449
067fa4a6
AM
84502002-04-23 Alan Modra <amodra@bigpond.net.au>
8451
8452 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8453 under which a plt call stub is used.
8454 (final_link_relocate): Similarly.
8455 (allocate_plt_static): Clear h-plabel except when plt entry is
8456 exclusively used for a plabel.
8457 (allocate_dynrelocs): Use the above to simplify plt sizing.
8458 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8459 (elf32_hppa_link_hash_table_create): Init.
8460 (BL22_RP): Define.
8461 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8462 (elf32_hppa_check_relocs): Set has_22bit_branch.
8463
8464 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8465 (final_link_relocate): Likewise.
8466
af40ce3c
JJ
84672002-04-22 Jakub Jelinek <jakub@redhat.com>
8468
8469 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8470 search table if some FDE is DW_EH_PE_aligned encoded either.
8471 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8472
09ae86c2
JJ
84732002-04-22 Richard Smith <richard@ex-parrot.com>
8474 Jakub Jelinek <jakub@redhat.com>
8475
8476 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8477 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8478 encoded personality.
8479 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8480 for CIE/FDE removal.
8481
deeb2cd7
TR
84822002-04-20 Tom Rix <trix@redhat.com>
8483
8484 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8485
99dc0092
AM
84862002-04-20 Alan Modra <amodra@bigpond.net.au>
8487
aa3d5824
AM
8488 * archures.c (bfd_lookup_arch): Move the list order comment..
8489 (struct bfd_arch_info): ..to where it belongs.
8490 * bfd-in2.h: Regenerate.
8491
99dc0092
AM
8492 * archures.c (bfd_lookup_arch): Add comment on list order.
8493 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8494 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8495 is always at head of list.
8496
7831a775
NC
84972002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8498
8499 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8500 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8501 definition of these functions for ARM_WINCE builds as they are
8502 not used.
ea1e4b0d 8503 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8504 for ARM_WINCE builds.
8505
85062002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8507
ea1e4b0d 8508 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8509
85102002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8511
8512 * cpu-sh.c (scan_mach): Delete.
8513 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8514 (bfd_sh_arch): Likewise.
8515
3d8dbe36
NC
85162002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8517
8518 * ihex.c (ihex_write_object_contents): Fix check for records
8519 crossing 64K boundaries.
8520
4ab82700
AM
85212002-04-16 Alan Modra <amodra@bigpond.net.au>
8522
8523 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8524 type rather than just assuming entries are ELF.
8525 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8526 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8527 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8528 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8529 rather than elf_link_hash_entry.
8530
036fe0fe
RH
85312002-04-15 Richard Henderson <rth@redhat.com>
8532
8533 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8534 n32 binaries.
8535
c4f3d130
NC
85362002-04-15 Michael Snyder <msnyder@redhat.com>
8537
8538 * opncls.c (bfd_close): Write contents if writeable.
8539 Minor formatting tidy-ups.
8540
4ab82700 85412002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8542
8543 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8544
0c04d169
MS
85452002-04-12 Michael Snyder <msnyder@redhat.com>
8546
8547 * bfd-in.h (bfd_get_section_lma): New access macro.
8548 Minor white-space fix-up.
8549
89d4966f
AM
85502002-04-12 Alan Modra <amodra@bigpond.net.au>
8551
8552 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8553 header pad.
8554
8d0da3c2
DD
85552002-04-09 DJ Delorie <dj@redhat.com>
8556
8557 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8558
05793179
NC
85592002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8560
8561 * coffcode.h (coff_read_word): New.
8562 (coff_compute_checksum): New.
8563 (coff_apply_checksum): New.
8564 (coff_write_object_contents): Call coff_apply_checksum () to
8565 apply checksum to PE image.
8566
46fe4e66
AM
85672002-04-08 Randolph Chung <tausq@debian.org>
8568
8569 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8570 (elf32_hppa_final_link): Split out sorting logic to..
8571 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8572 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8573
3b5b409c
AC
85742002-04-07 Andrew Cagney <ac131313@redhat.com>
8575
8576 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8577 pattern.
8578 * configure: Re-generate.
8579
ac7b6ceb
AC
85802002-04-07 Andrew Cagney <ac131313@redhat.com>
8581
8582 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8583 is greater or equal to 4.3.3.
8584 * configure: Regenerate.
8585 Fix PR gdb/344.
8586
44aa49bb
HPN
85872002-04-05 Hans-Peter Nilsson <hp@axis.com>
8588
8589 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8590 R_CRIS_32_PCREL>: Fix typo in name.
8591 (cris_elf_check_relocs): Always create .rela.got here when
8592 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8593 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8594 assume it's created.
8595
e2d34d7d
DJ
85962002-04-04 Daniel Jacobowitz <drow@mvista.com>
8597
8598 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8599 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8600 define.
8601 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8602 * bfd.c (bfd_link_hash_table_free): Define.
8603 * binary.c (binary_bfd_link_hash_table_free): Define.
8604 * bout.c (b_out_bfd_link_hash_table_free): Define.
8605 * coff-rs6000.c (rs6000coff_vec): Include
8606 _bfd_generic_link_hash_table_free.
8607 (pmac_xcoff_vec): Likewise.
8608 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8609 (aix5coff64_vec): Likewise.
8610 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8611 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8612 (bfd_elf32_bfd_link_hash_table_free): Define.
8613 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8614 (bfd_elf32_bfd_link_hash_table_free): Define.
8615 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8616 define.
8617 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8618 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8619 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8620 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8621 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8622 (_bfd_generic_link_hash_table_free): Add prototype.
8623 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8624 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8625 * linker.c (_bfd_generic_link_hash_table_free): New function.
8626 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8627 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8628 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8629 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8630 * som.c (som_bfd_link_hash_table_free): Define.
8631 * srec.c (srec_bfd_link_hash_table_free): Define.
8632 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8633 * versados.c (versados_bfd_link_hash_table_free): Define.
8634 * vms.c (vms_bfd_link_hash_table_free): New function.
8635 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8636
8637 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8638 instead of bfd_alloc.
8639 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8640 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8641 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8642 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8643 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8644 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8645 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8646 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8647 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8648 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8649 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8650 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8651 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8652 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8653 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8654 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8655 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8656 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8657 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8658 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8659 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8660 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8661 * m68klinux.c (linux_link_hash_table_create): Likewise.
8662 * sparclinux.c (linux_link_hash_table_create): Likewise.
8663 * sunos.c (sunos_link_hash_table_create): Likewise.
8664 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8665
8666 * targets.c: Add _bfd_link_hash_table_free to xvec.
8667
8668 * bfd-in2.h: Regenerate.
8669 * libbfd.h: Regenerate.
8670 * libcoff.h: Regenerate.
8671
830629ab
AM
86722002-04-04 Alan Modra <amodra@bigpond.net.au>
8673
8674 * dep-in.sed: Cope with absolute paths.
8675 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8676 Run "make dep-am".
8677 * Makefile.in: Regenerate.
8678 * coff-arm.c: Fix copyright date.
8679 * cpu-h8300.c: Likewise.
8680 * cpu-i370.c: Likewise.
8681 * cpu-s390.c: Likewise.
8682 * cpu-mips.c: Likewise.
8683 * po/SRC-POTFILES.in: Regenerate.
8684
c6e90b02
TS
86852002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8686
8687 * Makefile.am: Add elfxx-mips.c to the known backends.
8688 (elf32-mips.lo): remove dependency to coff/external.h.
8689 * Makefile.in: Regenerate.
8690 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8691 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8692 accordingly.
8693 * configure: Regenerate.
8694 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8695 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8696 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8697 MIPS specific backend functions.
8698 * elf32-mips.c: Moved most code to elfxx-mips.c.
8699 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8700 static.
8701 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8702 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8703 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8704 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8705 interface to allow selection of the right REL or RELA howto table.
8706 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8707 static. Let it refuse n32 objects.
8708 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8709 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8710 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8711 (elf32_mips_ignore_discarded_relocs): Rename from
8712 _bfd_elf32_mips_ignore_discarded_relocs.
8713 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8714 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8715 (elf_mips_howto_table_rela): Remove.
8716 * elf64-mips.c: Moved most code to elfxx-mips.c.
8717 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8718 (mips_elf64_rtype_to_howto): New function.
8719 (mips_elf64_object_p): Likewise.
8720 (elf64_mips_irix_compat): Likewise.
8721 * elfxx-mips.c: New file containing common code merged together from
8722 elf32-mips.c and elf64-mips.c.
8723 * elfxx-mips.h: New file containing MIPS specific prototypes from
8724 elf-bfd.h.
8725 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8726 elf_backend_mips_rtype_to_howto.
8727
d8dce692
AM
87282002-04-04 Alan Modra <amodra@bigpond.net.au>
8729
8730 * srec.c (MAXCHUNK, Chunk): Revise comments.
8731 (srec_write_record): Correct buffer size.
8732 (srec_write_header): Do without intermediate buffer.
8733 (srec_write_section): Validate Chunk.
8734 (srec_write_terminator): Pass NULL instead of dummy buffer.
8735 (srec_write_symbols): Pass file and symbol names directly to
8736 bfd_bwrite so sprintf won't overflow buffer.
8737
b88a866a
JJ
87382002-04-03 Jakub Jelinek <jakub@redhat.com>
8739
8740 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8741 PC relative relocs against hidden symbols.
8742 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8743
d7866f04
AM
87442002-04-03 Alan Modra <amodra@bigpond.net.au>
8745
8746 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8747 LMAs, loop over segments until p_vaddr and p_memsz specify an
8748 extent enclosing the section.
8749
9e81ee67
NC
87502002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8751
8752 * ihex.c (ihex_write_object_contents): Do not allow records to
8753 cross a 64K boundary - wrap if necessary.
8754
d2b64500
JT
87552002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8756
8757 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8758 which caused the returned LWP ID to always be 0.
8759
e36f7d53
RH
87602002-04-01 Richard Henderson <rth@redhat.com>
8761
8762 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8763 (elf32_sparc_relocate_section): Use it to figure out when to
8764 initialize .got entries.
8765 * elf64-sparc.c: Similarly.
8766
e92d460e
AM
87672002-03-28 Alan Modra <amodra@bigpond.net.au>
8768
8769 * linker.c (link_action): Ignore duplicate warning syms.
8770 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8771 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8772 (elf_adjust_dynamic_symbol): Likewise.
8773 (elf_export_symbol): Likewise.
8774 (elf_link_find_version_dependencies): Likewise.
8775 (elf_link_assign_sym_version): Likewise.
8776 (elf_link_sec_merge_syms): Likewise.
8777 (elf_link_output_extsym): Likewise.
8778 (elf_gc_sweep_symbol): Likewise.
8779 (elf_gc_propagate_vtable_entries_used): Likewise.
8780 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8781 (elf_gc_allocate_got_offsets): Likewise.
8782 (elf_collect_hash_codes): Likewise.
8783 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8784 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8785 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8786 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8787 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8788 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8789 (elf_cris_discard_excess_dso_dynamics): Likewise.
8790 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8791 (mark_PIC_calls): Likewise.
8792 (allocate_plt_static): Likewise.
8793 (allocate_dynrelocs): Likewise.
8794 (readonly_dynrelocs): Likewise.
8795 * elf32-i386.c (allocate_dynrelocs): Likewise.
8796 (readonly_dynrelocs): Likewise.
8797 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8798 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8799 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8800 (mips_elf_sort_hash_table_f): Likewise.
8801 (mips_elf_check_mips16_stubs): Likewise.
8802 * elf32-s390.c (allocate_dynrelocs): Likewise.
8803 (readonly_dynrelocs): Likewise.
8804 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8805 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8806 (xstormy16_relax_plt_realloc): Likewise.
8807 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8808 (elf64_alpha_output_extsym): Likewise.
8809 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8810 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8811 (mips_elf64_check_mips16_stubs): Likewise.
8812 (mips_elf64_output_extsym): Likewise.
8813 * elf64-ppc.c (func_desc_adjust): Likewise.
8814 (allocate_dynrelocs): Likewise.
8815 (readonly_dynrelocs): Likewise.
8816 * elf64-s390.c (allocate_dynrelocs): Likewise.
8817 (readonly_dynrelocs): Likewise.
8818 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8819 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8820 (readonly_dynrelocs): Likewise.
8821 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8822 * aoutx.h (aout_link_write_other_symbol): Likewise.
8823 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8824 (_bfd_coff_write_global_sym): Likewise.
8825 * i386linux.c (linux_tally_symbols): Likewise.
8826 * m68klinux.c (linux_tally_symbols): Likewise.
8827 * sparclinux.c (linux_tally_symbols): Likewise.
8828 * pdp11.c (aout_link_write_other_symbol): Likewise.
8829 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8830 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8831 (xcoff_write_global_symbol): Likewise.
8832
8833 * cofflink.c (_bfd_coff_final_link): Formatting.
8834 * cpu-mips.c (mips_compatible): Make static, prototype.
8835 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8836 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8837 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8838 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8839 (mips_elf64_final_link): Likewise.
8840 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8841 prototype.
8842
2106126f
NC
88432002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8844
8845 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8846 (SWAP_OUT_RELOC_OFFSET): Define.
8847
b99d1833
AM
88482002-03-27 Gregory Steuck <greg@nest.cx>
8849
8850 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8851 terminating NULL if empty symbol table.
8852 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8853
ad43ed4c
L
88542002-03-26 H.J. Lu (hjl@gnu.org)
8855
8856 * elflink.h (elf_link_input_bfd): Revert the last change since
8857 the gcc exception handling isn't fixed yet.
8858
3851fca4
L
88592002-03-26 H.J. Lu (hjl@gnu.org)
8860
8861 * elflink.h (elf_link_input_bfd): Complain about relocations
8862 against local symbols in discarded sections.
8863
b91afed7
AM
88642002-03-26 Alan Modra <amodra@bigpond.net.au>
8865
8866 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8867
dba143ef
AM
88682002-03-23 Alan Modra <amodra@bigpond.net.au>
8869
8870 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8871 section file offset for !SEC_LOAD sections.
8872
ee29b9fb
RE
88732002-03-21 Richard Earnshaw <rearnsha@arm.com>
8874
830629ab
AM
8875 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8876 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 8877
54327882
AM
88782002-03-21 Alan Modra <amodra@bigpond.net.au>
8879
8880 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8881 Whitespace changes.
8882 * archive.c: Update copyright date.
8883 * bfd-in2.h: Regenerate.
8884 * libbfd.h: Regenerate.
8885 * Makefile.am: Run "make dep-am"
8886 * Makefile.in: Regenerate.
8887 * po/SRC-POTFILES.in: Regenerate.
8888
1ee24f27
DJ
88892002-03-20 Daniel Jacobowitz <drow@mvista.com>
8890
8891 * dwarf2.c (struct funcinfo): Move up.
8892 (lookup_address_in_function_table): New argument function_ptr.
8893 Set it.
8894 (lookup_address_in_line_table): New argument function. If function
8895 is non-NULL, use it to handle ``addr'' before the first line note of
8896 the function.
8897 (comp_unit_find_nearest_line): Update and swap calls to
8898 lookup_address_in_function_table and lookup_address_in_line_table.
8899 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8900 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8901
51b9608c
TR
89022002-03-20 Tom Rix <trix@redhat.com>
8903
ea1e4b0d 8904 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 8905 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 8906 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 8907
789c90aa
TR
89082002-03-19 Tom Rix <trix@redhat.com>
8909
ea1e4b0d 8910 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
8911 dynamic objects in archives.
8912
1da54d81
HPN
89132002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8914
8915 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8916 STT_NOTYPE symbols to STT_OBJECT.
8917
7831a775 89182002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
8919
8920 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8921
eb1e0e80
NC
89222002-03-18 Tom Rix <trix@redhat.com>
8923
8924 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8925 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8926 * coff-rs6000 (do_pad) : New function for archive padding.
8927 (do_copy) : New function for object file copying in archives.
8928 (do_shared_object_padding) : New function for padding shared
8929 objects to their text section alignment in archives.
8930 (bfd_xcoff_ar_achive_set_magic) : Stub.
8931 (xcoff_write_armap_big) : Use do_copy and do_pad.
8932 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8933 do_copy and do_pad.
8934 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 8935 bfd_xcoff_magic_number.
eb1e0e80
NC
8936 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8937 fop.
8938 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8939 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8940 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8941 * rs6000-core.c : Update copyright date.
ea1e4b0d 8942 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
8943 csectpp.
8944 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8945 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8946 (coff_set_flags) : Use bfd_xcoff_magic_number.
8947 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8948 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8949 * Makefile.am : Same.
8950 * config.bfd : Same.
8951 * targets.c : Same.
8952 * configure : Regnerate.
8953 * Makefile.in : Same.
8954 * bfd-in2.h : Same.
8955
a1c259a1
NC
89562002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8957
8958 * po/fr.po: Updated version.
8959
4dae1ae7
AM
89602002-03-18 Alan Modra <amodra@bigpond.net.au>
8961
8962 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8963 * libbfd.h: Regenerate.
8964 * archive.c (coff_write_armap): Pass on failures from
8965 bfd_write_bigendian_4byte_int.
8966
36b4f6e7
L
89672002-03-14 H.J. Lu <hjl@gnu.org>
8968
8969 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8970 error to bfd_error_nonrepresentable_section for reinit_array
8971 section in DSO.
8972
a1aefc76
NC
89732002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8974
a181be0a
NC
8975 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8976 OR it in rather than replacing previously selected flags.
8977
a1aefc76
NC
8978 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8979 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8980
c119f9b8
AM
89812002-03-14 Alan Modra <amodra@bigpond.net.au>
8982
8983 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8984 (N): Use the above.
8985 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8986 ensure reloc size matches before calling elf_link_input_bfd.
8987 Add an assert to check reloc size when counting output relocs.
8988
c295a511
NC
89892002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8990
8991 * mmo.c (mmo_get_loc): Return NULL rather than false.
8992
9ce88e60
NC
89932002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8994
8995 * po/fr.po: Updated version.
8996
4ddafab0
AM
89972002-03-13 Alan Modra <amodra@bigpond.net.au>
8998
b74fa2cd
AM
8999 * archures.c (bfd_default_compatible): Test bits_per_word.
9000 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9001 bfd_default_compatible.
9002 * cpu-i370.c (i370_compatible): Likewise.
9003 * cpu-sparc.c (sparc_compatible): Likewise.
9004 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9005
40b829d4
AM
9006 * elflink.h: Formatting fixes.
9007 (elf_link_output_extsym): Merge undefined and undef weak cases.
9008
4ddafab0
AM
9009 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9010 when word size of input matches output word size.
9011
dd53c801
AJ
90122002-03-12 Andreas Jaeger <aj@suse.de>
9013
9014 * cpu-i386.c (i386_compatible): New. Use it instead of
9015 bfd_default_compatible.
9016
aa066ac8
L
90172002-03-07 H.J. Lu (hjl@gnu.org)
9018
9019 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9020 as the type for bfd_reloc_val.
9021
1bf42538
JL
90222002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9023
9024 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9025 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9026 (elf_hppa_final_link_relocate): Correct relocations for indirect
9027 references to local data through the DLT. Fix .opd creation for
9028 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9029 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9030 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9031 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9032 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9033 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9034 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9035
86eaf01e
JJ
90362002-03-05 Jakub Jelinek <jakub@redhat.com>
9037
9038 * merge.c (_bfd_merge_sections): Don't segfault if there
9039 is nothing to merge due to GC.
9040
c44233aa
AM
90412002-03-05 Alan Modra <amodra@bigpond.net.au>
9042
039cc25f
AM
9043 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9044 symbols that have been forced local.
9045
c44233aa
AM
9046 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9047 to output forced local syms for non-shared link.
9048 (elf_link_output_extsym): Tweak condition for calling backend
9049 adjust_dynamic_symbol so that previous behaviour is kept.
9050 Whitespace changes throughout file.
9051
25e27870
L
90522002-03-04 H.J. Lu <hjl@gnu.org>
9053
9054 * elf.c (bfd_section_from_shdr): Handle special sections,
9055 .init_array, .fini_array and .preinit_array.
9056 (elf_fake_sections): Likewise.
9057
9058 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9059 DT entry only if the section is in output for .init_array,
9060 .fini_array and .preinit_array. Complain about .preinit_array
9061 section in DSO.
9062 (elf_bfd_final_link): Warn zero size for .init_array,
9063 .fini_array and .preinit_array sections.
9064
9065 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9066 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9067 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9068 .preinit_array.
9069
bb2a49f2
AM
90702002-03-04 Alan Modra <amodra@bigpond.net.au>
9071
9072 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9073 * configure: Regenerate.
9074
38487e5e
TR
90752002-03-02 Tom Rix <trix@redhat.com>
9076
c44233aa
AM
9077 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9078 symbolic equiv.
38487e5e
TR
9079 * coff-rs6000.c (xcoff_howto_table): Same.
9080
30831527
RH
90812002-03-01 David Mosberger <davidm@hpl.hp.com>
9082
9083 * elflink.h (size_dynamic_sections): If section named
9084 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9085 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9086 ".init_array" and ".fini_array".
9087 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9088 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9089 DT_FINI_ARRAY.
9090
c8e5ddc8
AM
90912002-02-26 Andrew Macleod <amacleod@cygnus.com>
9092
9093 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9094 dynsyms.
9095
96e0dda4
AM
90962002-02-25 Alan Modra <amodra@bigpond.net.au>
9097
1c5b6bf8
AM
9098 * elf64-hppa.h: Update copyright date.
9099
96e0dda4
AM
9100 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9101 (ppc64_elf_relocate_section): Don't generate power4 style branch
9102 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9103
0fb19cbc
JJ
91042002-02-22 Jakub Jelinek <jakub@redhat.com>
9105
9106 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9107 last patch.
9108 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9109
c434dee6
AJ
91102002-02-21 Andreas Jaeger <aj@suse.de>
9111
9112 * elf64-x86-64.c: Major rework that introduces all recent changes
9113 to the x86-64 backend. Get a closer match to elf32-i386.
9114 (struct elf64_x86_64_dyn_relocs): Rename from
9115 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9116 all users.
9117 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9118 sections.
9119 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9120 remove casts, initialize new hash members.
9121 (create_got_section): New.
9122 (elf64_x86_64_create_dynamic_sections): New.
9123 (elf64_x86_64_copy_indirect_symbol): New.
9124 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9125 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9126 Reference count possible .plt and .got entries. Don't test input
9127 section SEC_READONLY here to try to avoid copy relocs, and keep
9128 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9129 DF_TEXTREL here. Delay setting of variables until needed. Cache
9130 pointer to "sreloc" section in elf_section_data. Tweak condition
9131 under which .got created. Report files with bad relocation
9132 section names.
9133 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9134 Reference count possible .plt entries. Don't deallocate .got and
9135 .relgot space here.
9136 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9137 do copy reloc processing for weakdefs. Remove redundant casts and
9138 aborts. Delay setting of vars until needed. Move creation of
9139 dynamic symbols and allocation of .plt and .rela.plt to
9140 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9141 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9142 (allocate_dynrelocs): New.
9143 (readonly_dynrelocs): New.
9144 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9145 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9146 Zero out the dynamic allocated content space.
9147 (elf64_x86_64_discard_copies): Removed.
9148 (elf64_x86_64_relocate_section): Make use of dynamic section
9149 short-cuts. Localise vars, and delay setting. Better error
9150 reporting, replace BFD_ASSERT with abort. Check
9151 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9152 regular object file and tread the weak definition as the normal
9153 one. Don't discard relocs for undefweak or undefined symbols and
9154 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9155 relocs.
9156 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9157 symbols that have been forced local. Use same test to decide if
9158 we can use a relative reloc for got as relocate_section. Expand
9159 SHN_UNDEF comment. Move expressions out of function calls.
9160 Replace BFD_ASSERT with abort.
9161 (bfd_elf64_bfd_final_link): Removed.
9162 (elf_backend_copy_indirect_symbol): Define.
9163
ff3a6ee3
TR
91642002-02-20 Tom Rix <trix@redhat.com>
9165
9166 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9167 (_bfd_xcoff_reloc_type_lookup): Use it.
9168 * coff64-rs6000.c (xcoff64_howto_table): Same.
9169 (xcoff64_reloc_type_lookup): Same.
c434dee6 9170
a68d41fb
AM
91712002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9172
9b5ecbd0 9173 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9174 little endian.
9175
befc3abb
MS
91762002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9177
9178 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9179 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9180 * bfd-in2.h: Regenerate.
9181 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9182 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9183 with "s390:64-bit".
9184 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9185 (elf_s390_reloc_type_lookup): Likewise.
9186 (elf_s390_check_relocs): Likewise.
9187 (elf_s390_gc_sweep_hook): Likewise.
9188 (elf_s390_relocate_section): Likewise.
9189 (elf_s390_object_p): Use renamed architecture define.
9190 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9191
6eeeec9b
FCE
91922002-02-19 Frank Ch. Eigler <fche@redhat.com>
9193
9194 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9195
0bb2d96a
JJ
91962002-02-19 Jakub Jelinek <jakub@redhat.com>
9197
9198 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9199 absptr -> pcrel optimization for shared libs.
9200 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9201 library cannot be converted to pcrel.
9202 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9203 relative.
9204 * elf32-i386.c (elf_i386_relocate_section): If
9205 _bfd_elf_section_offset returned -2, skip, but make sure the
9206 relocation is installed.
9207 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9208 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9209 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9210 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9211 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9212 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9213 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9214 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9215 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9216 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9217 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9218 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9219 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9220 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9221 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9222 _bfd_elf_section_offset returning -2 the same way as -1.
9223 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9224 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9225 and BFD_ASSERT.
9226 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9227
69f284c7
TR
92282002-02-18 Tom Rix <trix@redhat.com>
9229
9230 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9231 (bfd_xcoff_size_dynamic_sections): Same.
9232 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9233 (bfd_xcoff_size_dynamic_sections): Same.
9234 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9235 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9236 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9237 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9238 * bfd-in2.h: Regenerate.
9239
82bd7b59
AM
92402002-02-18 Alan Modra <amodra@bigpond.net.au>
9241
9242 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9243 (struct ppc_link_hash_table): Add sfpr.
9244 (ppc64_elf_link_hash_table_create): Init it.
9245 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9246 .glink out to..
9247 (create_linkage_sections): ..here. Make .sfpr too.
9248 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9249 dynobj early.
9250 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9251 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9252 ._restf* functions, and create as needed.
9253 (func_desc_adjust): Only force_local for shared libs.
9254
ef1355e8
NC
92552002-02-18 David O'Brien <obrien@FreeBSD.org>
9256
9257 * configure.in: Bump version number post 2.12 branching.
9258 * configure: Regenerate.
9259
dfa36a69
HPN
92602002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9261
9262 * mmo.c: Correct and improve comments.
9263 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9264 zero-pad. Use input to fill up non-empty bfd buffer.
9265 (mmo_flush_chunk): New function.
9266 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9267 changed. Don't emit location specifier if VMA is same as
9268 *LAST_VMAP after omitting leading zero contents. Call
9269 mmo_flush_chunk before emitting location specifier.
9270 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9271 with mmo_write_loc_chunk calls.
9272 (mmo_internal_write_section): Call mmo_flush_chunk after
9273 mmo_write_chunk.
9274 (mmo_write_symbols_and_terminator): Move :Main to first position
9275 in symbol array. Add faked one if it does not exist if there are
9276 other symbols. Don't add it if there are no symbols at all. Move
9277 out test for value of :Main from symbol loop. Rename table
9278 fakemain to maintable and variable mainsym to fakemain.
9279
ccf00ab6
RH
92802002-02-15 Richard Henderson <rth@redhat.com>
9281
9282 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9283 section with no got matches any got. Simplify error generaion.
9284
88eaccc2
AM
92852002-02-15 Alan Modra <amodra@bigpond.net.au>
9286
fd96f80f
AM
9287 Support arbitrary length fill patterns.
9288 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9289 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9290 Call default_data_link_order.
9291 (default_fill_link_order): Delete.
9292 (default_data_link_order): New function.
9293 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9294 of bfd_fill_link_order with bfd_data_link_order.
9295 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9296 * elf64-mips.c (mips_elf64_final_link): Likewise.
9297
88eaccc2
AM
9298 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9299 Correct value returned in "end" for "0x<non-hex>".
9300
e2fd756b
NC
93012002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9302
9303 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9304 (scan): Test against 'mach' field in info structure.
9305
edd29cf9
AM
93062002-02-14 Alan Modra <amodra@bigpond.net.au>
9307
9308 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9309
1e30956e 93102002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9311
9312 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9313 EF_M68000.
9314
bf36db18
NC
93152002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9316
9317 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9318 non-zero physical addresses when adjusting the LMAs of new
9319 sections.
bf36db18 9320
189c6563
AM
93212002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9322
9323 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9324 from _bfd_elf_hppa_gen_reloc_type.
9325 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9326 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9327 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9328 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9329
e948afaf
AO
93302002-02-12 Alexandre Oliva <aoliva@redhat.com>
9331
9332 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9333 loading its contents if there's nothing to do in it.
9334
19397422
AM
93352002-02-12 Alan Modra <amodra@bigpond.net.au>
9336
0ad3a73b
AM
9337 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9338 64k boundary.
9339
19397422
AM
9340 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9341 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9342 (ppc64_elf_finish_dynamic_sections): Set values for them.
9343
51316059
MS
93442002-02-11 Michael Snyder <msnyder@redhat.com>
9345
9346 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9347 * elf.c (elfcore_grok_pstatus): Add prototype.
9348 (elfcore_grok_lwpstatus): Add prototype.
9349 (elfcore_write_lwpstatus): New function.
9350 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9351
518313c3
AO
93522002-02-11 Alexandre Oliva <aoliva@redhat.com>
9353
9354 * elf32-sh.c: Added missing prototypes.
9355 * elf32-sh64.c: Likewise.
9356 (sh_elf_align_loads): Mark unused args as such.
9357 * elf64-sh64.c: Added missing prototypes.
9358 (struct elf_sh64_link_hash_entry): Fix typo.
9359 (sh_elf64_relocate_section): Fix info argument passed to
9360 _bfd_elf_section_offset.
9361
2c73f9d8
AM
93622002-02-11 Alan Modra <amodra@bigpond.net.au>
9363
9364 * Makefile.am: "make dep-am".
9365 * Makefile.in: Regenerate.
9366 * aclocal.m4: Regenerate.
9367 * config.in: Regenerate.
9368 * configure: Regenerate.
9369
d426c6b0
DJ
93702002-02-10 Daniel Jacobowitz <drow@mvista.com>
9371
9372 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9373 variable warnings.
9374 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9375 comparison warning.
9376 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9377 cast warnings for the common case.
9378
e58ee0cd
HPN
93792002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9380
9381 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9382 vectors.
9383 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9384 vectors.
9385
7793f4d0
RH
93862002-02-09 Richard Henderson <rth@redhat.com>
9387
9388 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9389 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9390 (elf64_alpha_relocate_section): Likewise.
9391 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9392 * bfd-in2.h, libbfd.h: Rebuild.
9393
7e799044
HPN
93942002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9395
9396 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9397 that base-plus-offset reloc accounting is consistent.
9398 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9399 up to date for undefined symbols.
9400
027d73eb
EC
94012002-02-08 Eric Christopher <echristo@redhat.com>
9402
9403 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9404
9405 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9406 sections for the O32 ABI.
9407
517662d4
CD
94082002-02-08 Chris Demetriou <cgd@broadcom.com>
9409
9410 * elf32-arm.h: Fix formatting of _("...").
9411 * elf32-d10v.c: Likewise.
9412 * elf32-m68k.c: Likewise.
9413 * elf32-mips.c: Likewise.
9414
5e37cc46
NC
94152002-02-08 Ivan Guzvinec <ivang@opencores.org>
9416
9417 * coff-or32.c: Fix compile time warning messages.
9418
fbca6ad9
AO
94192002-02-08 Alexandre Oliva <aoliva@redhat.com>
9420
9421 Contribute sh64-elf.
9422 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9423 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9424 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9425 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9426 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9427 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9428 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9429 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9430 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9431 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9432 New relocs.
9433 * libbfd.h, bfd-in2.h: Rebuilt.
9434 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9435 (sh_reloc_map): Map them.
9436 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9437 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9438 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9439 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9440 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9441 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9442 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9443 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9444 datalabel_got_offset.
9445 (sh_elf_link_hash_newfunc): Initialize it.
9446 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9447 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9448 GOT and GOTOFF handling to new SHmedia relocation types. Support
9449 GOT_BIAS.
9450 (sh_elf_check_relocs): Likewise.
9451 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9452 PLT entries using movi_shori_putval. Support GOT_BIAS.
9453 (sh_elf_finish_dynamic_sections): Likewise.
9454 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9455 relocation, it's now done by the caller.
9456 (GOT_BIAS): New.
9457 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9458 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9459 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9460 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9461 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9462 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9463 sh64_elf64_hash_table): New.
9464 (sh_elf64_howto_table): Introduce new relocs.
9465 (sh_elf64_info_to_howto): Accept new PIC relocs.
9466 (sh_elf64_relocate_section): Augment the scope of
9467 seen_stt_datalabel. Support new PIC relocs.
9468 (sh_elf64_check_relocs): Support new PIC relocs.
9469 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9470 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9471 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9472 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9473 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9474 movi_shori_putval, movi_3shori_putval,
9475 sh64_elf64_create_dynamic_sections,
9476 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9477 sh64_elf64_size_dynamic_sections,
9478 sh64_elf64_finish_dynamic_symbol,
9479 sh64_elf64_finish_dynamic_sections): New.
9480 (elf_backend_create_dynamic-sections,
9481 bfd_elf64_bfd_link_hash_table_create,
9482 elf_backend_adjust_dynamic_symbol,
9483 elf_backend_size_dynamic_sections,
9484 elf_backend_finish_dynamic_symbol,
9485 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9486 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9487 elf_backend_got_header_size, elf_backend_plt_header_size):
9488 Define.
9489 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9490 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9491 match official numbers and names; moved unmaching ones to the
9492 range 0xf2-0xff.
9493 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9494 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9495 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9496 sections.
9b5ecbd0 9497 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9498 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9499 be aligned.
9500 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9501 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9502 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9503 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9504 .cranges section with SEC_SORT_ENTRIES set.
9505 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9506 incoming sorted .cranges section.
9507 (sh64_bfd_elf_copy_private_section_data): New.
9508 (sh64_elf_final_write_processing): Only sort .cranges and modify
9509 start address if called by linker.
9510 2001-01-08 Ben Elliston <bje@redhat.com>
9511 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9512 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9513 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9514 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9515 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9516 line. Add comments before all entries.
9517 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9518 comment.
9519 (sh_elf64_reloc): Correct head comment.
9520 (sh_elf64_relocate_section): Correct spacing.
9521 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9522 instead call reloc_dangerous callback.
9523 <case R_SH_SHMEDIA_CODE>: New case.
9524 (sh_elf64_gc_mark_hook): Correct spacing.
9525 (sh_elf64_check_relocs): Ditto.
9526 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9527 New case.
9528 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9529 functions.
9530 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9531 clarify describing comment. Add comments before all entries.
9532 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9533 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9534 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9535 Sort .cranges section in final link. Prepare to set bit 0 on
9536 entry address.
9537 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9538 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9539 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9540 .cranges section.
9541 (sh64_backend_section_from_shdr): New, to recognize
9542 SHT_SH5_CR_SORTED on incoming .cranges section.
9543 (elf_backend_section_from_shdr): Define.
9544 (sh64_elf_final_write_processing): Sort outgoing .cranges
9545 section. (New, temporarily disabled:) Set bit 0 on entry address
9546 according to ISA type.
9547 (sh64_find_section_for_address): New.
9548 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9549 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9550 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9551 bfd_malloc, not xmalloc.
9552 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9553 global.
9554 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9555 temporarily disabled) setting bit 0 on entry address.
9556 (elf_backend_final_write_processing): Define.
9b5ecbd0 9557 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9558 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9559 be a proper relocation for PTA and PTB rather than a marker.
9560 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9561 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9562 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9563 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9564 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9565 Zero src_mask.
9566 * elf64-sh64.c: Ditto.
9567 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9568 * elf32-sh64.c: Include opcodes/sh64-opc.h
9569 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9570 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9571 parameters. No unused parameters. Caller changed.
9572 <case R_SH_PT_16>: New case.
9573 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9574 * Makefile.in: Regenerate.
9b5ecbd0 9575 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9576 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9577 all code sections.
9578 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9579 (sh64_elf_merge_private_data): Ditto.
9580 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9581 to access stored section flags.
9582 (sh64_elf_final_write_processing): Return immediately unless
9583 called by linker. Use sh64_elf_section_data (cranges) to get size
9584 of linker-generated cranges entries.
9585 (sh64_elf_copy_private_data): Add missing "return true".
9586 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9587 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9588 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9589 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9590 elf64-sh64.c:sh64_elf_fake_sections.
9591 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9592 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9593 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9594 (sh64_elf_final_write_processing): New.
9595 (elf_backend_final_write_processing): Define.
9596 (sh64_elf_fake_sections): Get header flags from tdata field.
9597 (sh64_elf_copy_private_data): Do not call
9598 sh64_elf_copy_private_data_internal, just copy e_flags field.
9599 (sh64_elf_merge_private_data): Do not call
9600 sh64_elf_copy_private_data_internal.
9b5ecbd0 9601 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9602 Remove EF_SH64_ABI64, let ELF size make difference.
9603 Remove SH64-specific BFD section flag.
9604 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9605 containing SHmedia through elf_section_data (asect)->tdata
9606 non-zero, not using a BFD section flag.
9607 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9608 (sh64_elf_merge_private_data): Similar.
9609 (elf_backend_section_flags): Don't define.
9610 (sh64_elf_backend_section_flags): Delete.
9611 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9612 not EF_SH64_ABI64.
9613 (sh_elf64_merge_private_data): Similar.
9614 * section.c (Section flags definitions): Don't define
9615 SEC_SH_ISA_SHMEDIA.
9616 (bfd-in2.h): Regenerate.
9b5ecbd0 9617 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9618 Make DataLabel references work with partial linking.
9619 * elf32-sh64.c: Fix formatting.
9620 (sh64_elf_link_output_symbol_hook): New.
9621 (elf_backend_link_output_symbol_hook): Define to
9622 sh64_elf_link_output_symbol_hook.
9623 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9624 undefined if partial linking. Adjust sanity check.
9625 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9626 (elf_backend_link_output_symbol_hook): Define to
9627 sh64_elf64_link_output_symbol_hook.
9628 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9629 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9630 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9631 Implement semantics for inter-file DataLabel references.
9632 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9633 (sh64_elf64_add_symbol_hook): New.
9634 (sh_elf64_relocate_section): If passing an indirect symbol with
9635 st_type STT_DATALABEL on the way to a symbol with st_other
9636 STO_SH5_ISA32, do not bitor 1 to the relocation.
9637 (elf_backend_add_symbol_hook): Define to
9638 sh64_elf64_add_symbol_hook.
9639 * elf64-sh32.c: Tweak comments.
9640 (DATALABEL_SUFFIX): Define.
9641 (sh64_elf_add_symbol_hook): New.
9642 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9643 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9644 symbol with st_type STT_DATALABEL on the way to a symbol with
9645 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9646 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9647 Pass through STT_DATALABEL.
9648 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9649 (elf_backend_get_symbol_type): Define.
9650 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9651 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9652 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9653 * elf32-sh64.c: Tweak comments.
9654 (sh64_elf_copy_private_data_internal): Add prototype.
9655 (bfd_elf32_bfd_set_private_flags): Define.
9656 (sh64_elf_copy_private_data_internal): Compare machine name, not
9657 textual BFD target name, to check whether to copy section flag
9658 SHF_SH5_ISA32.
9659 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9660 Tweak section-contents-type-mismatch message.
9661 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9662 Validize reloc-types.
9663 * elf64-sh64.c: New file.
9664 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9665 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9666 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9667 Regenerate dependencies.
9668 * Makefile.in: Regenerate.
9669 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9670 bfd_elf64_sh64l_vec.
9671 * configure.in: Handle bfd_elf64_sh64_vec and
9672 bfd_elf64_sh64l_vec.
9673 * configure: Regenerate.
9674 * po/POTFILES.in: Regenerate.
9675 * po/bfd.pot: Regenerate.
9b5ecbd0 9676 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9677 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9678 anything else but EF_SH64 and EF_SH64_ABI64.
9679 (sh64_elf_merge_private_data): Emit error for anything else but
9680 EF_SH64 and EF_SH64_ABI64.
9681 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9682 from targ_selvecs.
9683 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9684 bfd_elf32_sh64l_vec as a temporary measure.
9685 * configure: Regenerate.
9b5ecbd0 9686 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9687 * cpu-sh.c (arch_info_struct): Include sh5 item
9688 unconditionalized.
9689 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9690 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9691 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9692 * elf32-sh64.c: Tweak comments.
9693 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9694 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9695 (sh64_elf_copy_private_data_internal): Wrap long line.
9696 (sh64_elf_merge_private_data): Rewrite to allow objects from
9697 SH64 subsets to be linked together.
9698 (INCLUDE_SHMEDIA): Define.
9699 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9700 Parenthesize plus-expression inside or-expression.
9701 <global symbol>: Ditto.
9702 (sh_elf_set_mach_from_flags): Remove code refusing
9703 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9704 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9705 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9706 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9707 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9708 (sh_elf_relocate_section) <local symbol>: Or 1 in
9709 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9710 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9711 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9712 relocation.
9b5ecbd0 9713 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9714 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9715 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9716 Regenerate dependencies.
9717 * Makefile.in: Regenerate.
9718 * archures.c: Add bfd_mach_sh5.
9719 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9720 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9721 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9722 * configure: Regenerate.
9723 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9724 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9725 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9726 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9727 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9728 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9729 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9730 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9731 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9732 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9733 in item for SH5.
9734 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9735 for SHmedia relocs.
9736 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9737 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9738 shmedia_prepare_reloc, goto final_link_relocate if it returns
9739 non-zero, else fail as before.
9740 (sh_elf_set_mach_from_flags): Provide function only if not defined
9741 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9742 (sh_elf_set_private_flags): Provide function only if not defined
9743 as a macro.
9744 (sh_elf_copy_private_data): Similar.
9745 (sh_elf_merge_private_data): Similar.
9746 * section.c (SEC_SH_ISA_SHMEDIA): New.
9747 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9748 * elf32-sh64.c: New file.
9749 * libbfd.h: Regenerate.
9750 * bfd-in2.h: Regenerate.
9751 * po/POTFILES.in: Regenerate.
9752 * po/bfd.pot: Regenerate.
9753 * bfd-in2.h: Regenerate.
9754 * libbfd.h: Regenerate.
9755
e108f470
DJ
97562002-02-07 Daniel Jacobowitz <drow@mvista.com>
9757
9758 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9759 been included, not drag it in.
9760 * bfd-in2.h: Regenerate.
9761
259d18a3
L
97622002-02-06 H.J. Lu (hjl@gnu.org)
9763
9764 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9765 the mach and ISA fields if necessary.
9766
f13b834e
NC
97672002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9768
9769 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9770 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9771 be sure exactly which architecture this represents.
9772
82f6addb
NC
97732002-02-05 Nick Clifton <nickc@redhat.com>
9774
9775 * po/tr.po: Updated translation.
9776
899f54f5
AM
97772002-02-05 Alan Modra <amodra@bigpond.net.au>
9778
9779 From Jimi X <jimix@watson.ibm.com>
9780 * archures (bfd_mach_ppc64): Define.
9781 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9782 (bfd_powerpc_arch): Define.
9783 * bfd-in2.h: Regenerate.
9784 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9785 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9786 (bfd_powerpc_archs): Add default powerpc64 arch.
9787
248866a8
AM
97882002-02-05 Alan Modra <amodra@bigpond.net.au>
9789
9790 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9791 against section syms in readonly sections. Don't do the global
9792 sym check if we find one.
9793 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9794 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9795 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
9796 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9797 (elf_s390_grok_prstatus): Add missing prototype.
9798
4fa5c2a8
HPN
97992002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9800
9801 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9802 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9803 Call bfd_get_section_by_name only once. Initialize
9804 bpodata->n_bpo_relocs_this_section.
9805 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9806 referring to DSOs.
9807 (bpo_reloc_request_sort_fn): Don't use difference of values as
9808 return-value.
9809
537c972e
DB
98102002-02-02 David O'Brien <obrien@FreeBSD>
9811
9812 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9813 version 4.5 and later the same as 5-CURRENT.
9814 * configure: Re-generate.
9815
006336b8
JT
98162002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9817
9818 * config.bfd (hppa*-*-netbsd*): New target.
9819
6c571f00
PT
98202002-01-31 Philipp Thomas <pthomas@suse.de>
9821
19397422
AM
9822 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9823 to front of message. Unify messages with elf32-arm.h. Use
9824 commas where neccessary.
9825 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9826 ERROR in messages. Unify messages with coff-arm.c. Correct
9827 VFP/FPA error message.
9828 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9829 APCS-32 for translation.
6c571f00 9830
930b4cb2
HPN
98312002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9832
9833 Perform on-demand global register allocation from
9834 R_MMIX_BASE_PLUS_OFFSET relocs.
9835 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9836 bpo_reloc_request, struct bpo_greg_section_info): New.
9837 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9838 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9839 _bfd_mmix_check_all_relocs,
9840 _bfd_mmix_prepare_linker_allocated_gregs,
9841 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9842 (elf_mmix_howto_table): Correct src_mask for most relocs.
9843 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9844 case.
9845 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9846 case. Fix typo in comment. New label do_mmix_reloc.
9847 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9848 store first object file with a base-plus-offset reloc. Call
9849 mmix_elf_check_common_relocs for the part common with mmo.
9850 (mmix_elf_final_link): Write out linker-allocated register
9851 contents section.
9852 (elf_backend_gc_sweep_hook): Define.
9853 (bfd_elf64_bfd_relax_section): Define.
9854
9855 * mmo.c: Don't include <ctype.h>
9856 (mmo_init): Correct init-once logic.
9857
3e36d993
TR
98582002-02-01 Tom Rix <trix@redhat.com>
9859
9860 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9861
ba323545
AM
98622002-02-01 Alan Modra <amodra@bigpond.net.au>
9863
9864 * Makefile.am: Run "make dep-am"
9865 * Makefile.in: Regenerate.
9866
012884d6
DB
98672002-01-31 David O'Brien <obrien@FreeBSD>
9868
9869 * configure.in: Recognize the differences in core files from FreeBSD
9870 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9871 5-CURRENT.
9872 * configure: Regenerate.
9873
3b16e843
NC
98742002-01-31 Ivan Guzvinec <ivang@opencores.org>
9875
9876 * coff-or32.c: New file.
9877 * cpu-or32.c: New file.
9878 * elf32-or32.c: New file.
9879 * archures.c: Add support for or32.
9880 * targets.c: Add support for or32.
9881 * bfd-in2.h: Regenerate.
7dc0ab31 9882 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
9883 coff_write_object_contents): Add support for or32.
9884 * config.bfd: Add target.
9885 * configure.in: Add support for or32.
9886 * configure: Regenerate.
9887 * Makefile.am: Add support for or32.
9888 * Makefile.in: Regenerate.
3b16e843
NC
9889 * po/SRC-POTFILES.in: Add or32 files.
9890 * po/bfd.pot: Regenerate.
7dc0ab31 9891
caf8ca8e
NC
98922002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9893 Don Lindsay <lindsayd@cisco.com>
9894
9895 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9896 false' with a return of a bfd_reloc_ error code.
9897
e5dfef09
HPN
98982002-01-31 Hans-Peter Nilsson <hp@axis.com>
9899
9900 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9901 unexport unreferenced symbols when --export-dynamic. Call
9902 _bfd_elf_strtab_delref when unexporting.
9903
4e4770d0
DJ
99042002-01-30 Daniel Jacobowitz <drow@mvista.com>
9905
9906 * bfd-in.h: Include <stdbool.h> if it is available.
9907 * bfd-in2.h: Regenerated.
9908
e1fa50e7
AM
99092002-01-31 Alan Modra <amodra@bigpond.net.au>
9910
9911 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9912 not go via the plt.
9913
b5f79c76
NC
99142002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9915
b5f79c76
NC
9916 * archures.c: Tidy up formatting of embedded comments.
9917 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 9918 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
9919 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9920 * section.c: Tidy up formatting of embedded comments.
9921 * syms.c: Tidy up formatting of embedded comments.
9922 * targets.c: Tidy up formatting of embedded comments.
9923
9924 * bfd-in2.h: Regenerate.
9925
ca09e32b
NC
99262002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9927
9928 * vms-tir.c (cmd_name): New function.
9929 (tir_cmd_name): New function.
9930 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9931 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9932 Fix formatting.
7dc0ab31 9933
ca09e32b
NC
9934 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9935 translation.
9b5ecbd0 9936 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
9937
9938 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9939 translation.
9940
9941 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9942
9943 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9944
9945 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9946 message to aid in translation.
9947
9948 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9949 to aid in translation.
9950
9951 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9952
7dc0ab31 99532002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
9954
9955 * coff-arm.c, elf32-elf.h: Unify messages.
9956
05f64ac6
NC
99572002-01-30 Nick Clifton <nickc@redhat.com>
9958
9959 * po/sv.po: Updated translation.
9960
f5a3e38a
NC
99612002-01-30 Philipp Thomas <pthomas@suse.de>
9962
9963 * dwarf2.c (read_abbrev): Use full section name in error message.
9964 (decode_line_info): Likewise.
661a3fd4
NC
9965
9966 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9967 message.
9968
d926e03d
AM
99692002-01-30 Alan Modra <amodra@bigpond.net.au>
9970
9971 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9972 descriptor symbols for undefined function code syms. Clear
9973 ELF_LINK_NON_ELF so that they can stay weak.
9974
030d18fb 99752002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 9976 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
9977
9978 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9979 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9980 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9981 generation.
9982 * bfd-in2.h: Regenerate.
9983
fcc76bea
CD
99842002-01-29 Chris Demetriou <cgd@broadcom.com>
9985
9986 * elf32-mips.c: Add additional comments about HI16 relocation
9987 processing.
9988 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9989 pc-relative relocations. (Reverts change made on 2001-10-31.)
9990 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9991 for pc-relative relocations.
9992 (mips_elf_calculate_relocation): Add a comment about a kludge
9993 in the R_MIPS_GNU_REL_HI16 handling.
9994 (_bfd_mips_elf_relocate_section): Implement that kludge;
9995 adjust pc-relative HI16 relocation for difference in HI16 and
9996 LO16 addresses, since it can't easily be done in
9997 mips_elf_calculate_relocation.
9998
f9cd9119
MS
99992002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10000
10001 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10002 relocations with PC32 relocations for undefined or weak symbols.
10003 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10004 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10005
702248bb
JT
100062002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10007
10008 * elfcore.h (elf_core_file_p): Improve comment for last change.
10009
4867be41
DJ
100102002-01-27 Daniel Jacobowitz <drow@mvista.com>
10011
10012 * configure: Regenerated.
10013
a94cef6a
JT
100142002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10015
10016 * elfcore.h (elf_core_file_p): Set the machine architecture
10017 before processing the program headers.
10018
7562a296
HPN
100192002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10020
966abd70
HPN
10021 * configure.in <64-bit configuration>: If using gcc, check and
10022 emit error for egcs-1.1.2.
10023 * configure: Regenerate.
10024
e8eab623
NC
100252002-01-26 Egor Duda <deo@logos-m.ru>
10026
10027 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10028 as possible to avoid stack corruption.
10029
73896efb
RH
100302002-01-26 Richard Henderson <rth@redhat.com>
10031
10032 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10033 for non-allocated sections.
10034
100352002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10036
10037 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10038 prstat.pr_reg even if it is a struct.
10039
73896efb 100402002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10041
c5cd6d62 10042 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10043
3d66c4f7
NC
100442002-01-25 Philipp Thomas <pthomas@suse.de>
10045
10046 * coffgen.c (coff_print_symbol): Don't mark info message
10047 for translation.
10048
9460ecda
NC
100492002-01-25 Nick Clifton <nickc@redhat.com>
10050
10051 * po/fr.po: Updated translation.
10052 * po/es.po: Updated translation.
10053
cc9ff76a
AM
100542002-01-25 Philipp Thomas <pthomas@suse.de>
10055
10056 * coff-alpha.c (alpha_relocate_section): Unify warning message
10057 for GP relative relocations without GP defined.
10058 * coff-mips.c (mips_relocate_section): Likewise.
10059
c68836a9
AM
100602002-01-25 Alan Modra <amodra@bigpond.net.au>
10061
10062 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10063 unsigned overflow when new_offset < old_offset.
10064
e8eab623 100652002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10066
10067 * bfd.c (_bfd_abort): Fix typo.
10068
8ba89f17
RH
100692002-01-23 Richard Henderson <rth@redhat.com>
10070
10071 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10072 plt entries for undefweak symbols.
10073
c6953948
NC
100742002-01-23 Steve Ellcey <sje@cup.hp.com>
10075
c5cd6d62 10076 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10077 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10078 (bfd_elf32_h8300_vec): Ditto.
10079
41bd81ab
AM
100802002-01-23 Alan Modra <amodra@bigpond.net.au>
10081
10082 * elf64-ppc.c: Remove stale part of ABI comment.
10083 (NO_OPD_RELOCS): Define.
10084 (ppc64_elf_check_relocs): Use it.
10085 (ppc64_elf_relocate_section): Here too.
10086 (build_one_stub): Don't point function syms at the stub. Instead,
10087 hijack plt.offset.
10088 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10089 really go to the stub. Make all dynamic relocs in opd against
10090 locals.
10091 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10092 plt.offset.
10093
f304919d
RH
100942002-01-22 Richard Henderson <rth@redhat.com>
10095
10096 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10097
c0ef99a7
AM
100982002-01-22 Alan Modra <amodra@bigpond.net.au>
10099
60ee0d4a
AM
10100 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10101 TOC_BASE_OFF adjustment.
10102
c0ef99a7
AM
10103 * Makefile.am: Run "make dep-am".
10104 * Makefile.in: Regenerate.
10105 * po/SRC-POTFILES.in: Regenerate.
10106
64328b46
AM
101072002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10108
10109 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10110 host defines.
10111
59953665 101122002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10113
10114 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10115 Check for and emit error if sgot is NULL at this point.
10116
9596feea
JT
101172002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10118
10119 * config.bfd (ia64*-*-netbsd*): New target.
10120
7b45c6e1
AM
101212002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10122
10123 * som.c (som_write_space_strings): Comment typo fix.
10124
e5094212
AM
101252002-01-21 Alan Modra <amodra@bigpond.net.au>
10126
e86ce104
AM
10127 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10128 is_func_descriptor fields.
10129 (link_hash_newfunc): Init them.
10130 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10131 dot are candidates for plt entries. When processing .opd relocs,
10132 set function descriptor strings to point inside function code
10133 string, and set new ppc_link_hash_entry fields.
10134 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10135 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10136 function descriptors. It's now done in..
10137 (func_desc_adjust): New.
10138 (ppc64_elf_func_desc_adjust): New.
10139 (define elf_backend_always_size_sections): Define.
10140 (ppc64_elf_hide_symbol): New.
10141 (define elf_backend_hide_symbol): Define.
10142 (allocate_dynrelocs): Remove code looking up function descriptors
10143 as that has been done earlier.
10144 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10145 table.
10146 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10147 up function descriptor.
10148 (build_one_stub): Look up the function code sym. Check for
10149 invalid plt offsets.
10150 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10151 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10152
e5094212
AM
10153 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10154 boolean param.
10155 (_bfd_elf_link_hash_hide_symbol): Likewise.
10156 * elflink.h (elf_link_add_object_symbols): Adjust call to
10157 elf_backend_hide_symbol.
10158 (elf_fix_symbol_flags): Likewise.
10159 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10160 than bfd_alloc.
10161 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10162 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10163 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10164 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10165 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10166 and adjust to suit.
10167 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10168 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10169 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10170
40b8271b
AM
101712002-01-18 Alan Modra <amodra@bigpond.net.au>
10172
10173 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10174 dynamic function descriptor symbol, not the associated function
10175 symbol.
10176
55baa95b
EC
101772002-01-17 Eric Christopher <echristo@redhat.com>
10178
10179 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10180
328577ad
NC
101812002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10182
10183 * po/bfd.pot: Regenerate.
10184 * po/fr.po: Regenerate.
10185
af746e92
AM
101862002-01-17 Alan Modra <amodra@bigpond.net.au>
10187
10188 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10189 Remove "Elf_Internal_Shdr *" param.
10190 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10191 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10192 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10193 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10194 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10195 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10196 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10197 function to override special sections. Remove hdr arg from
10198 backend call, and don't loop.
10199
175e9962
EC
102002002-01-16 Eric Christopher <echristo@redhat.com>
10201
10202 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10203 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10204 relocations requiring gp0 and gp.
10205
96a846ea
RE
102062002-01-16 Richard Earnshaw <rearnsha@arm.com>
10207
175e9962 10208 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10209 EF_ARM_VFP_FLOAT.
10210 (elf32_arm_print_private_bfd_data): Likewise.
10211
af3ae48d
NC
102122002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10213
10214 * po/tr.po: Import new version.
10215
10ed1bba
AM
102162002-01-16 Alan Modra <amodra@bigpond.net.au>
10217
10218 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10219 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10220 (ORI_R0_R0_0): Correct.
10221
5d1634d7
AM
102222002-01-16 Alan Modra <amodra@bigpond.net.au>
10223
10224 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10225 when plt_not_loaded.
10226 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10227 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10228 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10229 (ppc64_elf_glink_code): Delete.
10230 (PPC64_ELF_GLINK_SIZE): Delete.
10231 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10232 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10233 ORI_R0_R0_0): Define.
10234 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10235 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10236 (ppc64_elf_link_hash_table_create): Init them.
10237 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10238 Don't copy to shared lib.
10239 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10240 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10241 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10242 room for .stub and .glink code.
10243 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10244 DT_PPC64_GLINK.
10245 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10246 bfd_elf64_bfd_final_link.
10247 (bfd_elf64_bfd_final_link): Don't define.
10248 (ppc64_elf_size_stubs): New.
10249 (build_plt_stub): New.
10250 (build_one_stub): New.
10251 (ppc64_elf_build_stubs): New.
10252 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10253 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10254 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10255 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10256 case output sections not separate. Adjust DT_RELASZ to not
10257 include plt relocs. Set reserved got entry. Set got and plt
10258 entry size.
10259 (elf_backend_got_header_size): Set to 8.
10260 * elf64-ppc.h: New file.
10261
c601ffdb
AM
102622002-01-16 Alan Modra <amodra@bigpond.net.au>
10263
10264 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10265 sections, use bfd_section_list_remove.
10266 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10267 * elflink.h (elf_link_add_object_symbols): When removing all
10268 sections, use bfd_section_list_clear.
10269
8fb4cb7f
NC
102702002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10271
10272 * po/sv.po: New file: Swedish translation.
10273 * configure.in (ALL_LINGUAS): Add sv.
10274 * configure: Regenerate.
10275
d3c456e9
JJ
102762002-01-15 Jakub Jelinek <jakub@redhat.com>
10277
10278 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10279 * elf.c (merge_sections_remove_hook): New function.
10280 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10281 _bfd_merge_sections.
10282 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10283 * libbfd.h: Rebuilt.
10284 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10285 Call remove_hook if a SEC_EXCLUDE section is encountered.
10286
1f7fd478
NC
102872002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10288
10289 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10290 (xstormy16_reloc_map): Initialise new field with correct howto
10291 table.
10292 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10293 howto entry.
10294
b87011e9
MS
102952002-01-10 Michael Snyder <msnyder@redhat.com>
10296
10297 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10298 (elfcore_write_pstatus): Use long instead of pid_t;
10299 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10300
175e9962 103012002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10302
10303 * elf.c: Update copyright years.
10304 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10305 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10306
7c76fa91
MS
103072002-01-08 Michael Snyder <msnyder@redhat.com>
10308
10309 Add capability to write corefile note sections, for gdb.
10310 * elf.c (elfcore_write_note): New function.
10311 (elfcore_write_prpsinfo): New function.
10312 (elfcore_write_prstatus): New function.
10313 (elfcore_write_pstatus): New function.
10314 (elfcore_write_prfpreg): New function.
10315 (elfcore_write_prxfpreg): New function.
97996af6 10316 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10317
e1fddb6b
AO
103182002-01-08 Alexandre Oliva <aoliva@redhat.com>
10319
10320 * elf.c (elf_fake_sections): Propagate errors from
10321 elf_backend_fake_section.
10322
8d05742f
JT
103232002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10324
10325 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10326 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10327 (elf32-sh-nbsd.lo): New rule.
10328 * Makefile.in: Regenerate.
10329 * config.bfd (sh*le-*-netbsdelf*): New target.
10330 (sh*-*-netbsdelf*): New target.
10331 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10332 (bfd_elf32_shnbsd_vec): New vector.
10333 (bfd_elf32_shlnbsd_vec): New vector.
10334 * configure: Regenerate.
10335 * elf32-sh-nbsd.c: New file.
10336 * targets.c: Update copyright years.
175e9962 10337 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10338 bfd_elf32_shnbsd_vec.
10339
1dba4cb4
AH
103402002-01-07 Aldy Hernandez <aldyh@redhat.com>
10341
10342 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10343
47b22aef
GK
103442002-01-07 Geoffrey Keating <geoffk@redhat.com>
10345
10346 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10347 of a symbol in a section that will be deleted.
10348
be2d1673
NC
103492002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10350
10351 * po/es.po: New file: Spanish translation.
10352 * configure.in (ALL_LINGUAS): Add es.
10353 * configure: Regenerate.
10354
d9cf1b54
AM
103552002-01-06 Steve Ellcey <sje@cup.hp.com>
10356
10357 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10358 argument so we can handle HP-UX specially.
10359 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10360 (elfNN_hpux_backend_section_from_bfd_section): New for support
10361 of SHN_IA_64_ANSI_COMMON.
10362 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10363 (is_unwind_section_name): Add special HP-UX support.
10364 (elfNN_ia64_section_from_shdr): Add support for more sections.
10365 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10366 add support for more sections.
10367 (elfNN_ia64_additional_program_headers): Modify
10368 is_unwind_section_name call.
10369 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10370 only one unwind section in segment.
10371
3f3c5c34
AM
103722002-01-06 Alan Modra <amodra@bigpond.net.au>
10373
10374 * syms.c (_bfd_generic_make_empty_symbol): New function.
10375 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10376 _bfd_generic_make_empty_symbol.
10377 * libbfd.h: Regenerate.
10378 * bfd-in2.h: Regenerate.
10379 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10380 (hppabsd_core_get_symtab_upper_bound): Don't define.
10381 (hppabsd_core_get_symtab): Likewise.
10382 (hppabsd_core_print_symbol): Likewise.
10383 (hppabsd_core_get_symbol_info): Likewise.
10384 (hppabsd_core_bfd_is_local_label_name): Likewise.
10385 (hppabsd_core_get_lineno): Likewise.
10386 (hppabsd_core_find_nearest_line): Likewise.
10387 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10388 (hppabsd_core_read_minisymbols): Likewise.
10389 (hppabsd_core_minisymbol_to_symbol): Likewise.
10390 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10391 Formatting fixes.
10392 * hpux-core.c: Similarly.
10393 * irix-core.c: Similarly.
10394 * osf-core.c: Similarly.
10395 * sco5-core.c: Similarly.
10396 * binary.c (binary_make_empty_symbol): Remove function, define as
10397 _bfd_generic_make_empty_symbol.
10398 * ihex.c (ihex_make_empty_symbol): Likewise.
10399 * mmo.c (mmo_make_empty_symbol): Likewise.
10400 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10401 * srec.c (srec_make_empty_symbol): Likewise.
10402 * versados.c (versados_make_empty_symbol): Likewise.
10403 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10404 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10405 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10406 rather than _bfd_vms_make_empty_symbol.
10407 * vms-misc.c (new_symbol): Likewise.
10408
3f0a7f7f
AM
104092002-01-05 Alan Modra <amodra@bigpond.net.au>
10410
9e7b37b3
AM
10411 * section.c (bfd_section_init): Remove unnecessary initialisations.
10412 (bfd_section_list_clear): New function.
10413 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10414 (_bfd_strip_section_from_output): Use them.
10415 * coffcode.h (coff_set_alignment_hook): Likewise.
10416 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10417 * elf64-mips.c (mips_elf64_final_link): Likewise.
10418 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10419 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10420 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10421 * bfd-in2.h: Regenerate.
10422
10423 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10424 rather than doing our own section handling. Clean up after errors
10425 with bfd_release and bfd_section_list_clear. Handle unexpected
10426 flags.
10427 * aoutf1.h (sunos4_core_file_p): Likewise.
10428 * aix386-core.c (aix386_core_file_p): Likewise.
10429 * cisco-core.c (cisco_core_file_validate): Likewise.
10430 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10431 * trad-core.c (trad_unix_core_file_p): Likewise.
10432
9b5ecbd0 10433 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10434 with bfd_release and bfd_section_list_clear.
10435 * hpux-core.c (hpux_core_core_file_p): Likewise.
10436 * irix-core.c (irix_core_core_file_p): Likewise.
10437 * lynx-core.c (lynx_core_file_p): Likewise.
10438 * osf-core.c (osf_core_core_file_p): Likewise.
10439 * rs6000-core.c (rs6000coff_core_p): Likewise.
10440 * sco5-core.c (sco5_core_file_p): Likewise.
10441
3f0a7f7f
AM
10442 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10443 sign extension adjustments without conditionals.
10444
a3aa38ee
JJ
104452002-01-04 Jakub Jelinek <jakub@redhat.com>
10446
10447 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10448 CIE at .eh_frame start is removed due to no FDEs referencing it.
10449
8a8b2d4b
AJ
104502002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10451
10452 * config.bfd (x86_64-*-netbsd*): New target.
10453 * configure.in (x86_64-*-netbsd*): Set COREFILE
10454 to netbsd-core.lo.
10455 * configure: Regenerated.
10456
04b5af89
TR
104572002-01-03 Tom Rix <trix@redhat.com>
10458
10459 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10460 for recent bfd_make_section_anyway change.
10461
51c5503b
NC
104622002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10463
10464 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10465 R_ARM_THM_PC11 reloc.
10466
07f7c046
NC
104672002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10468
10469 * configure.in (LINGUAS): Add ja.
10470 * configure: Regenerate.
10471 * po/ja.po: Import from translation project's web site.
10472
5eefb65f
NC
104732002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10474
10475 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10476 messages to ease translation into other languages.
10477
39e90f10 10478For older changes see ChangeLog-0001
56882138
AM
10479\f
10480Local Variables:
10481mode: change-log
10482left-margin: 8
10483fill-column: 74
10484version-control: never
10485End:
This page took 0.70138 seconds and 4 git commands to generate.