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