]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
* gdbarch.sh: Remove trailing whitepsace from comments.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
ede6aaf3
L
12003-10-10 H.J. Lu <hongjiu.lu@intel.com>
2
3 * Makefile.am: Run "make dep-am".
4 * Makefile.in: Regenerate.
5 * doc/Makefile.in: Likewise.
6
a3aa4448
L
72003-10-09 H.J. Lu <hongjiu.lu@intel.com>
8
9 * cofflink.c: Include "safe-ctype.h".
10 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
11
9c8ee639
DB
122003-10-08 Dave Brolley <brolley@redhat.com>
13 On behalf of Michael Snyder <msnyder@redhat.com>
14
15 * archures.c: Add FRV fr550 machine.
16 * cpu-frv.c: Ditto.
17 * elf32-frv.c: Ditto.
18 * bfd-in2.h: Regenerate.
19
6a691779
TS
202003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
21
22 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
23 for non-SGI N64 ABI. Improve code consitency.
24
b15b52ef
AO
252003-10-07 Alexandre Oliva <aoliva@redhat.com>
26
27 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
28 rightshift to 2.
29
cd339148
NS
302003-10-07 Nathan Sidwell <nathan@codesourcery.com>
31
29ca8dc5
NS
32 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
33 parameter.
34 * cofflink.c (coff_link_add_symbols): Deal with split stab
35 sections.
36 * elflink.h (elf_link_add_object_symbols): Deal with split stab
37 sections.
38 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
39 * libbfd.h: Regenerated.
40
cd339148
NS
41 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
42 overflow, set reloc start position to after the count
43 reloc. Subtract one from num relocs. Give error on 0xffff relocs
44 and no overflow.
45 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
46 overflow.
47 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
48 0xffff.
49
10cf14ea
L
502003-10-06 H.J. Lu <hongjiu.lu@intel.com>
51
52 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
53 last CIE/FDE if needed.
54
afa105f8
NC
552003-10-06 Nick Clifton <nickc@redhat.com>
56
57 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
58 BFD64 is enabled.
59
85cf2a8a
NC
602003-10-06 Matt Thomas <matt@3am-software.com>
61
62 config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
63
4615568e
NC
642003-10-06 Robert Millan <robertmh@gnu.org>
65
66 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
67 * config.bfd: Likewise.
68 * configure: Regenerate.
69
8b7cf393
CG
702003-10-04 Christian Groessler <chris@groessler.org>
71
72 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
73 and R_CALLR.
74
0a6a3ebe
SC
752003-10-04 Stephane Carrez <stcarrez@nerim.fr>
76
77 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
78 * elf32-m68hc11.c: Likewise.
79 * elf32-m68hc12.c: Likewise.
80 * elf32-m68hc1x.h: Likewise.
81
17e58af0
SC
822003-10-04 Stephane Carrez <stcarrez@nerim.fr>
83
84 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
85 of flags between HC12 and HCS12.
86
27c630ba
NC
872003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
88
89 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
90 which become empty after merging.
91
1fc0d173
JJ
922003-09-30 Jakub Jelinek <jakub@redhat.com>
93
94 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
95 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
96
5f74bc13
CD
972003-09-30 Chris Demetriou <cgd@broadcom.com>
98
99 * archures.c (bfd_mach_mipsisa64r2): New define.
100 * bfd-in2.h: Regenerate.
101 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
102 * cpu-mips.c (I_mipsisa64r2): New enum value.
103 (arch_info_struct): Add entry for I_mipsisa64r2.
104 * elfxx-mips.c (_bfd_elf_mips_mach)
105 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
106 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
107 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
108
b59dd4a5
L
1092003-09-29 H.J. Lu <hongjiu.lu@intel.com>
110
111 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
112 Handle SHN_IA_64_ANSI_COMMON.
113 (elf_backend_section_from_bfd_section): Defined.
114
243ef1e0
L
1152003-09-26 H.J. Lu <hongjiu.lu@intel.com>
116
117 * elflink.c (elf_link_read_relocs_from_section): Add an argument
118 of a pointer to section. Check bad symbol index.
119 (_bfd_elf_link_read_relocs): Modify calls to
120 elf_link_read_relocs_from_section.
121
d38eb334
DD
1222003-09-23 DJ Delorie <dj@redhat.com>
123
124 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
125 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
126 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
127 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
128 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
129 R_SH_PSHA, R_SH_PSHL added.
130 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
131 (sh_elf_relocate_section): Support new relocs.
132
f0578e28
BW
1332003-09-23 Bob Wilson <bob.wilson@acm.org>
134
135 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
136 dynamic relocation offsets.
137
010b84c1
AM
1382003-09-23 Alan Modra <alan@modra.org>
139
140 * simple.c (bfd_simple_get_relocated_section_contents): Free the
141 hash table using _bfd_generic_link_hash_table_free.
142
7dcb9820
AM
1432003-09-23 Alan Modra <alan@modra.org>
144
145 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
146 type of prefix_length and suffix_length to int. Rename "attributes"
147 to "attr". Comment.
148 (_bfd_elf_get_sec_type_attr): Update prototype.
149 * elf.c (get_special_section): Rewrite.
150 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
151 attr and type pointers.
152 (_bfd_elf_new_section_hook): Adjust for above.
153 (special_sections): Merge suffix with prefix. Set
154 prefix_length for all entries. Set suffix_length appropriately.
155 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
156 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
157 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
158 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
159 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
160 * elf32-v850.c (v850_elf_special_sections): Likewise.
161 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
162 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
163 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
164 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
165 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
166 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
167 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
168 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
169
61bcf373
DJ
1702003-09-21 Daniel Jacobowitz <drow@mvista.com>
171
172 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
173 ->got if the section already exists.
174
8bfd78b3
NS
1752003-09-19 Nathan Sidwell <nathan@codesourcery.com>
176
177 * dwarf2.c (decode_line_info): Cope with an initially empty
178 filename table.
179
6726e1ea
L
1802003-09-18 H.J. Lu <hongjiu.lu@intel.com>
181
182 * acinclude.m4: Include ../config/accross.m4.
183 * aclocal.m4: Regenerated.
184
185 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
186 or long long.
187 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
188 (host64): Remove if HOST_64BIT_TYPE is set to long.
189
190 * configure.in (HOST_64BIT_TYPE): Set according to the size of
191 long and long long.
192 (HOST_U_64BIT_TYPE): Likewise.
193 (host64): Likewise.
194 * configure: Regenerated.
195
5de3bf90
AM
1962003-09-19 Alan Modra <amodra@bigpond.net.au>
197
198 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
199 since some ABIs round up the size of the struct.
200
9e4d8df3
L
2012003-09-18 H.J. Lu <hongjiu.lu@intel.com>
202
203 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
204 the old symbol is undefined and the new symbol is defined.
205
228ce064
AS
2062003-09-18 Andreas Schwab <schwab@suse.de>
207
208 * simple.c (bfd_simple_get_relocated_section_contents): Use
209 _bfd_generic_link_hash_table_create instead of
210 bfd_link_hash_table_create.
211
fdbdabdd
L
2122003-09-10 H.J. Lu <hongjiu.lu@intel.com>
213
214 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
215 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
216
a252afa4
DA
2172003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
218 Randolph Chung <randolph@tausq.org>
219
220 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
221 hppa_link_hash_newfunc, hppa_build_one_stub,
222 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
223 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
224 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
225 for generating import stubs for calls to statically linked PIC
226 functions.
227 (hppa_type_of_stub): Don't generate an import stub for calls to
228 statically linked pic functions. Generate import stubs for calls
229 in a shared object, to functions not in a regular file, and to
230 defined weak functions. Add new argument INFO.
231 (hppa_build_one_stub): Don't undef ADDIL_DP.
232 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
233 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
234 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
235 non-shared link. Convert instructions that use the the linkage table
236 pointer, or a facsimile thereof, to use the global data pointer when
237 the reloc has been changed.
238
42acdc7c
JB
2392003-09-08 Joel Brobecker <brobecker@gnat.com>
240
241 * archures.c: Add new machine names for hppa.
242 * bfd-in2.h: Regenerate.
243 * cpu-hppa.c: Use the new machine names.
244
2a0e29b4
SC
2452003-09-06 Stephane Carrez <stcarrez@nerim.fr>
246
247 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
248 all_local_syms member.
249 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
250 to get the local symbols.
251
3f533aa9
SC
2522003-09-06 Stephane Carrez <stcarrez@nerim.fr>
253
254 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
255 (elf_backend_special_sections): Define.a
256
257 PR savannah/4950:
258 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
259 section is read-only.
260
8ad30312
NC
2612003-09-04 Nick Clifton <nickc@redhat.com>
262
263 * archures.c (bfd_mach_v850e1): Define.
264 * bfd-in2.h: Regenerate.
265 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
266 (arch_info_struct): Include an entry for bfd_mach_v850e1.
267 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
268 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
269 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
270 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
271 linked with v850e binaries. Mark the output as v850e.
5de3bf90 272
3922a8c1
NC
2732003-09-03 Nick Clifton <nickc@redhat.com>
274
5de3bf90 275 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
276 symbols that are used in relocs.
277
13dfd2d0
NC
2782003-08-30 Robert Millan <robertmh@gnu.org>
279
280 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
281 * config.bfd: Likewise.
282 * configure: Regenerate.
283
1c0881dd
CG
2842003-08-31 Christian Groessler <chris@groessler.org>
285
286 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
287 instead of returning bfd_reloc_continue.
288
ac0e732e
AJ
2892003-08-31 Andreas Jaeger <aj@suse.de>
290
291 * merge.c: Update to ISO C90.
292
ec317fb1
ILT
2932003-08-27 Ian Lance Taylor <ian@airs.com>
294
49c97a80
ILT
295 * configure.in: Check for strtoull.
296 * bfd.c (bfd_scan_vma): Use strtoull when available.
297 * configure, config.in: Regenerate.
298
ec317fb1
ILT
299 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
300 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
301 __GNUC__ when deciding whether to use long long for
302 BFD_HOST_64_BIT.
303 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
304
d539b3aa
CG
3052003-08-27 Christian Groessler <chris@groessler.org>
306
307 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
308 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
309 functions.
310 (elf32_i860_howto_table): Insert the new functions as
311 'special_function's in the proper reloc type entries.
312
73052b5e
RS
3132003-08-27 Richard Sandiford <rsandifo@redhat.com>
314
315 * elf32-frv.c (elf32_frv_relocate_section): Use
316 _bfd_elf_rela_local_sym.
317
2c848f79
MS
3182003-08-26 Michael Snyder <msnyder@redhat.com>
319
320 * cpu-frv.c: Remove unused enum.
321
980491e6
MR
3222003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
323
324 * reloc.c: Fix documentation for MIPS ELF relocations.
325 libbfd.h: Regenerate.
326 bfd-in2.h: Regenerate.
327
6d1227b8
JE
3282003-08-24 Jason Eckhardt <jle@rice.edu>
329
5de3bf90 330 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 331
f680ea79
JE
3322003-08-24 Jason Eckhardt <jle@rice.edu>
333
334 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
335 shift by 2 before storing the relocated value.
336
c28b1c28
JE
3372003-08-23 Jason Eckhardt <jle@rice.edu>
338
5de3bf90 339 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
340 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
341 LOWn, SPLITn, and BRADDR.
342 (RTYPE2HOWTO): Check that the r_type is within the howto_table
343 before trying to access the entry.
344 (coff_i860_rtype_to_howto): Likewise.
345 (coff_i860_reloc_type_lookup): New function.
346 (i860_reloc_processing): New function.
347 (coff_bfd_reloc_type_lookup): Define macro.
348 (RELOC_PROCESSING): Define macro.
349 Minor formatting adjustments.
350
40a0491a
AM
3512003-08-23 Alan Modra <amodra@bigpond.net.au>
352
353 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
354
69bbc4c0
L
3552003-08-22 H.J. Lu <hongjiu.lu@intel.com>
356
357 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
358 .got section at 8 bytes.
359
8b956130
NC
3602003-08-21 Nick Clifton <nickc@redhat.com>
361
85db1db4 362 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 363
6c21aa76
NC
3642003-08-21 Randolph Chung <tausq@debian.org>
365
366 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
367 can have OSABI=Linux or OSABI=SysV. Check for both.
368 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
369
3673a93e
NC
3702003-08-21 Nick Clifton <nickc@redhat.com>
371
372 * po/sv.po: Updated Swedish translation.
373
427b80f4
RS
3742003-08-20 Richard Sandiford <rsandifo@redhat.com>
375
376 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
377
560e09e9
NC
3782003-08-20 Nick Clifton <nickc@redhat.com>
379
380 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
381 replace some duplicated code in most elfxx-xxxx.c files. This
382 version uses the new fields in bfd_link_info.
383
40a0491a
AM
384 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
385 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
386 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
387 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
388 * elf32-i386.c (elf_i386_relocate_section): Likewise.
389 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
390 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
391 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
392 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
393 * elf32-s390.c (elf_s390_relocate_section): Likewise.
394 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
395 * elf32-vax.c (elf_vax_relocate_section): Likewise.
396 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
397 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
398 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
399 * elf64-s390.c (elf_s390_relocate_section): Likewise.
400 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
401 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
402 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
403
404 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
405 elf_hppa_remark_useless_dynamic_symbols,
406 elf_hppa_relocate_section): Use the new fields in
407 bfd_link_info structure.
408 * elf32-sh.c (sh_elf_relocate_section): Likewise.
409 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
410 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
411 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
412 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
413 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
414
415 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
416 undefined symbols in shared libraries. Remove redundant test
417 of shlib_undefined when reporting references to forced local
418 symbols.
560e09e9 419
4091ea4e
L
4202003-08-18 Andreas Schwab <schwab@suse.de>
421
422 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
423 executables.
424
b0cdc7bc
HPN
4252003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
426
427 * simple.c (bfd_simple_get_relocated_section_contents): Move
428 reloc_done hack to before first bfd_section_size call. Change all
429 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
430
c1993d04
AM
4312003-08-16 Alan Modra <amodra@bigpond.net.au>
432
433 * elf64-ppc.c: Don't include elf/ppc.h.
434
792b4a53
RS
4352003-08-14 Richard Sandiford <rsandifo@redhat.com>
436
437 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
438 code to work with 64-bit bfds.
439
fdc09da8
AM
4402003-08-14 Alan Modra <amodra@bigpond.net.au>
441
442 * dep-in.sed: Remove libintl.h.
443 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
444 (POTFILES.in): Remove target.
445 * Makefile.in: Regenerate.
446
ee87f2da
AM
4472003-08-12 Alan Modra <amodra@bigpond.net.au>
448
449 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
450 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
451 use the function sym from the previous reloc.
452
15f40dfc
JJ
4532003-08-11 Jakub Jelinek <jakub@redhat.com>
454
455 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
456 fatal if -pie.
457 * elf32-s390.c (elf_s390_relocate_section): Likewise.
458 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
459 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
460 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
461 * elf64-s390.c (elf_s390_relocate_section): Likewise.
462 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
463 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
464 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
465 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
466 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
467 on undefined symbols if -pie.
468 * elf32-sh.c (sh_elf_relocate_section): Likewise.
469
6ab189d5
AM
4702003-08-11 Alan Modra <amodra@bigpond.net.au>
471
472 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
473 branch to __libc_start_main.
474
3b260895
NC
4752003-08-08 Dmitry Diky <diwil@mail.ru>
476
6ab189d5
AM
477 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
478 gcc order.
3b260895
NC
479 * cpu-msp430.c: Likewise.
480 * elf32-msp430.c: Likewise.
481 * bfd-in2.h: Regenerate.
482
c39a58e6
AM
4832003-08-07 Alan Modra <amodra@bigpond.net.au>
484
9c5bfbb7
AM
485 * elfxx-target.h: Remove PTR cast.
486 * targets.c (bfd_target): Make backend_data const void *.
487 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
488 * elf-m10300.c: Likewise.
489 * elf.c: Likewise.
490 * elf32-hppa.c: Likewise.
491 * elf32-i386.c: Likewise.
492 * elf32-m68hc1x.c: Likewise.
493 * elf32-ppc.c: Likewise.
494 * elf32-s390.c: Likewise.
495 * elf32-sh.c: Likewise.
496 * elf32-sh64.c: Likewise.
497 * elf32-sparc.c: Likewise.
498 * elf32-xtensa.c: Likewise.
499 * elf64-mips.c: Likewise.
500 * elf64-ppc.c: Likewise.
501 * elf64-s390.c: Likewise.
502 * elf64-sh64.c: Likewise.
503 * elf64-sparc.c: Likewise.
504 * elf64-x86-64.c: Likewise.
505 * elfcode.h: Likewise.
506 * elfcore.h: Likewise.
507 * elflink.c: Likewise.
508 * elflink.h: Likewise.
509 * elfxx-ia64.c: Likewise.
510 * elfxx-mips.c: Likewise.
511 * elfxx-mips.h: Likewise.
512 * elf.c (prep_headers): Remove useless check for null backend_data.
513 * bfd-in2.h: Regenerate.
514
c39a58e6
AM
515 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
516 (NAME): Use ## rather than CONCAT4 macro.
517 * elfcode.h: Remove one remaining PARAMS macro.
518 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
519 * elf-strtab.c: Likewise.
520 * elf-hppa.h: Likewise.
521 * elf32-hppa.h: Likewise.
522 * elf32-hppa.c: Likewise.
523 (elf32_hppa_add_symbol_hook): Delete.
524 (elf_backend_add_symbol_hook): Don't define.
525 * libhppa.h: Convert to C90. Replace INLINE with inline.
526
97b639ba
AM
5272003-08-06 Alan Modra <amodra@bigpond.net.au>
528
529 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
530 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
531 function descriptors, but warn.
532 (ppc_build_one_stub): Remove a couple of vars. Move code creating
533 stub syms so that we can avoid a stub sym if we already have a
534 plt sym. Do not redefine an existing symbol.
535 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
536 glink.
537
9e7d479d
NC
5382003-08-06 Nick Clifton <nickc@redhat.com>
539
540 * po/fr.po: Updated French translation.
541
77f3d027
AM
5422003-08-06 Alan Modra <amodra@bigpond.net.au>
543
544 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
545 SEC_LINKER_CREATED.
546
50d6c878
DJ
5472003-08-05 Daniel Jacobowitz <drow@mvista.com>
548
549 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
550 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
551
14abcef9
NC
5522003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
553
4a21a492 554 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
555 message if the line number table could not be read.
556
8c675694
NC
5572003-08-04 Nick Clifton <nickc@redhat.com>
558
559 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
560 to messages produced for .gnu.warning.SYMBOL sections.
561
268b6b39
AM
5622003-08-04 Alan Modra <amodra@bigpond.net.au>
563
564 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
565 * elfcore.h: Likewise.
566 * elflink.c: Likewise.
567 * elflink.h: Likewise.
568 * elf.c (sym_is_global): Remove INLINE.
569 (align_file_position): Replace INLINE with inline.
570 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
571 (elf_file_p): Replace INLINE with inline.
572
866f48b7
KK
5732003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
574
575 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
576
8651fcf9
L
5772003-08-01 H.J. Lu <hongjiu.lu@intel.com>
578
579 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
580
37cd2629
L
5812003-08-01 H.J. Lu <hongjiu.lu@intel.com>
582
583 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
584 ElfNN_External_Rela instead of Elf64_External_Rela.
585
91fb2a9d
NC
5862003-08-01 Nick Clifton <nickc@redhat.com>
587
588 * config.bfd: Add code to catch obsolete configurations and warn
589 about them unless --enable-obsolete is used. Use this to mark
590 vax-vms port as obsolete.
591
e656e369
AM
5922003-07-30 Alan Modra <amodra@bigpond.net.au>
593
594 * elf32-ppc.c (ppc_elf_install_value): Tidy.
595 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
596 Formatting.
597 * elfxx-target.h: Remove PARAMS macro. Formatting.
598
50bc7936
AM
5992003-07-30 Alan Modra <amodra@bigpond.net.au>
600
601 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
602 * elf64-ppc.c (get_fdh): New function, split out from
603 ppc64_elf_edit_opd.
604 (ppc64_elf_check_relocs): Use get_fdh.
605 (func_desc_adjust): Likewise. Tidy.
606 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
607 exit. Use get_fdh. Account for superfluous dynamic relocs.
608 (ppc64_elf_relocate_section): Warning fix.
609
a62d170c
JE
6102003-07-30 Jason Eckhardt <jle@rice.edu>
611
612 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
613
7734b6e9
JE
6142003-07-30 Jason Eckhardt <jle@rice.edu>
615
616 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
617
37f4508b
AM
6182003-07-30 Randolph Chung <tausq@debian.org>
619
620 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
621 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
622
217aa764
AM
6232003-07-30 Alan Modra <amodra@bigpond.net.au>
624
625 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
626 Replace PTR with void *. Formatting.
627 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
628 (make_mapping): Likewise.
629
494dac0c
AM
6302003-07-29 Alan Modra <amodra@bigpond.net.au>
631
632 * elf64-ppc.c (func_desc_adjust): Give linker created function
633 descriptor symbols a size and type.
634 (ppc64_elf_relocate_section): Correct lq insn test.
635
deaaf2f3
EC
6362003-07-28 Eric Christopher <echristo@redhat.com>
637
638 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
639 (ppc_elf_install_value): New function.
640 (ppc_elf_sort_rela): Remove.
641 (ppc_elf_relax_section): Rewrite. Remove old relaxation
642 and replace with out of range branch stubs.
643 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
644
709e685d
AO
6452003-07-29 Alexandre Oliva <aoliva@redhat.com>
646
647 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
648 from input_bfd.
649
36c506c5
AM
6502003-07-28 Alan Modra <amodra@bigpond.net.au>
651
652 * elf.c (special_sections): Set attributes for .got and .plt.
653
5d35169e
AM
6542003-07-27 Alan Modra <amodra@bigpond.net.au>
655
656 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
657 on function descriptors.
658 (ELIMINATE_COPY_RELOCS): Expand comment.
659 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
660 Do include ".toc1".
661
3cddba1e
L
6622003-07-25 H.J. Lu <hongjiu.lu@intel.com>
663
664 * elf.c (_bfd_elf_new_section_hook): Set the default section
665 type to SHT_NULL.
666 (elf_fake_sections): Set the section type based on asect->flags
667 if it is SHT_NULL. Don't abort on processor specific section
668 types.
669
d622ef4b
L
6702003-07-25 H.J. Lu <hongjiu.lu@intel.com>
671
672 * bfd-in2.h: Regenerated.
673
2f89ff8d
L
6742003-07-25 H.J. Lu <hongjiu.lu@intel.com>
675
676 * elf-bfd.h (bfd_elf_special_section): New.
677 (elf_backend_data): Add special_sections, a pointer to
678 bfd_elf_special_section.
679 (elf_section_type). New.
680 (elf_section_flags): New.
681 (_bfd_elf_get_sec_type_attr): New.
682
683 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
684 real section type/flags.
685 (special_sections): New.
686 (get_special_section): New.
687 (_bfd_elf_get_sec_type_attr): New.
688 (_bfd_elf_new_section_hook): Check special_section to set
689 elf_section_type and elf_section_flags.
690 (elf_fake_sections): Don't use section name to set ELF section
691 data.
692
693 * elf32-m32r.c (m32r_elf_special_sections): New.
694 (elf_backend_special_sections): Defined.
695
696 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
697 (elf_backend_special_sections): Defined.
698
699 * elf32-mcore.c (mcore_elf_special_sections): New.
700 (elf_backend_special_sections): Defined.
701
702 * elf32-ppc.c (ppc_elf_special_sections): New.
703 (elf_backend_special_sections): Defined.
704
705 * elf32-sh64.c (sh64_elf_special_sections): New.
706 (elf_backend_special_sections): Defined.
707
708 * elf32-v850.c (v850_elf_special_sections): New.
709 (elf_backend_special_sections): Defined.
710
711 * elf32-xtensa.c (elf_xtensa_special_sections): New.
712 (elf_backend_special_sections): Defined.
713
714 * elf64-alpha.c (elf64_alpha_special_sections): New.
715 (elf_backend_special_sections): Defined.
716
717 * elf64-hppa.c (elf64_hppa_special_sections): New.
718 (elf_backend_special_sections): Defined.
719
720 * elf64-ppc.c (ppc64_elf_special_sections): New.
721 (elf_backend_special_sections): Defined.
722
723 * elf64-sh64.c (sh64_elf64_special_sections): New.
724 (elf_backend_special_sections): Defined.
725
726 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
727 (elf_backend_special_sections): Defined.
728
729 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
730
731 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
732 (elf_backend_special_sections): Defined.
733
734 * elfxx-target.h (elf_backend_special_sections): New. Default
735 to NULL.
736 (elfNN_bed): Initialize special_sections.
737
738 * section.c (bfd_abs_section): Remove const.
739 (bfd_und_section): Likewise.
740 (bfd_com_section): Likewise.
741 (bfd_ind_section): Likewise.
742
20650579
NC
7432003-07-24 Nick Clifton <nickc@redhat.com>
744
745 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
746 sections are assigned the LOAD attribute.
747
deaaf2f3 7482003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
749
750 * elf32-sh.c: Convert to C90. Replace PTR with void *.
751 * elf32-sh64-com.c: Likewise.
752 * elf32-sh64.c: Likewise.
753 * elf32-sh64.h: Likewise.
754 * elf64-sh64.c: Likewise.
755
3d85aebe
KK
7562003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
757
758 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
759 (allocate_dynrelocs): Likewise.
760 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
761 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
762
834d807b
NC
7632003-07-24 Nick Clifton <nickc@redhat.com>
764
765 * po/fr.po: Updated French translation.
766
571b5725
BW
7672003-07-23 Bob Wilson <bob.wilson@acm.org>
768
769 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
770 near the beginning of the file. Swap order of arguments. Call
771 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
772 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
773 (elf_xtensa_relocate_section): Likewise.
774 (shrink_dynamic_reloc_sections): Likewise.
775
b536dc1e
BW
7762003-07-23 Bob Wilson <bob.wilson@acm.org>
777
778 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
779 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
780 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
781 first printing an error message.
782 (elf_xtensa_finish_dynamic_sections): Likewise.
783 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
784 discarding literal table entries.
785 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
786 (elf_xtensa_do_asm_simplify): Likewise.
787
7f888330
SC
7882003-07-23 Stephane Carrez <stcarrez@nerim.fr>
789
790 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
791 we have a local symbol in common section.
792
ecc27c31
L
7932003-07-22 H.J. Lu <hongjiu.lu@intel.com>
794
795 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
796 weak symbols.
797
f9f3cf65
NC
7982003-07-22 Nick Clifton <nickc@redhat.com>
799
800 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
801 expected RS6000 storage classes.
802
bb32e54f
L
8032003-07-21 H.J. Lu <hongjiu.lu@intel.com>
804
805 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
806 output_bfd unused to silence gcc.
807
796f2a93
NC
8082003-07-21 Nick Clifton <nickc@redhat.com>
809
810 * po/sv.po: Updated Swedish translation.
811
f6c52c13
AM
8122003-07-21 Alan Modra <amodra@bigpond.net.au>
813
814 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
815 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
816 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
817 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
818 now done in _bfd_elf_symbol_refs_local_p.
819 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
820 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
821 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
822
aa37626c
L
8232003-07-18 H.J. Lu <hongjiu.lu@intel.com>
824
825 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
826
1e364ec9
L
8272003-07-18 H.J. Lu <hongjiu.lu@intel.com>
828
829 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
830 (SYMBOL_CALLS_LOCAL): Likewise.
831
832 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
833 immediately if symbol isn't defined locally.
834
986a241f
RH
8352003-07-18 Richard Henderson <rth@redhat.com>
836
837 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
838 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
839 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
840 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
841 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
842 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
843 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
844 Update all callers to provide the relocation being resolved.
845
ac4b3dd8
NC
8462003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
847
848 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
849 targ_cflags.
850
6c37ac4d
NC
8512003-07-17 Nick Clifton <nickc@redhat.com>
852
853 * po/es.po: New Spanish translation.
854 * po/sv.po: New Swedish translation.
855 * po/opcodes.pot: Regenerate.
856
02e6ad56
RH
8572003-07-16 Richard Henderson <rth@redhat.com>
858
859 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
860 * elfxx-ia64.c, targets.c: Likewise.
861
5686517c
RH
8622003-07-16 Richard Henderson <rth@redhat.com>
863
864 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
865 for symbols defined locally plus -Bsymbolic. Tidy logic.
866
5a7ea749
RS
8672003-07-15 Richard Sandiford <rsandifo@redhat.com>
868
869 * archures.c (bfd_mach_mips7000): New.
870 * bfd-in2.h: Regenerated.
871 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
872 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
873 (mips_mach_extensions): Add an entry for it.
874
76bff705
NC
8752003-07-14 Nick Clifton <nickc@redhat.com>
876
877 * po/tr.po: Update with latest version.
878 * po/SRC-POTFILES.in: Regenerate.
879 * po/bfd.pot: Regenerate.
880 * Makfile.in: Regenerate.
881 * configure: Regenerate.
882
d0facd1b
NC
8832003-07-12 Jeff Baker <jbaker@qnx.com>
884
885 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
886 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
887 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
888 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
889
bcb9b88d
NC
8902003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
891
892 * coffcode.h (coff_set_section_contents): Set the
893 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
894
7a9823f1
RS
8952003-07-11 Richard Sandiford <rsandifo@redhat.com>
896
897 * bfd-in.h (bfd_h8300_pad_address): Declare.
898 * bfd-in2.h: Regenerate.
899 * cpu-h8300.c (bfd_h8300_pad_address): New function.
900 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
901 addresses before checking whether they can be relaxed.
902 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
903 Don't complain about overflows in general 8-bit relocations.
904 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
905 Fix handling of R_H8_DIR24A8.
906
c6baf75e
RS
9072003-07-11 Richard Sandiford <rsandifo@redhat.com>
908
909 * elf32-h8300.c: Convert function prototypes and definitions
910 to C90 syntax.
911 * coff-h8300.c: Likewise.
912 * cpu-h8300.c: Likewise.
913
fce00800
AM
9142003-07-11 Alan Modra <amodra@bigpond.net.au>
915
916 * po/SRC-POTFILES.in: Regenerate.
917 * po/bfd.pot: Likewise.
918
e901de89
BW
9192003-07-10 Bob Wilson <bob.wilson@acm.org>
920
921 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
922 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
923 .xt.lit.plt section.
924 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
925 and allocate memory for it.
926 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
927 section to the .got.loc section.
928 (elf_xtensa_finish_dynamic_sections): Fix up call to
929 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
930 the address of .got.loc.
931 (relax_property_section): Shrink .got.loc to match changes in any
932 literal table section.
933 (xtensa_is_property_section): Change to match
934 xtensa_get_property_section_name.
935 (xtensa_is_littable_section): New.
936
eff26f78
L
9372003-07-10 H.J. Lu <hongjiu.lu@intel.com>
938
939 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
940 -1LL.
941
942e0f42
AM
9422003-07-10 Alan Modra <amodra@bigpond.net.au>
943
944 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
945 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
946 Run "make dep-am".
947 * Makefile.in: Regenerate.
948
73c3cd1c
AO
9492003-07-10 Alexandre Oliva <aoliva@redhat.com>
950
951 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
952 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
953 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
954 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
955 * elf32-am33lin.c: Rename global functions.
956 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
957 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
958 * configure.in (bfd_elf32_am33lin_vec): Added.
959 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
960 (elf32-am33lin.lo): List dependencies.
961 * aclocal.m4, configure, Makefile.in: Rebuilt.
962 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
963 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
964 ELF_ARCH was not defined before.
965 (elf_symbol_leading_char): Define if not defined.
966 * elf32-am33lin.c: Override the definitions above.
967 * targets.c (bfd_elf32_am33lin_vec): New.
968
03a12831
AO
9692003-07-09 Alexandre Oliva <aoliva@redhat.com>
970
971 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
972 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
973 pcrel_relocs_copied.
974 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
975 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
976 ld-linux.so.2 to ld.so.1.
977 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
978 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
979 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
980 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
981 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
982 .rela.* section contents with bfd_zalloc.
983 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
984 * elf-m10300.c: Added declarations for functions missing them.
985 Merge some shared-library changes from the i386 back-end. Use
986 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
987 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
988 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
989 members of elf_link_hash_entry. Adjusted references.
990 (mn10300_elf_final_link_relocate): dynobj was already loaded
991 into a local variable, use it.
992 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
993 * elf-m10300.c: Add missing function prototypes.
994 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
995 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
996 relocation for dynamic relocations.
997 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
998 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
999 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1000 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1001 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1002 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1003 adress is already known at the time we compute relaxations.
1004 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1005 and PLT32 to narrower relocations.
1006 * libbfd.h, bfd-in2.h: Rebuilt.
1007 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1008 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1009 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1010 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1011 BFD_RELOC_MN10300_RELATIVE): New relocs.
1012 * libbfd.h, bfd-in2.h: Rebuilt.
1013 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1014 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1015 fields.
1016 (elf_mn10300_howto): Defined new relocation types.
1017 (mn10300_reloc_map): Map them.
1018 (_bfd_mn10300_elf_create_got_section): New fn.
1019 (mn10300_elf_check_relocs): Handle PIC relocs.
1020 (mn10300_elf_final_link_relocate): Likewise.
1021 (mn10300_elf_relocate_section): Handle DSOs.
1022 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1023 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1024 elf_mn10300_pic_plt_entry): New.
1025 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1026 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1027 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1028 elf_mn10300_plt_reloc_offset: New macros.
1029 (ELF_DYNAMIC_INTERPRETER): Likewise.
1030 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1031 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1032 (_bfd_mn10300_elf_discard_copies): Likewise.
1033 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1034 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1035 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1036 (elf_backend_can_gc_sections,
1037 elf_backend_create_dynamic_sections,
1038 elf_backend_adjust_dynamic_sections,
1039 elf_backend_size_dynamic_sections,
1040 elf_backend_finish_dynamic_symbol,
1041 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1042 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1043 elf_backend_got_header_size, elf_backend_plt_header_size): New
1044 macros.
1045
b08fa4d3
AO
10462003-07-09 Alexandre Oliva <aoliva@redhat.com>
1047
1048 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1049 * elf-m10300.c (compute_function_info): Account for AM33
1050 registers in `movm' when computing stack space for `call' when
1051 linking for AM33/2.0 link.
1052 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1053 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1054 * bfd-in2.h: Rebuilt.
1055 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1056 * elf-m10300.c: Updated.
1057 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1058 * archures.c (bfd_mach_am332): Defined.
1059 * bfd-in2.h: Rebuilt.
1060 * cpu-m10300.c (bfd_am332_arch): Defined.
1061 (bfd_am33_arch): Chained with am33-2.
1062 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1063 (_bfd_mn10300_elf_final_write_processing): Likewise.
1064
201933ea
L
10652003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1066
1067 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1068
e717da7e
AM
10692003-07-10 Alan Modra <amodra@bigpond.net.au>
1070
1071 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1072 (struct ppc64_elf_obj_tdata): New.
1073 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1074 (ppc64_elf_mkobject): New function.
1075 (struct got_entry): Add "owner". Move "tls_type".
1076 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1077 (ppc64_elf_init_stub_bfd): New function.
1078 (create_got_section): Create header .got in dynobj. Create .got
1079 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1080 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1081 Look for dynobj .got, and test it.
1082 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1083 (update_local_sym_info): Likewise.
1084 (ppc64_elf_check_relocs): Likewise.
1085 (ppc64_elf_gc_sweep_hook): Likewise.
1086 (ppc64_elf_tls_optimize): Likewise.
1087 (allocate_dynrelocs): Likewise.
1088 (ppc64_elf_size_dynamic_sections): Likewise.
1089 (ppc64_elf_relocate_section): Likewise.
1090 (ppc64_elf_next_toc_section): Update comment.
1091 (toc_adjusting_stub_needed): Remove unneeded cast.
1092 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1093 testing section flags.
1094 (ppc64_elf_build_stubs): Likewise.
1095 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1096 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1097 (func_desc_adjust): Copy over dynamic info for undef weaks.
1098 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1099 (ppc64_elf_size_stubs): Update prototype.
1100 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1101 input sections rather than scanning dynobj.
1102
18ad015f
RS
11032003-07-09 Richard Sandiford <rsandifo@redhat.com>
1104
1105 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1106 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1107 (mips_elf_create_msym_section): Delete.
1108 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1109 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1110 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1111 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1112 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1113 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1114 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1115
e10609d3
RS
11162003-07-09 Richard Sandiford <rsandifo@redhat.com>
1117
1118 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1119 symbols protected.
1120
0d591ff7
RS
11212003-07-09 Richard Sandiford <rsandifo@redhat.com>
1122
1123 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1124 of relocations whose offset is -2.
1125
fdd07405
RS
11262003-07-09 Richard Sandiford <rsandifo@redhat.com>
1127
1128 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1129 forced-local symbols like other locals. Don't create relocations
1130 against STN_UNDEF in irix objects.
1131
d2fba50d
RS
11322003-07-09 Richard Sandiford <rsandifo@redhat.com>
1133
1134 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1135 compatible objects, add the values of defined external symbols
1136 to the addend.
1137
6eaa6adc
RS
11382003-07-09 Richard Sandiford <rsandifo@redhat.com>
1139
1140 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1141 initialize a GOT entry to the symbol's st_value.
1142
0c83546a
AM
11432003-07-08 Alan Modra <amodra@bigpond.net.au>
1144
43c40ab2
AM
1145 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1146 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1147 (ppc_elf_tdata): Define.
1148 (elf_local_ptr_offsets): Adjust.
1149 (ppc_elf_mkobject): New function.
1150 (bfd_elf32_mkobject): Define.
1151
0c83546a
AM
1152 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1153 * elfcore.h (elf_core_file_p): Likewise.
1154 * section.c (bfd_section_init): Remove prototype.
1155
58111eb7
AM
11562003-07-08 Alan Modra <amodra@bigpond.net.au>
1157
1158 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1159 field.
1160 (enum elf_linker_section_enum): Delete.
1161 (struct elf_linker_section): Delete.
1162 (struct elf_linker_section_pointers): Delete.
1163 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1164 Make linker_section_pointers a void**.
1165 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1166 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1167 of old item in elf-bfd.h.
1168 (struct elf_linker_section): Likewise.
1169 (struct elf_linker_section_pointers): Likewise.
1170 (elf_local_ptr_offsets): Define.
1171 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1172 (ppc_elf_link_hash_newfunc): Init it.
1173 (struct ppc_elf_link_hash_table): Add sbss.
1174 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1175 individual fields.
1176 (elf_create_linker_section): Fold into..
1177 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1178 Make rela section here if shared.
1179 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1180 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1181 clearing in a loop.
1182 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1183 section here.
1184 (ppc_elf_check_relocs): Adjust.
1185 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1186 creating .sbss by hand.
1187 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1188
15f8604d
JJ
11892003-07-04 Jakub Jelinek <jakub@redhat.com>
1190
1191 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1192 complain_overflow_bitfield.
1193 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1194 complain_overflow_bitfield.
1195
3368a7fb
JJ
11962003-07-04 Jakub Jelinek <jakub@redhat.com>
1197
1198 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1199 true even if -pie.
1200
9203ba99
JJ
12012003-07-04 Jakub Jelinek <jakub@redhat.com>
1202
1203 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1204 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1205 !info->executable.
1206 (get_fptr): For -pie create .opd as writable section and create
1207 .rela.opd as well.
1208 (elfNN_ia64_check_relocs): Change info->shared into
1209 !info->executable.
1210 (allocate_fptr): Likewise.
1211 (allocate_dynrel_entries): Account for a relative reloc for -pie
1212 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1213 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1214 section if -pie.
1215 (set_got_entry): Don't create a relative reloc if -pie
1216 want_ltoff_fptr for undefweak symbol.
1217 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1218 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1219 @fptr().
1220
1221 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1222 even if -pie.
1223 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1224 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1225 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1226 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1227 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1228 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1229 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1230 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1231 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1232
e0a868d1 12332003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1234
1235 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1236 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1237 <R_H8_DIR32A16>: Fix type of relocation.
1238
35cad4c4
KK
12392003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1240
1241 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1242 sections were created already. Remove unnecessary tests of
1243 the previous change.
1244
03151a5a
KK
12452003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1246
1247 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1248 bfd_make_section for existing sections.
1249
003d627e
AM
12502003-07-04 Alan Modra <amodra@bigpond.net.au>
1251
2293c499
AM
1252 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1253 create_got_section if we already have done so.
1254 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1255 (sh_elf_check_relocs): Likewise.
1256 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1257 htab->root.dynobj instead.
1258 (sh_elf_check_relocs): Likewise.
1259 (sh_elf_finish_dynamic_sections): Likewise.
1260
003d627e
AM
1261 * section.c (bfd_make_section): Return NULL for existing section.
1262
fa681e5d
AM
12632003-07-04 Alan Modra <amodra@bigpond.net.au>
1264
1265 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1266 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1267
1268 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1269 (_bfd_elf_find_pointer_linker_section): Likewise.
1270 (bfd_elf32_create_pointer_linker_section): Likewise.
1271 (bfd_elf32_finish_pointer_linker_section): Likewise.
1272 (bfd_elf64_create_pointer_linker_section): Likewise.
1273 (bfd_elf64_finish_pointer_linker_section): Likewise.
1274 (_bfd_elf_make_linker_section_rela): Likewise.
1275 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1276 (elf_finish_pointer_linker_section): Likewise.
1277 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1278 (_bfd_elf_create_linker_section): Move this function..
1279 (_bfd_elf_find_pointer_linker_section): ..and this..
1280 * elflink.h (elf_create_pointer_linker_section): ..and this..
1281 (elf_finish_pointer_linker_section): ..and this..
1282 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1283 calls.
1284 (elf_create_linker_section): Convert to C90, tidy.
1285 (elf_find_pointer_linker_section): Likewise.
1286 (elf_create_pointer_linker_section): Likewise.
1287 (elf_finish_pointer_linker_section): Likewise.
1288 * elf32-i370.c: Delete #if 0 code.
1289
772119ce
AM
12902003-07-02 Alan Modra <amodra@bigpond.net.au>
1291
1292 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1293 _restf* to be satisfied by shared libs, and always force them local.
1294 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1295 Correct test for "bl".
1296 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1297 primary opcode 31.
1298
bd1ea41b
MS
12992003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1300
1301 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1302 (s390_tls_reloc): New function.
1303 (elf_howto_table): Add long displacement relocations R_390_20,
1304 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1305 (elf_s390_reloc_type_lookup): Likewise.
1306 (elf_s390_check_relocs): Likewise.
1307 (elf_s390_gc_sweep_hook): Likewise.
1308 (elf_s390_relocate_section): Likewise.
1309 * elf64-s390.c: Same changes as for elf32-s390.c.
1310 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1311 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1312 BFD_RELOC_390_TLS_GOTIE20.
1313 * bfd-in2.h: Regenerate.
1314 * libbfd.h: Likewise.
1315
113202d6
AM
13162003-06-30 Alan Modra <amodra@bigpond.net.au>
1317
1318 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1319 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1320
c58b9523
AM
13212003-06-29 Alan Modra <amodra@bigpond.net.au>
1322
1323 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1324 Replace PTR with void *. Formatting.
1325 * archive64.c: Likewise.
1326 * archures.c: Likewise.
1327 * bfd-in.h: Likewise.
1328 * bfd.c: Likewise.
1329 * bfdio.c: Likewise.
1330 * bfdwin.c: Likewise.
1331 * cache.c: Likewise.
1332 * corefile.c: Likewise.
1333 * format.c: Likewise.
1334 * init.c: Likewise.
1335 * libbfd-in.h: Likewise.
1336 * libbfd.c: Likewise.
1337 * linker.c: Likewise.
1338 * opncls.c: Likewise.
1339 * reloc.c: Likewise.
1340 * section.c: Likewise.
1341 * simple.c: Likewise.
1342 * syms.c: Likewise.
1343 * targets.c: Likewise.
1344 * bfd-in2.h: Regenerate.
1345 * libbfd.h: Regenerate.
1346
1347 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1348 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1349 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1350 (bfd_getb64): Rewrite without parens.
1351 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1352 * cache.c (insert, snip): Remove INLINE.
1353 * linker.c (bfd_link_add_undef): Likewise.
1354
27482721
AJ
13552003-06-29 Andreas Jaeger <aj@suse.de>
1356
1357 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1358 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1359 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1360 trim plt entries. Move undefweak non-default visibility test ...
1361 (allocate_dynrelocs): ... from here.
1362 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1363 Change all callers.
1364 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1365 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1366 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1367 dynreloc and .got relocs.
1368 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1369 for .got relocs.
27482721 1370
2b86c02e
TS
13712003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1372
1373 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1374
e7c81c25
NC
13752003-06-27 Nick Clifton <nickc@redhat.com>
1376
1377 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1378 bfd_add_gnu_debuglink_section and only create the section, do not
1379 fill in its contents.
1380 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1381 contents of a .gnu-debuglink section.
1382 * bfd-in2.h: Regenerate.
1383
72b4917c
TS
13842003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1385
1386 * elfxx-mips.c: Revert .got alignment to 2**4.
1387
91709090
TS
13882003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1389
1390 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1391
7a79a000
TS
13922003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1393
1394 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1395 relocation header setup.
1396
e47cd125
AM
13972003-06-25 Alan Modra <amodra@bigpond.net.au>
1398
1399 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1400 (ppc_elf_reloc_type_lookup): Modify comment.
1401 (ppc_elf_info_to_howto): Ditto.
1402 (ppc_elf_relocate_section): Ditto.
1403 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1404
1049f94e
AM
14052003-06-25 Alan Modra <amodra@bigpond.net.au>
1406
1407 * aout-ns32k.c: Correct spelling of "relocatable".
1408 * aoutx.h: Likewise.
1409 * bfd-in.h: Likewise.
1410 * bfd.c: Likewise.
1411 * bout.c: Likewise.
1412 * coff-a29k.c: Likewise.
1413 * coff-alpha.c: Likewise.
1414 * coff-arm.c: Likewise.
1415 * coff-i386.c: Likewise.
1416 * coff-i860.c: Likewise.
1417 * coff-i960.c: Likewise.
1418 * coff-m68k.c: Likewise.
1419 * coff-m88k.c: Likewise.
1420 * coff-mcore.c: Likewise.
1421 * coff-mips.c: Likewise.
1422 * coff-or32.c: Likewise.
1423 * coff-ppc.c: Likewise.
1424 * coff-rs6000.c: Likewise.
1425 * coff-sh.c: Likewise.
1426 * coff-tic80.c: Likewise.
1427 * coff64-rs6000.c: Likewise.
1428 * cofflink.c: Likewise.
1429 * cpu-ns32k.c: Likewise.
1430 * ecoff.c: Likewise.
1431 * ecofflink.c: Likewise.
1432 * elf-bfd.h: Likewise.
1433 * elf-eh-frame.c: Likewise.
1434 * elf-hppa.h: Likewise.
1435 * elf-m10200.c: Likewise.
1436 * elf-m10300.c: Likewise.
1437 * elf.c: Likewise.
1438 * elf32-arm.h: Likewise.
1439 * elf32-avr.c: Likewise.
1440 * elf32-cris.c: Likewise.
1441 * elf32-d10v.c: Likewise.
1442 * elf32-dlx.c: Likewise.
1443 * elf32-fr30.c: Likewise.
1444 * elf32-frv.c: Likewise.
1445 * elf32-h8300.c: Likewise.
1446 * elf32-hppa.c: Likewise.
1447 * elf32-i370.c: Likewise.
1448 * elf32-i386.c: Likewise.
1449 * elf32-i860.c: Likewise.
1450 * elf32-i960.c: Likewise.
1451 * elf32-ip2k.c: Likewise.
1452 * elf32-iq2000.c: Likewise.
1453 * elf32-m32r.c: Likewise.
1454 * elf32-m68hc11.c: Likewise.
1455 * elf32-m68hc1x.c: Likewise.
1456 * elf32-m68k.c: Likewise.
1457 * elf32-mcore.c: Likewise.
1458 * elf32-mips.c: Likewise.
1459 * elf32-msp430.c: Likewise.
1460 * elf32-openrisc.c: Likewise.
1461 * elf32-ppc.c: Likewise.
1462 * elf32-s390.c: Likewise.
1463 * elf32-sh.c: Likewise.
1464 * elf32-sh64.c: Likewise.
1465 * elf32-sparc.c: Likewise.
1466 * elf32-v850.c: Likewise.
1467 * elf32-vax.c: Likewise.
1468 * elf32-xstormy16.c: Likewise.
1469 * elf32-xtensa.c: Likewise.
1470 * elf64-alpha.c: Likewise.
1471 * elf64-hppa.c: Likewise.
1472 * elf64-mips.c: Likewise.
1473 * elf64-mmix.c: Likewise.
1474 * elf64-ppc.c: Likewise.
1475 * elf64-s390.c: Likewise.
1476 * elf64-sh64.c: Likewise.
1477 * elf64-sparc.c: Likewise.
1478 * elf64-x86-64.c: Likewise.
1479 * elfcode.h: Likewise.
1480 * elflink.h: Likewise.
1481 * elfn32-mips.c: Likewise.
1482 * elfxx-ia64.c: Likewise.
1483 * elfxx-mips.c: Likewise.
1484 * i386linux.c: Likewise.
1485 * ieee.c: Likewise.
1486 * libcoff-in.h: Likewise.
1487 * linker.c: Likewise.
1488 * m68klinux.c: Likewise.
1489 * pdp11.c: Likewise.
1490 * pe-mips.c: Likewise.
1491 * peXXigen.c: Likewise.
1492 * reloc.c: Likewise.
1493 * reloc16.c: Likewise.
1494 * sparclinux.c: Likewise.
1495 * sunos.c: Likewise.
1496 * syms.c: Likewise.
1497 * versados.c: Likewise.
1498 * vms.c: Likewise.
1499 * xcofflink.c: Likewise.
1500 * bfd-in2.h: Regenerate.
1501 * libcoff.h: Regenerate.
1502 * libbfd.h: Regenerate.
1503
55fd94b0
AM
15042003-06-24 Alan Modra <amodra@bigpond.net.au>
1505
d85f2c7d
AM
1506 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1507 local sym errors.
1508
55fd94b0
AM
1509 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1510 prototypes and casts. Replace PTR with void *. Formatting.
1511 * elf32-ppc.c: Likewise. Break long strings too.
1512 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1513 (ppc_elf_unhandled_reloc): Internationalize error message.
1514 * elf32-ppc.h: Remove PARAMS.
1515
88810f8c
MM
15162003-06-23 Mark Mitchell <mark@codesourcery.com>
1517
1518 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1519 APUinfo slots.
1520 (ppc_elf_final_write_processing): Likewise.
1521
6e35c4da
L
15222003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1523
1524 * elflink.h (elf_link_input_bfd): Check raw size when using
1525 kept_section to preserve debug information discarded by
1526 linkonce.
1527
8f3bab57
AM
15282003-06-20 Alan Modra <amodra@bigpond.net.au>
1529
1530 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1531 (ppc64_elf_setup_section_lists): Set it.
1532 (ppc64_elf_relocate_section): Check sym section id against top_id.
1533 (ppc_build_one_stub): Comment on top_id.
1534
efbc813e
NC
15352003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1536
1537 * config.bfd: Add tic4x-*-rtems*.
1538
4ce794b7
AM
15392003-06-20 Alan Modra <amodra@bigpond.net.au>
1540
1541 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1542 prototypes and casts. Replace PTR with void *. Format copyright.
1543 Mention ABI links.
1544 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1545 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1546 (ppc_type_of_stub): Make r_type an enum.
1547 (ppc64_elf_size_stubs): Likewise.
1548 * elf64-ppc.h: Remove PARAMS macro.
1549
d2a300cf
AM
15502003-06-19 Alan Modra <amodra@bigpond.net.au>
1551
3254fd24
AM
1552 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1553 elf hash tab fields.
1554
d2a300cf
AM
1555 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1556 (ppc64_elf_info_to_howto): Likewise.
1557 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1558 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1559
83615de0
AM
15602003-06-19 Alan Modra <amodra@bigpond.net.au>
1561
1562 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1563 reloc overflow on discarded eh_frame entries.
1564
9b5ecbd0
AM
15652003-06-19 Alan Modra <amodra@bigpond.net.au>
1566
1567 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1568 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1569 Return error condition.
1570 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1571 that have has_gp_reloc set.
1572 (struct ppc_link_hash_table): Add stub_count.
1573 (ppc_build_one_stub): Increment it.
1574 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1575 individual fields.
1576 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1577
64c456e1
AM
15782003-06-18 Alan Modra <amodra@bigpond.net.au>
1579
1580 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1581 size calculation from addend. Round size up.
1582
3dab95d3
HPN
15832003-06-18 Hans-Peter Nilsson <hp@axis.com>
1584
1585 * elf32-cris.c (cris_elf_relocate_section) <case
1586 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1587 symbol from a normal object or an undefined weak symbol.
1588
0b13192e
AM
15892003-06-18 Alan Modra <amodra@bigpond.net.au>
1590
1591 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1592 R_PPC64_TOC relocs.
1593
f97b9cb8
L
15942003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 * section.c (struct sec): Put back kept_section.
1597 (STD_SECTION): Put back kept_section initialization.
1598 * bfd-in2.h: Regenerate.
1599
1600 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1601 sections for relocateable output. Use kept_section to preserve
1602 debug information discarded by linkonce.
1603
9f1c3a0a
L
16042003-06-17 Roland McGrath <roland@redhat.com>
1605
1606 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1607 segment-relative relocation between different segments.
1608
734b6cf9
AM
16092003-06-17 Alan Modra <amodra@bigpond.net.au>
1610
1cf1f670
AM
1611 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1612 optimizations earlier.
1613
734b6cf9
AM
1614 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1615 Restore previous input_list type.
1616 (ppc64_elf_link_hash_table_create): Undo last change.
1617 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1618 per output section, but don't bother with bfd_abs_section marker.
1619 (ppc64_elf_next_input_section): Adjust for multiple input section
1620 lists.
1621 (group_sections): Likewise.
1622
23fbd6fa
JJ
16232003-06-17 Jakub Jelinek <jakub@redhat.com>
1624
1625 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1626 *r_offset == r_addend for RELATIVE relocs against .got.
1627
dad27d18
AM
16282003-06-17 Alan Modra <amodra@bigpond.net.au>
1629
1630 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1631
b613960a
NC
16322003-06-17 Nick Clifton <nickc@redhat.com>
1633
1634 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1635 in the vtable_entries_used array to allow for the accessing
1636 the largest element.
b613960a 1637
000732f7
AM
16382003-06-17 Alan Modra <amodra@bigpond.net.au>
1639
3d6f9012
AM
1640 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1641 input_list.
1642 (ppc64_elf_link_hash_table_create): Init input_list here.
1643 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1644 per output section. Set toc_off for abs and other standard sections.
1645 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1646 (ppc64_elf_next_input_section): Adjust for single input section list.
1647 Don't set toc_curr from input bfds that haven't set elf_gp.
1648 (group_sections): Adjust for single input section list.
1649
000732f7
AM
1650 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1651
81407a69
AM
16522003-06-16 Alan Modra <amodra@bigpond.net.au>
1653
1654 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1655 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1656 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1657 got section for RELATIVE relocs. Fix wrong comment. Change condition
1658 under which dynamic relocs update the section contents.
1659
a06a29f2
NC
16602003-06-13 Robert Millan <zeratul2@wanadoo.es>
1661
1662 * config.bfd: Add i386-netbsd-gnu target.
1663
7d1ebfb2
NC
16642003-06-12 Nick Clifton <nickc@redhat.com>
1665
1666 * opncls.c (calc_crc32): Rename to
1667 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1668 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1669 hard-coded ".gnu_debuglink" in the code.
81407a69 1670 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1671 xmalloc with a call to malloc.
81407a69 1672 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1673 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1674 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1675 section to a bfd.
1676 * bfd-in2.h: Regenerate.
1677
16782003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1679
7d1ebfb2
NC
1680 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1681 New target (was i[3-7]86-*-openbsd* before).
1682 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1683 (vax-*-openbsd*): New target.
1684
d80dcc6a
TS
16852003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1686
1687 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1688 for n32, too.
1689 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1690 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1691 (mips_elf_create_got_section): Likewise.
1692 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1693
a7ebbfdf
TS
16942003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1695
1696 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1697 (elf_mips_howto_table_rel): Use it.
1698 (gprel32_with_gp): Move prototype.
1699 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1700 Use mips_elf_generic_reloc.
1701 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1702 Code cleanup.
1703 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1704 zero addend.
1705 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1706 as in the other *_gprel*_reloc functions.
1707 (gprel32_with_gp): Handle partial_inplace properly.
1708 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1709 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1710 Do addend handling directly instead of calling
1711 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1712 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1713 of zero addend. Handle partial_inplace properly.
1714 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1715 addend.
1716 (mips_elf64_gprel16_reloc): Likewise.
1717 (mips_elf64_literal_reloc): Likewise.
1718 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1719 logic as in the other *_gprel*_reloc functions. Handle
1720 partial_inplace properly.
1721 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1722 addend. Handle partial_inplace properly.
1723 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1724 of calling _bfd_mips_elf_gprel16_with_gp.
1725 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1726 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1727 of zero addend.
1728 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1729 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1730 of calling _bfd_mips_elf_gprel16_with_gp.
1731 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1732 partial_inplace properly. Fix wrong addend handling. Fix overflow
1733 check.
1734 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1735 exported.
1736 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1737 (_bfd_mips_elf_relocate_section): Likewise.
1738 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1739 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1740 (_bfd_mips_elf_sign_extend): New prototype.
1741
49ba19a4 17422003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1743
49ba19a4
NC
1744 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1745 New target (was sparc-*-openbsd* before).
1746 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 1747
de6e5e1a
NC
1748 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1749 * configure: Regenerate.
1750
3b443373
L
17512003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1752
1753 * po/Make-in (DESTDIR): New.
1754 (install-data-yes): Support $(DESTDIR).
1755 (uninstall): Likewise.
1756
795bb480
AM
17572003-06-11 Alan Modra <amodra@bigpond.net.au>
1758
1759 * Makefile.am (config.status): Depend on version.h.
1760 Run "make dep-am".
1761 * Makefile.in: Regenerate.
1762 * po/SRC-POTFILES.in: Regenerate.
1763
adadcc0c
AM
17642003-06-10 Alan Modra <amodra@bigpond.net.au>
1765 Gary Hade <garyhade@us.ibm.com>
1766
1767 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1768
f4984206
RS
17692003-06-10 Richard Sandiford <rsandifo@redhat.com>
1770
1771 * archures.c (bfd_mach_h8300sxn): New architecture.
1772 * bfd-in2.h: Regenerate.
1773 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1774 (h8300sxn_info_struct): New.
1775 (h8300sx_info_struct): Link to it.
1776 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1777 (elf32_h8_final_write_processing): Likewise.
1778
ad8e1ba5
AM
17792003-06-08 Alan Modra <amodra@bigpond.net.au>
1780
1781 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1782 elfxx-target.h so that we can use elf_backend_got_header_size.
1783 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1784 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1785 associated macros.
1786 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1787 dst_mask.
1788 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1789 ppc_stub_plt_branch_r2off.
1790 (struct ppc_stub_hash_entry): Reorganize.
1791 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1792 toc_curr, toc_off and emit_stub_syms.
1793 (ppc64_elf_link_hash_table_create): Init them.
1794 (ppc_stub_name): Correct string size.
1795 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1796 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1797 used.
1798 (ppc_type_of_stub): Tweak root.type test.
1799 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1800 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1801 ppc_stub_plt_branch_r2off.
1802 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1803 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1804 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1805 Initialize elf_gp and toc_curr.
1806 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1807 (ppc64_elf_next_input_section): Set toc_off.
1808 (group_sections): Ensure groups have the same TOC.
1809 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1810 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1811 Build new glink stub.
1812 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1813 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1814 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1815 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1816 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1817 (STD_SECTION): Update.
1818 * ecoff.c (bfd_debug_section): Update comment.
1819 * bfd-in2.h: Regenerate.
1820
90fff0d4
DJ
18212003-06-05 Daniel Jacobowitz <drow@mvista.com>
1822
1823 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1824 NULL function pointers.
1825
c82b20e4
DJ
18262003-06-05 Daniel Jacobowitz <drow@mvista.com>
1827
1828 * simple.c (bfd_simple_get_relocated_section_contents): Call
1829 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1830
53d4437a
SS
18312003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1832
5a5b9651
SS
1833 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1834 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1835 swaptables.
1836 * coff-tic4x.c: Ditto
53d4437a
SS
1837 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1838 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
1839 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1840 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1841 swap tables.
53d4437a
SS
1842 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1843 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1844 * coff-apollo.c: Ditto
1845 * coff-arm.c: Ditto
1846 * coff-h8300.c: Ditto
1847 * coff-h8500.c: Ditto
1848 * coff-i960.c: Ditto
1849 * coff-m68k.c: Ditto
1850 * coff-m88k.c: Ditto
1851 * coff-mcore.c: Ditto
1852 * coff-sh.c: Ditto
1853 * coff-sparc.c: Ditto
1854 * coff-tic80.c: Ditto
1855 * coff-we32k.c: Ditto
1856 * coff-z8k.c: Ditto
1857 * coff-w65.c: Ditto
1858
736694c8
SS
18592003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1860
1861 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1862 initialization bug
1863
9ee5e499
JJ
18642003-06-03 Jakub Jelinek <jakub@redhat.com>
1865
1866 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1867 (bfd_section_from_phdr): Likewise.
1868 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1869 (get_program_header_size): Count with PT_GNU_STACK.
1870 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1871 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1872
6f6f27f8
L
18732003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 * elflink.h (elf_link_input_bfd): Call linker error_handler
1876 for discarded definitions.
1877
a3b6428f
NC
18782003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1879
1880 * syms.c (decode_section_type): Return 'n' if section flags are
1881 SEC_HAS_CONTENTS && SEC_READONLY.
1882
e30ddb24
NC
18832003-06-03 Nick Clifton <nickc@redhat.com>
1884
1885 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1886 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
1887 (v850_elf_reloc_map): Likewise.
1888 (v850_elf_check_relocs): Likewise.
1889 (v850_elf_perform_relocation): Likewise.
1890 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 1891 to make R_V850_REl32 pc-relative.
adadcc0c 1892
2558b9a9
KK
18932003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1894
1895 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1896 and DT_DEBUG dynamic tag even for position independent executables.
1897 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1898
f15398ef
DJ
18992003-06-02 Daniel Jacobowitz <drow@mvista.com>
1900
1901 * config.bfd: Move obsolete entries out of the range of the
1902 targmatch sed script.
1903
cad28985
DJ
19042003-06-02 Daniel Jacobowitz <drow@mvista.com>
1905
1906 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1907
f2c822e3
JJ
19082003-05-31 Jakub Jelinek <jakub@redhat.com>
1909
1910 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1911 plt entries, not just 8191.
1912
c9c27aad
DJ
19132003-05-30 Daniel Jacobowitz <drow@mvista.com>
1914
1915 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1916 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1917
36af4a4e
JJ
19182003-05-30 Ulrich Drepper <drepper@redhat.com>
1919 Jakub Jelinek <jakub@redhat.com>
1920
1921 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1922 instead of info->shared where appropriate.
1923 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1924 * elflink.c (_bfd_elf_create_got_section): Likewise.
1925 (_bfd_elf_link_create_dynamic_sections): Likewise.
1926 (_bfd_elf_link_assign_sym_version): Likewise.
1927 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1928 and DT_DEBUG dynamic tag even for position independent executables.
1929 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1930 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1931 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1932 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1933 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1934 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1935 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1936 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1937 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1938
f8843e87
AM
19392003-05-30 Kris Warkentin <kewarken@qnx.com>
1940
1941 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1942 signalled thread.
1943 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1944
29e1a6e4
NC
19452003-05-29 Nick Clifton <nickc@redhat.com>
1946
1947 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1948 Tidy up formatting.
1949 * Makefile.am: Add dependency on safe-ctype.h.
1950 * Makefile.in: Regenerate.
1951
4b555070
TS
19522003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1953
1954 * elfxx-mips.c: Don't force symbols local unconditionally.
1955
0236e03e
L
19562003-05-28 Alan Modra <amodra@bigpond.net.au>
1957
1958 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1959 undefined_symbol call.
1960
9e4aeb93
RS
19612003-05-27 Richard Sandiford <rsandifo@redhat.com>
1962
1963 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1964 (mips_elf_link_hash_table): Likewise.
1965
d0c728db
TS
19662003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1967
1968 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1969 R_MIPS_GNU_REL16_S2 support.
1970 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1971 (mips_elf64_rtype_to_howto): Use it.
1972 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1973 R_MIPS_GNU_REL16_S2 support.
1974 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1975 (mips_elf_n32_rtype_to_howto): Use it.
1976
759ebd76
DA
19772003-05-21 Stuart F. Downing <sdowning@fame.com>
1978
1979 * som.h: Define PA_2_0 before including a.out.h
1980
143d77c5
EC
19812003-05-07 Eric Christopher <echristo@redhat.com>
1982 Alexandre Oliva <aoliva@redhat.com>
1983
1984 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1985 pic tests, change to warning.
1986 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1987
cea3d58d
NC
19882003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1989
1990 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1991 well as shle-...-netbsdelf. Remove duplicate entry.
1992
385a4c14
NC
19932003-05-21 Nick Clifton <nickc@redhat.com>
1994
60e42408
NC
1995 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1996 for X_STORMY16_REL_12 reloc.
1997
385a4c14 1998 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 1999 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2000 (bfd_elf_get_runpath_list): Likewise.
2001
129b8c20
RM
20022003-05-19 Roland McGrath <roland@redhat.com>
2003
2004 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2005 * bfd-in.h: Declare it.
2006 * bfd-in2.h: Regenerated.
2007 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2008 * elf-bfd.h (struct elf_backend_data): New function pointer member
2009 elf_backend_bfd_from_remote_memory.
2010 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2011 Declare them.
2012 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2013 (elfNN_bed): Add that to the initializer.
2014
20152003-05-15 Roland McGrath <roland@redhat.com>
2016
2017 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2018
22d5e339
L
20192003-05-20 Jakub Jelinek <jakub@redhat.com>
2020
2021 * elflink.h (elf_link_output_extsym): Only issue error about !=
2022 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2023
20242003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2025
2026 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2027 when removing the old definition for symbols with non-default
2028 visibility.
2029
b645cb17
JE
20302003-05-18 Jason Eckhardt <jle@rice.edu>
2031
2032 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2033
d2ff124f
AS
20342003-05-17 Andreas Schwab <schwab@suse.de>
2035
2036 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2037 elf_section_data during processing of pc-relative and absolute
2038 relocations.
2039 (elf_m68k_relocate_section): Use the cached reloc section instead
2040 of computing it again. Fix handling of visibility. Don't modify
2041 addend when copying over a relocation into the output.
2042
9c7a29a3
AM
20432003-05-17 Alan Modra <amodra@bigpond.net.au>
2044
2045 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2046 to trim plt entries. Move undefweak non-default visibility test..
2047 (allocate_dynrelocs): ..from here.
2048 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2049 dynamic_sections_created here. Update comment. Move undefweak
2050 non-default visibility test..
2051 (allocate_dynrelocs): ..from here. Fix comment.
2052 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2053 to trim plt entries. Move undefweak non-default visibility test..
2054 (allocate_dynrelocs): ..from here. Fix comment.
2055 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2056 STV_DEFAULT rather than comparing with zero.
2057 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2058 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2059
9bcf4de0
TS
20602003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2061
2062 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2063 pointers.
2064 (_bfd_set_gp_value): Likewise.
2065
5d1db417
MS
20662003-05-16 Michael Snyder <msnyder@redhat.com>
2067 From Bernd Schmidt <bernds@redhat.com>
2068 * archures.c (bfd_mach_h8300sx): New.
2069 * bfd-in2.h: Regenerate.
2070 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2071 (h8300sx_info_struct): New.
2072 (h8300s_info_struct): Link to it.
2073 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2074 (elf32_h8_final_write_processing): Likewise.
2075 (elf32_h8_relax_section): Likewise.
2076
80c7c40a
NC
20772003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2078
2079 * config.bfd: Accept i[3-7]86 variants.
2080 * configure.host: Likewise.
2081 * configure.in: Likewise.
2082 * configure: Regenerate.
2083
c1be741f
L
20842003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2085
2086 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2087 symbol.
2088
a15d9d3a
L
20892003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2090
2091 * elflink.h (elf_link_check_versioned_symbol): Also allow
2092 the base version.
2093
09695f56
AM
20942003-05-15 Alan Modra <amodra@bigpond.net.au>
2095 H.J. Lu <hongjiu.lu@intel.com>
2096
2097 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2098 (elf_i386_relocate_section): Likewise.
2099 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2100 (ppc_elf_relocate_section): Likewise.
2101 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2102 (ppc64_elf_relocate_section): Likewise.
2103
40f62fa0
TS
21042003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2105
2106 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2107
47247ced
SC
21082003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2109
2110 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2111 processor capability, allow merge of HC12 and HCS12 in some cases.
2112 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2113 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2114 (bfd_m68hc12_arch): Link it.
2115 (scan_mach): New function.
2116
32dfa85d
AH
21172003-05-13 Andrew Haley <aph@redhat.com>
2118
2119 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2120
586119b3
AM
21212003-05-13 Alan Modra <amodra@bigpond.net.au>
2122 H.J. Lu <hongjiu.lu@intel.com>
2123
2124 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2125 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2126 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2127 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2128 (ppc_elf_relocate_section): Likewise.
2129 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2130 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2131 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2132 relocs need no other types.
2133 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2134 dynreloc check.
2135 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2136 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2137 .got relocs.
2138
04e534c3
KK
21392003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2140
2141 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2142 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2143 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2144 visibility, a) don't allocate plt entries, b) don't allocate
2145 .got relocs, c) discard dyn rel space
adadcc0c
AM
2146 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2147 don't generate dynamic relocs.
04e534c3
KK
2148 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2149 for weakdefs when symbol already adjusted.
2150
0afb2dc0
NC
21512003-05-12 Nick Clifton <nickc@redhat.com>
2152
2153 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2154 overflow detection for R_XSTORMY16_16 reloc.
2155
9d29900b
NC
21562003-05-12 Paul Clarke <paulc@senet.com.au>
2157
2158 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2159
a48c6a54
JE
21602003-05-11 Jason Eckhardt <jle@rice.edu>
2161
2162 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2163 adjust upper bits.
2164 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2165 proper place.
2166 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2167 proper place.
2168
44f745a6
AS
21692003-05-11 Andreas Schwab <schwab@suse.de>
2170
2171 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2172 complicated tests for unresolvable relocs with a simple direct
2173 scheme using "unresolved_reloc" var. Report some detail on
2174 bfd_reloc_outofrange and similar errors.
2175
4ec72bde
MS
21762003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2177
2178 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2179 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2180 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2181 * elf64-s390.c: Likewise.
2182
64285810
MS
21832003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2184
2185 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2186 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2187 ELF_LINK_NON_GOT_REF from weakdef.
2188 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2189 already been adjusted before treating it specially.
2190 * el64-s390.c: Likwise.
2191
82058a73
MS
21922003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2193
2194 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2195 non-default visibility, a) don't make them dynamic, b) discard
2196 space for dynamic relocs.
2197 (elf_s390_relocate_section): Initialize the GOT entries and skip
2198 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2199 symbols with non-default visibility.
2200 * elf64-s390.c: Likewise.
2201
60d8b524
AM
22022003-05-09 Alan Modra <amodra@bigpond.net.au>
2203
2204 * cpu-arm.c (arm_check_note): Warning fix.
2205 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2206 to keep relocs if edited.
2207 (iq2000_elf_print_private_bfd_data): Return TRUE.
2208 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2209 ELF64_R_SYM.
2210 (elfNN_ia64_relax_ldxmov): Warning fix.
2211 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2212 * xtensa-modules.c (get_num_opcodes): Warning fix.
2213
e57b5356
AM
22142003-05-09 Andrey Petrov <petrov@netbsd.org>
2215
2216 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2217
45d6a902
AM
22182003-05-09 Alan Modra <amodra@bigpond.net.au>
2219
2220 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2221 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2222 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2223 (bfd_elf_record_link_assignment): Move from elflink.h.
2224 (_bfd_elf_merge_symbol): Likewise.
2225 (_bfd_elf_add_default_symbol): Likewise.
2226 (_bfd_elf_export_symbol): Likewise.
2227 (_bfd_elf_link_find_version_dependencies): Likewise.
2228 (_bfd_elf_link_assign_sym_version): Likewise.
2229 (_bfd_elf_link_read_relocs): Likewise.
2230 (_bfd_elf_link_size_reloc_section): Likewise.
2231 (_bfd_elf_fix_symbol_flags): Likewise.
2232 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2233 (_bfd_elf_link_sec_merge_syms): Likewise.
2234 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2235 and bed->s->sizeof_rela.
2236 (_bfd_elf_link_output_relocs): Likewise.
2237 * elf-bfd.h (struct elf_size_info): Rename file_align to
2238 log_file_align.
2239 (struct elf_info_failed): Move from elflink.h.
2240 (struct elf_assign_sym_version_info): Likewise.
2241 (struct elf_find_verdep_info): Likewise.
2242 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2243 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2244 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2245 _bfd_elf_link_assign_sym_version,
2246 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2247 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2248 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2249 _bfd_elf_link_sec_merge_syms): Declare.
2250 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2251 (_bfd_elf32_link_read_relocs): Likewise.
2252 (bfd_elf64_link_create_dynamic_sections): Likewise.
2253 (_bfd_elf64_link_read_relocs): Likewise.
2254 * elflink.h: Move lots o' stuff elsewhere.
2255 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2256 (bfd_elf64_record_link_assignment): Likewise.
2257 (bfd_elf_record_link_assignment): Declare.
2258 * bfd-in2.h: Regenerate.
2259 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2260 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2261 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2262 (assign_file_positions_for_segments): Likewise.
2263 (assign_file_positions_except_relocs): Likewise.
2264 (swap_out_syms, elfcore_write_note): Likewise.
2265 * elf-m10200.c: Adjust for changed function names.
2266 * elf-m10300.c: Likewise.
2267 * elf32-arm.h: Likewise.
2268 * elf32-h8300.c: Likewise.
2269 * elf32-hppa.c: Likewise.
2270 * elf32-ip2k.c: Likewise.
2271 * elf32-m32r.c: Likewise.
2272 * elf32-m68hc11.c: Likewise.
2273 * elf32-m68hc1x.c: Likewise.
2274 * elf32-m68k.c: Likewise.
2275 * elf32-mips.c: Likewise.
2276 * elf32-ppc.c: Likewise.
2277 * elf32-sh.c: Likewise.
2278 * elf32-v850.c: Likewise.
2279 * elf32-xtensa.c: Likewise.
2280 * elf64-alpha.c: Likewise.
2281 * elf64-hppa.c: Likewise.
2282 * elf64-mmix.c: Likewise.
2283 * elf64-ppc.c: Likewise.
2284 * elf64-sh64.c: Likewise.
2285 * elfxx-ia64.c: Likewise.
2286 * elfxx-mips.c: Likewise.
2287 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2288 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2289 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2290 * elf64-mips.c (mips_elf64_size_info): Likewise.
2291 * elf64-s390.c (s390_elf64_size_info): Likewise.
2292 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2293
bf1e742e
L
22942003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2295
2296 * elflink.h (elf_add_default_symbol): After skipping the
2297 unversioned symbol, go to non-default one.
2298
6a32c710
L
22992003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2300
2301 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2302 want_plt field.
2303 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2304 for symbols with non-default visibility.
2305
71552942
L
23062003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2307
2308 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2309 case that a DSO references a hidden symbol which may be
2310 satisfied by a versioned symbol in another DSO.
2311 (elf_link_output_extsym): Check versioned definition for hidden
2312 symbol referenced by a DSO.
2313
208c2cd6
NC
23142003-05-07 Nick Clifton <nickc@redhat.com>
2315
2316 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2317 R_XSTORMY16_16 reloc to ignore overflows.
2318
aa701218
AO
23192003-05-06 Alexandre Oliva <aoliva@redhat.com>
2320
2321 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2322 error message for mixing different-endian files. Check for ABI
2323 compatibility of input files with the selected emulation.
2324
4e795f50
AM
23252003-05-05 Alan Modra <amodra@bigpond.net.au>
2326
2327 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2328 non-default visibility, a) don't make them dynamic, b) discard
2329 space for dynamic relocs.
2330 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2331
2332 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2333 non-default visibility, a) don't allocate plt entries, b) don't
2334 allocate .got relocs, c) discard dyn rel space,
2335 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2336 don't generate dynamic relocs.
2337 * elf64-ppc.c (allocate_dynrelocs): As above.
2338 (ppc64_elf_relocate_section): As above.
2339
4bc6e03a
AJ
23402003-05-05 Andreas Jaeger <aj@suse.de>
2341
2342 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2343 relocation entries for weak undefined symbols with non-default
2344 visibility.
2345 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2346 skip R_386_32/R_386_PC32 for weak undefined symbols with
2347 non-default visibility.
2348
ef5aade5
L
23492003-05-04 H.J. Lu <hjl@gnu.org>
2350
2351 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2352 relocation entries for weak undefined symbols with non-default
2353 visibility.
2354 (elf_i386_relocate_section): Initialize the GOT entries and
2355 skip R_386_32/R_386_PC32 for weak undefined symbols with
2356 non-default visibility.
129b8c20 2357
ef5aade5
L
2358 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2359 descriptors for weak undefined symbols with non-default
2360 visibility.
2361 (allocate_dynrel_entries): Don't allocate relocation entries
2362 for symbols resolved to 0.
2363 (set_got_entry): Don't install dynamic relocation for weak
2364 undefined symbols with non-default visibility.
2365 (set_pltoff_entry): Likewise.
2366
2367 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2368 with non-default visibility.
2369 (elf_link_output_extsym): Don't make weak undefined symbols
2370 with non-default visibility dynamic.
2371
c424e0e9
L
23722003-05-04 H.J. Lu <hjl@gnu.org>
2373
2374 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2375
d31e3dfe
L
23762003-05-04 H.J. Lu <hjl@gnu.org>
2377
2378 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2379 symbol dynamic. Check indirection when removing the old
2380 definition for symbols with non-default visibility.
2381 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2382
4d2e1ff0
NC
23832003-05-02 Nick Clifton <nickc@redhat.com>
2384
2385 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2386 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2387 unsigned overflow.
2388
d40d037c
AJ
23892003-05-02 Andreas Jaeger <aj@suse.de>
2390
2391 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2392 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2393 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2394 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2395 ELF_LINK_NON_GOT_REF from weakdef.
2396
c5d1701e
NC
23972003-05-02 Charles Lepple <clepple@ghz.cc>
2398 Nick Clifton <nickc@redhat.com>
2399
2400 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2401 * aclocal.m4: Regenerate.
2402 * configure: Regenerate.
2403 * Makefile.in: Regenerate.
2404
81848ca0
AM
24052003-05-01 Alan Modra <amodra@bigpond.net.au>
2406
2407 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2408 weakdef sym has already been adjusted before treating it specially.
2409 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2410 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2411 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2412 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2413
c7996ad6
L
24142003-04-28 H.J. Lu <hjl@gnu.org>
2415
2416 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2417 the relax finalize pass.
2418
2419 * section.c (struct sec): Add need_finalize_relax and remove
2420 flag11.
2421 (STD_SECTION): Update struct sec initializer.
2422 * bfd-in2.h: Regenerated.
2423
f006af20
L
24242003-04-28 H.J. Lu <hjl@gnu.org>
2425
2426 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2427 to copy any information related to dynamic linking when we flip
2428 the indirection.
2429
1b1fe8fe
L
24302003-04-27 H.J. Lu <hjl@gnu.org>
2431
2432 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2433 (ELF_LINK_DYNAMIC_WEAK): New.
2434
2435 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2436 a symbol should be skipped. Ignore definitions in dynamic
2437 objects for symbols with non-default visibility.
2438 (elf_add_default_symbol): Adjusted.
2439 (elf_link_add_object_symbols): Check if a symbol should be
2440 skipped. Don't merge the visibility field with the one from
2441 a dynamic object.
2442 (elf_link_check_versioned_symbol): Use undef_bfd.
2443 (elf_link_output_extsym): Warn if a forced local symbol is
2444 referenced from dynamic objects. Make non-weak undefined symbol
2445 with non-default visibility a fatal error.
2446
052a450c
DJ
24472003-04-27 Daniel Jacobowitz <drow@mvista.com>
2448
2449 * configure.in: Bump version on HEAD to 2.14.90.
2450 * configure: Regenerated.
2451
d204f4c0
SC
24522003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2453
2454 PR savannah/3331:
2455 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2456 when we couldn't relax something.
2457
3c0a515d
L
24582003-04-25 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elflink.h (elf_merge_symbol): When we find a regular definition
2461 for an indirect symbol, flip the indirection so that the old
2462 direct symbol now points to the new definition.
2463
d145330d
RM
24642003-04-24 Roland McGrath <roland@redhat.com>
2465
2466 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2467
fc0bffd6
AM
24682003-04-24 Alan Modra <amodra@bigpond.net.au>
2469
2470 * elf32-ppc.c: Formatting and comment fixes.
2471 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2472 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2473
24742003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2475
2476 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2477 * bfd-in2.h: Rebuilt.
2478 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2479 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2480 & H8300SNMAGIC.
2481 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2482 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2483 (h8300sn_info_struct, h8300hn_info_struct): New.
2484 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2485 (elf32_h8_final_write_processing): Likewise.
2486
267fb3c1
KK
24872003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2488
2489 * elf32-sh.c (tpoff): New.
2490 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2491 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2492 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2493 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2494 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2495 (dtpoff_base): Fix wrong indentation.
2496 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2497 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2498 R_SH_TLS_TPOFF32 relocations.
2499
ef230218
JR
25002003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2501
2502 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2503 * cpu-sh.c: Likewise.
2504 * elf32-sh.c: Likewise.
2505 * reloc.c (bfd_reloc_code_real): Likewise.
2506 * elf32-sh64-com.c: Change comment to refer to SuperH.
2507 * elf32-sh64.c: Likewise.
2508 * elf64-sh64.c: Likewise.
2509 * bfd-in2.h (enum bfd_architecture): Regenerate.
2510
8c29f035
AM
25112003-04-23 Alan Modra <amodra@bigpond.net.au>
2512
2513 From Julien LEMOINE <speedblue@debian.org>
2514 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2515 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2516
26597c86
NC
25172003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2518
2519 * archures.c: Replace references to Mitsubishi M32R with references
2520 to Renesas M32R.
2521 * relocs.c: Likewise.
2522 * bfd-in2.h: Regenerate.
2523
cc13e3ef
RH
25242003-04-21 Richard Henderson <rth@redhat.com>
2525
2526 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2527 executable when a symbol is defined both regular and dynamic.
2528
f5a6f915
SC
25292003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2530
2531 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2532 (elf32-m68hc1x.lo): Update dependencies
2533 * configure.in: Add elf32-m68hc1x.lo.
2534 * configure: Rebuild.
2535 * Makefile.in: Rebuild.
2536
3a65329d
SC
25372003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2538
2539 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2540 (m68hc11_elf_hash_table_create): New function.
2541 (elf32_m68hc11_link_hash_table_free): New function.
2542 (stub_hash_newfunc): New function.
2543 (m68hc11_add_stub): New function.
2544 (elf32_m68hc11_add_symbol_hook): New function.
2545 (elf32_m68hc11_setup_section_lists): New function.
2546 (elf32_m68hc11_next_input_section): New function.
2547 (elf32_m68hc11_size_stubs): New function.
2548 (elf32_m68hc11_build_stubs): New function.
2549 (m68hc11_get_relocation_value): New function.
2550 (elf32_m68hc11_relocate_section): Call the above to redirect
2551 some relocations to the trampoline code.
2552 (m68hc11_elf_export_one_stub): New function.
2553 (m68hc11_elf_set_symbol): New function.
2554 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2555 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2556 is not yet initialized.
2557
2558 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2559 (elf32_m68hc11_stub_hash_entry): New struct.
2560 (m68hc11_page_info): Add trampoline handler address.
2561 (m68hc11_elf_link_hash_table): Add stubs generation members.
2562 (elf32_m68hc11_add_symbol_hook): Declare.
2563 (elf32_m68hc11_setup_section_lists): Declare.
2564 (elf32_m68hc11_size_stubs): Declare.
2565 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2566
3a65329d
SC
2567 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2568 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2569 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2570 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2571 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2572 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2573 (bfd_elf32_bfd_link_hash_table_create): Define.
2574 (elf_backend_add_symbol_hook): Define.
2575 (m68hc11_elf_bfd_link_hash_table_create): New function.
2576 (m68hc11_elf_build_one_stub): New function.
2577 (m68hc11_elf_size_one_stub): New function.
2578 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2579 (bfd_elf32_bfd_link_hash_table_create): Define.
2580
2581 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2582 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2583 (m68hc12_phys_addr): Ditto.
2584 (m68hc12_phys_page): Ditto.
2585 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2586 (elf32_m68hc11_gc_mark_hook): Likewise.
2587 (elf32_m68hc11_gc_sweep_hook): Likewise.
2588 (elf32_m68hc11_check_relocs): Likewise.
2589 (elf32_m68hc11_relocate_section): Likewise.
2590 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2591 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2592 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2593 (m68hc12_elf_build_one_stub): New function.
2594 (m68hc12_elf_size_one_stub): New function.
2595 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2596 (elf_backend_add_symbol_hook): Define.
2597 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2598
4081944f
NC
25992003-04-18 Nick Clifton <nickc@redhat.com>
2600
2601 * format.c (bfd_check_format_matches): Only check associated
2602 vector if the matching_vector has been created.
2603
060dc71d
AO
26042003-04-15 Alexandre Oliva <aoliva@redhat.com>
2605
2606 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2607 2003-04-09's change.
2608
a3476bef
NC
26092003-04-15 Brian Ford <ford@vss.fsi.com>
2610
2611 * peicode.h (coff_swap_scnhdr_in): If a section holds
2612 uninitialized data and is from an object file or from an
2613 executable image that has not initialized the s_size field, or if
2614 the physical size is padded, use the virtual size (stored in
2615 s_paddr) instead.
2616
ca4fa240
NC
26172003-04-15 H.J. Lu <hjl@gnu.org>
2618
2619 * elflink.h (elf_link_add_object_symbols): Properly report
2620 filename for alignment reduction.
2621
c2dcd04e
NC
26222003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2623
2624 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2625 * reloc.c: Likewise.
2626 * coff-h8300.c: Likewise.
2627 * coff-h8500.c: Likewise.
2628 * coff-sh.c: Likewise.
2629 * cpu-h8300.c: Likewise.
2630 * cpu-sh.c: Likewise.
2631 * elf32-h8300.c: Likewise.
2632 * elf32-sh.c: Likewise.
2633 * elf32-sh64-com.c: Likewise.
2634 * elf32-sh64.c: Likewise.
2635 * elf64-sh64.c: Likewise.
2636 * bfd-in2.h: Regenerate.
2637
f7661995
NC
26382003-04-14 H.J. Lu <hjl@gnu.org>
2639
2640 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2641 alignment for common symbols. Warn reducing alignment for
2642 common symbols. Report old filename when symbol size changes.
2643
93a2b7ae
AO
26442003-04-12 Alexandre Oliva <aoliva@redhat.com>
2645
2646 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2647 occurrences of the same test changed in the previous patch.
2648 Optimize.
2649
0176c794
AO
26502003-04-11 Alexandre Oliva <aoliva@redhat.com>
2651
2652 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2653 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2654 GOT_DISP/addend only if the symbol got a global GOT entry.
2655
0fdc1bf1
AO
26562003-04-10 Alexandre Oliva <aoliva@redhat.com>
2657
2658 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2659 GOT_PAGE/GOT_OFST referencing overridable symbol to
2660 GOT_DISP/addend.
2661 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2662 global symbol as GOT_DISP.
2663
9b8c98a4
BW
26642003-04-10 Bob Wilson <bob.wilson@acm.org>
2665
2666 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2667 next relocation on an undefined symbol.
2668
ec1659c8
RH
26692003-04-09 Richard Henderson <rth@redhat.com>
2670
2671 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2672 Ignore relocations against r_symndx == 0.
2673
7dfb07f7
L
26742003-04-09 H.J. Lu <hjl@gnu.org>
2675
2676 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2677 FALSE for undefined symbols.
2678 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2679
a3805e4e
AO
26802003-04-09 Alexandre Oliva <aoliva@redhat.com>
2681
2682 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2683 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2684 addr_size.
2685
69931e60
AO
26862003-04-08 Alexandre Oliva <aoliva@redhat.com>
2687
2688 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2689 pointer size from ABI, not arch_bits_per_address.
2690
59a8c196
KB
26912003-04-07 Kevin Buettner <kevinb@redhat.com>
2692
2693 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2694 constants for n32 ABI.
2695
8e16317c
NC
26962003-04-06 Andrew Cagney <cagney@redhat.com>
2697
2698 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2699 free that leads to GDB vs BFD memory corruption.
2700
196486be
SC
27012003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2702
2703 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2704 symbols that mark the end of the section.
2705 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2706 converting to a relative branch so that the offset is computed after
2707 the relaxation; also relocate a jsr into a bsr if possible but don't
2708 relax them if they are to a far symbol as we need to call the
2709 trampoline code.
2710 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2711
be33c5dd
SS
27122003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2713
2714 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2715 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2716 * bfd-in2.h: Regenerate
2717 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2718 * cpu-tic4x.c: Ditto
2719
ff0c9faf
NC
27202003-04-03 Nick Clifton <nickc@redhat.com>
2721
2722 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2723 differently for object files and executables.
2724 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2725 for object files or for executables who have not already
2726 initialised the field.
2727 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2728 the PE format bfd is an executable.
2729
2b98e6c0
AM
27302003-04-03 Alan Modra <amodra@bigpond.net.au>
2731
2732 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2733 here as it's too early to reliably determine locality.
2734 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 2735 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 2736
92403579
BW
27372003-04-02 Bob Wilson <bob.wilson@acm.org>
2738
2739 * xtensa-modules.c: Remove comment indicating that this is a
2740 generated file.
2741
c45a316a
AM
27422003-04-02 Alan Modra <amodra@bigpond.net.au>
2743
2744 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2745
e0001a05
NC
27462003-04-01 Bob Wilson <bob.wilson@acm.org>
2747
8c29f035
AM
2748 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2749 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2750 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2751 xtensa-modules.lo.
2752 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2753 xtensa-modules.c.
2754 (cpu-xtensa.lo): New target.
2755 (elf32-xtensa.lo): Likewise.
2756 (xtensa-isa.lo): Likewise.
2757 (xtensa-modules.lo): Likewise.
2758 * Makefile.in: Regenerate.
2759 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2760 (bfd_archures_list): Add bfd_xtensa_arch.
2761 * config.bfd: Handle xtensa-*-*.
2762 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2763 * configure: Regenerate.
2764 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2765 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2766 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2767 (bfd_elf32_xtensa_le_vec): Likewise.
2768 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2769 * cpu-xtensa.c: New file.
2770 * elf32-xtensa.c: Likewise.
2771 * xtensa-isa.c: Likewise.
2772 * xtensa-modules.c: Likewise.
2773 * libbfd.h: Regenerate.
2774 * bfd-in2.h: Likewise.
e0001a05 2775
5a6c6817
NC
27762003-04-01 Nick Clifton <nickc@redhat.com>
2777
2778 * archures.c (bfd_mach_arm_unknown): Define.
2779 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2780 bfd_arm_get_mach_from_notes): Prototype.
2781 * bfd-in2.h: Regenerate.
2782 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2783 bfd_arm_merge_machines.
2784 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2785 * coffcode.h (coff_set_arch_mach_hook): Call
2786 bfd_arm_get_mach_from_notes.
2787 * coffgen.c (coff_real_object_p): Revert previous delta.
2788 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2789 .note section.
2790 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2791 binaries compiled for different architectures..
2792 (bfd_arm_update_notes): New function: Update an ARM note section.
2793 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2794 number from an ARM note section.
2795 * elf32-arm.h (elf32_arm_object_p): Use
2796 bfd_arm_get_mach_from_notes.
2797 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2798 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 2799
0cc1cf99
BE
28002003-04-01 Ben Elliston <bje@wasabisystems.com>
2801
2802 * dwarf2.c (read_attribute_value): Correct typo in comment.
2803
af3ef9fe
NC
28042003-04-01 Nick Clifton <nickc@redhat.com>
2805
2806 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2807 instead of concat().
2808 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
2809 (add_line_info): Make a copy of the filename when storing it into
2810 the info structure.
af3ef9fe 2811
6e84a906
DJ
28122003-03-31 Andreas Schwab <schwab@suse.de>
2813 Daniel Jacobowitz <drow@mvista.com>
2814
2815 * simple.c (bfd_simple_get_relocated_section_contents): Add
2816 parameter symbol_table. Optionally use it instead of the symbol
2817 table from the bfd. Save and restore output offsets and output
2818 sections around bfd_get_relocated_section_contents. Fix a memory
2819 leak.
2820 (simple_save_output_info, simple_restore_output_info): New
2821 functions.
2822 * bfd-in2.h: Regenerate.
2823 * dwarf2.c (read_abbrevs): Use
2824 bfd_simple_get_relocated_section_contents instead of
2825 bfd_get_section_contents.
2826 (decode_line_info): Likewise.
2827 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2828 find_rela_addend.
2829 (find_rela_addend): Remove.
2830 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2831 debugging sections.
2832 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2833 not bfd_zalloc.
2834
5ed6aba4
NC
28352003-03-31 David Heine <dlheine@suif.stanford.edu>
2836
2837 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2838 bfd_alloc.
2839 * dwarf2.c (concat_filename): Always allocate space for the
2840 returned filename.
2841 (decode_line_info): Free the allocated filename returned by
2842 concat_filename.
2843 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2844 * elf.c (copy_private_bfd_data): Likewise.
2845 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2846 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2847 * format.c (bfd_check_format_matches): Likewise.
2848 * linker.c (bfd_generic_final_link): Likewise.
2849 * opncls.c (find_separate_debug_info): Likewise.
2850 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 2851
5941afc1
L
28522003-03-28 H.J. Lu <hjl@gnu.org>
2853
2854 * elflink.h (elf_link_add_object_symbols): Correctly combine
2855 visibilities.
2856
9d73f260
JJ
28572003-03-27 Jakub Jelinek <jakub@redhat.com>
2858
2859 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2860 to -1 before recomputing got offsets.
2861
a5ad465a
AS
28622003-03-26 Andreas Schwab <schwab@suse.de>
2863
2864 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2865 (elf_m68k_relocate_section): Use it to correctly handle symbols
2866 forced to be local.
2867 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2868 entries for symbols that are forced to be local.
2869
d0647110
AO
28702003-03-25 Alexandre Oliva <aoliva@redhat.com>
2871
2872 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2873 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2874 * elfn32-mips.c, elf64-mips.c: Use it.
2875
e16bb312
NC
28762003-03-25 Stan Cox <scox@redhat.com>
2877 Nick Clifton <nickc@redhat.com>
8c29f035 2878
9b5ecbd0 2879 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
2880
2881 * archures.c: Add bfd_mach_arm_iWMMXt.
2882 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2883 * bfd-in2.h: Regenerate.
2884 * libbfd.h: Regenerate.
2885 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2886 object files to be linked with XScale ones.
2887 (coff_arm_final_link_postscript): Update note section.
2888 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2889 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2890 after identifying a coff binary.
2891 * cpu-arm.c (processors): Add iWMMXt.
2892 (arch_inf): Likewise.
2893 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 2894 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
2895 be linked with XScale ones.
2896 (elf32_arm_section_flags): New function: Set flags on note section.
2897 (elf32_arm_final_write_processing): Handle note section.
2898
25f14c34
DD
28992003-03-21 DJ Delorie <dj@redhat.com>
2900
2901 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2902 _bfd_elf_rela_local_sym.
2903
04b3329b
L
29042003-03-20 H.J. Lu <hjl@gnu.org>
2905
2906 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2907 non-ELF outputs.
2908
c25cfdf8
NC
29092003-03-20 Nick Clifton <nickc@redhat.com>
2910
2911 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2912 $idata5 in case bfd_coff_final_link is not called.
2913
3e1d7f19
JJ
29142003-03-19 Jakub Jelinek <jakub@redhat.com>
2915
2916 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2917 field.
2918 (canon_reloc_count): Define.
2919 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2920 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2921 reloc_count.
2922 (sparc64_elf_canonicalize_reloc): New routine.
2923 (bfd_elf64_canonicalize_reloc): Define.
2924
3fa1d917
JJ
29252003-03-18 Jakub Jelinek <jakub@redhat.com>
2926
2927 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2928 againt mergeable sections. Take r_addend into account when caching
2929 trampolines.
2930
f86b235a
RH
29312003-03-18 Richard Henderson <rth@redhat.com>
2932
8c29f035
AM
2933 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2934 local symbols that have no dyninfo.
f86b235a 2935
49ae03bf
NC
29362003-03-14 Gene Smith <gene.smith@siemens.com>
2937
2938 * ieee.c (ieee_write_expression): Handle the case where symbol is
2939 NULL.
2940 General formatting improvements.
2941
6a457e5c
NC
29422003-03-13 Nick Clifton <nickc@redhat.com>
2943
2944 * configure.in (LINGUAS): Add zh_CN.
2945 * configure: Regenerate.
2946 * po/zh_CN.po: New file.
2947
93516ec3
NC
29482003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2949
2950 * aout-cris.c (BYTES_IN_WORD): Don't define.
2951 aout-encap.c: Likewise.
2952 aout-ns32k.c: Likewise.
2953 aout-tic30.c: Likewise.
2954 hp300bsd.c: Likewise.
2955 i386aout.c: Likewise.
2956 i386dynix.c: Likewise.
2957 i386linux.c: Likewise.
2958 i386lynx.c: Likewise.
2959 i386mach3.c: Likewise.
2960 m68k4knetbsd.c: Likewise.
2961 m68klinux.c: Likewise.
2962 m68klynx.c: Likewise.
2963 m68knetbsd.c: Likewise.
2964 m88kmach3.c: Likewise.
2965 mipsbsd.c: Likewise.
2966 newsos3.c: Likewise.
2967 sparclinux.c: Likewise.
2968 sparclynx.c: Likewise.
2969 sparcnetbsd.c: Likewise.
2970 vaxbsd.c: Likewise. Fix comment formatting.
2971
fee24f1c
AO
29722003-03-12 Alexandre Oliva <aoliva@redhat.com>
2973
0b25d3e6
AO
2974 * Reverted 2003-03-02's patch.
2975
fee24f1c
AO
2976 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2977 overridable.
2978 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2979 mips_elf64_get_dynamic_reloc_upper_bound,
2980 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2981 (bfd_elf64_get_canonicalize_reloc,
2982 bfd_elf64_get_dynamic_reloc_upper_bound,
2983 bfd_elf64_canonicalize_dynamic_reloc): Define.
2984 (mips_elf64_slurp_reloc_table): Support dynamic.
2985 (mips_elf64_slurp_one_reloc_table): Adjust.
2986
64fb1839
NC
29872003-03-12 Nick Clifton <nickc@redhat.com>
2988
2989 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2990 'index' to 'offset' in test for zero value.
2991
908488f1
AO
29922003-03-11 Alexandre Oliva <aoliva@redhat.com>
2993
2994 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2995 dynamic relocations pointing to local or section symbols, use the
2996 NULL symbol instead. Document the choice to not emit an
2997 additional R_MIPS_64 relocation.
2998
e515b051
AM
29992003-03-11 Alan Modra <amodra@bigpond.net.au>
3000
3001 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3002 zero index dynamic tls relocs generated for the GOT. Tidy code.
3003 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3004 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3005
a23b6845
AM
30062003-03-07 Alan Modra <amodra@bigpond.net.au>
3007
87d243f1
AM
3008 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3009 a tls_get_addr call.
3010
a23b6845
AM
3011 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3012 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3013 ELF_LINK_NON_GOT_REF from weakdef.
3014 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3015 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3016 ELF_LINK_NON_GOT_REF from weakdef.
3017 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3018 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3019 ELF_LINK_NON_GOT_REF from weakdef.
3020
2d36fe5f
AH
30212003-03-06 Jakub Jelinek <jakub@redhat.com>
3022 Andrew Haley <aph@redhat.com>
3023
3024 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3025 output is relocateable.
3026
34f304a7
NC
30272003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3028
3029 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3030 R_COMMENT.
3031
7b609f53
AM
30322003-03-06 Alan Modra <amodra@bigpond.net.au>
3033
3034 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3035 error messages.
3036 (ELIMINATE_COPY_RELOCS): Define to zero.
3037 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3038 TLSLD relocs. Report reloc types on a number of errors. Optimize
3039 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3040 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3041 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3042 calculating TLSLD relocs. Report reloc types on a number of errors.
3043 Don't capitalize error messages.
3044
6a0fb186
L
30452003-03-03 H.J. Lu <hjl@gnu.org>
3046
3047 * elfxx-ia64.c (USE_BRL): Removed.
3048 (oor_ip): Removed.
3049
34f304a7 30502003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3051
3052 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3053 relocation (no special function), and make it non-partial_inplace.
3054 (sh_elf_relax_section): When creating a bsr, use a consistent value
3055 no matter if the symbol is extern or not; set addend to -4.
3056 Don't swap load / non-load instructions for SH4.
3057 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3058 rather than if the symbol is external to determine if adjusting the
3059 offset makes sense. Adjust the addend too if appropriate.
3060 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3061 relocation.
3062
a9d68a1e
NC
30632003-03-03 Nick Clifton <nickc@redhat.com>
3064
3065 * po/da.po: Installed latest translation.
3066
7c2be35c
TS
30672003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3068
3069 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3070 R_MIPS_PC16 to rightshift 2.
3071 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3072 (bfd_elf32_bfd_reloc_type_lookup): Support
3073 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3074 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3075 R_MIPS_PC16 to rightshift 2.
3076 (mips_elf64_howto_table_rela): Likewise.
3077 (mips_reloc_map): Map to rightshifted BFD reloc.
3078 * elfn32-mips.c: The same as in elf64-mips.c.
3079 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3080 (mips_elf_calculate_relocation): Handle rightshifted addends for
3081 R_MIPS_PC16.
3082 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3083 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3084 * libbfd.h: Regenerate.
3085 * bfd-in2.h: Regenerate.
3086
484a4f9c
RH
30872003-02-28 Richard Henderson <rth@redhat.com>
3088
3089 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3090 for ltoff22x relaxation.
3091
2ce40c65
AM
30922003-03-01 Alan Modra <amodra@bigpond.net.au>
3093
3094 * bfd-in.h (_bfd): Don't define.
3095 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3096 * syms.c: Likewise.
3097 * bfd-in2.h: Regenerate.
3098
2c4c2bc0
RH
30992003-02-27 Richard Henderson <rth@redhat.com>
3100
3101 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3102 (elfNN_ia64_check_relocs): Set it.
3103 (allocate_global_data_got): Check it.
3104 (allocate_local_got): Likewise.
3105 (allocate_dynrel_entries): Likewise.
3106 (elfNN_ia64_relax_ldxmov): New.
3107 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3108 (elfNN_ia64_choose_gp): Split out from ...
3109 (elfNN_ia64_final_link): ... here.
8c29f035 3110
c2852e88
AC
31112003-02-27 Andrew Cagney <cagney@redhat.com>
3112
3113 * bfd.c (struct bfd): Rename "struct _bfd".
3114 * bfd-in.h: Update copyright.
3115 (struct bfd): Rename "struct _bfd".
3116 (_bfd): Define for backward compatibility.
3117 * bfd-in2.h: Regenerate.
3118
3f87cb70
AM
31192003-02-25 Alan Modra <amodra@bigpond.net.au>
3120
3f9a32bd
AM
3121 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3122 and rel_hdr2 when initially counting input relocs rather than after
3123 creating output reloc sections.
4fabe71e
AM
3124 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3125 sizes.
3f9a32bd 3126
3f87cb70
AM
3127 * Makefile.am: Run "make dep-am".
3128 * Makefile.in: Regenerate.
3129
07c6e936
NC
31302003-02-24 Kris Warkentin <kewarken@qnx.com>
3131
3132 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3133 (elfcore_grog_nto_note): New function.
3134 (elfcore_grog_nto_gregs): New function.
3135 (elfcore_grog_nto_status): New function.
3136
aad5d350
AM
31372003-02-24 Alan Modra <amodra@bigpond.net.au>
3138
3139 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3140 section flags before concluding that we've already been called.
3141 Don't use register keyword.
3142 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3143 (_bfd_elf_create_linker_section): Formatting.
3144
2ab1486e
NC
31452003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3146
3147 * coff-h8300.c: Fix typo: intial -> initial.
3148 * coff-ppc.c: Likewise.
3149
70bccea4
AM
31502003-02-20 Alan Modra <amodra@bigpond.net.au>
3151
3152 * elf32-ppc.c: Formatting.
3153 (allocate_dynrelocs): LD and GD relocs against the same sym need
3154 separate GOT entries.
3155 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3156 entries per symbol.
3157
ee05f2fe
AM
31582003-02-19 Alan Modra <amodra@bigpond.net.au>
3159
26e41594
AM
3160 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3161 removal. Localize vars. Remove unnecessary dynobj test.
3162 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3163 of INFO.
3164 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3165 and optimize.
3166 (elf_i386_relocate_section): Likewise.
3167 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3168 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3169 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3170 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3171 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3172 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3173 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3174 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3175 Formatting.
3176
f4656909
AM
3177 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3178 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3179 test.
3180 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3181 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3182 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3183 and optimize. Use ELIMINATE_COPY_RELOCS.
3184 (ppc64_elf_relocate_section): Likewise.
3185
ee05f2fe
AM
3186 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3187 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3188 (ELIMINATE_COPY_RELOCS): Define.
3189 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3190 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3191 (MUST_BE_DYN_RELOC): Define.
3192 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3193 and optimize. Trim dyn_relocs.
3194 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3195 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3196 track of pc_rel dyn relocs.
3197 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3198 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3199 allocate_dynrelocs. Don't recalculate "sec".
3200
7619e7c7
AM
32012003-02-18 Alan Modra <amodra@bigpond.net.au>
3202
d881513a
AM
3203 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3204 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3205 on invalid LD relocs.
3206 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3207 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3208 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3209
7619e7c7
AM
3210 * elf32-ppc.h: New file.
3211 * elf32-ppc.c: Include elf32-ppc.h.
3212 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3213 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3214 Add "tls_mask" field.
3215 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3216 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3217 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3218 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3219 Make use of htab shortcuts throughout file.
3220 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3221 (ppc_elf_link_hash_table_create): Init new fields.
3222 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3223 (ppc_elf_howto_raw): Add tls relocs.
3224 (ppc_elf_reloc_type_lookup): Handle them.
3225 (ppc_elf_unhandled_reloc): New function.
3226 (ppc_elf_create_got): Stash got section pointer in hash table,
3227 return status. Make .rela.got too.
3228 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3229 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3230 NON_GOT_REF set. Don't allocate space in .plt here..
3231 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3232 not allocating plt entries unnecessarily. Allocate got entries here.
3233 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3234 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3235 "info" during allocate_dynrelocs hash traversal. Use htab section
3236 shortcuts rather than searching for named sections. Get rid of
3237 "plt" and "strip" booleans.
3238 (update_local_sym_info, bad_shared_reloc): New functions.
3239 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3240 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3241 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3242 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3243 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3244 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3245 relocs that might use a plt entry. Set NON_GOT_REF too.
3246 Enumerate all do-nothing relocs.
3247 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3248 tls relocs and all plt relocs.
3249 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3250 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3251 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3252 shortcuts.
3253 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3254 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3255 entries and got relocs here. Warn on non-zero got reloc addend.
3256 Split out branch taken/not taken reloc code into a separate switch
3257 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3258 Split out HA reloc adjustments to separate switch statement. Don't
3259 warn on reloc overflow if we've already warned about undefined.
3260 Don't rebuild sym name when reporting errors. Report all possible
3261 errors from _bfd_final_link_relocate.
3262 (bfd_elf32_bfd_final_link): Don't define.
3263
cd27b276
AM
32642003-02-18 Alan Modra <amodra@bigpond.net.au>
3265
3266 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3267 rebuild sym name when reporting errors.
3268
ae9a127f
NC
32692003-02-17 Nick Clifton <nickc@redhat.com>
3270
3f9a32bd 3271 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3272 allow_shlib_undefined for shared libraries.
3273 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3274 of allow_shlib_undefined.
3275 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3276 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3277 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3278 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3279 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3280 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3281 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3282 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3283 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3284 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3285 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3286 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3287 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3288 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3289 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3290 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3291
b5f852ea
NC
32922003-02-17 Nick Clifton <nickc@redhat.com>
3293
3294 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3295 address field to use in the comparison.
3f9a32bd 3296 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3297
3193e234
NC
32982003-02-14 Bob Wilson <bob.wilson@acm.org>
3299
3300 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3301 backends when checking if the generic ELF target should be used.
3302
21efdc8d
NC
3303 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3304 outside of functions, treat values as absolute addresses.
3305
ed781d5d
NC
3306 * bfd.c: Change embedded documentation to use consistent indentation
3307 and to split up long lines. Change informal style of description
3308 for functions lacking real documentation.
3309 * coffcode.h: Break up long lines in embedded documentation.
3310 * format.c: Likewise.
3311 * targets.c: Likewise.
3312 * libcoff.h: Regenerate.
3313 * bfd-in2.h: Regenerate.
3314
58ac9f71
AM
33152003-02-14 Alan Modra <amodra@bigpond.net.au>
3316
3317 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3318 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3319 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3320 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3321 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3322 (group_sections): Don't share a stub section if stubs are for a large
3323 section. Adjust comment.
3324 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3325 !stubs_always_before_branch.
3326 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3327 treat undefined and undefweak specially when processing dyn relocs.
3328
9147e853
JJ
33292003-02-13 Jakub Jelinek <jakub@redhat.com>
3330
3331 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3332
427bfd90
NC
33332003-02-13 Nick Clifton <nickc@redhat.com>
3334
3335 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3336 in computation of offset to insert into BL instruction.
3337
42b5d0ea
NC
33382003-02-11 Uwe Stieber <uwe@wwws.de>
3339
3340 * config.bfd: Add support for kaOS as cross build target system.
3341
a48ebf4d
AM
33422003-02-11 Alan Modra <amodra@bigpond.net.au>
3343
3344 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3345 .__tls_get_addr too.
3346 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3347
c95b8a7a
KK
33482003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3349
3350 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3351 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3352 (sh_elf_link_hash_newfunc): Remove the initialization of
3353 tls_tpoff32 field.
3354 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3355 for which tls_tpoff32 flag is set.
3356 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3357 of the symbol includes the entry matched with the input_section
3358 and having tls_tpoff32 flag on. When linking statically, set
3359 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3360 is defined in this executable.
3361 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3362
a779acda
JJ
33632003-02-10 Jakub Jelinek <jakub@redhat.com>
3364
3365 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3366 even if there is just non-empty .rela.plt.
3367
fde78edd
NC
33682003-02-10 Nick Clifton <nickc@redhat.com>
3369
3370 * archures.c (bfd_mach_arm_ep9312): Define.
3371 * bfd-in2.h: Regenerate.
3372 * cpu-arm.c (processors[]): Add ep9312.
3373 (bfd_arm_arch): Add ep9312.
3374 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3375 messages and add test for Maverick floating point support.
3376 (elf32_arm_print_private_bfd_data): Handle
3377 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3378 (elf32_arm_object_p): New function.
3379 (elf_backend_object_p): Define.
fde78edd 3380
e7b938ca
AM
33812003-02-10 Alan Modra <amodra@bigpond.net.au>
3382
3383 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3384 variables, structure fields or function params to tls_mask or
3385 similar to better reflect usage.
3386 (struct got_entry): Comment.
9b5ecbd0 3387 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3388 (get_tls_mask): Rename from get_tls_type.
3389
951fd09b
AM
33902003-02-09 Alan Modra <amodra@bigpond.net.au>
3391
3392 * elf64-ppc.c (TLS_GD_LD): Don't define..
3393 (TLS_GD): ..define this instead and update all uses.
3394 (TLS_TPRELGD): Define.
3395 (ppc64_elf_link_hash_table_create): Tweak initialization of
3396 init_refcount and init_offset.
3397 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3398 Mark second slot of GD or LD toc entries.
3399 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3400 from other tls types.
3401 (ppc64_elf_tls_setup): New function, split out from..
3402 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3403 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3404 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3405 return value to properly decide whether toc GD and LD entries can
3406 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3407 to determine GD or LD rather than looking at TLS_LD flag. Don't
3408 attempt to adjust got entry tls_type here..
3409 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3410 look for possible merges.
3411 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3412 optimization.
3413 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3414 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3415 Make use of return value from get_tls_type to properly detect GD and
3416 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3417 handle tls_get_addr removal when looking at REL24 relocs, do it when
3418 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3419 GD or LD.
3420 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3421
acc990f2
AM
34222003-02-08 Alan Modra <amodra@bigpond.net.au>
3423
00b28bb0
AM
3424 * elf32-hppa.c (group_sections): Don't share a stub section if
3425 stubs are for a large section.
3426
acc990f2
AM
3427 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3428 stubs if !stubs_always_before_branch.
3429
589e6347
NC
34302003-02-07 Nick Clifton <nickc@redhat.com>
3431
3432 * elf.c (swap_out_syms): Generate an error message if an
3433 equivalent output section cannot be found for a symbol.
3434
c328dc3f
JJ
34352003-02-07 Jakub Jelinek <jakub@redhat.com>
3436
3437 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3438 local_got_entries is NULL.
3439
84f97cb6
AS
34402003-02-06 Andreas Schwab <schwab@suse.de>
3441
3442 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3443 (read_value): Add parameter is_signed, use signed extraction if
3444 the value is signed.
3445 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3446 encoding to read_value.
3447
6349e628
AM
34482003-02-06 Alan Modra <amodra@bigpond.net.au>
3449
3450 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3451 plt info when called to transfer weak sym info.
3452
411e1bfb
AM
34532003-02-05 Alan Modra <amodra@bigpond.net.au>
3454
3455 * reloc.c: Add PPC and PPC64 TLS relocs.
3456 * libbfd.h: Regenerate.
3457 * bfd-in2.h: Regenerate.
3458 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3459 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3460 against a 32 bit field.
3461 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3462 (_ppc64_elf_section_data): Add t_symndx and comments.
3463 (ppc64_elf_section_data): Use elf_section_data macro.
3464 (ppc64_elf_new_section_hook): American spelling.
3465 (struct got_entry, struct plt_entry): New.
3466 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3467 (struct ppc_stub_hash_entry): Add "addend" field.
3468 (struct ppc_link_hash_entry): Add "tls_type".
3469 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3470 TLS_EXPLICIT): Define.
3471 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3472 (link_hash_newfunc): Init new fields.
58ac9f71 3473 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3474 init_offset to NULL.
3475 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3476 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3477 there.
3478 (update_local_sym_info, update_plt_info): New functions.
3479 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3480 handling to use got.glist rather than got.refcount. Likewise for PLT.
3481 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3482 (func_desc_adjust): Adjust for new PLT list.
3483 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3484 (get_sym_h, get_tls_type): New functions.
3485 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3486 (ppc64_elf_tls_optimize): New function.
3487 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3488 TLS relocs.
3489 (ppc64_elf_size_dynamic_sections): Likewise.
3490 (ppc_type_of_stub): Adjust for new PLT list.
3491 (ppc_build_one_stub): Likewise.
3492 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3493 calls specially.
3494 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3495 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3496 init GOT entries that have a reloc. Generate GOT relocs here..
3497 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3498 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3499
0cca5f05
AS
35002003-02-04 Andreas Schwab <schwab@suse.de>
3501
3502 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3503 (elf_m68k_link_hash_traverse): Remove.
3504 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3505 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3506 reduce casting.
3507 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3508 casting.
3509 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3510 instead of elf_m68k_link_hash_traverse.
3511 (elf_m68k_discard_copies): Change first parameter to pointer to
3512 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3513 elf_m68k_link_hash_entry is needed.
3514
5cab59f6
AM
35152003-02-04 Alan Modra <amodra@bigpond.net.au>
3516
3517 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3518 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3519 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3520 "plt" field.
3521 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3522 Add "init_offset" field.
3523 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3524 (elf_local_got_ents): Declare.
3525 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3526 and "plt".
3527 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3528 (_bfd_elf_link_hash_table_init): Set "init_offset".
3529 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3530 from init_offset.
3531 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3532
3533 * elf.c (bfd_elf_local_sym_name): Split out from..
3534 (group_signature): ..here.
3535 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3536
68bfbfcc
AM
35372003-02-04 Alan Modra <amodra@bigpond.net.au>
3538
3539 * elf-bfd.h (enum elf_link_info_type): Remove.
3540 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3541 to struct sec. Remove linkonce_p field.
3542 (elf_linkonce_p): Delete.
3543 (elf_discarded_section): Update for sec_info_type change.
3544 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3545 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3546 (ELF_INFO_TYPE_NONE): Define.
3547 (ELF_INFO_TYPE_STABS): Define.
3548 (ELF_INFO_TYPE_MERGE): Define.
3549 (ELF_INFO_TYPE_EH_FRAME): Define.
3550 (ELF_INFO_TYPE_JUST_SYMS): Define.
3551 (STD_SECTION): Update struct sec initializer.
3552 * ecoff.c (bfd_debug_section): Likewise.
3553 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3554 * elflink.h: Likewise.
3555 * elf-eh-frame.c: Likewise.
3556 * elf64-alpha.c: Likewise.
3557 * elfxx-ia64.c: Likewise.
3558 * elfxx-mips.c: Likewise.
3559 * bfd-in2.h: Regenerate.
3560
3561 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3562 referring to used_by_bfd.
3563 * elf64-sparc.c (sec_do_relax): Likewise.
3564 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3565 * elfxx-mips.c (mips_elf_section_data): Likewise.
3566 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3567 (ieee_get_section_contents): Likewise.
3568 (ieee_new_section_hook): Formatting.
3569 (ieee_canonicalize_reloc): Remove commented out code.
3570 * mmo.c (mmo_section_data): Define. Use throughout file.
3571 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3572
31f7ba04
NC
35732003-01-31 Graydon Hoare <graydon@redhat.com>
3574
3575 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3576 * Makefile.in: Regenerate.
3577 * opncls.c (calc_crc32, get_debug_link_info,
3578 seperate_debug_file_exists, find_seperate_debug_file): New
3579 internal functions.
3580 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3581 contained inside a .gnu_debuglink section.
3582 * bfd-in2.h: Regenerate.
3583
38985a1c
AO
35842003-01-29 Alexandre Oliva <aoliva@redhat.com>
3585
3586 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3587 entry->abfd when it's NULL.
3588
4bb9a95f
AO
35892003-01-27 Alexandre Oliva <aoliva@redhat.com>
3590
3591 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3592 _bfd_elf_section_offset returning -2 the same way as -1.
3593
f4416af6
AO
3594 * elfxx-mips.c (mips_elf_multi_got): New function.
3595 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3596 addend into union along with address and link hash entry.
3597 (struct mips_got_info): Added bfd2got and next.
3598 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3599 (mips_elf_got_section, mips_elf_create_got_section): Use
3600 SEC_EXCLUDE bit to tell whether we really need the got
3601 section. Take boolean arguments to disregard an excluded
3602 section, or to create it as excluded. Adjust all callers.
3603 Use mips_elf_got_section all over.
3604 (mips_elf_local_got_index, mips_elf_got_page,
3605 mips_elf_got16_entry): Take input bfd as argument, and pass it
3606 on to mips_elf_create_local_got_entry.
3607 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3608 Take input bfd as argument, and manage entries in the
3609 appropriate GOT.
3610 (mips_elf_got_offset_from_index): Take input bfd as argument,
3611 and use it to adjust the GP offset of the bfd.
3612 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3613 unreferenced GOT entries of global symbols to the end.
3614 (mips_elf_record_global_got_symbol): Take input bfd as
3615 argument. Add entries to the master GOT hash table.
3616 (struct mips_elf_bfd2got_hash): New.
3617 (struct mips_elf_got_per_bfd_arg): New.
3618 (struct mips_elf_set_global_got_offset_arg): New.
3619 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3620 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3621 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3622 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3623 mips_elf_resolve_final_got_entry,
3624 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3625 mips_elf_got_for_ibfd): New functions.
3626 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3627 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3628 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3629 (mips_elf_got_entry_hash): Take new fields into account. Use
3630 mips_elf_hash_bfd_vma.
3631 (mips_elf_got_entry_eq): Take new fields into account.
3632 (mips_elf_create_got_section): Initialize new fields.
3633 (mips_elf_calculate_relocation): Pass input_bfd to functions
3634 that now take it. Adjust gp for the input_bfd.
3635 (mips_elf_allocate_dynamic_relocation,
3636 mips_elf_create_dynamic_relocation,
3637 _bfd_mips_elf_create_dynamic_sections): Use...
3638 (mips_elf_rel_dyn_section): New function. Borrow code from...
3639 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3640 now take it. Create the got section if needed, even if
3641 excluded, before recording a global got symbol. Move some
3642 code to...
3643 (mips_elf_record_local_got_symbol): New fn.
3644 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3645 Compute multi-got global entries offsets. Move GOT code to...
3646 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3647 if the GOT is too big.
3648 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3649 undefweak symbol to zero. Generate dynamic relocations for
3650 non-primary GOT entries for global symbols.
3651 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3652 case. Generate dynamic relocations for local got entries.
3653 Sort dynamic relocations on N64 too, using...
3654 (sort_dynamic_relocs_64): New fns.
3655 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3656 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3657
52b69c9e
AO
36582003-01-27 Alexandre Oliva <aoliva@redhat.com>
3659
3660 * bfd.c (struct _bfd): Added id field.
3661 * opncls.c (_bfd_id_counter): New static variable.
3662 (_bfd_new_bfd): Use it.
3663 * bfd-in2.h: Rebuilt.
3664
71e5db1c
AM
36652003-01-25 Alan Modra <amodra@bigpond.net.au>
3666
3667 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3668
b9734f35
JJ
36692003-01-25 Jakub Jelinek <jakub@redhat.com>
3670
3671 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3672 (elf32_sparc_rev32_howto): New variable.
3673 (sparc_reloc_map): Add TLS relocs.
3674 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3675 Handle REV32.
3676 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3677 New functions.
3678 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3679 struct elf32_sparc_link_hash_table):
3680 New structures.
3681 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3682 elf32_sparc_hash_table): Define.
3683 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3684 create_got_section, elf32_sparc_create_dynamic_sections,
3685 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3686 functions.
3687 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3688 reference counting.
3689 (elf32_sparc_gc_sweep_hook): Likewise.
3690 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3691 (elf32_sparc_size_dynamic_sections): Likewise.
3692 (elf32_sparc_relocate_section): Likewise.
3693 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3694 New functions.
3695 (elf32_sparc_object_p): Allocate backend private object data.
3696 (bfd_elf32_bfd_link_hash_table_create,
3697 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3698 elf_backend_can_refcount): Define.
3699 (elf_backend_create_dynamic_sections): Define to
3700 elf32_sparc_create_dynamic_sections.
3701 * reloc.c: Add SPARC TLS relocs.
3702 * bfd-in2.h, libbfd.h: Rebuilt.
3703 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3704 (sparc_reloc_map): Likewise.
3705
69fc87f1
MS
37062003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3707
3708 * bfd-in2.h: Regenerate.
3709 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3710 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3711 (elf_howto_table): Add TLS relocs.
3712 (elf_s390_reloc_type_lookup): Likewise.
3713 (elf_s390_link_hash_entry): Add tls_type.
3714 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3715 New macros.
3716 (elf_s390_link_hash_table): Add tls_ldm_got.
3717 (link_hash_newfunc): Initialize tls_type.
3718 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3719 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3720 (elf_s390_check_relocs): Support TLS relocs.
3721 (elf_s390_gc_sweep_hook): Likewise.
3722 (allocate_dynrelocs): Likewise.
3723 (elf_s390_size_dynamic_sections): Likewise.
3724 (elf_s390_relocate_section): Likewise.
3725 (elf_s390_finish_dynamic_symbol): Likewise.
3726 (bfd_elf32_mkobject): Define for TLS.
3727 * elf64-s390.c: Same changes as for elf32-s390.c.
3728 * libbfd.h: Regenerate.
3729 * reloc.c: Add s390 TLS relocations.
3730
c5d1701e 37312003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
3732
3733 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3734
5177500f
NC
37352003-01-23 Nick Clifton <nickc@redhat.com>
3736
3737 * Add sh2e support:
5177500f 3738 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
3739 * archures.c (bfd_mach_sh2e): Added.
3740 * bfd-in2.h: Rebuilt.
3741 * cpu-sh.c (arch_info_struct): Added SH2e.
3742 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 3743
f0abc2a1
AM
37442003-01-23 Alan Modra <amodra@bigpond.net.au>
3745
3746 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3747 dynindx to an int. Rearrange for better packing.
3748 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3749 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3750 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3751 (struct _sh64_elf_section_data): New struct.
3752 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3753 * elf32-sh64-com.c: Include elf32-sh64.h.
3754 * elf32-sh64.c: Likewise.
3755 (sh64_elf_new_section_hook): New function.
3756 (bfd_elf32_new_section_hook): Define.
3757 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3758 (sh64_bfd_elf_copy_private_section_data): Likewise.
3759 (sh64_elf_final_write_processing): Likewise.
3760 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3761 (elf32_sparc_new_section_hook): New function.
3762 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3763 (sec_do_relax): Define.
3764 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3765 (elf32_sparc_relocate_section): Likewise.
3766 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3767 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3768 (mmix_elf_section_data): Define. Use throughout file.
3769 (mmix_elf_new_section_hook): New function.
3770 (bfd_elf64_new_section_hook): Define.
3771 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3772 (ppc64_elf_section_data): Define. Use throughout.
3773 (ppc64_elf_new_section_hook): New function.
3774 (bfd_elf64_new_section_hook): Define.
3775 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3776 (sparc64_elf_new_section_hook): New function.
3777 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3778 (sec_do_relax): Define.
3779 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3780 (sparc64_elf_relocate_section): Likewise.
3781 (bfd_elf64_new_section_hook): Define.
3782 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3783 * elfxx-mips.c (struct _mips_elf_section_data): New.
3784 (mips_elf_section_data): Define. Use throughout.
3785 (_bfd_mips_elf_new_section_hook): New function.
3786 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3787 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3788 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3789 * Makefile.am: Run "make dep-am".
3790 * Makefile.in: Regenerate.
3791
cc03ec80
RH
37922003-01-21 Richard Henderson <rth@redhat.com>
3793
3794 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3795 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3796 (elf64_alpha_adjust_dynamic_symbol): Set them.
3797 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3798 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3799 symbol index when relaxing LDM to TPREL.
3800 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3801 relocs, even if the target isn't locally defined.
3802 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3803 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3804 relocs vs symndx 0 to the tp base.
3805
da896d3f
NC
38062003-01-21 Fabio Alemagna <falemagn@aros.org>
3807
3808 * config.bfd: Handle i[3456]86-*-aros*.
3809
7fce784e
AS
38102003-01-21 Andreas Schwab <schwab@suse.de>
3811
3812 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3813 (struct ppc_elf_link_hash_entry): Define.
3814 (ppc_elf_hash_entry): New function.
3815 (struct ppc_elf_link_hash_table): Define.
3816 (ppc_elf_hash_table): New function.
3817 (ppc_elf_link_hash_newfunc): New function.
3818 (ppc_elf_link_hash_table_create): New function.
3819 (ppc_elf_copy_indirect_symbol): New function.
3820 (allocate_dynrelocs): New function.
3821 (readonly_dynrelocs): New function.
3822 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3823 relocs and determine DT_TEXTREL.
3824 (ppc_elf_check_relocs): Don't do that here, just count the
3825 dynamic relocs.
3826 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3827 removed section.
3828 (bfd_elf32_bfd_link_hash_table_create): Define.
3829 (elf_backend_copy_indirect_symbol): Define.
3830
1bbc9cec
RH
38312003-01-21 Richard Henderson <rth@redhat.com>
3832
3833 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3834 TPREL also get a reloc if shared. Remove SREL support.
3835 (elf64_alpha_emit_dynrel): New.
acc990f2 3836 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
3837 and GOTTPREL relocs to local symbols against the tp base.
3838 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3839
3840 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3841 use count before clobbering r_type.
3842 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3843 ordering would mean dataflow inspection is necessary.
3844
0da35f8b
SS
38452003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3846
3847 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 3848
571fe01f
NC
38492003-01-20 Fabio Alemagna <falemagn@aros.org>
3850
3851 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3852 elfxx-target.h and #undef it before #define'ing it.
3853 * elf32-i386.c: Likewise.
acc990f2
AM
3854 * elf32-sh64.c: Likewise.
3855 * elf64-alpha.c: Likewise.
3856 * elf64-sh64.c: Likewise.
571fe01f 3857
5236c819
MS
38582003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3859
3860 * bfd-in2.h: Regenerate.
3861 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3862 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3863 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3864 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3865 R_390_PLTOFF32 and R_390_PLTOFF64.
3866 (elf_s390_reloc_type_lookup): Likewise.
3867 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3868 of GOTPLT references to a function.
3869 (link_hash_newfunc): Initialize gotplt_refcount.
3870 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3871 and creation of the got section out of the main switch. Add support
3872 for the gotoff, gotplt and pltoff relocations.
3873 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3874 and pltoff.
3875 (elf_s390_adjust_gotplt): New function.
3876 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3877 plt entries.
3878 (allocate_dynrelocs): Add comment.
3879 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3880 for gotoff, gotplt and pltoff relocations.
3881 * elf64-s390.c: Same changes as for elf32-s390.c.
3882 * libbfd.h: Regenerate.
3883 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3884 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3885 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3886 and BFD_RELOC_390_PLTOFF64.
3887
a823975a
JJ
38882003-01-18 Jakub Jelinek <jakub@redhat.com>
3889
3890 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3891 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3892
b3dfd7fe
JJ
38932003-01-16 Jakub Jelinek <jakub@redhat.com>
3894
3895 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3896 self_dtpmod_done and self_dtpmod_offset.
3897 (allocate_global_data_got): Only use one got entry for all
3898 dtpmod relocs against local symbols.
3899 (allocate_dynrel_entries): Only need .rela.got entry for
3900 dtpmod against global symbol.
3901 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3902 Reserve space in .rela.got for the local dtpmod entry.
3903 (set_got_entry): Initialize the common local dtpmod .got entry.
3904 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3905 and R_IA_64_DTPREL64MSB.
3906
04c9666a
AM
39072003-01-16 Alan Modra <amodra@bigpond.net.au>
3908
3909 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3910 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3911 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3912 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3913 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3914 relative relocs, not with absolute ones.
3915 * Makefile.am: Run "make dep-am".
3916 * Makefile.in: Regenerate.
3917 * po/SRC-POTFILES.in: Regenerate.
3918
c87f1ff7
AS
39192003-01-15 Andreas Schwab <schwab@suse.de>
3920
3921 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3922 relocation against a non-allocated readonly section.
3923
86bbe32f
AM
39242003-01-10 Alan Modra <amodra@bigpond.net.au>
3925
3926 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3927 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3928
32d95f29
KD
39292002-01-08 Klee Dienes <kdienes@apple.com>
3930
3931 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3932 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3933 * Makefile.in: Regenerate.
acc990f2 3934
ab7d0aa0
AO
39352003-01-08 Alexandre Oliva <aoliva@redhat.com>
3936
3937 * elfn32-mips.c (prev_reloc_section): New.
3938 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3939 (SET_RELOC_ADDEND): Parenthesize macro argument.
3940
95d0f04a
DA
39412003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3942
3943 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3944 adjust addil instructions if the symbol has no section.
3945
5c9e189c
DD
39462003-01-07 DJ Delorie <dj@redhat.com>
3947
3948 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3949 partial_inplace.
3950
3e829b4a
AS
39512003-01-07 Andreas Schwab <schwab@suse.de>
3952
3953 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3954 PC relative relocations.
3955 (elf_m68k_discard_copies): Set it here instead.
3956
a75473eb
SC
39572002-01-02 Ben Elliston <bje@redhat.com>
3958 Jeff Johnston <jjohnstn@redhat.com>
3959
3960 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3961 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3962 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3963 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3964 (cpu-iq2000.lo): New target.
3965 * Makefile.in: Regenerate.
3966 * config.bfd: Handle iq2000-*-elf.
3967 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3968 (bfd_archures_list): Add bfd_iq2000_arch.
3969 * configure.in: Handle bfd_elf32_iq2000_vec.
3970 * configure: Regenerate.
acc990f2 3971 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
3972 and BFD_RELOC_IQ2000_UHI16.
3973 * targets.c (bfd_elf32_iq2000_vec): Declare.
3974 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3975 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3976 * cpu-iq2000.c: New file.
3977 * elf32-iq2000.c: Likewise.
3978 * libbfd.h: Regenerate.
3979 * bfd-in2.h: Likewise.
3980
64543e1a
RS
39812003-01-02 Richard Sandiford <rsandifo@redhat.com>
3982
3983 * elfxx-mips.c: Include libiberty.h.
3984 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3985 (mips_set_isa_flags): New function, split out from...
3986 (_bfd_mips_elf_final_write_processing): ...here. Only call
3987 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3988 (mips_mach_extensions): New array.
3989 (mips_32bit_flags_p): New function.
3990 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3991 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3992 other is 64-bit. When adopting IBFD's architecture, adopt the
3993 bfd_mach as well as the flags.
3994
4852a44e
NC
39952003-01-02 Nick Kelsey <nickk@ubicom.com>
3996
3997 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3998 fix internal errors, fix bad code generation, fix incorrect stabs
3999 information, and improve ability to eliminate redundant page
4000 instructions. Added code to ip2k_final_link_relocate to self-verify
4001 the linker relaxation. Fix formatting problems.
4002
af7ee8bf
CD
40032002-12-30 Chris Demetriou <cgd@broadcom.com>
4004
4005 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4006 * archures.c (bfd_mach_mipsisa32r2): New define.
4007 * bfd-in2.h: Regenerate.
4008 * cpu-mips.c (I_mipsisa32r2): New enum value.
4009 (arch_info_struct): Add entry for I_mipsisa32r2.
4010 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4011 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4012 (_bfd_mips_elf_final_write_processing): Add
4013 bfd_mach_mipsisa32r2 case.
4014 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4015 binaries marked as using MIPS32 Release 2.
4016
2469cfa2
NC
40172002-12-30 Dmitry Diky <diwil@mail.ru>
4018
4019 * Makefile.am: Add msp430 target.
4020 * configure.in: Likewise.
4021 * Makefile.in: Regenerate.
4022 * configure: Regenerate.
4023 * archures.c: Add msp430 architecture vector.
4024 * config.bfd: Likewise.
4025 * reloc.c: Add msp430 relocs.
4026 * targets.c: Add msp320 target.
4027 * cpu-msp430.c: New file: msp430 cpu detection.
4028 * elf32-msp430.c: New file: msp430 reloc processing.
4029 * bfd-in2.h: Regenerate.
4030 * libbfd.h: Regenerate.
4031
eecdbe52
JJ
40322002-12-28 Jakub Jelinek <jakub@redhat.com>
4033
4034 * elf.c (elf_sort_sections): Don't reorder .tbss.
4035 (assign_file_positions_for_segments): Only adjust off/voff
4036 for increased alignment in PT_LOAD or PT_NOTE segment,
4037 but adjust p_filesz for .tbss too. in PT_LOAD consider
4038 .tbss to have zero memory size.
4039 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4040 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4041 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4042 into PT_TLS segment. Never put SHF_TLS sections in
4043 segments other than PT_TLS or PT_LOAD.
4044
4045 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4046 sh_entsize.
4047
213e90f4
DD
40482002-12-23 DJ Delorie <dj@redhat.com>
4049
4050 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4051
75828352
AM
40522002-12-23 Alan Modra <amodra@bigpond.net.au>
4053
4054 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4055
312b768e
NC
40562002-12-23 Nick Clifton <nickc@redhat.com>
4057
4058 * archures.c (bfd_arch_get_compatible): Add third parameter
4059 'accept_unknowns'. Only accept unknown format BFDs if
4060 accept_unknowns is true, or if the format is "binary".
acc990f2 4061 * bfd-in2.h: Regenerate.
312b768e 4062
63222ec9
NC
40632002-12-21 Nick Clifton <nickc@redhat.com>
4064
4065 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4066 that subtracted 8 from pc relative relocations.
4067
19852a2a
KH
40682002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4069
4070 * coff-h8300.c: Fix comment typos.
4071 * coffcode.h: Likewise.
4072 * cpu-cris.c: Likewise.
4073 * elf32-vax.c: Likewise.
4074 * genlink.h: Likewise.
4075 * linker.c: Likewise.
4076 * som.c: Likewise.
4077 * tekhex.c: Likewise.
4078 * vms-misc.c: Likewise.
4079
5fd63999
DD
40802002-12-20 DJ Delorie <dj@redhat.com>
4081
4082 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4083 * libbfd.h: Regenerate.
4084 * bfd-in2.h: Regenerate.
4085 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4086 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4087
4ee79850
KH
40882002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4089
4090 * doc/bfdint.texi: Fix typos.
4091
66e25bab
AM
40922002-12-20 Paul Eggert <eggert@twinsun.com>
4093
4094 Port to POSIX 1003.1-2001.
4095 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4096 * configure.in (build-warnings): Likewise.
4097 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4098 * aclocal.m4: Regenerate.
4099 * config.in: Regenerate.
4100 * configure: Regenerate.
4101
7dc77aaa
AM
41022002-12-19 Alan Modra <amodra@bigpond.net.au>
4103
0171ee92
AM
4104 * coff-h8300.c: Include libiberty.h.
4105 (h8300_reloc16_extra_cases): Check the hash table creator before
4106 referencing h8300 specific fields. Stash the hash table pointer
4107 in a local var. Comment typo fixes.
4108 (h8300_bfd_link_add_symbols): Likewise.
4109
1049f94e 4110 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4111 dst_mask comments.
4112 * bfd-in2.h: Regenerate.
4113
47388f4c
AM
41142002-12-18 Alan Modra <amodra@bigpond.net.au>
4115
4116 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4117 code a little. Comment on dynamic relocs against section symbols.
4118
1b3e3744
AM
41192002-12-17 Roger Sayle <roger@eyesopen.com>
4120
4121 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4122 the HP compiler's "long long".
4123
46f2b541
DD
41242002-12-16 Andrew MacLeod <amacleod@redhat.com>
4125
4126 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4127 and R_XSTORMY16_HI16) howto entries.
4128 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4129 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4130 determine the start of the second reloc table.
4131
af738ea7
NC
41322002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4133
4134 * ecofflink.c: Fix the reading of the debugging information
4135 of Tru64/Alpha binaries that are produced by recent Compaq
4136 compilers.
4137 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4138 table.
4139 (lookup_line): Because of the strange information sometimes
4140 generated by Compaq's recent compilers, change how the FDR
4141 table is searched so that PDRs (procedure descriptors) are
4142 correctly found. Note that this change is really more of a hack;
4143 however, I have included extensive documentation as to why
4144 this is the best solution short of an extensive rewrite or
4145 another hack.
4146 (fdrtab_lookup): Add comments to explain the algorithm.
4147
5354b572
AO
41482002-12-12 Alexandre Oliva <aoliva@redhat.com>
4149
4150 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4151 initializers to match struct declaration.
4152
ab3acfbe
AM
41532002-12-12 Alan Modra <amodra@bigpond.net.au>
4154
4155 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4156 * elf.c (get_program_header_size): Likewise.
4157 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4158 (m32r_elf_generic_reloc): Likewise.
4159 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4160 * elflink.h (elf_bfd_discard_info): Likewise.
4161
6348e046
AM
41622002-12-12 Alan Modra <amodra@bigpond.net.au>
4163
4164 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4165 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4166 DT_RELSZ adjustment, not output section. Avoid writing tags when
4167 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4168 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4169 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4170 DT_RELASZ adjustment, not output section. Avoid writing tags when
4171 unchanged. Adjust DT_RELA.
4172 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4173 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4174
2e7a68a8
AO
41752002-12-12 Alexandre Oliva <aoliva@redhat.com>
4176
4177 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4178 addend by 4.
4179
b15e6682
AO
41802002-12-12 Alexandre Oliva <aoliva@redhat.com>
4181
4182 * elfxx-mips.c (struct mips_got_entry): New.
4183 (struct mips_got_info): Added got_entries field.
4184 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4185 (mips_elf_local_got_index, mips_elf_got_page,
4186 mips_elf_got16_entry): Re-implement in terms of new...
4187 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4188 Change return type.
4189 (mips_elf_highest): Warning clean-up.
4190 (mips_elf_create_got_section): Initialize got_entries.
4191 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4192 local got size.
4193 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4194 GOT_PAGE entries, since we now reuse GOT16 entries.
4195
e6af3a53
NC
41962002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4197
4198 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4199 read-only section that lies after .text and before .data to be
4200 written into the output file and included in a_text.
4201 (translate_to_native_sym_flags): If an otherwise unrepresentable
4202 section was merged with .text, convert its symbols to N_TEXT
4203 symbols.
4204 * libaout.h (aout_section_merge_with_text_p): New macro.
4205
cf3d882d
AM
42062002-12-08 Alan Modra <amodra@bigpond.net.au>
4207
4208 * bfd-in.h: Comment typo fix. Formatting.
4209 * bfd-in2.h: Regenerate.
4210 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4211 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4212 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4213
2f9bd3f6
RH
42142002-12-05 Richard Henderson <rth@redhat.com>
4215
4216 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4217 Only send PCREL21B though the plt. Fix installed reloc type.
4218 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4219 against PCREL22 or PCREL64I; clean up error messages for
4220 branch relocs.
4221
d0112f73
KB
42222002-12-04 Kevin Buettner <kevinb@redhat.com>
4223
4224 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4225 New functions.
4226 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4227
c10d9d8f
JW
42282002-12-04 David Mosberger <davidm@hpl.hp.com>
4229
4230 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4231
d48770d4
L
42322002-12-04 H.J. Lu <hjl@gnu.org>
4233
4234 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4235 BFD address when constructing local name.
4236
b6152c34
AS
42372002-12-04 Andreas Schwab <schwab@suse.de>
4238
4239 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4240 member.
4241 (elf_m68k_link_hash_table_create): Initialize it.
4242 (elf_m68k_check_relocs): Handle symbols that are forced to be
4243 local due to visibility changes.
4244 (elf_m68k_adjust_dynamic_symbol): Likewise.
4245 (elf_m68k_size_dynamic_sections): Likewise.
4246 (elf_m68k_discard_copies): Likewise.
4247 (elf_m68k_relocate_section): Likewise.
4248
73374ef1
AM
42492002-12-04 Alan Modra <amodra@bigpond.net.au>
4250
4251 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4252
c5c1944d
AM
42532002-12-04 Alan Modra <amodra@bigpond.net.au>
4254
4255 * srec.c (srec_write_symbols): Restore '$' prefix to address
4256 accidentally removed in 2002-04-04 change.
4257 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4258
e1a9cb8e
NC
42592002-12-03 Nick Clifton <nickc@redhat.com>
4260
4261 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4262 (apuinfo_list_add): New function: Add a value to the list.
4263 (apuinfo_list_length): New function: Return the number of
4264 values on the list.
4265 (apuinfo_list_element): New function: Return a value on the
4266 list.
4267 (apuinfo_list_finish): New function: Free the resources used
4268 by the list.
4269 (ppc_elf_begin_write_processing): New function. Scan the
4270 input bfds for apuinfo sections.
4271 (ppc_elf_write_section): New function: Delay the creation of
4272 the contents of an apuinfo section in an output bfd.
4273 (ppc_elf_final_write_processing): New function. Create the
4274 contents of an apuinfo section in an output bfd.
4275 (elf_backend_begin_write_processing): Define.
4276 (elf_backend_final_write_processing): Define.
4277 (elf_backend_write_section): Define.
e1a9cb8e 4278
a823923b
RH
42792002-12-03 Richard Henderson <rth@redhat.com>
4280
4281 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4282
30491647
SC
42832002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4284
4285 Fix PR savannah/1417:
4286 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4287 branch if it goes to the start of the deleted region.
4288
bc7c6a90
SC
42892002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4290
4291 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4292 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4293 bfd_mach_m6812s): Declare.
4294
4295 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4296 (_bfd_m68hc12_elf_set_private_flags): Call it.
4297 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4298 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4299 report microcontroller incompatibilities (HC12 vs HCS12).
4300 (elf_backend_object_p): Update.
4301
b34976b6
AM
43022002-11-30 Alan Modra <amodra@bigpond.net.au>
4303
4304 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4305 (enum bfd_boolean, boolean): Delete.
4306 (bfd_boolean): Typedef to an int.
4307 (FALSE, TRUE): Define.
4308 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4309 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4310 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4311 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4312 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4313 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4314 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4315 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4316 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4317 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4318 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4319 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4320 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4321 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4322 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4323 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4324 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4325 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4326 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4327 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4328 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4329 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4330 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4331 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4332 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4333 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4334 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4335 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4336 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4337 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4338 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4339 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4340 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4341 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4342 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4343 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4344 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4345 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4346 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4347 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4348 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4349 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4350 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4351 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4352 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4353 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4354 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4355 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4356 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4357 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4358 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4359 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4360 of bfd_boolean vars with TRUE/FALSE. Formatting.
4361 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4362
947216bf
AM
43632002-11-28 Alan Modra <amodra@bigpond.net.au>
4364
4365 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4366 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4367 with Elf_Internal_Rela.
4368 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4369 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4370 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4371 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4372 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4373 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4374 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4375 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4376 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4377 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4378 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4379 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4380 throughout instead.
4381 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4382 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4383 Remove INLINE keyword.
4384 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4385 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4386 as a bfd_byte *.
4387 (elf_write_relocs): Consolidate REL and RELA code.
4388 (elf_slurp_reloc_table_from_section): Simplify REL code.
4389 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4390 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4391 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4392 RELA code.
4393 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4394 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4395 (elf_link_output_relocs): Likewise.
4396 (elf_reloc_link_order): Likewise.
4397 (elf_finish_pointer_linker_section): Likewise.
4398 (struct elf_link_sort_rela): Remove union.
4399 (elf_link_sort_cmp1): Update to suit.
4400 (elf_link_sort_cmp2): Here too.
4401 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4402 over-allocation for int_rels_per_ext_rel != 1 case.
4403 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4404 * elf32-i386.c: Likewise.
4405 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4406 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4407 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4408 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4409 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4410 elf64-sparc.c, elf64-x86-64.c: Likewise.
4411 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4412 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4413 bfd_elf32_swap_reloc_in.
4414
4415 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4416 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4417 (mips_elf64_swap_reloc_in): Zero r_addend.
4418 (mips_elf64_be_swap_reloc_in): Likewise.
4419 (mips_elf64_slurp_one_reloc_table): Simplify.
4420
4421 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4422 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4423 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4424
1448fa32
KK
44252002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4426
4427 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4428 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4429 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4430
73722af0
AM
44312002-11-26 Alan Modra <amodra@bigpond.net.au>
4432
4433 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4434 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4435 on a relocatable link. Comment typos.
4436 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4437 in the order they are declared. Clear elf_hash_value too.
4438 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4439 eh_info and tls_segment.
4440 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4441 sorted when discarding relocs by turning them into R_*_NONE.
4442
4443 * libbfd.c (warn_deprecated): Comment spelling.
4444 * po/SRC-POTFILES.in: Regenerate.
4445
7c25b72c
RH
44462002-11-21 Richard Henderson <rth@redhat.com>
4447
4448 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4449 arch's st_other bits when merging visibilities.
4450 (elf_link_output_extsym): Tidy clearing of visibility field.
4451
dc12c51f
AM
44522002-11-21 Alan Modra <amodra@bigpond.net.au>
4453
4454 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4455 (SWAP_OUT_RELOC_OFFSET): Define.
4456
963f13ec
AO
44572002-11-20 Alexandre Oliva <aoliva@redhat.com>
4458
4459 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4460 can_refcount is properly extended to the type of
4461 init_refcount.
4462
ee6423ed
AO
44632002-11-19 Alexandre Oliva <aoliva@redhat.com>
4464
4ffba85c
AO
4465 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4466 (_bfd_mips_elf_relocate_section): Use it.
4467
ee6423ed
AO
4468 * elfxx-mips.c (MNAME): New macro.
4469 (_bfd_mips_elf_check_relocs): Use it.
4470 (_bfd_mips_elf_discard_info): Likewise.
4471 (_bfd_mips_elf_final_link): Likewise.
4472
cdcf6e38
AM
44732002-11-19 Alan Modra <amodra@bigpond.net.au>
4474
4475 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4476 rel_hdr.sh_size too.
4477
93509525
KD
44782002-11-18 Klee Dienes <kdienes@apple.com>
4479
4480 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4481 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4482 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4483 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4484 Add dependencies for bfdwin.c, bfdio.c.
4485 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4486 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4487 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4488 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4489 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4490 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4491 bfd_get_size (moved from libbfd.c and bfd.c).
4492 * bfdwin.c New file. Contains _bfd_window_internal,
4493 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4494 libbfd.c and bfd.c).
4495 * po/SRC-POTFILES.in: Regenerate.
4496 * po/bfd.pot: Regenerate.
4497 * libbfd.h: Regenerate.
4498 * bfd-in2.h: Regenerate.
4499 * aclocal.m4: Regenerate.
4500 * Makefile.in: Regenerate.
4501 * configure: Regenerate.
4502
3ae41454
AM
45032002-11-18 Klee Dienes <kdienes@apple.com>
4504
4505 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4506
e514ac71
NC
45072002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4508
4509 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4510 jsr after a short jump.
4511 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4512
eddc4f81
KD
45132002-11-15 Klee Dienes <kdienes@apple.com>
4514
4515 * pef.c (bfd_pef_convert_architecture): Move declaration of
4516 ARCH_POWERPC and ARCH_M68K to the start of the function.
4517
51908eee
SS
45182002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4519
4520 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4521
3416d2e7
HPN
45222002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4523
4524 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4525 For bpo_gregs_section->contents, allocate _raw_size, not
4526 _cooked_size.
4527
b1c58715
AM
45282002-11-13 Klee Dienes <kdienes@apple.com>
4529
4530 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4531
077ca68b
L
45322002-11-13 H.J. Lu <hjl@gnu.org>
4533
4534 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4535
e84d6fca
AM
45362002-11-13 Klee Dienes <kdienes@apple.com>
4537 Alan Modra <amodra@bigpond.net.au>
4538
4539 * bfd.c (struct bfd_preserve): New.
4540 (bfd_preserve_save): New function.
4541 (bfd_preserve_restore): Ditto.
4542 (bfd_preserve_finish): Ditto.
4543 * bfd-in2.h: Regenerate.
4544 * mach-o.c: Formatting.
4545 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4546 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4547 (bfd_mach_o_core_p): Ditto.
4548 (bfd_mach_o_scan): Pass in mdata.
4549 * mach-o.h (bfd_mach_o_scan): Update prototype.
4550 * pef.c: Formatting.
4551 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4552 (bfd_pef_xlib_object_p): Ditto.
4553 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4554 * pef.h (bfd_pef_scan): Update prototype.
4555 * xsym.c: Formatting, K&R fixes.
4556 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4557 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4558 * xsym.h (bfd_sym_scan): Declare.
4559 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4560 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4561 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4562
cd24c222
NC
45632002-11-12 Nick Clifton <nickc@redhat.com>
4564
4565 * po/da.po: Updated Danish translation.
4566
99eb2ac8
AM
45672002-11-12 Alan Modra <amodra@bigpond.net.au>
4568
d6fe2dc1
AM
4569 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4570 relocatable link too.
4571 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4572 eh_frame and stab sections. Zap deleted relocs.
4573 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4574 (elf_bfd_discard_info): Run for relocatable link too.
4575 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4576 Handle ld -r case.
4577 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4578 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4579
126495ed
AM
4580 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4581 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4582 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4583 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4584 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4585 (struct elf_link_hash_table): Add eh_info.
4586 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4587 (_bfd_elf_discard_section_eh_frame): Update prototype.
4588 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4589 (_bfd_elf_write_section_eh_frame): Likewise.
4590 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4591 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4592 param. Get "hdr_info" from link hash table.
4593 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4594 header section from link hash table. Save header section to elf_tdata.
4595 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4596 header section from link hash table. Don't alloc hdr_info. Clear
4597 hdr_sec instead of setting "strip".
4598 (_bfd_elf_eh_frame_section_offset): Formatting.
4599 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4600 Get header section from link hash table.
4601 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4602 Get header section from link hash table.
4603 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4604 (get_program_header_size): Likewise.
4605 (_bfd_elf_section_offset): Formatting.
4606 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4607 section pointer in link hash table.
4608 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4609 and _bfd_elf_write_section_eh_frame calls. Update comment about
4610 eh_frame entries.
4611 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4612 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4613
4614 * po/SRC-POTFILES.in: Regenerate.
4615
99eb2ac8
AM
4616 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4617 relocs for discarded FDEs. Remove dead code.
4618 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4619 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4620 Tidy conditions under which stabs are edited. Formatting.
4621 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4622 from discarded relocs.
4623 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4624 section adjustments after testing magic values.
4625
7c319a27
AM
46262002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4627
4628 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4629 references to large plt symbols.
4630
a95a4550
AM
46312002-11-12 Klee Dienes <kdienes@apple.com>
4632
4633 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4634 looking for an unused section name.
4635
bc7eab72
KH
46362002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4637
4638 * coff-h8300.c: Fix formatting.
4639 * elf32-h8300.c: Likewise.
4640 * reloc16.c: Likewise.
4641
52585bb8
AM
46422002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4643
4644 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4645 section when dynamic section unused; _bfd_strip_section_from_output
4646 instead.
4647
9f632188
AM
46482002-11-08 Alan Modra <amodra@bigpond.net.au>
4649
207b304b
AM
4650 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4651 and sym_vec.
3b029f65 4652
9f632188
AM
4653 * dwarf2.c: Revert last change.
4654
ec4530b5
NC
46552002-11-07 Michal Ludvig <mludvig@suse.cz>
4656
9b5ecbd0 4657 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4658 _bfd_dwarf2_find_nearest_line): Use
4659 bfd_simple_get_relocated_section_contents() instead of
4660 bfd_get_section_contents().
4661 * reloc.c (bfd_perform_relocation): Add sanity check.
4662 * simple.c (simple_get_relocated_section_contents): If the section
4663 does not have any relocs associated with it, just return the
4664 unadjusted contents.
4665
205cfeb0
HPN
46662002-11-07 Hans-Peter Nilsson <hp@axis.com>
4667
4668 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4669 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4670 contents, enabling for a non-DSO, for symbols defined in the
4671 program with --export-dynamic.
4672
87e226ce
AM
46732002-11-07 Alan Modra <amodra@bigpond.net.au>
4674
4675 * elf64-ppc.c: Comment typo fixes.
4676 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4677
235c4794
NC
46782002-11-07 Nick Clifton <nickc@redhat.com>
4679
4680 * po/da.po: Updated Danish translation.
4681
49179469
AO
46822002-11-06 Alexandre Oliva <aoliva@redhat.com>
4683
4684 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4685 exactly three internal relocs per external reloc. Set reloc_count
4686 to the external reloc count.
4687
246178f2
NC
46882002-11-06 Klee Dienes <kdienes@apple.com>
4689
3ae41454 4690 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4691 Fix comment formatting.
4692
3af9a47b
NC
46932002-11-06 Klee Dienes <kdienes@apple.com>
4694
3ae41454 4695 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4696 xsym.lo.
4697 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4698 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4699 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4700 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4701 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4702 sym.
3ae41454 4703 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
4704 * Makefile.in: Regenerate.
4705 * doc/Makefile.in: Regenerate.
3ae41454 4706 * bfd-in2.h: Regenerate.
3af9a47b
NC
4707 * xsym.c: New file. Contains support for the Apple/Metrowerks
4708 xSYM debugging format.
4709 * xsym.h: New file.
4710 * pef.c: New file. Contains support for the Apple Code Fragment
4711 Manager Preferred Executable Format
4712 * pef.h: New file.
4713 * pef-traceback.h: New file. Contains support for parsing PowerPC
4714 traceback tables as used by PEF executables (and perhaps other
4715 systems as well).
3ae41454 4716 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
4717 format.
4718 * mach-o.h: New file.
4719 * mach-o-target.c: New file. Declares the mach-o targets
4720 themselves. Included three times by mach-o.c; each time with a
4721 different set of macros set.
3ae41454 4722
b6821651 47232002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
4724
4725 * Makefile.am: Remove entries for elf32-qnx.[ch].
4726 * Makefile.in: Regenerate.
4727 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4728 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4729 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4730 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4731 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4732 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4733 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4734 * configure: Regenerate.
4735 * elf32-qnx.c: Remove.
4736 * elf32-qnx.h: Remove.
4737 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4738 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
4739 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4740 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
4741 * elf32-i386.c: Remove QNX extended bfd support.
4742 * elf32-ppc.c: Remove QNX extended bfd support.
4743 * elf32-sh.c: Remove QNX extended bfd support.
4744 * elfarm-nabi.c: Remove QNX extended bfd support.
4745 * targets.c: Remove qnx vectors.
4746 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4747 (elf_backend_is_contained_by_filepos): Remove.
4748 (elf_backend_copy_private_bfd_data_p): Remove.
4749 * po/SRC-POTFILES.in: Regenerate.
4750
b6821651
AM
47512002-11-06 David O'Brien <obrien@FreeBSD.org>
4752 Alan Modra <amodra@bigpond.net.au>
4753
4754 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4755 dynamic relocs against section symbols for the output section vma.
4756
47572002-11-05 Alan Modra <amodra@bigpond.net.au>
4758
4759 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4760 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4761
08f74004
AM
47622002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4763 Alan Modra <amodra@bigpond.net.au>
4764
4765 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4766 vectors in target_selvecs.
4767 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4768 in target_selvecs.
4769 (sh-*-netbsdelf*): Likewise.
4770 * configure.in (assocvecs): New variable. Handle assocvecs like
4771 selvecs.
4772 * configure: Regenerate.
4773 * format.c (bfd_check_format_matches): Store bfd_target pointers
4774 in matching_vector instead of target names. Select first target
4775 from bfd_associated_vector that matches a list of ambiguous targets.
4776 * targets.c (_bfd_associated_vector): New array.
4777 (bfd_associated_vector): New variable.
4778 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4779 * libbfd-in.h (bfd_associated_vector): Declare.
4780 * libbfd.h: Regenerate.
4781
89117aab
AM
47822002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4783
4784 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4785 non-NULL before dereferencing.
4786
5e9aae3e
KK
47872002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4788
4789 * vms.c (vms_object_p): Restore the start address when returning
4790 NULL.
4791
c97e73dd
AM
47922002-11-04 Alan Modra <amodra@bigpond.net.au>
4793 Hans-Peter Nilsson <hp@axis.com>
4794
4795 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4796 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4797 Set up a larger symshndxbuf, and write it out. Free it on
4798 exit rather than freeing symbuf twice. Correct section index
4799 on output section symbol loop.
4800 (elf_link_output_sym): Accumulate symbol extension section
4801 indices, reallocating symshndxbuf rather than writing it out.
4802 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4803 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4804 Use bfd_zalloc to clear i_shdrp[0] too.
4805
3463048e
SC
48062002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4807
4808 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4809 _raw_size of cranges section if _cooked_size not yet set.
4810
63a23799
HPN
48112002-11-03 Hans-Peter Nilsson <hp@axis.com>
4812
4813 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4814 for bfd_elf32_swap_symbol_out.
4815
e68cc12e
DB
48162002-10-31 David O'Brien <obrien@FreeBSD.org>
4817
4818 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4819 signed and unsigned in comparison.
4820
db4b6d01
DJ
48212002-10-30 Daniel Jacobowitz <drow@mvista.com>
4822
4823 * coffcode.h: Remove extraneous '\'.
4824
840f0243
L
48252002-10-28 H.J. Lu <hjl@gnu.org>
4826
4827 * Makefile.am (targets.lo): Depend on Makefile instead of
4828 config.status.
4829 (archures.lo): Likewise.
4830 * Makefile.in: Regenerated.
4831
05a7e2db
JT
48322002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4833
4834 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4835 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4836 targ_selvecs.
4837
a0087177
JW
48382002-10-25 Jim Wilson <wilson@redhat.com>
4839
4840 * elf64-sh64.c (sh_elf64_relocate_section): Call
4841 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4842 of SHF_MERGE section.
4843
8718ac9c
HPN
48442002-10-25 Hans-Peter Nilsson <hp@axis.com>
4845
4846 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4847
d45913a0
DA
48482002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4849
4850 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4851 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4852 unsigned int.
4853 (NAME(aout,final_link)): Cast enum used in assignment.
4854 (aout_link_write_symbols): Cast enums in comparisons, int values to
4855 boolean, enums in assignments to int.
4856 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
4857 (aout_link_input_section_ext): Likewise. Cast enums used in
4858 comparisons with unsigned ints.
d45913a0
DA
4859 (aout_link_reloc_link_order): Cast enum to int in assignment.
4860 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4861 calls to char *.
4862 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4863 assignment.
4864 * bfd-in2.h (bfd_set_section_vma): Likewise.
4865 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4866 * binary.c (bfd_alloc): Cast enum to long.
4867 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4868 * dwarf2.c (read_abbrevs): Add casts to enum types.
4869 (read_attribute_value): Likewise.
4870 (arange_add): Cast result of bfd_zalloc call.
4871 (comp_unit_contains_address): Return true and false.
4872 (comp_unit_find_nearest_line): Cast return to boolean.
4873 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4874 * gen-aout.c: define macro '_' if not defined.
4875 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4876 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4877 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4878 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4879 (bfd_generic_is_local_label_name): Cast return to boolean.
4880 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4881 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4882 struct bfd_hash_entry *.
4883 (_bfd_generic_link_hash_newfunc): likewise.
4884 (_bfd_generic_final_link): Cast enum to unsigned int.
4885 * merge.c (sec_merge_emit): Cast return to boolean.
4886 (merge_strings): Add casts to const unsigned char *.
4887 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4888 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
4889 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4890 to struct bfd_hash_entry *.
d45913a0
DA
4891 (bfd_set_section_content): Add cast to PTR in comparison.
4892 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4893 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4894 simple_dummy_unattached_reloc,
4895 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4896 function definitions.
4897 * srec.c (S3Forced): Initialize to false.
4898 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4899 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4900 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4901 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4902 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4903 comparisons.
4904
475c2a7e
JJ
49052002-10-23 Jakub Jelinek <jakub@redhat.com>
4906
4907 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4908 relocs into shared lib non-allocated reloc sections.
4909
e82ce529
AM
49102002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4911
4912 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4913 sorted even when given an out-of-order line sequence.
4914 (lookup_address_in_line_info_table): When an exact VMA match is
4915 not found, return line information with the closest VMA.
4916
f2482cb2
NC
49172002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4918
4919 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4920 HPUX 11.00 patch PHSS_26559.
4921
c1fd6598
AO
49222002-10-22 Alexandre Oliva <aoliva@redhat.com>
4923
4924 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4925 the options section into a separate section unless IRIX 6
4926 compatibility is enabled.
4927
033fd5f9
AO
49282002-10-22 Alexandre Oliva <aoliva@redhat.com>
4929
4930 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4931 into arrays.
4932 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4933 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4934 into account.
4935 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4936 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4937
ef485c01
AM
49382002-10-21 Graeme Peterson <gp@qnx.com>
4939
4940 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4941
b50afec9
AM
49422002-10-21 Alan Modra <amodra@bigpond.net.au>
4943
4944 * targets.c (bfd_target_list): Don't return the default target twice.
4945
5fe39cae
AM
49462002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4947
4948 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4949 perror with bfd_perror.
4950
5d603aa9
L
49512002-10-19 H.J. Lu <hjl@gnu.org>
4952
4953 * elflink.h (elf_link_add_object_symbols): Correctly handle
4954 DT_RPATH and DT_RUNPATH.
4955
e377ab71
MK
49562002-10-19 Mark Kettenis <kettenis@gnu.org>
4957
4958 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4959
0d09fec6
DC
49602002-10-17 Denis Chertykov <denisc@overta.ru>
4961
4962 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4963 for ip2k port.
4964
acf8aed4
AM
49652002-10-17 Alan Modra <amodra@bigpond.net.au>
4966
4967 * elfxx-target.h (USE_REL): Don't define as 1.
4968 * elf32-arm.h (USE_REL): Provide a default define of 0.
4969 Use #if rather than #ifdef when testing USE_REL.
4970 * elf32-m32r.c: Likewise.
4971
4972 * elf32-arc.c (USE_REL): Define as 1.
4973 * elf32-d10v.c (USE_REL): Likewise.
4974 * elf32-m32r.c (USE_REL): Likewise.
4975 * elf32-m68hc11.c (USE_REL): Likewise.
4976 * elf32-m68hc12.c (USE_REL): Likewise.
4977 * elf32-or32.c (USE_REL): Likewise.
4978 * elfarm-nabi.c (USE_REL): Likewise.
4979
f52d1d64
JJ
49802002-10-16 Jakub Jelinek <jakub@redhat.com>
4981
4982 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4983 (s390x-*-linux*): Add targ_selvecs.
4984
2bc3c89a
AM
49852002-10-16 Alan Modra <amodra@bigpond.net.au>
4986
4987 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 4988 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
4989 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4990 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4991 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4992 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4993 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4994 (SOURCE_HFILES): Add elf32-qnx.h.
4995 (BUILD_HFILES): Add bfdver.h.
4996 Run "make dep-am".
4997 * Makefile.in: Regenerate.
4998 * configure.in Update bfd vector dependencies.
4999 * configure: Regenerate.
5000 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5001 * elf32-i386qnx.c: Likewise.
5002 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5003 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5004 * elf32-sh-lin.c: Likewise.
5005 * elf32-shqnx.c: Likewise.
5006 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5007 * elf32-sh64-nbsd.c: Likewise.
5008 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5009 * elf64-sh64-nbsd.c: Likewise.
5010 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5011 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5012 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5013 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5014 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5015 (elf_backend_is_contained_by_filepos): Likewise.
5016 (elf_backend_copy_private_bfd_data_p): Likewise.
5017 Globalize and move functions to..
5018 * elf32-qnx.c: ..here. New file.
5019 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5020 emit target vectors when INCLUDE_SHMEDIA.
5021 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5022 end of file.
5023 * elf64-sh64.c: Remove ELF_ARCH test.
5024 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5025 * po/BLD-POTFILES.in: Regenerate.
5026 * po/SRC-POTFILES.in: Regenerate.
5027
90c9df85
AM
50282002-10-16 Alan Modra <amodra@bigpond.net.au>
5029
366f2964
AM
5030 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5031 loaded with --just-symbols.
5032
90c9df85
AM
5033 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5034 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5035 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5036 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5037
2238051f
RH
50382002-10-15 Richard Henderson <rth@redhat.com>
5039
5040 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5041 (BFD64_BACKENDS_CFILES): Likewise.
5042 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5043 * elf64-alpha-fbsd.c: Remove file, move code ...
5044 * elf64-alpha.c: ... here.
5045 * Makefile.in, configure: Rebuild.
5046
64e04ecd
RH
50472002-10-14 Richard Henderson <rth@redhat.com>
5048
5049 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5050 VALUE, not ADDEND.
5051
396a6083
SC
50522002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5053
5054 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5055 datalabel_got_offset with union of datalabel_got
5056 offset and refcount.
5057 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5058 (allocate_dynrelocs): Delete unnecessary code for
5059 STT_DATALABEL type. Create entry in got for
5060 datalabel version of symbol if datalabel_got.refcount > 0.
5061 (sh_elf_relocate_section): Use datalabel_got union.
5062 (sh_elf_gc_sweep_hook): Pull common code to initialize
5063 h and eh out of switch statement. Declare seen_stt_datalabel.
5064 Initialize it. Decrement datalabel_got.refcount for
5065 got relocs when seen_stt_datalabel is true.
5066 Decrement local_got_refcounts entry for datalabel got relocs
5067 of local symbols.
5068 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5069 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5070 Initialize it. When seen_stt_datalabel is true, increment
5071 datalabel_got refcount rather than got.refcount.
5072 (sh_elf_finish_dynamic_symbol): Create relocs to
5073 initialize got entry for datalabel version of symbol.
5074
6a0735ef
AM
50752002-10-14 Alan Modra <amodra@bigpond.net.au>
5076
5077 * Makefile.am: Run "make dep-am".
5078 (BFD_H_FILES): Remove version.h.
5079 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5080 * version.h: ..to here.
5081 * configure.in (bfd_version_date): Remove.
5082 (AC_OUTPUT): Make bfdver.h from version.h.
5083 * bfd.c: #include "bfdver.h".
5084 * vms-hdr.c: Likewise.
5085 * Makefile.in: Regenerate.
5086 * bfd-in2.h: Regenerate.
5087 * configure: Regenerate.
5088 * po/SRC-POTFILES.in: Regenerate.
5089
686e4055
AM
50902002-10-14 Alan Modra <amodra@bigpond.net.au>
5091
5092 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5093 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5094 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5095 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5096 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5097 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5098 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5099 bfd_mach_ip2022, bfd_mach_ip2022ext,
5100 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5101 * bfd-in2.h: Regenerate.
5102
019dca2b
KK
51032002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5104
5105 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5106 endian vector to targ_selvecs.
5107
bce03d3d
AO
51082002-10-13 Alexandre Oliva <aoliva@redhat.com>
5109
5110 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5111 save_addend argument. Don't apply the 32-bit mask to a
5112 GPREL32 value if it's to be used in another relocation. Don't
5113 use forced-check computation of local_p to decide whether to
5114 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5115 of the addend of a non-in-place GPREL16 relocation.
5116 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5117 mips_elf_calculate_relocation().
5118
9b691193
SC
51192002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5120
5121 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5122 with symbols in other sections if we relaxed something; the sections
5123 output offsets must be re-computed before.
5124
1f4c5b47
SC
51252002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5126
5127 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5128 handling to use Elf_Internal_Sym.
5129 (m68hc11_elf_relax_delete_bytes): Likewise.
5130
5dc97655
KK
51312002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5132
5133 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5134 sh_elf_object_p, dtpoff_base): New functions.
5135 (sh_elf_howto_table): Add TLS relocs.
5136 (sh_reloc_map): Likewise.
5137 (sh_elf_info_to_howto): Support TLS relocs.
5138 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5139 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5140 New macros.
5141 (sh_elf_obj_tdata): New.
5142 (elf_sh_link_hash_table): Add tls_ldm_got.
5143 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5144 (allocate_dynrelocs): Support TLS relocs.
5145 (sh_elf_size_dynamic_sections): Likewise.
5146 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5147 .rela.got section when found already. Return false after printing
5148 error about unresolvable relocation.
5149 (sh_elf_gc_sweep_hook): Support TLS relocs.
5150 (sh_elf_check_relocs): Likewise.
5151 (sh_elf_finish_dynamic_symbol): Likewise.
5152 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5153 * reloc.c: Add SH TLS relocs.
5154 * bfd-in2.h, libbfd.h: Regenerate.
5155
6a0735ef
AM
51562002-10-11 Daniel Jacobowitz <drow@mvista.com>
5157
5158 * Makefile.in: Regenerated.
5159
af39267e
DJ
51602002-10-11 Daniel Jacobowitz <drow@mvista.com>
5161
5162 * Makefile.am: Run dep-am.
6a0735ef 5163 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5164 (BFD32_LIBS): Add simple.lo.
5165 (BFD32_LIBS_CFILES): Add simple.c.
5166 * Makefile.in: Regenerated.
5167 * bfd-in2.h: Regenerated.
5168 * simple.c: New file.
5169
0be617ce
AM
51702002-10-11 Alan Modra <amodra@bigpond.net.au>
5171
14a793b2
AM
5172 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5173 (record_thumb_to_arm_glue): Likewise.
5174 * ecoff.c (ecoff_link_add_externals): Likewise.
5175 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5176 (record_thumb_to_arm_glue): Likewise.
5177 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5178 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5179 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5180 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5181 * elf64-ppc.c (func_desc_adjust): Likewise.
5182 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5183 (sh64_elf64_create_dynamic_sections): Likewise.
5184 * elflink.c (_bfd_elf_create_got_section): Likewise.
5185 (_bfd_elf_create_dynamic_sections): Likewise.
5186 (_bfd_elf_create_linker_section): Likewise.
5187 * elflink.h (elf_add_default_symbol): Likewise.
5188 (elf_link_create_dynamic_sections): Likewise.
5189 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5190 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5191 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5192 (_bfd_mips_elf_add_symbol_hook): Likewise.
5193 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5194 * linker.c (generic_link_add_symbol_list): Likewise.
5195 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5196
5197 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5198
0be617ce 5199 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5200 completely removed. Correct local sym adjustment.
0be617ce 5201
0a4ef3f4
SC
52022002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5203
5204 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5205 Correct mistake in calculation of address of .got.
5206 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5207 elf_sh64_pic_plt_entry_le): Likewise.
5208
efacd36e
SC
52092002-10-09 Richard Shann <richard.shann@superh.com>
5210 Stephen Clarke <stephen.clarke@superh.com>
5211
5212 * Makefile.am: Add entries for elf32-sh64-lin.c and
5213 elf64-sh64-lin.c. Regenerate.
5214 * Makefile.in: Regenerate.
9b5ecbd0 5215 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5216 to use sh64 vectors rather than sh vectors.
5217 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5218 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5219 * configure: Regenerate.
5220 * elf32-sh64-lin.c: New file.
5221 * elf64-sh64-lin.c: New file.
5222 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5223 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5224
299bf759
L
52252002-10-08 H.J. Lu <hjl@gnu.org>
5226
5227 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5228 IE->LE transition for R_386_TLS_IE.
5229
51020317
AM
52302002-10-08 Alan Modra <amodra@bigpond.net.au>
5231
5232 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5233
a8fcf378
NC
52342002-10-07 Mark Elbrecht <snowball3@softhome.net>
5235
51020317
AM
5236 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5237 sections.
a8fcf378 5238
a16d5acb
AM
52392002-10-07 Alan Modra <amodra@bigpond.net.au>
5240
a6b511bd
AM
5241 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5242 code.
5243
a16d5acb
AM
5244 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5245
7c4a37eb
AM
52462002-10-06 Alan Modra <amodra@bigpond.net.au>
5247
5248 * opncls.c: Formatting.
5249 (_bfd_new_bfd): Use a smaller section hash table.
5250
7c4ca42d
AO
52512002-10-05 Alexandre Oliva <aoliva@redhat.com>
5252
5253 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5254 of the other two relocations packed with a REL32 to NONE.
5255
4989d792
SC
52562002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5257
5258 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5259 (sh_elf_link_hash_newfunc): Initialize it.
5260 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5261 to got.refcount for symbols that are forced local or when
5262 we have direct got refs.
5263 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5264 to correctly adjust got.refcount and plt.refcount.
5265 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5266 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5267
7c445aa3
JJ
52682002-10-01 Jakub Jelinek <jakub@redhat.com>
5269
5270 * elf32-i386.c (elf_i386_relocate_section): Fix
5271 movl foo@indntpoff, %eax IE->LE transition.
5272
abcf1d52
JJ
52732002-10-01 Jakub Jelinek <jakub@redhat.com>
5274
5275 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5276 sequence and its transitions.
5277
a45bb67d
JJ
52782002-10-01 Jakub Jelinek <jakub@redhat.com>
5279
5280 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5281 to st_value + addend in non-code sections.
5282 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5283 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5284
00707a0e 52852002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5286 Ken Raeburn <raeburn@cygnus.com>
5287 Aldy Hernandez <aldyh@redhat.com>
5288 Eric Christopher <echristo@redhat.com>
5289 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5290
5291 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5292 (bfd_mach_mips5500): New.
5293 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5294 (arch_info_struct): Add corresponding entries here.
5295 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5296 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5297 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5298 bfd_mach_mips5400 and bfd_mach_mips5500.
5299 (_bfd_mips_elf_mach_extends_p): New function.
5300 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5301 the EF_MIPS_MACH flags.
5302 * bfd-in2.h: Regenerate.
5303
624f0b25
JT
53042002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5305
5306 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5307 .got sections.
5308
b89fe0ee
AM
53092002-09-28 Alan Modra <amodra@bigpond.net.au>
5310
5311 * elf.c (map_sections_to_segments): Correct test for start of
5312 writable section in the same page as end of read-only section.
5313
b29635ba
JT
53142002-09-27 Matt Thomas <matt@3am-software.com>
5315
5316 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5317 local_got_refcounts usage. Remove allocation of got slot.
5318 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5319 Remove de-allocation of got slot.
5320 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5321 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5322 sections to be GC'ed.
5323 (elf_vax_instantiate_got_entries): New function.
5324 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5325 tests that are now handled by elf_vax_instantiate_got_entries.
5326 Assert GOT entry falls within .got section size. Remove redundant
5327 comparisions. Fix comments.
5328
bffbf940
JJ
53292002-09-27 Jakub Jelinek <jakub@redhat.com>
5330
5331 * reloc.c: Add x86-64 TLS relocs.
5332 * bfd-in2.h, libbfd.h: Rebuilt.
5333 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5334 relocs. Add TLS relocs.
5335 (x86_64_reloc_map): Add TLS relocs.
5336 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5337 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5338 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5339 (elf64_x86_64_hash_entry): Define.
5340 (struct elf64_x86_64_obj_tdata): New.
5341 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5342 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5343 (link_hash_newfunc): Initialize tls_type.
5344 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5345 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5346 (elf64_x86_64_mkobject): New.
5347 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5348 (elf64_x86_64_tls_transition): New.
5349 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5350 Handle TLS relocs.
5351 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5352 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5353 (elf64_x86_64_size_dynamic_sections): Likewise.
5354 (dtpoff_base, tpoff): New.
5355 (elf64_x86_64_relocate_section): Handle TLS relocs.
5356 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5357 entries.
5358 (bfd_elf64_mkobject): Define.
5359
5360 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5361 DF_STATIC_TLS if shared.
5362
14366460
TS
53632002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5364
5365 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5366 empty relocation sections.
5367
9f951329
AM
53682002-09-26 Alan Modra <amodra@bigpond.net.au>
5369
5370 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5371 (ppc64_elf_build_stubs): Build them here instead.
5372
6b3ac709
JJ
53732002-09-24 Jakub Jelinek <jakub@redhat.com>
5374
5375 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5376 addend into r_addend, not *r_offset.
5377 (elf32_sparc_finish_dynamic_symbol): Likewise.
5378 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5379 R_SPARC_RELATIVE's r_offset.
5380
e2f6d277
NC
53812002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5382
5383 * dwarf2.c (decode_line_info): Update to correctly decode
5384 the (non-standard DWARF2) out-of-order address sequences
5385 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5386
f3961b2b
DD
53872002-09-23 Mark Elbrecht <snowball3@softhome.net>
5388
5389 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5390
ad34bc37
AM
53912002-09-23 Alan Modra <amodra@bigpond.net.au>
5392
5393 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5394 for discarded FDEs. Remove redundant assignment.
5395 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5396
82988bff
L
53972002-09-22 H.J. Lu <hjl@gnu.org>
5398
5399 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5400 the relocation count between different .reloc sections.
5401
5ad8645c
AM
54022002-09-21 Alan Modra <amodra@bigpond.net.au>
5403
5f819128
AM
5404 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5405 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5406 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5407 R_PPC_EMB_RELSDA.
5408
5ad8645c
AM
5409 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5410 unsigned. Move "symcount" assignment out of loop.
5411 * Makefile.am: Run "make dep-am".
5412 * Makefile.in: Regenerate.
5413 * configure: Regenerate.
5414 * po/SRC-POTFILES.in: Regnerate.
5415
75936555
NC
54162002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5417
5418 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5419 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5420 (e.g. IRIX64).
5421
2243deae
L
54222002-09-19 Jakub Jelinek <jakub@redhat.com>
5423
5424 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5425 even if generating R_PPC_RELATIVE reloc.
5426 (ppc_elf_relocate_section): Make sure relocation is performed
5427 if skip == -2. Clear memory at r_offset when creating dynamic
5428 relocation.
5429
37e55690
JJ
54302002-09-19 Jakub Jelinek <jakub@redhat.com>
5431
5432 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5433 BFD_RELOC_386_TLS_GOTIE): Add.
5434 * bfd-in2.h, libbfd.h: Rebuilt.
5435 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5436 and R_386_TLS_GOTIE.
5437 (elf_i386_reloc_type_lookup): Handle it.
5438 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5439 char instead of enum, change GOT_* into defines.
5440 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5441 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5442 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5443 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5444 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5445 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5446 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5447 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5448 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5449 tls_type is GOT_TLS_IE_BOTH.
5450 (elf_i386_size_dynamic_sections): Likewise.
5451 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5452 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5453 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5454 all 4 GOT_TLS_* TLS types.
5455
8e67855b
NC
54562002-09-19 Nick Clifton <nickc@redhat.com>
5457
5458 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5459 follow indirect links.
5460
1c59ba3f
NC
54612002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5462
5463 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5464 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5465 on 64 bit machines.
5466 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5467 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5468 ECOFF information: 'ioptMax' refers to the actual *size*
5469 of the optimization symtab, not the number of entries.
1c59ba3f 5470
9d7404b7
NC
54712002-09-19 Daniel Jacobowitz <drow@mvista.com>
5472
5473 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5474 ELF_LINK_HASH_NEEDS_PLT logic.
5475
05a487dc
DJ
54762002-09-18 Daniel Jacobowitz <drow@mvista.com>
5477
5478 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5479 correct relocation count.
5480
1f70368c
DJ
54812002-09-17 Daniel Jacobowitz <drow@mvista.com>
5482
5483 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5484 * bfd.c (struct _bfd): Add dynsymcount.
5485 * bfd-in2.h: Regenerated.
5486 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5487 abfd->dynsymcount.
5488 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5489 for overflow.
5490
51020317 54912002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5492
5493 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5494 (mips_elf64_final_gp): Don't make up gp value.
5495 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5496 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5497 .MIPS.options/.options section.
5498
290062cc
DB
54992002-09-17 David O'Brien <obrien@FreeBSD.org>
5500
5501 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5502 It is benign for FreeBSD < 4.1. Minor reformatting.
5503 * elf64-alpha-fbsd.c: Likewise.
5504
c5c1f40c
JJ
55052002-09-17 Jakub Jelinek <jakub@redhat.com>
5506
ca1eb0ba
JJ
5507 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5508 addend.
c5c1f40c 5509
562ace6b
AM
55102002-09-17 Alan Modra <amodra@bigpond.net.au>
5511
5512 * elf64-alpha.c (alpha_elf_size_info): Make static.
5513
5af6ead6
AM
55142002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5515
5516 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5517 * cpu-tic4x.c: Ditto.
5518
cb9512fc
TS
55192002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5520
5521 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5522 duplicate define.
5523
4ada7262
DB
55242002-09-16 Bruno Haible <bruno@clisp.org>
5525
5526 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5527 by a target variant implementation.
5528 * elf64-alpha.c: Likewise.
5529 * elf32-i386-fbsd.c: New file.
5530 * elf64-alpha-fbsd.c: New file.
5531 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5532 bfd_elf64_alpha_freebsd_vec.
5533 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5534 bfd_elf64_alpha_freebsd_vec.
5535 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5536 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5537 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5538 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5539 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5540 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5541 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5542
6a30718d
JJ
55432002-09-12 Jakub Jelinek <jakub@redhat.com>
5544
5545 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5546 NULL.
5547 (elf_i386_relocate_section): Return false after printing error about
5548 unresolvable relocation.
5549
6cf9e9fe
NC
55502002-09-12 Nick Clifton <nickc@redhat.com>
5551
5552 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5553 R_ARM_THM_PC11.
5554
10f469bf
DJ
55552002-09-11 Jeffrey Law <law@redhat.com>
5556
5557 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5558
dc43ada5
NC
55592002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5560
5561 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5562 line_ptr before deciding we've found a symbol.
5563
e09f4395
NC
55642002-09-11 Nick Clifton <nickc@redhat.com>
5565
5566 * po/da.po: New Danish translation file.
5567 * configure.in (LINGUAS): Add 'da'.
5568 * configure: Regenerate.
5569
b3018b5f
NC
55702002-09-10 Michael Snyder <msnyder@redhat.com>
5571
5572 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5573 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5574 do_sections64, depending on corefile (32-bit or 64-bit).
5575
2f21f25e
RH
55762002-09-09 Richard Henderson <rth@redhat.com>
5577
5578 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5579 and PCREL21F like PCREL21B.
5580
28b94e7c
KB
55812002-09-04 Kevin Buettner <kevinb@redhat.com>
5582
51020317
AM
5583 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5584 vector.
28b94e7c 5585
5cec6941
NC
55862002-09-02 Nick Clifton <nickc@redhat.com>
5587
5588 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5589 names instead of cryptically overloaded bfd_reloc error
5590 codes.
5591 (v850_elf_relocate_section): Likewise.
5592 (v850_elf_relax_section): Replace caching of external symbols
5593 with caching of internal symbols obtained from calling
5594 bfd_elf_get_elf_syms().
51020317 5595 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5596
3b77b1d5
AM
55972002-09-02 Alan Modra <amodra@bigpond.net.au>
5598
638524b5
AM
5599 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5600 (bfd_pj_arch): Use bfd_default_scan.
5601 * cpu-v850.c (scan): Remove.
5602 (N): Use bfd_default_scan.
5603 * cpu-z8k.c (scan_mach): Remove.
5604 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5605 first. Use bfd_default_scan.
5606
250d94fd
AM
5607 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5608 bfd_mach constants.
5609 (ecoff_get_magic): Likewise.
5610 * elf32-v850.c (v850_elf_object_p): Likewise.
5611 (v850_elf_final_write_processing): Likewise.
5612 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5613 (MY(write_object_contents)): Likewise.
5614 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5615 * coffcode.h (coff_write_object_contents): Likewise.
5616 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5617 Remove unnecessary "machine" assignments.
5618 (coff_write_relocs): Test for the absolute section sym by testing
5619 section and flags.
5620
3b77b1d5
AM
5621 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5622 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5623 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5624
e5b45b83
DA
56252002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5626
5627 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5628 * bfd-in2.h (align_power): Likewise.
5629
37f45cf8
AM
56302002-08-30 Alan Modra <amodra@bigpond.net.au>
5631
5632 * Makefile.am: Run "make dep-am".
5633 * Makefile.in: Regenerate.
5634
5635 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5636 * cpu-powerpc.c (powerpc_compatible): Likewise.
5637 * cpu-rs6000.c (rs6000_compatible): Likewise.
5638
86aba9db
NC
56392002-08-28 Catherine Moore <clm@redhat.com>
5640
9b5ecbd0 5641 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5642 (v850-elf-reloc): Don't resolve pc relative relocs.
5643 (v850_elf_ignore_reloc): New routine.
5644 (v850_elf_final_link_relocate): Handle new relocs.
5645 (v850_elf_relax_delete_bytes ): New routine.
5646 (v850_elf_relax_section): New routine.
5647 (bfd_elf32_bfd_relax_section): Define.
5648 (HOWTO): New entries for new relocs.
5649 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5650 (BFD_RELOC_V850_LONGJUMP): New reloc.
5651 (BFD_RELOC_V850_ALIGN): New reloc.
5652 * archures.c: Remove redundant v850ea architecture.
5653 * cpu-v850.c: Remove redundant v850ea support.
5654 * libbfd.h: Regenerate.
5655 * bfd-in2.h: Regenerated.
5656
026df7c5
NC
56572002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5658
5659 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5660 * configure.in: Add tic4x_coff vector files.
5661 * configure: Regenerate.
5662 * Makefile.am: Add tic4x target.
5663 * Makefile.in: Regenerate.
5664
56652002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5666
5667 * archures.c: Add the BFD arch type tic4x.
5668 * bfd-in.h: Add BFD_IN_MEMORY flag.
5669 * coff-tic4x.c: New file.
5670 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5671 * cpu-tic4x.c: New file.
5672 * targets.c: Added tic4x- in list of xvecs.
5673 * ticoff.h: New file.
5674 * bfd-in2.h: Regenerate.
5675
88f7bcd5
NC
56762002-08-27 Adam Nemet <anemet@lnxw.com>
5677
5678 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5679 bit of DT_INIT and DT_FINI for Thumb functions.
5680
c8e48751
AM
56812002-08-26 Alan Modra <amodra@bigpond.net.au>
5682
5683 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5684
2846975a
AM
56852002-08-26 Alan Modra <amodra@bigpond.net.au>
5686
5687 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5688
067653c5
AM
56892002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5690
5691 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5692 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5693 Likewise.
5694 (struct elf_sh_pcrel_relocs_copied): Removed.
5695 (struct elf_sh_dyn_relocs): New.
5696 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5697 field with dyn_relocs.
5698 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5699 sections and sym_sec.
5700 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5701 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5702 (sh_elf_create_dynamic_sections): Use create_got_section instead
5703 of _bfd_elf_create_got_section.
5704 (sh_elf_check_relocs): Likewise.
5705 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5706 sections.
5707 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5708 sh_elf_relocate_section, sh_elf_check_relocs,
5709 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5710 Likewise.
5711 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5712 dynamic relocations and avoiding the copy relocation when we
5713 didn't find any dynamic relocations in the section which has
5714 contents or is read-only.
5715 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5716 (sh_elf_size_dynamic_sections): Don't reset the size of
5717 .rela.got section even if dynamic_sections_created flag is off.
5718 Don't use sh_elf_discard_copies. Scan all input bfd and use
5719 allocate_dynrelocs. Call readonly_dynrelocs to determine
5720 whether we need DT_TEXTREL.
5721 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5722 whether the symbol was never referred to.
5723 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5724 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5725 (sh_elf_check_relocs): Call create_got_section if the short-cut
5726 to .got is null. Increment reference counters only instead of
5727 allocating space on dynamic sections here. Don't conditionalize
5728 uninitialized got.offset value when marking the symbol as a
5729 global offset table entry. Keep relocations for symbols satisfied
5730 by a dynamic library to avoid copy relocations for the symbol.
5731 Set dynobj field of an elf hash table if needed.
5732 (sh_elf_finish_dynamic_sections): Handle null section pointer
5733 correctly.
5734 (elf_backend_copy_indirect_symbol): Defined.
5735 (elf_backend_can_refcount): Defined.
5736
7e326afc
NC
57372002-08-23 Nick Clifton <nickc@redhat.com>
5738
5739 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5740 previous change. Add comment explaining why.
5741
c8614e8e
AM
57422002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5743
5744 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5745 contents of .got.plt[2] to tr0, not address of .got.plt.
5746 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5747 patching absolute plt entry. For shmedia plt entry, set bottom bit
5748 of branch to plt0 as this is a branch to an shmedia instruction.
5749 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5750 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5751 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5752 branch to plt0.
5753 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5754 patching absolute plt entry. For shmedia plt entry, branch to
5755 plt0 is now ptrel, so use relative offset. Set bottom bit of
5756 branch target as it is a branch to an shmedia instruction.
5757
3b587c71
AM
57582002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5759 Richard Shann <richard.shann@superh.com>
5760
5761 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5762 value if .init is an SHmedia function. Similarly for DT_FINI.
5763 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 5764
957dcaa8
AM
57652002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5766
3b587c71 5767 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 5768 dynamic section.
3b587c71 5769 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 5770
a4263c47
NC
57712002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5772
5773 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 5774 byte read when reading the return address register column.
a4263c47 5775
db4ed121
NC
57762002-08-22 Nick Clifton <nickc@redhat.com>
5777
5778 * config.bfd: Add powepc64-*-*bsd* target.
5779
ed71e111
NC
57802002-08-22 Graeme Peterson <gp@qnx.com>
5781
5782 * Makefile.am: Add entries for elf32-shqnx.c
5783 * Makefile.in: Regenerate.
5784 * config.bfd: Add support sh-*-nto* target.
5785 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5786 * configure: Regenerate.
5787 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5788 * elf32-sh.c: Do not include elf32-target.h if
5789 ELF32_SH_C_INCLUDED is defined.
5790 * elf32-shqnx.c: New file: Support for QNX.
5791 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5792
0ab72ee2
NC
57932002-08-22 Nick Clifton <nickc@redhat.com>
5794
75c83283
NC
5795 * po/tr.po: Updated Turkish translation.
5796
0ab72ee2
NC
5797 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5798 symbols are not read.
5799
56780f18
AM
58002002-08-22 Alan Modra <amodra@bigpond.net.au>
5801
5802 * elf32-m68hc11.c: Formatting fixes.
5803 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5804 * elf32-m68hc12.c: Formatting fixes.
5805 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5806
b48fa14c
AM
58072002-08-22 Alan Modra <amodra@bigpond.net.au>
5808
a7c71b0c
AM
5809 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5810 SEC_DATA.
5811 (pmac_xcoff_vec): Likewise.
5812 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5813 (aix5coff64_vec): Likewise.
5814
56780f18
AM
58152002-08-22 Alan Modra <amodra@bigpond.net.au>
5816
b48fa14c
AM
5817 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5818 param to elf_backend_copy_indirect_symbol.
5819 (_bfd_elf_link_hash_copy_indirect): Likewise.
5820 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5821 calls to copy_indirect_symbol.
5822 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5823 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5824 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5825 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5826 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5827 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5828 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5829 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5830 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5831 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5832 test refcounts for "used" values.
5833
8c2ab17d
AM
58342002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5835
5836 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5837 argument declaration.
5838
d62b1198 58392002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
5840
5841 * archures.c (bfd_mach_ppc_e500): Added.
5842 * bfd-in2.h: Rebuilt.
d62b1198
EZ
5843 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5844
9f88ba09
AM
58452002-08-19 Alan Modra <amodra@bigpond.net.au>
5846
5847 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5848
df622259
AC
58492002-08-17 Andrew Cagney <ac131313@redhat.com>
5850
5851 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 5852 `bfd_byte'.
df622259 5853
44c410de
SC
58542002-08-17 Stan Cox <scox@redhat.com>
5855
5856 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5857 IRIX 6 segment layout for NEWABI.
5858
4972a8e9
SC
58592002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5860
1049f94e 5861 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 5862 symbols when looking for section referred to by a relocation.
1049f94e 5863 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 5864
c5cd6d62
AM
58652002-08-15 Alan Modra <amodra@bigpond.net.au>
5866
5867 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5868
0741c7be
HPN
58692002-08-15 Hans-Peter Nilsson <hp@axis.com>
5870
5871 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5872 missing check for whether the symbol is referenced by DSO before
5873 unexporting it as an unneeded dynamic symbol.
5874
e8d5d179
L
58752002-08-14 H.J. Lu <hjl@gnu.org>
5876
5877 * libbfd.h: Regenerate.
5878
e9229007
L
58792002-08-14 H.J. Lu <hjl@gnu.org>
5880
5881 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5882
1fd03b5a
SC
58832002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5884
5885 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5886 instructions.
5887 (m68hc11_direct_relax): New to define table of relaxable instructions.
5888 (find_relaxable_insn): New, find a relaxable insn.
5889 (compare_reloc): New to compare two relocs.
5890 (m68hc11_elf_relax_section): New, relax text sections.
5891 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5892 (elf32_m68hc11_check_relocs): New function for GC support.
5893 (elf32_m68hc11_relocate_section): New function for GC support.
5894 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5895 (elf_backend_check_relocs): Likewise.
5896 (elf_backend_relocate_section): Likewise.
5897
c828c771
L
58982002-08-13 H.J. Lu <hjl@gnu.org>
5899
5900 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5901 definitions in shared objects when checking symbol with
5902 undefined version.
5903
9b701e44
SC
59042002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5905
5906 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5907 (elf32_m68hc11_gc_sweep_hook): Likewise.
5908 (elf_backend_gc_mark_hook): Define for GC section support.
5909 (elf_backend_gc_sweep_hook): Likewise.
5910 (elf_backend_can_gc_sections): Likewise.
5911
5912 * elf32-m68hc12.c: Likewise.
5913
96405e3c
SC
59142002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5915
5916 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5917 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5918 (_bfd_m68hc11_elf_set_private_flags): New function.
5919 Use them to set/check/print ELF flags specific to 68HC11.
5920
5921 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5922 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5923 (_bfd_m68hc12_elf_set_private_flags): New function.
5924 Use them to set/check/print ELF flags specific to 68HC12.
5925
dae78fb0
SC
59262002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5927
5928 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5929 fix masks for PC-rel relocs.
5930 (m68hc11_elf_ignore_reloc): New function.
5931
5932 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5933 68HC12 banked addressing relocs.
5934 (m68hc12_phys_addr): New to compute physical address of banked memory.
5935 (m68hc12_phys_page): Likewise for page.
5936 (m68hc12_addr_is_banked): New to see if address is in banked area.
5937 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5938
3dbfec86
SC
59392002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5940
5941 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5942 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5943 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5944 * bfd-in2.h: Regenerate.
5945
871da94f
L
59462002-08-12 H.J. Lu <hjl@gnu.org>
5947
5948 * elflink.h (elf_add_default_symbol): Preserve section across
5949 elf_merge_symbol.
5950
59bc061d
NC
59512002-08-09 Graeme Peterson <gp@qnx.com>
5952
51020317 5953 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
5954 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5955 * Makefile.in: Regenerate.
5956 * config.bfd: Add support for powerpc{le}-*-nto targets.
5957 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5958 * configure: Regenerate.
5959 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5960 common file "elf32-qnx.h", and now include that file.
5961 * elf32-qnx.h: New file: QNX specific common elf backend.
5962 * elf32-ppc.c: Do not include elf32-target.h if
5963 ELF32_PPC_C_INCLUDED is defined.
5964 * elf32-ppcqnx.c: New file: Support for QNX.
5965 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5966 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5967
2b692c59
NC
59682002-08-09 Nick Clifton <nickc@redhat.com>
5969
5970 * po/sv.po: Updated Swedish translation.
5971
d0c7ff07
TS
59722002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5973
5974 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5975 g->global_gotsym is NULL.
5976
d8bbe778
L
59772002-08-08 H.J. Lu <hjl@gnu.org>
5978
c5cd6d62 5979 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
5980 overrides an indirect versioned symbol.
5981
c366c25e
JJ
59822002-08-08 Jakub Jelinek <jakub@redhat.com>
5983
5984 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5985 for R_386_TLS_TPOFF32 relocs against symndx 0.
5986
31941635
L
59872002-08-07 H.J. Lu <hjl@gnu.org>
5988
5989 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5990 with undefined version if needed.
5991 (elf_link_assign_sym_version): Match a default symbol with a
5992 version without definition. No need to hide the default
5993 definition separately.
5994
0f3bd64f
AM
59952002-08-08 Alan Modra <amodra@bigpond.net.au>
5996
7330fb86
AM
5997 * elflink.h (elf_link_output_extsym): Don't output symbols from
5998 SEC_EXCLUDE sections.
5999
0f3bd64f
AM
6000 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6001
a4aa0fb7
AM
60022002-08-07 Alan Modra <amodra@bigpond.net.au>
6003
6004 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6005 entries.
6006
34ea4a36
TS
60072002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6008
6009 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6010 mismatch.
6011
141ff970
TS
60122002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6013
6014 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6015
28458e7e
TS
60162002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6017
6018 * elf32-mips.c (mips_reloc_map): Fix typo.
6019
0121a3da
AM
60202002-08-06 Alan Modra <amodra@bigpond.net.au>
6021
6022 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6023
d006db6c
AM
60242002-08-06 Alan Modra <amodra@bigpond.net.au>
6025
6026 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6027
8ea80f08
AM
60282002-08-06 Alan Modra <amodra@bigpond.net.au>
6029
2a52da53
AM
6030 * libxcoff.h: Use PARAMS on function declarations.
6031 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6032 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6033
8ea80f08
AM
6034 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6035 addend.
6036 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6037
cf9ab45b
AM
60382002-08-06 Alan Modra <amodra@bigpond.net.au>
6039
6040 * coff-rs6000.c: Formatting fixes.
6041 (xcoff_calculate_relocation): Use PARAMS in declaration.
6042 (xcoff_complain_overflow): Likewise.
6043 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6044 (bfd_xcoff_backend_data): Remove useless comments.
6045 (rs6000coff_vec): Likewise.
6046 (bfd_pmac_xcoff_backend_data): Likewise.
6047 (pmac_xcoff_vec): Likewise.
8ea80f08 6048
cf9ab45b
AM
6049 * coff64-rs6000.c: Formatting fixes.
6050 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6051 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6052 (bfd_xcoff_backend_data): Remove useless comments.
6053 (rs6000coff64_vec): Likewise.
6054 (bfd_xcoff_aix5_backend_data): Likewise.
6055 (aix5coff64_vec): Likewise.
6056
48bfecdd
AM
60572002-08-06 Alan Modra <amodra@bigpond.net.au>
6058
a78eab4e
AM
6059 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6060 mask entries. Use complain_overflow_dont for R_REF.
6061 (xcoff_reloc_type_ba): Revert last change.
6062 (xcoff_reloc_type_br): Likewise.
6063 (xcoff_reloc_type_crel): Likewise.
6064 (xcoff_ppc_relocate_section): Likewise.
6065 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6066 (xcoff64_ppc_relocate_section): Likewise.
6067 (xcoff64_howto_table): Revert some of last change to mask entries.
6068 Use complain_overflow_dont for R_REF.
6069
48bfecdd
AM
6070 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6071 relocs with bitsize == 16 have size = 1.
6072 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6073 (xcoff_reloc_type_br): Likewise.
6074 (xcoff_reloc_type_crel): Likewise.
6075 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6076 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6077 dst_mask adjustment.
6078 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6079 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6080 bitsize == 16 have size = 1.
6081
fd13ed0c
DC
60822002-08-01 Denis Chertykov <denisc@overta.ru>
6083
6084 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6085 (struct misc): New field isymbuf. All free_* fields removed.
6086 (symbol_value): Pass in internal syms. No need to swap syms in.
6087 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6088 possibly cached info.
6089 (tidyup_after_error): Removed.
6090 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6091 misc. Use new field.
6092 (adjust_all_relocations): Use internal syms. No need to swap syms
6093 in and out.
6094 (add_page_insn): Don't use removed fields of struct misc.
6095
24a1ba0f
NC
60962002-08-01 Nick Clifton <nickc@redhat.com>
6097
6098 * elf32-arm.h: Revert previous delta.
6099
a6903459
NC
61002002-08-01 Nick Clifton <nickc@redhat.com>
6101
6102 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6103 * configure: Regenerate.
6104
39a2a3eb
L
61052002-07-31 H.J. Lu <hjl@gnu.org>
6106
6107 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6108 selected.
6109
a0dfa6a8
L
61102002-07-31 H.J. Lu <hjl@gnu.org>
6111
6112 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6113 is selected.
6114
cd67d266
JJ
61152002-07-31 Jakub Jelinek <jakub@redhat.com>
6116
6117 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6118 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6119
4eb6b71c
NC
61202002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6121
6122 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6123 There is no 8 byte relocation type for this architecture.
6124 (do_ns32k_reloc): Use bfd_vma instead of native types.
6125 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6126 returns void.
6127 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6128 rely on generic code to do that.
6129 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6130 to all table entries.
6131 (_bfd_ns32k_relocate_contents): put_data returns void.
6132 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6133 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6134 return void.
6135
f7c33884
NC
61362002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6137
6138 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6139 archive object is target dependant.
6140
8f64befb
NC
61412002-07-31 Adam Nemet <anemet@lnxw.com>
6142
6143 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6144 (THUMB_PLT_ENTRY_SIZE): New macro.
6145 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6146 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6147 ARM_PLT_ENTRY_SIZE.
6148 (elf32_arm_plt_entry): Likewise.
6149 (elf_backend_plt_header_size): Likewise.
6150 (elf32_thumb_plt0_entry): New global.
6151 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6152 into .plt.thumb.
6153 (elf32_thumb_plt_entry): New global.
6154 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6155 Thumb entries. Set the bottom bit of the corresponding GOT entry
6156 for a Thumb PLT entry.
6157 (struct elf32_arm_plt_entry_info): New structure.
6158 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6159 type.
6160 (elf32_arm_link_hash_newfunc): Initialize new member.
6161 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6162 relocations against the PLT.
6163 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6164 first_rel_type if this is the first time we encounter the symbol.
6165 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6166 Determine if relocation needs a PLT entry. Set first_rel_type if
6167 this is the first time we encounter the symbol
6168 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6169 functions as well.
6170 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6171 (elf32_arm_create_dynamic_sections): New function. Create the
6172 .plt.thumb section.
6173 (elf_backend_create_dynamic_sections): Call it.
6174
47badb7b
NC
61752002-07-31 Nick Clifton <nickc@redhat.com>
6176
6177 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6178 'alternative' in order to avoid shadowing global symbol of the
6179 same name.
6180 * bfd-in2.h: Regenerate.
6181 * libbfd.h: Regenerate.
6182 * libcoff.h: Regenerate.
6183
8a397dad
TS
61842002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6185
6186 * Makefile.am: Add n32 ABI support.
6187 * Makefile.in: Regenerate.
6188 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6189 bit vectors for mips*-*-linux targets as optional.
6190 * configure.in: Add n32 ABI vectors.
6191 * configure: Regenerate.
6192 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6193 * elfn32-mips.c: New file, n32 ABI support.
6194 * targets.c: Add n32 ABI vectors.
6195
7e392df6 61962002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6197
7e392df6
NC
6198 * elfarmqnx-nabi.c: New file: Support for QNX.
6199 * config.bfd: Add support for arm-*-nto target.
6200 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6201 * configure: Regenerate.
6202 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6203 * Makefile.in: Regenerate.
6204 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6205 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6206 * elfarm-nabi.c: Do not include elf32-arm.h if
6207 ELFARM_NABI_C_INCLUDED is defined.
6208 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6209
7e392df6 62102002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6211
83e1617e
NC
6212 * po/sv.po: Updated Swedish translation.
6213
704afa60
JJ
62142002-07-30 Jakub Jelinek <jakub@redhat.com>
6215
6216 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6217
487e54f2
AM
62182002-07-30 Alan Modra <amodra@bigpond.net.au>
6219
6220 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6221 * archive.c (bfd_generic_archive_p): Likewise.
6222 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6223 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6224 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6225 (xcoff64_archive_p): Likewise.
6226 (xcoff64_openr_next_archived_file): Likewise.
6227 (xcoff64_archive_p): Clean up tdata properly on error.
6228 * coffgen.c (coff_real_object_p): Likewise.
6229 (coff_object_p): Release filehdr and opthdr.
6230 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6231 * ieee.c (ieee_archive_p): Likewise.
6232 * ihex.c (ihex_object_p): Likewise.
6233 (ihex_mkobject): Always allocate tdata.
6234 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6235 * srec.c (srec_mkobject): Always allocate tdata.
6236 (srec_object_p): Clean up tdata properly on error.
6237 (symbolsrec_object_p): Likewise.
6238 * versados.c (versados_object_p): Likewise.
6239 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6240 and bfd_realloc instead of realloc.
6241 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6242 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6243 place of bfd_malloc, simplifying error freeing. Free hash table too.
6244 (vms_object_p): Clean up tdata on error.
6245 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6246 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6247
9d46020e
AM
62482002-07-30 Alan Modra <amodra@bigpond.net.au>
6249
6250 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6251
fb39dac1
RS
62522002-07-26 Chris Demetriou <cgd@broadcom.com>
6253
6254 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6255 flags into resulting BFD.
6256
7a624474
AM
62572002-07-26 Alan Modra <amodra@bigpond.net.au>
6258
6259 From John Reiser <jreiser@BitWagon.com>
6260 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6261 tls_ldm_got.refcount.
6262
a4382ec6
TS
62632002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6264
6265 * elf64-mips.c: Update TODO comment.
6266 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6267 mips_elf64_gprel16_reloca): Remove prototypes.
6268 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6269 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6270 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6271 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6272 R_MIPS_HIGHEST.
6273 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6274 R_MIPS_GOT16. Remove wrong comments.
6275 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6276 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6277 from elf32-mips.c.
6278 (mips_elf64_hi16_reloc): Fix formatting.
6279 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6280 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6281 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6282 (mips_elf64_gprel16_reloc): Make static. Add check for
6283 partial_inplace.
6284 (mips_elf64_gprel16_reloca): Remove.
6285 (mips_elf64_literal_reloc): New function.
6286 (mips_elf64_gprel32_reloc): Fix formatting.
6287 (mips_elf64_shift6_reloc): Fix comment. Make static.
6288 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6289 elf32-mips.c.
6290 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6291 elf32-mips.c
6292 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6293 specific relocations.
6294 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6295 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6296 (ELF_MAXPAGESIZE): Add comment.
6297
219576a4
NC
62982002-07-25 Nick Clifton <nickc@redhat.com>
6299
6300 * po/sv.po: Updated Swedish translation.
6301 * po/es.po: Updated Spanish translation.
6302 * po/fr.po: Updated French translation.
6303
8c58d23b
AM
63042002-07-25 Alan Modra <amodra@bigpond.net.au>
6305
6306 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6307 as elf_link_record_local_dynamic_symbol.
6308 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6309 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6310 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6311 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6312 attempt is made to record a symbol in a discarded section, and
6313 return `2' in that case.
6314
ff3063f5
NC
63152002-07-24 Nick Clifton <nickc@redhat.com>
6316
6317 * po/sv.po: Updated Swedish translation.
6318 * po/es.po: Updated Spanish translation.
6319
f0fe0e16
AM
63202002-07-23 Alan Modra <amodra@bigpond.net.au>
6321
c1fb5f8a
AM
6322 * po/SRC-POTFILES.in: Regenerate.
6323
f0fe0e16
AM
6324 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6325 immediately. Remove code handling relocatable linking.
6326 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6327 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6328 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6329 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6330 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6331 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6332 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6333 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6334 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6335 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6336 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6337 * elf32-avr.c (elf_backend_rela_normal): Define.
6338 * elf32-cris.c: Likewise.
6339 * elf32-fr30.c: Likewise.
de2d743e 6340 * elf32-frv.c: Likewise.
f0fe0e16
AM
6341 * elf32-h8300.c: Likewise.
6342 * elf32-hppa.c: Likewise.
6343 * elf32-ip2k.c: Likewise.
6344 * elf32-sparc.c: Likewise.
6345 * elf32-v850.c: Likewise.
6346 * elf32-vax.c: Likewise.
6347 * elf64-hppa.c: Likewise.
6348 * elf64-sparc.c: Likewise.
6349 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6350 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6351 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6352 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6353 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6354 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6355 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6356 * elf-m10200.c (USE_RELA): Don't define.
6357 * elf-m10300.c: Likewise.
de2d743e 6358 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6359 * elf32-i370.c: Likewise.
6360 * elf32-ip2k.c: Likewise.
6361 * elf32-m68k.c: Likewise.
6362 * elf32-mcore.c: Likewise.
6363 * elf32-ppc.c: Likewise.
6364 * elf32-s390.c: Likewise.
6365 * elf32-vax.c: Likewise.
6366 * elf64-ppc.c: Likewise.
6367 * elf64-s390.c: Likewise.
6368 * elf64-x86-64.c: Likewise.
6369 * elfxx-ia64.c: Likewise.
6370 * elf32-avr.c (USE_REL): Don't undef.
6371 * elf32-ip2k.c: Likewise.
6372
5e8d7549
NC
63732002-07-23 Nick Clifton <nickc@redhat.com>
6374
6375 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6376 'want_p_paddr_set_to_zero'.
6377 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6378 to false;
6379 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6380 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6381
9e12c7db
NC
63822002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6383
6384 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6385 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6386 show the Copyright string.
6387 Minor formatting tidy ups.
6388
0461a601
NC
63892002-07-23 Nick Clifton <nickc@redhat.com>
6390
ff3063f5
NC
6391 * po/fr.po: Updated French translation.
6392 * po/sv.po: Updated Swedish translation.
0461a601 6393
fad2542d
AM
63942002-07-23 Alan Modra <amodra@bigpond.net.au>
6395
6396 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6397 when outputting relocs.
6398
c0647bfc
JT
63992002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6400
6401 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6402 DT_PLTGOT into the dynamic section if there is a PLT.
6403
d01414a5
TS
64042002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6405
6406 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6407 elf32-mips.c.
6408 (_bfd_mips_elf_write_section): Likewise.
6409 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6410 (_bfd_mips_elf_write_section): Likewise.
6411 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6412 (elf32_mips_write_section): Likewise.
6413 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6414 (_bfd_mips_elf_write_section): Likewise.
6415
40c97fc6
AM
64162002-07-19 Alan Modra <amodra@bigpond.net.au>
6417
6418 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6419 PT_IA_64_UNWIND segments for a given section.
6420
58378160
L
64212002-07-17 H.J. Lu <hjl@gnu.org>
6422
6423 * Makefile.am: Fix a typo.
6424 * Makefile.in: Regenerate.
6425
cf88bb9f
NC
64262002-07-15 Denis Chertykov <denisc@overta.ru>
6427 Frank Ch. Eigler <fche@redhat.com>
6428 Ben Elliston <bje@redhat.com>
6429 Alan Lehotsky <alehotsky@cygnus.com>
6430 John Healy <jhealy@redhat.com>
6431 Graham Stott <grahams@redhat.com>
6432 Jeff Johnston <jjohnstn@redhat.com>
6433
6434 * Makefile.am: Add support for ip2k.
6435 * Makefile.in: Regenerate.
6436 * doc/Makefile.in: Regenerate.
6437 * archures.c: Add support for ip2k.
6438 * config.bfd: Add support for ip2k.
6439 * configure.in: Add support for ip2k.
6440 * configure: Regenerate.
6441 * reloc.c: Add support for ip2k.
6442 * targets.c: Add support for ip2k.
6443 * bfd-in2.h: Regenerate.
6444 * libbfd.h: Regenerate.
6445 * cpu-ip2k.c: New file.
6446 * elf32-ip2k.c: New file.
6447
0dafd5f6
RE
64482002-07-17 Ian Rickards <irickard@arm.com>
6449
40c97fc6 6450 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6451 just return the filename.
6452
36b08f12
AM
64532002-07-16 Moritz Jodeit <moritz@jodeit.org>
6454
6455 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6456
58821868
AM
64572002-07-16 Alan Modra <amodra@bigpond.net.au>
6458
6459 * elflink.h: Formatting fixes, tidy prototypes.
6460 (elf_link_assign_sym_version): Move common code out of loop.
6461
c89583f8
AM
64622002-07-16 Alan Modra <amodra@bigpond.net.au>
6463
6464 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6465 reloc section size is zero. Correct reloc output location.
6466
ba94744e
AM
64672002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6468
6469 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6470 the final type for the e_fsel selector when generating PA2.0W code.
6471 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6472 relocations.
6473
96a94295
L
64742002-07-14 H.J. Lu <hjl@gnu.org>
6475
6476 * elflink.h (elf_link_assign_sym_version): Hide the default
6477 definition if there is a hidden versioned definition.
6478
6849c52f
HPN
64792002-07-12 Hans-Peter Nilsson <hp@axis.com>
6480
6481 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6482 dynamic reference test in assertion when initializing GOT with
6483 static contents. Just assert that there are either no dynamic
6484 sections, the symbol is defined in the regular objects or that the
6485 symbol is undef weak. Tweak comment.
6486 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6487 only if the symbol isn't defined in the program and isn't undef
6488 weak.
6489 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6490 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6491 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6492 (elf_cris_discard_excess_program_dynamics): Don't consider
6493 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6494
239e1f3a
AM
64952002-07-11 Alan Modra <amodra@bigpond.net.au>
6496
6497 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6498 unresolved debugging relocs in dynamic applications.
6499 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6500 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6501 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6502 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6503 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6504 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6505
2f6d9989
AM
65062002-07-10 Alan Modra <amodra@bigpond.net.au>
6507
f5e87a1d
AM
6508 * elf64-ppc.c (ONES): Define.
6509 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6510 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6511 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6512
2f6d9989
AM
6513 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6514 (ppc64_elf_set_private_flags): Delete.
6515 (ppc64_elf_section_from_shdr): Delete.
6516 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6517 (ppc64_elf_fake_sections): Delete.
6518 (bfd_elf64_bfd_set_private_flags): Don't define.
6519 (bfd_elf64_get_symbol_info): Likewise.
6520 (elf_backend_section_from_shdr): Likewise.
6521 (elf_backend_fake_sections): Likewise.
6522
0594c12d
AM
65232002-07-10 Marco Walther <Marco.Walther@sun.com>
6524
6525 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6526 when not already set.
6527 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6528 (elf_backend_fake_sections): Define.
6529
699cb9b8
AM
65302002-07-10 Alan Modra <amodra@bigpond.net.au>
6531
6532 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6533 Formatting.
6534 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6535
0a4787a0
HPN
65362002-07-09 Hans-Peter Nilsson <hp@axis.com>
6537
6538 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6539 NULL sym_hashes to just before use.
6540 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6541 symbol with non-default visibility.
6542 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6543 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6544 Ditto.
6545 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6546 symbol with non-default visibility.
6547 (cris_elf_check_relocs): At tests for local symbol before
6548 increasing h->plt.refcount, also check for non-default
6549 visibility. Ditto when checking for local symbol to eliminate
6550 pc-relative runtime relocs.
6551
aecc8f8a
AM
65522002-07-08 Alan Modra <amodra@bigpond.net.au>
6553
6554 * elf.c: Formatting.
6555 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6556 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6557 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6558 segments.
6559
e9168c1e
MM
65602002-07-07 Mark Mitchell <mark@codesourcery.com>
6561 Alan Modra <amodra@bigpond.net.au>
6562
6563 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6564 account the impact of relocation count overflow when computing
6565 section offsets.
6566 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6567 or not to apply the PE COFF reloc overflow handling. Fix a
6568 fencepost error in deciding whether or not to use that technique.
6569
6cdc0ccc
AM
65702002-07-07 Alan Modra <amodra@bigpond.net.au>
6571
6572 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6573 change type of locsyms.
6574 (bfd_elf_get_elf_syms): Declare.
6575 * elf.c (bfd_elf_get_elf_syms): New function.
6576 (group_signature): Use bfd_elf_get_elf_syms.
6577 (bfd_section_from_r_symndx): Likewise.
6578 * elfcode.h (elf_slurp_symbol_table): Likewise.
6579 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6580 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6581 locality of various data structures. Properly free internal relocs.
6582 (elf_bfd_final_link): Properly free internal relocs.
6583 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6584 (elf_link_input_bfd): Likewise.
6585 (elf_gc_mark): Likewise. Properly free internal relocs.
6586 (elf_gc_sweep): Properly free internal relocs.
6587 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6588 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6589 internal relocs.
6590 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6591 Properly free possibly cached info.
6592 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6593 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6594 symbol swapping code.
6595 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6596 Properly free possibly cached info.
6597 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6598 (mn10300_elf_relax_delete_bytes): Likewise.
6599 (mn10300_elf_symbol_address_p): Likewise.
6600 (mn10300_elf_get_relocated_section_contents): Likewise.
6601 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6602 (elf32_h8_relax_delete_bytes): Likewise.
6603 (elf32_h8_symbol_address_p): Likewise.
6604 (elf32_h8_get_relocated_section_contents): Likewise.
6605 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6606 (m32r_elf_relax_delete_bytes): Likewise.
6607 (m32r_elf_get_relocated_section_contents): Likewise.
6608 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6609 elf_section_data to determine whether cached.
6610 (sh_elf_relax_section): As above for elf-m10200.c.
6611 (sh_elf_relax_delete_bytes): Likewise.
6612 (sh_elf_get_relocated_section_contents): Likewise.
6613 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6614 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6615 reading of local syms.
6616 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6617 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6618 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6619 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6620 relocs.
6621 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6622 free internal relocs and section contents. Don't read symbols.
6623 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6624 (elf32_hppa_size_stubs): Don't free local syms.
6625 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6626 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6627 possibly cached info.
6628 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6629 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6630 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6631 all_local_syms.
6632 (get_local_syms): Delete function.
6633 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6634 on exit.
6635 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6636
b3212001
JW
66372002-07-05 Jim Wilson <wilson@redhat.com>
6638
6639 * syms.c (decode_section_type): New.
6640 (bfd_decode_symclass): Call decode_section_type.
6641
894bb1ee
JJ
66422002-07-04 Jakub Jelinek <jakub@redhat.com>
6643
6644 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6645 section content start.
6646 Reported by Michael Schumacher <mike@hightec-rt.com>.
6647
bc0ba537
AM
66482002-07-04 Alan Modra <amodra@bigpond.net.au>
6649
9b5ecbd0 6650 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
6651 link order code. Don't actually remove the output section here;
6652 Just set a flag for the linker to do so.
6653 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6654 sections when setting up output section dynsyms.
6655
797fc050
AM
66562002-07-04 Alan Modra <amodra@bigpond.net.au>
6657
6658 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6659 fudge.
6660 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6661 libs here instead.
6662
99881371
MS
66632002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6664
6665 * elf64-s390.c (create_got_section): Set .got section alignment to
6666 8 bytes.
6667 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6668
47d9a591
AM
66692002-07-02 Alan Modra <amodra@bigpond.net.au>
6670
6671 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6672
179d3252
JT
66732002-07-01 Matt Thomas <matt@3am-software.com>
6674
6675 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6676 to EF_VAX_*.
6677
4a14403c
TS
66782002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6679
6680 * elfxx-mips.c (ABI_64_P): Fix comment.
6681 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6682 new section names for N64 ABI.
6683 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6684 (mips_elf_calculate_relocation): Code formatting.
6685 (mips_elf_create_dynamic_relocation): Likewise.
6686 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6687 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6688 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6689 in any NewABI.
6690 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6691 for NewABI.
6692 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6693 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6694 here, too.
6695
607c0e09
AS
66962002-07-01 Andreas Schwab <schwab@suse.de>
6697
6698 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6699 R_X86_64_64 to R_X86_64_RELATIVE.
6700
ba26fd96
AM
67012002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6702
6703 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6704 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6705 Run "make dep-am".
6706 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6707 host_aout_vec.
6708 * configure.in (vaxbsd_vec): Add.
6709 * targets.c (vaxbsd_vec): Add.
6710 * Makefile.in: Rebuild.
6711 * configure: Rebuild.
6712 * po/SRC-POTFILES.in: Rebuild.
6713
1e2f5b6e
AM
67142002-07-01 Alan Modra <amodra@bigpond.net.au>
6715
6716 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6717 examining to gc_mark_hook, rather than the bfd.
6718 (elf_gc_sections): Adjust.
6719 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6720 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6721 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6722 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6723 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6724 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6725 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6726 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6727 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6728 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6729 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6730 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6731 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6732 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6733 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6734 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6735 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6736 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6737 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6738 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6739 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6740 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6741 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6742 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6743 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6744 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6745 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6746 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6747 redundant local sym tests.
6748 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6749 (link_hash_newfunc): Init is_entry.
6750 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6751 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6752 (create_linkage_sections): Use bfd_make_section_anyway rather than
6753 bfd_make_section.
6754 (ppc64_elf_mark_entry_syms): New function.
6755 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6756 up opd entry to function section map.
6757 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6758 relocs that reference the opd section.
6759 (edit_opd): New function.
6760 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6761 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6762 (get_local_syms): Do so here. Exit if we already have local syms.
6763 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6764 read local syms on non-ELF input.
6765 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6766 than duplicating it's function here. Adjust free of internal
6767 relocs to suit.
6768 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6769 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6770 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6771 _bfd_elf32_link_read_relocs rather than duplicating it's function
6772 here. Adjust free of internal relocs to suit.
6773
1b71fb54
AJ
67742002-07-01 Andreas Jaeger <aj@suse.de>
6775
6776 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6777 are not allowed in shared libs code, enforce -fPIC.
6778
8d28f606
HPN
67792002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6780
6781 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6782 trailing zero-sequences when there's previous left-over data.
6783
5ac81c74
JL
67842002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6785
6786 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6787 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6788 and opd_rel_sec in order for starting rela section. Check _raw_size.
6789 (elf_backend_reloc_type_class): Define.
6790
91a4d569
AM
67912002-06-27 Kevin Buettner <kevinb@redhat.com>
6792
6793 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6794 DWARF2 formats.
6795
feee612b
AM
67962002-06-27 Alan Modra <amodra@bigpond.net.au>
6797
6798 * cpu-powerpc.c: Comment on ordering of arch_info.
6799 * elf32-ppc.c (ppc_elf_object_p): New function.
6800 (elf_backend_object_p): Define.
6801 * elf64-ppc.c (ppc64_elf_object_p): New function.
6802 (elf_backend_object_p): Define.
6803
a4e6cefc
JT
68042002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6805
6806 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6807 * configure: Regenerate.
6808
dae2dd0d
NC
68092002-06-25 Jason Eckhardt <jle@rice.edu>
6810
6811 * dwarf2.c (decode_line_info): Check unit->addr_size
6812 to read in the proper number of prologue bytes.
6813
680f9d5c
NC
68142002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6815
6816 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6817 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
6818 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6819 been enabled.
dae2dd0d 6820
680f9d5c
NC
6821 * targets.c (_bfd_target_vector[]): Only include
6822 aix5coff64_vec if 64-bit bfd support has been enabled.
6823
d4c88bbb
AM
68242002-06-25 Alan Modra <amodra@bigpond.net.au>
6825
6826 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6827 * elf32-hppa.c (hppa_add_stub): Likewise.
6828 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6829 * elflink.h (elf_add_default_symbol): Fix comment typo.
6830 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6831 (elf_link_add_object_symbols): Likewise.
6832 (elf_link_assign_sym_version): Likewise.
6833 * hash.c (bfd_hash_lookup): Likewise.
6834 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6835 * section.c (bfd_get_unique_section_name): Likewise.
6836 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6837 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6838 (assign_section_numbers): Likewise.
6839 (_bfd_elfcore_make_pseudosection): Likewise.
6840 (elfcore_grok_lwpstatus): Likewise.
6841 (elfcore_grok_win32pstatus): Likewise.
6842 (elfcore_write_note): Constify input params. Use PTR instead of
6843 void *. Include terminating NUL in namesz. Correct padding.
6844 Support NULL "name" param. Use memcpy instead of strcpy.
6845 (elfcore_write_prpsinfo): Constify input params.
6846 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6847 (elfcore_write_lwpstatus): Likewise.
6848 (elfcore_write_pstatus): Likewise.
6849 (elfcore_write_prfpreg): Likewise.
6850 (elfcore_write_prxfpreg): Likewise.
6851 * elf-bfd.h (elfcore_write_note): Update declaration.
6852 (elfcore_write_prpsinfo): Likewise.
6853 (elfcore_write_prstatus): Likewise.
6854 (elfcore_write_pstatus): Likewise.
6855 (elfcore_write_prfpreg): Likewise.
6856 (elfcore_write_prxfpreg): Likewise.
6857 (elfcore_write_lwpstatus): Likewise.
6858
b0ac09d2
NC
68592002-06-25 Jason Eckhardt <jle@rice.edu>
6860
6861 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6862 symbols of type stProc and stStaticProc.
6863
68642002-06-25 Nick Clifton <nickc@redhat.com>
6865
6866 * ecoff.c: VArious formatting fixes.
6867
021d6096
AM
68682002-06-25 Alan Modra <amodra@bigpond.net.au>
6869
6870 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6871
82e51918
AM
68722002-06-25 Alan Modra <amodra@bigpond.net.au>
6873
6874 * aout-adobe.c: Don't compare against "true" or "false.
6875 * aout-target.h: Likewise.
6876 * aoutx.h: Likewise.
6877 * archive.c: Likewise.
6878 * bout.c: Likewise.
6879 * cache.c: Likewise.
6880 * coff-a29k.c: Likewise.
6881 * coff-alpha.c: Likewise.
6882 * coff-i386.c: Likewise.
6883 * coff-mips.c: Likewise.
6884 * coff-or32.c: Likewise.
6885 * coff64-rs6000.c: Likewise.
6886 * coffcode.h: Likewise.
6887 * coffgen.c: Likewise.
6888 * cpu-ns32k.c: Likewise.
6889 * ecoff.c: Likewise.
6890 * ecofflink.c: Likewise.
6891 * elf.c: Likewise.
6892 * elf32-arm.h: Likewise.
6893 * elf32-cris.c: Likewise.
6894 * elf32-d30v.c: Likewise.
6895 * elf32-i386.c: Likewise.
6896 * elf32-mcore.c: Likewise.
6897 * elf32-ppc.c: Likewise.
6898 * elf32-sh.c: Likewise.
6899 * elf32-sh64.c: Likewise.
6900 * elf32-v850.c: Likewise.
6901 * elf64-alpha.c: Likewise.
6902 * elf64-sh64.c: Likewise.
6903 * elfcode.h: Likewise.
6904 * elfcore.h: Likewise.
6905 * elflink.h: Likewise.
6906 * elfxx-mips.c: Likewise.
6907 * i386os9k.c: Likewise.
6908 * ieee.c: Likewise.
6909 * libbfd.c: Likewise.
6910 * linker.c: Likewise.
6911 * mmo.c: Likewise.
6912 * nlm32-alpha.c: Likewise.
6913 * nlm32-i386.c: Likewise.
6914 * nlm32-ppc.c: Likewise.
6915 * nlm32-sparc.c: Likewise.
6916 * nlmcode.h: Likewise.
6917 * oasys.c: Likewise.
6918 * pdp11.c: Likewise.
6919 * peicode.h: Likewise.
6920 * reloc.c: Likewise.
6921 * som.c: Likewise.
6922 * srec.c: Likewise.
6923 * tekhex.c: Likewise.
6924 * vms.c: Likewise.
6925 * xcofflink.c: Likewise.
6926 * elf64-sparc.c: Edit comment to not use "== false".
6927
6928 * aoutf1.h: Don't use "? true : false".
6929 * ecoff.c: Likewise.
6930 * format.c: Likewise.
6931 * ieee.c: Likewise.
6932 * linker.c: Likewise.
6933 * mmo.c: Likewise.
6934 * oasys.c: Likewise.
6935
48fc70a2
AM
69362002-06-23 H.J. Lu <hjl@gnu.org>
6937
6938 * elflink.h (elf_link_add_archive_symbols): For the default
6939 version, check references with only one `@' first.
6940
47b7c2db
AM
69412002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6942
6943 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6944 function.
9b5ecbd0 6945 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
6946 symbol table.
6947 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6948 (elf64_hppa_size_dynamic_sections): Revise to use
6949 elf64_hppa_mark_milli_and_exported_functions.
6950 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6951 symbols out of dynamic symbol table.
6952
f5d44ba0
AM
69532002-06-23 Alan Modra <amodra@bigpond.net.au>
6954
bb3fff1e
AM
6955 * Makefile.in: Regenerate.
6956 * libbfd.h: Regenerate.
6957 * bfd-in2.h: Regenerate.
6958 * configure: Regenerate.
6959 * po/SRC-POTFILES.in: Regenerate.
6960
f5d44ba0
AM
6961 * elflink.h: Comment typo fixes.
6962
69632002-06-23 H.J. Lu <hjl@gnu.org>
6964
6965 * elf-bfd.h (elf_link_loaded_list): New structure.
6966 (elf_link_hash_table): Add "loaded".
6967 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6968 * elflink.h (elf_link_check_versioned_symbol): New function.
6969 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6970
cc36acdf
NC
69712002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6972
6973 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 6974 support an ELF style hash table, return true, indicating that
cc36acdf
NC
6975 nothing needed to be done, rather than false, indicating that the
6976 section's size could not be computed.
6977
4e5ba5b7
DB
69782002-06-18 Dave Brolley <brolley@redhat.com>
6979
6980 From Catherine Moore, Michael Meissner, Dave Brolley:
6981 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6982 * targets.c: Support bfd_elf32_frv_vec.
6983 * reloc.c: Add FRV relocs.
6984 * configure.in: Add support for bfd-elf32-frv-vec.
6985 * config.bfd (targ_cpu): Add support for frv-*-elf.
6986 * archures.c: Add frv arch and machines.
6987 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6988 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6989 (BFD32_BACKENDS): Add elf32-frv.lo.
6990 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6991 (cpu-frv.lo): New target.
6992 (elf32-frv.lo): New target.
6993 * cpu-frv.c: New file.
6994 * elf32-frv.c: New file.
6995
7ece0d85
JJ
69962002-06-18 Jakub Jelinek <jakub@redhat.com>
6997
6998 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6999 e_shnum == 0.
7000 Only read the first section header if e_shoff is non-zero.
7001 Don't consider e_shstrndx if there are no sections.
7002
57fb03ac
TR
70032002-06-17 Tom Rix <trix@redhat.com>
7004
7005 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7006 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7007 complain_overflow_bitfield.
7008
341ca622
AM
70092002-06-17 Alan Modra <amodra@bigpond.net.au>
7010
767e34d1
AM
7011 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7012 (bfd_fdopenr): Likewise.
7013 (bfd_openstreamr): Likewise.
7014 (bfd_openw): Likewise.
7015
341ca622
AM
7016 * targets.c: Sort target vecs.
7017 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7018 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7019 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7020 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7021 * configure.in: Sort target vecs. Add m88kmach3_vec.
7022 * configure: Regenerate.
7023
dfbbae4c
HPN
70242002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7025
7026 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7027 bpo_reloc_no to break sort order ties, not address of items.
7028
d663e1cd
JL
70292002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7030
7031 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7032 Skip excluded sections in determing __gp value.
7033 (elf_hppa_final_link_relocate): Use the symbol's address in
7034 R_PARISC_FPTR64 relocations that don't need an opd entry.
7035 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7036 (elf64_hppa_finalize_dynreloc): Likewise.
7037 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7038 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7039
a8295218
NC
70402002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7041
7042 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7043 alignment for .bss, .data and .text sections so that sse and sse2
7044 code will work.
7045 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7046
70472002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7048
7049 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7050 sh[1234]*-elf*.
7051
3db4b612
JL
70522002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7053
2cb69dd3
JL
7054 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7055 dynamic sections.
7056
3db4b612
JL
7057 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7058 for a symbol that has no output section.
7059 (allocate_dynrel_entries): Correct comment.
7060 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7061 unless we want one.
7062 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7063 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7064 with no section. Remove unnecessary parentheses.
7065
f3813499
TR
70662002-06-11 Tom Rix <trix@redhat.com>
7067
7068 * coffcode.h (coff_compute_section_file_positions): Add data
7069 section to AIX loader alignment check.
7070
f5d44ba0 7071 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7072 alignment to 4 bytes.
7073 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7074 power accessor macro.
7075 (do_shared_object_padding): Remove invalid assertion.
7076
0ebaf185
RS
70772002-06-10 Richard Sandiford <rsandifo@redhat.com>
7078
7079 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7080 for removed output sections.
7081
ebe3e2d1
NC
70822002-06-10 Geoffrey Keating <geoffk@redhat.com>
7083
7084 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7085 htab_alloc.
7086 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7087
0b14c2aa
L
70882002-06-08 H.J. Lu <hjl@gnu.org>
7089
7090 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7091 work around a long long bug in gcc 2.96 on mips.
7092
3c2bfad6
JT
70932002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7094
7095 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7096 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7097 Regenerate dependency lists.
7098 * Makefile.in: Regenerate.
7099 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7100 vax1knetbsd_vec to targ_selvecs.
7101 * configure.in: Add vax1knetbsd_vec.
7102 * configure: Regenerate.
7103 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7104 * vax1knetbsd.c: New file.
7105 * vaxnetbsd.c: Update copyright years.
7106 (TARGET_PAGE_SIZE): Set to 0x1000.
7107 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7108
91149be3
JT
71092002-06-08 Matt Thomas <matt@3am-software.com>
7110
7111 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7112
21e15248
AM
71132002-06-08 Alan Modra <amodra@bigpond.net.au>
7114
7115 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7116
986b7daa
AM
71172002-06-08 Alan Modra <amodra@bigpond.net.au>
7118
e90b95f6
AM
7119 * Makefile.am: Run "make dep-am".
7120 * Makefile.in: Regenerate.
7121
3f9c735e
AM
7122 * armnetbsd.c: Replace CONST with const.
7123 * corefile.c: Likewise.
7124 * elf32-dlx.c: Likewise.
7125 * elf64-mips.c: Likewise.
7126 * mmo.c: Likewise.
7127 * ns32knetbsd.c: Likewise.
7128
986b7daa
AM
7129 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7130 table is elf64-sparc.
7131
5a659663
TS
71322002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7133
7134 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7135 Fix RELA addends to get not shifted in the result. Don't do special
7136 handling of R_MIPS_64 for NewABI.
7137
9bab7074
AM
71382002-06-07 Alan Modra <amodra@bigpond.net.au>
7139
7140 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7141 (NAME(aout,slurp_reloc_table)): Likewise.
7142 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7143 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7144 (xcoff_write_archive_contents_big): Likewise.
7145 (xcoff_generate_rtinit): Likewise.
7146 (xcoff_generate_rtinit): Likewise, and check error return.
7147 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7148 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7149 (coff_get_normalized_symtab): Likewise.
7150 (coff_make_empty_symbol): Likewise.
7151 (bfd_coff_set_symbol_class): Likewise.
7152 * cofflink.c (coff_link_add_symbols): Likewise.
7153 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7154 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7155 (bfd_ecoff_write_accumulated_debug): Likewise.
7156 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7157 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7158 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7159 * ieee.c (do_with_relocs): Use bfd_zalloc.
7160 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7161 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7162 (NAME(aout,slurp_reloc_table)): Likewise.
7163 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7164 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7165 * som.c (som_build_and_write_symbol_table): Likewise.
7166 (som_slurp_string_table): Likewise.
7167 (som_slurp_symbol_table): Likewise.
7168 (som_bfd_ar_write_symbol_stuff): Likewise.
7169 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7170 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7171 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7172 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7173 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7174
1126897b
AM
71752002-06-07 Alan Modra <amodra@bigpond.net.au>
7176
7177 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7178 "group" union.
7179 (elf_group_name): Update.
7180 (elf_group_id): Define.
7181 (bfd_elf_set_group_contents): Declare.
7182 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7183 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7184 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7185 that sym for the signature.
7186 (_bfd_elf_compute_section_file_positions): Don't call
7187 set_group_contents for "ld -r" case.
7188 (swap_out_syms): Use bfd_zalloc.
7189 * elflink.h (elf_link_add_archive_symbols): Likewise.
7190 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7191 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7192
3fad3c7c
AM
71932002-06-07 Alan Modra <amodra@bigpond.net.au>
7194
7195 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7196 relocs in opd for non-shared too.
7197
10f469bf 71982002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7199
7200 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7201 relocations.
7202
7217313c
NC
72032002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7204
7205 * merge.c: Include libiberty.h.
7206 * elf-strtab.c: Include libiberty.h.
7207
6cb22815
AM
72082002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7209
7210 * peXXigen.c (pe_print_idata): Remove unused variable.
7211
1ed89aa9
NC
72122002-06-06 David Heine <dlheine@tensilica.com>
7213
7214 * elf.c (assign_file_positions_for_segments): Remove unallocated
7215 sections from the section to segment mapping for PT_LOAD segments.
7216 Update comment about empty loadable segments.
7217
644c4c80
RS
72182002-06-06 Richard Sandiford <rsandifo@redhat.com>
7219
7220 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7221 is within the .stabstr section.
7222
f8ecb12b
AM
72232002-06-06 Alan Modra <amodra@bigpond.net.au>
7224
7225 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7226 are "const PTR", not "const PTR *".
7227 (bfd_elf32_swap_symbol_in): Likewise.
7228 (bfd_elf64_swap_symbol_in): Likewise.
7229 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7230 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7231 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7232 (elf_link_add_object_symbols): Likewise.
7233 (elf_link_record_local_dynamic_symbol): Likewise.
7234 (elf_link_input_bfd): Likewise.
7235 (elf_gc_mark): Likewise.
7236 (elf_reloc_symbol_deleted_p): Likewise.
7237 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7238 (mn10200_elf_relax_delete_bytes): Likewise.
7239 (mn10200_elf_symbol_address_p): Likewise.
7240 (mn10200_elf_get_relocated_section_contents): Likewise.
7241 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7242 (mn10300_elf_relax_section): Likewise.
7243 (mn10300_elf_relax_delete_bytes): Likewise.
7244 (mn10300_elf_symbol_address_p): Likewise.
7245 (mn10300_elf_get_relocated_section_contents): Likewise.
7246 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7247 (elf32_h8_relax_delete_bytes): Likewise.
7248 (elf32_h8_symbol_address_p): Likewise.
7249 (elf32_h8_get_relocated_section_contents): Likewise.
7250 * elf32-hppa.c (get_local_syms): Likewise.
7251 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7252 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7253 * elf32-sh.c (sh_elf_relax_section): Likewise.
7254 (sh_elf_relax_delete_bytes): Likewise.
7255 (sh_elf_get_relocated_section_contents): Likewise.
7256 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7257 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7258 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7259 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7260 * elf64-ppc.c (get_local_syms): Likewise.
7261 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7262 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7263
1ed89aa9 72642002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7265
7266 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7267
73ff0d56
AM
72682002-06-05 Alan Modra <amodra@bigpond.net.au>
7269
9dce4196
AM
7270 * elf.c (group_signature): Swap in the whole symbol, and handle
7271 extracting section symbol names.
7272 (setup_group): Add comment.
7273 (set_group_contents): When called from objcopy or ld, arrange for
7274 section contents to be written. Write group member output section
7275 indices to allow objcopy to reorganize sections.
7276 (_bfd_elf_copy_private_section_data): Copy group info.
7277
73ff0d56
AM
7278 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7279 (bfd_elf32_swap_symbol_in): Update prototype.
7280 (bfd_elf64_swap_symbol_in): Likewise.
7281 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7282 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7283 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7284 (elf_link_add_object_symbols): Likewise.
7285 (elf_link_record_local_dynamic_symbol): Likewise.
7286 (elf_link_input_bfd): Likewise.
7287 (elf_gc_mark): Likewise.
7288 (elf_reloc_symbol_deleted_p): Likewise.
7289 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7290 (mn10200_elf_relax_delete_bytes): Likewise.
7291 (mn10200_elf_symbol_address_p): Likewise.
7292 (mn10200_elf_get_relocated_section_contents): Likewise.
7293 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7294 (mn10300_elf_relax_section): Likewise.
7295 (mn10300_elf_relax_delete_bytes): Likewise.
7296 (mn10300_elf_symbol_address_p): Likewise.
7297 (mn10300_elf_get_relocated_section_contents): Likewise.
7298 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7299 (elf32_h8_relax_delete_bytes): Likewise.
7300 (elf32_h8_symbol_address_p): Likewise.
7301 (elf32_h8_get_relocated_section_contents): Likewise.
7302 * elf32-hppa.c (get_local_syms): Likewise.
7303 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7304 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7305 * elf32-sh.c (sh_elf_relax_section): Likewise.
7306 (sh_elf_relax_delete_bytes): Likewise.
7307 (sh_elf_get_relocated_section_contents): Likewise.
7308 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7309 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7310 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7311 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7312 * elf64-ppc.c (get_local_syms): Likewise.
7313 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7314 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7315 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7316 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7317 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7318 * elf64-mips.c (mips_elf64_size_info): Likewise.
7319 * elf64-s390.c (s390_elf64_size_info): Likewise.
7320 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7321
53bfd6b4
MR
73222002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7323
7324 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7325 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7326 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7327 _bfd_mips_elf_ignore_discarded_relocs.
7328 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7329
d4df96e6
L
73302002-06-05 H.J. Lu <hjl@gnu.org>
7331
7332 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7333 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7334 the SEC_MERGE section.
7335
e61463e1
AM
73362002-06-05 Alan Modra <amodra@bigpond.net.au>
7337
3cac74d0
AM
7338 * coff-alpha.c: Update copyright date.
7339 * coff-mips.c: Likewise.
7340 * xcoff-target.h: Likewise.
7341
e61463e1
AM
7342 * bfd-in.h: Remove "taken from the source" comment.
7343 * libbfd-in.h: Likewise.
7344 * libcoff-in.h: Likewise.
7345 * bfd-in2.h: Regenerate.
7346 * libbfd.h: Regenerate.
7347 * libcoff.h: Regenerate.
7348
7349 * elf.c (bfd_elf_discard_group): Return true.
7350 * elf-bfd.h (bfd_elf_discard_group): Declare.
7351 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7352 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7353 * bfd.c (bfd_discard_group): Define.
7354 * targets.c (struct bfd_target): Add _bfd_discard_group.
7355 (BFD_JUMP_TABLE_LINK): Here too.
7356 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7357 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7358 * aout-target.h (MY_bfd_discard_group): Define.
7359 * aout-tic30.c (MY_bfd_discard_group): Define.
7360 * binary.c (binary_bfd_discard_group): Define.
7361 * bout.c (b_out_bfd_discard_group): Define.
7362 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7363 * coffcode.h (coff_bfd_discard_group): Define.
7364 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7365 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7366 * i386msdos.c (msdos_bfd_discard_group): Define.
7367 * i386os9k.c (os9k_bfd_discard_group): Define.
7368 * ieee.c (ieee_bfd_discard_group): Define.
7369 * ihex.c (ihex_bfd_discard_group): Define.
7370 * mmo.c (mmo_bfd_discard_group): Define.
7371 * nlm-target.h (nlm_bfd_discard_group): Define.
7372 * oasys.c (oasys_bfd_discard_group): Define.
7373 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7374 * som.c (som_bfd_discard_group): Define.
7375 * srec.c (srec_bfd_discard_group): Define.
7376 * tekhex.c (tekhex_bfd_discard_group): Define.
7377 * versados.c (versados_bfd_discard_group): Define.
7378 * vms.c (vms_bfd_discard_group): Define.
7379 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7380 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7381 (aix5coff64_vec): Likewise.
7382 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7383
9cba27b2
JT
73842002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7385
7386 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7387 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7388 (elf32-sh64-com.lo): New dependency list.
7389 * Makefile.in: Regenerate.
7390 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7391 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7392 elf32-sh64-com.lo.
7393 * configure: Regenerate.
7394 * elf32-sh64.c (sh64_address_in_cranges)
7395 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7396 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7397 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7398 * elf32-sh64-com.c: ...here. New file.
7399
8d2c33be
AM
74002002-06-04 Alan Modra <amodra@bigpond.net.au>
7401
7402 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7403 ATTRIBUTE_UNUSED on used params.
7404 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7405 before calling bfd_section_from_elf_index on local syms.
7406 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7407
5b0e55b6
JT
74082002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7409
7410 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7411 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7412 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7413 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7414 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7415 * Makefile.in: Regenerate.
7416 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7417 (sh64-*-netbsd*): New targets.
7418 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7419 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7420 * configure: Regenerate.
7421 * elf32-sh64-nbsd.c: New file.
7422 * elf64-sh64-nbsd.c: New file.
7423 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7424 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7425 bfd_elf64_sh64lnbsd_vec.
7426
b885599b
AM
74272002-06-04 Alan Modra <amodra@bigpond.net.au>
7428
7429 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7430 (bfd_section_from_shdr): Likewise. Set section name of group
7431 sections from signature.
7432 (group_signature): Split out from setup_group. Ensure symbol table
7433 is available.
7434 (bfd_elf_discard_group): New function.
7435 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7436 .gnu.linkonce* sections if they are members of a group.
7437 (set_group_contents): Set GRP_COMDAT flag.
7438 * section.c (bfd_discard_group): New function.
7439 * bfd-in.h (bfd_elf_discard_group): Declare.
7440 * bfd-in2.h: Regenerate.
7441 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7442 (elf_linkonce_p): Define.
7443
90937f86
AM
74442002-06-04 Alan Modra <amodra@bigpond.net.au>
7445
7446 * elf.c (bfd_section_from_shdr): Make "name" const.
7447 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7448 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7449 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7450 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7451 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7452 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7453 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7454 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7455 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7456 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7457 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7458
cf6fb9ce
MR
74592002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7460
7461 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7462 ABI.
7463
cedb70c5
KH
74642002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7465
7466 * elf32-arc.c: Fix formatting.
7467 * elf32-arm.h: Likewise.
7468 * elf32-cris.c: Likewise.
7469 * elf32-dlx.c: Likewise.
7470 * elf32-hppa.c: Likewise.
7471 * elf32-i386.c: Likewise.
7472 * elf32-i386qnx.c: Likewise.
7473 * elf32-or32.c: Likewise.
7474 * elf32-s390.c: Likewise.
7475 * elf32-sh64.c: Likewise.
7476 * elf32-vax.c: Likewise.
7477 * elf32-xstormy16.c: Likewise.
7478 * elf64-alpha.c: Likewise.
7479 * elf64-mmix.c: Likewise.
7480 * elf64-ppc.c: Likewise.
7481 * elf64-s390.c: Likewise.
7482 * elf64-sh64.c: Likewise.
7483 * elf64-x86-64.c: Likewise.
7484
048d873d
RH
74852002-06-02 Richard Henderson <rth@redhat.com>
7486
7487 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7488 null when there are no got entries for a symbol.
7489 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7490 uninitialized variable warning.
7491
4a67a098
RH
74922002-06-01 Richard Henderson <rth@redhat.com>
7493
7494 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7495 undefined symbols here.
7496 (elf64_alpha_relax_section): Do it here. Also test for not
7497 defined in the current module.
7498 (elf64_alpha_relocate_section_r): Split out of ...
7499 (elf64_alpha_relocate_section): ... here. Don't dereference
7500 NULL when looking up local got entries.
7501
f44f99a5
RH
75022002-06-01 Richard Henderson <rth@redhat.com>
7503
7504 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7505 symbols from JSR relaxation.
7506 (elf64_alpha_size_plt_section_1): New.
7507 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7508 (elf64_alpha_size_rela_got_1): ... here.
7509 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7510 (elf64_alpha_size_rela_got_section): ... here.
7511 (elf64_alpha_size_plt_section): New.
7512 (elf64_alpha_relax_section): Call them.
7513 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7514 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7515
9e756d64
RH
75162002-06-01 Richard Henderson <rth@redhat.com>
7517
7518 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7519 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7520 in shared libraries. Fix DTPRELHI and TPRELHI value.
7521 (INSN_ADDQ, INSN_RDUNIQ): New.
7522 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7523 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7524 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7525 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7526 Handle GOTDTPREL and GOTTPREL relocations.
7527 (elf64_alpha_relax_gprelhilo): New.
7528 (elf64_alpha_relax_tls_get_addr): New.
7529 (elf64_alpha_relax_find_tls_segment): New.
7530 (elf64_alpha_relax_section): Handle TLS relocations.
7531 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7532 (elf64_alpha_check_relocs): Set it.
7533
c853d7f6
RH
75342002-06-01 Richard Henderson <rth@redhat.com>
7535
b646261c
RH
7536 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7537
c853d7f6
RH
7538 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7539 check; don't suppress dynamic relocs for non-allocated sections.
7540
d7e41a96
RH
7541 * elf64-alpha.c: Remove dead code.
7542
5f333394
AM
75432002-05-31 Alan Modra <amodra@bigpond.net.au>
7544
08e0ee05
AM
7545 * bfd-in2.h: Regenerate.
7546 * libbfd.h: Regenerate.
7547 * po/SRC-POTFILES.in: Regenerate.
7548
5f333394
AM
7549 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7550 space for bss .plt.
7551
caf47ea6
AM
75522002-05-31 Graeme Peterson <gp@qnx.com>
7553
7554 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7555 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7556 Run "make dep-am".
7557 * Makefile.in: Regenerate.
7558 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7559 * configure.in: Add bfd_elf32_i386qnx_vec support.
7560 * configure: Regenerate.
7561 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7562 is_contained_by_filepos, and copy_private_bfd_data_p.
7563 * elf.c (assign_file_positions_for_segments): Call backend
7564 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7565 (IS_CONTAINED_BY_FILEPOS): Define.
7566 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7567 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7568 Fix non-K&R call to _bfd_error_handler.
7569 (_bfd_elf_copy_private_section_data): Use backend
7570 copy_private_bfd_data_p.
7571 * elf32-i386.c: Don't include elfxx-target.h when
7572 ELF32_I386_C_INCLUDED is defined.
7573 * elf32-i386qnx.c: New QNX elf backend file.
7574 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7575 elf_backend_is_contained_by_filepos, and
7576 elf_backend_do_copy_private_bfd_data.
7577 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7578
5bc56484
AM
75792002-05-31 Alan Modra <amodra@bigpond.net.au>
7580
7581 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7582 Move other similar defines to start of file.
7583
1b164155
TR
75842002-05-30 Tom Rix <trix@redhat.com>
7585
7586 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7587 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7588
3765b1be
RH
75892002-05-30 Richard Henderson <rth@redhat.com>
7590
7591 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7592 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7593 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7594 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7595 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7596 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7597 n_local_got_entries to total_got_size and local_got_size.
7598 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7599 (alpha_got_entry_size): New.
7600 (elf64_alpha_relax_with_lituse): Use it.
7601 (elf64_alpha_relax_without_lituse): Likewise.
7602 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7603 (get_got_entry): New.
7604 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7605 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7606 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7607 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7608 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7609 (elf64_alpha_calc_got_offsets): Likewise.
7610 (alpha_dynamic_entries_for_reloc): New.
7611 (elf64_alpha_calc_dynrel_sizes): Use it.
7612 (elf64_alpha_size_dynamic_sections): Likewise.
7613 (elf64_alpha_relocate_section): Handle TLS relocations.
7614 * reloc.c: Add Alpha TLS relocations.
7615 * bfd-in2.h, libbfd.h: Rebuild.
7616
5e226794
NC
76172002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7618
7619 * peXXigen.c (pe_print_idata): Remove double printed
7620 import table lines; add Bound-To comment.
7621
90ace9e9
JT
76222002-05-29 Matt Thomas <matt@3am-software.com>
7623
7624 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7625 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7626 (elf32-vax.lo): New rule.
7627 * Makefile.in: Regenerate.
7628 * configure.in (bfd_elf32_vax_vec)
7629 (vaxnetbsd_vec): New vectors.
7630 * configure: Regenerate.
7631 * config.bfd (vax-*-netbsdelf*)
7632 (vax-*-netbsdaout*)
7633 (vax-*-netbsd*): New targets.
7634 * elf32-vax.c: New file.
7635 * reloc.c: Add VAX relocations.
7636 * bfd-in2.h: Regenerate.
7637 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7638
4a253e81
JT
76392002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7640
7641 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7642 and bfd_elf32_bigarm_vec to targ_selvecs.
7643
6e7c73dd
CF
76442002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7645
7646 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7647 with auto-imported symbols.
7648
8afb0e02
NC
76492002-05-29 Adam Nemet <anemet@lnxw.com>
7650
7651 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7652 sections only record bfd.
9bab7074 7653 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7654 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7655 * bfd-in2.h: Regenerate.
8afb0e02 7656
a95653f5
NC
76572002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7658
7659 * syms.c (_bfd_stab_section_find_nearest_line): Move
7660 declaration and initialisation of saw_line and saw_func out of
7661 for loop.
7662
7cdc5bba
AM
76632002-05-29 Alan Modra <amodra@bigpond.net.au>
7664
7665 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7666 (bfd_elf64_get_symbol_info): Define.
7667 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7668
4c7aad1c
AM
76692002-05-29 Andrey Volkov <avolkov@transas.com>
7670
7671 * cpu-h8300.c: Make default h8300 machine first in machine list.
7672
d172d4ba
NC
76732002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7674
7675 * config.bfd: Added DLX configuraton.
7676 * Makefile.am: Added DLX configuraton.
7677 * configure.in: Added DLX configuraton.
7678 * archures.c: Add DLX architecure.
7679 * reloc.c: Add DLX relocs.
7680 * targets.c: Added DLX target vector.
7681 * configure: Regenerate.
7682 * Makefile.in: Regenreate.
7683 * bfd-in2.h: Regenreate.
7684 * elf32-dlx.c: New file: Support DLX target.
7685 * cpu-dlx.c: New file: Support DLX target.
7686
d1329ca3
AM
76872002-05-25 Alan Modra <amodra@bigpond.net.au>
7688
428d0de3
AM
7689 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7690
d1329ca3
AM
7691 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7692 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7693 strings to point inside function code sym string.
7694 (func_desc_adjust): Likewise.
7695 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7696
3bab7989
ML
76972002-05-24 Michal Ludvig <mludvig@suse.cz>
7698
7699 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7700 (elf64_x86_64_grok_psinfo): Added.
7701
436e8db0
NC
77022002-05-24 TAMURA Kent <kent@netbsd.org>
7703
7704 * config.bfd: Add a target for i386-netbsdpe.
7705
ea1e4b0d
AM
77062002-05-24 Alan Modra <amodra@bigpond.net.au>
7707
7708 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7709 and is_func_descriptor.
7710 (func_desc_adjust): Hide function code sym in shared libs unless
7711 there is a matching exported function descriptor sym.
7712
13ae64f3
JJ
77132002-05-23 Jakub Jelinek <jakub@redhat.com>
7714
7715 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7716 for symbols from SHF_TLS section.
7717 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7718 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7719 (map_sections_to_segments): Build PT_TLS segment if necessary.
7720 (assign_file_positions_for_segments): Likewise.
7721 (get_program_header_size): Account for PT_TLS segment.
7722 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7723 SEC_THREAD_LOCAL sections to STT_TLS.
7724 * reloc.c: Add 386 and IA-64 TLS relocs.
7725 * section.c (SEC_THREAD_LOCAL): Define.
7726 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7727 Remove.
7728 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7729 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7730 unconditionally.
7731 (struct elf_final_link_info): Add first_tls_sec.
7732 (elf_bfd_final_link): Set first_tls_sec.
7733 Compute elf_hash_table (info)->tls_segment.
7734 (elf_link_output_extsym): Handle STT_TLS symbols.
7735 (elf_link_input_bfd): Likewise.
7736 * syms.c (BSF_THREAD_LOCAL): Define.
7737 * bfd-in2.h: Rebuilt.
7738 * libbfd.h: Rebuilt.
7739 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7740 elf_i386_mkobject, elf_i386_object_p): New functions.
7741 (elf_howto_table): Add TLS relocs.
7742 (elf_i386_reloc_type_lookup): Support TLS relocs.
7743 (elf_i386_info_to_howto_rel): Likewise.
7744 (struct elf_i386_link_hash_entry): Add tls_type.
7745 (struct elf_i386_obj_tdata): New.
7746 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7747 New macros.
7748 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7749 (link_hash_newfunc): Clear tls_type.
7750 (elf_i386_check_relocs): Support TLS relocs.
7751 (elf_i386_gc_sweep_hook): Likewise.
7752 (allocate_dynrelocs): Likewise.
7753 (elf_i386_size_dynamic_sections): Likewise.
7754 (elf_i386_relocate_section): Likewise.
7755 (elf_i386_finish_dynamic_symbol): Likewise.
7756 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7757 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7758 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7759 want_tprel, want_dtpmod, want_dtprel.
7760 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7761 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7762 R_IA64_LTOFF_TPREL22.
7763 (elf_code_to_howto_index): Add TLS relocs.
7764 (elfNN_ia64_check_relocs): Support TLS relocs.
7765 (allocate_global_data_got): Account for TLS .got data.
7766 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7767 (elfNN_ia64_install_value): Supprt TLS relocs.
7768 (set_got_entry): Support TLS relocs.
7769 (elfNN_ia64_relocate_section): Likewise.
7770
c62e1cc3
NC
77712002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7772
7773 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7774 BLX reloc round the relocation up rather than down.
7775 * coff-arm.c (coff_arm_relocate_section): Likewise.
7776
c5a43a5d
L
77772002-05-21 H.J. Lu (hjl@gnu.org)
7778
7779 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7780 definition.
7781
afbe61cf
AM
77822002-05-22 Alan Modra <amodra@bigpond.net.au>
7783
7784 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7785 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7786
9c07fe7c
AM
77872002-05-22 Alan Modra <amodra@bigpond.net.au>
7788
7789 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7790 unresolved relocs.
7791 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7792
21611032
TS
77932002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7794
c5cd6d62 7795 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
7796 non-ELF targets.
7797
41241523
TS
77982002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7799
7800 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7801 an error value.
7802 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7803 return with false on error.
7804 (elf_link_input_bfd): Check reloc_emitter return value.
7805
658f2588
JT
78062002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7807
7808 * config.bfd (armeb-*-netbsdelf*): New target.
7809
c862ae31
AM
78102002-05-20 Alan Modra <amodra@bigpond.net.au>
7811
7812 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7813 at the plt call stub.
7814
6dd14845
TS
78152002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7816
7817 * cpu-mips.c (mips_compatible): Don't try to check machine
7818 compatibility.
7819
a58d9c34
TR
78202002-05-18 Tom Rix <trix@redhat.com>
7821
9b5ecbd0 7822 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 7823
ef60b7ff
AM
78242002-05-17 Alan Modra <amodra@bigpond.net.au>
7825
7826 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7827 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7828 we've already warned about an undefined symbol. Report more
7829 detail on reloc errors.
7830
a703a6ea
AM
78312002-05-17 Alan Modra <amodra@bigpond.net.au>
7832
7833 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7834 * configure.in: Invoke AM_INSTALL_LIBBFD.
7835 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7836 (install_libbfd): .. New target.
7837 (uninstall_libbfd): Likewise.
7838 (install-bfdlibLTLIBRARIES): Likewise.
7839 (uninstall-bfdlibLTLIBRARIES): Likewise.
7840 (bfdlibdir): New.
7841 (bfdincludedir): New.
7842 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7843 * aclocal.m4: Regenerate.
7844 * configure: Regenerate.
7845 * Makefile.in: Regenerate.
7846
2c13d98b
NC
78472002-05-17 Stuart Balfour <sbalfour@cisco.com>
7848
7849 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7850 hash loop.
7851
629936c5
NC
78522002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7853
7854 * config.bfd: Add targets for sh64-linux (little endian and
7855 big endian).
7856
e4cf60a8
NC
78572002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7858
7859 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7860 is located in the same section as the import table. Instead
7861 check, and if necessary load the section containing the thunk.
7862
d1e66cd4
NC
78632002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7864
7865 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
7866 bfd_bread.
7867 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7868 with bfd_bread.
d1e66cd4 7869
2d653fc7
AM
78702002-05-15 Alan Modra <amodra@bigpond.net.au>
7871
7872 * aix5ppc-core.c: Warning fixes.
7873 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7874 * aout-target.h (MY_bfd_link_just_syms): Define.
7875 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7876 * bfd.c (bfd_link_just_syms): Define.
7877 * binary.c (binary_bfd_link_just_syms): Define.
7878 * bout.c (b_out_bfd_link_just_syms): Define.
7879 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7880 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7881 * coffcode.h (coff_bfd_link_just_syms): Define.
7882 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7883 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7884 (_bfd_elf_link_just_syms): Declare.
7885 * elf.c (_bfd_elf_link_just_syms): New function.
7886 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7887 sections haven't already been discarded by the linker.
7888 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7889 sections and SEC_MERGE sections.
7890 (elf_bfd_discard_info): Similarly here.
7891 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7892 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7893 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7894 * ieee.c (ieee_bfd_link_just_syms): Define.
7895 * ihex.c (ihex_bfd_link_just_syms): Define.
7896 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7897 (_bfd_generic_link_just_syms): Declare.
7898 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7899 * linker.c (_bfd_generic_link_just_syms): New function.
7900 * mmo.c (mmo_bfd_link_just_syms): Define.
7901 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7902 * oasys.c (oasys_bfd_link_just_syms): Define.
7903 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7904 * som.c (som_bfd_link_just_syms): Define.
7905 * srec.c (srec_bfd_link_just_syms): Define.
7906 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7907 (BFD_JUMP_TABLE_LINK): And here.
7908 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7909 * versados.c (versados_bfd_link_just_syms): Define.
7910 * vms.c (vms_bfd_link_just_syms): Define.
7911 * libbfd.h: Regenerate.
7912 * bfd-in2.h: Regenerate.
7913
cb7394f2
TS
79142002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7915
7916 * elf32-mips.c: Remove superfluous definitions copied from
7917 elfxx-mips.c.
7918 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7919 SGIish vectors to check the special case.
7920 (mips_elf_hi16_reloc): Fix comment.
7921 (mips_elf_got16_reloc): Likewise.
7922 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7923 (elf_reloc_map): Code cleanup.
7924 (mips_reloc_map): Add comment.
7925 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7926 (mips_elf32_rtype_to_howto): Likewise.
7927 (mips_elf32_discard_info): Likewise.
7928 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7929 lead to IRIX compatibility now.
7930
8dc1a139
TS
79312002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7932
7933 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7934
2051e1b5
JT
79352002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7936
7937 * config.bfd (shle-*-netbsdelf*): Add target which includes
7938 sh64 support.
7939
83954261
AM
79402002-05-13 David Edelsohn <edelsohn@gnu.org>
7941
7942 * configure.in: Revert 2002-04-07. Instead, auto-configure
7943 HAVE_ST_C_IMPL.
7944 * configure: Regenerate.
7945 * config.in: Regenerate.
7946 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7947 or AIX_5_CORE.
7948
a9bf1154
NC
79492002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7950
7951 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7952 corefiles as well.2
7953 * configure: Regenerate.
7954
3129eb7a
AM
79552002-05-13 Alan Modra <amodra@bigpond.net.au>
7956
7957 * Makefile.am (install-data-local): Install headers to
7958 $(exec_prefix)/include.
7959 * Makefile.in: Regenerate.
7960
a9a32010
DJ
79612002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7962 Daniel Jacobowitz <drow@mvista.com>
7963
7964 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7965 map BFD_RELOC_RVA.
7966
79672002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
7968
7969 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7970 hppa*-*-openbsd*): New targets.
7971 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7972 * configure: Regenerate.
7973
f1f0d9ab
TR
79742002-05-10 Tom Rix <trix@redhat.com>
7975
ea1e4b0d 7976 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
7977 xcoff64_ppc_relocate_section.
7978 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7979 * libxcoff.h: Common xcoff_reloc_type function declaration.
7980
c432ba1a
AM
79812002-05-10 Alan Modra <amodra@bigpond.net.au>
7982
16a10388 7983 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 7984 added in 2002-05-09 commit.
16a10388 7985
c432ba1a
AM
7986 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7987 don't look for stubs on all undefined syms.
7988
4a335f3d
AM
79892002-05-09 Alan Modra <amodra@bigpond.net.au>
7990
8fc39d5d
AM
7991 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7992 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7993 pcrel_offset.
7994
4a335f3d
AM
7995 * elf32-i386.c (elf_howto_table): Comments.
7996 (elf_i386_relocate_section): Handle more relocs for relocatable
7997 linking and against SEC_MERGE sections.
7998
41fcb14e
AM
79992002-05-08 Alan Modra <amodra@bigpond.net.au>
8000
8001 * elf32-ppc.c (ppc_elf_create_got): New function.
8002 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8003 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8004 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8005 _bfd_elf_create_got_section.
8006
b491616a
AM
80072002-05-07 Alan Modra <amodra@bigpond.net.au>
8008
8009 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8010 * elfxx-target.h (elf_backend_rela_normal): Define.
8011 (elfNN_bed): Init rela_normal.
8012 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8013 for section symbols here if rela_normal. Simplify abs section test.
8014 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8015 return immediately. Remove code handling relocatable linking.
8016 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8017 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8018 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8019 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8020 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8021 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8022 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8023 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8024 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8025 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8026 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8027 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8028 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8029 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8030 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8031 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8032 * elf-m10200.c (elf_backend_rela_normal): Define.
8033 * elf-m10300.c (elf_backend_rela_normal): Define.
8034 * elf32-fr30.c (elf_backend_rela_normal): Define.
8035 * elf32-i370.c (elf_backend_rela_normal): Define.
8036 * elf32-i860.c (elf_backend_rela_normal): Define.
8037 * elf32-m68k.c (elf_backend_rela_normal): Define.
8038 * elf32-mcore.c (elf_backend_rela_normal): Define.
8039 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8040 * elf32-ppc.c (elf_backend_rela_normal): Define.
8041 * elf32-s390.c (elf_backend_rela_normal): Define.
8042 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8043 * elf64-ppc.c (elf_backend_rela_normal): Define.
8044 * elf64-s390.c (elf_backend_rela_normal): Define.
8045 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8046 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8047 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8048 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8049
df212a7e
NC
80502002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8051
8052 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8053 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8054
3decf53c
AM
80552002-05-06 Alan Modra <amodra@bigpond.net.au>
8056
8057 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8058 when not relocatable. Fix reloc_emitter call for K&R.
8059
f46c2da6
AM
80602002-05-04 Alan Modra <amodra@bigpond.net.au>
8061
8062 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8063 reloading local sym addend mistakenly removed in 2002-05-01 change.
8064
8065 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8066 (read_abbrevs): Change "offset" param to bfd_vma.
8067 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8068 Change "abbrev_offset" to bfd_vma.
8069 (read_indirect_string): Use correct conversion chars in error
8070 message format string, cast bfd_vma's to unsigned long.
8071 (read_abbrevs): Likewise.
8072 (read_attribute_value): Likewise.
8073 (decode_line_info): Likewise.
8074 (scan_unit_for_functions): Likewise.
8075 (parse_comp_unit): Likewise.
8076
59862849
TR
80772002-05-04 Tom Rix <trix@redhat.com>
8078
8079 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8080 (coff_swap_reloc_out): Same.
8081 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8082 (xcoff_swap_reloc_out): Same.
8083 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8084 case some 16 bit relocs. Add reloc value to output.
8085 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8086 R_RBR. Improve names.
59862849
TR
8087 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8088 (bfd_xcoff_backend_data): Update with new reloc swap names.
8089 (bfd_pmac_xcoff_backend_data) : Same.
8090 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8091 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8092 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8093 R_POS. Add reloc value to output.
ea1e4b0d
AM
8094 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8095 bit R_RBR. Improve names, masks.
59862849
TR
8096 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8097 (bfd_xcoff_backend_data): Update with new reloc swap names.
8098 (bfd_xcoff_aix5_backend_data) : Same.
8099
b4655ea9
AM
81002002-05-04 Alan Modra <amodra@bigpond.net.au>
8101
8102 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8103 bfd_count top_index, input_list, all_local_syms.
8104 (elf32_hppa_setup_section_lists): New function, split from
8105 elf32_hppa_size_stubs.
8106 (elf32_hppa_next_input_section): Likewise.
8107 (group_sections): Likewise.
8108 (get_local_syms): Likewise.
8109 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8110 stubs on undefined syms too.
8111 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8112 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8113 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8114 (elf32_hppa_next_input_section): Declare.
8115
301e3139
AM
81162002-05-04 Bob Byrnes <byrnes@curl.com>
8117
8118 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8119 _bfd_new_bfd.
8120
7c5fcef7
L
81212002-05-03 H.J. Lu (hjl@gnu.org)
8122
8123 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8124 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8125 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8126 to hide a global symbol.
8127 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8128 forced_local to true.
7c5fcef7 8129
84de6048
RH
81302002-05-02 Richard Henderson <rth@redhat.com>
8131
8132 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8133 vs SHN_UNDEF to zero.
8134
805fc799
AM
81352002-05-02 Alan Modra <amodra@bigpond.net.au>
8136
c061c2d8
AM
8137 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8138 16 bit reloc.
8139 <R_PPC64_SECTOFF_DS>: Likewise.
8140 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8141 SECTOFF reloc.
8142 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8143 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8144 SECTOFF reloc.
8145
805fc799
AM
8146 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8147 (ppc64_elf_ha_reloc): New function.
8148 (ppc64_elf_brtaken_reloc): New function.
8149 (ppc64_elf_sectoff_reloc): New function.
8150 (ppc64_elf_sectoff_ha_reloc): New function.
8151 (ppc64_elf_toc_reloc): New function.
8152 (ppc64_elf_toc_ha_reloc): New function.
8153 (ppc64_elf_toc64_reloc): New function.
8154 (ppc64_elf_unhandled_reloc): New function.
8155 (ppc64_elf_howto_raw): Use the above.
8156 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8157 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8158 <R_PPC64_SECTOFF_DS>: Likewise.
8159 (IS_ABSOLUTE_RELOC): Update.
8160 (struct ppc_link_hash_table): Add have_undefweak.
8161 (ppc64_elf_link_hash_table_create): Init.
8162 (func_desc_adjust): Set have_undefweak.
8163 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8164 add the .sfpr blr when have_undefweak.
8165 (ppc64_elf_setup_section_lists): Check hash table flavour.
8166 (ppc64_elf_next_input_section): Move output_section->owner test to
8167 ppc64elf.em.
8168 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8169 and relocatable test. Return TOCstart and don't set elf_gp.
8170 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8171 offset calculation. Add assert on weak sym branch tweaks.
8172 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8173 (ppc64_elf_toc): Declare.
8174 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8175
818c39a3
AM
81762002-05-01 Alan Modra <amodra@bigpond.net.au>
8177
8178 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8179 file_name.
8180
721956f4
AM
81812002-05-01 Alan Modra <amodra@bigpond.net.au>
8182
8183 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8184 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8185 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8186 call branches. Correct undefined weak destination.
8187 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8188 .sfpr, and correct case where either only savef* or restf* is
8189 needed.
8190
8191 Long branch stubs, multiple stub sections.
8192 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8193 (ppc64_elf_next_input_section): Declare.
8194 * elf64-ppc.c: Move linker-only prototypes.
8195 (STUB_SUFFIX): Define.
8196 (enum ppc_stub_type): New.
8197 (struct ppc_stub_hash_entry): New.
8198 (struct ppc_branch_hash_entry): New.
8199 (struct ppc_link_hash_entry): Add stub_cache, oh.
8200 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8201 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8202 Rename plt_overflow to stub_error.
8203 (ppc_stub_hash_lookup): Define.
8204 (ppc_branch_hash_lookup): Define.
8205 (stub_hash_newfunc): New function.
8206 (branch_hash_newfunc): New function.
8207 (link_hash_newfunc): Init new fields.
8208 (ppc64_elf_link_hash_table_create): Likewise.
8209 (ppc64_elf_link_hash_table_free): New function.
8210 (ppc_stub_name): New function.
8211 (ppc_get_stub_entry): New function.
8212 (ppc_add_stub): New function.
8213 (create_linkage_sections): Use bfd_make_section_anyway. Create
8214 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8215 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8216 and set up for plt call stubs. Link func and func desc syms.
8217 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8218 (func_desc_adjust): Avoid hash lookup when func desc sym available
8219 via shortcut, and set links when processing.
8220 (ppc64_elf_hide_symbol): Likewise.
8221 (allocate_dynrelocs): Don't allocate stub section here.
8222 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8223 Remove sstub code.
8224 (ppc_type_of_stub): New function.
8225 (build_one_stub): Delete.
8226 (ppc_build_one_stub): New function.
8227 (ppc_size_one_stub): New function.
8228 (ppc64_elf_setup_section_lists): New function.
8229 (ppc64_elf_next_input_section): New function.
8230 (group_sections): New function.
8231 (get_local_syms): New function.
8232 (ppc64_elf_size_stubs): Rewrite.
8233 (ppc64_elf_build_stubs): Rewrite.
8234 (ppc64_elf_relocate_section): Look up stub entry for REL24
8235 relocs. Don't propagate REL14* to dynamic objects. Look for long
8236 branch stubs if REL14* or REL24 relocs won't reach.
8237 (bfd_elf64_bfd_link_hash_table_free): Define.
8238
09c2219b
MM
82392002-04-30 Mark Mitchell <mark@codesourcery.com>
8240
c5cd6d62 8241 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8242
07b678c0
TR
82432002-04-30 Tom Rix <trix@redhat.com>
8244
8245 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8246 symbol names into the hash table.
8247
dbe341c6
TR
82482002-04-28 Tom Rix <trix@redhat.com>
8249
8250 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8251 calulating relocations.
dbe341c6 8252 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8253 (xcoff_ppc_relocate_section): Use relocation and complain function
8254 tables.
8255 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8256 (xcoff_complain_overflow_signed_func): Same.
8257 (xcoff_complain_overflow_bitfield_func): Same.
8258 (xcoff_complain_overflow_dont_func): Same.
8259 (xcoff_reloc_type_crel): New recot function.
8260 (xcoff_reloc_type_br): Same.
8261 (xcoff_reloc_type_ba): Same.
8262 (xcoff_reloc_type_toc): Same.
8263 (xcoff_reloc_type_rel): Same.
8264 (xcoff_reloc_type_neg): Same.
8265 (xcoff_reloc_type_pos): Same.
8266 (xcoff_reloc_type_fail): Same.
8267 (xcoff_reloc_type_noop): Same.
8268 * libxcoff.h : Declare common parts for xcoff64.
8269 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8270 and complain function tables.
dbe341c6 8271
985142a4
AM
82722002-04-28 Alan Modra <amodra@bigpond.net.au>
8273
8274 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8275 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8276
eba91044
AM
82772002-04-26 Alan Modra <amodra@bigpond.net.au>
8278
e54fdaa5
AM
8279 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8280 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8281
a50c1845
AM
8282 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8283 same as the output before calling elf_link_input_bfd.
8284
eba91044
AM
8285 * coffcode.h (coff_compute_section_file_positions): Set
8286 section_tail after shuffling section list.
8287
3c25c5f6
NC
82882002-04-24 Christian Groessler <chris@groessler.org>
8289
8290 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8291 addresses are 23bit with a special layout, not plain 32bit
8292 values. Prevent relocation of immediate values.
8293
40d32fc6
CD
82942002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8295
8296 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8297 MIPS-16 ASE flags are set, print something to indicate that.
8298
067fa4a6
AM
82992002-04-23 Alan Modra <amodra@bigpond.net.au>
8300
8301 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8302 under which a plt call stub is used.
8303 (final_link_relocate): Similarly.
8304 (allocate_plt_static): Clear h-plabel except when plt entry is
8305 exclusively used for a plabel.
8306 (allocate_dynrelocs): Use the above to simplify plt sizing.
8307 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8308 (elf32_hppa_link_hash_table_create): Init.
8309 (BL22_RP): Define.
8310 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8311 (elf32_hppa_check_relocs): Set has_22bit_branch.
8312
8313 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8314 (final_link_relocate): Likewise.
8315
af40ce3c
JJ
83162002-04-22 Jakub Jelinek <jakub@redhat.com>
8317
8318 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8319 search table if some FDE is DW_EH_PE_aligned encoded either.
8320 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8321
09ae86c2
JJ
83222002-04-22 Richard Smith <richard@ex-parrot.com>
8323 Jakub Jelinek <jakub@redhat.com>
8324
8325 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8326 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8327 encoded personality.
8328 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8329 for CIE/FDE removal.
8330
deeb2cd7
TR
83312002-04-20 Tom Rix <trix@redhat.com>
8332
8333 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8334
99dc0092
AM
83352002-04-20 Alan Modra <amodra@bigpond.net.au>
8336
aa3d5824
AM
8337 * archures.c (bfd_lookup_arch): Move the list order comment..
8338 (struct bfd_arch_info): ..to where it belongs.
8339 * bfd-in2.h: Regenerate.
8340
99dc0092
AM
8341 * archures.c (bfd_lookup_arch): Add comment on list order.
8342 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8343 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8344 is always at head of list.
8345
7831a775
NC
83462002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8347
8348 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8349 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8350 definition of these functions for ARM_WINCE builds as they are
8351 not used.
ea1e4b0d 8352 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8353 for ARM_WINCE builds.
8354
83552002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8356
ea1e4b0d 8357 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8358
83592002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8360
8361 * cpu-sh.c (scan_mach): Delete.
8362 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8363 (bfd_sh_arch): Likewise.
8364
3d8dbe36
NC
83652002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8366
8367 * ihex.c (ihex_write_object_contents): Fix check for records
8368 crossing 64K boundaries.
8369
4ab82700
AM
83702002-04-16 Alan Modra <amodra@bigpond.net.au>
8371
8372 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8373 type rather than just assuming entries are ELF.
8374 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8375 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8376 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8377 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8378 rather than elf_link_hash_entry.
8379
036fe0fe
RH
83802002-04-15 Richard Henderson <rth@redhat.com>
8381
8382 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8383 n32 binaries.
8384
c4f3d130
NC
83852002-04-15 Michael Snyder <msnyder@redhat.com>
8386
8387 * opncls.c (bfd_close): Write contents if writeable.
8388 Minor formatting tidy-ups.
8389
4ab82700 83902002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8391
8392 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8393
0c04d169
MS
83942002-04-12 Michael Snyder <msnyder@redhat.com>
8395
8396 * bfd-in.h (bfd_get_section_lma): New access macro.
8397 Minor white-space fix-up.
8398
89d4966f
AM
83992002-04-12 Alan Modra <amodra@bigpond.net.au>
8400
8401 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8402 header pad.
8403
8d0da3c2
DD
84042002-04-09 DJ Delorie <dj@redhat.com>
8405
8406 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8407
05793179
NC
84082002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8409
8410 * coffcode.h (coff_read_word): New.
8411 (coff_compute_checksum): New.
8412 (coff_apply_checksum): New.
8413 (coff_write_object_contents): Call coff_apply_checksum () to
8414 apply checksum to PE image.
8415
46fe4e66
AM
84162002-04-08 Randolph Chung <tausq@debian.org>
8417
8418 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8419 (elf32_hppa_final_link): Split out sorting logic to..
8420 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8421 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8422
3b5b409c
AC
84232002-04-07 Andrew Cagney <ac131313@redhat.com>
8424
8425 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8426 pattern.
8427 * configure: Re-generate.
8428
ac7b6ceb
AC
84292002-04-07 Andrew Cagney <ac131313@redhat.com>
8430
8431 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8432 is greater or equal to 4.3.3.
8433 * configure: Regenerate.
8434 Fix PR gdb/344.
8435
44aa49bb
HPN
84362002-04-05 Hans-Peter Nilsson <hp@axis.com>
8437
8438 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8439 R_CRIS_32_PCREL>: Fix typo in name.
8440 (cris_elf_check_relocs): Always create .rela.got here when
8441 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8442 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8443 assume it's created.
8444
e2d34d7d
DJ
84452002-04-04 Daniel Jacobowitz <drow@mvista.com>
8446
8447 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8448 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8449 define.
8450 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8451 * bfd.c (bfd_link_hash_table_free): Define.
8452 * binary.c (binary_bfd_link_hash_table_free): Define.
8453 * bout.c (b_out_bfd_link_hash_table_free): Define.
8454 * coff-rs6000.c (rs6000coff_vec): Include
8455 _bfd_generic_link_hash_table_free.
8456 (pmac_xcoff_vec): Likewise.
8457 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8458 (aix5coff64_vec): Likewise.
8459 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8460 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8461 (bfd_elf32_bfd_link_hash_table_free): Define.
8462 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8463 (bfd_elf32_bfd_link_hash_table_free): Define.
8464 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8465 define.
8466 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8467 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8468 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8469 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8470 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8471 (_bfd_generic_link_hash_table_free): Add prototype.
8472 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8473 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8474 * linker.c (_bfd_generic_link_hash_table_free): New function.
8475 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8476 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8477 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8478 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8479 * som.c (som_bfd_link_hash_table_free): Define.
8480 * srec.c (srec_bfd_link_hash_table_free): Define.
8481 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8482 * versados.c (versados_bfd_link_hash_table_free): Define.
8483 * vms.c (vms_bfd_link_hash_table_free): New function.
8484 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8485
8486 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8487 instead of bfd_alloc.
8488 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8489 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8490 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8491 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8492 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8493 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8494 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8495 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8496 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8497 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8498 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8499 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8500 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8501 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8502 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8503 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8504 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8505 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8506 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8507 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8508 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8509 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8510 * m68klinux.c (linux_link_hash_table_create): Likewise.
8511 * sparclinux.c (linux_link_hash_table_create): Likewise.
8512 * sunos.c (sunos_link_hash_table_create): Likewise.
8513 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8514
8515 * targets.c: Add _bfd_link_hash_table_free to xvec.
8516
8517 * bfd-in2.h: Regenerate.
8518 * libbfd.h: Regenerate.
8519 * libcoff.h: Regenerate.
8520
830629ab
AM
85212002-04-04 Alan Modra <amodra@bigpond.net.au>
8522
8523 * dep-in.sed: Cope with absolute paths.
8524 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8525 Run "make dep-am".
8526 * Makefile.in: Regenerate.
8527 * coff-arm.c: Fix copyright date.
8528 * cpu-h8300.c: Likewise.
8529 * cpu-i370.c: Likewise.
8530 * cpu-s390.c: Likewise.
8531 * cpu-mips.c: Likewise.
8532 * po/SRC-POTFILES.in: Regenerate.
8533
c6e90b02
TS
85342002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8535
8536 * Makefile.am: Add elfxx-mips.c to the known backends.
8537 (elf32-mips.lo): remove dependency to coff/external.h.
8538 * Makefile.in: Regenerate.
8539 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8540 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8541 accordingly.
8542 * configure: Regenerate.
8543 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8544 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8545 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8546 MIPS specific backend functions.
8547 * elf32-mips.c: Moved most code to elfxx-mips.c.
8548 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8549 static.
8550 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8551 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8552 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8553 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8554 interface to allow selection of the right REL or RELA howto table.
8555 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8556 static. Let it refuse n32 objects.
8557 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8558 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8559 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8560 (elf32_mips_ignore_discarded_relocs): Rename from
8561 _bfd_elf32_mips_ignore_discarded_relocs.
8562 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8563 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8564 (elf_mips_howto_table_rela): Remove.
8565 * elf64-mips.c: Moved most code to elfxx-mips.c.
8566 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8567 (mips_elf64_rtype_to_howto): New function.
8568 (mips_elf64_object_p): Likewise.
8569 (elf64_mips_irix_compat): Likewise.
8570 * elfxx-mips.c: New file containing common code merged together from
8571 elf32-mips.c and elf64-mips.c.
8572 * elfxx-mips.h: New file containing MIPS specific prototypes from
8573 elf-bfd.h.
8574 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8575 elf_backend_mips_rtype_to_howto.
8576
d8dce692
AM
85772002-04-04 Alan Modra <amodra@bigpond.net.au>
8578
8579 * srec.c (MAXCHUNK, Chunk): Revise comments.
8580 (srec_write_record): Correct buffer size.
8581 (srec_write_header): Do without intermediate buffer.
8582 (srec_write_section): Validate Chunk.
8583 (srec_write_terminator): Pass NULL instead of dummy buffer.
8584 (srec_write_symbols): Pass file and symbol names directly to
8585 bfd_bwrite so sprintf won't overflow buffer.
8586
b88a866a
JJ
85872002-04-03 Jakub Jelinek <jakub@redhat.com>
8588
8589 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8590 PC relative relocs against hidden symbols.
8591 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8592
d7866f04
AM
85932002-04-03 Alan Modra <amodra@bigpond.net.au>
8594
8595 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8596 LMAs, loop over segments until p_vaddr and p_memsz specify an
8597 extent enclosing the section.
8598
9e81ee67
NC
85992002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8600
8601 * ihex.c (ihex_write_object_contents): Do not allow records to
8602 cross a 64K boundary - wrap if necessary.
8603
d2b64500
JT
86042002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8605
8606 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8607 which caused the returned LWP ID to always be 0.
8608
e36f7d53
RH
86092002-04-01 Richard Henderson <rth@redhat.com>
8610
8611 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8612 (elf32_sparc_relocate_section): Use it to figure out when to
8613 initialize .got entries.
8614 * elf64-sparc.c: Similarly.
8615
e92d460e
AM
86162002-03-28 Alan Modra <amodra@bigpond.net.au>
8617
8618 * linker.c (link_action): Ignore duplicate warning syms.
8619 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8620 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8621 (elf_adjust_dynamic_symbol): Likewise.
8622 (elf_export_symbol): Likewise.
8623 (elf_link_find_version_dependencies): Likewise.
8624 (elf_link_assign_sym_version): Likewise.
8625 (elf_link_sec_merge_syms): Likewise.
8626 (elf_link_output_extsym): Likewise.
8627 (elf_gc_sweep_symbol): Likewise.
8628 (elf_gc_propagate_vtable_entries_used): Likewise.
8629 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8630 (elf_gc_allocate_got_offsets): Likewise.
8631 (elf_collect_hash_codes): Likewise.
8632 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8633 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8634 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8635 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8636 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8637 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8638 (elf_cris_discard_excess_dso_dynamics): Likewise.
8639 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8640 (mark_PIC_calls): Likewise.
8641 (allocate_plt_static): Likewise.
8642 (allocate_dynrelocs): Likewise.
8643 (readonly_dynrelocs): Likewise.
8644 * elf32-i386.c (allocate_dynrelocs): Likewise.
8645 (readonly_dynrelocs): Likewise.
8646 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8647 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8648 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8649 (mips_elf_sort_hash_table_f): Likewise.
8650 (mips_elf_check_mips16_stubs): Likewise.
8651 * elf32-s390.c (allocate_dynrelocs): Likewise.
8652 (readonly_dynrelocs): Likewise.
8653 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8654 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8655 (xstormy16_relax_plt_realloc): Likewise.
8656 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8657 (elf64_alpha_output_extsym): Likewise.
8658 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8659 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8660 (mips_elf64_check_mips16_stubs): Likewise.
8661 (mips_elf64_output_extsym): Likewise.
8662 * elf64-ppc.c (func_desc_adjust): Likewise.
8663 (allocate_dynrelocs): Likewise.
8664 (readonly_dynrelocs): Likewise.
8665 * elf64-s390.c (allocate_dynrelocs): Likewise.
8666 (readonly_dynrelocs): Likewise.
8667 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8668 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8669 (readonly_dynrelocs): Likewise.
8670 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8671 * aoutx.h (aout_link_write_other_symbol): Likewise.
8672 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8673 (_bfd_coff_write_global_sym): Likewise.
8674 * i386linux.c (linux_tally_symbols): Likewise.
8675 * m68klinux.c (linux_tally_symbols): Likewise.
8676 * sparclinux.c (linux_tally_symbols): Likewise.
8677 * pdp11.c (aout_link_write_other_symbol): Likewise.
8678 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8679 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8680 (xcoff_write_global_symbol): Likewise.
8681
8682 * cofflink.c (_bfd_coff_final_link): Formatting.
8683 * cpu-mips.c (mips_compatible): Make static, prototype.
8684 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8685 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8686 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8687 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8688 (mips_elf64_final_link): Likewise.
8689 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8690 prototype.
8691
2106126f
NC
86922002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8693
8694 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8695 (SWAP_OUT_RELOC_OFFSET): Define.
8696
b99d1833
AM
86972002-03-27 Gregory Steuck <greg@nest.cx>
8698
8699 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8700 terminating NULL if empty symbol table.
8701 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8702
ad43ed4c
L
87032002-03-26 H.J. Lu (hjl@gnu.org)
8704
8705 * elflink.h (elf_link_input_bfd): Revert the last change since
8706 the gcc exception handling isn't fixed yet.
8707
3851fca4
L
87082002-03-26 H.J. Lu (hjl@gnu.org)
8709
8710 * elflink.h (elf_link_input_bfd): Complain about relocations
8711 against local symbols in discarded sections.
8712
b91afed7
AM
87132002-03-26 Alan Modra <amodra@bigpond.net.au>
8714
8715 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8716
dba143ef
AM
87172002-03-23 Alan Modra <amodra@bigpond.net.au>
8718
8719 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8720 section file offset for !SEC_LOAD sections.
8721
ee29b9fb
RE
87222002-03-21 Richard Earnshaw <rearnsha@arm.com>
8723
830629ab
AM
8724 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8725 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 8726
54327882
AM
87272002-03-21 Alan Modra <amodra@bigpond.net.au>
8728
8729 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8730 Whitespace changes.
8731 * archive.c: Update copyright date.
8732 * bfd-in2.h: Regenerate.
8733 * libbfd.h: Regenerate.
8734 * Makefile.am: Run "make dep-am"
8735 * Makefile.in: Regenerate.
8736 * po/SRC-POTFILES.in: Regenerate.
8737
1ee24f27
DJ
87382002-03-20 Daniel Jacobowitz <drow@mvista.com>
8739
8740 * dwarf2.c (struct funcinfo): Move up.
8741 (lookup_address_in_function_table): New argument function_ptr.
8742 Set it.
8743 (lookup_address_in_line_table): New argument function. If function
8744 is non-NULL, use it to handle ``addr'' before the first line note of
8745 the function.
8746 (comp_unit_find_nearest_line): Update and swap calls to
8747 lookup_address_in_function_table and lookup_address_in_line_table.
8748 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8749 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8750
51b9608c
TR
87512002-03-20 Tom Rix <trix@redhat.com>
8752
ea1e4b0d 8753 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 8754 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 8755 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 8756
789c90aa
TR
87572002-03-19 Tom Rix <trix@redhat.com>
8758
ea1e4b0d 8759 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
8760 dynamic objects in archives.
8761
1da54d81
HPN
87622002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8763
8764 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8765 STT_NOTYPE symbols to STT_OBJECT.
8766
7831a775 87672002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
8768
8769 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8770
eb1e0e80
NC
87712002-03-18 Tom Rix <trix@redhat.com>
8772
8773 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8774 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8775 * coff-rs6000 (do_pad) : New function for archive padding.
8776 (do_copy) : New function for object file copying in archives.
8777 (do_shared_object_padding) : New function for padding shared
8778 objects to their text section alignment in archives.
8779 (bfd_xcoff_ar_achive_set_magic) : Stub.
8780 (xcoff_write_armap_big) : Use do_copy and do_pad.
8781 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8782 do_copy and do_pad.
8783 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 8784 bfd_xcoff_magic_number.
eb1e0e80
NC
8785 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8786 fop.
8787 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8788 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8789 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8790 * rs6000-core.c : Update copyright date.
ea1e4b0d 8791 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
8792 csectpp.
8793 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8794 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8795 (coff_set_flags) : Use bfd_xcoff_magic_number.
8796 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8797 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8798 * Makefile.am : Same.
8799 * config.bfd : Same.
8800 * targets.c : Same.
8801 * configure : Regnerate.
8802 * Makefile.in : Same.
8803 * bfd-in2.h : Same.
8804
a1c259a1
NC
88052002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8806
8807 * po/fr.po: Updated version.
8808
4dae1ae7
AM
88092002-03-18 Alan Modra <amodra@bigpond.net.au>
8810
8811 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8812 * libbfd.h: Regenerate.
8813 * archive.c (coff_write_armap): Pass on failures from
8814 bfd_write_bigendian_4byte_int.
8815
36b4f6e7
L
88162002-03-14 H.J. Lu <hjl@gnu.org>
8817
8818 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8819 error to bfd_error_nonrepresentable_section for reinit_array
8820 section in DSO.
8821
a1aefc76
NC
88222002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8823
a181be0a
NC
8824 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8825 OR it in rather than replacing previously selected flags.
8826
a1aefc76
NC
8827 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8828 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8829
c119f9b8
AM
88302002-03-14 Alan Modra <amodra@bigpond.net.au>
8831
8832 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8833 (N): Use the above.
8834 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8835 ensure reloc size matches before calling elf_link_input_bfd.
8836 Add an assert to check reloc size when counting output relocs.
8837
c295a511
NC
88382002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8839
8840 * mmo.c (mmo_get_loc): Return NULL rather than false.
8841
9ce88e60
NC
88422002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8843
8844 * po/fr.po: Updated version.
8845
4ddafab0
AM
88462002-03-13 Alan Modra <amodra@bigpond.net.au>
8847
b74fa2cd
AM
8848 * archures.c (bfd_default_compatible): Test bits_per_word.
8849 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8850 bfd_default_compatible.
8851 * cpu-i370.c (i370_compatible): Likewise.
8852 * cpu-sparc.c (sparc_compatible): Likewise.
8853 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8854
40b829d4
AM
8855 * elflink.h: Formatting fixes.
8856 (elf_link_output_extsym): Merge undefined and undef weak cases.
8857
4ddafab0
AM
8858 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8859 when word size of input matches output word size.
8860
dd53c801
AJ
88612002-03-12 Andreas Jaeger <aj@suse.de>
8862
8863 * cpu-i386.c (i386_compatible): New. Use it instead of
8864 bfd_default_compatible.
8865
aa066ac8
L
88662002-03-07 H.J. Lu (hjl@gnu.org)
8867
8868 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8869 as the type for bfd_reloc_val.
8870
1bf42538
JL
88712002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8872
8873 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8874 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8875 (elf_hppa_final_link_relocate): Correct relocations for indirect
8876 references to local data through the DLT. Fix .opd creation for
8877 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8878 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8879 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8880 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8881 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8882 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8883 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8884
86eaf01e
JJ
88852002-03-05 Jakub Jelinek <jakub@redhat.com>
8886
8887 * merge.c (_bfd_merge_sections): Don't segfault if there
8888 is nothing to merge due to GC.
8889
c44233aa
AM
88902002-03-05 Alan Modra <amodra@bigpond.net.au>
8891
039cc25f
AM
8892 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8893 symbols that have been forced local.
8894
c44233aa
AM
8895 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8896 to output forced local syms for non-shared link.
8897 (elf_link_output_extsym): Tweak condition for calling backend
8898 adjust_dynamic_symbol so that previous behaviour is kept.
8899 Whitespace changes throughout file.
8900
25e27870
L
89012002-03-04 H.J. Lu <hjl@gnu.org>
8902
8903 * elf.c (bfd_section_from_shdr): Handle special sections,
8904 .init_array, .fini_array and .preinit_array.
8905 (elf_fake_sections): Likewise.
8906
8907 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8908 DT entry only if the section is in output for .init_array,
8909 .fini_array and .preinit_array. Complain about .preinit_array
8910 section in DSO.
8911 (elf_bfd_final_link): Warn zero size for .init_array,
8912 .fini_array and .preinit_array sections.
8913
8914 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8915 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8916 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8917 .preinit_array.
8918
bb2a49f2
AM
89192002-03-04 Alan Modra <amodra@bigpond.net.au>
8920
8921 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8922 * configure: Regenerate.
8923
38487e5e
TR
89242002-03-02 Tom Rix <trix@redhat.com>
8925
c44233aa
AM
8926 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8927 symbolic equiv.
38487e5e
TR
8928 * coff-rs6000.c (xcoff_howto_table): Same.
8929
30831527
RH
89302002-03-01 David Mosberger <davidm@hpl.hp.com>
8931
8932 * elflink.h (size_dynamic_sections): If section named
8933 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8934 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8935 ".init_array" and ".fini_array".
8936 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8937 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8938 DT_FINI_ARRAY.
8939
c8e5ddc8
AM
89402002-02-26 Andrew Macleod <amacleod@cygnus.com>
8941
8942 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8943 dynsyms.
8944
96e0dda4
AM
89452002-02-25 Alan Modra <amodra@bigpond.net.au>
8946
1c5b6bf8
AM
8947 * elf64-hppa.h: Update copyright date.
8948
96e0dda4
AM
8949 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8950 (ppc64_elf_relocate_section): Don't generate power4 style branch
8951 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8952
0fb19cbc
JJ
89532002-02-22 Jakub Jelinek <jakub@redhat.com>
8954
8955 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8956 last patch.
8957 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8958
c434dee6
AJ
89592002-02-21 Andreas Jaeger <aj@suse.de>
8960
8961 * elf64-x86-64.c: Major rework that introduces all recent changes
8962 to the x86-64 backend. Get a closer match to elf32-i386.
8963 (struct elf64_x86_64_dyn_relocs): Rename from
8964 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8965 all users.
8966 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8967 sections.
8968 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8969 remove casts, initialize new hash members.
8970 (create_got_section): New.
8971 (elf64_x86_64_create_dynamic_sections): New.
8972 (elf64_x86_64_copy_indirect_symbol): New.
8973 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8974 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8975 Reference count possible .plt and .got entries. Don't test input
8976 section SEC_READONLY here to try to avoid copy relocs, and keep
8977 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8978 DF_TEXTREL here. Delay setting of variables until needed. Cache
8979 pointer to "sreloc" section in elf_section_data. Tweak condition
8980 under which .got created. Report files with bad relocation
8981 section names.
8982 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8983 Reference count possible .plt entries. Don't deallocate .got and
8984 .relgot space here.
8985 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8986 do copy reloc processing for weakdefs. Remove redundant casts and
8987 aborts. Delay setting of vars until needed. Move creation of
8988 dynamic symbols and allocation of .plt and .rela.plt to
8989 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8990 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8991 (allocate_dynrelocs): New.
8992 (readonly_dynrelocs): New.
8993 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8994 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8995 Zero out the dynamic allocated content space.
8996 (elf64_x86_64_discard_copies): Removed.
8997 (elf64_x86_64_relocate_section): Make use of dynamic section
8998 short-cuts. Localise vars, and delay setting. Better error
8999 reporting, replace BFD_ASSERT with abort. Check
9000 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9001 regular object file and tread the weak definition as the normal
9002 one. Don't discard relocs for undefweak or undefined symbols and
9003 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9004 relocs.
9005 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9006 symbols that have been forced local. Use same test to decide if
9007 we can use a relative reloc for got as relocate_section. Expand
9008 SHN_UNDEF comment. Move expressions out of function calls.
9009 Replace BFD_ASSERT with abort.
9010 (bfd_elf64_bfd_final_link): Removed.
9011 (elf_backend_copy_indirect_symbol): Define.
9012
ff3a6ee3
TR
90132002-02-20 Tom Rix <trix@redhat.com>
9014
9015 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9016 (_bfd_xcoff_reloc_type_lookup): Use it.
9017 * coff64-rs6000.c (xcoff64_howto_table): Same.
9018 (xcoff64_reloc_type_lookup): Same.
c434dee6 9019
a68d41fb
AM
90202002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9021
9b5ecbd0 9022 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9023 little endian.
9024
befc3abb
MS
90252002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9026
9027 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9028 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9029 * bfd-in2.h: Regenerate.
9030 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9031 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9032 with "s390:64-bit".
9033 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9034 (elf_s390_reloc_type_lookup): Likewise.
9035 (elf_s390_check_relocs): Likewise.
9036 (elf_s390_gc_sweep_hook): Likewise.
9037 (elf_s390_relocate_section): Likewise.
9038 (elf_s390_object_p): Use renamed architecture define.
9039 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9040
6eeeec9b
FCE
90412002-02-19 Frank Ch. Eigler <fche@redhat.com>
9042
9043 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9044
0bb2d96a
JJ
90452002-02-19 Jakub Jelinek <jakub@redhat.com>
9046
9047 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9048 absptr -> pcrel optimization for shared libs.
9049 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9050 library cannot be converted to pcrel.
9051 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9052 relative.
9053 * elf32-i386.c (elf_i386_relocate_section): If
9054 _bfd_elf_section_offset returned -2, skip, but make sure the
9055 relocation is installed.
9056 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9057 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9058 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9059 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9060 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9061 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9062 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9063 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9064 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9065 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9066 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9067 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9068 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9069 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9070 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9071 _bfd_elf_section_offset returning -2 the same way as -1.
9072 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9073 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9074 and BFD_ASSERT.
9075 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9076
69f284c7
TR
90772002-02-18 Tom Rix <trix@redhat.com>
9078
9079 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9080 (bfd_xcoff_size_dynamic_sections): Same.
9081 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9082 (bfd_xcoff_size_dynamic_sections): Same.
9083 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9084 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9085 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9086 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9087 * bfd-in2.h: Regenerate.
9088
82bd7b59
AM
90892002-02-18 Alan Modra <amodra@bigpond.net.au>
9090
9091 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9092 (struct ppc_link_hash_table): Add sfpr.
9093 (ppc64_elf_link_hash_table_create): Init it.
9094 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9095 .glink out to..
9096 (create_linkage_sections): ..here. Make .sfpr too.
9097 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9098 dynobj early.
9099 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9100 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9101 ._restf* functions, and create as needed.
9102 (func_desc_adjust): Only force_local for shared libs.
9103
ef1355e8
NC
91042002-02-18 David O'Brien <obrien@FreeBSD.org>
9105
9106 * configure.in: Bump version number post 2.12 branching.
9107 * configure: Regenerate.
9108
dfa36a69
HPN
91092002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9110
9111 * mmo.c: Correct and improve comments.
9112 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9113 zero-pad. Use input to fill up non-empty bfd buffer.
9114 (mmo_flush_chunk): New function.
9115 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9116 changed. Don't emit location specifier if VMA is same as
9117 *LAST_VMAP after omitting leading zero contents. Call
9118 mmo_flush_chunk before emitting location specifier.
9119 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9120 with mmo_write_loc_chunk calls.
9121 (mmo_internal_write_section): Call mmo_flush_chunk after
9122 mmo_write_chunk.
9123 (mmo_write_symbols_and_terminator): Move :Main to first position
9124 in symbol array. Add faked one if it does not exist if there are
9125 other symbols. Don't add it if there are no symbols at all. Move
9126 out test for value of :Main from symbol loop. Rename table
9127 fakemain to maintable and variable mainsym to fakemain.
9128
ccf00ab6
RH
91292002-02-15 Richard Henderson <rth@redhat.com>
9130
9131 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9132 section with no got matches any got. Simplify error generaion.
9133
88eaccc2
AM
91342002-02-15 Alan Modra <amodra@bigpond.net.au>
9135
fd96f80f
AM
9136 Support arbitrary length fill patterns.
9137 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9138 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9139 Call default_data_link_order.
9140 (default_fill_link_order): Delete.
9141 (default_data_link_order): New function.
9142 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9143 of bfd_fill_link_order with bfd_data_link_order.
9144 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9145 * elf64-mips.c (mips_elf64_final_link): Likewise.
9146
88eaccc2
AM
9147 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9148 Correct value returned in "end" for "0x<non-hex>".
9149
e2fd756b
NC
91502002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9151
9152 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9153 (scan): Test against 'mach' field in info structure.
9154
edd29cf9
AM
91552002-02-14 Alan Modra <amodra@bigpond.net.au>
9156
9157 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9158
1e30956e 91592002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9160
9161 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9162 EF_M68000.
9163
bf36db18
NC
91642002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9165
9166 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9167 non-zero physical addresses when adjusting the LMAs of new
9168 sections.
bf36db18 9169
189c6563
AM
91702002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9171
9172 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9173 from _bfd_elf_hppa_gen_reloc_type.
9174 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9175 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9176 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9177 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9178
e948afaf
AO
91792002-02-12 Alexandre Oliva <aoliva@redhat.com>
9180
9181 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9182 loading its contents if there's nothing to do in it.
9183
19397422
AM
91842002-02-12 Alan Modra <amodra@bigpond.net.au>
9185
0ad3a73b
AM
9186 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9187 64k boundary.
9188
19397422
AM
9189 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9190 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9191 (ppc64_elf_finish_dynamic_sections): Set values for them.
9192
51316059
MS
91932002-02-11 Michael Snyder <msnyder@redhat.com>
9194
9195 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9196 * elf.c (elfcore_grok_pstatus): Add prototype.
9197 (elfcore_grok_lwpstatus): Add prototype.
9198 (elfcore_write_lwpstatus): New function.
9199 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9200
518313c3
AO
92012002-02-11 Alexandre Oliva <aoliva@redhat.com>
9202
9203 * elf32-sh.c: Added missing prototypes.
9204 * elf32-sh64.c: Likewise.
9205 (sh_elf_align_loads): Mark unused args as such.
9206 * elf64-sh64.c: Added missing prototypes.
9207 (struct elf_sh64_link_hash_entry): Fix typo.
9208 (sh_elf64_relocate_section): Fix info argument passed to
9209 _bfd_elf_section_offset.
9210
2c73f9d8
AM
92112002-02-11 Alan Modra <amodra@bigpond.net.au>
9212
9213 * Makefile.am: "make dep-am".
9214 * Makefile.in: Regenerate.
9215 * aclocal.m4: Regenerate.
9216 * config.in: Regenerate.
9217 * configure: Regenerate.
9218
d426c6b0
DJ
92192002-02-10 Daniel Jacobowitz <drow@mvista.com>
9220
9221 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9222 variable warnings.
9223 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9224 comparison warning.
9225 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9226 cast warnings for the common case.
9227
e58ee0cd
HPN
92282002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9229
9230 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9231 vectors.
9232 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9233 vectors.
9234
7793f4d0
RH
92352002-02-09 Richard Henderson <rth@redhat.com>
9236
9237 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9238 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9239 (elf64_alpha_relocate_section): Likewise.
9240 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9241 * bfd-in2.h, libbfd.h: Rebuild.
9242
7e799044
HPN
92432002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9244
9245 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9246 that base-plus-offset reloc accounting is consistent.
9247 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9248 up to date for undefined symbols.
9249
027d73eb
EC
92502002-02-08 Eric Christopher <echristo@redhat.com>
9251
9252 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9253
9254 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9255 sections for the O32 ABI.
9256
517662d4
CD
92572002-02-08 Chris Demetriou <cgd@broadcom.com>
9258
9259 * elf32-arm.h: Fix formatting of _("...").
9260 * elf32-d10v.c: Likewise.
9261 * elf32-m68k.c: Likewise.
9262 * elf32-mips.c: Likewise.
9263
5e37cc46
NC
92642002-02-08 Ivan Guzvinec <ivang@opencores.org>
9265
9266 * coff-or32.c: Fix compile time warning messages.
9267
fbca6ad9
AO
92682002-02-08 Alexandre Oliva <aoliva@redhat.com>
9269
9270 Contribute sh64-elf.
9271 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9272 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9273 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9274 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9275 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9276 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9277 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9278 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9279 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9280 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9281 New relocs.
9282 * libbfd.h, bfd-in2.h: Rebuilt.
9283 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9284 (sh_reloc_map): Map them.
9285 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9286 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9287 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9288 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9289 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9290 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9291 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9292 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9293 datalabel_got_offset.
9294 (sh_elf_link_hash_newfunc): Initialize it.
9295 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9296 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9297 GOT and GOTOFF handling to new SHmedia relocation types. Support
9298 GOT_BIAS.
9299 (sh_elf_check_relocs): Likewise.
9300 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9301 PLT entries using movi_shori_putval. Support GOT_BIAS.
9302 (sh_elf_finish_dynamic_sections): Likewise.
9303 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9304 relocation, it's now done by the caller.
9305 (GOT_BIAS): New.
9306 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9307 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9308 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9309 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9310 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9311 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9312 sh64_elf64_hash_table): New.
9313 (sh_elf64_howto_table): Introduce new relocs.
9314 (sh_elf64_info_to_howto): Accept new PIC relocs.
9315 (sh_elf64_relocate_section): Augment the scope of
9316 seen_stt_datalabel. Support new PIC relocs.
9317 (sh_elf64_check_relocs): Support new PIC relocs.
9318 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9319 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9320 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9321 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9322 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9323 movi_shori_putval, movi_3shori_putval,
9324 sh64_elf64_create_dynamic_sections,
9325 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9326 sh64_elf64_size_dynamic_sections,
9327 sh64_elf64_finish_dynamic_symbol,
9328 sh64_elf64_finish_dynamic_sections): New.
9329 (elf_backend_create_dynamic-sections,
9330 bfd_elf64_bfd_link_hash_table_create,
9331 elf_backend_adjust_dynamic_symbol,
9332 elf_backend_size_dynamic_sections,
9333 elf_backend_finish_dynamic_symbol,
9334 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9335 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9336 elf_backend_got_header_size, elf_backend_plt_header_size):
9337 Define.
9338 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9339 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9340 match official numbers and names; moved unmaching ones to the
9341 range 0xf2-0xff.
9342 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9343 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9344 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9345 sections.
9b5ecbd0 9346 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9347 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9348 be aligned.
9349 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9350 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9351 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9352 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9353 .cranges section with SEC_SORT_ENTRIES set.
9354 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9355 incoming sorted .cranges section.
9356 (sh64_bfd_elf_copy_private_section_data): New.
9357 (sh64_elf_final_write_processing): Only sort .cranges and modify
9358 start address if called by linker.
9359 2001-01-08 Ben Elliston <bje@redhat.com>
9360 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9361 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9362 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9363 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9364 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9365 line. Add comments before all entries.
9366 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9367 comment.
9368 (sh_elf64_reloc): Correct head comment.
9369 (sh_elf64_relocate_section): Correct spacing.
9370 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9371 instead call reloc_dangerous callback.
9372 <case R_SH_SHMEDIA_CODE>: New case.
9373 (sh_elf64_gc_mark_hook): Correct spacing.
9374 (sh_elf64_check_relocs): Ditto.
9375 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9376 New case.
9377 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9378 functions.
9379 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9380 clarify describing comment. Add comments before all entries.
9381 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9382 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9383 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9384 Sort .cranges section in final link. Prepare to set bit 0 on
9385 entry address.
9386 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9387 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9388 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9389 .cranges section.
9390 (sh64_backend_section_from_shdr): New, to recognize
9391 SHT_SH5_CR_SORTED on incoming .cranges section.
9392 (elf_backend_section_from_shdr): Define.
9393 (sh64_elf_final_write_processing): Sort outgoing .cranges
9394 section. (New, temporarily disabled:) Set bit 0 on entry address
9395 according to ISA type.
9396 (sh64_find_section_for_address): New.
9397 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9398 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9399 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9400 bfd_malloc, not xmalloc.
9401 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9402 global.
9403 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9404 temporarily disabled) setting bit 0 on entry address.
9405 (elf_backend_final_write_processing): Define.
9b5ecbd0 9406 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9407 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9408 be a proper relocation for PTA and PTB rather than a marker.
9409 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9410 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9411 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9412 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9413 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9414 Zero src_mask.
9415 * elf64-sh64.c: Ditto.
9416 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9417 * elf32-sh64.c: Include opcodes/sh64-opc.h
9418 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9419 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9420 parameters. No unused parameters. Caller changed.
9421 <case R_SH_PT_16>: New case.
9422 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9423 * Makefile.in: Regenerate.
9b5ecbd0 9424 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9425 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9426 all code sections.
9427 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9428 (sh64_elf_merge_private_data): Ditto.
9429 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9430 to access stored section flags.
9431 (sh64_elf_final_write_processing): Return immediately unless
9432 called by linker. Use sh64_elf_section_data (cranges) to get size
9433 of linker-generated cranges entries.
9434 (sh64_elf_copy_private_data): Add missing "return true".
9435 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9436 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9437 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9438 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9439 elf64-sh64.c:sh64_elf_fake_sections.
9440 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9441 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9442 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9443 (sh64_elf_final_write_processing): New.
9444 (elf_backend_final_write_processing): Define.
9445 (sh64_elf_fake_sections): Get header flags from tdata field.
9446 (sh64_elf_copy_private_data): Do not call
9447 sh64_elf_copy_private_data_internal, just copy e_flags field.
9448 (sh64_elf_merge_private_data): Do not call
9449 sh64_elf_copy_private_data_internal.
9b5ecbd0 9450 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9451 Remove EF_SH64_ABI64, let ELF size make difference.
9452 Remove SH64-specific BFD section flag.
9453 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9454 containing SHmedia through elf_section_data (asect)->tdata
9455 non-zero, not using a BFD section flag.
9456 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9457 (sh64_elf_merge_private_data): Similar.
9458 (elf_backend_section_flags): Don't define.
9459 (sh64_elf_backend_section_flags): Delete.
9460 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9461 not EF_SH64_ABI64.
9462 (sh_elf64_merge_private_data): Similar.
9463 * section.c (Section flags definitions): Don't define
9464 SEC_SH_ISA_SHMEDIA.
9465 (bfd-in2.h): Regenerate.
9b5ecbd0 9466 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9467 Make DataLabel references work with partial linking.
9468 * elf32-sh64.c: Fix formatting.
9469 (sh64_elf_link_output_symbol_hook): New.
9470 (elf_backend_link_output_symbol_hook): Define to
9471 sh64_elf_link_output_symbol_hook.
9472 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9473 undefined if partial linking. Adjust sanity check.
9474 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9475 (elf_backend_link_output_symbol_hook): Define to
9476 sh64_elf64_link_output_symbol_hook.
9477 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9478 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9479 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9480 Implement semantics for inter-file DataLabel references.
9481 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9482 (sh64_elf64_add_symbol_hook): New.
9483 (sh_elf64_relocate_section): If passing an indirect symbol with
9484 st_type STT_DATALABEL on the way to a symbol with st_other
9485 STO_SH5_ISA32, do not bitor 1 to the relocation.
9486 (elf_backend_add_symbol_hook): Define to
9487 sh64_elf64_add_symbol_hook.
9488 * elf64-sh32.c: Tweak comments.
9489 (DATALABEL_SUFFIX): Define.
9490 (sh64_elf_add_symbol_hook): New.
9491 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9492 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9493 symbol with st_type STT_DATALABEL on the way to a symbol with
9494 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9495 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9496 Pass through STT_DATALABEL.
9497 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9498 (elf_backend_get_symbol_type): Define.
9499 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9500 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9501 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9502 * elf32-sh64.c: Tweak comments.
9503 (sh64_elf_copy_private_data_internal): Add prototype.
9504 (bfd_elf32_bfd_set_private_flags): Define.
9505 (sh64_elf_copy_private_data_internal): Compare machine name, not
9506 textual BFD target name, to check whether to copy section flag
9507 SHF_SH5_ISA32.
9508 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9509 Tweak section-contents-type-mismatch message.
9510 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9511 Validize reloc-types.
9512 * elf64-sh64.c: New file.
9513 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9514 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9515 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9516 Regenerate dependencies.
9517 * Makefile.in: Regenerate.
9518 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9519 bfd_elf64_sh64l_vec.
9520 * configure.in: Handle bfd_elf64_sh64_vec and
9521 bfd_elf64_sh64l_vec.
9522 * configure: Regenerate.
9523 * po/POTFILES.in: Regenerate.
9524 * po/bfd.pot: Regenerate.
9b5ecbd0 9525 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9526 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9527 anything else but EF_SH64 and EF_SH64_ABI64.
9528 (sh64_elf_merge_private_data): Emit error for anything else but
9529 EF_SH64 and EF_SH64_ABI64.
9530 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9531 from targ_selvecs.
9532 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9533 bfd_elf32_sh64l_vec as a temporary measure.
9534 * configure: Regenerate.
9b5ecbd0 9535 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9536 * cpu-sh.c (arch_info_struct): Include sh5 item
9537 unconditionalized.
9538 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9539 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9540 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9541 * elf32-sh64.c: Tweak comments.
9542 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9543 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9544 (sh64_elf_copy_private_data_internal): Wrap long line.
9545 (sh64_elf_merge_private_data): Rewrite to allow objects from
9546 SH64 subsets to be linked together.
9547 (INCLUDE_SHMEDIA): Define.
9548 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9549 Parenthesize plus-expression inside or-expression.
9550 <global symbol>: Ditto.
9551 (sh_elf_set_mach_from_flags): Remove code refusing
9552 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9553 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9554 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9555 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9556 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9557 (sh_elf_relocate_section) <local symbol>: Or 1 in
9558 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9559 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9560 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9561 relocation.
9b5ecbd0 9562 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9563 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9564 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9565 Regenerate dependencies.
9566 * Makefile.in: Regenerate.
9567 * archures.c: Add bfd_mach_sh5.
9568 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9569 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9570 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9571 * configure: Regenerate.
9572 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9573 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9574 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9575 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9576 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9577 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9578 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9579 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9580 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9581 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9582 in item for SH5.
9583 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9584 for SHmedia relocs.
9585 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9586 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9587 shmedia_prepare_reloc, goto final_link_relocate if it returns
9588 non-zero, else fail as before.
9589 (sh_elf_set_mach_from_flags): Provide function only if not defined
9590 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9591 (sh_elf_set_private_flags): Provide function only if not defined
9592 as a macro.
9593 (sh_elf_copy_private_data): Similar.
9594 (sh_elf_merge_private_data): Similar.
9595 * section.c (SEC_SH_ISA_SHMEDIA): New.
9596 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9597 * elf32-sh64.c: New file.
9598 * libbfd.h: Regenerate.
9599 * bfd-in2.h: Regenerate.
9600 * po/POTFILES.in: Regenerate.
9601 * po/bfd.pot: Regenerate.
9602 * bfd-in2.h: Regenerate.
9603 * libbfd.h: Regenerate.
9604
e108f470
DJ
96052002-02-07 Daniel Jacobowitz <drow@mvista.com>
9606
9607 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9608 been included, not drag it in.
9609 * bfd-in2.h: Regenerate.
9610
259d18a3
L
96112002-02-06 H.J. Lu (hjl@gnu.org)
9612
9613 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9614 the mach and ISA fields if necessary.
9615
f13b834e
NC
96162002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9617
9618 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9619 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9620 be sure exactly which architecture this represents.
9621
82f6addb
NC
96222002-02-05 Nick Clifton <nickc@redhat.com>
9623
9624 * po/tr.po: Updated translation.
9625
899f54f5
AM
96262002-02-05 Alan Modra <amodra@bigpond.net.au>
9627
9628 From Jimi X <jimix@watson.ibm.com>
9629 * archures (bfd_mach_ppc64): Define.
9630 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9631 (bfd_powerpc_arch): Define.
9632 * bfd-in2.h: Regenerate.
9633 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9634 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9635 (bfd_powerpc_archs): Add default powerpc64 arch.
9636
248866a8
AM
96372002-02-05 Alan Modra <amodra@bigpond.net.au>
9638
9639 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9640 against section syms in readonly sections. Don't do the global
9641 sym check if we find one.
9642 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9643 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9644 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
9645 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9646 (elf_s390_grok_prstatus): Add missing prototype.
9647
4fa5c2a8
HPN
96482002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9649
9650 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9651 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9652 Call bfd_get_section_by_name only once. Initialize
9653 bpodata->n_bpo_relocs_this_section.
9654 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9655 referring to DSOs.
9656 (bpo_reloc_request_sort_fn): Don't use difference of values as
9657 return-value.
9658
537c972e
DB
96592002-02-02 David O'Brien <obrien@FreeBSD>
9660
9661 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9662 version 4.5 and later the same as 5-CURRENT.
9663 * configure: Re-generate.
9664
006336b8
JT
96652002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9666
9667 * config.bfd (hppa*-*-netbsd*): New target.
9668
6c571f00
PT
96692002-01-31 Philipp Thomas <pthomas@suse.de>
9670
19397422
AM
9671 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9672 to front of message. Unify messages with elf32-arm.h. Use
9673 commas where neccessary.
9674 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9675 ERROR in messages. Unify messages with coff-arm.c. Correct
9676 VFP/FPA error message.
9677 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9678 APCS-32 for translation.
6c571f00 9679
930b4cb2
HPN
96802002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9681
9682 Perform on-demand global register allocation from
9683 R_MMIX_BASE_PLUS_OFFSET relocs.
9684 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9685 bpo_reloc_request, struct bpo_greg_section_info): New.
9686 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9687 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9688 _bfd_mmix_check_all_relocs,
9689 _bfd_mmix_prepare_linker_allocated_gregs,
9690 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9691 (elf_mmix_howto_table): Correct src_mask for most relocs.
9692 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9693 case.
9694 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9695 case. Fix typo in comment. New label do_mmix_reloc.
9696 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9697 store first object file with a base-plus-offset reloc. Call
9698 mmix_elf_check_common_relocs for the part common with mmo.
9699 (mmix_elf_final_link): Write out linker-allocated register
9700 contents section.
9701 (elf_backend_gc_sweep_hook): Define.
9702 (bfd_elf64_bfd_relax_section): Define.
9703
9704 * mmo.c: Don't include <ctype.h>
9705 (mmo_init): Correct init-once logic.
9706
3e36d993
TR
97072002-02-01 Tom Rix <trix@redhat.com>
9708
9709 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9710
ba323545
AM
97112002-02-01 Alan Modra <amodra@bigpond.net.au>
9712
9713 * Makefile.am: Run "make dep-am"
9714 * Makefile.in: Regenerate.
9715
012884d6
DB
97162002-01-31 David O'Brien <obrien@FreeBSD>
9717
9718 * configure.in: Recognize the differences in core files from FreeBSD
9719 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9720 5-CURRENT.
9721 * configure: Regenerate.
9722
3b16e843
NC
97232002-01-31 Ivan Guzvinec <ivang@opencores.org>
9724
9725 * coff-or32.c: New file.
9726 * cpu-or32.c: New file.
9727 * elf32-or32.c: New file.
9728 * archures.c: Add support for or32.
9729 * targets.c: Add support for or32.
9730 * bfd-in2.h: Regenerate.
7dc0ab31 9731 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
9732 coff_write_object_contents): Add support for or32.
9733 * config.bfd: Add target.
9734 * configure.in: Add support for or32.
9735 * configure: Regenerate.
9736 * Makefile.am: Add support for or32.
9737 * Makefile.in: Regenerate.
3b16e843
NC
9738 * po/SRC-POTFILES.in: Add or32 files.
9739 * po/bfd.pot: Regenerate.
7dc0ab31 9740
caf8ca8e
NC
97412002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9742 Don Lindsay <lindsayd@cisco.com>
9743
9744 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9745 false' with a return of a bfd_reloc_ error code.
9746
e5dfef09
HPN
97472002-01-31 Hans-Peter Nilsson <hp@axis.com>
9748
9749 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9750 unexport unreferenced symbols when --export-dynamic. Call
9751 _bfd_elf_strtab_delref when unexporting.
9752
4e4770d0
DJ
97532002-01-30 Daniel Jacobowitz <drow@mvista.com>
9754
9755 * bfd-in.h: Include <stdbool.h> if it is available.
9756 * bfd-in2.h: Regenerated.
9757
e1fa50e7
AM
97582002-01-31 Alan Modra <amodra@bigpond.net.au>
9759
9760 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9761 not go via the plt.
9762
b5f79c76
NC
97632002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9764
b5f79c76
NC
9765 * archures.c: Tidy up formatting of embedded comments.
9766 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 9767 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
9768 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9769 * section.c: Tidy up formatting of embedded comments.
9770 * syms.c: Tidy up formatting of embedded comments.
9771 * targets.c: Tidy up formatting of embedded comments.
9772
9773 * bfd-in2.h: Regenerate.
9774
ca09e32b
NC
97752002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9776
9777 * vms-tir.c (cmd_name): New function.
9778 (tir_cmd_name): New function.
9779 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9780 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9781 Fix formatting.
7dc0ab31 9782
ca09e32b
NC
9783 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9784 translation.
9b5ecbd0 9785 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
9786
9787 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9788 translation.
9789
9790 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9791
9792 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9793
9794 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9795 message to aid in translation.
9796
9797 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9798 to aid in translation.
9799
9800 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9801
7dc0ab31 98022002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
9803
9804 * coff-arm.c, elf32-elf.h: Unify messages.
9805
05f64ac6
NC
98062002-01-30 Nick Clifton <nickc@redhat.com>
9807
9808 * po/sv.po: Updated translation.
9809
f5a3e38a
NC
98102002-01-30 Philipp Thomas <pthomas@suse.de>
9811
9812 * dwarf2.c (read_abbrev): Use full section name in error message.
9813 (decode_line_info): Likewise.
661a3fd4
NC
9814
9815 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9816 message.
9817
d926e03d
AM
98182002-01-30 Alan Modra <amodra@bigpond.net.au>
9819
9820 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9821 descriptor symbols for undefined function code syms. Clear
9822 ELF_LINK_NON_ELF so that they can stay weak.
9823
030d18fb 98242002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 9825 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
9826
9827 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9828 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9829 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9830 generation.
9831 * bfd-in2.h: Regenerate.
9832
fcc76bea
CD
98332002-01-29 Chris Demetriou <cgd@broadcom.com>
9834
9835 * elf32-mips.c: Add additional comments about HI16 relocation
9836 processing.
9837 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9838 pc-relative relocations. (Reverts change made on 2001-10-31.)
9839 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9840 for pc-relative relocations.
9841 (mips_elf_calculate_relocation): Add a comment about a kludge
9842 in the R_MIPS_GNU_REL_HI16 handling.
9843 (_bfd_mips_elf_relocate_section): Implement that kludge;
9844 adjust pc-relative HI16 relocation for difference in HI16 and
9845 LO16 addresses, since it can't easily be done in
9846 mips_elf_calculate_relocation.
9847
f9cd9119
MS
98482002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9849
9850 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9851 relocations with PC32 relocations for undefined or weak symbols.
9852 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9853 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9854
702248bb
JT
98552002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9856
9857 * elfcore.h (elf_core_file_p): Improve comment for last change.
9858
4867be41
DJ
98592002-01-27 Daniel Jacobowitz <drow@mvista.com>
9860
9861 * configure: Regenerated.
9862
a94cef6a
JT
98632002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9864
9865 * elfcore.h (elf_core_file_p): Set the machine architecture
9866 before processing the program headers.
9867
7562a296
HPN
98682002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9869
966abd70
HPN
9870 * configure.in <64-bit configuration>: If using gcc, check and
9871 emit error for egcs-1.1.2.
9872 * configure: Regenerate.
9873
e8eab623
NC
98742002-01-26 Egor Duda <deo@logos-m.ru>
9875
9876 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9877 as possible to avoid stack corruption.
9878
73896efb
RH
98792002-01-26 Richard Henderson <rth@redhat.com>
9880
9881 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9882 for non-allocated sections.
9883
98842002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
9885
9886 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9887 prstat.pr_reg even if it is a struct.
9888
73896efb 98892002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 9890
c5cd6d62 9891 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 9892
3d66c4f7
NC
98932002-01-25 Philipp Thomas <pthomas@suse.de>
9894
9895 * coffgen.c (coff_print_symbol): Don't mark info message
9896 for translation.
9897
9460ecda
NC
98982002-01-25 Nick Clifton <nickc@redhat.com>
9899
9900 * po/fr.po: Updated translation.
9901 * po/es.po: Updated translation.
9902
cc9ff76a
AM
99032002-01-25 Philipp Thomas <pthomas@suse.de>
9904
9905 * coff-alpha.c (alpha_relocate_section): Unify warning message
9906 for GP relative relocations without GP defined.
9907 * coff-mips.c (mips_relocate_section): Likewise.
9908
c68836a9
AM
99092002-01-25 Alan Modra <amodra@bigpond.net.au>
9910
9911 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9912 unsigned overflow when new_offset < old_offset.
9913
e8eab623 99142002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
9915
9916 * bfd.c (_bfd_abort): Fix typo.
9917
8ba89f17
RH
99182002-01-23 Richard Henderson <rth@redhat.com>
9919
9920 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9921 plt entries for undefweak symbols.
9922
c6953948
NC
99232002-01-23 Steve Ellcey <sje@cup.hp.com>
9924
c5cd6d62 9925 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
9926 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9927 (bfd_elf32_h8300_vec): Ditto.
9928
41bd81ab
AM
99292002-01-23 Alan Modra <amodra@bigpond.net.au>
9930
9931 * elf64-ppc.c: Remove stale part of ABI comment.
9932 (NO_OPD_RELOCS): Define.
9933 (ppc64_elf_check_relocs): Use it.
9934 (ppc64_elf_relocate_section): Here too.
9935 (build_one_stub): Don't point function syms at the stub. Instead,
9936 hijack plt.offset.
9937 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9938 really go to the stub. Make all dynamic relocs in opd against
9939 locals.
9940 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9941 plt.offset.
9942
f304919d
RH
99432002-01-22 Richard Henderson <rth@redhat.com>
9944
9945 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9946
c0ef99a7
AM
99472002-01-22 Alan Modra <amodra@bigpond.net.au>
9948
60ee0d4a
AM
9949 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9950 TOC_BASE_OFF adjustment.
9951
c0ef99a7
AM
9952 * Makefile.am: Run "make dep-am".
9953 * Makefile.in: Regenerate.
9954 * po/SRC-POTFILES.in: Regenerate.
9955
64328b46
AM
99562002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9957
9958 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9959 host defines.
9960
59953665 99612002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
9962
9963 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9964 Check for and emit error if sgot is NULL at this point.
9965
9596feea
JT
99662002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9967
9968 * config.bfd (ia64*-*-netbsd*): New target.
9969
7b45c6e1
AM
99702002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9971
9972 * som.c (som_write_space_strings): Comment typo fix.
9973
e5094212
AM
99742002-01-21 Alan Modra <amodra@bigpond.net.au>
9975
e86ce104
AM
9976 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9977 is_func_descriptor fields.
9978 (link_hash_newfunc): Init them.
9979 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9980 dot are candidates for plt entries. When processing .opd relocs,
9981 set function descriptor strings to point inside function code
9982 string, and set new ppc_link_hash_entry fields.
9983 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9984 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9985 function descriptors. It's now done in..
9986 (func_desc_adjust): New.
9987 (ppc64_elf_func_desc_adjust): New.
9988 (define elf_backend_always_size_sections): Define.
9989 (ppc64_elf_hide_symbol): New.
9990 (define elf_backend_hide_symbol): Define.
9991 (allocate_dynrelocs): Remove code looking up function descriptors
9992 as that has been done earlier.
9993 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9994 table.
9995 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9996 up function descriptor.
9997 (build_one_stub): Look up the function code sym. Check for
9998 invalid plt offsets.
9999 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10000 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10001
e5094212
AM
10002 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10003 boolean param.
10004 (_bfd_elf_link_hash_hide_symbol): Likewise.
10005 * elflink.h (elf_link_add_object_symbols): Adjust call to
10006 elf_backend_hide_symbol.
10007 (elf_fix_symbol_flags): Likewise.
10008 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10009 than bfd_alloc.
10010 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10011 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10012 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10013 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10014 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10015 and adjust to suit.
10016 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10017 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10018 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10019
40b8271b
AM
100202002-01-18 Alan Modra <amodra@bigpond.net.au>
10021
10022 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10023 dynamic function descriptor symbol, not the associated function
10024 symbol.
10025
55baa95b
EC
100262002-01-17 Eric Christopher <echristo@redhat.com>
10027
10028 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10029
328577ad
NC
100302002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10031
10032 * po/bfd.pot: Regenerate.
10033 * po/fr.po: Regenerate.
10034
af746e92
AM
100352002-01-17 Alan Modra <amodra@bigpond.net.au>
10036
10037 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10038 Remove "Elf_Internal_Shdr *" param.
10039 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10040 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10041 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10042 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10043 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10044 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10045 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10046 function to override special sections. Remove hdr arg from
10047 backend call, and don't loop.
10048
175e9962
EC
100492002-01-16 Eric Christopher <echristo@redhat.com>
10050
10051 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10052 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10053 relocations requiring gp0 and gp.
10054
96a846ea
RE
100552002-01-16 Richard Earnshaw <rearnsha@arm.com>
10056
175e9962 10057 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10058 EF_ARM_VFP_FLOAT.
10059 (elf32_arm_print_private_bfd_data): Likewise.
10060
af3ae48d
NC
100612002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10062
10063 * po/tr.po: Import new version.
10064
10ed1bba
AM
100652002-01-16 Alan Modra <amodra@bigpond.net.au>
10066
10067 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10068 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10069 (ORI_R0_R0_0): Correct.
10070
5d1634d7
AM
100712002-01-16 Alan Modra <amodra@bigpond.net.au>
10072
10073 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10074 when plt_not_loaded.
10075 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10076 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10077 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10078 (ppc64_elf_glink_code): Delete.
10079 (PPC64_ELF_GLINK_SIZE): Delete.
10080 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10081 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10082 ORI_R0_R0_0): Define.
10083 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10084 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10085 (ppc64_elf_link_hash_table_create): Init them.
10086 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10087 Don't copy to shared lib.
10088 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10089 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10090 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10091 room for .stub and .glink code.
10092 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10093 DT_PPC64_GLINK.
10094 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10095 bfd_elf64_bfd_final_link.
10096 (bfd_elf64_bfd_final_link): Don't define.
10097 (ppc64_elf_size_stubs): New.
10098 (build_plt_stub): New.
10099 (build_one_stub): New.
10100 (ppc64_elf_build_stubs): New.
10101 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10102 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10103 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10104 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10105 case output sections not separate. Adjust DT_RELASZ to not
10106 include plt relocs. Set reserved got entry. Set got and plt
10107 entry size.
10108 (elf_backend_got_header_size): Set to 8.
10109 * elf64-ppc.h: New file.
10110
c601ffdb
AM
101112002-01-16 Alan Modra <amodra@bigpond.net.au>
10112
10113 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10114 sections, use bfd_section_list_remove.
10115 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10116 * elflink.h (elf_link_add_object_symbols): When removing all
10117 sections, use bfd_section_list_clear.
10118
8fb4cb7f
NC
101192002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10120
10121 * po/sv.po: New file: Swedish translation.
10122 * configure.in (ALL_LINGUAS): Add sv.
10123 * configure: Regenerate.
10124
d3c456e9
JJ
101252002-01-15 Jakub Jelinek <jakub@redhat.com>
10126
10127 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10128 * elf.c (merge_sections_remove_hook): New function.
10129 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10130 _bfd_merge_sections.
10131 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10132 * libbfd.h: Rebuilt.
10133 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10134 Call remove_hook if a SEC_EXCLUDE section is encountered.
10135
1f7fd478
NC
101362002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10137
10138 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10139 (xstormy16_reloc_map): Initialise new field with correct howto
10140 table.
10141 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10142 howto entry.
10143
b87011e9
MS
101442002-01-10 Michael Snyder <msnyder@redhat.com>
10145
10146 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10147 (elfcore_write_pstatus): Use long instead of pid_t;
10148 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10149
175e9962 101502002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10151
10152 * elf.c: Update copyright years.
10153 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10154 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10155
7c76fa91
MS
101562002-01-08 Michael Snyder <msnyder@redhat.com>
10157
10158 Add capability to write corefile note sections, for gdb.
10159 * elf.c (elfcore_write_note): New function.
10160 (elfcore_write_prpsinfo): New function.
10161 (elfcore_write_prstatus): New function.
10162 (elfcore_write_pstatus): New function.
10163 (elfcore_write_prfpreg): New function.
10164 (elfcore_write_prxfpreg): New function.
97996af6 10165 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10166
e1fddb6b
AO
101672002-01-08 Alexandre Oliva <aoliva@redhat.com>
10168
10169 * elf.c (elf_fake_sections): Propagate errors from
10170 elf_backend_fake_section.
10171
8d05742f
JT
101722002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10173
10174 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10175 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10176 (elf32-sh-nbsd.lo): New rule.
10177 * Makefile.in: Regenerate.
10178 * config.bfd (sh*le-*-netbsdelf*): New target.
10179 (sh*-*-netbsdelf*): New target.
10180 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10181 (bfd_elf32_shnbsd_vec): New vector.
10182 (bfd_elf32_shlnbsd_vec): New vector.
10183 * configure: Regenerate.
10184 * elf32-sh-nbsd.c: New file.
10185 * targets.c: Update copyright years.
175e9962 10186 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10187 bfd_elf32_shnbsd_vec.
10188
1dba4cb4
AH
101892002-01-07 Aldy Hernandez <aldyh@redhat.com>
10190
10191 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10192
47b22aef
GK
101932002-01-07 Geoffrey Keating <geoffk@redhat.com>
10194
10195 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10196 of a symbol in a section that will be deleted.
10197
be2d1673
NC
101982002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10199
10200 * po/es.po: New file: Spanish translation.
10201 * configure.in (ALL_LINGUAS): Add es.
10202 * configure: Regenerate.
10203
d9cf1b54
AM
102042002-01-06 Steve Ellcey <sje@cup.hp.com>
10205
10206 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10207 argument so we can handle HP-UX specially.
10208 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10209 (elfNN_hpux_backend_section_from_bfd_section): New for support
10210 of SHN_IA_64_ANSI_COMMON.
10211 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10212 (is_unwind_section_name): Add special HP-UX support.
10213 (elfNN_ia64_section_from_shdr): Add support for more sections.
10214 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10215 add support for more sections.
10216 (elfNN_ia64_additional_program_headers): Modify
10217 is_unwind_section_name call.
10218 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10219 only one unwind section in segment.
10220
3f3c5c34
AM
102212002-01-06 Alan Modra <amodra@bigpond.net.au>
10222
10223 * syms.c (_bfd_generic_make_empty_symbol): New function.
10224 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10225 _bfd_generic_make_empty_symbol.
10226 * libbfd.h: Regenerate.
10227 * bfd-in2.h: Regenerate.
10228 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10229 (hppabsd_core_get_symtab_upper_bound): Don't define.
10230 (hppabsd_core_get_symtab): Likewise.
10231 (hppabsd_core_print_symbol): Likewise.
10232 (hppabsd_core_get_symbol_info): Likewise.
10233 (hppabsd_core_bfd_is_local_label_name): Likewise.
10234 (hppabsd_core_get_lineno): Likewise.
10235 (hppabsd_core_find_nearest_line): Likewise.
10236 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10237 (hppabsd_core_read_minisymbols): Likewise.
10238 (hppabsd_core_minisymbol_to_symbol): Likewise.
10239 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10240 Formatting fixes.
10241 * hpux-core.c: Similarly.
10242 * irix-core.c: Similarly.
10243 * osf-core.c: Similarly.
10244 * sco5-core.c: Similarly.
10245 * binary.c (binary_make_empty_symbol): Remove function, define as
10246 _bfd_generic_make_empty_symbol.
10247 * ihex.c (ihex_make_empty_symbol): Likewise.
10248 * mmo.c (mmo_make_empty_symbol): Likewise.
10249 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10250 * srec.c (srec_make_empty_symbol): Likewise.
10251 * versados.c (versados_make_empty_symbol): Likewise.
10252 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10253 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10254 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10255 rather than _bfd_vms_make_empty_symbol.
10256 * vms-misc.c (new_symbol): Likewise.
10257
3f0a7f7f
AM
102582002-01-05 Alan Modra <amodra@bigpond.net.au>
10259
9e7b37b3
AM
10260 * section.c (bfd_section_init): Remove unnecessary initialisations.
10261 (bfd_section_list_clear): New function.
10262 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10263 (_bfd_strip_section_from_output): Use them.
10264 * coffcode.h (coff_set_alignment_hook): Likewise.
10265 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10266 * elf64-mips.c (mips_elf64_final_link): Likewise.
10267 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10268 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10269 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10270 * bfd-in2.h: Regenerate.
10271
10272 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10273 rather than doing our own section handling. Clean up after errors
10274 with bfd_release and bfd_section_list_clear. Handle unexpected
10275 flags.
10276 * aoutf1.h (sunos4_core_file_p): Likewise.
10277 * aix386-core.c (aix386_core_file_p): Likewise.
10278 * cisco-core.c (cisco_core_file_validate): Likewise.
10279 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10280 * trad-core.c (trad_unix_core_file_p): Likewise.
10281
9b5ecbd0 10282 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10283 with bfd_release and bfd_section_list_clear.
10284 * hpux-core.c (hpux_core_core_file_p): Likewise.
10285 * irix-core.c (irix_core_core_file_p): Likewise.
10286 * lynx-core.c (lynx_core_file_p): Likewise.
10287 * osf-core.c (osf_core_core_file_p): Likewise.
10288 * rs6000-core.c (rs6000coff_core_p): Likewise.
10289 * sco5-core.c (sco5_core_file_p): Likewise.
10290
3f0a7f7f
AM
10291 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10292 sign extension adjustments without conditionals.
10293
a3aa38ee
JJ
102942002-01-04 Jakub Jelinek <jakub@redhat.com>
10295
10296 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10297 CIE at .eh_frame start is removed due to no FDEs referencing it.
10298
8a8b2d4b
AJ
102992002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10300
10301 * config.bfd (x86_64-*-netbsd*): New target.
10302 * configure.in (x86_64-*-netbsd*): Set COREFILE
10303 to netbsd-core.lo.
10304 * configure: Regenerated.
10305
04b5af89
TR
103062002-01-03 Tom Rix <trix@redhat.com>
10307
10308 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10309 for recent bfd_make_section_anyway change.
10310
51c5503b
NC
103112002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10312
10313 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10314 R_ARM_THM_PC11 reloc.
10315
07f7c046
NC
103162002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10317
10318 * configure.in (LINGUAS): Add ja.
10319 * configure: Regenerate.
10320 * po/ja.po: Import from translation project's web site.
10321
5eefb65f
NC
103222002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10323
10324 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10325 messages to ease translation into other languages.
10326
39e90f10 10327For older changes see ChangeLog-0001
56882138
AM
10328\f
10329Local Variables:
10330mode: change-log
10331left-margin: 8
10332fill-column: 74
10333version-control: never
10334End: