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