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