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