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