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