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