* elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
d2ff124f
AS
12003-05-17 Andreas Schwab <schwab@suse.de>
2
3 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
4 elf_section_data during processing of pc-relative and absolute
5 relocations.
6 (elf_m68k_relocate_section): Use the cached reloc section instead
7 of computing it again. Fix handling of visibility. Don't modify
8 addend when copying over a relocation into the output.
9
9c7a29a3
AM
102003-05-17 Alan Modra <amodra@bigpond.net.au>
11
12 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
13 to trim plt entries. Move undefweak non-default visibility test..
14 (allocate_dynrelocs): ..from here.
15 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
16 dynamic_sections_created here. Update comment. Move undefweak
17 non-default visibility test..
18 (allocate_dynrelocs): ..from here. Fix comment.
19 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
20 to trim plt entries. Move undefweak non-default visibility test..
21 (allocate_dynrelocs): ..from here. Fix comment.
22 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
23 STV_DEFAULT rather than comparing with zero.
24 * elflink.c (_bfd_elf_merge_symbol): Likewise.
25 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
26
9bcf4de0
TS
272003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
28
29 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
30 pointers.
31 (_bfd_set_gp_value): Likewise.
32
5d1db417
MS
332003-05-16 Michael Snyder <msnyder@redhat.com>
34 From Bernd Schmidt <bernds@redhat.com>
35 * archures.c (bfd_mach_h8300sx): New.
36 * bfd-in2.h: Regenerate.
37 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
38 (h8300sx_info_struct): New.
39 (h8300s_info_struct): Link to it.
40 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
41 (elf32_h8_final_write_processing): Likewise.
42 (elf32_h8_relax_section): Likewise.
43
80c7c40a
NC
442003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
45
46 * config.bfd: Accept i[3-7]86 variants.
47 * configure.host: Likewise.
48 * configure.in: Likewise.
49 * configure: Regenerate.
50
c1be741f
L
512003-05-15 H.J. Lu <hongjiu.lu@intel.com>
52
53 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
54 symbol.
55
a15d9d3a
L
562003-05-15 H.J. Lu <hongjiu.lu@intel.com>
57
58 * elflink.h (elf_link_check_versioned_symbol): Also allow
59 the base version.
60
09695f56
AM
612003-05-15 Alan Modra <amodra@bigpond.net.au>
62 H.J. Lu <hongjiu.lu@intel.com>
63
64 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
65 (elf_i386_relocate_section): Likewise.
66 * elf32-ppc.c (allocate_dynrelocs): Likewise.
67 (ppc_elf_relocate_section): Likewise.
68 * elf64-ppc.c (allocate_dynrelocs): Likewise.
69 (ppc64_elf_relocate_section): Likewise.
70
40f62fa0
TS
712003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
72
73 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
74
47247ced
SC
752003-05-13 Stephane Carrez <stcarrez@nerim.fr>
76
77 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
78 processor capability, allow merge of HC12 and HCS12 in some cases.
79 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
80 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
81 (bfd_m68hc12_arch): Link it.
82 (scan_mach): New function.
83
32dfa85d
AH
842003-05-13 Andrew Haley <aph@redhat.com>
85
86 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
87
586119b3
AM
882003-05-13 Alan Modra <amodra@bigpond.net.au>
89 H.J. Lu <hongjiu.lu@intel.com>
90
91 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
92 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
93 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
94 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
95 (ppc_elf_relocate_section): Likewise.
96 * elf64-ppc.c (allocate_dynrelocs): Likewise.
97 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
98 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
99 relocs need no other types.
100 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
101 dynreloc check.
102 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
103 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
104 .got relocs.
105
04e534c3
KK
1062003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
107
108 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
109 copy ELF_LINK_NON_GOT_REF from weakdef.
110 (allocate_dynrelocs): For undef weak syms with non-default
111 visibility, a) don't allocate plt entries, b) don't allocate
112 .got relocs, c) discard dyn rel space
113 (sh_elf_relocate_section): d) don't generate .got relocs, e)
114 don't generate dynamic relocs.
115 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
116 for weakdefs when symbol already adjusted.
117
0afb2dc0
NC
1182003-05-12 Nick Clifton <nickc@redhat.com>
119
120 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
121 overflow detection for R_XSTORMY16_16 reloc.
122
9d29900b
NC
1232003-05-12 Paul Clarke <paulc@senet.com.au>
124
125 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
126
a48c6a54
JE
1272003-05-11 Jason Eckhardt <jle@rice.edu>
128
129 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
130 adjust upper bits.
131 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
132 proper place.
133 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
134 proper place.
135
44f745a6
AS
1362003-05-11 Andreas Schwab <schwab@suse.de>
137
138 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
139 complicated tests for unresolvable relocs with a simple direct
140 scheme using "unresolved_reloc" var. Report some detail on
141 bfd_reloc_outofrange and similar errors.
142
4ec72bde
MS
1432003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
144
145 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
146 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
147 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
148 * elf64-s390.c: Likewise.
149
64285810
MS
1502003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
151
152 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
153 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
154 ELF_LINK_NON_GOT_REF from weakdef.
155 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
156 already been adjusted before treating it specially.
157 * el64-s390.c: Likwise.
158
82058a73
MS
1592003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
160
161 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
162 non-default visibility, a) don't make them dynamic, b) discard
163 space for dynamic relocs.
164 (elf_s390_relocate_section): Initialize the GOT entries and skip
165 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
166 symbols with non-default visibility.
167 * elf64-s390.c: Likewise.
168
60d8b524
AM
1692003-05-09 Alan Modra <amodra@bigpond.net.au>
170
171 * cpu-arm.c (arm_check_note): Warning fix.
172 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
173 to keep relocs if edited.
174 (iq2000_elf_print_private_bfd_data): Return TRUE.
175 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
176 ELF64_R_SYM.
177 (elfNN_ia64_relax_ldxmov): Warning fix.
178 * xtensa-isa.c (xtensa_add_isa): Warning fix.
179 * xtensa-modules.c (get_num_opcodes): Warning fix.
180
e57b5356
AM
1812003-05-09 Andrey Petrov <petrov@netbsd.org>
182
183 * elf.c (elf_fake_sections): Use correct cast for sh_name.
184
45d6a902
AM
1852003-05-09 Alan Modra <amodra@bigpond.net.au>
186
187 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
188 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
189 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
190 (bfd_elf_record_link_assignment): Move from elflink.h.
191 (_bfd_elf_merge_symbol): Likewise.
192 (_bfd_elf_add_default_symbol): Likewise.
193 (_bfd_elf_export_symbol): Likewise.
194 (_bfd_elf_link_find_version_dependencies): Likewise.
195 (_bfd_elf_link_assign_sym_version): Likewise.
196 (_bfd_elf_link_read_relocs): Likewise.
197 (_bfd_elf_link_size_reloc_section): Likewise.
198 (_bfd_elf_fix_symbol_flags): Likewise.
199 (_bfd_elf_adjust_dynamic_symbol): Likewise.
200 (_bfd_elf_link_sec_merge_syms): Likewise.
201 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
202 and bed->s->sizeof_rela.
203 (_bfd_elf_link_output_relocs): Likewise.
204 * elf-bfd.h (struct elf_size_info): Rename file_align to
205 log_file_align.
206 (struct elf_info_failed): Move from elflink.h.
207 (struct elf_assign_sym_version_info): Likewise.
208 (struct elf_find_verdep_info): Likewise.
209 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
210 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
211 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
212 _bfd_elf_link_assign_sym_version,
213 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
214 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
215 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
216 _bfd_elf_link_sec_merge_syms): Declare.
217 (bfd_elf32_link_create_dynamic_sections): Don't declare.
218 (_bfd_elf32_link_read_relocs): Likewise.
219 (bfd_elf64_link_create_dynamic_sections): Likewise.
220 (_bfd_elf64_link_read_relocs): Likewise.
221 * elflink.h: Move lots o' stuff elsewhere.
222 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
223 (bfd_elf64_record_link_assignment): Likewise.
224 (bfd_elf_record_link_assignment): Declare.
225 * bfd-in2.h: Regenerate.
226 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
227 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
228 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
229 (assign_file_positions_for_segments): Likewise.
230 (assign_file_positions_except_relocs): Likewise.
231 (swap_out_syms, elfcore_write_note): Likewise.
232 * elf-m10200.c: Adjust for changed function names.
233 * elf-m10300.c: Likewise.
234 * elf32-arm.h: Likewise.
235 * elf32-h8300.c: Likewise.
236 * elf32-hppa.c: Likewise.
237 * elf32-ip2k.c: Likewise.
238 * elf32-m32r.c: Likewise.
239 * elf32-m68hc11.c: Likewise.
240 * elf32-m68hc1x.c: Likewise.
241 * elf32-m68k.c: Likewise.
242 * elf32-mips.c: Likewise.
243 * elf32-ppc.c: Likewise.
244 * elf32-sh.c: Likewise.
245 * elf32-v850.c: Likewise.
246 * elf32-xtensa.c: Likewise.
247 * elf64-alpha.c: Likewise.
248 * elf64-hppa.c: Likewise.
249 * elf64-mmix.c: Likewise.
250 * elf64-ppc.c: Likewise.
251 * elf64-sh64.c: Likewise.
252 * elfxx-ia64.c: Likewise.
253 * elfxx-mips.c: Likewise.
254 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
255 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
256 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
257 * elf64-mips.c (mips_elf64_size_info): Likewise.
258 * elf64-s390.c (s390_elf64_size_info): Likewise.
259 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
260
bf1e742e
L
2612003-05-08 H.J. Lu <hongjiu.lu@intel.com>
262
263 * elflink.h (elf_add_default_symbol): After skipping the
264 unversioned symbol, go to non-default one.
265
6a32c710
L
2662003-05-07 H.J. Lu <hongjiu.lu@intel.com>
267
268 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
269 want_plt field.
270 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
271 for symbols with non-default visibility.
272
71552942
L
2732003-05-07 H.J. Lu <hongjiu.lu@intel.com>
274
275 * elflink.h (elf_link_check_versioned_symbol): Also handle the
276 case that a DSO references a hidden symbol which may be
277 satisfied by a versioned symbol in another DSO.
278 (elf_link_output_extsym): Check versioned definition for hidden
279 symbol referenced by a DSO.
280
208c2cd6
NC
2812003-05-07 Nick Clifton <nickc@redhat.com>
282
283 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
284 R_XSTORMY16_16 reloc to ignore overflows.
285
aa701218
AO
2862003-05-06 Alexandre Oliva <aoliva@redhat.com>
287
288 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
289 error message for mixing different-endian files. Check for ABI
290 compatibility of input files with the selected emulation.
291
4e795f50
AM
2922003-05-05 Alan Modra <amodra@bigpond.net.au>
293
294 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
295 non-default visibility, a) don't make them dynamic, b) discard
296 space for dynamic relocs.
297 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
298
299 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
300 non-default visibility, a) don't allocate plt entries, b) don't
301 allocate .got relocs, c) discard dyn rel space,
302 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
303 don't generate dynamic relocs.
304 * elf64-ppc.c (allocate_dynrelocs): As above.
305 (ppc64_elf_relocate_section): As above.
306
4bc6e03a
AJ
3072003-05-05 Andreas Jaeger <aj@suse.de>
308
309 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
310 relocation entries for weak undefined symbols with non-default
311 visibility.
312 (elf64_x86_64_relocate_section): Initialize the GOT entries and
313 skip R_386_32/R_386_PC32 for weak undefined symbols with
314 non-default visibility.
315
ef5aade5
L
3162003-05-04 H.J. Lu <hjl@gnu.org>
317
318 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
319 relocation entries for weak undefined symbols with non-default
320 visibility.
321 (elf_i386_relocate_section): Initialize the GOT entries and
322 skip R_386_32/R_386_PC32 for weak undefined symbols with
323 non-default visibility.
324
325 * elfxx-ia64.c (allocate_fptr): Don't allocate function
326 descriptors for weak undefined symbols with non-default
327 visibility.
328 (allocate_dynrel_entries): Don't allocate relocation entries
329 for symbols resolved to 0.
330 (set_got_entry): Don't install dynamic relocation for weak
331 undefined symbols with non-default visibility.
332 (set_pltoff_entry): Likewise.
333
334 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
335 with non-default visibility.
336 (elf_link_output_extsym): Don't make weak undefined symbols
337 with non-default visibility dynamic.
338
c424e0e9
L
3392003-05-04 H.J. Lu <hjl@gnu.org>
340
341 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
342
d31e3dfe
L
3432003-05-04 H.J. Lu <hjl@gnu.org>
344
345 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
346 symbol dynamic. Check indirection when removing the old
347 definition for symbols with non-default visibility.
348 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
349
4d2e1ff0
NC
3502003-05-02 Nick Clifton <nickc@redhat.com>
351
352 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
353 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
354 unsigned overflow.
355
d40d037c
AJ
3562003-05-02 Andreas Jaeger <aj@suse.de>
357
358 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
359 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
360 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
361 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
362 ELF_LINK_NON_GOT_REF from weakdef.
363
c5d1701e
NC
3642003-05-02 Charles Lepple <clepple@ghz.cc>
365 Nick Clifton <nickc@redhat.com>
366
367 * acinclude.m4: Fix name of --enable-install-libbfd switch.
368 * aclocal.m4: Regenerate.
369 * configure: Regenerate.
370 * Makefile.in: Regenerate.
371
81848ca0
AM
3722003-05-01 Alan Modra <amodra@bigpond.net.au>
373
374 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
375 weakdef sym has already been adjusted before treating it specially.
376 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
377 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
378 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
379 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 380
c7996ad6
L
3812003-04-28 H.J. Lu <hjl@gnu.org>
382
383 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
384 the relax finalize pass.
385
386 * section.c (struct sec): Add need_finalize_relax and remove
387 flag11.
388 (STD_SECTION): Update struct sec initializer.
389 * bfd-in2.h: Regenerated.
390
f006af20
L
3912003-04-28 H.J. Lu <hjl@gnu.org>
392
393 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
394 to copy any information related to dynamic linking when we flip
395 the indirection.
396
1b1fe8fe
L
3972003-04-27 H.J. Lu <hjl@gnu.org>
398
399 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
400 (ELF_LINK_DYNAMIC_WEAK): New.
401
402 * elflink.h (elf_merge_symbol): Add one argument to indicate if
403 a symbol should be skipped. Ignore definitions in dynamic
404 objects for symbols with non-default visibility.
405 (elf_add_default_symbol): Adjusted.
406 (elf_link_add_object_symbols): Check if a symbol should be
407 skipped. Don't merge the visibility field with the one from
408 a dynamic object.
409 (elf_link_check_versioned_symbol): Use undef_bfd.
410 (elf_link_output_extsym): Warn if a forced local symbol is
411 referenced from dynamic objects. Make non-weak undefined symbol
412 with non-default visibility a fatal error.
413
052a450c
DJ
4142003-04-27 Daniel Jacobowitz <drow@mvista.com>
415
416 * configure.in: Bump version on HEAD to 2.14.90.
417 * configure: Regenerated.
418
d204f4c0
SC
4192003-04-26 Stephane Carrez <stcarrez@nerim.fr>
420
421 PR savannah/3331:
422 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
423 when we couldn't relax something.
424
3c0a515d
L
4252003-04-25 Alan Modra <amodra@bigpond.net.au>
426
427 * elflink.h (elf_merge_symbol): When we find a regular definition
428 for an indirect symbol, flip the indirection so that the old
429 direct symbol now points to the new definition.
430
d145330d
RM
4312003-04-24 Roland McGrath <roland@redhat.com>
432
433 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
434
fc0bffd6
AM
4352003-04-24 Alan Modra <amodra@bigpond.net.au>
436
437 * elf32-ppc.c: Formatting and comment fixes.
438 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
439 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
440
4412003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
442
443 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
444 * bfd-in2.h: Rebuilt.
445 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 446 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
447 & H8300SNMAGIC.
448 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
449 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
450 (h8300sn_info_struct, h8300hn_info_struct): New.
451 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
452 (elf32_h8_final_write_processing): Likewise.
453
267fb3c1
KK
4542003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
455
456 * elf32-sh.c (tpoff): New.
457 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
458 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 459 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 460 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 461 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
462 (dtpoff_base): Fix wrong indentation.
463 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
464 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
465 R_SH_TLS_TPOFF32 relocations.
466
ef230218
JR
4672003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
468
469 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
470 * cpu-sh.c: Likewise.
471 * elf32-sh.c: Likewise.
472 * reloc.c (bfd_reloc_code_real): Likewise.
473 * elf32-sh64-com.c: Change comment to refer to SuperH.
474 * elf32-sh64.c: Likewise.
475 * elf64-sh64.c: Likewise.
476 * bfd-in2.h (enum bfd_architecture): Regenerate.
477
8c29f035
AM
4782003-04-23 Alan Modra <amodra@bigpond.net.au>
479
480 From Julien LEMOINE <speedblue@debian.org>
481 * elf32-i386.c (elf_i386_info_to_howto): Delete.
482 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
483
26597c86
NC
4842003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
485
486 * archures.c: Replace references to Mitsubishi M32R with references
487 to Renesas M32R.
488 * relocs.c: Likewise.
489 * bfd-in2.h: Regenerate.
490
cc13e3ef
RH
4912003-04-21 Richard Henderson <rth@redhat.com>
492
493 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
494 executable when a symbol is defined both regular and dynamic.
495
f5a6f915
SC
4962003-04-21 Stephane Carrez <stcarrez@nerim.fr>
497
498 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
499 (elf32-m68hc1x.lo): Update dependencies
500 * configure.in: Add elf32-m68hc1x.lo.
501 * configure: Rebuild.
502 * Makefile.in: Rebuild.
503
3a65329d
SC
5042003-04-21 Stephane Carrez <stcarrez@nerim.fr>
505
506 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
507 (m68hc11_elf_hash_table_create): New function.
508 (elf32_m68hc11_link_hash_table_free): New function.
509 (stub_hash_newfunc): New function.
510 (m68hc11_add_stub): New function.
511 (elf32_m68hc11_add_symbol_hook): New function.
512 (elf32_m68hc11_setup_section_lists): New function.
513 (elf32_m68hc11_next_input_section): New function.
514 (elf32_m68hc11_size_stubs): New function.
515 (elf32_m68hc11_build_stubs): New function.
516 (m68hc11_get_relocation_value): New function.
517 (elf32_m68hc11_relocate_section): Call the above to redirect
518 some relocations to the trampoline code.
519 (m68hc11_elf_export_one_stub): New function.
520 (m68hc11_elf_set_symbol): New function.
521 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
522 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
523 is not yet initialized.
524
525 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
526 (elf32_m68hc11_stub_hash_entry): New struct.
527 (m68hc11_page_info): Add trampoline handler address.
528 (m68hc11_elf_link_hash_table): Add stubs generation members.
529 (elf32_m68hc11_add_symbol_hook): Declare.
530 (elf32_m68hc11_setup_section_lists): Declare.
531 (elf32_m68hc11_size_stubs): Declare.
532 (elf32_m68hc11_build_stubs): Declare.
8c29f035 533
3a65329d
SC
534 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
535 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
536 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
537 (_bfd_m68hc11_elf_set_private_flags): Ditto.
538 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
539 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
540 (bfd_elf32_bfd_link_hash_table_create): Define.
541 (elf_backend_add_symbol_hook): Define.
542 (m68hc11_elf_bfd_link_hash_table_create): New function.
543 (m68hc11_elf_build_one_stub): New function.
544 (m68hc11_elf_size_one_stub): New function.
545 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
546 (bfd_elf32_bfd_link_hash_table_create): Define.
547
548 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
549 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
550 (m68hc12_phys_addr): Ditto.
551 (m68hc12_phys_page): Ditto.
552 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
553 (elf32_m68hc11_gc_mark_hook): Likewise.
554 (elf32_m68hc11_gc_sweep_hook): Likewise.
555 (elf32_m68hc11_check_relocs): Likewise.
556 (elf32_m68hc11_relocate_section): Likewise.
557 (_bfd_m68hc12_elf_set_private_flags): Likewise.
558 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
559 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
560 (m68hc12_elf_build_one_stub): New function.
561 (m68hc12_elf_size_one_stub): New function.
562 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
563 (elf_backend_add_symbol_hook): Define.
564 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
565
4081944f
NC
5662003-04-18 Nick Clifton <nickc@redhat.com>
567
568 * format.c (bfd_check_format_matches): Only check associated
569 vector if the matching_vector has been created.
570
060dc71d
AO
5712003-04-15 Alexandre Oliva <aoliva@redhat.com>
572
573 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
574 2003-04-09's change.
575
a3476bef
NC
5762003-04-15 Brian Ford <ford@vss.fsi.com>
577
578 * peicode.h (coff_swap_scnhdr_in): If a section holds
579 uninitialized data and is from an object file or from an
580 executable image that has not initialized the s_size field, or if
581 the physical size is padded, use the virtual size (stored in
582 s_paddr) instead.
583
ca4fa240
NC
5842003-04-15 H.J. Lu <hjl@gnu.org>
585
586 * elflink.h (elf_link_add_object_symbols): Properly report
587 filename for alignment reduction.
588
c2dcd04e
NC
5892003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
590
591 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
592 * reloc.c: Likewise.
593 * coff-h8300.c: Likewise.
594 * coff-h8500.c: Likewise.
595 * coff-sh.c: Likewise.
596 * cpu-h8300.c: Likewise.
597 * cpu-sh.c: Likewise.
598 * elf32-h8300.c: Likewise.
599 * elf32-sh.c: Likewise.
600 * elf32-sh64-com.c: Likewise.
601 * elf32-sh64.c: Likewise.
602 * elf64-sh64.c: Likewise.
603 * bfd-in2.h: Regenerate.
604
f7661995
NC
6052003-04-14 H.J. Lu <hjl@gnu.org>
606
607 * elflink.h (elf_link_add_object_symbols): Maintain maximum
608 alignment for common symbols. Warn reducing alignment for
609 common symbols. Report old filename when symbol size changes.
610
93a2b7ae
AO
6112003-04-12 Alexandre Oliva <aoliva@redhat.com>
612
613 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
614 occurrences of the same test changed in the previous patch.
615 Optimize.
616
0176c794
AO
6172003-04-11 Alexandre Oliva <aoliva@redhat.com>
618
619 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
620 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
621 GOT_DISP/addend only if the symbol got a global GOT entry.
622
0fdc1bf1
AO
6232003-04-10 Alexandre Oliva <aoliva@redhat.com>
624
625 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
626 GOT_PAGE/GOT_OFST referencing overridable symbol to
627 GOT_DISP/addend.
628 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
629 global symbol as GOT_DISP.
630
9b8c98a4
BW
6312003-04-10 Bob Wilson <bob.wilson@acm.org>
632
633 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
634 next relocation on an undefined symbol.
635
ec1659c8
RH
6362003-04-09 Richard Henderson <rth@redhat.com>
637
638 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
639 Ignore relocations against r_symndx == 0.
640
7dfb07f7
L
6412003-04-09 H.J. Lu <hjl@gnu.org>
642
643 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
644 FALSE for undefined symbols.
645 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
646
a3805e4e
AO
6472003-04-09 Alexandre Oliva <aoliva@redhat.com>
648
649 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
650 and IRIX-specific shift-to-64-bit 4-byte lengths before following
651 addr_size.
652
69931e60
AO
6532003-04-08 Alexandre Oliva <aoliva@redhat.com>
654
655 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
656 pointer size from ABI, not arch_bits_per_address.
657
59a8c196
KB
6582003-04-07 Kevin Buettner <kevinb@redhat.com>
659
660 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
661 constants for n32 ABI.
662
8e16317c
NC
6632003-04-06 Andrew Cagney <cagney@redhat.com>
664
665 * simple.c (bfd_simple_get_relocated_section_contents): Disable
666 free that leads to GDB vs BFD memory corruption.
667
196486be
SC
6682003-04-04 Stephane Carrez <stcarrez@nerim.fr>
669
670 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
671 symbols that mark the end of the section.
672 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
673 converting to a relative branch so that the offset is computed after
674 the relaxation; also relocate a jsr into a bsr if possible but don't
675 relax them if they are to a far symbol as we need to call the
676 trampoline code.
677 (elf_m68hc11_howto_table): Set pcrel_offset to true.
678
be33c5dd
SS
6792003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
680
681 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
682 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
683 * bfd-in2.h: Regenerate
684 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
685 * cpu-tic4x.c: Ditto
686
ff0c9faf
NC
6872003-04-03 Nick Clifton <nickc@redhat.com>
688
689 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
690 differently for object files and executables.
691 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
692 for object files or for executables who have not already
693 initialised the field.
694 * libpei.h (bfd_pe_executable_p): New macro. Return true if
695 the PE format bfd is an executable.
696
2b98e6c0
AM
6972003-04-03 Alan Modra <amodra@bigpond.net.au>
698
699 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
700 here as it's too early to reliably determine locality.
701 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 702 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 703
92403579
BW
7042003-04-02 Bob Wilson <bob.wilson@acm.org>
705
706 * xtensa-modules.c: Remove comment indicating that this is a
707 generated file.
708
c45a316a
AM
7092003-04-02 Alan Modra <amodra@bigpond.net.au>
710
711 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
712
e0001a05
NC
7132003-04-01 Bob Wilson <bob.wilson@acm.org>
714
8c29f035
AM
715 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
716 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
717 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
718 xtensa-modules.lo.
719 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
720 xtensa-modules.c.
721 (cpu-xtensa.lo): New target.
722 (elf32-xtensa.lo): Likewise.
723 (xtensa-isa.lo): Likewise.
724 (xtensa-modules.lo): Likewise.
725 * Makefile.in: Regenerate.
726 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
727 (bfd_archures_list): Add bfd_xtensa_arch.
728 * config.bfd: Handle xtensa-*-*.
729 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
730 * configure: Regenerate.
731 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
732 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
733 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
734 (bfd_elf32_xtensa_le_vec): Likewise.
735 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
736 * cpu-xtensa.c: New file.
737 * elf32-xtensa.c: Likewise.
738 * xtensa-isa.c: Likewise.
739 * xtensa-modules.c: Likewise.
740 * libbfd.h: Regenerate.
741 * bfd-in2.h: Likewise.
e0001a05 742
5a6c6817
NC
7432003-04-01 Nick Clifton <nickc@redhat.com>
744
745 * archures.c (bfd_mach_arm_unknown): Define.
746 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
747 bfd_arm_get_mach_from_notes): Prototype.
748 * bfd-in2.h: Regenerate.
749 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
750 bfd_arm_merge_machines.
751 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
752 * coffcode.h (coff_set_arch_mach_hook): Call
753 bfd_arm_get_mach_from_notes.
754 * coffgen.c (coff_real_object_p): Revert previous delta.
755 * cpu_arm.c (arm_check_note): New function. Examine a note in a
756 .note section.
757 (bfd_arm_merge_machines): New function: Handle the merging of ARM
758 binaries compiled for different architectures..
759 (bfd_arm_update_notes): New function: Update an ARM note section.
760 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
761 number from an ARM note section.
762 * elf32-arm.h (elf32_arm_object_p): Use
763 bfd_arm_get_mach_from_notes.
764 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
765 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 766
0cc1cf99
BE
7672003-04-01 Ben Elliston <bje@wasabisystems.com>
768
769 * dwarf2.c (read_attribute_value): Correct typo in comment.
770
af3ef9fe
NC
7712003-04-01 Nick Clifton <nickc@redhat.com>
772
773 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
774 instead of concat().
775 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
776 (add_line_info): Make a copy of the filename when storing it into
777 the info structure.
af3ef9fe 778
6e84a906
DJ
7792003-03-31 Andreas Schwab <schwab@suse.de>
780 Daniel Jacobowitz <drow@mvista.com>
781
782 * simple.c (bfd_simple_get_relocated_section_contents): Add
783 parameter symbol_table. Optionally use it instead of the symbol
784 table from the bfd. Save and restore output offsets and output
785 sections around bfd_get_relocated_section_contents. Fix a memory
786 leak.
787 (simple_save_output_info, simple_restore_output_info): New
788 functions.
789 * bfd-in2.h: Regenerate.
790 * dwarf2.c (read_abbrevs): Use
791 bfd_simple_get_relocated_section_contents instead of
792 bfd_get_section_contents.
793 (decode_line_info): Likewise.
794 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
795 find_rela_addend.
796 (find_rela_addend): Remove.
797 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
798 debugging sections.
799 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
800 not bfd_zalloc.
801
5ed6aba4
NC
8022003-03-31 David Heine <dlheine@suif.stanford.edu>
803
804 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
805 bfd_alloc.
806 * dwarf2.c (concat_filename): Always allocate space for the
807 returned filename.
808 (decode_line_info): Free the allocated filename returned by
809 concat_filename.
810 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
811 * elf.c (copy_private_bfd_data): Likewise.
812 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
813 * elflink.h (elf_link_sort_relocs): Fix memory leak.
814 * format.c (bfd_check_format_matches): Likewise.
815 * linker.c (bfd_generic_final_link): Likewise.
816 * opncls.c (find_separate_debug_info): Likewise.
817 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 818
5941afc1
L
8192003-03-28 H.J. Lu <hjl@gnu.org>
820
821 * elflink.h (elf_link_add_object_symbols): Correctly combine
822 visibilities.
823
9d73f260
JJ
8242003-03-27 Jakub Jelinek <jakub@redhat.com>
825
826 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
827 to -1 before recomputing got offsets.
828
a5ad465a
AS
8292003-03-26 Andreas Schwab <schwab@suse.de>
830
831 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
832 (elf_m68k_relocate_section): Use it to correctly handle symbols
833 forced to be local.
834 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
835 entries for symbols that are forced to be local.
836
d0647110
AO
8372003-03-25 Alexandre Oliva <aoliva@redhat.com>
838
839 * elfxx-mips.c (_bfd_mips_relax_section): New function.
840 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
841 * elfn32-mips.c, elf64-mips.c: Use it.
842
e16bb312
NC
8432003-03-25 Stan Cox <scox@redhat.com>
844 Nick Clifton <nickc@redhat.com>
8c29f035 845
e16bb312
NC
846 Contribute support for Intel's iWMMXt chip - an ARM variant:
847
848 * archures.c: Add bfd_mach_arm_iWMMXt.
849 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
850 * bfd-in2.h: Regenerate.
851 * libbfd.h: Regenerate.
852 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
853 object files to be linked with XScale ones.
854 (coff_arm_final_link_postscript): Update note section.
855 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
856 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
857 after identifying a coff binary.
858 * cpu-arm.c (processors): Add iWMMXt.
859 (arch_inf): Likewise.
860 * elf32-arm.h (arm_object_p): Handle note section.
861 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
862 be linked with XScale ones.
863 (elf32_arm_section_flags): New function: Set flags on note section.
864 (elf32_arm_final_write_processing): Handle note section.
865
25f14c34
DD
8662003-03-21 DJ Delorie <dj@redhat.com>
867
868 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
869 _bfd_elf_rela_local_sym.
870
04b3329b
L
8712003-03-20 H.J. Lu <hjl@gnu.org>
872
873 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
874 non-ELF outputs.
875
c25cfdf8
NC
8762003-03-20 Nick Clifton <nickc@redhat.com>
877
878 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
879 $idata5 in case bfd_coff_final_link is not called.
880
3e1d7f19
JJ
8812003-03-19 Jakub Jelinek <jakub@redhat.com>
882
883 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
884 field.
885 (canon_reloc_count): Define.
886 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
887 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
888 reloc_count.
889 (sparc64_elf_canonicalize_reloc): New routine.
890 (bfd_elf64_canonicalize_reloc): Define.
891
3fa1d917
JJ
8922003-03-18 Jakub Jelinek <jakub@redhat.com>
893
894 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
895 againt mergeable sections. Take r_addend into account when caching
896 trampolines.
897
f86b235a
RH
8982003-03-18 Richard Henderson <rth@redhat.com>
899
8c29f035
AM
900 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
901 local symbols that have no dyninfo.
f86b235a 902
49ae03bf
NC
9032003-03-14 Gene Smith <gene.smith@siemens.com>
904
905 * ieee.c (ieee_write_expression): Handle the case where symbol is
906 NULL.
907 General formatting improvements.
908
6a457e5c
NC
9092003-03-13 Nick Clifton <nickc@redhat.com>
910
911 * configure.in (LINGUAS): Add zh_CN.
912 * configure: Regenerate.
913 * po/zh_CN.po: New file.
914
93516ec3
NC
9152003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
916
917 * aout-cris.c (BYTES_IN_WORD): Don't define.
918 aout-encap.c: Likewise.
919 aout-ns32k.c: Likewise.
920 aout-tic30.c: Likewise.
921 hp300bsd.c: Likewise.
922 i386aout.c: Likewise.
923 i386dynix.c: Likewise.
924 i386linux.c: Likewise.
925 i386lynx.c: Likewise.
926 i386mach3.c: Likewise.
927 m68k4knetbsd.c: Likewise.
928 m68klinux.c: Likewise.
929 m68klynx.c: Likewise.
930 m68knetbsd.c: Likewise.
931 m88kmach3.c: Likewise.
932 mipsbsd.c: Likewise.
933 newsos3.c: Likewise.
934 sparclinux.c: Likewise.
935 sparclynx.c: Likewise.
936 sparcnetbsd.c: Likewise.
937 vaxbsd.c: Likewise. Fix comment formatting.
938
fee24f1c
AO
9392003-03-12 Alexandre Oliva <aoliva@redhat.com>
940
0b25d3e6
AO
941 * Reverted 2003-03-02's patch.
942
fee24f1c
AO
943 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
944 overridable.
945 * elf64-mips.c (mips_elf64_canonicalize_reloc,
946 mips_elf64_get_dynamic_reloc_upper_bound,
947 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
948 (bfd_elf64_get_canonicalize_reloc,
949 bfd_elf64_get_dynamic_reloc_upper_bound,
950 bfd_elf64_canonicalize_dynamic_reloc): Define.
951 (mips_elf64_slurp_reloc_table): Support dynamic.
952 (mips_elf64_slurp_one_reloc_table): Adjust.
953
64fb1839
NC
9542003-03-12 Nick Clifton <nickc@redhat.com>
955
956 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
957 'index' to 'offset' in test for zero value.
958
908488f1
AO
9592003-03-11 Alexandre Oliva <aoliva@redhat.com>
960
961 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
962 dynamic relocations pointing to local or section symbols, use the
963 NULL symbol instead. Document the choice to not emit an
964 additional R_MIPS_64 relocation.
965
e515b051
AM
9662003-03-11 Alan Modra <amodra@bigpond.net.au>
967
968 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
969 zero index dynamic tls relocs generated for the GOT. Tidy code.
970 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
971 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
972
a23b6845
AM
9732003-03-07 Alan Modra <amodra@bigpond.net.au>
974
87d243f1
AM
975 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
976 a tls_get_addr call.
977
a23b6845
AM
978 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
979 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
980 ELF_LINK_NON_GOT_REF from weakdef.
981 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
982 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
983 ELF_LINK_NON_GOT_REF from weakdef.
984 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
985 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
986 ELF_LINK_NON_GOT_REF from weakdef.
987
2d36fe5f
AH
9882003-03-06 Jakub Jelinek <jakub@redhat.com>
989 Andrew Haley <aph@redhat.com>
990
991 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
992 output is relocateable.
993
34f304a7
NC
9942003-03-06 Steven Konopa <skonopa@kgo.csc.com>
995
996 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
997 R_COMMENT.
998
7b609f53
AM
9992003-03-06 Alan Modra <amodra@bigpond.net.au>
1000
1001 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
1002 error messages.
1003 (ELIMINATE_COPY_RELOCS): Define to zero.
1004 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
1005 TLSLD relocs. Report reloc types on a number of errors. Optimize
1006 LOCAL24PC check for non-local syms. Don't capitalize error messages.
1007 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
1008 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
1009 calculating TLSLD relocs. Report reloc types on a number of errors.
1010 Don't capitalize error messages.
1011
6a0fb186
L
10122003-03-03 H.J. Lu <hjl@gnu.org>
1013
1014 * elfxx-ia64.c (USE_BRL): Removed.
1015 (oor_ip): Removed.
1016
34f304a7 10172003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
1018
1019 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
1020 relocation (no special function), and make it non-partial_inplace.
1021 (sh_elf_relax_section): When creating a bsr, use a consistent value
1022 no matter if the symbol is extern or not; set addend to -4.
1023 Don't swap load / non-load instructions for SH4.
1024 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
1025 rather than if the symbol is external to determine if adjusting the
1026 offset makes sense. Adjust the addend too if appropriate.
1027 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
1028 relocation.
1029
a9d68a1e
NC
10302003-03-03 Nick Clifton <nickc@redhat.com>
1031
1032 * po/da.po: Installed latest translation.
1033
7c2be35c
TS
10342003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1035
1036 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
1037 R_MIPS_PC16 to rightshift 2.
1038 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
1039 (bfd_elf32_bfd_reloc_type_lookup): Support
1040 BFD_RELOC_MIPSEMB_16_PCREL_S2.
1041 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
1042 R_MIPS_PC16 to rightshift 2.
1043 (mips_elf64_howto_table_rela): Likewise.
1044 (mips_reloc_map): Map to rightshifted BFD reloc.
1045 * elfn32-mips.c: The same as in elf64-mips.c.
1046 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
1047 (mips_elf_calculate_relocation): Handle rightshifted addends for
1048 R_MIPS_PC16.
1049 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
1050 MIPS Embedded PIC. Remove superfluous empty COMMENT.
1051 * libbfd.h: Regenerate.
1052 * bfd-in2.h: Regenerate.
1053
484a4f9c
RH
10542003-02-28 Richard Henderson <rth@redhat.com>
1055
1056 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
1057 for ltoff22x relaxation.
1058
2ce40c65
AM
10592003-03-01 Alan Modra <amodra@bigpond.net.au>
1060
1061 * bfd-in.h (_bfd): Don't define.
1062 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
1063 * syms.c: Likewise.
1064 * bfd-in2.h: Regenerate.
1065
2c4c2bc0
RH
10662003-02-27 Richard Henderson <rth@redhat.com>
1067
1068 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
1069 (elfNN_ia64_check_relocs): Set it.
1070 (allocate_global_data_got): Check it.
1071 (allocate_local_got): Likewise.
1072 (allocate_dynrel_entries): Likewise.
1073 (elfNN_ia64_relax_ldxmov): New.
1074 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
1075 (elfNN_ia64_choose_gp): Split out from ...
1076 (elfNN_ia64_final_link): ... here.
8c29f035 1077
c2852e88
AC
10782003-02-27 Andrew Cagney <cagney@redhat.com>
1079
1080 * bfd.c (struct bfd): Rename "struct _bfd".
1081 * bfd-in.h: Update copyright.
1082 (struct bfd): Rename "struct _bfd".
1083 (_bfd): Define for backward compatibility.
1084 * bfd-in2.h: Regenerate.
1085
3f87cb70
AM
10862003-02-25 Alan Modra <amodra@bigpond.net.au>
1087
3f9a32bd
AM
1088 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
1089 and rel_hdr2 when initially counting input relocs rather than after
1090 creating output reloc sections.
4fabe71e
AM
1091 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
1092 sizes.
3f9a32bd 1093
3f87cb70
AM
1094 * Makefile.am: Run "make dep-am".
1095 * Makefile.in: Regenerate.
1096
07c6e936
NC
10972003-02-24 Kris Warkentin <kewarken@qnx.com>
1098
1099 * elf.c (elfcore_read_notes): Add check for QNX style core file.
1100 (elfcore_grog_nto_note): New function.
1101 (elfcore_grog_nto_gregs): New function.
1102 (elfcore_grog_nto_status): New function.
1103
aad5d350
AM
11042003-02-24 Alan Modra <amodra@bigpond.net.au>
1105
1106 * elflink.c (_bfd_elf_create_got_section): Check existing .got
1107 section flags before concluding that we've already been called.
1108 Don't use register keyword.
1109 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
1110 (_bfd_elf_create_linker_section): Formatting.
1111
2ab1486e
NC
11122003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
1113
1114 * coff-h8300.c: Fix typo: intial -> initial.
1115 * coff-ppc.c: Likewise.
1116
70bccea4
AM
11172003-02-20 Alan Modra <amodra@bigpond.net.au>
1118
1119 * elf32-ppc.c: Formatting.
1120 (allocate_dynrelocs): LD and GD relocs against the same sym need
1121 separate GOT entries.
1122 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
1123 entries per symbol.
1124
ee05f2fe
AM
11252003-02-19 Alan Modra <amodra@bigpond.net.au>
1126
26e41594
AM
1127 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
1128 removal. Localize vars. Remove unnecessary dynobj test.
1129 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
1130 of INFO.
1131 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1132 and optimize.
1133 (elf_i386_relocate_section): Likewise.
1134 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
1135 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1136 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1137 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1138 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1139 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
1140 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
1141 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
1142 Formatting.
1143
f4656909
AM
1144 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
1145 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
1146 test.
1147 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
1148 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1149 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1150 and optimize. Use ELIMINATE_COPY_RELOCS.
1151 (ppc64_elf_relocate_section): Likewise.
1152
ee05f2fe
AM
1153 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
1154 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
1155 (ELIMINATE_COPY_RELOCS): Define.
1156 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
1157 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1158 (MUST_BE_DYN_RELOC): Define.
1159 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1160 and optimize. Trim dyn_relocs.
1161 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
1162 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
1163 track of pc_rel dyn relocs.
1164 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
1165 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
1166 allocate_dynrelocs. Don't recalculate "sec".
1167
7619e7c7
AM
11682003-02-18 Alan Modra <amodra@bigpond.net.au>
1169
d881513a
AM
1170 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
1171 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
1172 on invalid LD relocs.
1173 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
1174 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
1175 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
1176
7619e7c7
AM
1177 * elf32-ppc.h: New file.
1178 * elf32-ppc.c: Include elf32-ppc.h.
1179 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
1180 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
1181 Add "tls_mask" field.
1182 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
1183 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
1184 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
1185 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
1186 Make use of htab shortcuts throughout file.
1187 (ppc_elf_link_hash_newfunc): Init tls_mask field.
1188 (ppc_elf_link_hash_table_create): Init new fields.
1189 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
1190 (ppc_elf_howto_raw): Add tls relocs.
1191 (ppc_elf_reloc_type_lookup): Handle them.
1192 (ppc_elf_unhandled_reloc): New function.
1193 (ppc_elf_create_got): Stash got section pointer in hash table,
1194 return status. Make .rela.got too.
1195 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
1196 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
1197 NON_GOT_REF set. Don't allocate space in .plt here..
1198 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
1199 not allocating plt entries unnecessarily. Allocate got entries here.
1200 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1201 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
1202 "info" during allocate_dynrelocs hash traversal. Use htab section
1203 shortcuts rather than searching for named sections. Get rid of
1204 "plt" and "strip" booleans.
1205 (update_local_sym_info, bad_shared_reloc): New functions.
1206 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
1207 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
1208 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
1209 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
1210 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
1211 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
1212 relocs that might use a plt entry. Set NON_GOT_REF too.
1213 Enumerate all do-nothing relocs.
1214 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
1215 tls relocs and all plt relocs.
1216 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
1217 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
1218 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
1219 shortcuts.
1220 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
1221 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
1222 entries and got relocs here. Warn on non-zero got reloc addend.
1223 Split out branch taken/not taken reloc code into a separate switch
1224 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
1225 Split out HA reloc adjustments to separate switch statement. Don't
1226 warn on reloc overflow if we've already warned about undefined.
1227 Don't rebuild sym name when reporting errors. Report all possible
1228 errors from _bfd_final_link_relocate.
1229 (bfd_elf32_bfd_final_link): Don't define.
1230
cd27b276
AM
12312003-02-18 Alan Modra <amodra@bigpond.net.au>
1232
1233 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
1234 rebuild sym name when reporting errors.
1235
ae9a127f
NC
12362003-02-17 Nick Clifton <nickc@redhat.com>
1237
3f9a32bd 1238 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
1239 allow_shlib_undefined for shared libraries.
1240 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
1241 of allow_shlib_undefined.
1242 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1243 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1244 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1245 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1246 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1247 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1248 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1249 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1250 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1251 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1252 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1253 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1254 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1255 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1256 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1257 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1258
b5f852ea
NC
12592003-02-17 Nick Clifton <nickc@redhat.com>
1260
1261 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
1262 address field to use in the comparison.
3f9a32bd 1263 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 1264
3193e234
NC
12652003-02-14 Bob Wilson <bob.wilson@acm.org>
1266
1267 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
1268 backends when checking if the generic ELF target should be used.
1269
21efdc8d
NC
1270 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
1271 outside of functions, treat values as absolute addresses.
1272
ed781d5d
NC
1273 * bfd.c: Change embedded documentation to use consistent indentation
1274 and to split up long lines. Change informal style of description
1275 for functions lacking real documentation.
1276 * coffcode.h: Break up long lines in embedded documentation.
1277 * format.c: Likewise.
1278 * targets.c: Likewise.
1279 * libcoff.h: Regenerate.
1280 * bfd-in2.h: Regenerate.
1281
58ac9f71
AM
12822003-02-14 Alan Modra <amodra@bigpond.net.au>
1283
1284 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
1285 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
1286 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
1287 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
1288 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
1289 (group_sections): Don't share a stub section if stubs are for a large
1290 section. Adjust comment.
1291 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
1292 !stubs_always_before_branch.
1293 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
1294 treat undefined and undefweak specially when processing dyn relocs.
1295
9147e853
JJ
12962003-02-13 Jakub Jelinek <jakub@redhat.com>
1297
1298 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
1299
427bfd90
NC
13002003-02-13 Nick Clifton <nickc@redhat.com>
1301
1302 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
1303 in computation of offset to insert into BL instruction.
1304
42b5d0ea
NC
13052003-02-11 Uwe Stieber <uwe@wwws.de>
1306
1307 * config.bfd: Add support for kaOS as cross build target system.
1308
a48ebf4d
AM
13092003-02-11 Alan Modra <amodra@bigpond.net.au>
1310
1311 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
1312 .__tls_get_addr too.
1313 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
1314
c95b8a7a
KK
13152003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
1316
1317 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
1318 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
1319 (sh_elf_link_hash_newfunc): Remove the initialization of
1320 tls_tpoff32 field.
1321 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
1322 for which tls_tpoff32 flag is set.
1323 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
1324 of the symbol includes the entry matched with the input_section
1325 and having tls_tpoff32 flag on. When linking statically, set
1326 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
1327 is defined in this executable.
1328 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
1329
a779acda
JJ
13302003-02-10 Jakub Jelinek <jakub@redhat.com>
1331
1332 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
1333 even if there is just non-empty .rela.plt.
1334
fde78edd
NC
13352003-02-10 Nick Clifton <nickc@redhat.com>
1336
1337 * archures.c (bfd_mach_arm_ep9312): Define.
1338 * bfd-in2.h: Regenerate.
1339 * cpu-arm.c (processors[]): Add ep9312.
1340 (bfd_arm_arch): Add ep9312.
1341 * elf32-arm.h (elf32_arm_merge_private_data): Update error
1342 messages and add test for Maverick floating point support.
1343 (elf32_arm_print_private_bfd_data): Handle
1344 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
1345 (elf32_arm_object_p): New function.
1346 (elf_backend_object_p): Define.
fde78edd 1347
e7b938ca
AM
13482003-02-10 Alan Modra <amodra@bigpond.net.au>
1349
1350 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
1351 variables, structure fields or function params to tls_mask or
1352 similar to better reflect usage.
1353 (struct got_entry): Comment.
1354 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
1355 (get_tls_mask): Rename from get_tls_type.
1356
951fd09b
AM
13572003-02-09 Alan Modra <amodra@bigpond.net.au>
1358
1359 * elf64-ppc.c (TLS_GD_LD): Don't define..
1360 (TLS_GD): ..define this instead and update all uses.
1361 (TLS_TPRELGD): Define.
1362 (ppc64_elf_link_hash_table_create): Tweak initialization of
1363 init_refcount and init_offset.
1364 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
1365 Mark second slot of GD or LD toc entries.
1366 (get_tls_type): Return an int. Distinguish toc GD and LD entries
1367 from other tls types.
1368 (ppc64_elf_tls_setup): New function, split out from..
1369 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
1370 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
1371 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
1372 return value to properly decide whether toc GD and LD entries can
1373 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
1374 to determine GD or LD rather than looking at TLS_LD flag. Don't
1375 attempt to adjust got entry tls_type here..
1376 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
1377 look for possible merges.
1378 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
1379 optimization.
1380 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
1381 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
1382 Make use of return value from get_tls_type to properly detect GD and
1383 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
1384 handle tls_get_addr removal when looking at REL24 relocs, do it when
1385 looking at the previous reloc. Check reloc after DTPMOD64 to determine
1386 GD or LD.
1387 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
1388
acc990f2
AM
13892003-02-08 Alan Modra <amodra@bigpond.net.au>
1390
00b28bb0
AM
1391 * elf32-hppa.c (group_sections): Don't share a stub section if
1392 stubs are for a large section.
1393
acc990f2
AM
1394 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
1395 stubs if !stubs_always_before_branch.
1396
589e6347
NC
13972003-02-07 Nick Clifton <nickc@redhat.com>
1398
1399 * elf.c (swap_out_syms): Generate an error message if an
1400 equivalent output section cannot be found for a symbol.
1401
c328dc3f
JJ
14022003-02-07 Jakub Jelinek <jakub@redhat.com>
1403
1404 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
1405 local_got_entries is NULL.
1406
84f97cb6
AS
14072003-02-06 Andreas Schwab <schwab@suse.de>
1408
1409 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
1410 (read_value): Add parameter is_signed, use signed extraction if
1411 the value is signed.
1412 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
1413 encoding to read_value.
1414
6349e628
AM
14152003-02-06 Alan Modra <amodra@bigpond.net.au>
1416
1417 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
1418 plt info when called to transfer weak sym info.
1419
411e1bfb
AM
14202003-02-05 Alan Modra <amodra@bigpond.net.au>
1421
1422 * reloc.c: Add PPC and PPC64 TLS relocs.
1423 * libbfd.h: Regenerate.
1424 * bfd-in2.h: Regenerate.
1425 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
1426 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
1427 against a 32 bit field.
1428 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
1429 (_ppc64_elf_section_data): Add t_symndx and comments.
1430 (ppc64_elf_section_data): Use elf_section_data macro.
1431 (ppc64_elf_new_section_hook): American spelling.
1432 (struct got_entry, struct plt_entry): New.
1433 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
1434 (struct ppc_stub_hash_entry): Add "addend" field.
1435 (struct ppc_link_hash_entry): Add "tls_type".
1436 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1437 TLS_EXPLICIT): Define.
1438 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
1439 (link_hash_newfunc): Init new fields.
58ac9f71 1440 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
1441 init_offset to NULL.
1442 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
1443 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
1444 there.
1445 (update_local_sym_info, update_plt_info): New functions.
1446 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
1447 handling to use got.glist rather than got.refcount. Likewise for PLT.
1448 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
1449 (func_desc_adjust): Adjust for new PLT list.
1450 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1451 (get_sym_h, get_tls_type): New functions.
1452 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
1453 (ppc64_elf_tls_optimize): New function.
1454 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
1455 TLS relocs.
1456 (ppc64_elf_size_dynamic_sections): Likewise.
1457 (ppc_type_of_stub): Adjust for new PLT list.
1458 (ppc_build_one_stub): Likewise.
1459 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
1460 calls specially.
1461 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
1462 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
1463 init GOT entries that have a reloc. Generate GOT relocs here..
1464 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
1465 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
1466
0cca5f05
AS
14672003-02-04 Andreas Schwab <schwab@suse.de>
1468
1469 * elf32-m68k.c (elf_m68k_hash_entry): Define.
1470 (elf_m68k_link_hash_traverse): Remove.
1471 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
1472 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
1473 reduce casting.
1474 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
1475 casting.
1476 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
1477 instead of elf_m68k_link_hash_traverse.
1478 (elf_m68k_discard_copies): Change first parameter to pointer to
1479 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
1480 elf_m68k_link_hash_entry is needed.
1481
5cab59f6
AM
14822003-02-04 Alan Modra <amodra@bigpond.net.au>
1483
1484 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
1485 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
1486 "got" union, and declare as gotplt_union. Use gotplt_uinion for
1487 "plt" field.
1488 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
1489 Add "init_offset" field.
1490 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
1491 (elf_local_got_ents): Declare.
1492 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
1493 and "plt".
1494 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
1495 (_bfd_elf_link_hash_table_init): Set "init_offset".
1496 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
1497 from init_offset.
1498 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
1499
1500 * elf.c (bfd_elf_local_sym_name): Split out from..
1501 (group_signature): ..here.
1502 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
1503
68bfbfcc
AM
15042003-02-04 Alan Modra <amodra@bigpond.net.au>
1505
1506 * elf-bfd.h (enum elf_link_info_type): Remove.
1507 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
1508 to struct sec. Remove linkonce_p field.
1509 (elf_linkonce_p): Delete.
1510 (elf_discarded_section): Update for sec_info_type change.
1511 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
1512 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
1513 (ELF_INFO_TYPE_NONE): Define.
1514 (ELF_INFO_TYPE_STABS): Define.
1515 (ELF_INFO_TYPE_MERGE): Define.
1516 (ELF_INFO_TYPE_EH_FRAME): Define.
1517 (ELF_INFO_TYPE_JUST_SYMS): Define.
1518 (STD_SECTION): Update struct sec initializer.
1519 * ecoff.c (bfd_debug_section): Likewise.
1520 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
1521 * elflink.h: Likewise.
1522 * elf-eh-frame.c: Likewise.
1523 * elf64-alpha.c: Likewise.
1524 * elfxx-ia64.c: Likewise.
1525 * elfxx-mips.c: Likewise.
1526 * bfd-in2.h: Regenerate.
1527
1528 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
1529 referring to used_by_bfd.
1530 * elf64-sparc.c (sec_do_relax): Likewise.
1531 * elf64-mmix.c (mmix_elf_section_data): Likewise.
1532 * elfxx-mips.c (mips_elf_section_data): Likewise.
1533 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
1534 (ieee_get_section_contents): Likewise.
1535 (ieee_new_section_hook): Formatting.
1536 (ieee_canonicalize_reloc): Remove commented out code.
1537 * mmo.c (mmo_section_data): Define. Use throughout file.
1538 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
1539
31f7ba04
NC
15402003-01-31 Graydon Hoare <graydon@redhat.com>
1541
1542 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
1543 * Makefile.in: Regenerate.
1544 * opncls.c (calc_crc32, get_debug_link_info,
1545 seperate_debug_file_exists, find_seperate_debug_file): New
1546 internal functions.
1547 (bfd_follow_gnu_debuglink): New function. Follow the pointer
1548 contained inside a .gnu_debuglink section.
1549 * bfd-in2.h: Regenerate.
1550
38985a1c
AO
15512003-01-29 Alexandre Oliva <aoliva@redhat.com>
1552
1553 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
1554 entry->abfd when it's NULL.
1555
4bb9a95f
AO
15562003-01-27 Alexandre Oliva <aoliva@redhat.com>
1557
1558 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
1559 _bfd_elf_section_offset returning -2 the same way as -1.
1560
f4416af6
AO
1561 * elfxx-mips.c (mips_elf_multi_got): New function.
1562 (struct mips_got_entry): Make symndx and gotidx signed. Moved
1563 addend into union along with address and link hash entry.
1564 (struct mips_got_info): Added bfd2got and next.
1565 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
1566 (mips_elf_got_section, mips_elf_create_got_section): Use
1567 SEC_EXCLUDE bit to tell whether we really need the got
1568 section. Take boolean arguments to disregard an excluded
1569 section, or to create it as excluded. Adjust all callers.
1570 Use mips_elf_got_section all over.
1571 (mips_elf_local_got_index, mips_elf_got_page,
1572 mips_elf_got16_entry): Take input bfd as argument, and pass it
1573 on to mips_elf_create_local_got_entry.
1574 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
1575 Take input bfd as argument, and manage entries in the
1576 appropriate GOT.
1577 (mips_elf_got_offset_from_index): Take input bfd as argument,
1578 and use it to adjust the GP offset of the bfd.
1579 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
1580 unreferenced GOT entries of global symbols to the end.
1581 (mips_elf_record_global_got_symbol): Take input bfd as
1582 argument. Add entries to the master GOT hash table.
1583 (struct mips_elf_bfd2got_hash): New.
1584 (struct mips_elf_got_per_bfd_arg): New.
1585 (struct mips_elf_set_global_got_offset_arg): New.
1586 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
1587 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
1588 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
1589 mips_elf_merge_gots, mips_elf_set_global_got_offset,
1590 mips_elf_resolve_final_got_entry,
1591 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
1592 mips_elf_got_for_ibfd): New functions.
1593 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
1594 (MIPS_ELF_GOT_MAX_SIZE): New macro.
1595 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
1596 (mips_elf_got_entry_hash): Take new fields into account. Use
1597 mips_elf_hash_bfd_vma.
1598 (mips_elf_got_entry_eq): Take new fields into account.
1599 (mips_elf_create_got_section): Initialize new fields.
1600 (mips_elf_calculate_relocation): Pass input_bfd to functions
1601 that now take it. Adjust gp for the input_bfd.
1602 (mips_elf_allocate_dynamic_relocation,
1603 mips_elf_create_dynamic_relocation,
1604 _bfd_mips_elf_create_dynamic_sections): Use...
1605 (mips_elf_rel_dyn_section): New function. Borrow code from...
1606 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
1607 now take it. Create the got section if needed, even if
1608 excluded, before recording a global got symbol. Move some
1609 code to...
1610 (mips_elf_record_local_got_symbol): New fn.
1611 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
1612 Compute multi-got global entries offsets. Move GOT code to...
1613 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
1614 if the GOT is too big.
1615 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
1616 undefweak symbol to zero. Generate dynamic relocations for
1617 non-primary GOT entries for global symbols.
1618 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
1619 case. Generate dynamic relocations for local got entries.
1620 Sort dynamic relocations on N64 too, using...
1621 (sort_dynamic_relocs_64): New fns.
1622 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
1623 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
1624
52b69c9e
AO
16252003-01-27 Alexandre Oliva <aoliva@redhat.com>
1626
1627 * bfd.c (struct _bfd): Added id field.
1628 * opncls.c (_bfd_id_counter): New static variable.
1629 (_bfd_new_bfd): Use it.
1630 * bfd-in2.h: Rebuilt.
1631
71e5db1c
AM
16322003-01-25 Alan Modra <amodra@bigpond.net.au>
1633
1634 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
1635
b9734f35
JJ
16362003-01-25 Jakub Jelinek <jakub@redhat.com>
1637
1638 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
1639 (elf32_sparc_rev32_howto): New variable.
1640 (sparc_reloc_map): Add TLS relocs.
1641 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
1642 Handle REV32.
1643 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
1644 New functions.
1645 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
1646 struct elf32_sparc_link_hash_table):
1647 New structures.
1648 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
1649 elf32_sparc_hash_table): Define.
1650 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
1651 create_got_section, elf32_sparc_create_dynamic_sections,
1652 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
1653 functions.
1654 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
1655 reference counting.
1656 (elf32_sparc_gc_sweep_hook): Likewise.
1657 (elf32_sparc_adjust_dynamic_symbol): Likewise.
1658 (elf32_sparc_size_dynamic_sections): Likewise.
1659 (elf32_sparc_relocate_section): Likewise.
1660 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
1661 New functions.
1662 (elf32_sparc_object_p): Allocate backend private object data.
1663 (bfd_elf32_bfd_link_hash_table_create,
1664 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
1665 elf_backend_can_refcount): Define.
1666 (elf_backend_create_dynamic_sections): Define to
1667 elf32_sparc_create_dynamic_sections.
1668 * reloc.c: Add SPARC TLS relocs.
1669 * bfd-in2.h, libbfd.h: Rebuilt.
1670 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
1671 (sparc_reloc_map): Likewise.
1672
69fc87f1
MS
16732003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
1674
1675 * bfd-in2.h: Regenerate.
1676 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
1677 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
1678 (elf_howto_table): Add TLS relocs.
1679 (elf_s390_reloc_type_lookup): Likewise.
1680 (elf_s390_link_hash_entry): Add tls_type.
1681 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
1682 New macros.
1683 (elf_s390_link_hash_table): Add tls_ldm_got.
1684 (link_hash_newfunc): Initialize tls_type.
1685 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
1686 (elf_s390_copy_indirect_symbol): Copy tls_type information.
1687 (elf_s390_check_relocs): Support TLS relocs.
1688 (elf_s390_gc_sweep_hook): Likewise.
1689 (allocate_dynrelocs): Likewise.
1690 (elf_s390_size_dynamic_sections): Likewise.
1691 (elf_s390_relocate_section): Likewise.
1692 (elf_s390_finish_dynamic_symbol): Likewise.
1693 (bfd_elf32_mkobject): Define for TLS.
1694 * elf64-s390.c: Same changes as for elf32-s390.c.
1695 * libbfd.h: Regenerate.
1696 * reloc.c: Add s390 TLS relocations.
1697
c5d1701e 16982003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
1699
1700 * aclocal.m4: Fix name of --enable-install-libbfd switch.
1701
5177500f
NC
17022003-01-23 Nick Clifton <nickc@redhat.com>
1703
1704 * Add sh2e support:
1705
1706 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
1707
1708 * archures.c (bfd_mach_sh2e): Added.
1709 * bfd-in2.h: Rebuilt.
1710 * cpu-sh.c (arch_info_struct): Added SH2e.
1711 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
1712
f0abc2a1
AM
17132003-01-23 Alan Modra <amodra@bigpond.net.au>
1714
1715 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
1716 dynindx to an int. Rearrange for better packing.
1717 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
1718 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
1719 * elf32-sh64.h: New. Split out from include/elf/sh.h.
1720 (struct _sh64_elf_section_data): New struct.
1721 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
1722 * elf32-sh64-com.c: Include elf32-sh64.h.
1723 * elf32-sh64.c: Likewise.
1724 (sh64_elf_new_section_hook): New function.
1725 (bfd_elf32_new_section_hook): Define.
1726 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
1727 (sh64_bfd_elf_copy_private_section_data): Likewise.
1728 (sh64_elf_final_write_processing): Likewise.
1729 * elf32-sparc.c (struct elf32_sparc_section_data): New.
1730 (elf32_sparc_new_section_hook): New function.
1731 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1732 (sec_do_relax): Define.
1733 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
1734 (elf32_sparc_relocate_section): Likewise.
1735 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
1736 * elf64-mmix.c (struct _mmix_elf_section_data): New.
1737 (mmix_elf_section_data): Define. Use throughout file.
1738 (mmix_elf_new_section_hook): New function.
1739 (bfd_elf64_new_section_hook): Define.
1740 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
1741 (ppc64_elf_section_data): Define. Use throughout.
1742 (ppc64_elf_new_section_hook): New function.
1743 (bfd_elf64_new_section_hook): Define.
1744 * elf64-sparc.c (struct sparc64_elf_section_data): New.
1745 (sparc64_elf_new_section_hook): New function.
1746 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1747 (sec_do_relax): Define.
1748 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
1749 (sparc64_elf_relocate_section): Likewise.
1750 (bfd_elf64_new_section_hook): Define.
1751 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
1752 * elfxx-mips.c (struct _mips_elf_section_data): New.
1753 (mips_elf_section_data): Define. Use throughout.
1754 (_bfd_mips_elf_new_section_hook): New function.
1755 (mips_elf_create_got_section): Don't alloc used_by_bfd.
1756 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
1757 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
1758 * Makefile.am: Run "make dep-am".
1759 * Makefile.in: Regenerate.
1760
cc03ec80
RH
17612003-01-21 Richard Henderson <rth@redhat.com>
1762
1763 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
1764 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
1765 (elf64_alpha_adjust_dynamic_symbol): Set them.
1766 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
1767 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
1768 symbol index when relaxing LDM to TPREL.
1769 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
1770 relocs, even if the target isn't locally defined.
1771 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
1772 (elf64_alpha_relocate_section): Likewise. Force TP-relative
1773 relocs vs symndx 0 to the tp base.
1774
da896d3f
NC
17752003-01-21 Fabio Alemagna <falemagn@aros.org>
1776
1777 * config.bfd: Handle i[3456]86-*-aros*.
1778
7fce784e
AS
17792003-01-21 Andreas Schwab <schwab@suse.de>
1780
1781 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
1782 (struct ppc_elf_link_hash_entry): Define.
1783 (ppc_elf_hash_entry): New function.
1784 (struct ppc_elf_link_hash_table): Define.
1785 (ppc_elf_hash_table): New function.
1786 (ppc_elf_link_hash_newfunc): New function.
1787 (ppc_elf_link_hash_table_create): New function.
1788 (ppc_elf_copy_indirect_symbol): New function.
1789 (allocate_dynrelocs): New function.
1790 (readonly_dynrelocs): New function.
1791 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
1792 relocs and determine DT_TEXTREL.
1793 (ppc_elf_check_relocs): Don't do that here, just count the
1794 dynamic relocs.
1795 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
1796 removed section.
1797 (bfd_elf32_bfd_link_hash_table_create): Define.
1798 (elf_backend_copy_indirect_symbol): Define.
1799
1bbc9cec
RH
18002003-01-21 Richard Henderson <rth@redhat.com>
1801
1802 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
1803 TPREL also get a reloc if shared. Remove SREL support.
1804 (elf64_alpha_emit_dynrel): New.
acc990f2 1805 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
1806 and GOTTPREL relocs to local symbols against the tp base.
1807 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
1808
1809 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
1810 use count before clobbering r_type.
1811 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
1812 ordering would mean dataflow inspection is necessary.
1813
0da35f8b
SS
18142003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
1815
1816 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 1817
571fe01f
NC
18182003-01-20 Fabio Alemagna <falemagn@aros.org>
1819
1820 * elf32-sh.c: Treat elfNN_bed like other macros defined in
1821 elfxx-target.h and #undef it before #define'ing it.
1822 * elf32-i386.c: Likewise.
acc990f2
AM
1823 * elf32-sh64.c: Likewise.
1824 * elf64-alpha.c: Likewise.
1825 * elf64-sh64.c: Likewise.
571fe01f 1826
5236c819
MS
18272003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1828
1829 * bfd-in2.h: Regenerate.
1830 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
1831 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
1832 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
1833 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
1834 R_390_PLTOFF32 and R_390_PLTOFF64.
1835 (elf_s390_reloc_type_lookup): Likewise.
1836 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
1837 of GOTPLT references to a function.
1838 (link_hash_newfunc): Initialize gotplt_refcount.
1839 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
1840 and creation of the got section out of the main switch. Add support
1841 for the gotoff, gotplt and pltoff relocations.
1842 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
1843 and pltoff.
1844 (elf_s390_adjust_gotplt): New function.
1845 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
1846 plt entries.
1847 (allocate_dynrelocs): Add comment.
1848 (elf_s390_relocate_section): Change r_type to unsigned. Add support
1849 for gotoff, gotplt and pltoff relocations.
1850 * elf64-s390.c: Same changes as for elf32-s390.c.
1851 * libbfd.h: Regenerate.
1852 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
1853 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
1854 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
1855 and BFD_RELOC_390_PLTOFF64.
1856
a823975a
JJ
18572003-01-18 Jakub Jelinek <jakub@redhat.com>
1858
1859 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
1860 R_IA64_TPREL64[LM]SB against non-global symbol properly.
1861
b3dfd7fe
JJ
18622003-01-16 Jakub Jelinek <jakub@redhat.com>
1863
1864 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
1865 self_dtpmod_done and self_dtpmod_offset.
1866 (allocate_global_data_got): Only use one got entry for all
1867 dtpmod relocs against local symbols.
1868 (allocate_dynrel_entries): Only need .rela.got entry for
1869 dtpmod against global symbol.
1870 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
1871 Reserve space in .rela.got for the local dtpmod entry.
1872 (set_got_entry): Initialize the common local dtpmod .got entry.
1873 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
1874 and R_IA_64_DTPREL64MSB.
1875
04c9666a
AM
18762003-01-16 Alan Modra <amodra@bigpond.net.au>
1877
1878 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
1879 (R_PPC_*): Rename all occurrences to R_PPC64_*.
1880 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
1881 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
1882 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
1883 relative relocs, not with absolute ones.
1884 * Makefile.am: Run "make dep-am".
1885 * Makefile.in: Regenerate.
1886 * po/SRC-POTFILES.in: Regenerate.
1887
c87f1ff7
AS
18882003-01-15 Andreas Schwab <schwab@suse.de>
1889
1890 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
1891 relocation against a non-allocated readonly section.
1892
86bbe32f
AM
18932003-01-10 Alan Modra <amodra@bigpond.net.au>
1894
1895 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
1896 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
1897
32d95f29
KD
18982002-01-08 Klee Dienes <kdienes@apple.com>
1899
1900 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
1901 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
1902 * Makefile.in: Regenerate.
acc990f2 1903
ab7d0aa0
AO
19042003-01-08 Alexandre Oliva <aoliva@redhat.com>
1905
1906 * elfn32-mips.c (prev_reloc_section): New.
1907 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
1908 (SET_RELOC_ADDEND): Parenthesize macro argument.
1909
95d0f04a
DA
19102003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
1911
1912 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
1913 adjust addil instructions if the symbol has no section.
1914
5c9e189c
DD
19152003-01-07 DJ Delorie <dj@redhat.com>
1916
1917 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
1918 partial_inplace.
1919
3e829b4a
AS
19202003-01-07 Andreas Schwab <schwab@suse.de>
1921
1922 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
1923 PC relative relocations.
1924 (elf_m68k_discard_copies): Set it here instead.
1925
a75473eb
SC
19262002-01-02 Ben Elliston <bje@redhat.com>
1927 Jeff Johnston <jjohnstn@redhat.com>
1928
1929 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
1930 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
1931 (BFD32_BACKENDS): Add elf32-iq2000.lo.
1932 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
1933 (cpu-iq2000.lo): New target.
1934 * Makefile.in: Regenerate.
1935 * config.bfd: Handle iq2000-*-elf.
1936 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
1937 (bfd_archures_list): Add bfd_iq2000_arch.
1938 * configure.in: Handle bfd_elf32_iq2000_vec.
1939 * configure: Regenerate.
acc990f2 1940 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
1941 and BFD_RELOC_IQ2000_UHI16.
1942 * targets.c (bfd_elf32_iq2000_vec): Declare.
1943 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
1944 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
1945 * cpu-iq2000.c: New file.
1946 * elf32-iq2000.c: Likewise.
1947 * libbfd.h: Regenerate.
1948 * bfd-in2.h: Likewise.
1949
64543e1a
RS
19502003-01-02 Richard Sandiford <rsandifo@redhat.com>
1951
1952 * elfxx-mips.c: Include libiberty.h.
1953 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
1954 (mips_set_isa_flags): New function, split out from...
1955 (_bfd_mips_elf_final_write_processing): ...here. Only call
1956 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
1957 (mips_mach_extensions): New array.
1958 (mips_32bit_flags_p): New function.
1959 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
1960 Use mips_32bit_flags_p to check if one binary is 32-bit and the
1961 other is 64-bit. When adopting IBFD's architecture, adopt the
1962 bfd_mach as well as the flags.
1963
4852a44e
NC
19642003-01-02 Nick Kelsey <nickk@ubicom.com>
1965
1966 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
1967 fix internal errors, fix bad code generation, fix incorrect stabs
1968 information, and improve ability to eliminate redundant page
1969 instructions. Added code to ip2k_final_link_relocate to self-verify
1970 the linker relaxation. Fix formatting problems.
1971
af7ee8bf
CD
19722002-12-30 Chris Demetriou <cgd@broadcom.com>
1973
1974 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
1975 * archures.c (bfd_mach_mipsisa32r2): New define.
1976 * bfd-in2.h: Regenerate.
1977 * cpu-mips.c (I_mipsisa32r2): New enum value.
1978 (arch_info_struct): Add entry for I_mipsisa32r2.
1979 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
1980 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
1981 (_bfd_mips_elf_final_write_processing): Add
1982 bfd_mach_mipsisa32r2 case.
1983 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
1984 binaries marked as using MIPS32 Release 2.
1985
2469cfa2
NC
19862002-12-30 Dmitry Diky <diwil@mail.ru>
1987
1988 * Makefile.am: Add msp430 target.
1989 * configure.in: Likewise.
1990 * Makefile.in: Regenerate.
1991 * configure: Regenerate.
1992 * archures.c: Add msp430 architecture vector.
1993 * config.bfd: Likewise.
1994 * reloc.c: Add msp430 relocs.
1995 * targets.c: Add msp320 target.
1996 * cpu-msp430.c: New file: msp430 cpu detection.
1997 * elf32-msp430.c: New file: msp430 reloc processing.
1998 * bfd-in2.h: Regenerate.
1999 * libbfd.h: Regenerate.
2000
eecdbe52
JJ
20012002-12-28 Jakub Jelinek <jakub@redhat.com>
2002
2003 * elf.c (elf_sort_sections): Don't reorder .tbss.
2004 (assign_file_positions_for_segments): Only adjust off/voff
2005 for increased alignment in PT_LOAD or PT_NOTE segment,
2006 but adjust p_filesz for .tbss too. in PT_LOAD consider
2007 .tbss to have zero memory size.
2008 (copy_private_bfd_data) [SECTION_SIZE]: Define.
2009 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
2010 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
2011 into PT_TLS segment. Never put SHF_TLS sections in
2012 segments other than PT_TLS or PT_LOAD.
2013
2014 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
2015 sh_entsize.
2016
213e90f4
DD
20172002-12-23 DJ Delorie <dj@redhat.com>
2018
2019 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
2020
75828352
AM
20212002-12-23 Alan Modra <amodra@bigpond.net.au>
2022
2023 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
2024
312b768e
NC
20252002-12-23 Nick Clifton <nickc@redhat.com>
2026
2027 * archures.c (bfd_arch_get_compatible): Add third parameter
2028 'accept_unknowns'. Only accept unknown format BFDs if
2029 accept_unknowns is true, or if the format is "binary".
acc990f2 2030 * bfd-in2.h: Regenerate.
312b768e 2031
63222ec9
NC
20322002-12-21 Nick Clifton <nickc@redhat.com>
2033
2034 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
2035 that subtracted 8 from pc relative relocations.
2036
19852a2a
KH
20372002-12-20 Kazu Hirata <kazu@cs.umass.edu>
2038
2039 * coff-h8300.c: Fix comment typos.
2040 * coffcode.h: Likewise.
2041 * cpu-cris.c: Likewise.
2042 * elf32-vax.c: Likewise.
2043 * genlink.h: Likewise.
2044 * linker.c: Likewise.
2045 * som.c: Likewise.
2046 * tekhex.c: Likewise.
2047 * vms-misc.c: Likewise.
2048
5fd63999
DD
20492002-12-20 DJ Delorie <dj@redhat.com>
2050
2051 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
2052 * libbfd.h: Regenerate.
2053 * bfd-in2.h: Regenerate.
2054 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
2055 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 2056
4ee79850
KH
20572002-12-19 Kazu Hirata <kazu@cs.umass.edu>
2058
2059 * doc/bfdint.texi: Fix typos.
2060
66e25bab
AM
20612002-12-20 Paul Eggert <eggert@twinsun.com>
2062
2063 Port to POSIX 1003.1-2001.
2064 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
2065 * configure.in (build-warnings): Likewise.
2066 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
2067 * aclocal.m4: Regenerate.
2068 * config.in: Regenerate.
2069 * configure: Regenerate.
2070
7dc77aaa
AM
20712002-12-19 Alan Modra <amodra@bigpond.net.au>
2072
0171ee92
AM
2073 * coff-h8300.c: Include libiberty.h.
2074 (h8300_reloc16_extra_cases): Check the hash table creator before
2075 referencing h8300 specific fields. Stash the hash table pointer
2076 in a local var. Comment typo fixes.
2077 (h8300_bfd_link_add_symbols): Likewise.
2078
7dc77aaa
AM
2079 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
2080 dst_mask comments.
2081 * bfd-in2.h: Regenerate.
2082
47388f4c
AM
20832002-12-18 Alan Modra <amodra@bigpond.net.au>
2084
2085 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
2086 code a little. Comment on dynamic relocs against section symbols.
2087
1b3e3744
AM
20882002-12-17 Roger Sayle <roger@eyesopen.com>
2089
2090 * configure.host (ia64-*-hpux*): Support 64 bit targets using
2091 the HP compiler's "long long".
2092
46f2b541
DD
20932002-12-16 Andrew MacLeod <amacleod@redhat.com>
2094
2095 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
2096 and R_XSTORMY16_HI16) howto entries.
2097 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 2098 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
2099 determine the start of the second reloc table.
2100
af738ea7
NC
21012002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
2102
2103 * ecofflink.c: Fix the reading of the debugging information
2104 of Tru64/Alpha binaries that are produced by recent Compaq
2105 compilers.
2106 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
2107 table.
2108 (lookup_line): Because of the strange information sometimes
2109 generated by Compaq's recent compilers, change how the FDR
2110 table is searched so that PDRs (procedure descriptors) are
2111 correctly found. Note that this change is really more of a hack;
2112 however, I have included extensive documentation as to why
2113 this is the best solution short of an extensive rewrite or
2114 another hack.
2115 (fdrtab_lookup): Add comments to explain the algorithm.
2116
5354b572
AO
21172002-12-12 Alexandre Oliva <aoliva@redhat.com>
2118
2119 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
2120 initializers to match struct declaration.
2121
ab3acfbe
AM
21222002-12-12 Alan Modra <amodra@bigpond.net.au>
2123
2124 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
2125 * elf.c (get_program_header_size): Likewise.
2126 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
2127 (m32r_elf_generic_reloc): Likewise.
2128 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
2129 * elflink.h (elf_bfd_discard_info): Likewise.
2130
6348e046
AM
21312002-12-12 Alan Modra <amodra@bigpond.net.au>
2132
2133 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
2134 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
2135 DT_RELSZ adjustment, not output section. Avoid writing tags when
2136 unchanged. Don't assume linker script is sane, adjust DT_REL too.
2137 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
2138 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
2139 DT_RELASZ adjustment, not output section. Avoid writing tags when
2140 unchanged. Adjust DT_RELA.
2141 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
2142 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
2143
2e7a68a8
AO
21442002-12-12 Alexandre Oliva <aoliva@redhat.com>
2145
2146 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
2147 addend by 4.
2148
b15e6682
AO
21492002-12-12 Alexandre Oliva <aoliva@redhat.com>
2150
2151 * elfxx-mips.c (struct mips_got_entry): New.
2152 (struct mips_got_info): Added got_entries field.
2153 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
2154 (mips_elf_local_got_index, mips_elf_got_page,
2155 mips_elf_got16_entry): Re-implement in terms of new...
2156 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
2157 Change return type.
2158 (mips_elf_highest): Warning clean-up.
2159 (mips_elf_create_got_section): Initialize got_entries.
2160 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
2161 local got size.
2162 (_bfd_mips_elf_size_dynamic_sections): Do not account for
2163 GOT_PAGE entries, since we now reuse GOT16 entries.
2164
e6af3a53
NC
21652002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
2166
2167 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
2168 read-only section that lies after .text and before .data to be
2169 written into the output file and included in a_text.
2170 (translate_to_native_sym_flags): If an otherwise unrepresentable
2171 section was merged with .text, convert its symbols to N_TEXT
2172 symbols.
2173 * libaout.h (aout_section_merge_with_text_p): New macro.
2174
cf3d882d
AM
21752002-12-08 Alan Modra <amodra@bigpond.net.au>
2176
2177 * bfd-in.h: Comment typo fix. Formatting.
2178 * bfd-in2.h: Regenerate.
2179 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
2180 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
2181 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
2182
2f9bd3f6
RH
21832002-12-05 Richard Henderson <rth@redhat.com>
2184
2185 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
2186 Only send PCREL21B though the plt. Fix installed reloc type.
2187 (elfNN_ia64_relocate_section): Give error for dynamic reloc
2188 against PCREL22 or PCREL64I; clean up error messages for
2189 branch relocs.
2190
d0112f73
KB
21912002-12-04 Kevin Buettner <kevinb@redhat.com>
2192
2193 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
2194 New functions.
2195 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2196
c10d9d8f
JW
21972002-12-04 David Mosberger <davidm@hpl.hp.com>
2198
2199 * cpu-ia64-opc.c: Add operand constant "ar.csd".
2200
d48770d4
L
22012002-12-04 H.J. Lu <hjl@gnu.org>
2202
2203 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
2204 BFD address when constructing local name.
2205
b6152c34
AS
22062002-12-04 Andreas Schwab <schwab@suse.de>
2207
2208 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
2209 member.
2210 (elf_m68k_link_hash_table_create): Initialize it.
2211 (elf_m68k_check_relocs): Handle symbols that are forced to be
2212 local due to visibility changes.
2213 (elf_m68k_adjust_dynamic_symbol): Likewise.
2214 (elf_m68k_size_dynamic_sections): Likewise.
2215 (elf_m68k_discard_copies): Likewise.
2216 (elf_m68k_relocate_section): Likewise.
2217
73374ef1
AM
22182002-12-04 Alan Modra <amodra@bigpond.net.au>
2219
2220 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
2221
c5c1944d
AM
22222002-12-04 Alan Modra <amodra@bigpond.net.au>
2223
2224 * srec.c (srec_write_symbols): Restore '$' prefix to address
2225 accidentally removed in 2002-04-04 change.
2226 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
2227
e1a9cb8e
NC
22282002-12-03 Nick Clifton <nickc@redhat.com>
2229
2230 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
2231 (apuinfo_list_add): New function: Add a value to the list.
2232 (apuinfo_list_length): New function: Return the number of
2233 values on the list.
2234 (apuinfo_list_element): New function: Return a value on the
2235 list.
2236 (apuinfo_list_finish): New function: Free the resources used
2237 by the list.
2238 (ppc_elf_begin_write_processing): New function. Scan the
2239 input bfds for apuinfo sections.
2240 (ppc_elf_write_section): New function: Delay the creation of
2241 the contents of an apuinfo section in an output bfd.
2242 (ppc_elf_final_write_processing): New function. Create the
2243 contents of an apuinfo section in an output bfd.
2244 (elf_backend_begin_write_processing): Define.
2245 (elf_backend_final_write_processing): Define.
2246 (elf_backend_write_section): Define.
e1a9cb8e 2247
a823923b
RH
22482002-12-03 Richard Henderson <rth@redhat.com>
2249
2250 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
2251
30491647
SC
22522002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2253
2254 Fix PR savannah/1417:
2255 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
2256 branch if it goes to the start of the deleted region.
2257
bc7c6a90
SC
22582002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2259
2260 * bfd-in2.h (bfd_mach_m6812): Rebuild.
2261 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
2262 bfd_mach_m6812s): Declare.
2263
2264 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
2265 (_bfd_m68hc12_elf_set_private_flags): Call it.
2266 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
2267 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
2268 report microcontroller incompatibilities (HC12 vs HCS12).
2269 (elf_backend_object_p): Update.
2270
b34976b6
AM
22712002-11-30 Alan Modra <amodra@bigpond.net.au>
2272
2273 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
2274 (enum bfd_boolean, boolean): Delete.
2275 (bfd_boolean): Typedef to an int.
2276 (FALSE, TRUE): Define.
2277 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
2278 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
2279 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
2280 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
2281 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
2282 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
2283 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
2284 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
2285 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
2286 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
2287 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
2288 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
2289 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
2290 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
2291 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
2292 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
2293 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
2294 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
2295 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
2296 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
2297 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
2298 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
2299 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
2300 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
2301 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
2302 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2303 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2304 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2305 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
2306 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2307 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2308 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2309 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
2310 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
2311 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
2312 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
2313 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
2314 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
2315 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
2316 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
2317 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
2318 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
2319 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
2320 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
2321 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
2322 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
2323 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
2324 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 2325 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
2326 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
2327 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
2328 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
2329 of bfd_boolean vars with TRUE/FALSE. Formatting.
2330 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
2331
947216bf
AM
23322002-11-28 Alan Modra <amodra@bigpond.net.au>
2333
2334 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
2335 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
2336 with Elf_Internal_Rela.
2337 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
2338 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
2339 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
2340 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2341 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2342 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2343 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
2344 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2345 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2346 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
2347 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
2348 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
2349 throughout instead.
2350 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
2351 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
2352 Remove INLINE keyword.
2353 (elf_swap_reloc_in): Likewise. Also clear r_addend.
2354 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
2355 as a bfd_byte *.
2356 (elf_write_relocs): Consolidate REL and RELA code.
2357 (elf_slurp_reloc_table_from_section): Simplify REL code.
2358 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
2359 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
2360 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
2361 RELA code.
2362 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
2363 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
2364 (elf_link_output_relocs): Likewise.
2365 (elf_reloc_link_order): Likewise.
2366 (elf_finish_pointer_linker_section): Likewise.
2367 (struct elf_link_sort_rela): Remove union.
2368 (elf_link_sort_cmp1): Update to suit.
2369 (elf_link_sort_cmp2): Here too.
2370 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
2371 over-allocation for int_rels_per_ext_rel != 1 case.
2372 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
2373 * elf32-i386.c: Likewise.
2374 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
2375 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
2376 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
2377 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
2378 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2379 elf64-sparc.c, elf64-x86-64.c: Likewise.
2380 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
2381 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
2382 bfd_elf32_swap_reloc_in.
2383
2384 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
2385 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
2386 (mips_elf64_swap_reloc_in): Zero r_addend.
2387 (mips_elf64_be_swap_reloc_in): Likewise.
2388 (mips_elf64_slurp_one_reloc_table): Simplify.
2389
2390 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
2391 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2392 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2393
1448fa32
KK
23942002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2395
2396 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 2397 unresolved debugging relocs in dynamic applications.
1448fa32
KK
2398 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2399
73722af0
AM
24002002-11-26 Alan Modra <amodra@bigpond.net.au>
2401
2402 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
2403 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
2404 on a relocatable link. Comment typos.
2405 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
2406 in the order they are declared. Clear elf_hash_value too.
2407 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
2408 eh_info and tls_segment.
2409 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
2410 sorted when discarding relocs by turning them into R_*_NONE.
2411
2412 * libbfd.c (warn_deprecated): Comment spelling.
2413 * po/SRC-POTFILES.in: Regenerate.
2414
7c25b72c
RH
24152002-11-21 Richard Henderson <rth@redhat.com>
2416
2417 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
2418 arch's st_other bits when merging visibilities.
2419 (elf_link_output_extsym): Tidy clearing of visibility field.
2420
dc12c51f
AM
24212002-11-21 Alan Modra <amodra@bigpond.net.au>
2422
2423 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
2424 (SWAP_OUT_RELOC_OFFSET): Define.
2425
963f13ec
AO
24262002-11-20 Alexandre Oliva <aoliva@redhat.com>
2427
2428 * elf.c (_bfd_elf_link_hash_table_init): Make sure
2429 can_refcount is properly extended to the type of
2430 init_refcount.
2431
ee6423ed
AO
24322002-11-19 Alexandre Oliva <aoliva@redhat.com>
2433
4ffba85c
AO
2434 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
2435 (_bfd_mips_elf_relocate_section): Use it.
2436
ee6423ed
AO
2437 * elfxx-mips.c (MNAME): New macro.
2438 (_bfd_mips_elf_check_relocs): Use it.
2439 (_bfd_mips_elf_discard_info): Likewise.
2440 (_bfd_mips_elf_final_link): Likewise.
2441
cdcf6e38
AM
24422002-11-19 Alan Modra <amodra@bigpond.net.au>
2443
2444 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
2445 rel_hdr.sh_size too.
2446
93509525
KD
24472002-11-18 Klee Dienes <kdienes@apple.com>
2448
2449 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
2450 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
2451 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
2452 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
2453 Add dependencies for bfdwin.c, bfdio.c.
2454 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
2455 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
2456 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
2457 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
2458 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
2459 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
2460 bfd_get_size (moved from libbfd.c and bfd.c).
2461 * bfdwin.c New file. Contains _bfd_window_internal,
2462 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
2463 libbfd.c and bfd.c).
2464 * po/SRC-POTFILES.in: Regenerate.
2465 * po/bfd.pot: Regenerate.
2466 * libbfd.h: Regenerate.
2467 * bfd-in2.h: Regenerate.
2468 * aclocal.m4: Regenerate.
2469 * Makefile.in: Regenerate.
2470 * configure: Regenerate.
2471
3ae41454
AM
24722002-11-18 Klee Dienes <kdienes@apple.com>
2473
2474 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
2475
e514ac71
NC
24762002-11-15 Kazu Hirata <kazu@cs.umass.edu>
2477
2478 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
2479 jsr after a short jump.
2480 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2481
eddc4f81
KD
24822002-11-15 Klee Dienes <kdienes@apple.com>
2483
2484 * pef.c (bfd_pef_convert_architecture): Move declaration of
2485 ARCH_POWERPC and ARCH_M68K to the start of the function.
2486
51908eee
SS
24872002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
2488
2489 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
2490
3416d2e7
HPN
24912002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
2492
2493 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
2494 For bpo_gregs_section->contents, allocate _raw_size, not
2495 _cooked_size.
2496
b1c58715
AM
24972002-11-13 Klee Dienes <kdienes@apple.com>
2498
2499 * config.bfd: Add entries for powerpc-*-darwin and cousins.
2500
077ca68b
L
25012002-11-13 H.J. Lu <hjl@gnu.org>
2502
2503 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
2504
e84d6fca
AM
25052002-11-13 Klee Dienes <kdienes@apple.com>
2506 Alan Modra <amodra@bigpond.net.au>
2507
2508 * bfd.c (struct bfd_preserve): New.
2509 (bfd_preserve_save): New function.
2510 (bfd_preserve_restore): Ditto.
2511 (bfd_preserve_finish): Ditto.
2512 * bfd-in2.h: Regenerate.
2513 * mach-o.c: Formatting.
2514 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
2515 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
2516 (bfd_mach_o_core_p): Ditto.
2517 (bfd_mach_o_scan): Pass in mdata.
2518 * mach-o.h (bfd_mach_o_scan): Update prototype.
2519 * pef.c: Formatting.
2520 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
2521 (bfd_pef_xlib_object_p): Ditto.
2522 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
2523 * pef.h (bfd_pef_scan): Update prototype.
2524 * xsym.c: Formatting, K&R fixes.
2525 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
2526 (bfd_sym_scan): New function split out from bfd_sym_object_p.
2527 * xsym.h (bfd_sym_scan): Declare.
2528 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 2529 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
2530 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2531
cd24c222
NC
25322002-11-12 Nick Clifton <nickc@redhat.com>
2533
2534 * po/da.po: Updated Danish translation.
2535
99eb2ac8
AM
25362002-11-12 Alan Modra <amodra@bigpond.net.au>
2537
d6fe2dc1
AM
2538 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
2539 relocatable link too.
2540 (elf_link_input_bfd): When emitting relocs, adjust offsets for
2541 eh_frame and stab sections. Zap deleted relocs.
2542 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
2543 (elf_bfd_discard_info): Run for relocatable link too.
2544 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
2545 Handle ld -r case.
2546 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
2547 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
2548
126495ed
AM
2549 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
2550 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
2551 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
2552 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
2553 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
2554 (struct elf_link_hash_table): Add eh_info.
2555 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
2556 (_bfd_elf_discard_section_eh_frame): Update prototype.
2557 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
2558 (_bfd_elf_write_section_eh_frame): Likewise.
2559 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
2560 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
2561 param. Get "hdr_info" from link hash table.
2562 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
2563 header section from link hash table. Save header section to elf_tdata.
2564 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
2565 header section from link hash table. Don't alloc hdr_info. Clear
2566 hdr_sec instead of setting "strip".
2567 (_bfd_elf_eh_frame_section_offset): Formatting.
2568 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
2569 Get header section from link hash table.
2570 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
2571 Get header section from link hash table.
2572 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
2573 (get_program_header_size): Likewise.
2574 (_bfd_elf_section_offset): Formatting.
2575 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
2576 section pointer in link hash table.
2577 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
2578 and _bfd_elf_write_section_eh_frame calls. Update comment about
2579 eh_frame entries.
2580 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
2581 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
2582
2583 * po/SRC-POTFILES.in: Regenerate.
2584
99eb2ac8
AM
2585 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
2586 relocs for discarded FDEs. Remove dead code.
2587 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
2588 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
2589 Tidy conditions under which stabs are edited. Formatting.
2590 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2591 from discarded relocs.
2592 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
2593 section adjustments after testing magic values.
2594
7c319a27
AM
25952002-11-12 Thomas Moestl <tmm@FreeBSD.org>
2596
2597 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
2598 references to large plt symbols.
2599
a95a4550
AM
26002002-11-12 Klee Dienes <kdienes@apple.com>
2601
2602 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
2603 looking for an unused section name.
2604
bc7eab72
KH
26052002-11-11 Kazu Hirata <kazu@cs.umass.edu>
2606
2607 * coff-h8300.c: Fix formatting.
2608 * elf32-h8300.c: Likewise.
2609 * reloc16.c: Likewise.
2610
52585bb8
AM
26112002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
2612
2613 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
2614 section when dynamic section unused; _bfd_strip_section_from_output
2615 instead.
2616
9f632188
AM
26172002-11-08 Alan Modra <amodra@bigpond.net.au>
2618
207b304b
AM
2619 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
2620 and sym_vec.
3b029f65 2621
9f632188
AM
2622 * dwarf2.c: Revert last change.
2623
ec4530b5
NC
26242002-11-07 Michal Ludvig <mludvig@suse.cz>
2625
2626 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2627 _bfd_dwarf2_find_nearest_line): Use
2628 bfd_simple_get_relocated_section_contents() instead of
2629 bfd_get_section_contents().
2630 * reloc.c (bfd_perform_relocation): Add sanity check.
2631 * simple.c (simple_get_relocated_section_contents): If the section
2632 does not have any relocs associated with it, just return the
2633 unadjusted contents.
2634
205cfeb0
HPN
26352002-11-07 Hans-Peter Nilsson <hp@axis.com>
2636
2637 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
2638 case R_CRIS_32_GOT>: Correct test for filling in constant .got
2639 contents, enabling for a non-DSO, for symbols defined in the
2640 program with --export-dynamic.
2641
87e226ce
AM
26422002-11-07 Alan Modra <amodra@bigpond.net.au>
2643
2644 * elf64-ppc.c: Comment typo fixes.
2645 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
2646
235c4794
NC
26472002-11-07 Nick Clifton <nickc@redhat.com>
2648
2649 * po/da.po: Updated Danish translation.
2650
49179469
AO
26512002-11-06 Alexandre Oliva <aoliva@redhat.com>
2652
2653 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
2654 exactly three internal relocs per external reloc. Set reloc_count
2655 to the external reloc count.
2656
246178f2
NC
26572002-11-06 Klee Dienes <kdienes@apple.com>
2658
3ae41454 2659 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
2660 Fix comment formatting.
2661
3af9a47b
NC
26622002-11-06 Klee Dienes <kdienes@apple.com>
2663
3ae41454 2664 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
2665 xsym.lo.
2666 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
2667 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
2668 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
2669 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
2670 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
2671 sym.
3ae41454 2672 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
2673 * Makefile.in: Regenerate.
2674 * doc/Makefile.in: Regenerate.
3ae41454 2675 * bfd-in2.h: Regenerate.
3af9a47b
NC
2676 * xsym.c: New file. Contains support for the Apple/Metrowerks
2677 xSYM debugging format.
2678 * xsym.h: New file.
2679 * pef.c: New file. Contains support for the Apple Code Fragment
2680 Manager Preferred Executable Format
2681 * pef.h: New file.
2682 * pef-traceback.h: New file. Contains support for parsing PowerPC
2683 traceback tables as used by PEF executables (and perhaps other
2684 systems as well).
3ae41454 2685 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
2686 format.
2687 * mach-o.h: New file.
2688 * mach-o-target.c: New file. Declares the mach-o targets
2689 themselves. Included three times by mach-o.c; each time with a
2690 different set of macros set.
3ae41454 2691
b6821651 26922002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
2693
2694 * Makefile.am: Remove entries for elf32-qnx.[ch].
2695 * Makefile.in: Regenerate.
2696 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
2697 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
2698 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2699 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
2700 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
2701 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
2702 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2703 * configure: Regenerate.
2704 * elf32-qnx.c: Remove.
2705 * elf32-qnx.h: Remove.
2706 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
2707 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
2708 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
2709 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
2710 * elf32-i386.c: Remove QNX extended bfd support.
2711 * elf32-ppc.c: Remove QNX extended bfd support.
2712 * elf32-sh.c: Remove QNX extended bfd support.
2713 * elfarm-nabi.c: Remove QNX extended bfd support.
2714 * targets.c: Remove qnx vectors.
2715 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
2716 (elf_backend_is_contained_by_filepos): Remove.
2717 (elf_backend_copy_private_bfd_data_p): Remove.
2718 * po/SRC-POTFILES.in: Regenerate.
2719
b6821651
AM
27202002-11-06 David O'Brien <obrien@FreeBSD.org>
2721 Alan Modra <amodra@bigpond.net.au>
2722
2723 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
2724 dynamic relocs against section symbols for the output section vma.
2725
27262002-11-05 Alan Modra <amodra@bigpond.net.au>
2727
2728 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
2729 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
2730
08f74004
AM
27312002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2732 Alan Modra <amodra@bigpond.net.au>
2733
2734 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
2735 vectors in target_selvecs.
2736 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
2737 in target_selvecs.
2738 (sh-*-netbsdelf*): Likewise.
2739 * configure.in (assocvecs): New variable. Handle assocvecs like
2740 selvecs.
2741 * configure: Regenerate.
2742 * format.c (bfd_check_format_matches): Store bfd_target pointers
2743 in matching_vector instead of target names. Select first target
2744 from bfd_associated_vector that matches a list of ambiguous targets.
2745 * targets.c (_bfd_associated_vector): New array.
2746 (bfd_associated_vector): New variable.
2747 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
2748 * libbfd-in.h (bfd_associated_vector): Declare.
2749 * libbfd.h: Regenerate.
2750
89117aab
AM
27512002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
2752
2753 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
2754 non-NULL before dereferencing.
2755
5e9aae3e
KK
27562002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2757
2758 * vms.c (vms_object_p): Restore the start address when returning
2759 NULL.
2760
c97e73dd
AM
27612002-11-04 Alan Modra <amodra@bigpond.net.au>
2762 Hans-Peter Nilsson <hp@axis.com>
2763
2764 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
2765 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
2766 Set up a larger symshndxbuf, and write it out. Free it on
2767 exit rather than freeing symbuf twice. Correct section index
2768 on output section symbol loop.
2769 (elf_link_output_sym): Accumulate symbol extension section
2770 indices, reallocating symshndxbuf rather than writing it out.
2771 (elf_link_flush_output_syms): Don't flush symshndxbuf.
2772 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
2773 Use bfd_zalloc to clear i_shdrp[0] too.
2774
3463048e
SC
27752002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
2776
2777 * elf32-sh64-com.c (sh64_address_in_cranges): Use
2778 _raw_size of cranges section if _cooked_size not yet set.
2779
63a23799
HPN
27802002-11-03 Hans-Peter Nilsson <hp@axis.com>
2781
2782 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
2783 for bfd_elf32_swap_symbol_out.
2784
e68cc12e
DB
27852002-10-31 David O'Brien <obrien@FreeBSD.org>
2786
2787 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
2788 signed and unsigned in comparison.
2789
db4b6d01
DJ
27902002-10-30 Daniel Jacobowitz <drow@mvista.com>
2791
2792 * coffcode.h: Remove extraneous '\'.
2793
840f0243
L
27942002-10-28 H.J. Lu <hjl@gnu.org>
2795
2796 * Makefile.am (targets.lo): Depend on Makefile instead of
2797 config.status.
2798 (archures.lo): Likewise.
2799 * Makefile.in: Regenerated.
2800
05a7e2db
JT
28012002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
2802
2803 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
2804 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
2805 targ_selvecs.
2806
a0087177
JW
28072002-10-25 Jim Wilson <wilson@redhat.com>
2808
2809 * elf64-sh64.c (sh_elf64_relocate_section): Call
2810 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
2811 of SHF_MERGE section.
2812
8718ac9c
HPN
28132002-10-25 Hans-Peter Nilsson <hp@axis.com>
2814
2815 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
2816
d45913a0
DA
28172002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
2818
2819 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
2820 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
2821 unsigned int.
2822 (NAME(aout,final_link)): Cast enum used in assignment.
2823 (aout_link_write_symbols): Cast enums in comparisons, int values to
2824 boolean, enums in assignments to int.
2825 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
2826 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
2827 with unsigned ints.
2828 (aout_link_reloc_link_order): Cast enum to int in assignment.
2829 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
2830 calls to char *.
2831 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
2832 assignment.
2833 * bfd-in2.h (bfd_set_section_vma): Likewise.
2834 * bfd.c (bfd_record_phdr): Cast enums in assignments.
2835 * binary.c (bfd_alloc): Cast enum to long.
2836 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
2837 * dwarf2.c (read_abbrevs): Add casts to enum types.
2838 (read_attribute_value): Likewise.
2839 (arange_add): Cast result of bfd_zalloc call.
2840 (comp_unit_contains_address): Return true and false.
2841 (comp_unit_find_nearest_line): Cast return to boolean.
2842 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
2843 * gen-aout.c: define macro '_' if not defined.
2844 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
2845 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
2846 (bfd_write_bigendian_4byte_int): Cast return to boolean.
2847 (bfd_seek): Cast bfd_realloc to bfd_byte *.
2848 (bfd_generic_is_local_label_name): Cast return to boolean.
2849 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
2850 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
2851 struct bfd_hash_entry *.
2852 (_bfd_generic_link_hash_newfunc): likewise.
2853 (_bfd_generic_final_link): Cast enum to unsigned int.
2854 * merge.c (sec_merge_emit): Cast return to boolean.
2855 (merge_strings): Add casts to const unsigned char *.
2856 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
2857 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
2858 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
2859 struct bfd_hash_entry *.
2860 (bfd_set_section_content): Add cast to PTR in comparison.
2861 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
2862 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
2863 simple_dummy_unattached_reloc,
2864 bfd_simple_get_relocated_section_contents): Add K&R declarations and
2865 function definitions.
2866 * srec.c (S3Forced): Initialize to false.
2867 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
2868 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
2869 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
2870 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
2871 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
2872 comparisons.
2873
475c2a7e
JJ
28742002-10-23 Jakub Jelinek <jakub@redhat.com>
2875
2876 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
2877 relocs into shared lib non-allocated reloc sections.
2878
e82ce529
AM
28792002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2880
2881 * dwarf2.c (add_line_info): Ensure that the line_info_table is
2882 sorted even when given an out-of-order line sequence.
2883 (lookup_address_in_line_info_table): When an exact VMA match is
2884 not found, return line information with the closest VMA.
2885
f2482cb2
NC
28862002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
2887
2888 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
2889 HPUX 11.00 patch PHSS_26559.
2890
c1fd6598
AO
28912002-10-22 Alexandre Oliva <aoliva@redhat.com>
2892
2893 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
2894 the options section into a separate section unless IRIX 6
2895 compatibility is enabled.
2896
033fd5f9
AO
28972002-10-22 Alexandre Oliva <aoliva@redhat.com>
2898
2899 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
2900 into arrays.
2901 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
2902 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
2903 into account.
2904 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
2905 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
2906
ef485c01
AM
29072002-10-21 Graeme Peterson <gp@qnx.com>
2908
2909 * targets.c (_bfd_target_vector): Add missing qnx vectors.
2910
b50afec9
AM
29112002-10-21 Alan Modra <amodra@bigpond.net.au>
2912
2913 * targets.c (bfd_target_list): Don't return the default target twice.
2914
5fe39cae
AM
29152002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
2916
2917 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
2918 perror with bfd_perror.
2919
5d603aa9
L
29202002-10-19 H.J. Lu <hjl@gnu.org>
2921
2922 * elflink.h (elf_link_add_object_symbols): Correctly handle
2923 DT_RPATH and DT_RUNPATH.
2924
e377ab71
MK
29252002-10-19 Mark Kettenis <kettenis@gnu.org>
2926
2927 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
2928
0d09fec6
DC
29292002-10-17 Denis Chertykov <denisc@overta.ru>
2930
2931 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
2932 for ip2k port.
2933
acf8aed4
AM
29342002-10-17 Alan Modra <amodra@bigpond.net.au>
2935
2936 * elfxx-target.h (USE_REL): Don't define as 1.
2937 * elf32-arm.h (USE_REL): Provide a default define of 0.
2938 Use #if rather than #ifdef when testing USE_REL.
2939 * elf32-m32r.c: Likewise.
2940
2941 * elf32-arc.c (USE_REL): Define as 1.
2942 * elf32-d10v.c (USE_REL): Likewise.
2943 * elf32-m32r.c (USE_REL): Likewise.
2944 * elf32-m68hc11.c (USE_REL): Likewise.
2945 * elf32-m68hc12.c (USE_REL): Likewise.
2946 * elf32-or32.c (USE_REL): Likewise.
2947 * elfarm-nabi.c (USE_REL): Likewise.
2948
f52d1d64
JJ
29492002-10-16 Jakub Jelinek <jakub@redhat.com>
2950
2951 * config.bfd (s390-*-linux*): Add targ64_selvecs.
2952 (s390x-*-linux*): Add targ_selvecs.
2953
2bc3c89a
AM
29542002-10-16 Alan Modra <amodra@bigpond.net.au>
2955
2956 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 2957 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
2958 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
2959 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
2960 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
2961 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
2962 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
2963 (SOURCE_HFILES): Add elf32-qnx.h.
2964 (BUILD_HFILES): Add bfdver.h.
2965 Run "make dep-am".
2966 * Makefile.in: Regenerate.
2967 * configure.in Update bfd vector dependencies.
2968 * configure: Regenerate.
2969 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
2970 * elf32-i386qnx.c: Likewise.
2971 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
2972 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
2973 * elf32-sh-lin.c: Likewise.
2974 * elf32-shqnx.c: Likewise.
2975 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
2976 * elf32-sh64-nbsd.c: Likewise.
2977 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
2978 * elf64-sh64-nbsd.c: Likewise.
2979 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
2980 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
2981 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
2982 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
2983 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
2984 (elf_backend_is_contained_by_filepos): Likewise.
2985 (elf_backend_copy_private_bfd_data_p): Likewise.
2986 Globalize and move functions to..
2987 * elf32-qnx.c: ..here. New file.
2988 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
2989 emit target vectors when INCLUDE_SHMEDIA.
2990 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
2991 end of file.
2992 * elf64-sh64.c: Remove ELF_ARCH test.
2993 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
2994 * po/BLD-POTFILES.in: Regenerate.
2995 * po/SRC-POTFILES.in: Regenerate.
2996
90c9df85
AM
29972002-10-16 Alan Modra <amodra@bigpond.net.au>
2998
366f2964
AM
2999 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
3000 loaded with --just-symbols.
3001
90c9df85
AM
3002 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
3003 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3004 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3005 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3006
2238051f
RH
30072002-10-15 Richard Henderson <rth@redhat.com>
3008
3009 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
3010 (BFD64_BACKENDS_CFILES): Likewise.
3011 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
3012 * elf64-alpha-fbsd.c: Remove file, move code ...
3013 * elf64-alpha.c: ... here.
3014 * Makefile.in, configure: Rebuild.
3015
64e04ecd
RH
30162002-10-14 Richard Henderson <rth@redhat.com>
3017
3018 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
3019 VALUE, not ADDEND.
3020
396a6083
SC
30212002-10-14 Stephen Clarke <stephen.clarke@superh.com>
3022
3023 * elf32-sh.c (elf_sh_link_hash_entry): Replace
3024 datalabel_got_offset with union of datalabel_got
3025 offset and refcount.
3026 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
3027 (allocate_dynrelocs): Delete unnecessary code for
3028 STT_DATALABEL type. Create entry in got for
3029 datalabel version of symbol if datalabel_got.refcount > 0.
3030 (sh_elf_relocate_section): Use datalabel_got union.
3031 (sh_elf_gc_sweep_hook): Pull common code to initialize
3032 h and eh out of switch statement. Declare seen_stt_datalabel.
3033 Initialize it. Decrement datalabel_got.refcount for
3034 got relocs when seen_stt_datalabel is true.
3035 Decrement local_got_refcounts entry for datalabel got relocs
3036 of local symbols.
3037 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
3038 (sh_elf_check_relocs): Declare seen_stt_datalabel.
3039 Initialize it. When seen_stt_datalabel is true, increment
3040 datalabel_got refcount rather than got.refcount.
3041 (sh_elf_finish_dynamic_symbol): Create relocs to
3042 initialize got entry for datalabel version of symbol.
3043
6a0735ef
AM
30442002-10-14 Alan Modra <amodra@bigpond.net.au>
3045
3046 * Makefile.am: Run "make dep-am".
3047 (BFD_H_FILES): Remove version.h.
3048 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
3049 * version.h: ..to here.
3050 * configure.in (bfd_version_date): Remove.
3051 (AC_OUTPUT): Make bfdver.h from version.h.
3052 * bfd.c: #include "bfdver.h".
3053 * vms-hdr.c: Likewise.
3054 * Makefile.in: Regenerate.
3055 * bfd-in2.h: Regenerate.
3056 * configure: Regenerate.
3057 * po/SRC-POTFILES.in: Regenerate.
3058
686e4055
AM
30592002-10-14 Alan Modra <amodra@bigpond.net.au>
3060
3061 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
3062 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
3063 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
3064 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
3065 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
3066 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
3067 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
3068 bfd_mach_ip2022, bfd_mach_ip2022ext,
3069 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
3070 * bfd-in2.h: Regenerate.
3071
019dca2b
KK
30722002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3073
3074 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
3075 endian vector to targ_selvecs.
3076
bce03d3d
AO
30772002-10-13 Alexandre Oliva <aoliva@redhat.com>
3078
3079 * elfxx-mips.c (mips_elf_calculate_relocation): Take
3080 save_addend argument. Don't apply the 32-bit mask to a
3081 GPREL32 value if it's to be used in another relocation. Don't
3082 use forced-check computation of local_p to decide whether to
3083 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
3084 of the addend of a non-in-place GPREL16 relocation.
3085 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
3086 mips_elf_calculate_relocation().
3087
9b691193
SC
30882002-10-12 Stephane Carrez <stcarrez@nerim.fr>
3089
3090 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
3091 with symbols in other sections if we relaxed something; the sections
3092 output offsets must be re-computed before.
3093
1f4c5b47
SC
30942002-10-12 Stephane Carrez <stcarrez@nerim.fr>
3095
3096 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
3097 handling to use Elf_Internal_Sym.
3098 (m68hc11_elf_relax_delete_bytes): Likewise.
3099
5dc97655
KK
31002002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3101
3102 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
3103 sh_elf_object_p, dtpoff_base): New functions.
3104 (sh_elf_howto_table): Add TLS relocs.
3105 (sh_reloc_map): Likewise.
3106 (sh_elf_info_to_howto): Support TLS relocs.
3107 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
3108 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
3109 New macros.
3110 (sh_elf_obj_tdata): New.
3111 (elf_sh_link_hash_table): Add tls_ldm_got.
3112 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
3113 (allocate_dynrelocs): Support TLS relocs.
3114 (sh_elf_size_dynamic_sections): Likewise.
3115 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
3116 .rela.got section when found already. Return false after printing
3117 error about unresolvable relocation.
3118 (sh_elf_gc_sweep_hook): Support TLS relocs.
3119 (sh_elf_check_relocs): Likewise.
3120 (sh_elf_finish_dynamic_symbol): Likewise.
3121 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
3122 * reloc.c: Add SH TLS relocs.
3123 * bfd-in2.h, libbfd.h: Regenerate.
3124
6a0735ef
AM
31252002-10-11 Daniel Jacobowitz <drow@mvista.com>
3126
3127 * Makefile.in: Regenerated.
3128
af39267e
DJ
31292002-10-11 Daniel Jacobowitz <drow@mvista.com>
3130
3131 * Makefile.am: Run dep-am.
6a0735ef 3132 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
3133 (BFD32_LIBS): Add simple.lo.
3134 (BFD32_LIBS_CFILES): Add simple.c.
3135 * Makefile.in: Regenerated.
3136 * bfd-in2.h: Regenerated.
3137 * simple.c: New file.
3138
0be617ce
AM
31392002-10-11 Alan Modra <amodra@bigpond.net.au>
3140
14a793b2
AM
3141 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
3142 (record_thumb_to_arm_glue): Likewise.
3143 * ecoff.c (ecoff_link_add_externals): Likewise.
3144 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
3145 (record_thumb_to_arm_glue): Likewise.
3146 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
3147 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
3148 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3149 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
3150 * elf64-ppc.c (func_desc_adjust): Likewise.
3151 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3152 (sh64_elf64_create_dynamic_sections): Likewise.
3153 * elflink.c (_bfd_elf_create_got_section): Likewise.
3154 (_bfd_elf_create_dynamic_sections): Likewise.
3155 (_bfd_elf_create_linker_section): Likewise.
3156 * elflink.h (elf_add_default_symbol): Likewise.
3157 (elf_link_create_dynamic_sections): Likewise.
3158 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3159 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
3160 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
3161 (_bfd_mips_elf_add_symbol_hook): Likewise.
3162 (_bfd_mips_elf_create_dynamic_sections): Likewise.
3163 * linker.c (generic_link_add_symbol_list): Likewise.
3164 * xcofflink.c (xcoff_link_add_symbols): Likewise.
3165
3166 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
3167
0be617ce 3168 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 3169 completely removed. Correct local sym adjustment.
0be617ce 3170
0a4ef3f4
SC
31712002-10-10 Stephen Clarke <stephen.clarke@superh.com>
3172
3173 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3174 Correct mistake in calculation of address of .got.
3175 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
3176 elf_sh64_pic_plt_entry_le): Likewise.
3177
efacd36e
SC
31782002-10-09 Richard Shann <richard.shann@superh.com>
3179 Stephen Clarke <stephen.clarke@superh.com>
3180
3181 * Makefile.am: Add entries for elf32-sh64-lin.c and
3182 elf64-sh64-lin.c. Regenerate.
3183 * Makefile.in: Regenerate.
3184 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
3185 to use sh64 vectors rather than sh vectors.
3186 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
3187 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3188 * configure: Regenerate.
3189 * elf32-sh64-lin.c: New file.
3190 * elf64-sh64-lin.c: New file.
3191 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
3192 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3193
299bf759
L
31942002-10-08 H.J. Lu <hjl@gnu.org>
3195
3196 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
3197 IE->LE transition for R_386_TLS_IE.
3198
51020317
AM
31992002-10-08 Alan Modra <amodra@bigpond.net.au>
3200
3201 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
3202
a8fcf378
NC
32032002-10-07 Mark Elbrecht <snowball3@softhome.net>
3204
51020317
AM
3205 * cofflink.c (mark_relocs): Don't mark relocations in excluded
3206 sections.
a8fcf378 3207
a16d5acb
AM
32082002-10-07 Alan Modra <amodra@bigpond.net.au>
3209
a6b511bd
AM
3210 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
3211 code.
3212
a16d5acb
AM
3213 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
3214
7c4a37eb
AM
32152002-10-06 Alan Modra <amodra@bigpond.net.au>
3216
3217 * opncls.c: Formatting.
3218 (_bfd_new_bfd): Use a smaller section hash table.
3219
7c4ca42d
AO
32202002-10-05 Alexandre Oliva <aoliva@redhat.com>
3221
3222 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
3223 of the other two relocations packed with a REL32 to NONE.
3224
4989d792
SC
32252002-10-02 Stephen Clarke <stephen.clarke@superh.com>
3226
3227 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
3228 (sh_elf_link_hash_newfunc): Initialize it.
3229 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
3230 to got.refcount for symbols that are forced local or when
3231 we have direct got refs.
3232 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
3233 to correctly adjust got.refcount and plt.refcount.
3234 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
3235 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 3236
7c445aa3
JJ
32372002-10-01 Jakub Jelinek <jakub@redhat.com>
3238
3239 * elf32-i386.c (elf_i386_relocate_section): Fix
3240 movl foo@indntpoff, %eax IE->LE transition.
3241
abcf1d52
JJ
32422002-10-01 Jakub Jelinek <jakub@redhat.com>
3243
3244 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
3245 sequence and its transitions.
3246
a45bb67d
JJ
32472002-10-01 Jakub Jelinek <jakub@redhat.com>
3248
3249 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
3250 to st_value + addend in non-code sections.
3251 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
3252 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
3253
00707a0e 32542002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
3255 Ken Raeburn <raeburn@cygnus.com>
3256 Aldy Hernandez <aldyh@redhat.com>
3257 Eric Christopher <echristo@redhat.com>
3258 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
3259
3260 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
3261 (bfd_mach_mips5500): New.
3262 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
3263 (arch_info_struct): Add corresponding entries here.
3264 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
3265 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
3266 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
3267 bfd_mach_mips5400 and bfd_mach_mips5500.
3268 (_bfd_mips_elf_mach_extends_p): New function.
3269 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
3270 the EF_MIPS_MACH flags.
3271 * bfd-in2.h: Regenerate.
3272
624f0b25
JT
32732002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
3274
3275 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
3276 .got sections.
3277
b89fe0ee
AM
32782002-09-28 Alan Modra <amodra@bigpond.net.au>
3279
3280 * elf.c (map_sections_to_segments): Correct test for start of
3281 writable section in the same page as end of read-only section.
3282
b29635ba
JT
32832002-09-27 Matt Thomas <matt@3am-software.com>
3284
3285 * elf32-vax.c (elf_vax_check_relocs): Remove unused
3286 local_got_refcounts usage. Remove allocation of got slot.
3287 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
3288 Remove de-allocation of got slot.
3289 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
3290 traversal for elf_vax_instantiate_got_entries. Allow empty .got
3291 sections to be GC'ed.
3292 (elf_vax_instantiate_got_entries): New function.
3293 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
3294 tests that are now handled by elf_vax_instantiate_got_entries.
3295 Assert GOT entry falls within .got section size. Remove redundant
3296 comparisions. Fix comments.
3297
bffbf940
JJ
32982002-09-27 Jakub Jelinek <jakub@redhat.com>
3299
3300 * reloc.c: Add x86-64 TLS relocs.
3301 * bfd-in2.h, libbfd.h: Rebuilt.
3302 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
3303 relocs. Add TLS relocs.
3304 (x86_64_reloc_map): Add TLS relocs.
3305 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
3306 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
3307 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
3308 (elf64_x86_64_hash_entry): Define.
3309 (struct elf64_x86_64_obj_tdata): New.
3310 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
3311 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
3312 (link_hash_newfunc): Initialize tls_type.
3313 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
3314 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
3315 (elf64_x86_64_mkobject): New.
3316 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
3317 (elf64_x86_64_tls_transition): New.
3318 (elf64_x86_64_check_relocs): Add r_type variable and use it.
3319 Handle TLS relocs.
3320 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
3321 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
3322 (elf64_x86_64_size_dynamic_sections): Likewise.
3323 (dtpoff_base, tpoff): New.
3324 (elf64_x86_64_relocate_section): Handle TLS relocs.
3325 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
3326 entries.
3327 (bfd_elf64_mkobject): Define.
3328
3329 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
3330 DF_STATIC_TLS if shared.
3331
14366460
TS
33322002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3333
3334 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
3335 empty relocation sections.
3336
9f951329
AM
33372002-09-26 Alan Modra <amodra@bigpond.net.au>
3338
3339 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
3340 (ppc64_elf_build_stubs): Build them here instead.
3341
6b3ac709
JJ
33422002-09-24 Jakub Jelinek <jakub@redhat.com>
3343
3344 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
3345 addend into r_addend, not *r_offset.
3346 (elf32_sparc_finish_dynamic_symbol): Likewise.
3347 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
3348 R_SPARC_RELATIVE's r_offset.
3349
e2f6d277
NC
33502002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
3351
3352 * dwarf2.c (decode_line_info): Update to correctly decode
3353 the (non-standard DWARF2) out-of-order address sequences
3354 generated by the Intel C++ 6.0 compiler for ia64-Linux.
3355
f3961b2b
DD
33562002-09-23 Mark Elbrecht <snowball3@softhome.net>
3357
3358 * config.bfd: For DJGPP targets, match with any cpu and any machine.
3359
ad34bc37
AM
33602002-09-23 Alan Modra <amodra@bigpond.net.au>
3361
3362 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
3363 for discarded FDEs. Remove redundant assignment.
3364 * elflink.h (elf_bfd_discard_info): Save edited relocs.
3365
82988bff
L
33662002-09-22 H.J. Lu <hjl@gnu.org>
3367
3368 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
3369 the relocation count between different .reloc sections.
3370
5ad8645c
AM
33712002-09-21 Alan Modra <amodra@bigpond.net.au>
3372
5f819128
AM
3373 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
3374 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
3375 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
3376 R_PPC_EMB_RELSDA.
3377
5ad8645c
AM
3378 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
3379 unsigned. Move "symcount" assignment out of loop.
3380 * Makefile.am: Run "make dep-am".
3381 * Makefile.in: Regenerate.
3382 * configure: Regenerate.
3383 * po/SRC-POTFILES.in: Regnerate.
3384
75936555
NC
33852002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3386
3387 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
3388 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
3389 (e.g. IRIX64).
3390
2243deae
L
33912002-09-19 Jakub Jelinek <jakub@redhat.com>
3392
3393 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
3394 even if generating R_PPC_RELATIVE reloc.
3395 (ppc_elf_relocate_section): Make sure relocation is performed
3396 if skip == -2. Clear memory at r_offset when creating dynamic
3397 relocation.
3398
37e55690
JJ
33992002-09-19 Jakub Jelinek <jakub@redhat.com>
3400
3401 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
3402 BFD_RELOC_386_TLS_GOTIE): Add.
3403 * bfd-in2.h, libbfd.h: Rebuilt.
3404 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
3405 and R_386_TLS_GOTIE.
3406 (elf_i386_reloc_type_lookup): Handle it.
3407 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
3408 char instead of enum, change GOT_* into defines.
3409 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
3410 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3411 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
3412 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
3413 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
3414 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3415 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3416 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3417 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
3418 tls_type is GOT_TLS_IE_BOTH.
3419 (elf_i386_size_dynamic_sections): Likewise.
3420 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3421 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3422 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
3423 all 4 GOT_TLS_* TLS types.
3424
8e67855b
NC
34252002-09-19 Nick Clifton <nickc@redhat.com>
3426
3427 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
3428 follow indirect links.
3429
1c59ba3f
NC
34302002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3431
3432 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
3433 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
3434 on 64 bit machines.
3435 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
3436 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
3437 ECOFF information: 'ioptMax' refers to the actual *size*
3438 of the optimization symtab, not the number of entries.
1c59ba3f 3439
9d7404b7
NC
34402002-09-19 Daniel Jacobowitz <drow@mvista.com>
3441
3442 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
3443 ELF_LINK_HASH_NEEDS_PLT logic.
3444
05a487dc
DJ
34452002-09-18 Daniel Jacobowitz <drow@mvista.com>
3446
3447 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3448 correct relocation count.
3449
1f70368c
DJ
34502002-09-17 Daniel Jacobowitz <drow@mvista.com>
3451
3452 * bfd-in.h (bfd_get_dynamic_symcount): Define.
3453 * bfd.c (struct _bfd): Add dynsymcount.
3454 * bfd-in2.h: Regenerated.
3455 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
3456 abfd->dynsymcount.
3457 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3458 for overflow.
3459
51020317 34602002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
3461
3462 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
3463 (mips_elf64_final_gp): Don't make up gp value.
3464 * elfn32-mips.c (mips_elf_final_gp): Likewise.
3465 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
3466 .MIPS.options/.options section.
3467
290062cc
DB
34682002-09-17 David O'Brien <obrien@FreeBSD.org>
3469
3470 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
3471 It is benign for FreeBSD < 4.1. Minor reformatting.
3472 * elf64-alpha-fbsd.c: Likewise.
3473
c5c1f40c
JJ
34742002-09-17 Jakub Jelinek <jakub@redhat.com>
3475
ca1eb0ba
JJ
3476 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
3477 addend.
c5c1f40c 3478
562ace6b
AM
34792002-09-17 Alan Modra <amodra@bigpond.net.au>
3480
3481 * elf64-alpha.c (alpha_elf_size_info): Make static.
3482
5af6ead6
AM
34832002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
3484
3485 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
3486 * cpu-tic4x.c: Ditto.
3487
cb9512fc
TS
34882002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3489
3490 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
3491 duplicate define.
3492
4ada7262
DB
34932002-09-16 Bruno Haible <bruno@clisp.org>
3494
3495 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
3496 by a target variant implementation.
3497 * elf64-alpha.c: Likewise.
3498 * elf32-i386-fbsd.c: New file.
3499 * elf64-alpha-fbsd.c: New file.
3500 * targets.c: Support bfd_elf32_i386_freebsd_vec and
3501 bfd_elf64_alpha_freebsd_vec.
3502 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
3503 bfd_elf64_alpha_freebsd_vec.
3504 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
3505 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
3506 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
3507 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
3508 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
3509 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
3510 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
3511
6a30718d
JJ
35122002-09-12 Jakub Jelinek <jakub@redhat.com>
3513
3514 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
3515 NULL.
3516 (elf_i386_relocate_section): Return false after printing error about
3517 unresolvable relocation.
3518
6cf9e9fe
NC
35192002-09-12 Nick Clifton <nickc@redhat.com>
3520
3521 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
3522 R_ARM_THM_PC11.
3523
10f469bf
DJ
35242002-09-11 Jeffrey Law <law@redhat.com>
3525
3526 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
3527
dc43ada5
NC
35282002-09-11 Andrew Haley <aph@cambridge.redhat.com>
3529
3530 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
3531 line_ptr before deciding we've found a symbol.
3532
e09f4395
NC
35332002-09-11 Nick Clifton <nickc@redhat.com>
3534
3535 * po/da.po: New Danish translation file.
3536 * configure.in (LINGUAS): Add 'da'.
3537 * configure: Regenerate.
3538
b3018b5f
NC
35392002-09-10 Michael Snyder <msnyder@redhat.com>
3540
3541 * irix-core.c (do_sections, do_sections64): New functions.
51020317 3542 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
3543 do_sections64, depending on corefile (32-bit or 64-bit).
3544
2f21f25e
RH
35452002-09-09 Richard Henderson <rth@redhat.com>
3546
3547 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
3548 and PCREL21F like PCREL21B.
3549
28b94e7c
KB
35502002-09-04 Kevin Buettner <kevinb@redhat.com>
3551
51020317
AM
3552 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
3553 vector.
28b94e7c 3554
5cec6941
NC
35552002-09-02 Nick Clifton <nickc@redhat.com>
3556
3557 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
3558 names instead of cryptically overloaded bfd_reloc error
3559 codes.
3560 (v850_elf_relocate_section): Likewise.
3561 (v850_elf_relax_section): Replace caching of external symbols
3562 with caching of internal symbols obtained from calling
3563 bfd_elf_get_elf_syms().
51020317 3564 Fixup problems with freeing cached allocated memory blocks.
5cec6941 3565
3b77b1d5
AM
35662002-09-02 Alan Modra <amodra@bigpond.net.au>
3567
638524b5
AM
3568 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
3569 (bfd_pj_arch): Use bfd_default_scan.
3570 * cpu-v850.c (scan): Remove.
3571 (N): Use bfd_default_scan.
3572 * cpu-z8k.c (scan_mach): Remove.
3573 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
3574 first. Use bfd_default_scan.
3575
250d94fd
AM
3576 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
3577 bfd_mach constants.
3578 (ecoff_get_magic): Likewise.
3579 * elf32-v850.c (v850_elf_object_p): Likewise.
3580 (v850_elf_final_write_processing): Likewise.
3581 * mipsbsd.c (MY(set_arch_mach)): Likewise.
3582 (MY(write_object_contents)): Likewise.
3583 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
3584 * coffcode.h (coff_write_object_contents): Likewise.
3585 (coff_set_arch_mach_hook): Add comment describing machine == 0.
3586 Remove unnecessary "machine" assignments.
3587 (coff_write_relocs): Test for the absolute section sym by testing
3588 section and flags.
3589
3b77b1d5
AM
3590 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
3591 and bfd_mach_i386_i386_intel_syntax.
250d94fd 3592 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 3593
e5b45b83
DA
35942002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
3595
3596 * bfd-in.h (align_power): Cast constants to bfd_vma type.
3597 * bfd-in2.h (align_power): Likewise.
3598
37f45cf8
AM
35992002-08-30 Alan Modra <amodra@bigpond.net.au>
3600
3601 * Makefile.am: Run "make dep-am".
3602 * Makefile.in: Regenerate.
3603
3604 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
3605 * cpu-powerpc.c (powerpc_compatible): Likewise.
3606 * cpu-rs6000.c (rs6000_compatible): Likewise.
3607
86aba9db
NC
36082002-08-28 Catherine Moore <clm@redhat.com>
3609
3610 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
3611 (v850-elf-reloc): Don't resolve pc relative relocs.
3612 (v850_elf_ignore_reloc): New routine.
3613 (v850_elf_final_link_relocate): Handle new relocs.
3614 (v850_elf_relax_delete_bytes ): New routine.
3615 (v850_elf_relax_section): New routine.
3616 (bfd_elf32_bfd_relax_section): Define.
3617 (HOWTO): New entries for new relocs.
3618 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
3619 (BFD_RELOC_V850_LONGJUMP): New reloc.
3620 (BFD_RELOC_V850_ALIGN): New reloc.
3621 * archures.c: Remove redundant v850ea architecture.
3622 * cpu-v850.c: Remove redundant v850ea support.
3623 * libbfd.h: Regenerate.
3624 * bfd-in2.h: Regenerated.
3625
026df7c5
NC
36262002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
3627
3628 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
3629 * configure.in: Add tic4x_coff vector files.
3630 * configure: Regenerate.
3631 * Makefile.am: Add tic4x target.
3632 * Makefile.in: Regenerate.
3633
36342002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3635
3636 * archures.c: Add the BFD arch type tic4x.
3637 * bfd-in.h: Add BFD_IN_MEMORY flag.
3638 * coff-tic4x.c: New file.
3639 * coffswap.h (coff_swap_sym_out): Add preadjuster.
3640 * cpu-tic4x.c: New file.
3641 * targets.c: Added tic4x- in list of xvecs.
3642 * ticoff.h: New file.
3643 * bfd-in2.h: Regenerate.
3644
88f7bcd5
NC
36452002-08-27 Adam Nemet <anemet@lnxw.com>
3646
3647 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
3648 bit of DT_INIT and DT_FINI for Thumb functions.
3649
c8e48751
AM
36502002-08-26 Alan Modra <amodra@bigpond.net.au>
3651
3652 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
3653
2846975a
AM
36542002-08-26 Alan Modra <amodra@bigpond.net.au>
3655
3656 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
3657
067653c5
AM
36582002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3659
3660 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
3661 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
3662 Likewise.
3663 (struct elf_sh_pcrel_relocs_copied): Removed.
3664 (struct elf_sh_dyn_relocs): New.
3665 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
3666 field with dyn_relocs.
3667 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
3668 sections and sym_sec.
3669 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
3670 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
3671 (sh_elf_create_dynamic_sections): Use create_got_section instead
3672 of _bfd_elf_create_got_section.
3673 (sh_elf_check_relocs): Likewise.
3674 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
3675 sections.
3676 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
3677 sh_elf_relocate_section, sh_elf_check_relocs,
3678 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
3679 Likewise.
3680 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
3681 dynamic relocations and avoiding the copy relocation when we
3682 didn't find any dynamic relocations in the section which has
3683 contents or is read-only.
3684 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3685 (sh_elf_size_dynamic_sections): Don't reset the size of
3686 .rela.got section even if dynamic_sections_created flag is off.
3687 Don't use sh_elf_discard_copies. Scan all input bfd and use
3688 allocate_dynrelocs. Call readonly_dynrelocs to determine
3689 whether we need DT_TEXTREL.
3690 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
3691 whether the symbol was never referred to.
3692 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
3693 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
3694 (sh_elf_check_relocs): Call create_got_section if the short-cut
3695 to .got is null. Increment reference counters only instead of
3696 allocating space on dynamic sections here. Don't conditionalize
3697 uninitialized got.offset value when marking the symbol as a
3698 global offset table entry. Keep relocations for symbols satisfied
3699 by a dynamic library to avoid copy relocations for the symbol.
3700 Set dynobj field of an elf hash table if needed.
3701 (sh_elf_finish_dynamic_sections): Handle null section pointer
3702 correctly.
3703 (elf_backend_copy_indirect_symbol): Defined.
3704 (elf_backend_can_refcount): Defined.
3705
7e326afc
NC
37062002-08-23 Nick Clifton <nickc@redhat.com>
3707
3708 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
3709 previous change. Add comment explaining why.
3710
c8614e8e
AM
37112002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3712
3713 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
3714 contents of .got.plt[2] to tr0, not address of .got.plt.
3715 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
3716 patching absolute plt entry. For shmedia plt entry, set bottom bit
3717 of branch to plt0 as this is a branch to an shmedia instruction.
3718 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
3719 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
3720 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
3721 branch to plt0.
3722 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
3723 patching absolute plt entry. For shmedia plt entry, branch to
3724 plt0 is now ptrel, so use relative offset. Set bottom bit of
3725 branch target as it is a branch to an shmedia instruction.
3726
3b587c71
AM
37272002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
3728 Richard Shann <richard.shann@superh.com>
3729
3730 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
3731 value if .init is an SHmedia function. Similarly for DT_FINI.
3732 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 3733
957dcaa8
AM
37342002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3735
3b587c71 3736 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 3737 dynamic section.
3b587c71 3738 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 3739
a4263c47
NC
37402002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3741
3742 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 3743 byte read when reading the return address register column.
a4263c47 3744
db4ed121
NC
37452002-08-22 Nick Clifton <nickc@redhat.com>
3746
3747 * config.bfd: Add powepc64-*-*bsd* target.
3748
ed71e111
NC
37492002-08-22 Graeme Peterson <gp@qnx.com>
3750
3751 * Makefile.am: Add entries for elf32-shqnx.c
3752 * Makefile.in: Regenerate.
3753 * config.bfd: Add support sh-*-nto* target.
3754 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
3755 * configure: Regenerate.
3756 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
3757 * elf32-sh.c: Do not include elf32-target.h if
3758 ELF32_SH_C_INCLUDED is defined.
3759 * elf32-shqnx.c: New file: Support for QNX.
3760 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
3761
0ab72ee2
NC
37622002-08-22 Nick Clifton <nickc@redhat.com>
3763
75c83283
NC
3764 * po/tr.po: Updated Turkish translation.
3765
0ab72ee2
NC
3766 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
3767 symbols are not read.
3768
56780f18
AM
37692002-08-22 Alan Modra <amodra@bigpond.net.au>
3770
3771 * elf32-m68hc11.c: Formatting fixes.
3772 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3773 * elf32-m68hc12.c: Formatting fixes.
3774 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3775
b48fa14c
AM
37762002-08-22 Alan Modra <amodra@bigpond.net.au>
3777
a7c71b0c
AM
3778 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
3779 SEC_DATA.
3780 (pmac_xcoff_vec): Likewise.
3781 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3782 (aix5coff64_vec): Likewise.
3783
56780f18
AM
37842002-08-22 Alan Modra <amodra@bigpond.net.au>
3785
b48fa14c
AM
3786 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
3787 param to elf_backend_copy_indirect_symbol.
3788 (_bfd_elf_link_hash_copy_indirect): Likewise.
3789 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
3790 calls to copy_indirect_symbol.
3791 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
3792 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
3793 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3794 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3795 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3796 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
3797 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
3798 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3799 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3800 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
3801 test refcounts for "used" values.
3802
8c2ab17d
AM
38032002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
3804
3805 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
3806 argument declaration.
3807
d62b1198 38082002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
3809
3810 * archures.c (bfd_mach_ppc_e500): Added.
3811 * bfd-in2.h: Rebuilt.
d62b1198
EZ
3812 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
3813
9f88ba09
AM
38142002-08-19 Alan Modra <amodra@bigpond.net.au>
3815
3816 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
3817
df622259
AC
38182002-08-17 Andrew Cagney <ac131313@redhat.com>
3819
3820 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 3821 `bfd_byte'.
df622259 3822
44c410de
SC
38232002-08-17 Stan Cox <scox@redhat.com>
3824
3825 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
3826 IRIX 6 segment layout for NEWABI.
3827
4972a8e9
SC
38282002-08-16 Stephen Clarke <stephen.clarke@superh.com>
3829
3830 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
3831 symbols when looking for section referred to by a relocation.
3832 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 3833
c5cd6d62
AM
38342002-08-15 Alan Modra <amodra@bigpond.net.au>
3835
3836 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
3837
0741c7be
HPN
38382002-08-15 Hans-Peter Nilsson <hp@axis.com>
3839
3840 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
3841 missing check for whether the symbol is referenced by DSO before
3842 unexporting it as an unneeded dynamic symbol.
3843
e8d5d179
L
38442002-08-14 H.J. Lu <hjl@gnu.org>
3845
3846 * libbfd.h: Regenerate.
3847
e9229007
L
38482002-08-14 H.J. Lu <hjl@gnu.org>
3849
3850 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
3851
1fd03b5a
SC
38522002-08-14 Stephane Carrez <stcarrez@nerim.fr>
3853
3854 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
3855 instructions.
3856 (m68hc11_direct_relax): New to define table of relaxable instructions.
3857 (find_relaxable_insn): New, find a relaxable insn.
3858 (compare_reloc): New to compare two relocs.
3859 (m68hc11_elf_relax_section): New, relax text sections.
3860 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
3861 (elf32_m68hc11_check_relocs): New function for GC support.
3862 (elf32_m68hc11_relocate_section): New function for GC support.
3863 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
3864 (elf_backend_check_relocs): Likewise.
3865 (elf_backend_relocate_section): Likewise.
3866
c828c771
L
38672002-08-13 H.J. Lu <hjl@gnu.org>
3868
3869 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
3870 definitions in shared objects when checking symbol with
3871 undefined version.
3872
9b701e44
SC
38732002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3874
3875 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
3876 (elf32_m68hc11_gc_sweep_hook): Likewise.
3877 (elf_backend_gc_mark_hook): Define for GC section support.
3878 (elf_backend_gc_sweep_hook): Likewise.
3879 (elf_backend_can_gc_sections): Likewise.
3880
3881 * elf32-m68hc12.c: Likewise.
3882
96405e3c
SC
38832002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3884
3885 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
3886 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
3887 (_bfd_m68hc11_elf_set_private_flags): New function.
3888 Use them to set/check/print ELF flags specific to 68HC11.
3889
3890 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
3891 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
3892 (_bfd_m68hc12_elf_set_private_flags): New function.
3893 Use them to set/check/print ELF flags specific to 68HC12.
3894
dae78fb0
SC
38952002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3896
3897 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
3898 fix masks for PC-rel relocs.
3899 (m68hc11_elf_ignore_reloc): New function.
3900
3901 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
3902 68HC12 banked addressing relocs.
3903 (m68hc12_phys_addr): New to compute physical address of banked memory.
3904 (m68hc12_phys_page): Likewise for page.
3905 (m68hc12_addr_is_banked): New to see if address is in banked area.
3906 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
3907
3dbfec86
SC
39082002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3909
3910 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
3911 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
3912 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
3913 * bfd-in2.h: Regenerate.
3914
871da94f
L
39152002-08-12 H.J. Lu <hjl@gnu.org>
3916
3917 * elflink.h (elf_add_default_symbol): Preserve section across
3918 elf_merge_symbol.
3919
59bc061d
NC
39202002-08-09 Graeme Peterson <gp@qnx.com>
3921
51020317 3922 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
3923 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
3924 * Makefile.in: Regenerate.
3925 * config.bfd: Add support for powerpc{le}-*-nto targets.
3926 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
3927 * configure: Regenerate.
3928 * elf32-i386qnx.c: Moved backend functions into a QNX specific
3929 common file "elf32-qnx.h", and now include that file.
3930 * elf32-qnx.h: New file: QNX specific common elf backend.
3931 * elf32-ppc.c: Do not include elf32-target.h if
3932 ELF32_PPC_C_INCLUDED is defined.
3933 * elf32-ppcqnx.c: New file: Support for QNX.
3934 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
3935 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
3936
2b692c59
NC
39372002-08-09 Nick Clifton <nickc@redhat.com>
3938
3939 * po/sv.po: Updated Swedish translation.
3940
d0c7ff07
TS
39412002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3942
3943 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
3944 g->global_gotsym is NULL.
3945
d8bbe778
L
39462002-08-08 H.J. Lu <hjl@gnu.org>
3947
c5cd6d62 3948 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
3949 overrides an indirect versioned symbol.
3950
c366c25e
JJ
39512002-08-08 Jakub Jelinek <jakub@redhat.com>
3952
3953 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
3954 for R_386_TLS_TPOFF32 relocs against symndx 0.
3955
31941635
L
39562002-08-07 H.J. Lu <hjl@gnu.org>
3957
3958 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
3959 with undefined version if needed.
3960 (elf_link_assign_sym_version): Match a default symbol with a
3961 version without definition. No need to hide the default
3962 definition separately.
3963
0f3bd64f
AM
39642002-08-08 Alan Modra <amodra@bigpond.net.au>
3965
7330fb86
AM
3966 * elflink.h (elf_link_output_extsym): Don't output symbols from
3967 SEC_EXCLUDE sections.
3968
0f3bd64f
AM
3969 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
3970
a4aa0fb7
AM
39712002-08-07 Alan Modra <amodra@bigpond.net.au>
3972
3973 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
3974 entries.
3975
34ea4a36
TS
39762002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3977
3978 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
3979 mismatch.
3980
141ff970
TS
39812002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3982
3983 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
3984
28458e7e
TS
39852002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3986
3987 * elf32-mips.c (mips_reloc_map): Fix typo.
3988
0121a3da
AM
39892002-08-06 Alan Modra <amodra@bigpond.net.au>
3990
3991 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
3992
d006db6c
AM
39932002-08-06 Alan Modra <amodra@bigpond.net.au>
3994
3995 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
3996
8ea80f08
AM
39972002-08-06 Alan Modra <amodra@bigpond.net.au>
3998
2a52da53
AM
3999 * libxcoff.h: Use PARAMS on function declarations.
4000 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
4001 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4002
8ea80f08
AM
4003 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
4004 addend.
4005 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
4006
cf9ab45b
AM
40072002-08-06 Alan Modra <amodra@bigpond.net.au>
4008
4009 * coff-rs6000.c: Formatting fixes.
4010 (xcoff_calculate_relocation): Use PARAMS in declaration.
4011 (xcoff_complain_overflow): Likewise.
4012 (xcoff_ppc_relocate_section): Use old-style function pointer call.
4013 (bfd_xcoff_backend_data): Remove useless comments.
4014 (rs6000coff_vec): Likewise.
4015 (bfd_pmac_xcoff_backend_data): Likewise.
4016 (pmac_xcoff_vec): Likewise.
8ea80f08 4017
cf9ab45b
AM
4018 * coff64-rs6000.c: Formatting fixes.
4019 (xcoff64_calculate_relocation): Use PARAMS in declaration.
4020 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
4021 (bfd_xcoff_backend_data): Remove useless comments.
4022 (rs6000coff64_vec): Likewise.
4023 (bfd_xcoff_aix5_backend_data): Likewise.
4024 (aix5coff64_vec): Likewise.
4025
48bfecdd
AM
40262002-08-06 Alan Modra <amodra@bigpond.net.au>
4027
a78eab4e
AM
4028 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
4029 mask entries. Use complain_overflow_dont for R_REF.
4030 (xcoff_reloc_type_ba): Revert last change.
4031 (xcoff_reloc_type_br): Likewise.
4032 (xcoff_reloc_type_crel): Likewise.
4033 (xcoff_ppc_relocate_section): Likewise.
4034 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
4035 (xcoff64_ppc_relocate_section): Likewise.
4036 (xcoff64_howto_table): Revert some of last change to mask entries.
4037 Use complain_overflow_dont for R_REF.
4038
48bfecdd
AM
4039 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
4040 relocs with bitsize == 16 have size = 1.
4041 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
4042 (xcoff_reloc_type_br): Likewise.
4043 (xcoff_reloc_type_crel): Likewise.
4044 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4045 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
4046 dst_mask adjustment.
4047 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4048 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
4049 bitsize == 16 have size = 1.
4050
fd13ed0c
DC
40512002-08-01 Denis Chertykov <denisc@overta.ru>
4052
4053 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
4054 (struct misc): New field isymbuf. All free_* fields removed.
4055 (symbol_value): Pass in internal syms. No need to swap syms in.
4056 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
4057 possibly cached info.
4058 (tidyup_after_error): Removed.
4059 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
4060 misc. Use new field.
4061 (adjust_all_relocations): Use internal syms. No need to swap syms
4062 in and out.
4063 (add_page_insn): Don't use removed fields of struct misc.
4064
24a1ba0f
NC
40652002-08-01 Nick Clifton <nickc@redhat.com>
4066
4067 * elf32-arm.h: Revert previous delta.
4068
a6903459
NC
40692002-08-01 Nick Clifton <nickc@redhat.com>
4070
4071 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
4072 * configure: Regenerate.
4073
39a2a3eb
L
40742002-07-31 H.J. Lu <hjl@gnu.org>
4075
4076 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
4077 selected.
4078
a0dfa6a8
L
40792002-07-31 H.J. Lu <hjl@gnu.org>
4080
4081 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
4082 is selected.
4083
cd67d266
JJ
40842002-07-31 Jakub Jelinek <jakub@redhat.com>
4085
4086 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
4087 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
4088
4eb6b71c
NC
40892002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
4090
4091 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
4092 There is no 8 byte relocation type for this architecture.
4093 (do_ns32k_reloc): Use bfd_vma instead of native types.
4094 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
4095 returns void.
4096 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
4097 rely on generic code to do that.
4098 * aout-ns32k.c (howto_table): Add appropriate overflow detection
4099 to all table entries.
4100 (_bfd_ns32k_relocate_contents): put_data returns void.
4101 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
4102 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
4103 return void.
4104
f7c33884
NC
41052002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
4106
4107 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
4108 archive object is target dependant.
4109
8f64befb
NC
41102002-07-31 Adam Nemet <anemet@lnxw.com>
4111
4112 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
4113 (THUMB_PLT_ENTRY_SIZE): New macro.
4114 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
4115 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
4116 ARM_PLT_ENTRY_SIZE.
4117 (elf32_arm_plt_entry): Likewise.
4118 (elf_backend_plt_header_size): Likewise.
4119 (elf32_thumb_plt0_entry): New global.
4120 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
4121 into .plt.thumb.
4122 (elf32_thumb_plt_entry): New global.
4123 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
4124 Thumb entries. Set the bottom bit of the corresponding GOT entry
4125 for a Thumb PLT entry.
4126 (struct elf32_arm_plt_entry_info): New structure.
4127 (struct elf32_arm_link_hash_entry, plt_info): New member of this
4128 type.
4129 (elf32_arm_link_hash_newfunc): Initialize new member.
4130 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
4131 relocations against the PLT.
4132 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
4133 first_rel_type if this is the first time we encounter the symbol.
4134 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
4135 Determine if relocation needs a PLT entry. Set first_rel_type if
4136 this is the first time we encounter the symbol
4137 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
4138 functions as well.
4139 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
4140 (elf32_arm_create_dynamic_sections): New function. Create the
4141 .plt.thumb section.
4142 (elf_backend_create_dynamic_sections): Call it.
4143
47badb7b
NC
41442002-07-31 Nick Clifton <nickc@redhat.com>
4145
4146 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
4147 'alternative' in order to avoid shadowing global symbol of the
4148 same name.
4149 * bfd-in2.h: Regenerate.
4150 * libbfd.h: Regenerate.
4151 * libcoff.h: Regenerate.
4152
8a397dad
TS
41532002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4154
4155 * Makefile.am: Add n32 ABI support.
4156 * Makefile.in: Regenerate.
4157 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
4158 bit vectors for mips*-*-linux targets as optional.
4159 * configure.in: Add n32 ABI vectors.
4160 * configure: Regenerate.
4161 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
4162 * elfn32-mips.c: New file, n32 ABI support.
4163 * targets.c: Add n32 ABI vectors.
4164
7e392df6 41652002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 4166
7e392df6
NC
4167 * elfarmqnx-nabi.c: New file: Support for QNX.
4168 * config.bfd: Add support for arm-*-nto target.
4169 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
4170 * configure: Regenerate.
4171 * Makefile.am: Add entries for elfarmqnx-nabi.c.
4172 * Makefile.in: Regenerate.
4173 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
4174 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
4175 * elfarm-nabi.c: Do not include elf32-arm.h if
4176 ELFARM_NABI_C_INCLUDED is defined.
4177 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 4178
7e392df6 41792002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 4180
83e1617e
NC
4181 * po/sv.po: Updated Swedish translation.
4182
704afa60
JJ
41832002-07-30 Jakub Jelinek <jakub@redhat.com>
4184
4185 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
4186
487e54f2
AM
41872002-07-30 Alan Modra <amodra@bigpond.net.au>
4188
4189 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
4190 * archive.c (bfd_generic_archive_p): Likewise.
4191 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
4192 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
4193 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
4194 (xcoff64_archive_p): Likewise.
4195 (xcoff64_openr_next_archived_file): Likewise.
4196 (xcoff64_archive_p): Clean up tdata properly on error.
4197 * coffgen.c (coff_real_object_p): Likewise.
4198 (coff_object_p): Release filehdr and opthdr.
4199 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
4200 * ieee.c (ieee_archive_p): Likewise.
4201 * ihex.c (ihex_object_p): Likewise.
4202 (ihex_mkobject): Always allocate tdata.
4203 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
4204 * srec.c (srec_mkobject): Always allocate tdata.
4205 (srec_object_p): Clean up tdata properly on error.
4206 (symbolsrec_object_p): Likewise.
4207 * versados.c (versados_object_p): Likewise.
4208 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
4209 and bfd_realloc instead of realloc.
4210 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
4211 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
4212 place of bfd_malloc, simplifying error freeing. Free hash table too.
4213 (vms_object_p): Clean up tdata on error.
4214 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
4215 (vms_close_and_cleanup): Adjust for bfd_alloc use.
4216
9d46020e
AM
42172002-07-30 Alan Modra <amodra@bigpond.net.au>
4218
4219 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
4220
fb39dac1
RS
42212002-07-26 Chris Demetriou <cgd@broadcom.com>
4222
4223 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
4224 flags into resulting BFD.
4225
7a624474
AM
42262002-07-26 Alan Modra <amodra@bigpond.net.au>
4227
4228 From John Reiser <jreiser@BitWagon.com>
4229 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
4230 tls_ldm_got.refcount.
4231
a4382ec6
TS
42322002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4233
4234 * elf64-mips.c: Update TODO comment.
4235 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
4236 mips_elf64_gprel16_reloca): Remove prototypes.
4237 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
4238 (UNUSED_RELOC): Replace by EMPTY_RELOC.
4239 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
4240 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
4241 R_MIPS_HIGHEST.
4242 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
4243 R_MIPS_GOT16. Remove wrong comments.
4244 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
4245 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
4246 from elf32-mips.c.
4247 (mips_elf64_hi16_reloc): Fix formatting.
4248 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
4249 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
4250 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
4251 (mips_elf64_gprel16_reloc): Make static. Add check for
4252 partial_inplace.
4253 (mips_elf64_gprel16_reloca): Remove.
4254 (mips_elf64_literal_reloc): New function.
4255 (mips_elf64_gprel32_reloc): Fix formatting.
4256 (mips_elf64_shift6_reloc): Fix comment. Make static.
4257 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
4258 elf32-mips.c.
4259 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
4260 elf32-mips.c
4261 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
4262 specific relocations.
4263 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
4264 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
4265 (ELF_MAXPAGESIZE): Add comment.
4266
219576a4
NC
42672002-07-25 Nick Clifton <nickc@redhat.com>
4268
4269 * po/sv.po: Updated Swedish translation.
4270 * po/es.po: Updated Spanish translation.
4271 * po/fr.po: Updated French translation.
4272
8c58d23b
AM
42732002-07-25 Alan Modra <amodra@bigpond.net.au>
4274
4275 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
4276 as elf_link_record_local_dynamic_symbol.
4277 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
4278 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
4279 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
4280 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
4281 attempt is made to record a symbol in a discarded section, and
4282 return `2' in that case.
4283
ff3063f5
NC
42842002-07-24 Nick Clifton <nickc@redhat.com>
4285
4286 * po/sv.po: Updated Swedish translation.
4287 * po/es.po: Updated Spanish translation.
4288
f0fe0e16
AM
42892002-07-23 Alan Modra <amodra@bigpond.net.au>
4290
c1fb5f8a
AM
4291 * po/SRC-POTFILES.in: Regenerate.
4292
f0fe0e16
AM
4293 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
4294 immediately. Remove code handling relocatable linking.
4295 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4296 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4297 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 4298 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
4299 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4300 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4301 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4302 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4303 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4304 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4305 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4306 * elf32-avr.c (elf_backend_rela_normal): Define.
4307 * elf32-cris.c: Likewise.
4308 * elf32-fr30.c: Likewise.
de2d743e 4309 * elf32-frv.c: Likewise.
f0fe0e16
AM
4310 * elf32-h8300.c: Likewise.
4311 * elf32-hppa.c: Likewise.
4312 * elf32-ip2k.c: Likewise.
4313 * elf32-sparc.c: Likewise.
4314 * elf32-v850.c: Likewise.
4315 * elf32-vax.c: Likewise.
4316 * elf64-hppa.c: Likewise.
4317 * elf64-sparc.c: Likewise.
4318 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 4319 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
4320 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4321 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4322 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4323 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4324 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4325 * elf-m10200.c (USE_RELA): Don't define.
4326 * elf-m10300.c: Likewise.
de2d743e 4327 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
4328 * elf32-i370.c: Likewise.
4329 * elf32-ip2k.c: Likewise.
4330 * elf32-m68k.c: Likewise.
4331 * elf32-mcore.c: Likewise.
4332 * elf32-ppc.c: Likewise.
4333 * elf32-s390.c: Likewise.
4334 * elf32-vax.c: Likewise.
4335 * elf64-ppc.c: Likewise.
4336 * elf64-s390.c: Likewise.
4337 * elf64-x86-64.c: Likewise.
4338 * elfxx-ia64.c: Likewise.
4339 * elf32-avr.c (USE_REL): Don't undef.
4340 * elf32-ip2k.c: Likewise.
4341
5e8d7549
NC
43422002-07-23 Nick Clifton <nickc@redhat.com>
4343
4344 * elf-bfd.h (struct elf_backend_data): Add new bitfield
4345 'want_p_paddr_set_to_zero'.
4346 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
4347 to false;
4348 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
4349 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
4350
9e12c7db
NC
43512002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
4352
4353 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
4354 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
4355 show the Copyright string.
4356 Minor formatting tidy ups.
4357
0461a601
NC
43582002-07-23 Nick Clifton <nickc@redhat.com>
4359
ff3063f5
NC
4360 * po/fr.po: Updated French translation.
4361 * po/sv.po: Updated Swedish translation.
0461a601 4362
fad2542d
AM
43632002-07-23 Alan Modra <amodra@bigpond.net.au>
4364
4365 * elflink.h (elf_link_input_bfd): Don't change internal symbols
4366 when outputting relocs.
4367
c0647bfc
JT
43682002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
4369
4370 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
4371 DT_PLTGOT into the dynamic section if there is a PLT.
4372
d01414a5
TS
43732002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4374
4375 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
4376 elf32-mips.c.
4377 (_bfd_mips_elf_write_section): Likewise.
4378 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
4379 (_bfd_mips_elf_write_section): Likewise.
4380 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
4381 (elf32_mips_write_section): Likewise.
4382 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
4383 (_bfd_mips_elf_write_section): Likewise.
4384
40c97fc6
AM
43852002-07-19 Alan Modra <amodra@bigpond.net.au>
4386
4387 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
4388 PT_IA_64_UNWIND segments for a given section.
4389
58378160
L
43902002-07-17 H.J. Lu <hjl@gnu.org>
4391
4392 * Makefile.am: Fix a typo.
4393 * Makefile.in: Regenerate.
4394
cf88bb9f
NC
43952002-07-15 Denis Chertykov <denisc@overta.ru>
4396 Frank Ch. Eigler <fche@redhat.com>
4397 Ben Elliston <bje@redhat.com>
4398 Alan Lehotsky <alehotsky@cygnus.com>
4399 John Healy <jhealy@redhat.com>
4400 Graham Stott <grahams@redhat.com>
4401 Jeff Johnston <jjohnstn@redhat.com>
4402
4403 * Makefile.am: Add support for ip2k.
4404 * Makefile.in: Regenerate.
4405 * doc/Makefile.in: Regenerate.
4406 * archures.c: Add support for ip2k.
4407 * config.bfd: Add support for ip2k.
4408 * configure.in: Add support for ip2k.
4409 * configure: Regenerate.
4410 * reloc.c: Add support for ip2k.
4411 * targets.c: Add support for ip2k.
4412 * bfd-in2.h: Regenerate.
4413 * libbfd.h: Regenerate.
4414 * cpu-ip2k.c: New file.
4415 * elf32-ip2k.c: New file.
4416
0dafd5f6
RE
44172002-07-17 Ian Rickards <irickard@arm.com>
4418
40c97fc6 4419 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
4420 just return the filename.
4421
36b08f12
AM
44222002-07-16 Moritz Jodeit <moritz@jodeit.org>
4423
4424 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
4425
58821868
AM
44262002-07-16 Alan Modra <amodra@bigpond.net.au>
4427
4428 * elflink.h: Formatting fixes, tidy prototypes.
4429 (elf_link_assign_sym_version): Move common code out of loop.
4430
c89583f8
AM
44312002-07-16 Alan Modra <amodra@bigpond.net.au>
4432
4433 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
4434 reloc section size is zero. Correct reloc output location.
4435
ba94744e
AM
44362002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4437
4438 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
4439 the final type for the e_fsel selector when generating PA2.0W code.
4440 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
4441 relocations.
4442
96a94295
L
44432002-07-14 H.J. Lu <hjl@gnu.org>
4444
4445 * elflink.h (elf_link_assign_sym_version): Hide the default
4446 definition if there is a hidden versioned definition.
4447
6849c52f
HPN
44482002-07-12 Hans-Peter Nilsson <hp@axis.com>
4449
4450 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
4451 dynamic reference test in assertion when initializing GOT with
4452 static contents. Just assert that there are either no dynamic
4453 sections, the symbol is defined in the regular objects or that the
4454 symbol is undef weak. Tweak comment.
4455 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
4456 only if the symbol isn't defined in the program and isn't undef
4457 weak.
4458 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
4459 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
4460 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
4461 (elf_cris_discard_excess_program_dynamics): Don't consider
4462 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
4463
239e1f3a
AM
44642002-07-11 Alan Modra <amodra@bigpond.net.au>
4465
4466 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
4467 unresolved debugging relocs in dynamic applications.
4468 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4469 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4470 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4471 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4472 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4473 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4474
2f6d9989
AM
44752002-07-10 Alan Modra <amodra@bigpond.net.au>
4476
f5e87a1d
AM
4477 * elf64-ppc.c (ONES): Define.
4478 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
4479 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
4480 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
4481
2f6d9989
AM
4482 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
4483 (ppc64_elf_set_private_flags): Delete.
4484 (ppc64_elf_section_from_shdr): Delete.
4485 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
4486 (ppc64_elf_fake_sections): Delete.
4487 (bfd_elf64_bfd_set_private_flags): Don't define.
4488 (bfd_elf64_get_symbol_info): Likewise.
4489 (elf_backend_section_from_shdr): Likewise.
4490 (elf_backend_fake_sections): Likewise.
4491
0594c12d
AM
44922002-07-10 Marco Walther <Marco.Walther@sun.com>
4493
4494 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
4495 when not already set.
4496 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
4497 (elf_backend_fake_sections): Define.
4498
699cb9b8
AM
44992002-07-10 Alan Modra <amodra@bigpond.net.au>
4500
4501 * merge.c (_bfd_merge_section): Remove redundant output_section check.
4502 Formatting.
4503 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
4504
0a4787a0
HPN
45052002-07-09 Hans-Peter Nilsson <hp@axis.com>
4506
4507 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
4508 NULL sym_hashes to just before use.
4509 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
4510 symbol with non-default visibility.
4511 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
4512 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4513 Ditto.
4514 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
4515 symbol with non-default visibility.
4516 (cris_elf_check_relocs): At tests for local symbol before
4517 increasing h->plt.refcount, also check for non-default
4518 visibility. Ditto when checking for local symbol to eliminate
4519 pc-relative runtime relocs.
4520
aecc8f8a
AM
45212002-07-08 Alan Modra <amodra@bigpond.net.au>
4522
4523 * elf.c: Formatting.
4524 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
4525 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
4526 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
4527 segments.
4528
e9168c1e
MM
45292002-07-07 Mark Mitchell <mark@codesourcery.com>
4530 Alan Modra <amodra@bigpond.net.au>
4531
4532 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
4533 account the impact of relocation count overflow when computing
4534 section offsets.
4535 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
4536 or not to apply the PE COFF reloc overflow handling. Fix a
4537 fencepost error in deciding whether or not to use that technique.
4538
6cdc0ccc
AM
45392002-07-07 Alan Modra <amodra@bigpond.net.au>
4540
4541 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
4542 change type of locsyms.
4543 (bfd_elf_get_elf_syms): Declare.
4544 * elf.c (bfd_elf_get_elf_syms): New function.
4545 (group_signature): Use bfd_elf_get_elf_syms.
4546 (bfd_section_from_r_symndx): Likewise.
4547 * elfcode.h (elf_slurp_symbol_table): Likewise.
4548 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4549 (elf_link_add_object_symbols): Likewise. Reorganise to increase
4550 locality of various data structures. Properly free internal relocs.
4551 (elf_bfd_final_link): Properly free internal relocs.
4552 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
4553 (elf_link_input_bfd): Likewise.
4554 (elf_gc_mark): Likewise. Properly free internal relocs.
4555 (elf_gc_sweep): Properly free internal relocs.
4556 (elf_reloc_symbol_deleted_p): No need to swap syms in.
4557 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
4558 internal relocs.
4559 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
4560 Properly free possibly cached info.
4561 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
4562 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
4563 symbol swapping code.
4564 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
4565 Properly free possibly cached info.
4566 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
4567 (mn10300_elf_relax_delete_bytes): Likewise.
4568 (mn10300_elf_symbol_address_p): Likewise.
4569 (mn10300_elf_get_relocated_section_contents): Likewise.
4570 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
4571 (elf32_h8_relax_delete_bytes): Likewise.
4572 (elf32_h8_symbol_address_p): Likewise.
4573 (elf32_h8_get_relocated_section_contents): Likewise.
4574 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
4575 (m32r_elf_relax_delete_bytes): Likewise.
4576 (m32r_elf_get_relocated_section_contents): Likewise.
4577 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
4578 elf_section_data to determine whether cached.
4579 (sh_elf_relax_section): As above for elf-m10200.c.
4580 (sh_elf_relax_delete_bytes): Likewise.
4581 (sh_elf_get_relocated_section_contents): Likewise.
4582 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
4583 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
4584 reading of local syms.
4585 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4586 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
4587 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
4588 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
4589 relocs.
4590 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
4591 free internal relocs and section contents. Don't read symbols.
4592 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
4593 (elf32_hppa_size_stubs): Don't free local syms.
4594 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
4595 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
4596 possibly cached info.
4597 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4598 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
4599 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
4600 all_local_syms.
4601 (get_local_syms): Delete function.
4602 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
4603 on exit.
4604 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
4605
b3212001
JW
46062002-07-05 Jim Wilson <wilson@redhat.com>
4607
4608 * syms.c (decode_section_type): New.
4609 (bfd_decode_symclass): Call decode_section_type.
4610
894bb1ee
JJ
46112002-07-04 Jakub Jelinek <jakub@redhat.com>
4612
4613 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
4614 section content start.
4615 Reported by Michael Schumacher <mike@hightec-rt.com>.
4616
bc0ba537
AM
46172002-07-04 Alan Modra <amodra@bigpond.net.au>
4618
4619 * section.c (_bfd_strip_section_from_output): Remove unnecessary
4620 link order code. Don't actually remove the output section here;
4621 Just set a flag for the linker to do so.
4622 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
4623 sections when setting up output section dynsyms.
4624
797fc050
AM
46252002-07-04 Alan Modra <amodra@bigpond.net.au>
4626
4627 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
4628 fudge.
4629 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
4630 libs here instead.
4631
99881371
MS
46322002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4633
4634 * elf64-s390.c (create_got_section): Set .got section alignment to
4635 8 bytes.
4636 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
4637
47d9a591
AM
46382002-07-02 Alan Modra <amodra@bigpond.net.au>
4639
4640 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
4641
179d3252
JT
46422002-07-01 Matt Thomas <matt@3am-software.com>
4643
4644 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
4645 to EF_VAX_*.
4646
4a14403c
TS
46472002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4648
4649 * elfxx-mips.c (ABI_64_P): Fix comment.
4650 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
4651 new section names for N64 ABI.
4652 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
4653 (mips_elf_calculate_relocation): Code formatting.
4654 (mips_elf_create_dynamic_relocation): Likewise.
4655 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
4656 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
4657 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
4658 in any NewABI.
4659 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
4660 for NewABI.
4661 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
4662 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
4663 here, too.
4664
607c0e09
AS
46652002-07-01 Andreas Schwab <schwab@suse.de>
4666
4667 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
4668 R_X86_64_64 to R_X86_64_RELATIVE.
4669
ba26fd96
AM
46702002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
4671
4672 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
4673 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
4674 Run "make dep-am".
4675 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
4676 host_aout_vec.
4677 * configure.in (vaxbsd_vec): Add.
4678 * targets.c (vaxbsd_vec): Add.
4679 * Makefile.in: Rebuild.
4680 * configure: Rebuild.
4681 * po/SRC-POTFILES.in: Rebuild.
4682
1e2f5b6e
AM
46832002-07-01 Alan Modra <amodra@bigpond.net.au>
4684
4685 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
4686 examining to gc_mark_hook, rather than the bfd.
4687 (elf_gc_sections): Adjust.
4688 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
4689 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
4690 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
4691 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
4692 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
4693 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
4694 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
4695 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
4696 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
4697 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
4698 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
4699 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
4700 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
4701 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
4702 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
4703 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
4704 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
4705 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
4706 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
4707 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
4708 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
4709 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
4710 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
4711 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4712 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
4713 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
4714 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
4715 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
4716 redundant local sym tests.
4717 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
4718 (link_hash_newfunc): Init is_entry.
4719 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
4720 (ppc64_elf_link_hash_table_create): Init all_local_syms.
4721 (create_linkage_sections): Use bfd_make_section_anyway rather than
4722 bfd_make_section.
4723 (ppc64_elf_mark_entry_syms): New function.
4724 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
4725 up opd entry to function section map.
4726 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
4727 relocs that reference the opd section.
4728 (edit_opd): New function.
4729 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
4730 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
4731 (get_local_syms): Do so here. Exit if we already have local syms.
4732 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
4733 read local syms on non-ELF input.
4734 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
4735 than duplicating it's function here. Adjust free of internal
4736 relocs to suit.
4737 (ppc64_elf_relocate_section): Adjust local syms in opd section.
4738 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
4739 * elf32-hppa.c (elf32_hppa_size_stubs): Call
4740 _bfd_elf32_link_read_relocs rather than duplicating it's function
4741 here. Adjust free of internal relocs to suit.
4742
1b71fb54
AJ
47432002-07-01 Andreas Jaeger <aj@suse.de>
4744
4745 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
4746 are not allowed in shared libs code, enforce -fPIC.
4747
8d28f606
HPN
47482002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
4749
4750 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
4751 trailing zero-sequences when there's previous left-over data.
4752
5ac81c74
JL
47532002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
4754
4755 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
4756 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
4757 and opd_rel_sec in order for starting rela section. Check _raw_size.
4758 (elf_backend_reloc_type_class): Define.
4759
91a4d569
AM
47602002-06-27 Kevin Buettner <kevinb@redhat.com>
4761
4762 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
4763 DWARF2 formats.
4764
feee612b
AM
47652002-06-27 Alan Modra <amodra@bigpond.net.au>
4766
4767 * cpu-powerpc.c: Comment on ordering of arch_info.
4768 * elf32-ppc.c (ppc_elf_object_p): New function.
4769 (elf_backend_object_p): Define.
4770 * elf64-ppc.c (ppc64_elf_object_p): New function.
4771 (elf_backend_object_p): Define.
4772
a4e6cefc
JT
47732002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
4774
4775 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
4776 * configure: Regenerate.
4777
dae2dd0d
NC
47782002-06-25 Jason Eckhardt <jle@rice.edu>
4779
4780 * dwarf2.c (decode_line_info): Check unit->addr_size
4781 to read in the proper number of prologue bytes.
4782
680f9d5c
NC
47832002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
4784
4785 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
4786 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
4787 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
4788 been enabled.
dae2dd0d 4789
680f9d5c
NC
4790 * targets.c (_bfd_target_vector[]): Only include
4791 aix5coff64_vec if 64-bit bfd support has been enabled.
4792
d4c88bbb
AM
47932002-06-25 Alan Modra <amodra@bigpond.net.au>
4794
4795 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
4796 * elf32-hppa.c (hppa_add_stub): Likewise.
4797 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4798 * elflink.h (elf_add_default_symbol): Fix comment typo.
4799 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
4800 (elf_link_add_object_symbols): Likewise.
4801 (elf_link_assign_sym_version): Likewise.
4802 * hash.c (bfd_hash_lookup): Likewise.
4803 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4804 * section.c (bfd_get_unique_section_name): Likewise.
4805 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
4806 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
4807 (assign_section_numbers): Likewise.
4808 (_bfd_elfcore_make_pseudosection): Likewise.
4809 (elfcore_grok_lwpstatus): Likewise.
4810 (elfcore_grok_win32pstatus): Likewise.
4811 (elfcore_write_note): Constify input params. Use PTR instead of
4812 void *. Include terminating NUL in namesz. Correct padding.
4813 Support NULL "name" param. Use memcpy instead of strcpy.
4814 (elfcore_write_prpsinfo): Constify input params.
4815 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
4816 (elfcore_write_lwpstatus): Likewise.
4817 (elfcore_write_pstatus): Likewise.
4818 (elfcore_write_prfpreg): Likewise.
4819 (elfcore_write_prxfpreg): Likewise.
4820 * elf-bfd.h (elfcore_write_note): Update declaration.
4821 (elfcore_write_prpsinfo): Likewise.
4822 (elfcore_write_prstatus): Likewise.
4823 (elfcore_write_pstatus): Likewise.
4824 (elfcore_write_prfpreg): Likewise.
4825 (elfcore_write_prxfpreg): Likewise.
4826 (elfcore_write_lwpstatus): Likewise.
4827
b0ac09d2
NC
48282002-06-25 Jason Eckhardt <jle@rice.edu>
4829
4830 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
4831 symbols of type stProc and stStaticProc.
4832
48332002-06-25 Nick Clifton <nickc@redhat.com>
4834
4835 * ecoff.c: VArious formatting fixes.
4836
021d6096
AM
48372002-06-25 Alan Modra <amodra@bigpond.net.au>
4838
4839 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
4840
82e51918
AM
48412002-06-25 Alan Modra <amodra@bigpond.net.au>
4842
4843 * aout-adobe.c: Don't compare against "true" or "false.
4844 * aout-target.h: Likewise.
4845 * aoutx.h: Likewise.
4846 * archive.c: Likewise.
4847 * bout.c: Likewise.
4848 * cache.c: Likewise.
4849 * coff-a29k.c: Likewise.
4850 * coff-alpha.c: Likewise.
4851 * coff-i386.c: Likewise.
4852 * coff-mips.c: Likewise.
4853 * coff-or32.c: Likewise.
4854 * coff64-rs6000.c: Likewise.
4855 * coffcode.h: Likewise.
4856 * coffgen.c: Likewise.
4857 * cpu-ns32k.c: Likewise.
4858 * ecoff.c: Likewise.
4859 * ecofflink.c: Likewise.
4860 * elf.c: Likewise.
4861 * elf32-arm.h: Likewise.
4862 * elf32-cris.c: Likewise.
4863 * elf32-d30v.c: Likewise.
4864 * elf32-i386.c: Likewise.
4865 * elf32-mcore.c: Likewise.
4866 * elf32-ppc.c: Likewise.
4867 * elf32-sh.c: Likewise.
4868 * elf32-sh64.c: Likewise.
4869 * elf32-v850.c: Likewise.
4870 * elf64-alpha.c: Likewise.
4871 * elf64-sh64.c: Likewise.
4872 * elfcode.h: Likewise.
4873 * elfcore.h: Likewise.
4874 * elflink.h: Likewise.
4875 * elfxx-mips.c: Likewise.
4876 * i386os9k.c: Likewise.
4877 * ieee.c: Likewise.
4878 * libbfd.c: Likewise.
4879 * linker.c: Likewise.
4880 * mmo.c: Likewise.
4881 * nlm32-alpha.c: Likewise.
4882 * nlm32-i386.c: Likewise.
4883 * nlm32-ppc.c: Likewise.
4884 * nlm32-sparc.c: Likewise.
4885 * nlmcode.h: Likewise.
4886 * oasys.c: Likewise.
4887 * pdp11.c: Likewise.
4888 * peicode.h: Likewise.
4889 * reloc.c: Likewise.
4890 * som.c: Likewise.
4891 * srec.c: Likewise.
4892 * tekhex.c: Likewise.
4893 * vms.c: Likewise.
4894 * xcofflink.c: Likewise.
4895 * elf64-sparc.c: Edit comment to not use "== false".
4896
4897 * aoutf1.h: Don't use "? true : false".
4898 * ecoff.c: Likewise.
4899 * format.c: Likewise.
4900 * ieee.c: Likewise.
4901 * linker.c: Likewise.
4902 * mmo.c: Likewise.
4903 * oasys.c: Likewise.
4904
48fc70a2
AM
49052002-06-23 H.J. Lu <hjl@gnu.org>
4906
4907 * elflink.h (elf_link_add_archive_symbols): For the default
4908 version, check references with only one `@' first.
4909
47b7c2db
AM
49102002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
4911
4912 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
4913 function.
4914 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
4915 symbol table.
4916 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
4917 (elf64_hppa_size_dynamic_sections): Revise to use
4918 elf64_hppa_mark_milli_and_exported_functions.
4919 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
4920 symbols out of dynamic symbol table.
4921
f5d44ba0
AM
49222002-06-23 Alan Modra <amodra@bigpond.net.au>
4923
bb3fff1e
AM
4924 * Makefile.in: Regenerate.
4925 * libbfd.h: Regenerate.
4926 * bfd-in2.h: Regenerate.
4927 * configure: Regenerate.
4928 * po/SRC-POTFILES.in: Regenerate.
4929
f5d44ba0
AM
4930 * elflink.h: Comment typo fixes.
4931
49322002-06-23 H.J. Lu <hjl@gnu.org>
4933
4934 * elf-bfd.h (elf_link_loaded_list): New structure.
4935 (elf_link_hash_table): Add "loaded".
4936 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
4937 * elflink.h (elf_link_check_versioned_symbol): New function.
4938 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
4939
cc36acdf
NC
49402002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
4941
4942 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 4943 support an ELF style hash table, return true, indicating that
cc36acdf
NC
4944 nothing needed to be done, rather than false, indicating that the
4945 section's size could not be computed.
4946
4e5ba5b7
DB
49472002-06-18 Dave Brolley <brolley@redhat.com>
4948
4949 From Catherine Moore, Michael Meissner, Dave Brolley:
4950 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
4951 * targets.c: Support bfd_elf32_frv_vec.
4952 * reloc.c: Add FRV relocs.
4953 * configure.in: Add support for bfd-elf32-frv-vec.
4954 * config.bfd (targ_cpu): Add support for frv-*-elf.
4955 * archures.c: Add frv arch and machines.
4956 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
4957 (ALL_MACHINES_CFILES): Add cpu-frv.c.
4958 (BFD32_BACKENDS): Add elf32-frv.lo.
4959 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
4960 (cpu-frv.lo): New target.
4961 (elf32-frv.lo): New target.
4962 * cpu-frv.c: New file.
4963 * elf32-frv.c: New file.
4964
7ece0d85
JJ
49652002-06-18 Jakub Jelinek <jakub@redhat.com>
4966
4967 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
4968 e_shnum == 0.
4969 Only read the first section header if e_shoff is non-zero.
4970 Don't consider e_shstrndx if there are no sections.
4971
57fb03ac
TR
49722002-06-17 Tom Rix <trix@redhat.com>
4973
4974 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 4975 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
4976 complain_overflow_bitfield.
4977
341ca622
AM
49782002-06-17 Alan Modra <amodra@bigpond.net.au>
4979
767e34d1
AM
4980 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
4981 (bfd_fdopenr): Likewise.
4982 (bfd_openstreamr): Likewise.
4983 (bfd_openw): Likewise.
4984
341ca622
AM
4985 * targets.c: Sort target vecs.
4986 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
4987 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
4988 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
4989 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
4990 * configure.in: Sort target vecs. Add m88kmach3_vec.
4991 * configure: Regenerate.
4992
dfbbae4c
HPN
49932002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
4994
4995 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
4996 bpo_reloc_no to break sort order ties, not address of items.
4997
d663e1cd
JL
49982002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4999
5000 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
5001 Skip excluded sections in determing __gp value.
5002 (elf_hppa_final_link_relocate): Use the symbol's address in
5003 R_PARISC_FPTR64 relocations that don't need an opd entry.
5004 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
5005 (elf64_hppa_finalize_dynreloc): Likewise.
5006 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
5007 (elf64_hppa_finish_dynamic_symbol): Break up assert.
5008
a8295218
NC
50092002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
5010
5011 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5012 alignment for .bss, .data and .text sections so that sse and sse2
5013 code will work.
5014 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5015
50162002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
5017
5018 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
5019 sh[1234]*-elf*.
5020
3db4b612
JL
50212002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
5022
2cb69dd3
JL
5023 * elflink.h (elf_bfd_final_link): Improve error handling for missing
5024 dynamic sections.
5025
3db4b612
JL
5026 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
5027 for a symbol that has no output section.
5028 (allocate_dynrel_entries): Correct comment.
5029 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
5030 unless we want one.
5031 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
5032 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
5033 with no section. Remove unnecessary parentheses.
5034
f3813499
TR
50352002-06-11 Tom Rix <trix@redhat.com>
5036
5037 * coffcode.h (coff_compute_section_file_positions): Add data
5038 section to AIX loader alignment check.
5039
f5d44ba0 5040 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
5041 alignment to 4 bytes.
5042 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
5043 power accessor macro.
5044 (do_shared_object_padding): Remove invalid assertion.
5045
0ebaf185
RS
50462002-06-10 Richard Sandiford <rsandifo@redhat.com>
5047
5048 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
5049 for removed output sections.
5050
ebe3e2d1
NC
50512002-06-10 Geoffrey Keating <geoffk@redhat.com>
5052
5053 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
5054 htab_alloc.
5055 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
5056
0b14c2aa
L
50572002-06-08 H.J. Lu <hjl@gnu.org>
5058
5059 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
5060 work around a long long bug in gcc 2.96 on mips.
5061
3c2bfad6
JT
50622002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
5063
5064 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
5065 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
5066 Regenerate dependency lists.
5067 * Makefile.in: Regenerate.
5068 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
5069 vax1knetbsd_vec to targ_selvecs.
5070 * configure.in: Add vax1knetbsd_vec.
5071 * configure: Regenerate.
5072 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
5073 * vax1knetbsd.c: New file.
5074 * vaxnetbsd.c: Update copyright years.
5075 (TARGET_PAGE_SIZE): Set to 0x1000.
5076 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
5077
91149be3
JT
50782002-06-08 Matt Thomas <matt@3am-software.com>
5079
5080 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
5081
21e15248
AM
50822002-06-08 Alan Modra <amodra@bigpond.net.au>
5083
5084 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
5085
986b7daa
AM
50862002-06-08 Alan Modra <amodra@bigpond.net.au>
5087
e90b95f6
AM
5088 * Makefile.am: Run "make dep-am".
5089 * Makefile.in: Regenerate.
5090
3f9c735e
AM
5091 * armnetbsd.c: Replace CONST with const.
5092 * corefile.c: Likewise.
5093 * elf32-dlx.c: Likewise.
5094 * elf64-mips.c: Likewise.
5095 * mmo.c: Likewise.
5096 * ns32knetbsd.c: Likewise.
5097
986b7daa
AM
5098 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
5099 table is elf64-sparc.
5100
5a659663
TS
51012002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5102
5103 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
5104 Fix RELA addends to get not shifted in the result. Don't do special
5105 handling of R_MIPS_64 for NewABI.
5106
9bab7074
AM
51072002-06-07 Alan Modra <amodra@bigpond.net.au>
5108
5109 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5110 (NAME(aout,slurp_reloc_table)): Likewise.
5111 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
5112 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
5113 (xcoff_write_archive_contents_big): Likewise.
5114 (xcoff_generate_rtinit): Likewise.
5115 (xcoff_generate_rtinit): Likewise, and check error return.
5116 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5117 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
5118 (coff_get_normalized_symtab): Likewise.
5119 (coff_make_empty_symbol): Likewise.
5120 (bfd_coff_set_symbol_class): Likewise.
5121 * cofflink.c (coff_link_add_symbols): Likewise.
5122 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
5123 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
5124 (bfd_ecoff_write_accumulated_debug): Likewise.
5125 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
5126 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
5127 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
5128 * ieee.c (do_with_relocs): Use bfd_zalloc.
5129 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
5130 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5131 (NAME(aout,slurp_reloc_table)): Likewise.
5132 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
5133 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
5134 * som.c (som_build_and_write_symbol_table): Likewise.
5135 (som_slurp_string_table): Likewise.
5136 (som_slurp_symbol_table): Likewise.
5137 (som_bfd_ar_write_symbol_stuff): Likewise.
5138 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
5139 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
5140 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
5141 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
5142 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
5143
1126897b
AM
51442002-06-07 Alan Modra <amodra@bigpond.net.au>
5145
5146 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
5147 "group" union.
5148 (elf_group_name): Update.
5149 (elf_group_id): Define.
5150 (bfd_elf_set_group_contents): Declare.
5151 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
5152 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
5153 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
5154 that sym for the signature.
5155 (_bfd_elf_compute_section_file_positions): Don't call
5156 set_group_contents for "ld -r" case.
5157 (swap_out_syms): Use bfd_zalloc.
5158 * elflink.h (elf_link_add_archive_symbols): Likewise.
5159 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5160 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
5161
3fad3c7c
AM
51622002-06-07 Alan Modra <amodra@bigpond.net.au>
5163
5164 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
5165 relocs in opd for non-shared too.
5166
10f469bf 51672002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
5168
5169 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
5170 relocations.
5171
7217313c
NC
51722002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
5173
5174 * merge.c: Include libiberty.h.
5175 * elf-strtab.c: Include libiberty.h.
5176
6cb22815
AM
51772002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
5178
5179 * peXXigen.c (pe_print_idata): Remove unused variable.
5180
1ed89aa9
NC
51812002-06-06 David Heine <dlheine@tensilica.com>
5182
5183 * elf.c (assign_file_positions_for_segments): Remove unallocated
5184 sections from the section to segment mapping for PT_LOAD segments.
5185 Update comment about empty loadable segments.
5186
644c4c80
RS
51872002-06-06 Richard Sandiford <rsandifo@redhat.com>
5188
5189 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
5190 is within the .stabstr section.
5191
f8ecb12b
AM
51922002-06-06 Alan Modra <amodra@bigpond.net.au>
5193
5194 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
5195 are "const PTR", not "const PTR *".
5196 (bfd_elf32_swap_symbol_in): Likewise.
5197 (bfd_elf64_swap_symbol_in): Likewise.
5198 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
5199 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5200 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5201 (elf_link_add_object_symbols): Likewise.
5202 (elf_link_record_local_dynamic_symbol): Likewise.
5203 (elf_link_input_bfd): Likewise.
5204 (elf_gc_mark): Likewise.
5205 (elf_reloc_symbol_deleted_p): Likewise.
5206 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5207 (mn10200_elf_relax_delete_bytes): Likewise.
5208 (mn10200_elf_symbol_address_p): Likewise.
5209 (mn10200_elf_get_relocated_section_contents): Likewise.
5210 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5211 (mn10300_elf_relax_section): Likewise.
5212 (mn10300_elf_relax_delete_bytes): Likewise.
5213 (mn10300_elf_symbol_address_p): Likewise.
5214 (mn10300_elf_get_relocated_section_contents): Likewise.
5215 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5216 (elf32_h8_relax_delete_bytes): Likewise.
5217 (elf32_h8_symbol_address_p): Likewise.
5218 (elf32_h8_get_relocated_section_contents): Likewise.
5219 * elf32-hppa.c (get_local_syms): Likewise.
5220 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5221 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5222 * elf32-sh.c (sh_elf_relax_section): Likewise.
5223 (sh_elf_relax_delete_bytes): Likewise.
5224 (sh_elf_get_relocated_section_contents): Likewise.
5225 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5226 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5227 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5228 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5229 * elf64-ppc.c (get_local_syms): Likewise.
5230 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5231 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5232
1ed89aa9 52332002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
5234
5235 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
5236
73ff0d56
AM
52372002-06-05 Alan Modra <amodra@bigpond.net.au>
5238
9dce4196
AM
5239 * elf.c (group_signature): Swap in the whole symbol, and handle
5240 extracting section symbol names.
5241 (setup_group): Add comment.
5242 (set_group_contents): When called from objcopy or ld, arrange for
5243 section contents to be written. Write group member output section
5244 indices to allow objcopy to reorganize sections.
5245 (_bfd_elf_copy_private_section_data): Copy group info.
5246
73ff0d56
AM
5247 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
5248 (bfd_elf32_swap_symbol_in): Update prototype.
5249 (bfd_elf64_swap_symbol_in): Likewise.
5250 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
5251 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5252 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5253 (elf_link_add_object_symbols): Likewise.
5254 (elf_link_record_local_dynamic_symbol): Likewise.
5255 (elf_link_input_bfd): Likewise.
5256 (elf_gc_mark): Likewise.
5257 (elf_reloc_symbol_deleted_p): Likewise.
5258 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5259 (mn10200_elf_relax_delete_bytes): Likewise.
5260 (mn10200_elf_symbol_address_p): Likewise.
5261 (mn10200_elf_get_relocated_section_contents): Likewise.
5262 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5263 (mn10300_elf_relax_section): Likewise.
5264 (mn10300_elf_relax_delete_bytes): Likewise.
5265 (mn10300_elf_symbol_address_p): Likewise.
5266 (mn10300_elf_get_relocated_section_contents): Likewise.
5267 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5268 (elf32_h8_relax_delete_bytes): Likewise.
5269 (elf32_h8_symbol_address_p): Likewise.
5270 (elf32_h8_get_relocated_section_contents): Likewise.
5271 * elf32-hppa.c (get_local_syms): Likewise.
5272 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5273 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5274 * elf32-sh.c (sh_elf_relax_section): Likewise.
5275 (sh_elf_relax_delete_bytes): Likewise.
5276 (sh_elf_get_relocated_section_contents): Likewise.
5277 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5278 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5279 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5280 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5281 * elf64-ppc.c (get_local_syms): Likewise.
5282 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5283 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5284 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
5285 * elf64-alpha.c (alpha_elf_size_info): Likewise.
5286 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5287 * elf64-mips.c (mips_elf64_size_info): Likewise.
5288 * elf64-s390.c (s390_elf64_size_info): Likewise.
5289 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5290
53bfd6b4
MR
52912002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5292
5293 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
5294 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
5295 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
5296 _bfd_mips_elf_ignore_discarded_relocs.
5297 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
5298
d4df96e6
L
52992002-06-05 H.J. Lu <hjl@gnu.org>
5300
5301 * elfxx-mips.c (mips_elf_calculate_relocation): Call
5302 _bfd_elf_rel_local_sym for STT_SECTION relocations against
5303 the SEC_MERGE section.
5304
e61463e1
AM
53052002-06-05 Alan Modra <amodra@bigpond.net.au>
5306
3cac74d0
AM
5307 * coff-alpha.c: Update copyright date.
5308 * coff-mips.c: Likewise.
5309 * xcoff-target.h: Likewise.
5310
e61463e1
AM
5311 * bfd-in.h: Remove "taken from the source" comment.
5312 * libbfd-in.h: Likewise.
5313 * libcoff-in.h: Likewise.
5314 * bfd-in2.h: Regenerate.
5315 * libbfd.h: Regenerate.
5316 * libcoff.h: Regenerate.
5317
5318 * elf.c (bfd_elf_discard_group): Return true.
5319 * elf-bfd.h (bfd_elf_discard_group): Declare.
5320 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
5321 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
5322 * bfd.c (bfd_discard_group): Define.
5323 * targets.c (struct bfd_target): Add _bfd_discard_group.
5324 (BFD_JUMP_TABLE_LINK): Here too.
5325 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
5326 * aout-adobe.c (aout_32_bfd_discard_group): Define.
5327 * aout-target.h (MY_bfd_discard_group): Define.
5328 * aout-tic30.c (MY_bfd_discard_group): Define.
5329 * binary.c (binary_bfd_discard_group): Define.
5330 * bout.c (b_out_bfd_discard_group): Define.
5331 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
5332 * coffcode.h (coff_bfd_discard_group): Define.
5333 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
5334 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
5335 * i386msdos.c (msdos_bfd_discard_group): Define.
5336 * i386os9k.c (os9k_bfd_discard_group): Define.
5337 * ieee.c (ieee_bfd_discard_group): Define.
5338 * ihex.c (ihex_bfd_discard_group): Define.
5339 * mmo.c (mmo_bfd_discard_group): Define.
5340 * nlm-target.h (nlm_bfd_discard_group): Define.
5341 * oasys.c (oasys_bfd_discard_group): Define.
5342 * ppcboot.c (ppcboot_bfd_discard_group): Define.
5343 * som.c (som_bfd_discard_group): Define.
5344 * srec.c (srec_bfd_discard_group): Define.
5345 * tekhex.c (tekhex_bfd_discard_group): Define.
5346 * versados.c (versados_bfd_discard_group): Define.
5347 * vms.c (vms_bfd_discard_group): Define.
5348 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
5349 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
5350 (aix5coff64_vec): Likewise.
5351 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
5352
9cba27b2
JT
53532002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
5354
5355 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
5356 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
5357 (elf32-sh64-com.lo): New dependency list.
5358 * Makefile.in: Regenerate.
5359 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
5360 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
5361 elf32-sh64-com.lo.
5362 * configure: Regenerate.
5363 * elf32-sh64.c (sh64_address_in_cranges)
5364 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
5365 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
5366 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
5367 * elf32-sh64-com.c: ...here. New file.
5368
8d2c33be
AM
53692002-06-04 Alan Modra <amodra@bigpond.net.au>
5370
5371 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
5372 ATTRIBUTE_UNUSED on used params.
5373 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
5374 before calling bfd_section_from_elf_index on local syms.
5375 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5376
5b0e55b6
JT
53772002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
5378
5379 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
5380 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
5381 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
5382 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
5383 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
5384 * Makefile.in: Regenerate.
5385 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
5386 (sh64-*-netbsd*): New targets.
5387 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
5388 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
5389 * configure: Regenerate.
5390 * elf32-sh64-nbsd.c: New file.
5391 * elf64-sh64-nbsd.c: New file.
5392 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
5393 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
5394 bfd_elf64_sh64lnbsd_vec.
5395
b885599b
AM
53962002-06-04 Alan Modra <amodra@bigpond.net.au>
5397
5398 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
5399 (bfd_section_from_shdr): Likewise. Set section name of group
5400 sections from signature.
5401 (group_signature): Split out from setup_group. Ensure symbol table
5402 is available.
5403 (bfd_elf_discard_group): New function.
5404 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
5405 .gnu.linkonce* sections if they are members of a group.
5406 (set_group_contents): Set GRP_COMDAT flag.
5407 * section.c (bfd_discard_group): New function.
5408 * bfd-in.h (bfd_elf_discard_group): Declare.
5409 * bfd-in2.h: Regenerate.
5410 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
5411 (elf_linkonce_p): Define.
5412
90937f86
AM
54132002-06-04 Alan Modra <amodra@bigpond.net.au>
5414
5415 * elf.c (bfd_section_from_shdr): Make "name" const.
5416 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
5417 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
5418 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
5419 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
5420 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
5421 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
5422 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
5423 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
5424 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
5425 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
5426 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
5427
cf6fb9ce
MR
54282002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5429
5430 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
5431 ABI.
5432
cedb70c5
KH
54332002-06-02 Kazu Hirata <kazu@cs.umass.edu>
5434
5435 * elf32-arc.c: Fix formatting.
5436 * elf32-arm.h: Likewise.
5437 * elf32-cris.c: Likewise.
5438 * elf32-dlx.c: Likewise.
5439 * elf32-hppa.c: Likewise.
5440 * elf32-i386.c: Likewise.
5441 * elf32-i386qnx.c: Likewise.
5442 * elf32-or32.c: Likewise.
5443 * elf32-s390.c: Likewise.
5444 * elf32-sh64.c: Likewise.
5445 * elf32-vax.c: Likewise.
5446 * elf32-xstormy16.c: Likewise.
5447 * elf64-alpha.c: Likewise.
5448 * elf64-mmix.c: Likewise.
5449 * elf64-ppc.c: Likewise.
5450 * elf64-s390.c: Likewise.
5451 * elf64-sh64.c: Likewise.
5452 * elf64-x86-64.c: Likewise.
5453
048d873d
RH
54542002-06-02 Richard Henderson <rth@redhat.com>
5455
5456 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
5457 null when there are no got entries for a symbol.
5458 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
5459 uninitialized variable warning.
5460
4a67a098
RH
54612002-06-01 Richard Henderson <rth@redhat.com>
5462
5463 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
5464 undefined symbols here.
5465 (elf64_alpha_relax_section): Do it here. Also test for not
5466 defined in the current module.
5467 (elf64_alpha_relocate_section_r): Split out of ...
5468 (elf64_alpha_relocate_section): ... here. Don't dereference
5469 NULL when looking up local got entries.
5470
f44f99a5
RH
54712002-06-01 Richard Henderson <rth@redhat.com>
5472
5473 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
5474 symbols from JSR relaxation.
5475 (elf64_alpha_size_plt_section_1): New.
5476 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
5477 (elf64_alpha_size_rela_got_1): ... here.
5478 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
5479 (elf64_alpha_size_rela_got_section): ... here.
5480 (elf64_alpha_size_plt_section): New.
5481 (elf64_alpha_relax_section): Call them.
5482 (elf64_alpha_size_got_sections): Remove output_bfd arg.
5483 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
5484
9e756d64
RH
54852002-06-01 Richard Henderson <rth@redhat.com>
5486
5487 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
5488 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
5489 in shared libraries. Fix DTPRELHI and TPRELHI value.
5490 (INSN_ADDQ, INSN_RDUNIQ): New.
5491 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
5492 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
5493 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
5494 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
5495 Handle GOTDTPREL and GOTTPREL relocations.
5496 (elf64_alpha_relax_gprelhilo): New.
5497 (elf64_alpha_relax_tls_get_addr): New.
5498 (elf64_alpha_relax_find_tls_segment): New.
5499 (elf64_alpha_relax_section): Handle TLS relocations.
5500 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
5501 (elf64_alpha_check_relocs): Set it.
5502
c853d7f6
RH
55032002-06-01 Richard Henderson <rth@redhat.com>
5504
b646261c
RH
5505 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
5506
c853d7f6
RH
5507 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
5508 check; don't suppress dynamic relocs for non-allocated sections.
5509
d7e41a96
RH
5510 * elf64-alpha.c: Remove dead code.
5511
5f333394
AM
55122002-05-31 Alan Modra <amodra@bigpond.net.au>
5513
08e0ee05
AM
5514 * bfd-in2.h: Regenerate.
5515 * libbfd.h: Regenerate.
5516 * po/SRC-POTFILES.in: Regenerate.
5517
5f333394
AM
5518 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
5519 space for bss .plt.
5520
caf47ea6
AM
55212002-05-31 Graeme Peterson <gp@qnx.com>
5522
5523 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
5524 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
5525 Run "make dep-am".
5526 * Makefile.in: Regenerate.
5527 * config.bfd: Add i[3456]86-*-nto-qnx* support.
5528 * configure.in: Add bfd_elf32_i386qnx_vec support.
5529 * configure: Regenerate.
5530 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
5531 is_contained_by_filepos, and copy_private_bfd_data_p.
5532 * elf.c (assign_file_positions_for_segments): Call backend
5533 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
5534 (IS_CONTAINED_BY_FILEPOS): Define.
5535 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
5536 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
5537 Fix non-K&R call to _bfd_error_handler.
5538 (_bfd_elf_copy_private_section_data): Use backend
5539 copy_private_bfd_data_p.
5540 * elf32-i386.c: Don't include elfxx-target.h when
5541 ELF32_I386_C_INCLUDED is defined.
5542 * elf32-i386qnx.c: New QNX elf backend file.
5543 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
5544 elf_backend_is_contained_by_filepos, and
5545 elf_backend_do_copy_private_bfd_data.
5546 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
5547
5bc56484
AM
55482002-05-31 Alan Modra <amodra@bigpond.net.au>
5549
5550 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
5551 Move other similar defines to start of file.
5552
1b164155
TR
55532002-05-30 Tom Rix <trix@redhat.com>
5554
5555 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
5556 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
5557
3765b1be
RH
55582002-05-30 Richard Henderson <rth@redhat.com>
5559
5560 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
5561 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
5562 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
5563 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
5564 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
5565 (struct alpha_elf_obj_tdata): Rename total_got_entries and
5566 n_local_got_entries to total_got_size and local_got_size.
5567 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
5568 (alpha_got_entry_size): New.
5569 (elf64_alpha_relax_with_lituse): Use it.
5570 (elf64_alpha_relax_without_lituse): Likewise.
5571 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
5572 (get_got_entry): New.
5573 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
5574 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
5575 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
5576 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
5577 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
5578 (elf64_alpha_calc_got_offsets): Likewise.
5579 (alpha_dynamic_entries_for_reloc): New.
5580 (elf64_alpha_calc_dynrel_sizes): Use it.
5581 (elf64_alpha_size_dynamic_sections): Likewise.
5582 (elf64_alpha_relocate_section): Handle TLS relocations.
5583 * reloc.c: Add Alpha TLS relocations.
5584 * bfd-in2.h, libbfd.h: Rebuild.
5585
5e226794
NC
55862002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5587
5588 * peXXigen.c (pe_print_idata): Remove double printed
5589 import table lines; add Bound-To comment.
5590
90ace9e9
JT
55912002-05-29 Matt Thomas <matt@3am-software.com>
5592
5593 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
5594 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
5595 (elf32-vax.lo): New rule.
5596 * Makefile.in: Regenerate.
5597 * configure.in (bfd_elf32_vax_vec)
5598 (vaxnetbsd_vec): New vectors.
5599 * configure: Regenerate.
5600 * config.bfd (vax-*-netbsdelf*)
5601 (vax-*-netbsdaout*)
5602 (vax-*-netbsd*): New targets.
5603 * elf32-vax.c: New file.
5604 * reloc.c: Add VAX relocations.
5605 * bfd-in2.h: Regenerate.
5606 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
5607
4a253e81
JT
56082002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
5609
5610 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
5611 and bfd_elf32_bigarm_vec to targ_selvecs.
5612
6e7c73dd
CF
56132002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5614
5615 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
5616 with auto-imported symbols.
5617
8afb0e02
NC
56182002-05-29 Adam Nemet <anemet@lnxw.com>
5619
5620 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
5621 sections only record bfd.
9bab7074 5622 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 5623 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 5624 * bfd-in2.h: Regenerate.
8afb0e02 5625
a95653f5
NC
56262002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
5627
5628 * syms.c (_bfd_stab_section_find_nearest_line): Move
5629 declaration and initialisation of saw_line and saw_func out of
5630 for loop.
5631
7cdc5bba
AM
56322002-05-29 Alan Modra <amodra@bigpond.net.au>
5633
5634 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
5635 (bfd_elf64_get_symbol_info): Define.
5636 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
5637
4c7aad1c
AM
56382002-05-29 Andrey Volkov <avolkov@transas.com>
5639
5640 * cpu-h8300.c: Make default h8300 machine first in machine list.
5641
d172d4ba
NC
56422002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
5643
5644 * config.bfd: Added DLX configuraton.
5645 * Makefile.am: Added DLX configuraton.
5646 * configure.in: Added DLX configuraton.
5647 * archures.c: Add DLX architecure.
5648 * reloc.c: Add DLX relocs.
5649 * targets.c: Added DLX target vector.
5650 * configure: Regenerate.
5651 * Makefile.in: Regenreate.
5652 * bfd-in2.h: Regenreate.
5653 * elf32-dlx.c: New file: Support DLX target.
5654 * cpu-dlx.c: New file: Support DLX target.
5655
d1329ca3
AM
56562002-05-25 Alan Modra <amodra@bigpond.net.au>
5657
428d0de3
AM
5658 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
5659
d1329ca3
AM
5660 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
5661 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
5662 strings to point inside function code sym string.
5663 (func_desc_adjust): Likewise.
5664 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
5665
3bab7989
ML
56662002-05-24 Michal Ludvig <mludvig@suse.cz>
5667
5668 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
5669 (elf64_x86_64_grok_psinfo): Added.
5670
436e8db0
NC
56712002-05-24 TAMURA Kent <kent@netbsd.org>
5672
5673 * config.bfd: Add a target for i386-netbsdpe.
5674
ea1e4b0d
AM
56752002-05-24 Alan Modra <amodra@bigpond.net.au>
5676
5677 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
5678 and is_func_descriptor.
5679 (func_desc_adjust): Hide function code sym in shared libs unless
5680 there is a matching exported function descriptor sym.
5681
13ae64f3
JJ
56822002-05-23 Jakub Jelinek <jakub@redhat.com>
5683
5684 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
5685 for symbols from SHF_TLS section.
5686 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
5687 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
5688 (map_sections_to_segments): Build PT_TLS segment if necessary.
5689 (assign_file_positions_for_segments): Likewise.
5690 (get_program_header_size): Account for PT_TLS segment.
5691 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
5692 SEC_THREAD_LOCAL sections to STT_TLS.
5693 * reloc.c: Add 386 and IA-64 TLS relocs.
5694 * section.c (SEC_THREAD_LOCAL): Define.
5695 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
5696 Remove.
5697 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
5698 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
5699 unconditionally.
5700 (struct elf_final_link_info): Add first_tls_sec.
5701 (elf_bfd_final_link): Set first_tls_sec.
5702 Compute elf_hash_table (info)->tls_segment.
5703 (elf_link_output_extsym): Handle STT_TLS symbols.
5704 (elf_link_input_bfd): Likewise.
5705 * syms.c (BSF_THREAD_LOCAL): Define.
5706 * bfd-in2.h: Rebuilt.
5707 * libbfd.h: Rebuilt.
5708 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
5709 elf_i386_mkobject, elf_i386_object_p): New functions.
5710 (elf_howto_table): Add TLS relocs.
5711 (elf_i386_reloc_type_lookup): Support TLS relocs.
5712 (elf_i386_info_to_howto_rel): Likewise.
5713 (struct elf_i386_link_hash_entry): Add tls_type.
5714 (struct elf_i386_obj_tdata): New.
5715 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
5716 New macros.
5717 (struct elf_i386_link_hash_table): Add tls_ldm_got.
5718 (link_hash_newfunc): Clear tls_type.
5719 (elf_i386_check_relocs): Support TLS relocs.
5720 (elf_i386_gc_sweep_hook): Likewise.
5721 (allocate_dynrelocs): Likewise.
5722 (elf_i386_size_dynamic_sections): Likewise.
5723 (elf_i386_relocate_section): Likewise.
5724 (elf_i386_finish_dynamic_symbol): Likewise.
5725 (bfd_elf32_mkobject, elf_backend_object_p): Define.
5726 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
5727 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
5728 want_tprel, want_dtpmod, want_dtprel.
5729 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
5730 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
5731 R_IA64_LTOFF_TPREL22.
5732 (elf_code_to_howto_index): Add TLS relocs.
5733 (elfNN_ia64_check_relocs): Support TLS relocs.
5734 (allocate_global_data_got): Account for TLS .got data.
5735 (allocate_dynrel_entries): Account for TLS dynamic relocations.
5736 (elfNN_ia64_install_value): Supprt TLS relocs.
5737 (set_got_entry): Support TLS relocs.
5738 (elfNN_ia64_relocate_section): Likewise.
5739
c62e1cc3
NC
57402002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
5741
5742 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
5743 BLX reloc round the relocation up rather than down.
5744 * coff-arm.c (coff_arm_relocate_section): Likewise.
5745
c5a43a5d
L
57462002-05-21 H.J. Lu (hjl@gnu.org)
5747
5748 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
5749 definition.
5750
afbe61cf
AM
57512002-05-22 Alan Modra <amodra@bigpond.net.au>
5752
5753 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
5754 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
5755
9c07fe7c
AM
57562002-05-22 Alan Modra <amodra@bigpond.net.au>
5757
5758 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
5759 unresolved relocs.
5760 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
5761
21611032
TS
57622002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5763
c5cd6d62 5764 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
5765 non-ELF targets.
5766
41241523
TS
57672002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5768
5769 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
5770 an error value.
5771 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
5772 return with false on error.
5773 (elf_link_input_bfd): Check reloc_emitter return value.
5774
658f2588
JT
57752002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
5776
5777 * config.bfd (armeb-*-netbsdelf*): New target.
5778
c862ae31
AM
57792002-05-20 Alan Modra <amodra@bigpond.net.au>
5780
5781 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
5782 at the plt call stub.
5783
6dd14845
TS
57842002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5785
5786 * cpu-mips.c (mips_compatible): Don't try to check machine
5787 compatibility.
5788
a58d9c34
TR
57892002-05-18 Tom Rix <trix@redhat.com>
5790
5791 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
5792
ef60b7ff
AM
57932002-05-17 Alan Modra <amodra@bigpond.net.au>
5794
5795 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
5796 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
5797 we've already warned about an undefined symbol. Report more
5798 detail on reloc errors.
5799
a703a6ea
AM
58002002-05-17 Alan Modra <amodra@bigpond.net.au>
5801
5802 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
5803 * configure.in: Invoke AM_INSTALL_LIBBFD.
5804 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
5805 (install_libbfd): .. New target.
5806 (uninstall_libbfd): Likewise.
5807 (install-bfdlibLTLIBRARIES): Likewise.
5808 (uninstall-bfdlibLTLIBRARIES): Likewise.
5809 (bfdlibdir): New.
5810 (bfdincludedir): New.
5811 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
5812 * aclocal.m4: Regenerate.
5813 * configure: Regenerate.
5814 * Makefile.in: Regenerate.
5815
2c13d98b
NC
58162002-05-17 Stuart Balfour <sbalfour@cisco.com>
5817
5818 * hash.c (bfd_hash_lookup): Remove computation of len from inside
5819 hash loop.
5820
629936c5
NC
58212002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
5822
5823 * config.bfd: Add targets for sh64-linux (little endian and
5824 big endian).
5825
e4cf60a8
NC
58262002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
5827
5828 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
5829 is located in the same section as the import table. Instead
5830 check, and if necessary load the section containing the thunk.
5831
d1e66cd4
NC
58322002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
5833
5834 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
5835 bfd_bread.
5836 (xcoff64_core_file_matches_executable_p): Replace bfd_read
5837 with bfd_bread.
d1e66cd4 5838
2d653fc7
AM
58392002-05-15 Alan Modra <amodra@bigpond.net.au>
5840
5841 * aix5ppc-core.c: Warning fixes.
5842 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
5843 * aout-target.h (MY_bfd_link_just_syms): Define.
5844 * aout-tic30.c (MY_bfd_link_just_syms): Define.
5845 * bfd.c (bfd_link_just_syms): Define.
5846 * binary.c (binary_bfd_link_just_syms): Define.
5847 * bout.c (b_out_bfd_link_just_syms): Define.
5848 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
5849 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5850 * coffcode.h (coff_bfd_link_just_syms): Define.
5851 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
5852 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
5853 (_bfd_elf_link_just_syms): Declare.
5854 * elf.c (_bfd_elf_link_just_syms): New function.
5855 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
5856 sections haven't already been discarded by the linker.
5857 * elflink.h (elf_link_add_object_symbols): Likewise for stab
5858 sections and SEC_MERGE sections.
5859 (elf_bfd_discard_info): Similarly here.
5860 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
5861 * i386msdos.c (msdos_bfd_link_just_syms): Define.
5862 * i386os9k.c (os9k_bfd_link_just_syms): Define.
5863 * ieee.c (ieee_bfd_link_just_syms): Define.
5864 * ihex.c (ihex_bfd_link_just_syms): Define.
5865 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
5866 (_bfd_generic_link_just_syms): Declare.
5867 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
5868 * linker.c (_bfd_generic_link_just_syms): New function.
5869 * mmo.c (mmo_bfd_link_just_syms): Define.
5870 * nlm-target.h (nlm_bfd_link_just_syms): Define.
5871 * oasys.c (oasys_bfd_link_just_syms): Define.
5872 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
5873 * som.c (som_bfd_link_just_syms): Define.
5874 * srec.c (srec_bfd_link_just_syms): Define.
5875 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
5876 (BFD_JUMP_TABLE_LINK): And here.
5877 * tekhex.c (tekhex_bfd_link_just_syms): Define.
5878 * versados.c (versados_bfd_link_just_syms): Define.
5879 * vms.c (vms_bfd_link_just_syms): Define.
5880 * libbfd.h: Regenerate.
5881 * bfd-in2.h: Regenerate.
5882
cb7394f2
TS
58832002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5884
5885 * elf32-mips.c: Remove superfluous definitions copied from
5886 elfxx-mips.c.
5887 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
5888 SGIish vectors to check the special case.
5889 (mips_elf_hi16_reloc): Fix comment.
5890 (mips_elf_got16_reloc): Likewise.
5891 (_bfd_mips_elf32_gprel16_reloc): Likewise.
5892 (elf_reloc_map): Code cleanup.
5893 (mips_reloc_map): Add comment.
5894 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
5895 (mips_elf32_rtype_to_howto): Likewise.
5896 (mips_elf32_discard_info): Likewise.
5897 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
5898 lead to IRIX compatibility now.
5899
8dc1a139
TS
59002002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5901
5902 * elfxx-mips.c: Call it IRIX, not Irix in comments.
5903
2051e1b5
JT
59042002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
5905
5906 * config.bfd (shle-*-netbsdelf*): Add target which includes
5907 sh64 support.
5908
83954261
AM
59092002-05-13 David Edelsohn <edelsohn@gnu.org>
5910
5911 * configure.in: Revert 2002-04-07. Instead, auto-configure
5912 HAVE_ST_C_IMPL.
5913 * configure: Regenerate.
5914 * config.in: Regenerate.
5915 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
5916 or AIX_5_CORE.
5917
a9bf1154
NC
59182002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5919
5920 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
5921 corefiles as well.2
5922 * configure: Regenerate.
5923
3129eb7a
AM
59242002-05-13 Alan Modra <amodra@bigpond.net.au>
5925
5926 * Makefile.am (install-data-local): Install headers to
5927 $(exec_prefix)/include.
5928 * Makefile.in: Regenerate.
5929
a9a32010
DJ
59302002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5931 Daniel Jacobowitz <drow@mvista.com>
5932
5933 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
5934 map BFD_RELOC_RVA.
5935
59362002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
5937
5938 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
5939 hppa*-*-openbsd*): New targets.
5940 * configure.in (alpha*-*-openbsd*): Set COREFILE.
5941 * configure: Regenerate.
5942
f1f0d9ab
TR
59432002-05-10 Tom Rix <trix@redhat.com>
5944
ea1e4b0d 5945 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
5946 xcoff64_ppc_relocate_section.
5947 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
5948 * libxcoff.h: Common xcoff_reloc_type function declaration.
5949
c432ba1a
AM
59502002-05-10 Alan Modra <amodra@bigpond.net.au>
5951
16a10388 5952 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 5953 added in 2002-05-09 commit.
16a10388 5954
c432ba1a
AM
5955 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
5956 don't look for stubs on all undefined syms.
5957
4a335f3d
AM
59582002-05-09 Alan Modra <amodra@bigpond.net.au>
5959
8fc39d5d
AM
5960 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
5961 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
5962 pcrel_offset.
5963
4a335f3d
AM
5964 * elf32-i386.c (elf_howto_table): Comments.
5965 (elf_i386_relocate_section): Handle more relocs for relocatable
5966 linking and against SEC_MERGE sections.
5967
41fcb14e
AM
59682002-05-08 Alan Modra <amodra@bigpond.net.au>
5969
5970 * elf32-ppc.c (ppc_elf_create_got): New function.
5971 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 5972 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
5973 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
5974 _bfd_elf_create_got_section.
5975
b491616a
AM
59762002-05-07 Alan Modra <amodra@bigpond.net.au>
5977
5978 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
5979 * elfxx-target.h (elf_backend_rela_normal): Define.
5980 (elfNN_bed): Init rela_normal.
5981 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
5982 for section symbols here if rela_normal. Simplify abs section test.
5983 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
5984 return immediately. Remove code handling relocatable linking.
5985 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5986 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5987 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5988 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5989 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5990 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5991 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5992 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5993 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5994 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5995 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5996 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5997 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5998 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5999 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
6000 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6001 * elf-m10200.c (elf_backend_rela_normal): Define.
6002 * elf-m10300.c (elf_backend_rela_normal): Define.
6003 * elf32-fr30.c (elf_backend_rela_normal): Define.
6004 * elf32-i370.c (elf_backend_rela_normal): Define.
6005 * elf32-i860.c (elf_backend_rela_normal): Define.
6006 * elf32-m68k.c (elf_backend_rela_normal): Define.
6007 * elf32-mcore.c (elf_backend_rela_normal): Define.
6008 * elf32-openrisc.c (elf_backend_rela_normal): Define.
6009 * elf32-ppc.c (elf_backend_rela_normal): Define.
6010 * elf32-s390.c (elf_backend_rela_normal): Define.
6011 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
6012 * elf64-ppc.c (elf_backend_rela_normal): Define.
6013 * elf64-s390.c (elf_backend_rela_normal): Define.
6014 * elf64-x86-64.c (elf_backend_rela_normal): Define.
6015 * elfxx-ia64.c (elf_backend_rela_normal): Define.
6016 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
6017 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
6018
df212a7e
NC
60192002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
6020
6021 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
6022 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
6023
3decf53c
AM
60242002-05-06 Alan Modra <amodra@bigpond.net.au>
6025
6026 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
6027 when not relocatable. Fix reloc_emitter call for K&R.
6028
f46c2da6
AM
60292002-05-04 Alan Modra <amodra@bigpond.net.au>
6030
6031 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
6032 reloading local sym addend mistakenly removed in 2002-05-01 change.
6033
6034 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
6035 (read_abbrevs): Change "offset" param to bfd_vma.
6036 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
6037 Change "abbrev_offset" to bfd_vma.
6038 (read_indirect_string): Use correct conversion chars in error
6039 message format string, cast bfd_vma's to unsigned long.
6040 (read_abbrevs): Likewise.
6041 (read_attribute_value): Likewise.
6042 (decode_line_info): Likewise.
6043 (scan_unit_for_functions): Likewise.
6044 (parse_comp_unit): Likewise.
6045
59862849
TR
60462002-05-04 Tom Rix <trix@redhat.com>
6047
6048 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
6049 (coff_swap_reloc_out): Same.
6050 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
6051 (xcoff_swap_reloc_out): Same.
6052 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
6053 case some 16 bit relocs. Add reloc value to output.
6054 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 6055 R_RBR. Improve names.
59862849
TR
6056 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
6057 (bfd_xcoff_backend_data): Update with new reloc swap names.
6058 (bfd_pmac_xcoff_backend_data) : Same.
6059 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
6060 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 6061 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 6062 R_POS. Add reloc value to output.
ea1e4b0d
AM
6063 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
6064 bit R_RBR. Improve names, masks.
59862849
TR
6065 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
6066 (bfd_xcoff_backend_data): Update with new reloc swap names.
6067 (bfd_xcoff_aix5_backend_data) : Same.
6068
b4655ea9
AM
60692002-05-04 Alan Modra <amodra@bigpond.net.au>
6070
6071 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
6072 bfd_count top_index, input_list, all_local_syms.
6073 (elf32_hppa_setup_section_lists): New function, split from
6074 elf32_hppa_size_stubs.
6075 (elf32_hppa_next_input_section): Likewise.
6076 (group_sections): Likewise.
6077 (get_local_syms): Likewise.
6078 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
6079 stubs on undefined syms too.
6080 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 6081 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
6082 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
6083 (elf32_hppa_next_input_section): Declare.
6084
301e3139
AM
60852002-05-04 Bob Byrnes <byrnes@curl.com>
6086
6087 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
6088 _bfd_new_bfd.
6089
7c5fcef7
L
60902002-05-03 H.J. Lu (hjl@gnu.org)
6091
6092 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
6093 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
6094 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
6095 to hide a global symbol.
6096 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 6097 forced_local to true.
7c5fcef7 6098
84de6048
RH
60992002-05-02 Richard Henderson <rth@redhat.com>
6100
6101 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
6102 vs SHN_UNDEF to zero.
6103
805fc799
AM
61042002-05-02 Alan Modra <amodra@bigpond.net.au>
6105
c061c2d8
AM
6106 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
6107 16 bit reloc.
6108 <R_PPC64_SECTOFF_DS>: Likewise.
6109 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6110 SECTOFF reloc.
6111 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
6112 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6113 SECTOFF reloc.
6114
805fc799
AM
6115 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
6116 (ppc64_elf_ha_reloc): New function.
6117 (ppc64_elf_brtaken_reloc): New function.
6118 (ppc64_elf_sectoff_reloc): New function.
6119 (ppc64_elf_sectoff_ha_reloc): New function.
6120 (ppc64_elf_toc_reloc): New function.
6121 (ppc64_elf_toc_ha_reloc): New function.
6122 (ppc64_elf_toc64_reloc): New function.
6123 (ppc64_elf_unhandled_reloc): New function.
6124 (ppc64_elf_howto_raw): Use the above.
6125 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
6126 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
6127 <R_PPC64_SECTOFF_DS>: Likewise.
6128 (IS_ABSOLUTE_RELOC): Update.
6129 (struct ppc_link_hash_table): Add have_undefweak.
6130 (ppc64_elf_link_hash_table_create): Init.
6131 (func_desc_adjust): Set have_undefweak.
6132 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
6133 add the .sfpr blr when have_undefweak.
6134 (ppc64_elf_setup_section_lists): Check hash table flavour.
6135 (ppc64_elf_next_input_section): Move output_section->owner test to
6136 ppc64elf.em.
6137 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
6138 and relocatable test. Return TOCstart and don't set elf_gp.
6139 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
6140 offset calculation. Add assert on weak sym branch tweaks.
6141 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
6142 (ppc64_elf_toc): Declare.
6143 (ppc64_elf_next_input_section): Update.
ea1e4b0d 6144
818c39a3
AM
61452002-05-01 Alan Modra <amodra@bigpond.net.au>
6146
6147 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
6148 file_name.
6149
721956f4
AM
61502002-05-01 Alan Modra <amodra@bigpond.net.au>
6151
6152 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
6153 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
6154 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
6155 call branches. Correct undefined weak destination.
6156 (ppc64_elf_func_desc_adjust): Always create at least one blr in
6157 .sfpr, and correct case where either only savef* or restf* is
6158 needed.
6159
6160 Long branch stubs, multiple stub sections.
6161 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
6162 (ppc64_elf_next_input_section): Declare.
6163 * elf64-ppc.c: Move linker-only prototypes.
6164 (STUB_SUFFIX): Define.
6165 (enum ppc_stub_type): New.
6166 (struct ppc_stub_hash_entry): New.
6167 (struct ppc_branch_hash_entry): New.
6168 (struct ppc_link_hash_entry): Add stub_cache, oh.
6169 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
6170 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
6171 Rename plt_overflow to stub_error.
6172 (ppc_stub_hash_lookup): Define.
6173 (ppc_branch_hash_lookup): Define.
6174 (stub_hash_newfunc): New function.
6175 (branch_hash_newfunc): New function.
6176 (link_hash_newfunc): Init new fields.
6177 (ppc64_elf_link_hash_table_create): Likewise.
6178 (ppc64_elf_link_hash_table_free): New function.
6179 (ppc_stub_name): New function.
6180 (ppc_get_stub_entry): New function.
6181 (ppc_add_stub): New function.
6182 (create_linkage_sections): Use bfd_make_section_anyway. Create
6183 .branch_lt and .rela.branch_lt sections. Don't create .stub.
6184 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
6185 and set up for plt call stubs. Link func and func desc syms.
6186 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
6187 (func_desc_adjust): Avoid hash lookup when func desc sym available
6188 via shortcut, and set links when processing.
6189 (ppc64_elf_hide_symbol): Likewise.
6190 (allocate_dynrelocs): Don't allocate stub section here.
6191 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
6192 Remove sstub code.
6193 (ppc_type_of_stub): New function.
6194 (build_one_stub): Delete.
6195 (ppc_build_one_stub): New function.
6196 (ppc_size_one_stub): New function.
6197 (ppc64_elf_setup_section_lists): New function.
6198 (ppc64_elf_next_input_section): New function.
6199 (group_sections): New function.
6200 (get_local_syms): New function.
6201 (ppc64_elf_size_stubs): Rewrite.
6202 (ppc64_elf_build_stubs): Rewrite.
6203 (ppc64_elf_relocate_section): Look up stub entry for REL24
6204 relocs. Don't propagate REL14* to dynamic objects. Look for long
6205 branch stubs if REL14* or REL24 relocs won't reach.
6206 (bfd_elf64_bfd_link_hash_table_free): Define.
6207
09c2219b
MM
62082002-04-30 Mark Mitchell <mark@codesourcery.com>
6209
c5cd6d62 6210 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 6211
07b678c0
TR
62122002-04-30 Tom Rix <trix@redhat.com>
6213
6214 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
6215 symbol names into the hash table.
6216
dbe341c6
TR
62172002-04-28 Tom Rix <trix@redhat.com>
6218
6219 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 6220 calulating relocations.
dbe341c6 6221 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
6222 (xcoff_ppc_relocate_section): Use relocation and complain function
6223 tables.
6224 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
6225 (xcoff_complain_overflow_signed_func): Same.
6226 (xcoff_complain_overflow_bitfield_func): Same.
6227 (xcoff_complain_overflow_dont_func): Same.
6228 (xcoff_reloc_type_crel): New recot function.
6229 (xcoff_reloc_type_br): Same.
6230 (xcoff_reloc_type_ba): Same.
6231 (xcoff_reloc_type_toc): Same.
6232 (xcoff_reloc_type_rel): Same.
6233 (xcoff_reloc_type_neg): Same.
6234 (xcoff_reloc_type_pos): Same.
6235 (xcoff_reloc_type_fail): Same.
6236 (xcoff_reloc_type_noop): Same.
6237 * libxcoff.h : Declare common parts for xcoff64.
6238 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 6239 and complain function tables.
dbe341c6 6240
985142a4
AM
62412002-04-28 Alan Modra <amodra@bigpond.net.au>
6242
6243 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
6244 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
6245
eba91044
AM
62462002-04-26 Alan Modra <amodra@bigpond.net.au>
6247
e54fdaa5
AM
6248 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
6249 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
6250
a50c1845
AM
6251 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
6252 same as the output before calling elf_link_input_bfd.
6253
eba91044
AM
6254 * coffcode.h (coff_compute_section_file_positions): Set
6255 section_tail after shuffling section list.
6256
3c25c5f6
NC
62572002-04-24 Christian Groessler <chris@groessler.org>
6258
6259 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
6260 addresses are 23bit with a special layout, not plain 32bit
6261 values. Prevent relocation of immediate values.
6262
40d32fc6
CD
62632002-04-24 Chris G. Demetriou <cgd@broadcom.com>
6264
6265 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
6266 MIPS-16 ASE flags are set, print something to indicate that.
6267
067fa4a6
AM
62682002-04-23 Alan Modra <amodra@bigpond.net.au>
6269
6270 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
6271 under which a plt call stub is used.
6272 (final_link_relocate): Similarly.
6273 (allocate_plt_static): Clear h-plabel except when plt entry is
6274 exclusively used for a plabel.
6275 (allocate_dynrelocs): Use the above to simplify plt sizing.
6276 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
6277 (elf32_hppa_link_hash_table_create): Init.
6278 (BL22_RP): Define.
6279 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
6280 (elf32_hppa_check_relocs): Set has_22bit_branch.
6281
6282 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
6283 (final_link_relocate): Likewise.
6284
af40ce3c
JJ
62852002-04-22 Jakub Jelinek <jakub@redhat.com>
6286
6287 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
6288 search table if some FDE is DW_EH_PE_aligned encoded either.
6289 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
6290
09ae86c2
JJ
62912002-04-22 Richard Smith <richard@ex-parrot.com>
6292 Jakub Jelinek <jakub@redhat.com>
6293
6294 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
6295 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
6296 encoded personality.
6297 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
6298 for CIE/FDE removal.
6299
deeb2cd7
TR
63002002-04-20 Tom Rix <trix@redhat.com>
6301
6302 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
6303
99dc0092
AM
63042002-04-20 Alan Modra <amodra@bigpond.net.au>
6305
aa3d5824
AM
6306 * archures.c (bfd_lookup_arch): Move the list order comment..
6307 (struct bfd_arch_info): ..to where it belongs.
6308 * bfd-in2.h: Regenerate.
6309
99dc0092
AM
6310 * archures.c (bfd_lookup_arch): Add comment on list order.
6311 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
6312 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
6313 is always at head of list.
6314
7831a775
NC
63152002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
6316
6317 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
6318 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
6319 definition of these functions for ARM_WINCE builds as they are
6320 not used.
ea1e4b0d 6321 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
6322 for ARM_WINCE builds.
6323
63242002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
6325
ea1e4b0d 6326 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
6327
63282002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
6329
6330 * cpu-sh.c (scan_mach): Delete.
6331 (arch_info_struct): Replace scan_mach with bfd_default_scan.
6332 (bfd_sh_arch): Likewise.
6333
3d8dbe36
NC
63342002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
6335
6336 * ihex.c (ihex_write_object_contents): Fix check for records
6337 crossing 64K boundaries.
6338
4ab82700
AM
63392002-04-16 Alan Modra <amodra@bigpond.net.au>
6340
6341 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
6342 type rather than just assuming entries are ELF.
6343 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6344 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6345 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
6346 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
6347 rather than elf_link_hash_entry.
6348
036fe0fe
RH
63492002-04-15 Richard Henderson <rth@redhat.com>
6350
6351 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
6352 n32 binaries.
6353
c4f3d130
NC
63542002-04-15 Michael Snyder <msnyder@redhat.com>
6355
6356 * opncls.c (bfd_close): Write contents if writeable.
6357 Minor formatting tidy-ups.
6358
4ab82700 63592002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
6360
6361 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
6362
0c04d169
MS
63632002-04-12 Michael Snyder <msnyder@redhat.com>
6364
6365 * bfd-in.h (bfd_get_section_lma): New access macro.
6366 Minor white-space fix-up.
6367
89d4966f
AM
63682002-04-12 Alan Modra <amodra@bigpond.net.au>
6369
6370 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
6371 header pad.
6372
8d0da3c2
DD
63732002-04-09 DJ Delorie <dj@redhat.com>
6374
6375 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
6376
05793179
NC
63772002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
6378
6379 * coffcode.h (coff_read_word): New.
6380 (coff_compute_checksum): New.
6381 (coff_apply_checksum): New.
6382 (coff_write_object_contents): Call coff_apply_checksum () to
6383 apply checksum to PE image.
6384
46fe4e66
AM
63852002-04-08 Randolph Chung <tausq@debian.org>
6386
6387 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
6388 (elf32_hppa_final_link): Split out sorting logic to..
6389 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
6390 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
6391
3b5b409c
AC
63922002-04-07 Andrew Cagney <ac131313@redhat.com>
6393
6394 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
6395 pattern.
6396 * configure: Re-generate.
6397
ac7b6ceb
AC
63982002-04-07 Andrew Cagney <ac131313@redhat.com>
6399
6400 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
6401 is greater or equal to 4.3.3.
6402 * configure: Regenerate.
6403 Fix PR gdb/344.
6404
44aa49bb
HPN
64052002-04-05 Hans-Peter Nilsson <hp@axis.com>
6406
6407 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
6408 R_CRIS_32_PCREL>: Fix typo in name.
6409 (cris_elf_check_relocs): Always create .rela.got here when
6410 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
6411 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
6412 assume it's created.
6413
e2d34d7d
DJ
64142002-04-04 Daniel Jacobowitz <drow@mvista.com>
6415
6416 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
6417 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
6418 define.
6419 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
6420 * bfd.c (bfd_link_hash_table_free): Define.
6421 * binary.c (binary_bfd_link_hash_table_free): Define.
6422 * bout.c (b_out_bfd_link_hash_table_free): Define.
6423 * coff-rs6000.c (rs6000coff_vec): Include
6424 _bfd_generic_link_hash_table_free.
6425 (pmac_xcoff_vec): Likewise.
6426 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6427 (aix5coff64_vec): Likewise.
6428 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
6429 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
6430 (bfd_elf32_bfd_link_hash_table_free): Define.
6431 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
6432 (bfd_elf32_bfd_link_hash_table_free): Define.
6433 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
6434 define.
6435 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
6436 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
6437 * ieee.c (ieee_bfd_link_hash_table_free): Define.
6438 * ihex.c (ihex_bfd_link_hash_table_free): Define.
6439 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
6440 (_bfd_generic_link_hash_table_free): Add prototype.
6441 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
6442 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
6443 * linker.c (_bfd_generic_link_hash_table_free): New function.
6444 * mmo.c (mmo_bfd_link_hash_table_free): Define.
6445 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
6446 * oasys.c (oasys_bfd_link_hash_table_free): Define.
6447 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
6448 * som.c (som_bfd_link_hash_table_free): Define.
6449 * srec.c (srec_bfd_link_hash_table_free): Define.
6450 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
6451 * versados.c (versados_bfd_link_hash_table_free): Define.
6452 * vms.c (vms_bfd_link_hash_table_free): New function.
6453 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
6454
6455 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
6456 instead of bfd_alloc.
6457 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
6458 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
6459 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
6460 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
6461 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
6462 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
6463 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
6464 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
6465 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
6466 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
6467 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
6468 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
6469 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
6470 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
6471 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
6472 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
6473 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
6474 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
6475 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
6476 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
6477 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
6478 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
6479 * m68klinux.c (linux_link_hash_table_create): Likewise.
6480 * sparclinux.c (linux_link_hash_table_create): Likewise.
6481 * sunos.c (sunos_link_hash_table_create): Likewise.
6482 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
6483
6484 * targets.c: Add _bfd_link_hash_table_free to xvec.
6485
6486 * bfd-in2.h: Regenerate.
6487 * libbfd.h: Regenerate.
6488 * libcoff.h: Regenerate.
6489
830629ab
AM
64902002-04-04 Alan Modra <amodra@bigpond.net.au>
6491
6492 * dep-in.sed: Cope with absolute paths.
6493 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
6494 Run "make dep-am".
6495 * Makefile.in: Regenerate.
6496 * coff-arm.c: Fix copyright date.
6497 * cpu-h8300.c: Likewise.
6498 * cpu-i370.c: Likewise.
6499 * cpu-s390.c: Likewise.
6500 * cpu-mips.c: Likewise.
6501 * po/SRC-POTFILES.in: Regenerate.
6502
c6e90b02
TS
65032002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6504
6505 * Makefile.am: Add elfxx-mips.c to the known backends.
6506 (elf32-mips.lo): remove dependency to coff/external.h.
6507 * Makefile.in: Regenerate.
6508 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
6509 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
6510 accordingly.
6511 * configure: Regenerate.
6512 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
6513 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
6514 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
6515 MIPS specific backend functions.
6516 * elf32-mips.c: Moved most code to elfxx-mips.c.
6517 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
6518 static.
6519 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
6520 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
6521 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
6522 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
6523 interface to allow selection of the right REL or RELA howto table.
6524 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
6525 static. Let it refuse n32 objects.
6526 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
6527 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
6528 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
6529 (elf32_mips_ignore_discarded_relocs): Rename from
6530 _bfd_elf32_mips_ignore_discarded_relocs.
6531 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
6532 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
6533 (elf_mips_howto_table_rela): Remove.
6534 * elf64-mips.c: Moved most code to elfxx-mips.c.
6535 (bfd_elf64_bfd_reloc_type_lookup): Make static.
6536 (mips_elf64_rtype_to_howto): New function.
6537 (mips_elf64_object_p): Likewise.
6538 (elf64_mips_irix_compat): Likewise.
6539 * elfxx-mips.c: New file containing common code merged together from
6540 elf32-mips.c and elf64-mips.c.
6541 * elfxx-mips.h: New file containing MIPS specific prototypes from
6542 elf-bfd.h.
6543 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
6544 elf_backend_mips_rtype_to_howto.
6545
d8dce692
AM
65462002-04-04 Alan Modra <amodra@bigpond.net.au>
6547
6548 * srec.c (MAXCHUNK, Chunk): Revise comments.
6549 (srec_write_record): Correct buffer size.
6550 (srec_write_header): Do without intermediate buffer.
6551 (srec_write_section): Validate Chunk.
6552 (srec_write_terminator): Pass NULL instead of dummy buffer.
6553 (srec_write_symbols): Pass file and symbol names directly to
6554 bfd_bwrite so sprintf won't overflow buffer.
6555
b88a866a
JJ
65562002-04-03 Jakub Jelinek <jakub@redhat.com>
6557
6558 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
6559 PC relative relocs against hidden symbols.
6560 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6561
d7866f04
AM
65622002-04-03 Alan Modra <amodra@bigpond.net.au>
6563
6564 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
6565 LMAs, loop over segments until p_vaddr and p_memsz specify an
6566 extent enclosing the section.
6567
9e81ee67
NC
65682002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
6569
6570 * ihex.c (ihex_write_object_contents): Do not allow records to
6571 cross a 64K boundary - wrap if necessary.
6572
d2b64500
JT
65732002-04-01 Nathan Williams <nathanw@wasabisystems.com>
6574
6575 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
6576 which caused the returned LWP ID to always be 0.
6577
e36f7d53
RH
65782002-04-01 Richard Henderson <rth@redhat.com>
6579
6580 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6581 (elf32_sparc_relocate_section): Use it to figure out when to
6582 initialize .got entries.
6583 * elf64-sparc.c: Similarly.
6584
e92d460e
AM
65852002-03-28 Alan Modra <amodra@bigpond.net.au>
6586
6587 * linker.c (link_action): Ignore duplicate warning syms.
6588 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
6589 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
6590 (elf_adjust_dynamic_symbol): Likewise.
6591 (elf_export_symbol): Likewise.
6592 (elf_link_find_version_dependencies): Likewise.
6593 (elf_link_assign_sym_version): Likewise.
6594 (elf_link_sec_merge_syms): Likewise.
6595 (elf_link_output_extsym): Likewise.
6596 (elf_gc_sweep_symbol): Likewise.
6597 (elf_gc_propagate_vtable_entries_used): Likewise.
6598 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6599 (elf_gc_allocate_got_offsets): Likewise.
6600 (elf_collect_hash_codes): Likewise.
6601 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
6602 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
6603 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6604 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
6605 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
6606 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
6607 (elf_cris_discard_excess_dso_dynamics): Likewise.
6608 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
6609 (mark_PIC_calls): Likewise.
6610 (allocate_plt_static): Likewise.
6611 (allocate_dynrelocs): Likewise.
6612 (readonly_dynrelocs): Likewise.
6613 * elf32-i386.c (allocate_dynrelocs): Likewise.
6614 (readonly_dynrelocs): Likewise.
6615 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
6616 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
6617 * elf32-mips.c (mips_elf_output_extsym): Likewise.
6618 (mips_elf_sort_hash_table_f): Likewise.
6619 (mips_elf_check_mips16_stubs): Likewise.
6620 * elf32-s390.c (allocate_dynrelocs): Likewise.
6621 (readonly_dynrelocs): Likewise.
6622 * elf32-sh.c (sh_elf_discard_copies): Likewise.
6623 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
6624 (xstormy16_relax_plt_realloc): Likewise.
6625 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6626 (elf64_alpha_output_extsym): Likewise.
6627 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
6628 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
6629 (mips_elf64_check_mips16_stubs): Likewise.
6630 (mips_elf64_output_extsym): Likewise.
6631 * elf64-ppc.c (func_desc_adjust): Likewise.
6632 (allocate_dynrelocs): Likewise.
6633 (readonly_dynrelocs): Likewise.
6634 * elf64-s390.c (allocate_dynrelocs): Likewise.
6635 (readonly_dynrelocs): Likewise.
6636 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
6637 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
6638 (readonly_dynrelocs): Likewise.
6639 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
6640 * aoutx.h (aout_link_write_other_symbol): Likewise.
6641 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
6642 (_bfd_coff_write_global_sym): Likewise.
6643 * i386linux.c (linux_tally_symbols): Likewise.
6644 * m68klinux.c (linux_tally_symbols): Likewise.
6645 * sparclinux.c (linux_tally_symbols): Likewise.
6646 * pdp11.c (aout_link_write_other_symbol): Likewise.
6647 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
6648 * xcofflink.c (xcoff_build_ldsyms): Likewise.
6649 (xcoff_write_global_symbol): Likewise.
6650
6651 * cofflink.c (_bfd_coff_final_link): Formatting.
6652 * cpu-mips.c (mips_compatible): Make static, prototype.
6653 * elf32-i386.c (elf_i386_check_relocs): Formatting.
6654 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
6655 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
6656 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
6657 (mips_elf64_final_link): Likewise.
6658 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
6659 prototype.
6660
2106126f
NC
66612002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
6662
6663 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
6664 (SWAP_OUT_RELOC_OFFSET): Define.
6665
b99d1833
AM
66662002-03-27 Gregory Steuck <greg@nest.cx>
6667
6668 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
6669 terminating NULL if empty symbol table.
6670 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
6671
ad43ed4c
L
66722002-03-26 H.J. Lu (hjl@gnu.org)
6673
6674 * elflink.h (elf_link_input_bfd): Revert the last change since
6675 the gcc exception handling isn't fixed yet.
6676
3851fca4
L
66772002-03-26 H.J. Lu (hjl@gnu.org)
6678
6679 * elflink.h (elf_link_input_bfd): Complain about relocations
6680 against local symbols in discarded sections.
6681
b91afed7
AM
66822002-03-26 Alan Modra <amodra@bigpond.net.au>
6683
6684 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
6685
dba143ef
AM
66862002-03-23 Alan Modra <amodra@bigpond.net.au>
6687
6688 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6689 section file offset for !SEC_LOAD sections.
6690
ee29b9fb
RE
66912002-03-21 Richard Earnshaw <rearnsha@arm.com>
6692
830629ab
AM
6693 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
6694 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 6695
54327882
AM
66962002-03-21 Alan Modra <amodra@bigpond.net.au>
6697
6698 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
6699 Whitespace changes.
6700 * archive.c: Update copyright date.
6701 * bfd-in2.h: Regenerate.
6702 * libbfd.h: Regenerate.
6703 * Makefile.am: Run "make dep-am"
6704 * Makefile.in: Regenerate.
6705 * po/SRC-POTFILES.in: Regenerate.
6706
1ee24f27
DJ
67072002-03-20 Daniel Jacobowitz <drow@mvista.com>
6708
6709 * dwarf2.c (struct funcinfo): Move up.
6710 (lookup_address_in_function_table): New argument function_ptr.
6711 Set it.
6712 (lookup_address_in_line_table): New argument function. If function
6713 is non-NULL, use it to handle ``addr'' before the first line note of
6714 the function.
6715 (comp_unit_find_nearest_line): Update and swap calls to
6716 lookup_address_in_function_table and lookup_address_in_line_table.
6717 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
6718 N_SLINE encountered if we see an N_FUN before any N_SLINE.
6719
51b9608c
TR
67202002-03-20 Tom Rix <trix@redhat.com>
6721
ea1e4b0d 6722 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 6723 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 6724 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 6725
789c90aa
TR
67262002-03-19 Tom Rix <trix@redhat.com>
6727
ea1e4b0d 6728 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
6729 dynamic objects in archives.
6730
1da54d81
HPN
67312002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
6732
6733 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
6734 STT_NOTYPE symbols to STT_OBJECT.
6735
7831a775 67362002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
6737
6738 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
6739
eb1e0e80
NC
67402002-03-18 Tom Rix <trix@redhat.com>
6741
6742 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
6743 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
6744 * coff-rs6000 (do_pad) : New function for archive padding.
6745 (do_copy) : New function for object file copying in archives.
6746 (do_shared_object_padding) : New function for padding shared
6747 objects to their text section alignment in archives.
6748 (bfd_xcoff_ar_achive_set_magic) : Stub.
6749 (xcoff_write_armap_big) : Use do_copy and do_pad.
6750 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
6751 do_copy and do_pad.
6752 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 6753 bfd_xcoff_magic_number.
eb1e0e80
NC
6754 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
6755 fop.
6756 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
6757 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
6758 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
6759 * rs6000-core.c : Update copyright date.
ea1e4b0d 6760 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
6761 csectpp.
6762 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
6763 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
6764 (coff_set_flags) : Use bfd_xcoff_magic_number.
6765 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
6766 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
6767 * Makefile.am : Same.
6768 * config.bfd : Same.
6769 * targets.c : Same.
6770 * configure : Regnerate.
6771 * Makefile.in : Same.
6772 * bfd-in2.h : Same.
6773
a1c259a1
NC
67742002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
6775
6776 * po/fr.po: Updated version.
6777
4dae1ae7
AM
67782002-03-18 Alan Modra <amodra@bigpond.net.au>
6779
6780 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
6781 * libbfd.h: Regenerate.
6782 * archive.c (coff_write_armap): Pass on failures from
6783 bfd_write_bigendian_4byte_int.
6784
36b4f6e7
L
67852002-03-14 H.J. Lu <hjl@gnu.org>
6786
6787 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
6788 error to bfd_error_nonrepresentable_section for reinit_array
6789 section in DSO.
6790
a1aefc76
NC
67912002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6792
a181be0a
NC
6793 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
6794 OR it in rather than replacing previously selected flags.
6795
a1aefc76
NC
6796 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
6797 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
6798
c119f9b8
AM
67992002-03-14 Alan Modra <amodra@bigpond.net.au>
6800
6801 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
6802 (N): Use the above.
6803 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
6804 ensure reloc size matches before calling elf_link_input_bfd.
6805 Add an assert to check reloc size when counting output relocs.
6806
c295a511
NC
68072002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6808
6809 * mmo.c (mmo_get_loc): Return NULL rather than false.
6810
9ce88e60
NC
68112002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
6812
6813 * po/fr.po: Updated version.
6814
4ddafab0
AM
68152002-03-13 Alan Modra <amodra@bigpond.net.au>
6816
b74fa2cd
AM
6817 * archures.c (bfd_default_compatible): Test bits_per_word.
6818 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
6819 bfd_default_compatible.
6820 * cpu-i370.c (i370_compatible): Likewise.
6821 * cpu-sparc.c (sparc_compatible): Likewise.
6822 * cpu-h8300.c (compatible): Test in->arch == out->arch.
6823
40b829d4
AM
6824 * elflink.h: Formatting fixes.
6825 (elf_link_output_extsym): Merge undefined and undef weak cases.
6826
4ddafab0
AM
6827 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
6828 when word size of input matches output word size.
6829
dd53c801
AJ
68302002-03-12 Andreas Jaeger <aj@suse.de>
6831
6832 * cpu-i386.c (i386_compatible): New. Use it instead of
6833 bfd_default_compatible.
6834
aa066ac8
L
68352002-03-07 H.J. Lu (hjl@gnu.org)
6836
6837 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
6838 as the type for bfd_reloc_val.
6839
1bf42538
JL
68402002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
6841
6842 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
6843 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
6844 (elf_hppa_final_link_relocate): Correct relocations for indirect
6845 references to local data through the DLT. Fix .opd creation for
6846 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
6847 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
6848 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
6849 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6850 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
6851 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
6852 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6853
86eaf01e
JJ
68542002-03-05 Jakub Jelinek <jakub@redhat.com>
6855
6856 * merge.c (_bfd_merge_sections): Don't segfault if there
6857 is nothing to merge due to GC.
6858
c44233aa
AM
68592002-03-05 Alan Modra <amodra@bigpond.net.au>
6860
039cc25f
AM
6861 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
6862 symbols that have been forced local.
6863
c44233aa
AM
6864 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
6865 to output forced local syms for non-shared link.
6866 (elf_link_output_extsym): Tweak condition for calling backend
6867 adjust_dynamic_symbol so that previous behaviour is kept.
6868 Whitespace changes throughout file.
6869
25e27870
L
68702002-03-04 H.J. Lu <hjl@gnu.org>
6871
6872 * elf.c (bfd_section_from_shdr): Handle special sections,
6873 .init_array, .fini_array and .preinit_array.
6874 (elf_fake_sections): Likewise.
6875
6876 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
6877 DT entry only if the section is in output for .init_array,
6878 .fini_array and .preinit_array. Complain about .preinit_array
6879 section in DSO.
6880 (elf_bfd_final_link): Warn zero size for .init_array,
6881 .fini_array and .preinit_array sections.
6882
6883 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
6884 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
6885 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
6886 .preinit_array.
6887
bb2a49f2
AM
68882002-03-04 Alan Modra <amodra@bigpond.net.au>
6889
6890 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
6891 * configure: Regenerate.
6892
38487e5e
TR
68932002-03-02 Tom Rix <trix@redhat.com>
6894
c44233aa
AM
6895 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
6896 symbolic equiv.
38487e5e
TR
6897 * coff-rs6000.c (xcoff_howto_table): Same.
6898
30831527
RH
68992002-03-01 David Mosberger <davidm@hpl.hp.com>
6900
6901 * elflink.h (size_dynamic_sections): If section named
6902 ".preinit_array" exists, create DT_PREINIT_ARRAY and
6903 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
6904 ".init_array" and ".fini_array".
6905 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
6906 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
6907 DT_FINI_ARRAY.
6908
c8e5ddc8
AM
69092002-02-26 Andrew Macleod <amacleod@cygnus.com>
6910
6911 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
6912 dynsyms.
6913
96e0dda4
AM
69142002-02-25 Alan Modra <amodra@bigpond.net.au>
6915
1c5b6bf8
AM
6916 * elf64-hppa.h: Update copyright date.
6917
96e0dda4
AM
6918 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
6919 (ppc64_elf_relocate_section): Don't generate power4 style branch
6920 hints for *_BRTAKEN and *_BRNTAKEN relocs.
6921
0fb19cbc
JJ
69222002-02-22 Jakub Jelinek <jakub@redhat.com>
6923
6924 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
6925 last patch.
6926 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6927
c434dee6
AJ
69282002-02-21 Andreas Jaeger <aj@suse.de>
6929
6930 * elf64-x86-64.c: Major rework that introduces all recent changes
6931 to the x86-64 backend. Get a closer match to elf32-i386.
6932 (struct elf64_x86_64_dyn_relocs): Rename from
6933 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
6934 all users.
6935 (struct elf64_x86_64_link_hash_table): Add short cuts to some
6936 sections.
6937 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
6938 remove casts, initialize new hash members.
6939 (create_got_section): New.
6940 (elf64_x86_64_create_dynamic_sections): New.
6941 (elf64_x86_64_copy_indirect_symbol): New.
6942 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
6943 relocs, .got or .relgot here but do it in allocate_dynrelocs.
6944 Reference count possible .plt and .got entries. Don't test input
6945 section SEC_READONLY here to try to avoid copy relocs, and keep
6946 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
6947 DF_TEXTREL here. Delay setting of variables until needed. Cache
6948 pointer to "sreloc" section in elf_section_data. Tweak condition
6949 under which .got created. Report files with bad relocation
6950 section names.
6951 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
6952 Reference count possible .plt entries. Don't deallocate .got and
6953 .relgot space here.
6954 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
6955 do copy reloc processing for weakdefs. Remove redundant casts and
6956 aborts. Delay setting of vars until needed. Move creation of
6957 dynamic symbols and allocation of .plt and .rela.plt to
6958 allocate_dynrelocs. Replace BFD_ASSERT with abort.
6959 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6960 (allocate_dynrelocs): New.
6961 (readonly_dynrelocs): New.
6962 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
6963 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
6964 Zero out the dynamic allocated content space.
6965 (elf64_x86_64_discard_copies): Removed.
6966 (elf64_x86_64_relocate_section): Make use of dynamic section
6967 short-cuts. Localise vars, and delay setting. Better error
6968 reporting, replace BFD_ASSERT with abort. Check
6969 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
6970 regular object file and tread the weak definition as the normal
6971 one. Don't discard relocs for undefweak or undefined symbols and
6972 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
6973 relocs.
6974 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
6975 symbols that have been forced local. Use same test to decide if
6976 we can use a relative reloc for got as relocate_section. Expand
6977 SHN_UNDEF comment. Move expressions out of function calls.
6978 Replace BFD_ASSERT with abort.
6979 (bfd_elf64_bfd_final_link): Removed.
6980 (elf_backend_copy_indirect_symbol): Define.
6981
ff3a6ee3
TR
69822002-02-20 Tom Rix <trix@redhat.com>
6983
6984 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
6985 (_bfd_xcoff_reloc_type_lookup): Use it.
6986 * coff64-rs6000.c (xcoff64_howto_table): Same.
6987 (xcoff64_reloc_type_lookup): Same.
c434dee6 6988
a68d41fb
AM
69892002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
6990
6991 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
6992 little endian.
6993
befc3abb
MS
69942002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
6995
6996 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
6997 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
6998 * bfd-in2.h: Regenerate.
6999 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
7000 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
7001 with "s390:64-bit".
7002 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
7003 (elf_s390_reloc_type_lookup): Likewise.
7004 (elf_s390_check_relocs): Likewise.
7005 (elf_s390_gc_sweep_hook): Likewise.
7006 (elf_s390_relocate_section): Likewise.
7007 (elf_s390_object_p): Use renamed architecture define.
7008 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
7009
6eeeec9b
FCE
70102002-02-19 Frank Ch. Eigler <fche@redhat.com>
7011
7012 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
7013
0bb2d96a
JJ
70142002-02-19 Jakub Jelinek <jakub@redhat.com>
7015
7016 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
7017 absptr -> pcrel optimization for shared libs.
7018 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
7019 library cannot be converted to pcrel.
7020 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
7021 relative.
7022 * elf32-i386.c (elf_i386_relocate_section): If
7023 _bfd_elf_section_offset returned -2, skip, but make sure the
7024 relocation is installed.
7025 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
7026 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7027 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7028 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7029 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7030 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7031 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7032 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7033 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7034 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7035 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7036 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7037 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7038 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7039 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
7040 _bfd_elf_section_offset returning -2 the same way as -1.
7041 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
7042 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
7043 and BFD_ASSERT.
7044 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
7045
69f284c7
TR
70462002-02-18 Tom Rix <trix@redhat.com>
7047
7048 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
7049 (bfd_xcoff_size_dynamic_sections): Same.
7050 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
7051 (bfd_xcoff_size_dynamic_sections): Same.
7052 * coff-rs6000.c (xcoff_generate_rtinit): Same.
7053 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
7054 * libxcoff.h (struct xcoff_backend_data_rec): Same.
7055 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
7056 * bfd-in2.h: Regenerate.
7057
82bd7b59
AM
70582002-02-18 Alan Modra <amodra@bigpond.net.au>
7059
7060 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
7061 (struct ppc_link_hash_table): Add sfpr.
7062 (ppc64_elf_link_hash_table_create): Init it.
7063 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
7064 .glink out to..
7065 (create_linkage_sections): ..here. Make .sfpr too.
7066 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
7067 dynobj early.
7068 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
7069 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
7070 ._restf* functions, and create as needed.
7071 (func_desc_adjust): Only force_local for shared libs.
7072
ef1355e8
NC
70732002-02-18 David O'Brien <obrien@FreeBSD.org>
7074
7075 * configure.in: Bump version number post 2.12 branching.
7076 * configure: Regenerate.
7077
dfa36a69
HPN
70782002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
7079
7080 * mmo.c: Correct and improve comments.
7081 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
7082 zero-pad. Use input to fill up non-empty bfd buffer.
7083 (mmo_flush_chunk): New function.
7084 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
7085 changed. Don't emit location specifier if VMA is same as
7086 *LAST_VMAP after omitting leading zero contents. Call
7087 mmo_flush_chunk before emitting location specifier.
7088 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
7089 with mmo_write_loc_chunk calls.
7090 (mmo_internal_write_section): Call mmo_flush_chunk after
7091 mmo_write_chunk.
7092 (mmo_write_symbols_and_terminator): Move :Main to first position
7093 in symbol array. Add faked one if it does not exist if there are
7094 other symbols. Don't add it if there are no symbols at all. Move
7095 out test for value of :Main from symbol loop. Rename table
7096 fakemain to maintable and variable mainsym to fakemain.
7097
ccf00ab6
RH
70982002-02-15 Richard Henderson <rth@redhat.com>
7099
7100 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
7101 section with no got matches any got. Simplify error generaion.
7102
88eaccc2
AM
71032002-02-15 Alan Modra <amodra@bigpond.net.au>
7104
fd96f80f
AM
7105 Support arbitrary length fill patterns.
7106 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
7107 (_bfd_default_link_order): Remove bfd_fill_link_order code.
7108 Call default_data_link_order.
7109 (default_fill_link_order): Delete.
7110 (default_data_link_order): New function.
7111 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
7112 of bfd_fill_link_order with bfd_data_link_order.
7113 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
7114 * elf64-mips.c (mips_elf64_final_link): Likewise.
7115
88eaccc2
AM
7116 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
7117 Correct value returned in "end" for "0x<non-hex>".
7118
e2fd756b
NC
71192002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
7120
7121 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
7122 (scan): Test against 'mach' field in info structure.
7123
edd29cf9
AM
71242002-02-14 Alan Modra <amodra@bigpond.net.au>
7125
7126 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
7127
1e30956e 71282002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
7129
7130 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
7131 EF_M68000.
7132
bf36db18
NC
71332002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
7134
7135 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
7136 non-zero physical addresses when adjusting the LMAs of new
7137 sections.
bf36db18 7138
189c6563
AM
71392002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7140
7141 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
7142 from _bfd_elf_hppa_gen_reloc_type.
7143 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
7144 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
7145 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
7146 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
7147
e948afaf
AO
71482002-02-12 Alexandre Oliva <aoliva@redhat.com>
7149
7150 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
7151 loading its contents if there's nothing to do in it.
7152
19397422
AM
71532002-02-12 Alan Modra <amodra@bigpond.net.au>
7154
0ad3a73b
AM
7155 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
7156 64k boundary.
7157
19397422
AM
7158 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
7159 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
7160 (ppc64_elf_finish_dynamic_sections): Set values for them.
7161
51316059
MS
71622002-02-11 Michael Snyder <msnyder@redhat.com>
7163
7164 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
7165 * elf.c (elfcore_grok_pstatus): Add prototype.
7166 (elfcore_grok_lwpstatus): Add prototype.
7167 (elfcore_write_lwpstatus): New function.
7168 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
7169
518313c3
AO
71702002-02-11 Alexandre Oliva <aoliva@redhat.com>
7171
7172 * elf32-sh.c: Added missing prototypes.
7173 * elf32-sh64.c: Likewise.
7174 (sh_elf_align_loads): Mark unused args as such.
7175 * elf64-sh64.c: Added missing prototypes.
7176 (struct elf_sh64_link_hash_entry): Fix typo.
7177 (sh_elf64_relocate_section): Fix info argument passed to
7178 _bfd_elf_section_offset.
7179
2c73f9d8
AM
71802002-02-11 Alan Modra <amodra@bigpond.net.au>
7181
7182 * Makefile.am: "make dep-am".
7183 * Makefile.in: Regenerate.
7184 * aclocal.m4: Regenerate.
7185 * config.in: Regenerate.
7186 * configure: Regenerate.
7187
d426c6b0
DJ
71882002-02-10 Daniel Jacobowitz <drow@mvista.com>
7189
7190 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
7191 variable warnings.
7192 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
7193 comparison warning.
7194 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
7195 cast warnings for the common case.
7196
e58ee0cd
HPN
71972002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
7198
7199 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
7200 vectors.
7201 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
7202 vectors.
7203
7793f4d0
RH
72042002-02-09 Richard Henderson <rth@redhat.com>
7205
7206 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
7207 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
7208 (elf64_alpha_relocate_section): Likewise.
7209 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
7210 * bfd-in2.h, libbfd.h: Rebuild.
7211
7e799044
HPN
72122002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
7213
7214 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
7215 that base-plus-offset reloc accounting is consistent.
7216 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
7217 up to date for undefined symbols.
7218
027d73eb
EC
72192002-02-08 Eric Christopher <echristo@redhat.com>
7220
7221 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7222
7223 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
7224 sections for the O32 ABI.
7225
517662d4
CD
72262002-02-08 Chris Demetriou <cgd@broadcom.com>
7227
7228 * elf32-arm.h: Fix formatting of _("...").
7229 * elf32-d10v.c: Likewise.
7230 * elf32-m68k.c: Likewise.
7231 * elf32-mips.c: Likewise.
7232
5e37cc46
NC
72332002-02-08 Ivan Guzvinec <ivang@opencores.org>
7234
7235 * coff-or32.c: Fix compile time warning messages.
7236
fbca6ad9
AO
72372002-02-08 Alexandre Oliva <aoliva@redhat.com>
7238
7239 Contribute sh64-elf.
7240 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
7241 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
7242 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
7243 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
7244 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
7245 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
7246 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
7247 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
7248 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
7249 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
7250 New relocs.
7251 * libbfd.h, bfd-in2.h: Rebuilt.
7252 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
7253 (sh_reloc_map): Map them.
7254 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
7255 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
7256 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
7257 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
7258 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
7259 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
7260 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
7261 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
7262 datalabel_got_offset.
7263 (sh_elf_link_hash_newfunc): Initialize it.
7264 (sh_elf_relocate_section): Augment the scope of
7265 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
7266 GOT and GOTOFF handling to new SHmedia relocation types. Support
7267 GOT_BIAS.
7268 (sh_elf_check_relocs): Likewise.
7269 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
7270 PLT entries using movi_shori_putval. Support GOT_BIAS.
7271 (sh_elf_finish_dynamic_sections): Likewise.
7272 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
7273 relocation, it's now done by the caller.
7274 (GOT_BIAS): New.
7275 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
7276 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
7277 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
7278 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
7279 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
7280 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
7281 sh64_elf64_hash_table): New.
7282 (sh_elf64_howto_table): Introduce new relocs.
7283 (sh_elf64_info_to_howto): Accept new PIC relocs.
7284 (sh_elf64_relocate_section): Augment the scope of
7285 seen_stt_datalabel. Support new PIC relocs.
7286 (sh_elf64_check_relocs): Support new PIC relocs.
7287 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
7288 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
7289 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
7290 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
7291 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
7292 movi_shori_putval, movi_3shori_putval,
7293 sh64_elf64_create_dynamic_sections,
7294 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
7295 sh64_elf64_size_dynamic_sections,
7296 sh64_elf64_finish_dynamic_symbol,
7297 sh64_elf64_finish_dynamic_sections): New.
7298 (elf_backend_create_dynamic-sections,
7299 bfd_elf64_bfd_link_hash_table_create,
7300 elf_backend_adjust_dynamic_symbol,
7301 elf_backend_size_dynamic_sections,
7302 elf_backend_finish_dynamic_symbol,
7303 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7304 elf_backend_plt_readonly, elf_backend_want_plt_sym,
7305 elf_backend_got_header_size, elf_backend_plt_header_size):
7306 Define.
7307 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
7308 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
7309 match official numbers and names; moved unmaching ones to the
7310 range 0xf2-0xff.
7311 * elf32-sh64.c, elf64-sh64.c: Likewise.
7312 2001-03-12 DJ Delorie <dj@redhat.com>
7313 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
7314 sections.
7315 2001-03-12 DJ Delorie <dj@redhat.com>
7316 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
7317 be aligned.
7318 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
7319 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
7320 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
7321 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
7322 .cranges section with SEC_SORT_ENTRIES set.
7323 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
7324 incoming sorted .cranges section.
7325 (sh64_bfd_elf_copy_private_section_data): New.
7326 (sh64_elf_final_write_processing): Only sort .cranges and modify
7327 start address if called by linker.
7328 2001-01-08 Ben Elliston <bje@redhat.com>
7329 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
7330 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
7331 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
7332 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
7333 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
7334 line. Add comments before all entries.
7335 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
7336 comment.
7337 (sh_elf64_reloc): Correct head comment.
7338 (sh_elf64_relocate_section): Correct spacing.
7339 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
7340 instead call reloc_dangerous callback.
7341 <case R_SH_SHMEDIA_CODE>: New case.
7342 (sh_elf64_gc_mark_hook): Correct spacing.
7343 (sh_elf64_check_relocs): Ditto.
7344 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
7345 New case.
7346 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
7347 functions.
7348 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
7349 clarify describing comment. Add comments before all entries.
7350 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
7351 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
7352 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
7353 Sort .cranges section in final link. Prepare to set bit 0 on
7354 entry address.
7355 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
7356 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
7357 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
7358 .cranges section.
7359 (sh64_backend_section_from_shdr): New, to recognize
7360 SHT_SH5_CR_SORTED on incoming .cranges section.
7361 (elf_backend_section_from_shdr): Define.
7362 (sh64_elf_final_write_processing): Sort outgoing .cranges
7363 section. (New, temporarily disabled:) Set bit 0 on entry address
7364 according to ISA type.
7365 (sh64_find_section_for_address): New.
7366 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
7367 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
7368 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
7369 bfd_malloc, not xmalloc.
7370 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
7371 global.
7372 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
7373 temporarily disabled) setting bit 0 on entry address.
7374 (elf_backend_final_write_processing): Define.
7375 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
7376 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
7377 be a proper relocation for PTA and PTB rather than a marker.
7378 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
7379 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
7380 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
7381 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
7382 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
7383 Zero src_mask.
7384 * elf64-sh64.c: Ditto.
7385 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
7386 * elf32-sh64.c: Include opcodes/sh64-opc.h
7387 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
7388 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
7389 parameters. No unused parameters. Caller changed.
7390 <case R_SH_PT_16>: New case.
7391 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
7392 * Makefile.in: Regenerate.
7393 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
7394 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
7395 all code sections.
7396 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7397 (sh64_elf_merge_private_data): Ditto.
7398 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
7399 to access stored section flags.
7400 (sh64_elf_final_write_processing): Return immediately unless
7401 called by linker. Use sh64_elf_section_data (cranges) to get size
7402 of linker-generated cranges entries.
7403 (sh64_elf_copy_private_data): Add missing "return true".
7404 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7405 (sh_elf64_merge_private_data): Ditto.
7406 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
7407 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
7408 elf64-sh64.c:sh64_elf_fake_sections.
7409 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
7410 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
7411 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
7412 (sh64_elf_final_write_processing): New.
7413 (elf_backend_final_write_processing): Define.
7414 (sh64_elf_fake_sections): Get header flags from tdata field.
7415 (sh64_elf_copy_private_data): Do not call
7416 sh64_elf_copy_private_data_internal, just copy e_flags field.
7417 (sh64_elf_merge_private_data): Do not call
7418 sh64_elf_copy_private_data_internal.
7419 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
7420 Remove EF_SH64_ABI64, let ELF size make difference.
7421 Remove SH64-specific BFD section flag.
7422 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
7423 containing SHmedia through elf_section_data (asect)->tdata
7424 non-zero, not using a BFD section flag.
7425 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
7426 (sh64_elf_merge_private_data): Similar.
7427 (elf_backend_section_flags): Don't define.
7428 (sh64_elf_backend_section_flags): Delete.
7429 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
7430 not EF_SH64_ABI64.
7431 (sh_elf64_merge_private_data): Similar.
7432 * section.c (Section flags definitions): Don't define
7433 SEC_SH_ISA_SHMEDIA.
7434 (bfd-in2.h): Regenerate.
7435 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
7436 Make DataLabel references work with partial linking.
7437 * elf32-sh64.c: Fix formatting.
7438 (sh64_elf_link_output_symbol_hook): New.
7439 (elf_backend_link_output_symbol_hook): Define to
7440 sh64_elf_link_output_symbol_hook.
7441 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
7442 undefined if partial linking. Adjust sanity check.
7443 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
7444 (elf_backend_link_output_symbol_hook): Define to
7445 sh64_elf64_link_output_symbol_hook.
7446 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
7447 undefined if partial linking. Adjust sanity check.
7448 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
7449 Implement semantics for inter-file DataLabel references.
7450 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
7451 (sh64_elf64_add_symbol_hook): New.
7452 (sh_elf64_relocate_section): If passing an indirect symbol with
7453 st_type STT_DATALABEL on the way to a symbol with st_other
7454 STO_SH5_ISA32, do not bitor 1 to the relocation.
7455 (elf_backend_add_symbol_hook): Define to
7456 sh64_elf64_add_symbol_hook.
7457 * elf64-sh32.c: Tweak comments.
7458 (DATALABEL_SUFFIX): Define.
7459 (sh64_elf_add_symbol_hook): New.
7460 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
7461 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
7462 symbol with st_type STT_DATALABEL on the way to a symbol with
7463 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
7464 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
7465 Pass through STT_DATALABEL.
7466 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
7467 (elf_backend_get_symbol_type): Define.
7468 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
7469 (elf_backend_get_symbol_type): Define.
7470 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
7471 * elf32-sh64.c: Tweak comments.
7472 (sh64_elf_copy_private_data_internal): Add prototype.
7473 (bfd_elf32_bfd_set_private_flags): Define.
7474 (sh64_elf_copy_private_data_internal): Compare machine name, not
7475 textual BFD target name, to check whether to copy section flag
7476 SHF_SH5_ISA32.
7477 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
7478 Tweak section-contents-type-mismatch message.
7479 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
7480 Validize reloc-types.
7481 * elf64-sh64.c: New file.
7482 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
7483 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
7484 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
7485 Regenerate dependencies.
7486 * Makefile.in: Regenerate.
7487 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
7488 bfd_elf64_sh64l_vec.
7489 * configure.in: Handle bfd_elf64_sh64_vec and
7490 bfd_elf64_sh64l_vec.
7491 * configure: Regenerate.
7492 * po/POTFILES.in: Regenerate.
7493 * po/bfd.pot: Regenerate.
7494 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
7495 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
7496 anything else but EF_SH64 and EF_SH64_ABI64.
7497 (sh64_elf_merge_private_data): Emit error for anything else but
7498 EF_SH64 and EF_SH64_ABI64.
7499 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
7500 from targ_selvecs.
7501 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
7502 bfd_elf32_sh64l_vec as a temporary measure.
7503 * configure: Regenerate.
7504 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
7505 * cpu-sh.c (arch_info_struct): Include sh5 item
7506 unconditionalized.
7507 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
7508 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
7509 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
7510 * elf32-sh64.c: Tweak comments.
7511 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
7512 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
7513 (sh64_elf_copy_private_data_internal): Wrap long line.
7514 (sh64_elf_merge_private_data): Rewrite to allow objects from
7515 SH64 subsets to be linked together.
7516 (INCLUDE_SHMEDIA): Define.
7517 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
7518 Parenthesize plus-expression inside or-expression.
7519 <global symbol>: Ditto.
7520 (sh_elf_set_mach_from_flags): Remove code refusing
7521 deleted EF_SH64_32BIT_ABI flag.
7522 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
7523 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
7524 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
7525 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
7526 (sh_elf_relocate_section) <local symbol>: Or 1 in
7527 calculation of relocation if sym->st_other & STO_SH5_ISA32.
7528 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
7529 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
7530 relocation.
7531 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
7532 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
7533 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
7534 Regenerate dependencies.
7535 * Makefile.in: Regenerate.
7536 * archures.c: Add bfd_mach_sh5.
7537 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
7538 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
7539 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
7540 * configure: Regenerate.
7541 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
7542 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
7543 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
7544 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
7545 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
7546 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
7547 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
7548 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
7549 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
7550 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
7551 in item for SH5.
7552 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
7553 for SHmedia relocs.
7554 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
7555 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
7556 shmedia_prepare_reloc, goto final_link_relocate if it returns
7557 non-zero, else fail as before.
7558 (sh_elf_set_mach_from_flags): Provide function only if not defined
7559 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
7560 (sh_elf_set_private_flags): Provide function only if not defined
7561 as a macro.
7562 (sh_elf_copy_private_data): Similar.
7563 (sh_elf_merge_private_data): Similar.
7564 * section.c (SEC_SH_ISA_SHMEDIA): New.
7565 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
7566 * elf32-sh64.c: New file.
7567 * libbfd.h: Regenerate.
7568 * bfd-in2.h: Regenerate.
7569 * po/POTFILES.in: Regenerate.
7570 * po/bfd.pot: Regenerate.
7571 * bfd-in2.h: Regenerate.
7572 * libbfd.h: Regenerate.
7573
e108f470
DJ
75742002-02-07 Daniel Jacobowitz <drow@mvista.com>
7575
7576 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
7577 been included, not drag it in.
7578 * bfd-in2.h: Regenerate.
7579
259d18a3
L
75802002-02-06 H.J. Lu (hjl@gnu.org)
7581
7582 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
7583 the mach and ISA fields if necessary.
7584
f13b834e
NC
75852002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
7586
7587 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
7588 ARM architecture when an F_ARM_5 flag is detected, since we cannot
7589 be sure exactly which architecture this represents.
7590
82f6addb
NC
75912002-02-05 Nick Clifton <nickc@redhat.com>
7592
7593 * po/tr.po: Updated translation.
7594
899f54f5
AM
75952002-02-05 Alan Modra <amodra@bigpond.net.au>
7596
7597 From Jimi X <jimix@watson.ibm.com>
7598 * archures (bfd_mach_ppc64): Define.
7599 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
7600 (bfd_powerpc_arch): Define.
7601 * bfd-in2.h: Regenerate.
7602 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
7603 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
7604 (bfd_powerpc_archs): Add default powerpc64 arch.
7605
248866a8
AM
76062002-02-05 Alan Modra <amodra@bigpond.net.au>
7607
7608 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
7609 against section syms in readonly sections. Don't do the global
7610 sym check if we find one.
7611 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
7612 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 7613 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
7614 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
7615 (elf_s390_grok_prstatus): Add missing prototype.
7616
4fa5c2a8
HPN
76172002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
7618
7619 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
7620 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
7621 Call bfd_get_section_by_name only once. Initialize
7622 bpodata->n_bpo_relocs_this_section.
7623 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
7624 referring to DSOs.
7625 (bpo_reloc_request_sort_fn): Don't use difference of values as
7626 return-value.
7627
537c972e
DB
76282002-02-02 David O'Brien <obrien@FreeBSD>
7629
7630 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
7631 version 4.5 and later the same as 5-CURRENT.
7632 * configure: Re-generate.
7633
006336b8
JT
76342002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
7635
7636 * config.bfd (hppa*-*-netbsd*): New target.
7637
6c571f00
PT
76382002-01-31 Philipp Thomas <pthomas@suse.de>
7639
19397422
AM
7640 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
7641 to front of message. Unify messages with elf32-arm.h. Use
7642 commas where neccessary.
7643 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
7644 ERROR in messages. Unify messages with coff-arm.c. Correct
7645 VFP/FPA error message.
7646 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
7647 APCS-32 for translation.
6c571f00 7648
930b4cb2
HPN
76492002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
7650
7651 Perform on-demand global register allocation from
7652 R_MMIX_BASE_PLUS_OFFSET relocs.
7653 * elf64-mmix.c (struct bpo_reloc_section_info, struct
7654 bpo_reloc_request, struct bpo_greg_section_info): New.
7655 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
7656 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
7657 _bfd_mmix_check_all_relocs,
7658 _bfd_mmix_prepare_linker_allocated_gregs,
7659 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
7660 (elf_mmix_howto_table): Correct src_mask for most relocs.
7661 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
7662 case.
7663 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
7664 case. Fix typo in comment. New label do_mmix_reloc.
7665 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
7666 store first object file with a base-plus-offset reloc. Call
7667 mmix_elf_check_common_relocs for the part common with mmo.
7668 (mmix_elf_final_link): Write out linker-allocated register
7669 contents section.
7670 (elf_backend_gc_sweep_hook): Define.
7671 (bfd_elf64_bfd_relax_section): Define.
7672
7673 * mmo.c: Don't include <ctype.h>
7674 (mmo_init): Correct init-once logic.
7675
3e36d993
TR
76762002-02-01 Tom Rix <trix@redhat.com>
7677
7678 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
7679
ba323545
AM
76802002-02-01 Alan Modra <amodra@bigpond.net.au>
7681
7682 * Makefile.am: Run "make dep-am"
7683 * Makefile.in: Regenerate.
7684
012884d6
DB
76852002-01-31 David O'Brien <obrien@FreeBSD>
7686
7687 * configure.in: Recognize the differences in core files from FreeBSD
7688 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
7689 5-CURRENT.
7690 * configure: Regenerate.
7691
3b16e843
NC
76922002-01-31 Ivan Guzvinec <ivang@opencores.org>
7693
7694 * coff-or32.c: New file.
7695 * cpu-or32.c: New file.
7696 * elf32-or32.c: New file.
7697 * archures.c: Add support for or32.
7698 * targets.c: Add support for or32.
7699 * bfd-in2.h: Regenerate.
7dc0ab31 7700 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
7701 coff_write_object_contents): Add support for or32.
7702 * config.bfd: Add target.
7703 * configure.in: Add support for or32.
7704 * configure: Regenerate.
7705 * Makefile.am: Add support for or32.
7706 * Makefile.in: Regenerate.
3b16e843
NC
7707 * po/SRC-POTFILES.in: Add or32 files.
7708 * po/bfd.pot: Regenerate.
7dc0ab31 7709
caf8ca8e
NC
77102002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
7711 Don Lindsay <lindsayd@cisco.com>
7712
7713 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
7714 false' with a return of a bfd_reloc_ error code.
7715
e5dfef09
HPN
77162002-01-31 Hans-Peter Nilsson <hp@axis.com>
7717
7718 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
7719 unexport unreferenced symbols when --export-dynamic. Call
7720 _bfd_elf_strtab_delref when unexporting.
7721
4e4770d0
DJ
77222002-01-30 Daniel Jacobowitz <drow@mvista.com>
7723
7724 * bfd-in.h: Include <stdbool.h> if it is available.
7725 * bfd-in2.h: Regenerated.
7726
e1fa50e7
AM
77272002-01-31 Alan Modra <amodra@bigpond.net.au>
7728
7729 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
7730 not go via the plt.
7731
b5f79c76
NC
77322002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7733
b5f79c76
NC
7734 * archures.c: Tidy up formatting of embedded comments.
7735 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 7736 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
7737 * reloc.c: Tidy up formatting of ordinary & embedded comments.
7738 * section.c: Tidy up formatting of embedded comments.
7739 * syms.c: Tidy up formatting of embedded comments.
7740 * targets.c: Tidy up formatting of embedded comments.
7741
7742 * bfd-in2.h: Regenerate.
7743
ca09e32b
NC
77442002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7745
7746 * vms-tir.c (cmd_name): New function.
7747 (tir_cmd_name): New function.
7748 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
7749 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
7750 Fix formatting.
7dc0ab31 7751
ca09e32b
NC
7752 * peXXigen.c (pe_print_idata): Rearrange message to aid in
7753 translation.
7754 (pe_print_pdata): Rearrange message to aid in translation.
7755
7756 * libbfd.c (warn_deprecated): Rearrange error message to aid in
7757 translation.
7758
7759 * ihex.c (ihex_write_object_contents): Fix spelling typo.
7760
7761 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
7762
7763 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
7764 message to aid in translation.
7765
7766 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
7767 to aid in translation.
7768
7769 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
7770
7dc0ab31 77712002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
7772
7773 * coff-arm.c, elf32-elf.h: Unify messages.
7774
05f64ac6
NC
77752002-01-30 Nick Clifton <nickc@redhat.com>
7776
7777 * po/sv.po: Updated translation.
7778
f5a3e38a
NC
77792002-01-30 Philipp Thomas <pthomas@suse.de>
7780
7781 * dwarf2.c (read_abbrev): Use full section name in error message.
7782 (decode_line_info): Likewise.
661a3fd4
NC
7783
7784 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
7785 message.
7786
d926e03d
AM
77872002-01-30 Alan Modra <amodra@bigpond.net.au>
7788
7789 * elf64-ppc.c (func_desc_adjust): Only provide missing function
7790 descriptor symbols for undefined function code syms. Clear
7791 ELF_LINK_NON_ELF so that they can stay weak.
7792
030d18fb 77932002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 7794 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
7795
7796 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
7797 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
7798 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
7799 generation.
7800 * bfd-in2.h: Regenerate.
7801
fcc76bea
CD
78022002-01-29 Chris Demetriou <cgd@broadcom.com>
7803
7804 * elf32-mips.c: Add additional comments about HI16 relocation
7805 processing.
7806 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
7807 pc-relative relocations. (Reverts change made on 2001-10-31.)
7808 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
7809 for pc-relative relocations.
7810 (mips_elf_calculate_relocation): Add a comment about a kludge
7811 in the R_MIPS_GNU_REL_HI16 handling.
7812 (_bfd_mips_elf_relocate_section): Implement that kludge;
7813 adjust pc-relative HI16 relocation for difference in HI16 and
7814 LO16 addresses, since it can't easily be done in
7815 mips_elf_calculate_relocation.
7816
f9cd9119
MS
78172002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
7818
7819 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
7820 relocations with PC32 relocations for undefined or weak symbols.
7821 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
7822 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
7823
702248bb
JT
78242002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
7825
7826 * elfcore.h (elf_core_file_p): Improve comment for last change.
7827
4867be41
DJ
78282002-01-27 Daniel Jacobowitz <drow@mvista.com>
7829
7830 * configure: Regenerated.
7831
a94cef6a
JT
78322002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
7833
7834 * elfcore.h (elf_core_file_p): Set the machine architecture
7835 before processing the program headers.
7836
7562a296
HPN
78372002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
7838
966abd70
HPN
7839 * configure.in <64-bit configuration>: If using gcc, check and
7840 emit error for egcs-1.1.2.
7841 * configure: Regenerate.
7842
e8eab623
NC
78432002-01-26 Egor Duda <deo@logos-m.ru>
7844
7845 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
7846 as possible to avoid stack corruption.
7847
73896efb
RH
78482002-01-26 Richard Henderson <rth@redhat.com>
7849
7850 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
7851 for non-allocated sections.
7852
78532002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
7854
7855 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
7856 prstat.pr_reg even if it is a struct.
7857
73896efb 78582002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 7859
c5cd6d62 7860 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 7861
3d66c4f7
NC
78622002-01-25 Philipp Thomas <pthomas@suse.de>
7863
7864 * coffgen.c (coff_print_symbol): Don't mark info message
7865 for translation.
7866
9460ecda
NC
78672002-01-25 Nick Clifton <nickc@redhat.com>
7868
7869 * po/fr.po: Updated translation.
7870 * po/es.po: Updated translation.
7871
cc9ff76a
AM
78722002-01-25 Philipp Thomas <pthomas@suse.de>
7873
7874 * coff-alpha.c (alpha_relocate_section): Unify warning message
7875 for GP relative relocations without GP defined.
7876 * coff-mips.c (mips_relocate_section): Likewise.
7877
c68836a9
AM
78782002-01-25 Alan Modra <amodra@bigpond.net.au>
7879
7880 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
7881 unsigned overflow when new_offset < old_offset.
7882
e8eab623 78832002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
7884
7885 * bfd.c (_bfd_abort): Fix typo.
7886
8ba89f17
RH
78872002-01-23 Richard Henderson <rth@redhat.com>
7888
7889 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
7890 plt entries for undefweak symbols.
7891
c6953948
NC
78922002-01-23 Steve Ellcey <sje@cup.hp.com>
7893
c5cd6d62 7894 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
7895 (bfd_elf64_ia64_hpux_big_vec): Ditto.
7896 (bfd_elf32_h8300_vec): Ditto.
7897
41bd81ab
AM
78982002-01-23 Alan Modra <amodra@bigpond.net.au>
7899
7900 * elf64-ppc.c: Remove stale part of ABI comment.
7901 (NO_OPD_RELOCS): Define.
7902 (ppc64_elf_check_relocs): Use it.
7903 (ppc64_elf_relocate_section): Here too.
7904 (build_one_stub): Don't point function syms at the stub. Instead,
7905 hijack plt.offset.
7906 (ppc64_elf_relocate_section): Check whether REL24 relocs should
7907 really go to the stub. Make all dynamic relocs in opd against
7908 locals.
7909 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
7910 plt.offset.
7911
f304919d
RH
79122002-01-22 Richard Henderson <rth@redhat.com>
7913
7914 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
7915
c0ef99a7
AM
79162002-01-22 Alan Modra <amodra@bigpond.net.au>
7917
60ee0d4a
AM
7918 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
7919 TOC_BASE_OFF adjustment.
7920
c0ef99a7
AM
7921 * Makefile.am: Run "make dep-am".
7922 * Makefile.in: Regenerate.
7923 * po/SRC-POTFILES.in: Regenerate.
7924
64328b46
AM
79252002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
7926
7927 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
7928 host defines.
7929
59953665 79302002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
7931
7932 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
7933 Check for and emit error if sgot is NULL at this point.
7934
9596feea
JT
79352002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
7936
7937 * config.bfd (ia64*-*-netbsd*): New target.
7938
7b45c6e1
AM
79392002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
7940
7941 * som.c (som_write_space_strings): Comment typo fix.
7942
e5094212
AM
79432002-01-21 Alan Modra <amodra@bigpond.net.au>
7944
e86ce104
AM
7945 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
7946 is_func_descriptor fields.
7947 (link_hash_newfunc): Init them.
7948 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
7949 dot are candidates for plt entries. When processing .opd relocs,
7950 set function descriptor strings to point inside function code
7951 string, and set new ppc_link_hash_entry fields.
7952 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
7953 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
7954 function descriptors. It's now done in..
7955 (func_desc_adjust): New.
7956 (ppc64_elf_func_desc_adjust): New.
7957 (define elf_backend_always_size_sections): Define.
7958 (ppc64_elf_hide_symbol): New.
7959 (define elf_backend_hide_symbol): Define.
7960 (allocate_dynrelocs): Remove code looking up function descriptors
7961 as that has been done earlier.
7962 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
7963 table.
7964 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
7965 up function descriptor.
7966 (build_one_stub): Look up the function code sym. Check for
7967 invalid plt offsets.
7968 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
7969 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
7970
e5094212
AM
7971 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
7972 boolean param.
7973 (_bfd_elf_link_hash_hide_symbol): Likewise.
7974 * elflink.h (elf_link_add_object_symbols): Adjust call to
7975 elf_backend_hide_symbol.
7976 (elf_fix_symbol_flags): Likewise.
7977 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
7978 than bfd_alloc.
7979 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
7980 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
7981 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
7982 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
7983 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
7984 and adjust to suit.
7985 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
7986 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
7987 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
7988
40b8271b
AM
79892002-01-18 Alan Modra <amodra@bigpond.net.au>
7990
7991 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
7992 dynamic function descriptor symbol, not the associated function
7993 symbol.
7994
55baa95b
EC
79952002-01-17 Eric Christopher <echristo@redhat.com>
7996
7997 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
7998
328577ad
NC
79992002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
8000
8001 * po/bfd.pot: Regenerate.
8002 * po/fr.po: Regenerate.
8003
af746e92
AM
80042002-01-17 Alan Modra <amodra@bigpond.net.au>
8005
8006 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
8007 Remove "Elf_Internal_Shdr *" param.
8008 (_bfd_mips_elf_section_from_bfd_section): Ditto.
8009 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
8010 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
8011 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
8012 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
8013 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
8014 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
8015 function to override special sections. Remove hdr arg from
8016 backend call, and don't loop.
8017
175e9962
EC
80182002-01-16 Eric Christopher <echristo@redhat.com>
8019
8020 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
8021 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
8022 relocations requiring gp0 and gp.
8023
96a846ea
RE
80242002-01-16 Richard Earnshaw <rearnsha@arm.com>
8025
175e9962 8026 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
8027 EF_ARM_VFP_FLOAT.
8028 (elf32_arm_print_private_bfd_data): Likewise.
8029
af3ae48d
NC
80302002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
8031
8032 * po/tr.po: Import new version.
8033
10ed1bba
AM
80342002-01-16 Alan Modra <amodra@bigpond.net.au>
8035
8036 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
8037 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
8038 (ORI_R0_R0_0): Correct.
8039
5d1634d7
AM
80402002-01-16 Alan Modra <amodra@bigpond.net.au>
8041
8042 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
8043 when plt_not_loaded.
8044 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
8045 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
8046 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
8047 (ppc64_elf_glink_code): Delete.
8048 (PPC64_ELF_GLINK_SIZE): Delete.
8049 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
8050 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
8051 ORI_R0_R0_0): Define.
8052 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
8053 (struct ppc_link_hash_table): Add sstub and plt_overflow.
8054 (ppc64_elf_link_hash_table_create): Init them.
8055 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
8056 Don't copy to shared lib.
8057 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
8058 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
8059 (allocate_dynrelocs <plt>): Don't change function sym here. Make
8060 room for .stub and .glink code.
8061 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
8062 DT_PPC64_GLINK.
8063 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
8064 bfd_elf64_bfd_final_link.
8065 (bfd_elf64_bfd_final_link): Don't define.
8066 (ppc64_elf_size_stubs): New.
8067 (build_plt_stub): New.
8068 (build_one_stub): New.
8069 (ppc64_elf_build_stubs): New.
8070 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
8071 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
8072 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
8073 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
8074 case output sections not separate. Adjust DT_RELASZ to not
8075 include plt relocs. Set reserved got entry. Set got and plt
8076 entry size.
8077 (elf_backend_got_header_size): Set to 8.
8078 * elf64-ppc.h: New file.
8079
c601ffdb
AM
80802002-01-16 Alan Modra <amodra@bigpond.net.au>
8081
8082 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
8083 sections, use bfd_section_list_remove.
8084 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
8085 * elflink.h (elf_link_add_object_symbols): When removing all
8086 sections, use bfd_section_list_clear.
8087
8fb4cb7f
NC
80882002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
8089
8090 * po/sv.po: New file: Swedish translation.
8091 * configure.in (ALL_LINGUAS): Add sv.
8092 * configure: Regenerate.
8093
d3c456e9
JJ
80942002-01-15 Jakub Jelinek <jakub@redhat.com>
8095
8096 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
8097 * elf.c (merge_sections_remove_hook): New function.
8098 (_bfd_elf_merge_sections): Pass it as 3rd argument to
8099 _bfd_merge_sections.
8100 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
8101 * libbfd.h: Rebuilt.
8102 * merge.c (_bfd_merge_sections): Add remove_hook argument.
8103 Call remove_hook if a SEC_EXCLUDE section is encountered.
8104
1f7fd478
NC
81052002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
8106
8107 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
8108 (xstormy16_reloc_map): Initialise new field with correct howto
8109 table.
8110 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
8111 howto entry.
8112
b87011e9
MS
81132002-01-10 Michael Snyder <msnyder@redhat.com>
8114
8115 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
8116 (elfcore_write_pstatus): Use long instead of pid_t;
8117 * elf-bfd.h: Change prototypes to use long instead of pid_t;
8118
175e9962 81192002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
8120
8121 * elf.c: Update copyright years.
8122 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
8123 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
8124
7c76fa91
MS
81252002-01-08 Michael Snyder <msnyder@redhat.com>
8126
8127 Add capability to write corefile note sections, for gdb.
8128 * elf.c (elfcore_write_note): New function.
8129 (elfcore_write_prpsinfo): New function.
8130 (elfcore_write_prstatus): New function.
8131 (elfcore_write_pstatus): New function.
8132 (elfcore_write_prfpreg): New function.
8133 (elfcore_write_prxfpreg): New function.
97996af6 8134 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 8135
e1fddb6b
AO
81362002-01-08 Alexandre Oliva <aoliva@redhat.com>
8137
8138 * elf.c (elf_fake_sections): Propagate errors from
8139 elf_backend_fake_section.
8140
8d05742f
JT
81412002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
8142
8143 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
8144 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
8145 (elf32-sh-nbsd.lo): New rule.
8146 * Makefile.in: Regenerate.
8147 * config.bfd (sh*le-*-netbsdelf*): New target.
8148 (sh*-*-netbsdelf*): New target.
8149 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
8150 (bfd_elf32_shnbsd_vec): New vector.
8151 (bfd_elf32_shlnbsd_vec): New vector.
8152 * configure: Regenerate.
8153 * elf32-sh-nbsd.c: New file.
8154 * targets.c: Update copyright years.
175e9962 8155 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
8156 bfd_elf32_shnbsd_vec.
8157
1dba4cb4
AH
81582002-01-07 Aldy Hernandez <aldyh@redhat.com>
8159
8160 * coff-rs6000.c (READ20): Use bfd_scan_vma.
8161
47b22aef
GK
81622002-01-07 Geoffrey Keating <geoffk@redhat.com>
8163
8164 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
8165 of a symbol in a section that will be deleted.
8166
be2d1673
NC
81672002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
8168
8169 * po/es.po: New file: Spanish translation.
8170 * configure.in (ALL_LINGUAS): Add es.
8171 * configure: Regenerate.
8172
d9cf1b54
AM
81732002-01-06 Steve Ellcey <sje@cup.hp.com>
8174
8175 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
8176 argument so we can handle HP-UX specially.
8177 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
8178 (elfNN_hpux_backend_section_from_bfd_section): New for support
8179 of SHN_IA_64_ANSI_COMMON.
8180 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
8181 (is_unwind_section_name): Add special HP-UX support.
8182 (elfNN_ia64_section_from_shdr): Add support for more sections.
8183 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
8184 add support for more sections.
8185 (elfNN_ia64_additional_program_headers): Modify
8186 is_unwind_section_name call.
8187 (elfNN_ia64_modify_segment_map): Remove assumption that there is
8188 only one unwind section in segment.
8189
3f3c5c34
AM
81902002-01-06 Alan Modra <amodra@bigpond.net.au>
8191
8192 * syms.c (_bfd_generic_make_empty_symbol): New function.
8193 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
8194 _bfd_generic_make_empty_symbol.
8195 * libbfd.h: Regenerate.
8196 * bfd-in2.h: Regenerate.
8197 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
8198 (hppabsd_core_get_symtab_upper_bound): Don't define.
8199 (hppabsd_core_get_symtab): Likewise.
8200 (hppabsd_core_print_symbol): Likewise.
8201 (hppabsd_core_get_symbol_info): Likewise.
8202 (hppabsd_core_bfd_is_local_label_name): Likewise.
8203 (hppabsd_core_get_lineno): Likewise.
8204 (hppabsd_core_find_nearest_line): Likewise.
8205 (hppabsd_core_bfd_make_debug_symbol): Likewise.
8206 (hppabsd_core_read_minisymbols): Likewise.
8207 (hppabsd_core_minisymbol_to_symbol): Likewise.
8208 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
8209 Formatting fixes.
8210 * hpux-core.c: Similarly.
8211 * irix-core.c: Similarly.
8212 * osf-core.c: Similarly.
8213 * sco5-core.c: Similarly.
8214 * binary.c (binary_make_empty_symbol): Remove function, define as
8215 _bfd_generic_make_empty_symbol.
8216 * ihex.c (ihex_make_empty_symbol): Likewise.
8217 * mmo.c (mmo_make_empty_symbol): Likewise.
8218 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
8219 * srec.c (srec_make_empty_symbol): Likewise.
8220 * versados.c (versados_make_empty_symbol): Likewise.
8221 * vms.c (_bfd_vms_make_empty_symbol): Remove.
8222 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
8223 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
8224 rather than _bfd_vms_make_empty_symbol.
8225 * vms-misc.c (new_symbol): Likewise.
8226
3f0a7f7f
AM
82272002-01-05 Alan Modra <amodra@bigpond.net.au>
8228
9e7b37b3
AM
8229 * section.c (bfd_section_init): Remove unnecessary initialisations.
8230 (bfd_section_list_clear): New function.
8231 (bfd_section_list_remove, bfd_section_list_insert): New macros.
8232 (_bfd_strip_section_from_output): Use them.
8233 * coffcode.h (coff_set_alignment_hook): Likewise.
8234 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
8235 * elf64-mips.c (mips_elf64_final_link): Likewise.
8236 * elf64-mmix.c (mmix_elf_final_link): Likewise.
8237 * sunos.c (sunos_add_dynamic_symbols): Likewise.
8238 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
8239 * bfd-in2.h: Regenerate.
8240
8241 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
8242 rather than doing our own section handling. Clean up after errors
8243 with bfd_release and bfd_section_list_clear. Handle unexpected
8244 flags.
8245 * aoutf1.h (sunos4_core_file_p): Likewise.
8246 * aix386-core.c (aix386_core_file_p): Likewise.
8247 * cisco-core.c (cisco_core_file_validate): Likewise.
8248 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
8249 * trad-core.c (trad_unix_core_file_p): Likewise.
8250
8251 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
8252 with bfd_release and bfd_section_list_clear.
8253 * hpux-core.c (hpux_core_core_file_p): Likewise.
8254 * irix-core.c (irix_core_core_file_p): Likewise.
8255 * lynx-core.c (lynx_core_file_p): Likewise.
8256 * osf-core.c (osf_core_core_file_p): Likewise.
8257 * rs6000-core.c (rs6000coff_core_p): Likewise.
8258 * sco5-core.c (sco5_core_file_p): Likewise.
8259
3f0a7f7f
AM
8260 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
8261 sign extension adjustments without conditionals.
8262
a3aa38ee
JJ
82632002-01-04 Jakub Jelinek <jakub@redhat.com>
8264
8265 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
8266 CIE at .eh_frame start is removed due to no FDEs referencing it.
8267
8a8b2d4b
AJ
82682002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
8269
8270 * config.bfd (x86_64-*-netbsd*): New target.
8271 * configure.in (x86_64-*-netbsd*): Set COREFILE
8272 to netbsd-core.lo.
8273 * configure: Regenerated.
8274
04b5af89
TR
82752002-01-03 Tom Rix <trix@redhat.com>
8276
8277 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
8278 for recent bfd_make_section_anyway change.
8279
51c5503b
NC
82802002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
8281
8282 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8283 R_ARM_THM_PC11 reloc.
8284
07f7c046
NC
82852002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
8286
8287 * configure.in (LINGUAS): Add ja.
8288 * configure: Regenerate.
8289 * po/ja.po: Import from translation project's web site.
8290
5eefb65f
NC
82912002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
8292
8293 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
8294 messages to ease translation into other languages.
8295
39e90f10 8296For older changes see ChangeLog-0001
56882138
AM
8297\f
8298Local Variables:
8299mode: change-log
8300left-margin: 8
8301fill-column: 74
8302version-control: never
8303End:
This page took 0.54834 seconds and 4 git commands to generate.