* elf32-sparc.c (elf32_sparc_relocate_section): Revert
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
1fbc4a84
JJ
12001-12-07 Jakub Jelinek <jakub@redhat.com>
2
3 * elf32-sparc.c (elf32_sparc_relocate_section): Revert
4 2001-09-14 change.
5
c629eae0
JJ
62001-12-07 Jakub Jelinek <jakub@redhat.com>
7
8 * elf.c (_bfd_elf_rela_local_sym): Only call
9 _bfd_merged_section_offset if merge_info is non-NULL.
10 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
11 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
12 prototypes.
13 * elf32-arm.h (elf32_arm_final_link_relocate): Use
14 _bfd_elf_section_offset.
15 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
16 * elf32-i386.c (elf_i386_relocate_section): Use
17 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
18 * elf32-sh.c (sh_elf_relocate_section): Likewise.
19 * elf32-sparc.c (elf32_sparc_relocate_section): Use
20 _bfd_elf_section_offset.
21 * elf32-cris.c (cris_elf_relocate_section): Likewise.
22 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
23 * elf32-i370.c (i370_elf_relocate_section): Likewise.
24 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
25 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
26 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
27 * elf32-s390.c (elf_s390_relocate_section): Likewise.
28 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
29 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
30 * elf64-s390.c (elf_s390_relocate_section): Likewise.
31 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
32 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
33 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
34
142f8c94
AM
352001-12-07 Alan Modra <amodra@bigpond.net.au>
36
37 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
38 already forced local.
39
e3c8793a
NC
402001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
41
42 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
43 fragmented sentence parts into a whole sentence to permit
44 better translation into foreign languages.
45
2858ef35
HPN
462001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
47
48 * configure: Regenerate.
49 * Makefile.in: Regenerate.
50
36b45482
TS
512001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
52
53 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
54 BFD64_LIBS, make the latter depending on the availability of BFD64.
55 Add archive64.c source file.
56 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
57 and bfd_elf64_archive_write_armap, code from elf64-mips.c
58 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
59 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
60 (mips64*el-*-linux*): Likewise.
61 (mips*el-*-linux*): Likewise. Reorder entries.
62 * configure.in (bfd_libs): Define in dependency of BFD64 and
63 AC_SUBST it.
64 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
65 bfd_elf64_archive_slurp_armap instead.
66 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
67 instead.
68
956cd1d6
TS
692001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
70
71 * config.bfd: Remove trailing blanks.
72 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
73
2888ec15
AO
742001-12-04 Alexandre Oliva <aoliva@redhat.com>
75
76 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
77 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
78 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
79 Disable pointless overflow checking of NONE and 32.
80
e207c4fa
AM
812001-12-04 Alan Modra <amodra@bigpond.net.au>
82
83 * reloc.c (bfd_install_relocation): Correct reloc address test.
84 (bfd_perform_relocation): Formatting fix.
85 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
86
2299ff43
NC
872001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
88
89 * configure.in (LINGUAS): Add tr.
90 * configure: Regenerate.
a9ef678d 91 * po/tr.po: Import from translation project's web site.
2299ff43 92
f09ebc7d
AM
932001-12-03 Alan Modra <amodra@bigpond.net.au>
94
95 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
96 happens to trigger on undefined symbols.
97 (final_link_relocate): Return bfd_reloc_undefined for undefined
98 stubs.
99 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
100 if we have already warned about an undefined symbol.
101
d75bc93d
TS
1022001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
103
104 * elf32-mips.c (NEWABI_P): New define.
105 (USE_REL): Remove, replaced by
106 (elf_backend_may_use_rel_p): New define.
107 (elf_backend_may_use_rela_p): Likewise.
108 (elf_backend_default_use_rela_p): Likewise.
109 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
110 Fix some relocation definitions.
111 (elf_mips_howto_table_rela): New RELA relocation definitions for
112 NewABI support.
113 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
114 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
115 (mips_rtype_to_howto): Likewise.
116 (_bfd_mips_elf_relocate_section): Likewise.
117 (_bfd_mips_elf_object_p): Typo.
118 (elf_backend_sign_extend_vma): Reordered together with many other
119 defines nearby to resemble the order of declaration in the header
120 file.
121
cdf6fd85
TS
1222001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
123
124 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
125 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
126 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
127 * elf32-mips.c (mips_reloc_map): Likewise. Replace
128 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
129 * elf64-mips.c (mips_reloc_map): Likewise.
130 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
131 (BFD_RELOC_MIPS_GPREL32): Remove.
132
215007a6
L
1332001-11-30 H.J. Lu <hjl@gnu.org>
134
135 * elflink.h (elf_add_default_symbol): New.
136 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
137 to create an indirect symbol from the default for the symbol
138 with the default version if needed.
139
fa49d224
NC
1402001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
141
142 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
143 if it has already been set by another thread.
144
f7460f5f
JJ
1452001-11-28 Jakub Jelinek <jakub@redhat.com>
146
147 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
148 (elf64_alpha_relocate_section): Translate local_got_entries
149 for STT_SECTION symbol to SHF_MERGE section the first time
150 we see it.
151 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
152 sec_merge_done.
153 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
154 (get_dyn_sym_info): Use it.
155 (elfNN_ia64_relocate_section): Translate local dyn entries
156 for STT_SECTION symbol to SHF_MERGE section the first time
157 we see it.
158
163c1c30
L
1592001-11-27 H.J. Lu <hjl@gnu.org>
160
161 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
162 ELF.
163
fd0999e1
JL
164Mon Nov 26 12:33:44 2001 Jeffrey A Law (law@cygnus.com)
165
166 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
167 prototypes.
168
a248e267
AM
1692001-11-24 Alan Modra <amodra@bigpond.net.au>
170
171 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
f09ebc7d 172 group sizes to accommodate c++.
a248e267 173
2e549b45
JJ
1742001-11-23 Jakub Jelinek <jakub@redhat.com>
175
176 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
177 relocations in non-alloced sections against global symbols
178 defined in shared library being built.
179 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
180
f8df10f4
JJ
1812001-11-23 Jakub Jelinek <jakub@redhat.com>
182
183 * elf.c (_bfd_elf_rela_local_sym): New.
184 * elflink.h (elf_link_input_bfd): Don't consider empty
185 merged sections as removed in relocation tests.
186 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
187 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
188 against STT_SECTION symbol of SHF_MERGE section.
189 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
190 * elf32-avr.c (elf32_avr_relocate_section): Call
191 _bfd_elf_rela_local_sym.
192 * elf32-cris.c (cris_elf_relocate_section): Likewise.
193 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
194 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
195 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
196 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
197 * elf32-i370.c (i370_elf_relocate_section): Likewise.
198 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
199 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
200 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
201 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
202 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
203 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
204 * elf32-s390.c (elf_s390_relocate_section): Likewise.
205 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
206 * elf32-v850.c (v850_elf_relocate_section): Likewise.
207 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
208 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
209 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
210 * elf64-s390.c (elf_s390_relocate_section): Likewise.
211 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
212 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
213 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
214 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
215 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
216 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
217 * elf32-sh.c (sh_elf_relocate_section): Likewise for
218 !partial_inplace relocs. Handle relocs against STT_SECTION
219 symbol of SHF_MERGE for partial_inplace relocs.
220
313e863f
NC
2212001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
222
223 * po/Make-in (distclean): Move SRC-POTFILES.in and
224 BLD-POTFILES.in to maintainer-clean target.
225
d7458677
AM
2262001-11-21 Alan Modra <amodra@bigpond.net.au>
227
228 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
229 than sym_sec->output_section to detect relocs against discarded
230 sections.
231
45e9217a
L
2322001-11-19 H.J. Lu <hjl@gnu.org>
233
234 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
235 discarding relocations.
236
84c254c6
NC
2372001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
238
239 * section.c (bfd_is_const_section): New macro. Return true if the
240 given seciton is one of the special, constant, sections.
241 * bfd-in2.h: Regenerate.
242 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
243 (coff_write_native_symbol): Use bfd_is_const_section.
244
e5ee5df1
AM
2452001-11-19 Alan Modra <amodra@bigpond.net.au>
246
a0e94dc0
AM
247 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
248
2a5aaecb
AM
249 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
250 millicode syms as candidates for import stubs.
251
e5ee5df1
AM
252 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
253 (allocate_PIC_calls): Rename to allocate_plt_static.
254 (allocate_dynrelocs): Move most of code handling .plt entries to..
255 (allocate_plt_static): ..here. Don't drop plabel entries.
256
6eeb40b2
HPN
2572001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
258
259 * mmo.c: Adjust documentation tags to use texinfo 4 features.
260
84c254c6
NC
2612001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
262
263 * section.c (bfd_is_const_section): New macro. Return true if the
264 section pointer refers to one of the special, constant sections.
265 * bfd-in2.h: Regenerate.
266
267 * coffgen.c (coff_count_linenumbers): Only update the line number
268 count in non-special sections.
269 (coff_write_native_symbol): Only update the line number file
270 position in non-special sections.
271
44421011
DJ
2722001-11-15 Daniel Jacobowitz <drow@mvista.com>
273
274 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
275 local syms from discarded sections. Update comment.
276
f9f32305
AM
2772001-11-15 Alan Modra <amodra@bigpond.net.au>
278
beb1d4ec
AM
279 * po/SRC-POTFILES.in: Regenerate.
280
f9f32305
AM
281 * elflink.h (elf_link_input_bfd): Complain about all relocs
282 against local syms from discarded sections. K&R fixes.
283 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
284 K&R fixes.
285
6361c4c9
AO
2862001-11-15 Alexandre Oliva <aoliva@redhat.com>
287
288 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
289 overflows in the .stab section.
290
73d074b4
DJ
2912001-11-14 Daniel Jacobowitz <drow@mvista.com>
292
293 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
294 (bfd_elf64_discard_info): Likewise.
295 * bfd-in2.h: Regenerate.
296 * elf-bfd.h (struct elf_reloc_cookie): New.
297 (struct elf_backend_data): Add elf_backend_discard_info,
298 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
299 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
300 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
301 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
302 (_bfd_elf32_mips_ignore_discarded_relocs): New.
303 (_bfd_elf32_mips_write_section): New.
304 (elf_backend_discard_info): Define.
305 (elf_backend_ignore_discarded_relocs): Define.
306 (elf_backend_write_section): Define.
307 * elfcode.h (elf_bfd_discard_info): Define.
308 (elf_reloc_symbol_deleted_p): Define.
309 * elflink.h (elf_link_input_bfd): Check
310 elf_section_ignore_discarded_relocs. Call
311 bed->elf_backend_write_section if available.
312 (elf_reloc_symbol_deleted_p): New.
313 (elf_bfd_discard_info): New.
314 (elf_section_ignore_discarded_relocs): New.
315 * elfxx-target.h (elf_backend_discard_info): Define.
316 (elf_backend_ignore_discarded_relocs): Define.
317 (elf_backend_write_section): Define.
318 (elfNN_bed): Add elf_backend_discard_info,
319 elf_backend_ignore_discarded_relocs, and
320 elf_backend_write_section.
321 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
322 * libbfd.h: Regenerate.
323 * stabs.c (_bfd_discard_section_stabs): New.
324
27018c3f
MS
3252001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
326
327 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
328 scheme to get rid of an ugly complicated test.
329 * elf64-s390.c (elf_s390_relocate_section): Likewise.
330
58a35813
AJ
3312001-11-14 Andreas Jaeger <aj@suse.de>
332
333 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
334 x86-64 for display.
335
d03ba2a1
JJ
3362001-11-14 Jakub Jelinek <jakub@redhat.com>
337
338 * dwarf2.c (struct line_head) [total_length]: Change type to
339 bfd_vma.
340 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
341 (struct comp_unit): Add stash and offset_size.
342 (read_8_bytes): Return bfd_vma.
343 (read_indirect_string): New.
344 (read_attribute): Handle DW_FORM_strp.
345 (decode_line_info): Support 64-bit DWARF format.
346 (_bfd_dwarf2_find_nearest_line): Likewise.
347 (parse_comp_unit): Set offset_size and stash.
348
cf716c56
RH
3492001-11-13 Keith Walker <keith.walker@arm.com>
350
351 * dwarf2.c (read_attribute_value): New function to handle
352 DW_FORM_indirect.
353 (read_attribute): Use it.
354
1a509dcc
GK
3552001-11-13 Geoffrey Keating <geoffk@redhat.com>
356
357 * dwarf2.c (decode_line_info): Properly deal with unknown standard
358 opcodes.
359
4e6bfe8a
AM
3602001-11-13 John Marshall <jmarshall@acm.org>
361 Alan Modra <amodra@bigpond.net.au>
362
363 * section.c (bfd_make_section_anyway): Don't increment section_id
364 and the BFD's section_count if adding the section failed.
365 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
366 change.
367
bc0d28ee
HPN
3682001-11-12 Orjan Friberg <orjanf@axis.com>
369
370 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
371 core dump format.
372
350836e3
L
3732001-11-11 H.J. Lu <hjl@gnu.org>
374
375 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
376 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
377
378 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
379 dynstr type to `struct elf_strtab_hash *'.
380
b959dc73
HPN
3812001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
382
383 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
384 size_t. Rename second i to j.
385
7e250b6c
JL
386Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
387
388 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
389
ec338859
AM
3902001-11-10 Alan Modra <amodra@bigpond.net.au>
391
392 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
393 relocs into shared libs.
394 * elf32-cris.c (cris_elf_relocate_section): Likewise.
395 * elf32-i370.c (i370_elf_relocate_section): Likewise.
396 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
397 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
398 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
399 * elf32-sh.c (sh_elf_relocate_section): Likewise.
400 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
401 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
402 * elf64-s390.c (elf_s390_relocate_section): Likewise.
403 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
404 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
405 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
406
407 * elf.c (bfd_section_from_r_symndx): New function.
408 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
409 (struct sym_sec_cache): New.
410 (bfd_section_from_r_symndx): Declare.
411 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
412 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
413 relocs when relocatable. Don't zero entire reloc, just zero the
414 addend and sym.
415 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
416 (elf32_hppa_link_hash_table_create): Init it.
417 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
418 syms on a per-section basis as we do for globals.
419 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
420 (allocate_dynrelocs): Warning fix.
421 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
422 section has been discarded.
423 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
424 into shared libs.
425 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
426 (elf_i386_link_hash_table_create): Init it.
427 (elf_i386_check_relocs): Track dynamic relocs needed for local
428 syms on a per-section basis as we do for globals.
429 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
430 Remove dead code.
431 (allocate_dynrelocs): Warning fix.
432 (elf_i386_size_dynamic_sections): Don't allocate relocs when
433 section has been discarded.
434 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
435 into shared libs.
436 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
437 (elf_s390_link_hash_table_create): Init it.
438 (elf_s390_check_relocs): Track dynamic relocs needed for local
439 syms on a per-section basis as we do for globals.
440 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
441 Remove dead code.
442 (allocate_dynrelocs): Warning fix.
443 (elf_s390_size_dynamic_sections): Don't allocate relocs when
444 section has been discarded.
445 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
446 into shared libs.
447 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
448 (ppc64_link_hash_table_create): Init it.
449 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
450 syms on a per-section basis as we do for globals.
451 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
452 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
453 function. Warning fix.
454 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
455 section has been discarded.
456 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
457 into shared libs.
458 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
459 (elf_s390_link_hash_table_create): Init it.
460 (elf_s390_check_relocs): Track dynamic relocs needed for local
461 syms on a per-section basis as we do for globals.
462 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
463 Remove dead code.
464 (allocate_dynrelocs): Warning fix.
465 (elf_s390_size_dynamic_sections): Don't allocate relocs when
466 section has been discarded.
467 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
468 into shared libs.
469
0451c93c
MS
4702001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
471
472 * elf32-s390: Major rework that introduces all recent changes to
473 the s390 backends. Get a closer match to elf32-i386.
474 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
475 Localise vars, and delay setting. Better error reporting, replace
476 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
477 symbol is not defined in the regular object file and tread the weak
478 definition as the normal one. Don't discard relocs for undefweak or
479 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
480 test for avoided copy relocs. Reinstate fudge for unresolved relocs
481 in debugging sections.
482 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
483 reloc processing for weakdefs. Remove redundant casts and aborts.
484 Delay setting of vars until needed. Move creation of dynamic symbols
485 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
486 BFD_ASSERT with abort. Discard .plt entries for everything with
487 plt.refcount <= 0.
488 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
489 .got or .relgot here but do it in allocate_dynrelocs. Reference count
490 possible .plt and .got entries. Don't test input section SEC_READONLY
491 here to try to avoid copy relocs, and keep dyn_relocs regardless of
492 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
493 variables until needed. Remove separate switch stmt for creating .got
494 section. Initialise local_got_refcounts to 0. Cache pointer to
495 "sreloc" section in elf_section_data. Tweak condition under which .got
496 created. Report files with bad relocation section names.
497 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
498 have been forced local. Use same test to decide if we can use a
499 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
500 comment. Move expressions out of function calls. Replace BFD_ASSERT
501 with abort.
502 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
503 statement. Replace BFD_ASSERT with abort.
504 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
505 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
506 instead of looking up section names for DT_TEXTREL. Replace
507 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
508 Add a comment to remind us that one day this ought to be fixed.
509 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
510 (struct elf_s390_link_hash_table): Likewise.
511 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
512 rid of unnecessary casts.
513 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
514 Remove "section" field.
515 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
516 Reference count possible .plt entries. Don't deallocate .got and
517 .relgot space here.
518 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
519 Update comment.
520 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
521 dyn_relocs.
522 (elf_s390_discard_copies): Delete.
523 (elf_s390_link_hash_traverse): Delete.
524 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
525 rather than gc variety).
526 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
527 srelplt, sdynbss, srelbss fields.
528 (elf_s390_link_hash_table_create): Init them.
529 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
530 (allocate_dynrelocs): New function.
531 (create_got_section): New function.
532 (elf_backend_can_refcount): Define.
533 (elf_backend_copy_indirect_symbol): Define.
534 (elf_s390_copy_indirect_symbol): New function.
535 (elf_s390_create_dynamic_sections): New function.
536 (readonly_dynrelocs): New function.
ec338859 537 * elf64-s390.c: Likewise.
0451c93c 538
2b0f7ef9
JJ
5392001-11-07 Jakub Jelinek <jakub@redhat.com>
540
541 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
542 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
543 (elf-strtab.lo): Add rule.
544 * Makefile.in: Rebuilt.
545 * configure.in (elf): Add elf-strtab.lo.
546 * configure: Rebuilt.
547 * elf-bfd.h (elf_strtab_hash): Forward declare.
548 (struct elf_link_hash_table): Change dynstr type to
549 struct elf_strtab_hash *.
550 (struct elf_obj_tdata): Change strtab_ptr type to
551 struct elf_strtab_hash *.
552 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
553 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
554 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
555 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
556 _bfd_elf_strtab_finalize): New prototypes.
557 * elf-strtab.c: New file.
558 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
559 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
560 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
561 when forcing dynamic symbol to local.
562 (elf_link_create_dynamic_sections): Call
563 _bfd_elf_strtab_init instead of elf_stringtab_init.
564 (elf_link_record_local_dynamic_symbol): Likewise, change
565 dynstr type. Use _bfd_elf_strtab functions instead of
566 _bfd_stringtab calls.
567 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
568 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
569 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
570 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
571 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
572 dynamic symbol to local.
573 (elf_link_assign_sym_version): Likewise.
574 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
575 _bfd_stringtab_emit.
576 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
577 type. Call _bfd_elf_strtab functions instead of
578 _bfd_stringtab functions.
579 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
580 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
581 (elf_fake_sections): Likewise.
582 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
583 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
584 name in the output. Call _bfd_elf_strtab_finalize and
585 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
586 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
587 instead of _bfd_stringtab_size.
588 (prep_headers): Change shstrtab type.
589 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
590
1d761fc5
AM
5912001-11-07 Alan Modra <amodra@bigpond.net.au>
592
593 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
594 bad symtab segfault. Formatting and warning fixes. Improve
595 error message for internationalisation.
596
f8deed93
L
5972001-11-06 H.J. Lu (hjl@gnu.org)
598
1d761fc5 599 * elflink.h (elf_link_input_bfd): Complain about relocs against
f8deed93
L
600 discarded sections.
601
7fda6dbc
AM
6022001-11-03 Alan Modra <amodra@bigpond.net.au>
603
604 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
605
d918dd35
L
6062001-11-02 H.J. Lu <hjl@gnu.org>
607
608 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
609 dynamic relocation for symbols defined in regular objects when
610 creating executables.
611
b8819ab2
NC
6122001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
613
3c62831e
NC
614 * configure.in (ALL_LINGUAS): Add "fr".
615 * configure: Regenerate.
616 * po/fr.po: New file.
617
b8819ab2
NC
618 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
619
21da9f89
NC
6202001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
621
622 * som.c (setup_sections): Initialize subspace_sections.
623
95f7d9f7
L
6242001-11-02 H.J. Lu (hjl@gnu.org)
625
626 * coffgen.c (coff_object_p): Return 0 if the header is too big.
627
12e1f53e
HPN
6282001-11-02 Hans-Peter Nilsson <hp@axis.com>
629
630 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
631 information. Save bfd arch and mach values. Restore on error.
632
a8d02d66
AM
6332001-11-02 Alan Modra <amodra@bigpond.net.au>
634
635 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
636 (allocate_PIC_calls): New function.
637 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
638 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
639 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
640
72209a1f
HPN
6412001-11-02 Hans-Peter Nilsson <hp@axis.com>
642
643 * elf32-cris.c (cris_elf_grok_prstatus): New function.
4a15251e 644 (cris_elf_grok_psinfo): New function.
72209a1f
HPN
645 (elf_backend_grok_prstatus): Define.
646 (elf_backend_grok_psinfo): Define.
647
86c76c7b
AM
6482001-11-01 Alan Modra <amodra@bigpond.net.au>
649
650 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
651 prediction bits.
652
afdbd6d0
CD
6532001-10-31 Chris Demetriou <cgd@demetriou.com>
654
655 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
656 relocations properly.
657
2cd533b7
L
6582001-10-31 H.J. Lu <hjl@gnu.org>
659
660 * elflink.h (elf_link_output_extsym): Don't clear the visibility
661 field for relocateable.
662
4578e0a7
AM
6632001-11-01 Alan Modra <amodra@bigpond.net.au>
664
4e12ff7f
AM
665 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
666 .plt relocs in DT_RELASZ.
4578e0a7 667
7649aa50
NC
6682001-10-29 NIIBE Yutaka <gniibe@m17n.org>
669
670 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
671 targets.
672
a53ecf01
NC
6732001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
674
675 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
676
3c3bdf30
NC
6772001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
678
679 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
680 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
681 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
682 Regenerate dependencies.
683 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
684 * config.bfd: [BFD64] (mmix-*-*): New case.
685 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
686 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
687 (bfd_mmix_arch): Declare.
688 (bfd_archures_list): Add bfd_mmix_arch.
689 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
690 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
691 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
692 bfd_mmo_mmix_vec.
693 * reloc.c: Add MMIX relocations.
694 * bfd.c (struct _bfd, tdata): Add mmo_data.
695 * Makefile.in: Regenerate.
696 * configure: Regenerate.
697 * libbfd.h: Regenerate.
698 * bfd-in2.h: Regenerate.
699 * configure: Rebuild.
700
e0e8c97f
NC
7012001-10-30 Richard Earnshaw (rearnsha@arm.com)
702
703 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
704 p_paddr of the segment that contains it.
f5ffc919
NC
705 (copy_private_bfd_data): If the LMA for a segment is known, use it
706 for matching sections to segments.
707 (assign_file_positions_for_segments): Use the LMA when adjusting
708 for inter-section alignment padding.
e0e8c97f 709
5b74f489
KH
7102001-10-29 Kazu Hirata <kazu@hxi.com>
711
712 * README: Fix a typo.
713
0b6488e2
RH
7142001-10-24 Richard Henderson <rth@redhat.com>
715
716 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
717 timestamp to time_t for ctime.
718
908d94bf
HPN
7192001-10-24 Hans-Peter Nilsson <hp@axis.com>
720
721 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
722 unsigned, increasing index.
723
1b58be7e
L
7242001-10-23 H.J. Lu <hjl@gnu.org>
725
726 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
727 m != NULL before accessing it.
728
ce757d15
AM
7292001-10-23 Alan Modra <amodra@bigpond.net.au>
730
731 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
732 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
733 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
734
735 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
736 (hppa_link_hash_newfunc): Likewise.
737 (elf32_hppa_finish_dynamic_symbol): Likewise.
738 (allocate_dynrelocs): Always allocate .got relocs if shared.
739 (elf32_hppa_relocate_section): Output them too. Similarly
740 consolidate .plt reloc code, and no longer initialise .plt
741 when a reloc is output.
742 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
743 when no reloc is output.
744
745 From Herbert Xu <herbert@gondor.apana.org.au>
746 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
747 unreachable branches.
748
ca51bfff
L
7492001-10-22 H.J. Lu <hjl@gnu.org>
750
751 * configure.in (WIN32LIBADD): Use -L../libiberty for
752 mips*-*-linux*.
753 * configure: Rebuild.
754
78be1d6e
L
7552001-10-21 H.J. Lu <hjl@gnu.org>
756
757 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
758 if shared library is enabled only for Linux hosts.
759 * configure: Rebuild.
760
1b90af26
L
7612001-10-21 H.J. Lu <hjl@gnu.org>
762
763 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
764 ../libiberty/Makefile instead of $enable_shared.
765 * configure: Rebuild.
766
ebe7507a
L
7672001-10-21 H.J. Lu <hjl@gnu.org>
768
908d94bf
HPN
769 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
770 index 0.
ebe7507a 771
39691762
L
7722001-10-20 H.J. Lu <hjl@gnu.org>
773
774 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
775 if shared library is enabled.
776 * configure: Rebuild.
777
6a7805b5
L
7782001-10-20 H.J. Lu <hjl@gnu.org>
779
780 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
781
e0740195
L
7822001-10-19 H.J. Lu <hjl@gnu.org>
783
784 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
785 size is empty.
786
7595d193
L
7872001-10-18 H.J. Lu <hjl@gnu.org>
788
789 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
790 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
791
25263aad
JJ
7922001-10-18 Jakub Jelinek <jakub@redhat.com>
793
794 * section.c (_bfd_strip_section_from_output): Don't count
795 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
796
973ffd63
AM
7972001-10-17 Alan Modra <amodra@bigpond.net.au>
798
799 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
800 Elf_Internal_Shdr.contents now that it's no longer a PTR.
801 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
802 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
803 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
804 * elf32-sh.c (sh_elf_relax_section): Likewise.
805 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
806 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
807 * elf.c (setup_group): Warning fixes.
808 * elflink.h (elf_link_sort_relocs): Likewise.
809 * pdp11.c (slurp_reloc_table): Likewise.
810
df22989b
JH
8112001-10-16 Jeff Holcomb <jeffh@redhat.com>
812
813 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
814 casts.
815
1e09179f
L
8162001-10-15 H.J. Lu <hjl@gnu.org>
817
818 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
819 for relocations against discarded link-once section.
820
1e370bd2
AM
8212001-10-15 Alan Modra <amodra@bigpond.net.au>
822
cf5c0c5b
AM
823 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
824 bfd_reloc_outofrange and similar errors.
825
1e370bd2
AM
826 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
827 rather than ind->weakdef.
828 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
829 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
830 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
831 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
832 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
833
bbd7ec4a
AM
8342001-10-15 Alan Modra <amodra@bigpond.net.au>
835 H.J. Lu <hjl@gnu.org>
836
837 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
838 counts for aliases instead of aborting.
839 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
840 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
841
842 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
843 to -1 for non-function symbols.
844 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
845 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
846 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
847 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
848 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
849 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
850 plt.offset instead of plt.refcount when setting to -1.
851
6a360bf4
NC
8522001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
853
854 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
855 like R_ARM_PC24. Include reloc number in error message about
856 unresolvable relocs.
857
290394d6
JJ
8582001-10-10 Jakub Jelinek <jakub@redhat.com>
859
860 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
861 relocations against the same symbol in .rel{,a}.dyn section.
862
08da05b0
KH
8632001-10-10 Kazu Hirata <kazu@hxi.com>
864
865 * aout-encap.c: Fix comment typos.
866 * aoutx.h: Likewise.
867 * archive.c: Likewise.
868 * bout.c: Likewise.
869 * coff64-rs6000.c: Likewise.
870 * coffcode.h: Likewise.
871 * coffgen.c: Likewise.
872 * cofflink.c: Likewise.
873 * coff-mips.c: Likewise.
874 * ecoff.c: Likewise.
875 * elf32-m32r.c: Likewise.
876 * libcoff-in.h: Likewise.
877 * libecoff.h: Likewise.
878 * libxcoff.h: Likewise.
879 * nlm32-i386.c: Likewise.
880 * pdp11.c: Likewise.
881 * section.c: Likewise.
882 * som.c: Likewise.
883 * som.h: Likewise.
884 * bfd-in2.h: Regenerate.
885 * libcoff.h: Likewise.
886
079e9a2f
AM
8872001-10-10 Alan Modra <amodra@bigpond.net.au>
888
889 * elf.c (elf_map_symbols): Don't create new section symbols; Use
890 existing section syms. Update comments.
891 (copy_private_bfd_data): Formatting fixes.
892 (elfcore_grok_win32pstatus): Likewise.
893 (swap_out_syms): Likewise. Remove unnecessary level of braces.
894
945906ff
AM
8952001-10-09 Alan Modra <amodra@bigpond.net.au>
896
897 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
898 "group_name".
899 (elf_group_name): Define.
900 (elf_next_in_group): Define.
901 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
902 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
903 first member section; Instead use elf_next_in_group.
904 (bfd_section_from_shdr): Likewise.
905 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
906
dbb410c3
AM
9072001-10-09 Alan Modra <amodra@bigpond.net.au>
908
909 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
910 "next_in_group". Fix gp and gp_size comments.
911 * elf.c (union elf_internal_group): New.
912 (setup_group): New function.
913 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
914 Call setup_group for SHF_GROUP sections.
915 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
916 (elf_fake_sections): Set header type for SEC_GROUP, and header
917 flags for sections in a group.
918 (set_group_contents): New function.
919 (_bfd_elf_compute_section_file_positions): Call it.
920 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 921
dbb410c3
AM
922 * elflink.h (gc_mark_hook): Handle section groups.
923 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
924 * section.c (SEC_GROUP): Define.
925 (struct sec): Comment fixes.
926 * bfd-in2.h: Regenerate.
927
928 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
929 out of function args.
930 (_bfd_elf_canonicalize_reloc): Similarly.
931 (_bfd_elf_get_symtab): Here too.
932 (_bfd_elf_canonicalize_dynamic_symtab): And here.
933 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
934 bfd_bread, and remove unnecessary cast.
935
24c603fa
AH
9362001-10-08 Aldy Hernandez <aldyh@redhat.com>
937
bbd7ec4a 938 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 939
3f5864e1
SC
9402001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
941
942 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
943 compilation unit.
944
fb9ceeac
AM
9452001-10-06 Alan Modra <amodra@bigpond.net.au>
946
aec2f561
AM
947 * bfd.c (bfd_assert): Report bfd version.
948 (_bfd_abort): Likewise.
949
50b4d486
AM
950 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
951 section sym values. Instead replace any relocs against them with
952 relocs against STN_UNDEF, which has a zero value.
953
fb9ceeac
AM
954 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
955 relocs.
956
17617495
JL
9572001-10-05 Jeff Law <law@redhat.com>
958
959 * som.h (som_exec_data): New field "version_id".
960 * som.c (som_object_setup): Record the version_id if it
961 exists.
962 (som_prep_headers): Do not initialize version_id here.
963 (som_finish_writing): Initialize version_id here.
964
9652000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
966
967 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
968 according to the MIPS/SGI ELF64 ABI Draft.
969 (mips_elf_sort_hash_table): Typo.
970
58e3d09d
AM
9712001-10-04 Alan Modra <amodra@bigpond.net.au>
972
8ea52284
AM
973 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
974
58e3d09d
AM
975 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
976 copying flags if this is a weakdef.
977
b13c7b49
AM
9782001-10-04 Alan Modra <amodra@bigpond.net.au>
979
a90b9fca
AM
980 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
981 packing.
982
bbd7ec4a 983 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
984 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
985 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
986
b13c7b49
AM
987 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
988 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
989 backends we configure. Run "make dep-am".
990 (install-data-local): Install symcat.h.
991 * dep-in.sed: Remove symcat.h from dependencies.
992 * Makefile.in: Regenerate.
993
8bd621d8
AM
9942001-10-03 Vassili Karpov <malc@pulsesoft.com>
995
996 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
997
1e2be829
TS
9982001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
999
1000 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1001 (elf_backend_default_use_rela_p): New define.
1002
0a991dfe
AM
10032001-10-03 Alan Modra <amodra@bigpond.net.au>
1004
57c7194e
AM
1005 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1006 change.
1007
87b632fc
AM
1008 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1009 * configure: Regenerate.
1010 * Makefile.am (BFD_H_FILES): Add version.h.
1011 * Makefile.in: Regenerate.
1012 * po/SRC-POTFILES.in: Regenerate.
1013
0a991dfe
AM
1014 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1015 elf_backend_copy_indirect_symbol so that backend has a chance to
1016 copy other necessary fields.
1017 * elf-bfd.h (struct elf_backend_data): Update description of
1018 elf_backend_copy_indirect_symbol.
1019 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1020 copying flags if this is a weakdef.
1021 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1022 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1023 than bfd_link_hash_lookup.
bbd7ec4a 1024 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
1025 reloc processing for weakdefs.
1026 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1027 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1028
a33d1f77
AM
10292001-10-02 Alan Modra <amodra@bigpond.net.au>
1030
1031 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1032 result of ELF64_R_TYPE to enum before using in a switch.
1033 (ppc64_elf_gc_mark_hook): Likewise.
1034 (ppc64_elf_gc_sweep_hook): Likewise.
1035 (ppc64_elf_reloc_type_class): Likewise.
1036
e43d48cc
AM
10372001-10-02 Alan Modra <amodra@bigpond.net.au>
1038
1039 * version.h: New file.
1040 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1041 (BFD_VERSION_DATE): Define.
1042 (BFD_VERSION_STRING): Define.
1043 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1044 bfd_version_string.
1045 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1046 * bfd-in2.h: Regenerate.
1047 * configure: Regenerate.
1048 * Makefile.am: Run "make dep-am".
1049 * Makefile.in: Regenerate.
1050
1051 * bfd-in.h: Include "symcat.h".
1052 (CONCAT4): Redefine as for old CAT4.
1053 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1054 Add warning regarding whitespace.
1055 * aout-cris.c: Likewise.
1056 * aout-ns32k.c: Likewise.
1057 * aout-sparcle.c: Likewise.
1058 * aout-tic30.c: Likewise.
1059 * aout0.c: Likewise.
1060 * armnetbsd.c: Likewise.
1061 * demo64.c: Likewise.
1062 * elf-bfd.h: Likewise.
1063 * gen-aout.c: Likewise.
1064 * host-aout.c: Likewise.
1065 * hp300bsd.c: Likewise.
1066 * hp300hpux.c: Likewise.
1067 * i386aout.c: Likewise.
1068 * i386bsd.c: Likewise.
1069 * i386dynix.c: Likewise.
1070 * i386freebsd.c: Likewise.
1071 * i386linux.c: Likewise.
1072 * i386lynx.c: Likewise.
1073 * i386mach3.c: Likewise.
1074 * i386netbsd.c: Likewise.
1075 * libaout.h: Likewise.
1076 * m68k4knetbsd.c: Likewise.
1077 * m68klinux.c: Likewise.
1078 * m68klynx.c: Likewise.
1079 * m68knetbsd.c: Likewise.
1080 * m88kmach3.c: Likewise.
1081 * mipsbsd.c: Likewise.
1082 * newsos3.c: Likewise.
1083 * ns32knetbsd.c: Likewise.
1084 * pc532-mach.c: Likewise.
1085 * pdp11.c: Likewise.
1086 * riscix.c: Likewise.
1087 * sparclinux.c: Likewise.
1088 * sparclynx.c: Likewise.
1089 * sparcnetbsd.c: Likewise.
1090 * sunos.c: Likewise.
1091 * targets.c: Likewise.
1092 * vaxnetbsd.c: Likewise.
1093 * vms-hdr.c: Likewise.
1094
4eef72c7
AM
10952001-10-01 Alan Modra <amodra@bigpond.net.au>
1096
1097 * bfd-in.h: Remove comments regarding generated files.
1098 * libbfd-in.h: Likewise.
1099 * libcoff-in.h: Likewise.
1100 * bfd-in2.h: Regenerate.
1101 * libbfd.h: Likewise.
1102 * libcoff.h: Likewise.
1103
146be91a 11042001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 1105 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
1106
1107 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1108 partial_inplace, matching assembler output. Set src_mask to
1109 all ones.
1110 (sh_elf_relocate_section): Delete misplaced comment.
1111 For relocatable linking against section symbol, call
1112 _bfd_relocate_contents for partial_inplace relocs and adjust
1113 rel->r_addend for others.
1114 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1115 bfd_get_32, not at rel->r_addend.
1116
3c3e9281
AM
11172001-09-30 Alan Modra <amodra@bigpond.net.au>
1118
1119 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1120 the old dir refcount, so we indirectly set them to init_refcount.
1121 Short-circuit asserts when we've just verified they are true.
1122
862517b6
AM
11232001-09-29 Alan Modra <amodra@bigpond.net.au>
1124
1125 * section.c (struct sec): Remove kept_section.
1126 (STD_SECTION): Remove kept_section initialisation.
1127 (bfd_make_section_anyway): Here too.
1128 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1129 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1130 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1131 symbols to zero, and remove all code involved with kept_section
1132 and tracking section symbol values.
1133 * bfd-in2.h: Regenerate.
1134 * configure.in: Bump version number.
1135 * configure: Regenerate.
1136
65f38f15
AM
11372001-09-29 Alan Modra <amodra@bigpond.net.au>
1138
1139 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1140 (IS_ABSOLUTE_RELOC): Define.
1141 (struct ppc_link_hash_entry): New.
1142 (struct ppc_link_hash_table): New.
1143 (ppc_hash_table): Define.
1144 (link_hash_newfunc): New function.
1145 (ppc64_elf_link_hash_table_create): New function.
1146 (create_got_section): New function.
1147 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1148 pointers to our dynamic sections in hash table.
1149 (ppc64_elf_copy_indirect_symbol): New function.
1150 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1151 dynamic sections. Localise vars. Modify code for refcounts
1152 starting from zero. Don't allocate here, or force symbols dynamic.
1153 Don't copy all relocs if shared, select ones we need. Add code
1154 to track possible copy relocs for non-shared link.
1155 (ppc64_elf_gc_mark_hook): Update comment.
1156 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1157 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1158 code for reference counting garbage collection. Don't create .plt
1159 entries for functions that don't comply with ABI naming convention,
1160 and don't allocate .plt space here. Use short-cuts to dynamic
1161 sections. If possible, keep dynamic relocations instead of using
1162 copy relocs. Remove confused comments.
1163 (ppc_adjust_dynindx): Delete.
1164 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1165 (allocate_dynrelocs): New function.
1166 (readonly_dynrelocs): New function.
1167 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1168 space here, and call allocate_dynrelocs to allocate space for
1169 global .plt, .got and reloc sections. Use short-cuts to dynamic
1170 sections. Call readonly_dynrelocs to determine whether we need
1171 DT_TEXTREL. Don't generate section symbols here, the generic
1172 ELF linker code does it for us.
1173 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1174 gc variety, since we do our own .got handling.
1175 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1176 dynamic section short-cuts. Localise vars, and delay setting.
1177 Handle unknown relocs in main switch statement. Replace ugly
1178 complicated tests for unresolvable relocs with a simple direct
1179 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1180 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1181 after main switch, when we've set addend. Do non-addend insn
1182 tweaks before main swithc. Ignore input_section->vma when
1183 calculating reloc offsets as it's always zero. Rewrite dynamic
1184 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1185 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1186 of dynamic section short-cuts. Reorganise .plt handling code.
1187 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1188 Move expressions out of swap_reloca_out function calls.
1189 (ppc64_elf_reloc_type_class): New function.
1190 (ppc64_elf_info_to_howto): Move common expression to local var.
1191 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1192 of dynamic section short-cuts. Don't fiddle with section syms
1193 here as the ELF linker does it for us.
1194 (elf_backend_can_refcount): Define.
1195 (bfd_elf64_bfd_link_hash_table_create): Define.
1196 (elf_backend_copy_indirect_symbol): Define.
1197 (elf_backend_reloc_type_class): Define.
1198 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1199
21d17a58
AM
12002001-09-29 Alan Modra <amodra@bigpond.net.au>
1201
51b64d56
AM
1202 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1203 (struct elf_backend_data): Add can_refcount.
1204 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1205 got.refcount and plt.refcount from init_refcount.
1206 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1207 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1208 rather than got/plt.offset, and test for <= 0 rather than -1.
1209 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1210 * elfxx-target.h (elf_backend_can_refcount): Define.
1211 (elfNN_bed): Init can_refcount.
1212 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1213 (_bfd_generic_link_hash_newfunc): Likewise.
1214 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1215 starting from zero.
1216 (elf_backend_can_refcount): Define.
1217 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1218 starting from zero.
1219 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1220 prototype.
1221 (elf_backend_can_refcount): Define.
1222 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1223 starting from zero.
1224 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1225 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1226 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1227 (elf_backend_can_refcount): Define.
1228 (elf_i386_copy_indirect_symbol): Make static to agree with
1229 prototype. Formatting fix.
1230 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1231 starting from zero.
1232 (elf_backend_can_refcount): Define.
1233 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1234 starting from zero.
1235 (elf_backend_can_refcount): Define.
1236 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1237 starting from zero.
1238 (elf_backend_can_refcount): Define.
1239 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1240 starting from zero.
1241 (elf_backend_can_refcount): Define.
1242 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1243 starting from zero.
1244 (elf_backend_can_refcount): Define.
1245
21d17a58
AM
1246 * som.c (som_write_symbol_strings): Cast current_offset in
1247 bfd_seek call to match param type.
1248
78ae4cb9
JB
12492001-09-28 J. Brobecker <brobecker@gnat.com>
1250
1251 * som.c (som_write_symbol_strings): Fix incorrect type of
1252 current_offset to match the function definition. Fixes a build
1253 failure on HPUX-11.00.
1254
65db3b0d
RH
12552001-09-28 Richard Henderson <rth@redhat.com>
1256
e0aae569
RH
1257 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1258 SEC_MERGE, SEC_STRINGS.
1259
65db3b0d
RH
1260 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1261 * bfd-in2.h: Rebuild.
1262
ced53ee5
AM
12632001-09-28 Alan Modra <amodra@bigpond.net.au>
1264
ffaef159
AM
1265 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1266 reloc code using x86_64_reloc_map.
1267
3ac8354b
AM
1268 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1269 no longer allocate here. Localise some vars to blocks where they
1270 are used.
1271 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1272 setting of vars until needed.
1273 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1274 when symbol visibilty makes a function local.
1275 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1276 swap_reloca_out function calls.
1277 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1278 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1279 switch statement.
1280
0ac8d2ca
AM
1281 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1282 no longer allocate here. Localise some vars to blocks where they
1283 are used. Remove separate switch stmt for creating .got sec.
1284 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1285 redundant casts and aborts. Delay setting of vars until needed.
1286 (allocate_dynrelocs): Remove redundant casts and aborts.
1287 (elf_i386_size_dynamic_sections): Move comment.
1288 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1289 calls.
1290 (elf_i386_relocate_section): Likewise. Comment typo fix.
1291 (elf_i386_finish_dynamic_sections): Migrate common code out of
1292 switch statement.
1293 (elf_backend_* defines): Sort.
1294
ced53ee5
AM
1295 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1296 without a reloc when symbol visibilty makes a function local.
1297
63b0f745
NC
12982001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1299
06317a27
NC
1300 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1301 conflicting float flags.
63b0f745 1302
ebe50bae
AM
13032001-09-26 Alan Modra <amodra@bigpond.net.au>
1304
1305 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1306 (elf_backend_copy_indirect_symbol): Define.
1307 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1308 (struct elf_i386_link_hash_table): Likewise.
1309 (link_hash_newfunc): Get rid of unnecessary casts.
1310 (elf_i386_link_hash_table_create): Likewise.
1311 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1312 Don't test input section SEC_READONLY here to try to avoid copy
1313 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1314 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1315 here to properly test whether we need copy relocs. Do so for weak
1316 syms too.
1317
1318 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1319 (elf_backend_copy_indirect_symbol): Define.
1320 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1321 (stub_hash_newfunc): Get rid of unnecessary casts.
1322 (hppa_link_hash_newfunc): Likewise.
1323 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1324 Don't test input section SEC_READONLY here to try to avoid copy
1325 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1326 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1327 here to properly test whether we need copy relocs. Do so for weak
1328 syms too.
1329
af6166c0
AM
13302001-09-26 Alan Modra <amodra@bigpond.net.au>
1331
1332 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1333 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1334 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1335
e62de969
JJ
13362001-09-25 Jakub Jelinek <jakub@redhat.com>
1337
1338 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1339 computation.
1340
09c1cc88
L
13412001-09-25 H.J. Lu <hjl@gnu.org>
1342
1343 * bfd-in2.h: Regenerated.
1344
38701953
AM
13452001-09-25 Alan Modra <amodra@bigpond.net.au>
1346
1347 * elf32-i386.c: Add comment re linker function names and ordering.
1348 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1349 (elf_i386_grok_prstatus): Move before linker functions.
1350 (elf_i386_grok_psinfo): Likewise.
1351 (elf_i386_fake_sections): Move so that functions are ordered.
1352 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1353
98ceb8ce
AM
13542001-09-25 Alan Modra <amodra@bigpond.net.au>
1355
0ac8d2ca 1356 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
1357 throughout file.
1358
98ceb8ce
AM
1359 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1360 code handling this option.
1361 (LONG_BRANCH_VIA_PLT): Likewise.
1362 (RELATIVE_DYNRELOCS): Define as zero.
1363 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1364 "pc_count" fields. Remove "section" field.
1365 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1366 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1367 relocs here. Instead, record all needed dynamic relocs via
1368 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1369 in elf_section_data.
1370 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1371 (allocate_plt_and_got_and_discard_relocs): Rename to
1372 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1373 (readonly_dynrelocs): New function.
1374 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1375 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1376 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1377 (elf32_hppa_relocate_section): Make use of cached sreloc.
1378 (elf32_hppa_reloc_type_class): New function.
1379 (elf_backend_reloc_type_class): Define.
1380
0c715baa
AM
13812001-09-25 Alan Modra <amodra@bigpond.net.au>
1382
1383 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1384 and "sreloc" fields.
1385 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1386 "pc_count" fields. Remove "section" field.
1387 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1388 allocate space for dynamic relocs here. Instead, record all
1389 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1390 pointer to "sreloc" section in elf_section_data.
1391 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1392 (allocate_plt_and_got_and_discard_relocs): Rename to
1393 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1394 (readonly_dynrelocs): New function.
1395 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1396 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1397 (elf_i386_relocate_section): Make use of cached sreloc.
1398
f51e552e
AM
13992001-09-24 Alan Modra <amodra@bigpond.net.au>
1400
1401 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1402 reloc rather than just the type.
1403 (_bfd_elf_reloc_type_class): Likewise.
1404 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1405 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1406 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1407 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1408 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1409 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1410 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1411 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1412 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1413 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1414 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1415 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1416 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1417 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1418 * elflink.h: Formatting fixes.
1419 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1420 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1421 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1422
0c35f01a
AM
14232001-09-22 John Reiser <jreiser@BitWagon.com>
1424
1425 * elfcode.h (elf_object_p): Allow for no section header at all in
1426 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1427
1e738b87
NC
14282001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1429
1430 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
1431 * coff-mcore.c: Fix compile time warning messages.
1432 * coff-ppc.c: Fix compile time warning messages.
1433 * coffcode.h: Fix compile time warning messages.
1434 * elf32-mips.c: Fix compile time warning messages.
1435 * elf64-alpha.c: Fix compile time warning messages.
1436 * libbfd.c: Fix compile time warning messages.
1437 * bfd-in2.h: Regenerate.
1e738b87 1438
923f08ff
AM
14392001-09-21 Alan Modra <amodra@bigpond.net.au>
1440
1441 * Makefile.am: Run "make dep-am".
1442 * Makefile.in: Regenerate.
1443
1444 * aoutx.h: Formatting fixes.
1445 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1446
1447 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1448 in error message.
1449
8f615d07
AM
14502001-09-21 Alan Modra <amodra@bigpond.net.au>
1451
1452 * bfd.c (bfd_archive_filename): New function.
1453 * bfd-in2.h: Regenerate.
1454 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1455 in error messages where the bfd is an input bfd.
1456 * aout-cris.c: Likewise.
1457 * coff-arm.c: Likewise.
1458 * coff-mcore.c: Likewise.
1459 * coff-ppc.c: Likewise.
1460 * coff-rs6000.c: Likewise.
1461 * coff-sh.c: Likewise.
1462 * coff-tic54x.c: Likewise.
1463 * coff-tic80.c: Likewise.
1464 * coff64-rs6000.c: Likewise.
1465 * coffcode.h: Likewise.
1466 * coffgen.c: Likewise.
1467 * cofflink.c: Likewise.
1468 * ecofflink.c: Likewise.
1469 * elf-hppa.h: Likewise.
1470 * elf.c: Likewise.
1471 * elf32-arm.h: Likewise.
1472 * elf32-cris.c: Likewise.
1473 * elf32-gen.c: Likewise.
1474 * elf32-hppa.c: Likewise.
1475 * elf32-i370.c: Likewise.
1476 * elf32-i386.c: Likewise.
1477 * elf32-m32r.c: Likewise.
1478 * elf32-mcore.c: Likewise.
1479 * elf32-mips.c: Likewise.
1480 * elf32-ppc.c: Likewise.
1481 * elf32-s390.c: Likewise.
1482 * elf32-sh.c: Likewise.
1483 * elf32-sparc.c: Likewise.
1484 * elf32-v850.c: Likewise.
1485 * elf64-alpha.c: Likewise.
1486 * elf64-gen.c: Likewise.
1487 * elf64-ppc.c: Likewise.
1488 * elf64-s390.c: Likewise.
1489 * elf64-sparc.c: Likewise.
1490 * elf64-x86-64.c: Likewise.
1491 * elflink.h: Likewise.
1492 * elfxx-ia64.c: Likewise.
1493 * ieee.c: Likewise.
1494 * ihex.c: Likewise.
1495 * libbfd.c: Likewise.
1496 * pdp11.c: Likewise.
1497 * pe-mips.c: Likewise.
1498 * peicode.h: Likewise.
1499 * srec.c: Likewise.
1500 * xcofflink.c: Likewise.
1501
1502 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1503
1504 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1505 error message.
1506
1507 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1508 error message.
1509
1510 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1511 Consolidate error messages, and split long messages to two lines.
1512
671bae9c 15132001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 1514
f51e552e
AM
1515 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1516 and info->allow_shlib_undefined.
1517 * elf32-cris.c: Likewise.
1518 * elf32-hppa.c: Likewise.
1519 * elf32-m68k.c: Likewise.
1520 * elf32-mips.c: Likewise.
1521 * elf32-ppc.c: Likewise.
1522 * elf32-s390.c: Likewise.
1523 * elf32-sh.c: Likewise.
1524 * elf32-sparc.c: Likewise.
1525 * elf64-alpha.c: Likewise.
1526 * elf64-hppa.c: Likewise.
1527 * elf64-ppc.c: Likewise.
1528 * elf64-s390.c: Likewise.
1529 * elf64-sparc.c: Likewise.
1530 * elf64-x86-64.c: Likewise.
1531 * elfxx-ia64.c: Likewise.
671bae9c 1532
3882b010
L
15332001-09-18 Bruno Haible <haible@clisp.cons.org>
1534
1535 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1536 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1537 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1538 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1539 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1540 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1541 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1542 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1543 isxdigit/isdigit/islower.
1544 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1545 (mangle_name): Use ISALNUM instead of isalnum.
1546 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1547 (scan): Use ISDIGIT instead of isdigit.
1548 * hosts/alphavms.h: Don't include <ctype.h>.
1549 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1550 (ieee_object_p): Use TOUPPER instead of toupper.
1551 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1552 (ihex_bad_byte): Use ISPRINT instead of isprint.
1553 * merge.c: Don't include <ctype.h>.
1554 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1555 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1556 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1557 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1558 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1559 (mangle_name): Use ISALNUM instead of isalnum.
1560 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1561 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1562 isupper/islower/isdigit.
1563 (som_decode_symclass): Use TOUPPER instead of toupper.
1564 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1565 (srec_bad_byte): Use ISPRINT instead of isprint.
1566 (srec_scan): Use ISSPACE instead of isspace.
1567 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1568 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1569 * syms.c: Include "safe-ctype.h"
1570 (islower, toupper): Remove macro definitions.
1571 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1572 * vms-gsd.c: Don't include <ctype.h>.
1573 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1574 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1575 islower/toupper.
1576 * vms-tir.c: Don't include <ctype.h>.
1577
dc810e39
AM
15782001-09-18 Alan Modra <amodra@bigpond.net.au>
1579
1580 * libbfd.c (bfd_bread): New function replacing bfd_read without
1581 redundant params. Allow reads up to (size_t) -2 in length.
1582 (bfd_bwrite): Similarly for bfd_write.
1583 (real_read): Return a size_t.
1584 (bfd_read): Call bfd_bread.
1585 (bfd_write): Call bfd_bwrite.
1586 (warn_deprecated): New function to annoy everybody.
1587 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1588 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1589 (bfd_read, bfd_write): Define as macro.
1590 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1591 likewise for bfd_write. Ensure function args are correct size by
1592 using casts or local vars. In some cases, remove unnecessary
1593 casts. Formatting fixes, in some cases removing a large expression
1594 from function args by using a local var. Replace CONST with const.
1595 Modify variable types to avoid warings. Use casts to avoid
1596 warnings when using negative numbers in unsigned expressions.
1597 * aout-adobe.c: Likewise.
1598 * aout-arm.c: Likewise.
1599 * aout-cris.c: Likewise.
1600 * aout-encap.c: Likewise.
1601 * aout-ns32k.c: Likewise.
1602 * aout-target.h: Likewise.
1603 * aout-tic30.c: Likewise.
1604 * aoutf1.h: Likewise.
1605 * aoutx.h: Likewise.
1606 * archive.c: Likewise.
1607 * archures.c: Likewise.
1608 * bfd-in.h: Likewise.
1609 * bfd.c: Likewise.
1610 * binary.c: Likewise.
1611 * bout.c: Likewise.
1612 * cache.c: Likewise.
1613 * cisco-core.c: Likewise.
1614 * coff-a29k.c: Likewise.
1615 * coff-alpha.c: Likewise.
1616 * coff-arm.c: Likewise.
1617 * coff-h8300.c: Likewise.
1618 * coff-h8500.c: Likewise.
1619 * coff-i386.c: Likewise.
1620 * coff-i860.c: Likewise.
1621 * coff-i960.c: Likewise.
1622 * coff-ia64.c: Likewise.
1623 * coff-m68k.c: Likewise.
1624 * coff-m88k.c: Likewise.
1625 * coff-mcore.c: Likewise.
1626 * coff-mips.c: Likewise.
1627 * coff-ppc.c: Likewise.
1628 * coff-rs6000.c: Likewise.
1629 * coff-sh.c: Likewise.
1630 * coff-sparc.c: Likewise.
1631 * coff-stgo32.c: Likewise.
1632 * coff-tic30.c: Likewise.
1633 * coff-tic54x.c: Likewise.
1634 * coff-tic80.c: Likewise.
1635 * coff-w65.c: Likewise.
1636 * coff-z8k.c: Likewise.
1637 * coff64-rs6000.c: Likewise.
1638 * coffcode.h: Likewise.
1639 * coffgen.c: Likewise.
1640 * cofflink.c: Likewise.
1641 * coffswap.h: Likewise.
1642 * corefile.c: Likewise.
1643 * cpu-arc.c: Likewise.
1644 * cpu-h8300.c: Likewise.
1645 * cpu-h8500.c: Likewise.
1646 * cpu-i960.c: Likewise.
1647 * cpu-ia64-opc.c: Likewise.
1648 * cpu-ns32k.c: Likewise.
1649 * cpu-pdp11.c: Likewise.
1650 * cpu-pj.c: Likewise.
1651 * cpu-sh.c: Likewise.
1652 * cpu-w65.c: Likewise.
1653 * cpu-z8k.c: Likewise.
1654 * dwarf1.c: Likewise.
1655 * dwarf2.c: Likewise.
1656 * ecoff.c: Likewise.
1657 * ecofflink.c: Likewise.
1658 * ecoffswap.h: Likewise.
1659 * elf-bfd.h: Likewise.
1660 * elf-hppa.h: Likewise.
1661 * elf-m10200.c: Likewise.
1662 * elf-m10300.c: Likewise.
1663 * elf.c: Likewise.
1664 * elf32-arc.c: Likewise.
1665 * elf32-arm.h: Likewise.
1666 * elf32-avr.c: Likewise.
1667 * elf32-cris.c: Likewise.
1668 * elf32-fr30.c: Likewise.
1669 * elf32-gen.c: Likewise.
1670 * elf32-h8300.c: Likewise.
1671 * elf32-hppa.c: Likewise.
1672 * elf32-i370.c: Likewise.
1673 * elf32-i386.c: Likewise.
1674 * elf32-i860.c: Likewise.
1675 * elf32-m32r.c: Likewise.
1676 * elf32-m68k.c: Likewise.
1677 * elf32-mcore.c: Likewise.
1678 * elf32-mips.c: Likewise.
1679 * elf32-openrisc.c: Likewise.
1680 * elf32-pj.c: Likewise.
1681 * elf32-ppc.c: Likewise.
1682 * elf32-s390.c: Likewise.
1683 * elf32-sh-lin.c: Likewise.
1684 * elf32-sh.c: Likewise.
1685 * elf32-sparc.c: Likewise.
1686 * elf32-v850.c: Likewise.
1687 * elf64-alpha.c: Likewise.
1688 * elf64-hppa.c: Likewise.
1689 * elf64-mips.c: Likewise.
1690 * elf64-ppc.c: Likewise.
1691 * elf64-s390.c: Likewise.
1692 * elf64-sparc.c: Likewise.
1693 * elf64-x86-64.c: Likewise.
1694 * elfarm-nabi.c: Likewise.
1695 * elfcode.h: Likewise.
1696 * elfcore.h: Likewise.
1697 * elflink.c: Likewise.
1698 * elflink.h: Likewise.
1699 * elfxx-ia64.c: Likewise.
1700 * elfxx-target.h: Likewise.
1701 * format.c: Likewise.
1702 * hash.c: Likewise.
1703 * hp300hpux.c: Likewise.
1704 * hppabsd-core.c: Likewise.
1705 * hpux-core.c: Likewise.
1706 * i386aout.c: Likewise.
1707 * i386dynix.c: Likewise.
1708 * i386linux.c: Likewise.
1709 * i386lynx.c: Likewise.
1710 * i386mach3.c: Likewise.
1711 * i386msdos.c: Likewise.
1712 * i386os9k.c: Likewise.
1713 * ieee.c: Likewise.
1714 * ihex.c: Likewise.
1715 * irix-core.c: Likewise.
1716 * libaout.h: Likewise.
1717 * libbfd-in.h: Likewise.
1718 * libbfd.c: Likewise.
1719 * libcoff-in.h: Likewise.
1720 * libecoff.h: Likewise.
1721 * libieee.h: Likewise.
1722 * libnlm.h: Likewise.
1723 * libpei.h: Likewise.
1724 * libxcoff.h: Likewise.
1725 * linker.c: Likewise.
1726 * lynx-core.c: Likewise.
1727 * m68klinux.c: Likewise.
1728 * merge.c: Likewise.
1729 * mipsbsd.c: Likewise.
1730 * netbsd-core.c: Likewise.
1731 * nlm.c: Likewise.
1732 * nlm32-alpha.c: Likewise.
1733 * nlm32-i386.c: Likewise.
1734 * nlm32-ppc.c: Likewise.
1735 * nlm32-sparc.c: Likewise.
1736 * nlmcode.h: Likewise.
1737 * nlmswap.h: Likewise.
1738 * ns32k.h: Likewise.
1739 * oasys.c: Likewise.
1740 * opncls.c: Likewise.
1741 * osf-core.c: Likewise.
1742 * pc532-mach.c: Likewise.
1743 * pdp11.c: Likewise.
1744 * pe-mips.c: Likewise.
1745 * peXXigen.c: Likewise.
1746 * peicode.h: Likewise.
1747 * ppcboot.c: Likewise.
1748 * ptrace-core.c: Likewise.
1749 * reloc.c: Likewise.
1750 * reloc16.c: Likewise.
1751 * riscix.c: Likewise.
1752 * rs6000-core.c: Likewise.
1753 * sco5-core.c: Likewise.
1754 * section.c: Likewise.
1755 * som.c: Likewise.
1756 * sparclinux.c: Likewise.
1757 * sparclynx.c: Likewise.
1758 * srec.c: Likewise.
1759 * stabs.c: Likewise.
1760 * sunos.c: Likewise.
1761 * syms.c: Likewise.
1762 * targets.c: Likewise.
1763 * tekhex.c: Likewise.
1764 * trad-core.c: Likewise.
1765 * versados.c: Likewise.
1766 * vms-gsd.c: Likewise.
1767 * vms-hdr.c: Likewise.
1768 * vms-misc.c: Likewise.
1769 * vms-tir.c: Likewise.
1770 * vms.c: Likewise.
1771 * vms.h: Likewise.
1772 * xcofflink.c: Likewise.
1773 * bfd-in2.h: Regenerate.
1774 * libbfd.h: Regenerate.
1775 * libcoff.h: Regenerate.
1776
1777 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1778 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1779 (ufile_ptr): Define.
1780 (bfd_tell): Return a ufile_ptr.
1781 * libbfd.c (bfd_tell): Likewise.
1782 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1783 unnecessarily.
1784 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1785 * aoutf1.h: Likewise.
1786 * som.c: Likewise.
1787 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1788 larger than unsigned long can represent.
1789
1790 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1791 size overflows size_t.
1792 (bfd_realloc): Likewise.
1793 (bfd_zmalloc): Likewise.
1794 * opncls.c (bfd_alloc): Likewise.
1795 (bfd_zalloc): Likewise.
1796 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1797 (bfd_alloc, bfd_zalloc): Update.
1798
1799 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1800 8 bits.
1801 (bfd_get_signed_8): Likewise.
1802 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1803 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1804 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1805 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1806 * libaout.h: Likewise define and use here.
1807 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1808 * aout-arm.c: Likewise.
1809 * aout-encap.c: Likewise.
1810 * aout-ns32k.c: Likewise.
1811 * aout-tic30.c: Likewise.
1812 * aoutf1.h: Likewise.
1813 * aoutx.h: Likewise.
1814 * bout.c: Likewise.
1815 * coff-alpha.c: Likewise.
1816 * coff-h8300.c: Likewise.
1817 * coff-h8500.c: Likewise.
1818 * coff-i960.c: Likewise.
1819 * coff-ia64.c: Likewise.
1820 * coff-m88k.c: Likewise.
1821 * coff-mips.c: Likewise.
1822 * coff-ppc.c: Likewise.
1823 * coff-rs6000.c: Likewise.
1824 * coff-sh.c: Likewise.
1825 * coff-sparc.c: Likewise.
1826 * coff-stgo32.c: Likewise.
1827 * coff-tic30.c: Likewise.
1828 * coff-tic80.c: Likewise.
1829 * coff-w65.c: Likewise.
1830 * coff-z8k.c: Likewise.
1831 * coff64-rs6000.c: Likewise.
1832 * coffgen.c: Likewise.
1833 * cofflink.c: Likewise.
1834 * coffswap.h: Likewise.
1835 * ecoff.c: Likewise.
1836 * ecoffswap.h: Likewise.
1837 * elf.c: Likewise.
1838 * elf32-mips.c: Likewise.
1839 * elf64-mips.c: Likewise.
1840 * hp300hpux.c: Likewise.
1841 * i386dynix.c: Likewise.
1842 * i386lynx.c: Likewise.
1843 * i386msdos.c: Likewise.
1844 * i386os9k.c: Likewise.
1845 * libpei.h: Likewise.
1846 * nlm32-alpha.c: Likewise.
1847 * nlm32-i386.c: Likewise.
1848 * nlm32-ppc.c: Likewise.
1849 * nlmcode.h: Likewise.
1850 * nlmswap.h: Likewise.
1851 * oasys.c: Likewise.
1852 * pdp11.c: Likewise.
1853 * pe-mips.c: Likewise.
1854 * peXXigen.c: Likewise.
1855 * peicode.h: Likewise.
1856 * riscix.c: Likewise.
1857 * sunos.c: Likewise.
1858 * xcofflink.c: Likewise.
1859 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1860 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1861 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1862 equivalent H_PUT_* macro instead.
1863 (GETWORD, GETHALF, GETBYTE): Similarly.
1864 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1865 (GETWORD, GETHALF, GETBYTE): Likewise.
1866 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1867
1868 * bfd-in.h (struct orl): Change "pos" to a union.
1869 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1870 (bsd_write_armap): Here too.
1871 (coff_write_armap): And here.
1872 * coff-rs6000.c (xcoff_write_armap_old): And here.
1873 (xcoff_write_one_armap_big): And here.
1874 (xcoff_write_armap_big): And here.
1875 * ecoff.c (_bfd_ecoff_write_armap): And here.
1876 * elf64-mips.c (mips_elf64_write_armap): And here.
1877
1878 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1879 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1880 * elf32-h8300.c (elf32_h8_mach): Likewise.
1881 * elf32-mips.c (elf_mips_mach): Likewise.
1882 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1883
1884 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1885 calls.
1886 (aix386_core_vec): Typo fix.
1887
1888 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1889 etc. to avoid redefined macro warning.
1890 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1891 (MY(fix_pcrel_26)): Likewise.
1892 * aout-ns32k.c (MY(put_reloc)): Likewise.
1893 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1894 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1895 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1896
1897 * aout-encap.c: Include "file", not <file> for binutils headers.
1898 (encap_object_p): Half baked attempt to fix compile errors in
1899 code dealing with "magic".
1900
1901 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1902 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1903 bfd_vma's rather than longs.
1904 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1905 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1906 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1907 remove case 3.
1908 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1909 Use unsigned comparisons.
1910 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1911 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1912 (_bfd_do_ns32k_reloc_contents): Likewise.
1913 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1914 (_bfd_ns32k_get_immediate): Likewise.
1915 (_bfd_ns32k_put_displacement): Likewise.
1916 (_bfd_ns32k_put_immediate): Likewise.
1917 (bfd_reloc_status_type): Likewise.
1918
1919 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1920 to avoid shadowing.
1921 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1922 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1923 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1924 avoid shadowing.
1925 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1926 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1927 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1928 shadow warning.
1929 (_bfd_elfcore_strndup): Likewise for "dup".
1930 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1931 "name" to avoid shadowing.
1932 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1933 definition of "off".
1934 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1935 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1936 definition of "s".
1937 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1938 "secpp".
1939 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1940 to avoid shadowing.
1941 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1942 to avoid shadowing.
1943 (elf_link_input_bfd): Likewise.
1944 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1945 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1946 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1947 "input_section".
1948 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1949 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1950 (sunos_write_dynamic_symbol): Remove unused vars.
1951 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1952 innermost "directory_name" and "file_name" vars.
1953 * tekhex.c (first_phase): Rename local var "type" to "stype".
1954 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1955 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1956 doing comparison at caller.
1957 (vms_esecflag_by_name): Likewise.
1958 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1959 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1960 (xcoff_write_global_symbol): Rename "p" param to "inf".
1961
1962 * cisco-core.c: Add missing prototypes.
1963 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1964 (cisco_core_file_failing_signal): Likewise.
1965 (cisco_core_file_matches_executable_p): Likewise.
1966 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1967 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1968 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1969 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1970
1971 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1972 thumb_glue_size and arm_glue_size.
1973 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1974
1975 * coff64-rs6000.c: Group prototypes together.
1976
1977 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1978 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1979
1980 * cpu-arc.c: Add missing prototypes.
1981 * cpu-h8500.c: Likewise.
1982 * cpu-i960.c: Likewise.
1983 * cpu-pj.c: Likewise.
1984 * cpu-sh.c: Likewise.
1985 * cpu-w65.c: Likewise.
1986 * cpu-z8k.c: Likewise.
1987 * elf32-fr30.c: Likewise.
1988 * elf32-h8300.c: Likewise.
1989 * elf32-i370.c: Likewise.
1990 * hpux-core.c: Likewise.
1991 * versados.c: Likewise.
1992
1993 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1994 * cpu-h8500.c: Likewise.
1995 * cpu-i960.c: Likewise.
1996 * cpu-z8k.c: Likewise.
1997
1998 * cpu-ia64-opc.c: Correct comment.
1999
2000 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2001
2002 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2003 to unsigned.
2004 (bfd_elf32_write_out_phdrs): Likewise.
2005 (bfd_elf64_write_out_phdrs): Likewise.
2006 (elf_linker_section_pointers): Change addend to bfd_vma.
2007 (_bfd_elf_find_pointer_linker_section): Likewise.
2008 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2009 filepos to unsigned file_ptr.
2010 (_bfd_elfcore_strndup): Change max param to size_t.
2011 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2012 (_bfd_elfcore_strndup): Likewise.
2013 (_bfd_elf_find_pointer_linker_section): Likewise.
2014
2015 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2016 insn and sym_value to ints.
2017
2018 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2019 bfd_size_type.
2020 (elfcore_read_notes): Likewise.
2021
2022 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2023 param from unsigned char to int.
2024 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2025 for info_to_howto call.
2026 (add_dynamic_entry): Define macro.
2027 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2028
2029 * elf32-cris.c (add_dynamic_entry): Define macro.
2030 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2031
2032 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2033 (elf32_h8_object_p): Likewise.
2034 (elf32_h8_merge_private_bfd_data): Likewise.
2035 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2036
2037 * elf32-hppa.c (add_dynamic_entry): Define macro.
2038 (elf32_hppa_size_dynamic_sections): Use it.
2039 * elf32-i370.c (add_dynamic_entry): Define macro.
2040 (i370_elf_size_dynamic_sections): Use it.
2041 (i370_noop): Make static.
2042 * elf32-i386.c (add_dynamic_entry): Define macro.
2043 (elf_i386_size_dynamic_sections): Use it.
2044 * elf32-m68k.c (add_dynamic_entry): Define macro.
2045 (elf_m68k_size_dynamic_sections): Use it.
2046 * elf32-ppc.c (add_dynamic_entry): Define macro.
2047 (ppc_elf_size_dynamic_sections): Use it.
2048 * elf32-s390.c (add_dynamic_entry): Define macro.
2049 (elf_s390_size_dynamic_sections): Use it.
2050 * elf64-alpha.c (add_dynamic_entry): Define macro.
2051 (elf64_alpha_size_dynamic_sections): Use it.
2052 * elf64-hppa.c (add_dynamic_entry): Define macro.
2053 (elf64_hppa_size_dynamic_sections): Use it.
2054 * elf64-ppc.c (add_dynamic_entry): Define macro.
2055 (ppc64_elf_size_dynamic_sections): Use it.
2056 * elf64-s390.c (add_dynamic_entry): Define macro.
2057 (elf_s390_size_dynamic_sections): Use it.
2058 * elf64-sparc.c (add_dynamic_entry): Define macro.
2059 (sparc64_elf_size_dynamic_sections): Use it.
2060 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2061 (elf64_x86_64_size_dynamic_sections): Use it.
2062 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2063 (elfNN_ia64_size_dynamic_sections): Use it.
2064
2065 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2066 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2067
2068 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2069 false if the first malloc fails rather than going via error_return.
2070
2071 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2072 "index" param.
2073 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2074
2075 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2076
2077 * elfxx-ia64.c (global_sym_index): Return a long.
2078
2079 * ieee.c (get_symbol): Use int rather than char param.
2080 (ieee_slurp_sections): Move "section" var to inner blocks.
2081 (copy_expression): Don't init "value" to zero or worry about
2082 clearing to zero after using.
2083 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2084 shadowing.
2085
2086 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2087 unsigned int.
2088
2089 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2090 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2091
2092 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2093
2094 * pc532-mach.c (MYNSX): Delete.
2095 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2096 (write_object_contents): Correct prototype.
2097
2098 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2099 than unsigned short.
2100
2101 * section.c (bfd_set_section_contents): Remove redundant
2102 "offset < 0" test. Check that "count" doesn't overflow size_t.
2103 (bfd_get_section_contents): Likewise.
2104
2105 * som.c (som_fixup_formats): Add missing braces.
2106 (som_reloc_addend): Pass a bfd_vma for "addend".
2107
2108 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2109 (srec_write_symbols): Remove an unnecessary var.
2110
2111 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2112 to match.
2113 * configure.in: Sort to match. Bump version number.
2114 * configure: Regenerate.
2115
2116 * tekhex.c (move_section_contents): Assert offset == 0.
2117
2118 * versados.c (new_symbol_string): Constify arg.
2119 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2120 (versados_get_symbol_info): Make static.
2121 (versados_print_symbol): Likewise.
2122 (versados_get_reloc_upper_bound): Likewise.
2123 (versados_canonicalize_reloc): Likewise.
2124
417412a2
NC
21252001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2126
2127 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2128
bb731fb6
L
21292001-09-17 H.J. Lu <hjl@gnu.org>
2130
2131 * dwarf1.c (parse_die): Take a new arg for the end of the
2132 section. Return false if die is beyond the section.
2133 (parse_functions_in_unit): Pass the end of the section to
2134 parse_die ().
2135 (_bfd_dwarf1_find_nearest_line): Likewise.
2136
841989d6
NC
21372001-09-14 Michael Rauch <mrauch@netbsd.org>
2138
2139 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2140 just like R_SPARC_32.
2141
056a1d49
NC
21422001-09-14 Kevin Lo <kevlo@openbsd.org>
2143
2144 * configure.bfd: Add arm-openbsd target.
2145
4008bd9b
TS
21462001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2147
2148 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2149 Add support for mips64.
2150
c11cc227
AO
21512001-09-13 Alexandre Oliva <aoliva@redhat.com>
2152
2153 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2154
aa4f99bb
AO
21552001-09-12 Alexandre Oliva <aoliva@redhat.com>
2156
2157 * elf.c (prep_headers): Get the machine code from the elf
2158 backend data.
2159 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2160 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2161 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2162 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2163 * elf-arc.c (arc_elf_final_write_processing): Don't override
2164 e_machine, it's now properly set in prep_headers.
2165 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2166 EM_AVR_OLD.
2167 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2168 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2169 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2170 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2171 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2172 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2173 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2174 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2175 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2176 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2177 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2178 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2179
204692d7
RH
21802001-09-11 Richard Henderson <rth@redhat.com>
2181
2182 * elf64-alpha.c (elf64_alpha_section_flags): New.
2183 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2184
f94952df
RH
21852001-09-11 Richard Henderson <rth@redhat.com>
2186
2187 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2188 apply HINT relocations against dynamic symbols.
2189
146f1a87
L
21902001-09-11 H.J. Lu <hjl@gnu.org>
2191
f94952df 2192 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 2193
1cd6895c
RH
21942001-09-09 Richard Henderson <rth@redhat.com>
2195
96e2734b
RH
2196 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2197
1cd6895c
RH
2198 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2199 following a call to a near function.
2200
f16fbd61
RH
22012001-09-08 Richard Henderson <rth@redhat.com>
2202
2203 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2204 relocation errors. Fail gp-relative relocations against
2205 dynamic symbols.
2206
56882138
AM
22072001-09-08 Alan Modra <amodra@bigpond.net.au>
2208
2209 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2210 as well as DEF_DYNAMIC in test for avoided copy relocs.
2211 (allocate_plt_and_got_and_discard_relocs): Likewise.
2212 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2213 (allocate_plt_and_got_and_discard_relocs): Likewise.
2214
cb56d3d3
TS
22152001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2216
2217 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2218 of R_MIPS_PC16.
56882138
AM
2219
22202001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2221
2222 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2223 definitions.
2224 (mips_elf64_howto_table_rel): Likewise.
2225
22262001-09-05 Tom Rix <trix@redhat.com>
2227
2228 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2229 and syscall symbols.
2230 (write_global_symbol) : Same.
2231 (bfd_xcoff_export_symbol): Remove unused syscall param.
2232 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2233 bfd_xcoff_import_symbol.
2234 * bfd-in.h: Same.
2235 * bfd-in2.h : Regenerate.
2236
22372001-09-04 Richard Henderson <rth@redhat.com>
2238
2239 * elf64-alpha.c (SKIP_HOWTO): New.
2240 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2241 Fix sizes of 16-bit mem format relocs.
2242 (elf64_alpha_reloc_map): Update to match.
2243 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2244 (elf64_alpha_relax_without_lituse): Likewise.
2245 (elf64_alpha_check_relocs): Handle GPREL16.
2246 (elf64_alpha_relocate_section): Likewise.
2247 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2248 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2249 * bfd-in2.h, libbfd.h: Rebuild.
2250
22512001-09-04 Jeff Law <law@redhat.com>
2252
2253 * elf32-h8300.c (elf32_h8_relax_section): New function.
2254 (elf32_h8_relax_delete_bytes): Likewise.
2255 (elf32_h8_symbol_address_p): Likewise.
2256 (elf32_h8_get_relocated_section_contents): Likewise.
2257 (bfd_elf32_bfd_relax_section): Define.
2258 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2259
2260 * elf32-h8300.c (special): New function.
2261 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2262 all relocations.
2263 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2264 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2265 Fix minor problems with 8bit and 16bit PC relative relocations.
2266
22672001-09-01 Andreas Jaeger <aj@suse.de>
2268
2269 * vms-tir.c: Add missing prototypes.
2270 * vms-hdr.c: Likewise.
2271 * vms-gsd.c: Likewise.
2272 * vms-misc.c: Likewise.
2273
22742001-08-31 H.J. Lu <hjl@gnu.org>
2275
2276 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2277 with bad relocation.
2278
22792001-08-31 Eric Christopher <echristo@redhat.com>
2280 Jason Eckhardt <jle@redhat.com>
2281
2282 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2283 mips32_4k and mips64.
2284 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2285 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2286 * bfd/cpu-mips.c: Ditto.
2287 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2288 * bfd/bfd-in2.h: Regenerate.
2289
22902001-08-31 Jakub Jelinek <jakub@redhat.com>
2291
2292 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2293 value into R_ALPHA_RELATIVE's addend.
2294 (elf64_alpha_finish_dynamic_symbol): Likewise.
2295
22962001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2297
2298 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2299 recomputed addend during relocatable link if not USE_REL.
2300
2301 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2302 error.
2303
23042001-08-30 H.J. Lu <hjl@gnu.org>
2305
2306 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2307 2 changes.
2308 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2309 relocations for weak definitions.
2310
23112001-08-30 H.J. Lu <hjl@gnu.org>
2312
2313 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2314 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2315 * Makefile.in: Rebuild.
2316
23172001-08-30 H.J. Lu <hjl@gnu.org>
2318
2319 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2320 dynamic relocation for undefined weak symbols when creating
2321 executables. Check h->root.root.type, instead of h->root.type.
2322
23232001-08-29 Joel Sherrill <joel@OARcorp.com>
2324
2325 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2326 default from coff to elf.
2327
23282001-08-29 Jeff Law <law@redhat.com>
2329
2330 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2331 relocations.
2332 (h8_reloc_map): Similarly.
2333 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2334 Add support for PC relative relocations.
2335
2336 * elf32-h8300.c: Put all prototypes together.
2337 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2338 (elf32_h8_final_link_relocate): New function for linker.
2339 (elf32_h8_relocate_section): Similarly.
2340 (elf_backend_relocate_section): Define.
2341
2342 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2343 (h8300_scan): Handle architecture:machine encodings typically
2344 found in linker scripts.
2345 * elf.c (prep_headers): Do not try to do H8 machine recognition
2346 here.
2347 * elf32-h8300.c: Add some missing prototypes.
2348 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2349 (elf32_h8_object_p): Similarly.
2350
23512001-08-29 Tom Rix <trix@redhat.com>
2352
2353 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2354 does not follow a XTY_SD.
2355
23562001-08-29 Alan Modra <amodra@bigpond.net.au>
2357
2358 * targmatch.sed: Delete case statements.
2359 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2360 aix4.3 and above.
2361
2362Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
2363
2364 * Makefile.am (elf32-h8300.lo): New target.
2365 * config.bfd (h8300*-*-elf): New case.
2366 * configure.in (bfd_elf32_h8300_vec): New case.
2367 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2368 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2369 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2370 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2371 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2372 * elf32-h8300.c: New file.
2373 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2374
23752001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2376
2377 * sparclynx.c: Add missing prototypes.
2378 * coff-mcore.c: Add missing prototypes.
2379 * elf32-pj.c: Add missing prototypes.
2380 * nlm32-sparc.c: Add missing prototypes.
2381 * oasys.c: Add missing prototypes.
2382 * pdp11.c: Add missing prototypes.
2383 * pe-mips.c: Add missing prototypes.
2384 * riscix.c: Add missing prototypes.
2385
23862001-08-27 Daniel Jacobowitz <drow@mvista.com>
2387
2388 * elf32-i386.c: Add missing prototypes.
2389 * elf32-ppc.c: Likewise.
2390 * elf32-sh-lin.c: Likewise.
2391 * elfarm-nabi.c: Likewise.
2392
23932001-08-27 Daniel Jacobowitz <drow@mvista.com>
2394
2395 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2396 (elf_i386_grok_psinfo): New function.
2397 (elf_backend_grok_prstatus): Define.
2398 (elf_backend_grok_psinfo): Likewise.
2399 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2400 (ppc_elf_grok_psinfo): New function.
2401 (elf_backend_grok_prstatus): Define.
2402 (elf_backend_grok_psinfo): Likewise.
2403 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2404 (elf32_shlin_grok_psinfo): New function.
2405 (elf_backend_grok_prstatus): Define.
2406 (elf_backend_grok_psinfo): Likewise.
2407 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2408 (elf32_arm_nabi_grok_psinfo): New function.
2409 (elf_backend_grok_prstatus): Define.
2410 (elf_backend_grok_psinfo): Likewise.
2411
24122001-08-27 H.J. Lu <hjl@gnu.org>
2413
2414 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2415 sanity check.
2416 (mips_elf_calculate_relocation): Create dynamic relocation for
2417 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2418 bit is not set.
2419
24202001-08-27 H.J. Lu <hjl@gnu.org>
2421
2422 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2423 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2424 (_bfd_elf32_mips_grok_prstatus): Likewise.
2425 (_bfd_elf32_mips_grok_psinfo): Likewise.
2426 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2427 `struct mips_elf_link_hash_entry *'.
2428 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2429
24302001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2431
2432 * mipsbsd.c: Add missing prototypes.
2433 * hp300hpux.c: Add missing prototypes.
2434 * i386aout.c: Add missing prototypes.
2435 * i386lynx.c: Add missing prototypes.
2436 * i386mach3.c: Add missing prototypes.
2437 * i386msdos.c: Add missing prototypes.
2438 * i386os9k.c: Add missing prototypes.
2439
24402001-08-27 Linus Nordberg <linus@swox.se>
2441 Torbjorn Granlund <tege@swox.com>
2442 Staffan Ulfberg <staffanu@swox.se>
2443 Alan Modra <amodra@bigpond.net.au>
2444
2445 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2446 targ64_selvecs for 32 bit powerpc targets.
2447 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2448 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2449 Run "make dep-am".
2450 * Makefile.in: Regenerate.
2451 * configure.in: Add elf64_powerpc vecs.
2452 * configure: Regenerate.
2453 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2454 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2455 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2456 * elf64-ppc.c: New file.
2457 * reloc.c: Add powerpc64 relocs.
2458 * libbfd.h: Regenerate.
2459 * bfd-in2.h: Regenerate.
2460
24612001-08-27 Andreas Schwab <schwab@suse.de>
2462
2463 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2464 reloc is against read-only section.
2465 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2466 looking up section names for DT_TEXTREL.
2467 (elf32_m68k_reloc_type_class): New function.
2468 (elf_backend_reloc_type_class): Define.
2469
24702001-08-27 Andreas Jaeger <aj@suse.de>
2471
2472 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2473 reloc is against read-only section.
2474 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2475 looking up section names for DT_TEXTREL.
2476 (elf_s390_reloc_type_class): New.
2477 (elf_backend_reloc_type_class): Define.
2478
2479 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2480 reloc is against read-only section.
2481 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2482 looking up section names for DT_TEXTREL.
2483 (elf_s390_reloc_type_class): New.
2484 (elf_backend_reloc_type_class): Define.
2485
2486 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2487 is against read-only section.
2488 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2489 looking up section names for DT_TEXTREL.
2490 (ppc_elf_reloc_type_class): New.
2491 (elf_backend_reloc_type_class): Define.
2492
24932001-08-26 Andreas Jaeger <aj@suse.de>
2494
2495 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2496 reloc is against read-only section.
2497 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2498 looking up section names for DT_TEXTREL.
2499 (elf_cris_reloc_type_class): New.
2500 (elf_backend_reloc_type_class): Define.
2501
2502 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2503 against read-only section.
2504 (elf_backend_reloc_type_class): Define.
2505 (sh_elf_reloc_type_class): New.
2506 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2507 looking up section names for DT_TEXTREL.
2508
2509 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2510 reloc is against read-only section.
2511 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2512 looking up section names for DT_TEXTREL.
2513 (elf32_arm_reloc_type_class): New.
2514 (elf_backend_reloc_type_class): Define.
2515
25162001-08-25 Andreas Jaeger <aj@suse.de>
2517
2518 * oasys.c: Add missing prototypes.
2519
2520 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2521 attribute for parameter.
2522 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2523
2524 * versados.c (get_4): Make static.
2525 (get_10): Make static.
2526 Add missing prototypes.
2527 (process_esd): Fix call to versados_new_symbol.
2528
25292001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2530
2531 * coff-a29k.c: Add missing prototypes.
2532 * coff-apollo.c: Add missing prototypes.
2533 * coff-arm.c: Add missing prototypes.
2534 * coff-i860.c: Add missing prototypes.
2535 * coff-rs6000.c: Add missing prototypes.
2536 * coff-tic80.c: Add missing prototypes.
2537 * elf-m10200.c: Add missing prototypes.
2538 * elf-m10300.c: Add missing prototypes.
2539 * elf32-arm.h: Add missing prototypes.
2540 * elf32-d10v.c: Add missing prototypes.
2541 * elf32-m32r.c: Add missing prototypes.
2542 * elf32-mcore.c: Add missing prototypes.
2543 * elf32-openrisc.c: Add missing prototypes.
2544 * elf32-sh.c: Add missing prototypes.
2545 * elf32-sparc.c: Add missing prototypes.
2546 * elf32-v850.c: Add missing prototypes.
2547 * elfarm-nabi.c: Add missing prototypes.
2548 * elfarm-oabi.c: Add missing prototypes.
2549
25502001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2551
2552 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2553 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2554
25552001-08-24 H.J. Lu <hjl@gnu.org>
2556
2557 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2558 hash structure.
2559
25602001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2561
2562 * elf-bfd.h (elf_hash_table): Revert definition.
2563 (is_elf_hash_table): New macro.
2564 * elflink.h (elf_link_add_object_symbols): Test
2565 is_elf_hash_table before accessing ELF only fields in hash
2566 structure.
2567 (elf_link_create_dynamic_sections): Fail if not using an ELF
2568 hash structure.
2569 (elf_add_dynamic_entry): Fail if not using an ELF hash
2570 structure.
2571 (elf_link_record_local_dynamic_symbol): Fail if not using an
2572 ELF hash structure.
2573 (size_dynamic_sections): Fail if not using an ELF hash
2574 structure.
2575 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2576 hash structure.
2577 (elf_bfd_final_link): Fail if not using an ELF hash
2578 structure.
2579
25802001-08-24 H.J. Lu <hjl@gnu.org>
2581
2582 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2583 table is not an ELF linker hash table.
2584
2585 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2586 table type to bfd_link_elf_hash_table.
2587
2588 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2589 the last change.
2590
2591 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2592 table type to bfd_link_generic_hash_table.
2593
25942001-08-24 Alexandre Oliva <aoliva@redhat.com>
2595
2596 * bfd.c (bfd_alt_mach_code): New function.
2597 * bfd-in2.h: Rebuilt.
2598
25992001-08-24 Alexandre Oliva <aoliva@redhat.com>
2600
2601 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2602 `type' field in the hash entry when deciding whether to follow a
2603 link.
2604
26052001-08-24 Jakub Jelinek <jakub@redhat.com>
2606
2607 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2608 last.
2609 (elf_link_sort_relocs): Adjust accordingly.
2610
2611 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2612 (elf64_alpha_check_relocs): Set it if section this reloc is against
2613 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2614 read-only section.
2615 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2616 is is against read-only section.
2617 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2618 check section names.
2619 (elf64_alpha_reloc_type_class): New.
2620 (elf_backend_reloc_type_class): Define.
2621
26222001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2623
2624 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2625 by bfd_malloc().
2626
26272001-08-23 Andreas Jaeger <aj@suse.de>
2628
2629 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2630 the reloc is against read-only section.
2631 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2632 of looking up section names for DT_TEXTREL.
2633 (elf64_x86_64_reloc_type_class): New.
2634 (elf_backend_reloc_type_class): Define.
2635
26362001-08-23 H.J. Lu <hjl@gnu.org>
2637
2638 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2639 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2640
2641 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2642 bfd_print_symbol_vandf.
2643 * coffgen.c (coff_print_symbol): Likewise.
2644 * elf.c (bfd_elf_print_symbol): Likewise.
2645 * ieee.c (ieee_print_symbol): Likewise.
2646 * nlmcode.h (nlm_print_symbol): Likewise.
2647 * oasys.c (oasys_print_symbol): Likewise.
2648 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2649 * som.c (som_print_symbol): Likewise.
2650 * srec.c (srec_print_symbol): Likewise.
2651 * tekhex.c (tekhex_print_symbol): Likewise.
2652 * versados.c (versados_print_symbol): Likewise.
2653 * vms.c (vms_print_symbol): Likewise.
2654
2655 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2656 with bfd_fprintf_vma.
2657 (bfd_elf_print_symbol): Likewise.
2658 * syms.c (bfd_print_symbol_vandf): Likewise.
2659
26602001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2661
2662 * aoutf1.h (sunos_write_object_contents): Silence compile time
2663 warning.
2664 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2665
2666 * bout.c: Add missing function prototypes. Fix formatting.
2667 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2668 * coff-w65.c: Add missing function prototypes. Fix formatting.
2669 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2670 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2671 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2672 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2673 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2674 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2675 * coff-sh.c: Add missing function prototypes. Fix formatting.
2676
26772001-08-23 Jakub Jelinek <jakub@redhat.com>
2678
2679 * elf-bfd.h (enum elf_reloc_type_class): New.
2680 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2681 (_bfd_elf_reloc_type_class): New.
2682 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2683 (elfNN_bed): Add elf_backend_reloc_type_class.
2684 * elf.c (_bfd_elf_reloc_type_class): New.
2685 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2686 is against read-only section.
2687 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2688 looking up section names for DT_TEXTREL.
2689 (elf_i386_reloc_type_class): New.
2690 (elf_backend_reloc_type_class): Define.
2691 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2692 reloc is against read-only section.
2693 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2694 looking up section names for DT_TEXTREL.
2695 (elf32_sparc_reloc_type_class): New.
2696 (elf_backend_reloc_type_class): Define.
2697 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2698 reloc is against read-only section.
2699 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2700 looking up section names for DT_TEXTREL.
2701 (sparc64_elf_reloc_type_class): New.
2702 (elf_backend_reloc_type_class): Define.
2703 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2704 (elfNN_ia64_hash_table_create): Clear ia64_info.
2705 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2706 section.
2707 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2708 instead of looking up section names for DT_TEXTREL.
2709 (elfNN_ia64_reloc_type_class): New.
2710 (elf_backend_reloc_type_class): Define.
2711 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2712 (struct elf_link_sort_rela): New.
2713 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2714 (elf_bfd_final_link): Call elf_link_sort_relocs.
2715 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2716 necessary.
2717
27182001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2719
2720 * configure.in (x86-bsdi): No corefile support.
2721 * configure: Regenerate.
2722
27232001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2724
2725 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2726 comma.
2727
27282001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2729
2730 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2731 the alignment of dwarf2 linkonce sections to 0.
2732 * coff-sto32.c: Likewise.
2733
27342001-08-20 Andreas Jaeger <aj@suse.de>
2735
2736 * coff-sparc.c: Add missing prototypes.
2737 * elf32-s390.c: Likewise.
2738 * elf32-i960.c: Likewise.
2739 * aout-target.h: Likewise.
2740
27412001-08-20 H.J. Lu <hjl@gnu.org>
2742
2743 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2744 (elf_num_section_syms): New for num_section_syms.
2745
2746 * elf.c (elf_map_symbols): Set num_section_syms.
2747 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2748 the section symbol index.
2749
27502001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2751
2752 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2753 select the generic has table creator. All elf backends need elf
2754 specific fields in the hash table.
2755
27562001-08-20 Alan Modra <amodra@bigpond.net.au>
2757
2758 * archive.c (offsetof): Remove define.
2759 * elf.c: Likewise.
2760 * oasys.c: Likewise
2761 * sysdep.h (offsetof): Define.
2762
27632001-08-17 Alan Modra <amodra@bigpond.net.au>
2764
2765 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2766 (bfd_set_gp_size): Make param unsigned.
2767 * bfd-in2.h: Regenerate.
2768 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2769 than calling bfd_get_gp_size.
2770 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2771 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2772
27732001-08-17 Alan Modra <amodra@bigpond.net.au>
2774
2775 * linker.c (default_fill_link_order): Handle four byte fill value.
2776
27772001-08-17 Alan Modra <amodra@bigpond.net.au>
2778
2779 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2780 prototype.
2781 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2782
2783 * elf64-mips.c (UNUSED_RELOC): Define.
2784 (mips_elf64_howto_table_rel): Use it.
2785 (mips_elf64_howto_table_rela): Here too.
2786 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2787
2788 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2789 silence warning.
2790 * coffgen.c (coff_print_symbol): Fix warnings.
2791 (coff_find_nearest_line): Likewise.
2792 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2793 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2794 * format.c (bfd_check_format_matches): Likewise.
2795 (bfd_set_format): Likewise.
2796 * coff-ia64.c: Add missing prototypes.
2797 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2798 signed to silence warnings.
2799 (elf64_alpha_relocate_section): Likewise.
2800 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2801 (elf64_alpha_add_symbol_hook): Likewise.
2802 (elf64_alpha_final_link): Likewise.
2803 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2804 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2805 (elf64_alpha_size_got_sections): Likewise.
2806 * elfxx-ia64.c: Add missing prototypes.
2807 (elfNN_ia64_relocate_section): Fix warning.
2808 (elfNN_ia64_unwind_entry_compare): Make params const.
2809
28102001-08-17 Alan Modra <amodra@bigpond.net.au>
2811
2812 * config.bfd (targ64_selvecs): New.
2813 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2814
2815 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2816 (BFD_DEFAULT_TARGET_SIZE): New.
2817 (BFD_ARCH_SIZE): Comment.
2818 * configure.in (target_size): New. Set instead of target64 in
2819 selvecs case statement. Set target64 from it.
2820 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2821 * bfd-in2.h: Regenerate.
2822 * configure: Regenerate.
2823
28242001-08-17 Alan Modra <amodra@bigpond.net.au>
2825
2826 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2827 (bfd_errmsgs): Add corresponding message.
2828 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2829 finding an archive that contains different format object files.
2830 Return bfd_error_wrong_object_format for this case.
2831 * format.c: Formatting fixes. s/CONST/const/.
2832 (bfd_check_format_matches): Accept archives that give
2833 bfd_error_wrong_object_format if no full match is found. Tidy
2834 code handling matching_vector. Don't return a pointer to freed
2835 memory in `matching'. Handle ambiguous matches as for partial
2836 archive matches.
2837 * bfd-in2.h: Regenerate.
2838
28392001-08-15 Alan Modra <amodra@bigpond.net.au>
2840
2841 * libieee.h (common_header_type): Add last_byte field.
2842
2843 * ieee.c: Add missing prototypes. Some format fixes.
2844 (struct output_buffer_struct): Move for availability to prototypes.
2845 (ieee_part_after): New function.
2846 (ieee_slurp_debug): Use it here.
2847 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2848 ieee_part_after to set last_byte to one past end of current part.
2849 Update callers.
2850 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2851 Update callers.
2852 (parse_expression): Don't go beyond the end of the current part.
2853 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2854 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2855 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2856 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2857 ieee_set_section_contents, ieee_write_object_contents,
2858 ieee_make_empty_symbol): Make static.
2859 (ieee_archive_p): Correct comments regarding bfd_read.
2860 (ieee_object_p): Similarly.
2861 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2862 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2863 input_bfd, output_bfd, output_buffer.
2864 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2865 do_with_relocs, ie. as a symbol for relocatable files.
2866 (ieee_vec): Add comments showing functions referenced by macros.
2867
28682001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2869
2870 * aout-tic30.c: Add missing prototypes. Fix formatting.
2871 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2872 * peXXigen.c: Add missining prototypes. Fix formatting.
2873 * aout-adobe.c: Add missining prototypes. Fix formatting.
2874
28752001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2876
2877 * elf32-v850.c: Add missing function prototypes.
2878 Fix some formatting.
2879
2880 * cpu-v850.c: Add missing function prototype.
2881 Fix some formatting.
2882
28832001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2884
2885 * elf-bfd.h (struct elf_backend_data): Add new fields
2886 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2887 (bfd_elf_sprintf_vma): Rename function prototype to
2888 '_bfd_elf_sprintf_vma'.
2889 (bfd_elf_fprintf_vma): Rename function prototype to
2890 '_bfd_elf_fprintf_vma'.
2891 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2892 directly, instead indirect via the elf_backend_data structure.
2893 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2894 instead indirect via the elf_backend_data structure.
2895 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2896 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2897 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2898 already defined.
2899 (elf_backend_fprintf_vma): Initialise if not already defined.
2900 (struct elf_backend_data): Initialise the
2901 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2902
29032001-08-10 Andreas Jaeger <aj@suse.de>
2904
2905 * elf64-sparc.c: Add missing prototypes.
2906 * elf32-cris.c: Likewise.
2907 * elf32-i370.c: Likewise.
2908 * elf64-hppa.c: Likewise.
2909 * elf64-s390.c: Likewise.
2910
29112001-08-10 Andreas Jaeger <aj@suse.de>
2912
2913 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2914 Add prototypes where needed.
2915
29162001-08-10 H.J. Lu <hjl@gnu.org>
2917
2918 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2919 (bfd_fprintf_vma): Likewise.
2920
29212001-08-10 H.J. Lu <hjl@gnu.org>
2922
2923 * bfd.c (bfd_sprintf_vma): Don't return void.
2924 (bfd_fprintf_vma): Likewise.
2925
29262001-08-10 Andreas Jaeger <aj@suse.de>
2927
2928 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2929 to build warnings.
2930 * configure: Regenerate.
2931
29322001-08-10 Alan Modra <amodra@bigpond.net.au>
2933
2934 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2935 warning if not BFD64. Add braces so emacs auto format works.
2936 (bfd_elf_fprintf_vma): Likewise.
2937
2938 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2939 of _xcoff_swap_ld*.
2940 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2941 param to agree with libxcoff.h.
2942 (xcoff_swap_ldhdr_out): Likewise.
2943 (xcoff_swap_ldsym_in): Likewise.
2944 (xcoff_swap_ldsym_out): Likewise.
2945 (xcoff_swap_ldrel_in): Likewise.
2946 (xcoff_swap_ldrel_out): Likewise.
2947 (xcoff_create_csect_from_smclas): Likewise.
2948 * coff64-rs6000.c: Add missing prototypes.
2949 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2950 with libxcoff.h.
2951 (xcoff64_swap_ldhdr_out): Likewise.
2952 (xcoff64_swap_ldsym_in): Likewise.
2953 (xcoff64_swap_ldsym_out): Likewise.
2954 (xcoff64_swap_ldrel_in): Likewise.
2955 (xcoff64_swap_ldrel_out): Likewise.
2956 (xcoff64_ppc_relocate_section): Make static.
2957 (xcoff64_slurp_armap): Likewise.
2958 (xcoff64_archive_p): Likewise.
2959 (xcoff64_openr_next_archived_file): Likewise.
2960 (xcoff64_sizeof_headers): Likewise.
2961 (xcoff64_is_lineno_count_overflow): Likewise.
2962 (xcoff64_is_reloc_count_overflow): Likewise.
2963 (xcoff64_loader_symbol_offset): Likewise.
2964 (xcoff64_loader_reloc_offset): Likewise.
2965 * elf64-gen.c: Add missing prototypes.
2966
29672001-08-09 H.J. Lu <hjl@gnu.org>
2968
2969 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2970 (bfd_elf_fprintf_vma): Likewise.
2971
29722001-08-09 H.J. Lu <hjl@gnu.org>
2973
2974 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2975 to ...
2976 * elf-bfd.h: Here.
2977 * bfd-in2.h: Regenerated.
2978
29792001-08-09 H.J. Lu <hjl@gnu.org>
2980
2981 * bfd-in.h (bfd_sprintf_vma): New prototype.
2982 (bfd_fprintf_vma): Likewise.
2983 (bfd_elf_sprintf_vma): Likewise.
2984 (bfd_elf_fprintf_vma): Likewise.
2985 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2986 * bfd-in2.h: Regenerated.
2987
2988 * bfd.c (bfd_sprintf_vma): New. Defined.
2989 (bfd_fprintf_vma): Likewise.
2990
2991 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2992 (bfd_elf_fprintf_vma): Likewise.
2993
29942001-08-09 Alan Modra <amodra@bigpond.net.au>
2995
2996 * coff-rs6000.c: Add missing prototypes.
2997 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2998 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2999 xcoff_loader_reloc_offset): Make static.
3000 * dwarf1.c: Add missing prototypes.
3001 * dwarf2.c: Add missing prototypes.
3002 (struct abbrev_info): Move definition.
3003 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3004 * elf.c: Add missing prototypes.
3005 * elf32-gen.c: Likewise.
3006 * elf32-i386.c: Likewise.
3007 * elf32-ppc.c: Likewise.
3008 (ppc_elf_sort_rela): Use PTR instead of "void *".
3009 * elflink.h: Add missing prototypes. Formatting fixes.
3010 * merge.c: Add missing prototypes.
3011 (last4_eq): Use PTR instead of "void *".
3012 (last_eq): Likewise.
3013 * syms.c: Add missing prototypes.
3014
30152001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3016
3017 * bfd.c: Fix formatting.
3018 * bfd-in2.h: Regenerate.
3019
30202001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3021
3022 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3023 true (this target uses REL relocations) and 'pcrel_offset' to
3024 false (the PC is implied, not stored in the offset).
3025
30262001-08-08 Alan Modra <amodra@bigpond.net.au>
3027
3028 1999-10-19 Linus Nordberg <linus@swox.se>
3029 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3030 * elfxx-target.h (elf_backend_want_got_sym): Define.
3031 (elfNN_bed): Add elf_backend_want_got_sym.
3032 * elflink.c (_bfd_elf_create_got_section): Define
3033 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3034
30352001-08-08 Alexandre Oliva <aoliva@redhat.com>
3036
3037 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3038 (find_rela_addend): New function.
3039 (parse_comp_unit): Call it to find the abbrev offset addend.
3040 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3041 members of dwarf2_debug as debugging information is read.
3042
30432001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3044
3045 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3046 targets as well as sh-pe.
3047
30482001-08-03 Ben Harris <bjh21@netbsd.org>
3049
3050 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3051 reloc from start of section when computing value for R_ARM_REL32
3052 reloc.
3053
30542001-08-03 Alan Modra <amodra@bigpond.net.au>
3055
3056 From H.J. Lu <hjl@gnu.org>
3057 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3058 keep relocs for undefined syms if there are no dynamic sections in
3059 executable.
3060 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3061
30622001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3063
3064 * cofflink.c (coff_link_check_ar_symbols): also search for
3065 __imp__symbol as well as _symbol.
3066 * linker.c (_bfd_generic_link_add_archive_symbols): also
3067 search for __imp__symbol as well as _symbol.
3068
30692001-08-01 Adam Nemet <anemet@lnxw.com>
3070
3071 * elf.c (elf_sort_sections): Return zero only as the last step.
3072
30732001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3074
3075 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3076 ARM_COFF_BUGFIX.
3077 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3078 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3079 ARM_COFF_BUGFIX.
3080
30812001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3082
3083 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3084 to match corresponding bfd_coff_backend data member.
3085
30862001-07-24 Alan Modra <amodra@bigpond.net.au>
3087
3088 * Makefile.am: Update dependencies with "make dep-am".
3089 * Makefile.in: Regenerate
3090
30912001-07-15 H.J. Lu <hjl@gnu.org>
3092
3093 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3094 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3095 * Makefile.in: Regenerate.
3096
30972001-07-11 H.J. Lu <hjl@gnu.org>
3098
3099 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3100 flags when creating the reloc section if the ALLOC flag in the
3101 source section is set.
3102
31032001-07-11 Steve Ellcey <sje@cup.hp.com>
3104
3105 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3106 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3107 * bfd-in2.h: Regenerate.
3108 * libbfd.h: Regenerate.
3109 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3110 new relocations.
3111 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3112 (elfNN_ia64_check_relocs): Likewise.
3113 (elfNN_ia64_install_value): Likewise.
3114 (elfNN_ia64_relocate_section): Likewise.
3115
31162001-07-11 Jakub Jelinek <jakub@redhat.com>
3117
3118 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3119 R_SPARC_UA64.
3120 (elf32_sparc_check_relocs): Likewise.
3121 Only create .rela section for alloced sections in shared libraries.
3122 (elf32_sparc_relocate_section): Likewise.
3123 Remove redundant check.
3124 Optimize unaligned reloc usage.
3125 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3126 check.
3127
31282001-07-11 H.J. Lu <hjl@gnu.org>
3129
3130 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3131 ALLOC|LOAD flags as the source section for debugging sections
3132 when creating the reloc section.
3133
31342001-07-05 Jim Wilson <wilson@redhat.com>
3135
3136 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3137 the section of the bigger symbol.
3138
3139 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3140
31412001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3142
3143 * peicode.h (coff_swap_scnhdr_in): For sections containing
3144 uninitialised data, only set their size to s_paddr if this does
3145 not reset their size to zero. MS's latest compilers will set
3146 s_paddr to zero.
3147
31482001-07-04 H.J. Lu <hjl@gnu.org>
3149
3150 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3151 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3152 bfd_mach_mips5000.
3153
31542001-07-03 Mark Elbrecht <snowball3@softhome.net>
3155
3156 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3157
3158 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3159 sections being discarded.
3160
31612001-06-30 Alan Modra <amodra@bigpond.net.au>
3162
3163 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3164 instead of _bfd_elfcore_section_from_phdr.
3165 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3166 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3167 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3168 (elfcore_grok_prstatus): Likewise.
3169 (elfcore_grok_lwpstatus): Likewise.
3170 (bfd_get_elf_phdr_upper_bound): Likewise.
3171 (elfcore_make_note_pseudosection): Formatting.
3172 (_bfd_elfcore_strndup): Formatting.
3173 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3174 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3175
31762001-06-29 Daniel Jacobowitz <drow@mvista.com>
3177
3178 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3179 and _bfd_elfcore_strndup.
3180 (struct elf_backend_data): Add elf_backend_grok_prstatus
3181 and elf_backend_grok_psinfo.
3182 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3183 (elfcore_grok_prstatus): Use it.
3184 (elfcore_make_note_pseudosection): Likewise.
3185 (elfcore_strndup): Rename to...
3186 (_bfd_elfcore_strndup): Here, and make global.
3187 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3188 (elfcore_grok_note): Call elf_backend_grok_prstatus
3189 and elf_backend_grok_psinfo if available.
3190 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3191 (_bfd_elf32_mips_grok_psinfo): New function.
3192 (elf_backend_grok_prstatus): Define.
3193 (elf_backend_grok_psinfo): Define.
3194 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3195 (elf_backend_grok_psinfo): Likewise.
3196 (elfNN_bed): Include elf_backend_grok_prstatus and
3197 elf_backend_grok_psinfo.
3198
31992001-06-29 H.J. Lu <hjl@gnu.org>
3200
3201 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3202 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3203 is NULL before filling PLT.
3204
32052001-06-29 Alan Modra <amodra@bigpond.net.au>
3206
3207 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3208
32092001-06-27 Alan Modra <amodra@bigpond.net.au>
3210
3211 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3212 here..
3213 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3214 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3215 after gc has run.
3216
3217 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3218 (IS_ABSOLUTE_RELOC): Define.
3219 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3220 (hppa_link_hash_newfunc): Always init it.
3221 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3222 create COPY relocs only when the reloc is in a read-only section.
3223 Instead, allocate space for a dynamic reloc to reference the
3224 library symbol directly. Keep track of space we allocate using
3225 relocs_entries.
3226 (hppa_discard_copies): Delete, and move code to..
3227 (allocate_plt_and_got): ..here. Rename to
3228 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3229 relocs for non-shared link.
3230 (elf32_hppa_size_dynamic_sections): Update calls to above.
3231 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3232 in lieu of COPY relocs.
3233
3234 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3235 here..
3236 (elf_i386_adjust_dynamic_symbol): ..nor here..
3237 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3238 after gc has run.
3239 (elf_i386_size_dynamic_sections): Fix a comment.
3240 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3241 involved in writing reloc out.
3242
32432001-06-25 Alan Modra <amodra@bigpond.net.au>
3244
3245 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3246 Ensure syms are dynamic if we might be emitting a reloc.
3247 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3248 for undefweak or undefined syms..
3249 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3250
3251 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3252 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3253 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3254 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3255
32562001-06-24 H.J. Lu <hjl@gnu.org>
3257
3258 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3259 strncasecmp/strcasecmp instead of strncmp/strcmp.
3260
32612001-06-23 H.J. Lu <hjl@gnu.org>
3262
3263 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3264 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3265 in the regular object file and treat the weak definition as
3266 the normal one.
3267
32682001-06-23 Alan Modra <amodra@bigpond.net.au>
3269
3270 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3271 unresolved_reloc test to exclude cases where we use "relocation"
3272 before setting it to point into the .got. Reinstate fudge for
3273 unresolved relocs in debugging sections.
3274
3275 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3276 complicated tests for unresolvable relocs with a simple direct
3277 scheme using "unresolved_reloc" var.
3278
3279 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3280 elf_i386_dyn_relocs. Update comment.
3281 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3282 dyn_relocs.
3283 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3284 others to aborts.
3285 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3286 abort.
3287 (elf_i386_size_dynamic_sections): Likewise.
3288 (elf_i386_finish_dynamic_symbol): Likewise.
3289 (elf_i386_finish_dynamic_sections): Likewise.
3290 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3291 handling code.
3292
3293 Avoid creating COPY relocs if possible.
3294 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3295 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3296 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3297 reloc is in a read-only section. Instead, allocate space for a
3298 dynamic reloc to reference the library symbol directly. Keep
3299 track of space we allocate using pcrel_relocs_copied.
3300 (discard_copies): Delete, and move code to ..
3301 (allocate_plt_and_got): ..here. Rename to
3302 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3303 relocs for non-shared link.
3304 (elf_i386_size_dynamic_sections): Update calls to above functions.
3305 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3306 more ugly logic to avoid "unresolvable relocation" error. Use
3307 htab shortcut in place of elf_hash_table macro.
3308 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3309 not always be created now.
3310
33112001-06-20 Bo Thorsen <bo@suse.co.uk>
3312
3313 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3314 shared libraries.
3315
33162001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3317
3318 * configure.host (mips64-*-linux): Reformat.
3319
33202001-06-21 Alan Modra <amodra@bigpond.net.au>
3321
3322 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3323 allocate local .got space. Use shortcuts from hash table for .got
3324 and .plt rather than comparing section names.
3325 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3326 adjusting index into local_got_refcounts to document what we are
3327 really doing.
3328 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3329 Tidy .got and .plt error checking.
3330
33312001-06-20 Catherine Moore <clm@redhat.com>
3332
3333 * elf-bfd.h (struct elf_backend_data):
3334 elf_backend_emit_relocs: New field: Function for emitting
3335 relocs.
3336 elf_backend_count_relocs: New field: Function for determining
3337 the number of relocs to be emitted.
3338 * elfxx-target.h: Provide default (NULL) values for
3339 elf_backend_emit_relocs and elf_backend_count_relocs.
3340 * elflink.h (elf_link_size_reloc_section): Make the hash table
3341 big enough to hold the relocs counted by either reloc_count or
3342 o->reloc_count.
3343 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3344 should be emitted, either because of a command line option
3345 stored in the info structure or because the target provides a
3346 special reloc emitting function.
3347 If the target provides a reloc counting function use it,
3348 unless performing a relocatable link or emitting all relocs.
3349 Also set the SEC_RELOC flag on any output section which will
3350 contain relocs.
3351 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3352 should be emitted, either because of a command line option
3353 stored in the info structure or because the target provides a
3354 special reloc emitting function.
3355 If the target provides a reloc emitting function, use it,
3356 unless performing a relocatable link or emitting all relocs.
3357
33582001-06-20 H.J. Lu <hjl@gnu.org>
3359
3360 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3361 allocate local .got space.
3362
33632001-06-19 Andreas Jaeger <aj@suse.de>
3364
3365 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3366 dynamic symbols.
3367
33682001-06-18 Hans-Peter Nilsson <hp@axis.com>
3369
3370 * elflink.h (struct elf_assign_sym_version_info): Remove member
3371 export_dynamic. All users changed to use info member.
3372 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3373 export_dynamic, instead use member in parameter info.
3374 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3375 bfd_elf64_size_dynamic_sections): Update prototype.
3376 * bfd-in2.h: Regenerate.
3377
33782001-06-18 H.J. Lu <hjl@gnu.org>
3379
3380 * elflink.h (elf_info_failed): Add a new field, verdefs.
3381 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3382 elf_export_symbol.
3383 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3384 should be exported.
3385
33862001-06-17 H.J. Lu <hjl@gnu.org>
3387
3388 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3389 readonly_reloc, to record if a relocation in the .rel.dyn
3390 section is against a read-only section.
3391 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3392 field to false.
3393 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3394 in the .rel.dyn section against a read-only section by setting
3395 DF_TEXTREL or readonly_reloc.
3396 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3397 it is true.
3398 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3399 there is a relocation in the .rel.dyn section against a
3400 read-only section.
3401 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3402 DF_TEXTREL is set.
3403
34042001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3405
3406 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3407 function. Move flagword result into parameter list. Remove
3408 comment about setting bfd_error_handler to intercept failure
3409 results.
3410 * coffgen.c (make_a_section_from_file): Examine result of
3411 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3412 caller.
3413 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3414 function. Move flagword result into parameter list.
3415 * libcoff.h: Regenerate.
3416 * libecoff.h: Regenerate.
3417
34182001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3419
3420 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3421 section is going to follow it.
3422
34232001-06-12 Catherine Moore <clm@redhat.com>
3424
3425 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3426 with the file_align entry from elf_backend_data.
3427 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3428 (elf_gc_record_vtentry): Likewise.
3429
34302001-06-10 Alan Modra <amodra@bigpond.net.au>
3431
3432 * elflink.h: Whitespace changes.
3433 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3434 rather than "unsigned char".
3435 (elf_link_output_relocs): Likewise.
3436 (elf_link_input_bfd): Likewise.
3437 (elf_reloc_link_order): LIkewise.
3438 * elf.c: s/CONST/const/. Whitespace changes.
3439 * elf32-mips.c: Formatting fix.
3440
3441 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3442 * Makefile.in: Regenerate.
3443 * po/Make-in: Remove trailing tab.
3444
34452001-06-09 Philip Blundell <philb@gnu.org>
3446
3447 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3448 change.
3449 (elf32_arm_plt_entry): Likewise.
3450
34512001-06-08 H.J. Lu <hjl@gnu.org>
3452
3453 * elf.c (swap_out_syms): Keep names for global section symbols.
3454
34552001-06-07 H.J. Lu <hjl@gnu.org>
3456
3457 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3458 MIPS-based machines need it.
3459
34602001-06-07 H.J. Lu <hjl@gnu.org>
3461
3462 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3463 for SGI only.
3464
3465 * config.bfd: Remove ecoff from Linux/mips.
3466
34672001-06-07 Andreas Jaeger <aj@suse.de>
3468
3469 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3470 assertion.
3471 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3472 alignment of 8 for .rela sections; handle further relocations.
3473
34742001-06-06 Christian Groessler <cpg@aladdin.de>
3475
3476 * coff-z8k.c: Fix formatting.
3477 Fix howtos: howto->size was always 1.
3478
34792001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3480
3481 * configure.host (mips64*-*-linux*): Define.
3482
34832001-06-05 Alan Modra <amodra@bigpond.net.au>
3484
3485 * elf32-i386.c (elf_i386_discard_copies): Rename to
3486 discard_copies, and use elf_link_hash_entry arg rather than
3487 elf_i386_link_hash_entry.
3488 (elf_i386_link_hash_traverse): Delete.
3489 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3490 Tidy sizing of dynamic sections.
3491 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3492 possible .plt entries.
3493 (elf_i386_gc_sweep_hook): Likewise.
3494 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3495 everything with plt.refcount <= 0.
3496
3497 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3498 .relgot space here.
3499 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3500 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3501 .rel.plt here..
3502 (allocate_plt_and_got): ..instead do it all here. New function.
3503 (elf_i386_size_dynamic_sections): Allocate local .got space and
3504 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3505 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3506 rather than gc variety).
3507 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3508 (elf_i386_relocate_section): Use it here and correct handling of
3509 R_386_GOT32. Provide section and offset for "unresolvable
3510 relocation" error message.
3511 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3512
3513 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3514 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3515 (elf_i386_link_hash_table_create): Init them.
3516 (create_got_section): New function.
3517 (elf_i386_create_dynamic_sections): New function.
3518 (elf_backend_create_dynamic_sections): Set to above.
3519 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3520 calling bfd_get_section_by_name.
3521 (elf_i386_gc_sweep_hook): Likewise.
3522 (elf_i386_adjust_dynamic_symbol): Likewise.
3523 (elf_i386_size_dynamic_sections): Likewise.
3524 (elf_i386_relocate_section): Likewise.
3525 (elf_i386_finish_dynamic_sections): Likewise.
3526
3527 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3528
35292001-06-02 H.J. Lu <hjl@gnu.org>
3530
3531 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3532 and ELFOSABI_HPUX.
3533 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3534
35352001-06-02 H.J. Lu <hjl@gnu.org>
3536
3537 * aout-cris.c (MACHTYPE_OK): New. Defined.
3538
35392001-06-02 Hans-Peter Nilsson <hp@axis.com>
3540
3541 * section.c (_bfd_strip_section_from_output): Handle NULL
3542 output_section.
3543
35442001-06-02 H.J. Lu <hjl@gnu.org>
3545
3546 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3547 rs6000coff64_vec only if BFD64 is defined.
3548 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3549
35502001-06-02 H.J. Lu <hjl@gnu.org>
3551
3552 * coff-ia64.c (ia64coff_object_p): Rewrite with
3553 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3554
35552001-06-01 Andreas Jaeger <aj@suse.de>
3556
3557 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3558 relocation, small reformatting.
3559
35602001-05-29 Andreas Jaeger <aj@suse.de>
3561
3562 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3563 (elf64_x86_64_relocate_section): Likewise.
3564
35652001-05-30 Alan Modra <amodra@one.net.au>
3566
3567 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3568 millicode. Don't allocate .got and .rela.got space here..
3569 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3570 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3571 .rela.plt here..
3572 (hppa_handle_PIC_calls): ..nor here..
3573 (allocate_plt_and_got): ..instead do it all here. New function.
3574 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3575 call allocate_plt_and_got. No need to zap .got if not dynamic.
3576 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3577 gc_common_final_link.
3578 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3579 (elf32_hppa_relocate_section): Use it here.
3580 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3581 dynamic_sections_created.
3582 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3583
35842001-05-28 Andreas Jaeger <aj@suse.de>
3585
3586 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3587 generic version since we want a hashsize of 4.
3588 (elf_backend_size_info): Likewise.
3589
35902001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3591
3592 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3593 a zeroing loop.
3594 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3595 (elf_link_input_bfd): Likewise.
3596 (elf_reloc_link_order): Likewise.
3597 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3598 relocations correctly.
3599
36002001-05-28 Nicolas Pitre <nico@cam.org>
3601
3602 * elf32-arm.h: fix PLT generation for big endian ARM
3603
36042001-05-28 Alan Modra <amodra@one.net.au>
3605
3606 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3607 for symbols forced local that need plabels.
3608 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3609 .plt.rela for local syms if non-shared.
3610 (hppa_build_one_stub): Mask lsb of plt.offset.
3611 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3612 (clobber_millicode_symbols): Correct comment.
3613 (elf32_hppa_relocate_section): Likewise.
3614 (elf32_hppa_finish_dynamic_symbol): Likewise.
3615
36162001-05-28 Jeff Sturm <jsturm@one-point.com>
3617
3618 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3619 * bfd-in2.h: Regenerate.
3620 * libbfd.h: Regenerate.
3621 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3622 and BFD_RELOC_SPARC_UA64 mapping
3623 * elf64-sparc.c: Likewise.
3624
36252001-05-25 H.J. Lu <hjl@gnu.org>
3626
3627 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3628 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3629 (coff-rs6000.lo): Remove the old dependency.
3630 * Makefile.in: Rebuild.
3631
3632 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3633 coff-rs6000.lo.
3634
36352001-05-25 H.J. Lu <hjl@gnu.org>
3636
3637 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3638 rs6000coff_core_file_matches_executable_p,
3639 rs6000coff_core_file_failing_command and
3640 rs6000coff_core_file_failing_signal only if AIX_CORE is
3641 defined.
3642 (pmac_xcoff_vec): Likewise.
3643 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3644
36452001-05-25 Timothy Wall <twall@redhat.com>
3646
3647 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3648 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3649
36502001-05-25 H.J. Lu <hjl@gnu.org>
3651
3652 * bfd-in2.h: Regenerated.
3653 * libcoff.h: Likewise.
3654
36552001-05-25 Alan Modra <amodra@one.net.au>
3656
3657 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3658 undefined millicode syms in shared libs.
3659 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3660 (elf32_hppa_check_relocs): Likewise.
3661 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3662 (elf32_hppa_size_dynamic_sections): Likewise.
3663 (elf32_hppa_relocate_section): Likewise.
3664 (elf32_hppa_finish_dynamic_symbol): Likewise.
3665 (elf32_hppa_finish_dynamic_sections): Likewise.
3666
36672001-05-24 Tom Rix <trix@redhat.com>
3668
3669 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3670 xcoff-target.h not used to define rs6000 or ppc bfd.
3671 * Makefile.in same
3672
3673 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3674 to 64 bit.
3675
3676 * coff-rs6000.c : Many changes for 64 bit support. Move common
3677 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3678 and pmac_xcoff_vec
3679
3680 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3681 linker now supported. Explictly define the rs6000coff64_vec.
3682
3683 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3684 (coff_print_aux) same
3685 (coff_write_object_contents) same
3686 (coff_slurp_line_table) same
3687
3688 * coffgen.c : (coff_fix_symbol_name) formatting
3689 (coff_mangle_symbols) xcoff 64 bit support
3690 (coff_write_symbol) same
3691 (coff_write_alien_symbol) same
3692 (coff_write_native_symbol) same
3693 (coff_write_symbols) same
3694 (coff_get_symbol_info) same
3695 (bfd_coff_get_syment) same
3696 (coff_print_symbol) same
3697
3698 * config.bfd : add powerpc64-*-aix* target
3699
3700 * libcoff-in.h : formatting
3701
3702 * libcoff.h : move xcoff extern declarations to libxcoff.h
3703
3704 * libxcoff.h : New file
3705
3706 * xcofflink.c : Many changes for xcoff64 support. Move common
3707 structures to include/coff/xcoff.h. Move specific structure to
f09ebc7d 3708 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
56882138
AM
3709 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3710
3711 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3712 aix4.2+ -binitfini.
3713
3714 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3715
37162001-05-23 Alexandre Oliva <aoliva@redhat.com>
3717
3718 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3719 s/ENTIRES/ENTRIES/.
3720
37212001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3722
3723 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3724 * libbfd.h: Regenerate.
3725 * bfd-in2.h: Regenerate.
3726
3727 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3728 * archures.c (bfd_mach_mips12000): Define.
3729 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3730 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3731 support.
3732 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3733 * bfd-in2.h: Regenerate.
3734 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3735
37362001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3737
3738 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3739 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3740 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3741 that is used by GCC.
3742
37432001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3744
3745 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3746 of entries in a structured section.
3747 * elf.c: Use new macro.
3748 * elf32-i386.c: Use new macro.
3749 * elf32-mips.c: Use new macro.
3750 * elf64-alpha.c: Use new macro.
3751 * elf64-sparc.c: Use new macro.
3752 * elfcode.h: Use new macro.
3753 * elflink.h: Use new macro.
3754
37552001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3756
3757 * bfdint.texi: Replace -oformat with --oformat.
3758
37592001-05-21 Andreas Jaeger <aj@suse.de>
3760
3761 * dwarf2.c (decode_line_info): Fix error message.
3762 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3763 adjust error message.
3764
37652001-05-18 H.J. Lu <hjl@gnu.org>
3766
3767 * elflink.h (elf_link_add_object_symbols): Revert the last
3768 change.
3769
37702001-05-17 Alan Modra <amodra@one.net.au>
3771
3772 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3773 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3774 (hppa_build_one_stub): Add an assert to check plt.offset.
3775
37762001-05-17 H.J. Lu <hjl@gnu.org>
3777
3778 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3779 version definition to basename of the output filename.
3780
37812001-05-17 H.J. Lu <hjl@gnu.org>
3782
3783 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3784 basename of the bfd filename.
3785
37862001-05-16 Alan Modra <amodra@one.net.au>
3787
3788 * section.c (asection): Add linker_has_input field.
3789 (STD_SECTION): Adjust initialization to suit.
3790 * ecoff.c (bfd_debug_section): Likewise.
3791 * bfd-in2.h: Regenerate.
3792
37932001-05-15 Alexandre Oliva <aoliva@redhat.com>
3794
3795 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3796 negative 32-bit operands to 16 operands when the operand is
3797 going to be zero-extended by the modified opcode.
3798
37992001-05-12 Peter Targett <peter.targett@arccores.com>
3800
3801 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3802 name for 'arc5' core versions.
3803 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3804
3805 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3806 architecture.
3807 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3808
38092001-05-11 Jakub Jelinek <jakub@redhat.com>
3810
3811 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3812 sections as well.
3813 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3814 to .gnu.linkonce.t.FOO text section.
3815
38162001-05-11 Jakub Jelinek <jakub@redhat.com>
3817
3818 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3819 fields, change sec into secinfo.
3820 (struct sec_merge_info): Add chain, remove last fields.
3821 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3822 (sec_merge_hash_lookup): If lookup could not use a string only
3823 because it has bad alignment, mark the old string for deletion.
3824 (sec_merge_add): Add secinfo argument. Don't compute entry's
3825 position, instead record the section.
3826 (sec_merge_emit): Update for the sec into secinfo change in
3827 struct sec_merge_hash_entry.
3828 (_bfd_merge_section): Only record the section for merging, defer
3829 putting strings into the hash table.
3830 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3831 _bfd_merge_sections): New functions.
3832 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3833 changes.
3834 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3835 (_bfd_nolink_bfd_merge_sections): Define.
3836 * libbfd.h: Likewise.
3837 (bfd_generic_merge_sections): Add prototype.
3838 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3839 (struct bfd_target): Likewise.
3840 * bfd.c (bfd_merge_sections): Define.
3841 * bfd-in2.h: Rebuilt.
3842 * elf.c (_bfd_elf_merge_sections): New function.
3843 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3844 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3845 * reloc.c (bfd_generic_merge_sections): New function.
3846 * vms.c (vms_bfd_merge_sections): New function.
3847 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3848 * aout-target.h (MY_bfd_merge_sections): Define.
3849 * aout-tic30.c (MY_bfd_merge_sections): Define.
3850 * binary.c (binary_bfd_merge_sections): Define.
3851 * bout.c (b_out_bfd_merge_sections): Define.
3852 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3853 * coffcode.c (coff_bfd_merge_sections): Define.
3854 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3855 * i386msdos.c (msdos_bfd_merge_sections): Define.
3856 * i386os9k.c (os9k_bfd_merge_sections): Define.
3857 * ieee.c (ieee_bfd_merge_sections): Define.
3858 * ihex.c (ihex_bfd_merge_sections): Define.
3859 * nlm-target.h (nlm_bfd_merge_sections): Define.
3860 * oasys.c (oasys_bfd_merge_sections): Define.
3861 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3862 * som.c (som_bfd_merge_sections): Define.
3863 * srec.c (srec_bfd_merge_sections): Define.
3864 * tekhex.c (tekhex_bfd_merge_sections): Define.
3865 * versados.c (versados_bfd_merge_sections): Define.
3866 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3867
38682001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3869
3870 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3871 to be unsigned long, in order to match its use.
3872
38732001-05-10 H.J. Lu <hjl@gnu.org>
3874
3875 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3876 indirect symbols.
3877
38782001-05-09 H.J. Lu <hjl@gnu.org>
3879
3880 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3881 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3882 Remove the unused veriable `dynver'.
3883
38842001-05-08 Ian Lance Taylor <ian@zembu.com>
3885
3886 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3887 NULL or is not COFF.
3888 (coff_i386_rtype_to_howto): Don't dump core if output section
3889 owner is not COFF.
3890
38912001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3892
3893 * ecoff.c (bfd_debug_section): Fix initialization.
3894 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3895 is always a positive integer. Cast away sign mismatch.
3896 * elf32-mips.c: Fix misleading comment and typo.
3897 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3898 correct data type.
3899 * elflink.c: Fix typo.
3900 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3901 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3902
39032001-05-04 Richard Henderson <rth@redhat.com>
3904
3905 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3906
39072001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3908
3909 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3910 EF_ARM_HASENTRY if the start address is set.
3911
39122001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3913
3914 * targets.c (_bfd_target_vector_entries): Compute value based on
3915 the size of the _bfd_target_vector and not bfd_target_vector.
3916
39172001-05-03 H.J. Lu <hjl@gnu.org>
3918
3919 * elfcode.h: Include "libiberty.h".
3920
3921 * elflink.h (elf_link_add_object_symbols): Set
3922 elf_dt_name (abfd) to basename of the bfd filename.
3923 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3924 of the bfd filename.
3925
39262001-05-03 Andreas Jaeger <aj@suse.de>
3927
3928 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3929 (elf_generic_info_to_howto_rel): Likewise.
3930 * coff-alpha.c (reloc_nil): Likewise.
3931 (alpha_ecoff_bad_format_hook): Likewise.
3932 (alpha_adjust_reloc_out): Likewise.
3933 (alpha_bfd_reloc_type_lookup): Likewise.
3934 (alpha_convert_external_reloc): Likewise.
3935 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3936 (elf64_alpha_reloc_bad): Likewise.
3937 (elf64_alpha_reloc_gpdisp): Likewise.
3938 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3939 (elf64_alpha_info_to_howto): Likewise.
3940 (elf64_alpha_add_symbol_hook): Likewise.
3941 (elf64_alpha_create_got_section): Likewise.
3942 (elf64_alpha_is_local_label_name): Likewise.
3943 (elf64_alpha_merge_ind_symbols): Likewise.
3944 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3945 (mips_elf64_get_reloc_upper_bound): Likewise.
3946 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3947 (nlm_alpha_get_public_offset): Likewise.
3948
39492001-05-02 Johan Rydberg <jrydberg@opencores.org>
3950
3951 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3952 about overflow in R_OPENRISC_LO_16_IN_INSN and
3953 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3954
39552001-04-30 H.J. Lu <hjl@gnu.org>
3956
3957 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3958 only for ELF_LINK_FORCED_LOCAL.
3959 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3960 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3961 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3962
3963 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3964 if the symbol has hidden or internal visibility.
3965
39662001-04-30 Alan Modra <amodra@one.net.au>
3967
3968 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3969 calls to undefined weak symbols.
3970
39712001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3972
3973 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3974 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3975
39762001-04-27 Andreas Jaeger <aj@suse.de>
3977
3978 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3979 out handled entries.
3980 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3981 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3982 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3983 GOT32.
3984
39852001-04-27 Sean McNeil <sean@mcneil.com>
3986
3987 * config.bfd: Add arm-vxworks target.
3988 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3989 addend (fro VXworks targets).
3990
39912001-04-26 H.J. Lu <hjl@gnu.org>
3992
3993 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3994 valid.
3995
39962001-04-25 Frank Ch. Eigler <fche@redhat.com>
3997
3998 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3999 * bfd-in2.h: Regenerated.
4000
40012001-04-24 Jakub Jelinek <jakub@redhat.com>
4002
4003 * merge.c (struct sec_merge_hash_entry): Add alignment field.
4004 (struct sec_merge_hash): Remove alignment_power.
4005 (sec_merge_hash_newfunc): Clear alignment.
4006 (sec_merge_hash_lookup): Pass alignment as argument.
4007 Use hashp->root.next, not hashp->next to walk the hash chain.
4008 If a string already in the hashtable does not have required
4009 alignment, create a new hashtable entry.
4010 (sec_merge_init): Remove alignment_power argument.
4011 (sec_merge_add): Add alignment argument.
4012 (sec_merge_emit): Alignment is now a per-entity thing, not per
4013 section.
4014 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4015 for proper alignment.
4016 Pass alignment information to sec_merge_add.
4017
40182001-04-24 Christian Groessler <cpg@aladdin.de>
4019
4020 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4021 and R_REL16 reloc types; accept odd values for R_REL16 type
4022
40232001-04-24 Johan Rydberg <jrydberg@opencores.org>
4024
4025 * cpu-openrisc.c: New file.
4026 * elf32-openrisc.c: Likewise.
4027
4028 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4029 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4030 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4031 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4032 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4033 * Makefile.in: Regenerated.
4034 * config.bfd: (openrisc-*-elf): New target.
4035 * configure.in (bfd_elf32_openrisc_vec): New vector.
4036 * configure: Regenerated.
4037 * libbfd.h: Regenerated.
4038 * bfd-in2.h: Regenerated.
4039 * reloc.c: Add OpenRISC relocations.
4040 * targets.c (bfd_elf32_openrisc_vec): Declare.
4041 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4042 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4043 (bfd_openrisc_arch): Declare.
4044 (bfd_archures_list): Add bfd_openrisc_arch.
4045 * elf.c (prep_headers): Add bfd_arch_openrisc.
4046
40472001-04-23 Bo Thorsen <bo@suse.de>
4048
4049 * elf64-x86-64.c: Add c++ vtable hack.
4050 Small whitespace and comment changes.
4051
40522001-04-19 Andreas Jaeger <aj@suse.de>
4053
4054 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4055 (elf64_x86_64_plt_entry): Likewise.
4056 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4057 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4058
40592001-04-17 Hans-Peter Nilsson <hp@axis.com>
4060
4061 * elf32-cris.c: Tweak comments related to dynamic linking.
4062 (cris_elf_relocate_section): When not creating shared object, fill
4063 in the .got table for any symbol not in the dynamic symbol table.
4064 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4065 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4066 table.
4067 (cris_elf_check_relocs): Use variable r_type in all places rather
4068 than the original expression. Add default case in switch for
4069 reloc types.
4070 (elf_cris_size_dynamic_sections): Iterate over
4071 elf_cris_discard_excess_program_dynamics when not creating shared
4072 library.
4073 (elf_cris_discard_excess_dso_dynamics): Renamed from
4074 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4075 (elf_cris_discard_excess_program_dynamics): New.
4076
40772001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4078
4079 * coffcode.h (coff_write_object_contents): Use
4080 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4081
40822001-04-14 H.J. Lu <hjl@gnu.org>
4083
4084 * bfd-in2.h: Regenerate.
4085
40862001-04-14 Jakub Jelinek <jakub@redhat.com>
4087
4088 * section.c (STD_SECTION): Add entsize.
4089
40902001-04-13 H.J. Lu <hjl@gnu.org>
4091
4092 * section.c (SEC_MERGE): Define new flag for merging.
4093 (SEC_STRINGS): Likewise.
4094 (entsize): New field.
4095
40962001-04-13 Roger Sayle <roger@metaphorics.com>
4097
4098 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4099 flag on pe-i386 targets.
4100
41012001-04-13 Jakub Jelinek <jakub@redhat.com>
4102
4103 * libbfd-in.h (_bfd_merge_section): New.
4104 (_bfd_write_merged_section): New.
4105 (_bfd_merged_section_offset): New.
4106 * libbfd.h: Rebuilt.
4107 * linker.c (_bfd_generic_link_output_symbols): Handle
4108 discard_sec_merge.
4109 * aoutx.h (aout_link_write_symbols): Likewise.
4110 * pdp11.c (aout_link_write_symbols): Likewise.
4111 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4112 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4113 sections.
4114 (elf_link_sec_merge_syms): New.
4115 (elf_link_input_bfd): Call _bfd_merged_section_offset
4116 and _bfd_write_merged_section.
4117 Handle discard_sec_merge.
4118 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4119 field.
4120 (struct bfd_elf_section_data): Likewise.
4121 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4122 SEC_STRINGS section flags and entsize from their ELF counterparts.
4123 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4124 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4125 from their BFD counterparts.
4126 * merge.c: New file.
4127 * Makefile.am: Add strtab.lo.
4128 * Makefile.in: Rebuilt.
4129
41302001-04-09 Hans-Peter Nilsson <hp@axis.com>
4131
4132 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4133 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4134
41352001-04-05 Steven J. Hill <sjhill@cotw.com>
4136
4137 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4138 endian MIPS ELF target.
4139 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4140 MIPS ELF target.
4141
4142 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4143 64bit big endian MIPS ELF target.
4144 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4145 endian MIPS ELF target.
4146 * configure: Regenerated.
4147
4148 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4149 little endian targets.
4150 (mips_elf_sym_is_global): Handle traditional targets.
4151
4152 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4153 64bit big endian MIPS ELF target.
4154 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4155 endian MIPS ELF target.
4156
4157 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4158 and bfd_elf64_tradlittlemips_vec.
4159
41602001-04-05 David Mosberger <davidm@hpl.hp.com>
4161
4162 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4163 ordinary "progbits" section.
4164
41652001-04-04 Alan Modra <alan@linuxcare.com.au>
4166
4167 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4168 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4169
41702001-04-03 David Mosberger <davidm@hpl.hp.com>
4171
4172 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4173
41742001-03-30 H.J. Lu <hjl@gnu.org>
4175
4176 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4177 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4178
41792001-03-26 H.J. Lu <hjl@gnu.org>
4180
4181 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4182 if there are any relocations for generic ELF.
4183 (bfd_elf32_bfd_link_add_symbols): Defined to
4184 elf32_generic_link_add_symbols.
4185 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4186 if there are any relocations for generic ELF.
4187 (bfd_elf64_bfd_link_add_symbols): Defined to
4188 elf64_generic_link_add_symbols.
4189
41902001-03-23 Nick Clifton <nickc@redhat.com>
4191
4192 * Makefile.am (BUILD_CFILES): New variable: List of C source
4193 files created in build directory.
4194 (BUILD_HFILES): New variable: List of header files created in
4195 build directory.
4196 (POTFILES): Delete.
4197 (po/POTFILES.in): Replace rule with empty entry.
4198 (po/SRC-POTFILES.in): New rule: Create a list of source files
4199 in the source directory.
4200 (po/BLD-POTFILES.in): New rule: Create a list of source files
4201 in the build directory.
4202 (MOSTLYCLEAN): Do not delete source files created in build
4203 directory.
4204 * Makefile.in: Regenerate.
4205 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4206 into po/Makefile.
4207 * configure: Regenerate.
4208
4209 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4210 and BLD_POTFILES.
4211 Add .. to the search path when building bfd.pot.
4212 Delete POTFILES when performing distclean.
4213 Add comment describing why distclean is broken in maintainer mode.
4214 * po/POTFILES.in: Delete.
4215 * po/SRC-POTFILES.in: New file.
4216 * po/BLD-POTFILES.in: New file.
4217 * po/bfd.pot: Regenerate.
4218
42192001-03-22 Hans-Peter Nilsson <hp@axis.com>
4220
4221 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4222 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4223 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4224 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4225 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4226 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4227 functions.
4228 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4229 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4230 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4231 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4232 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4233 New HOWTO members for new relocs.
4234 (cris_reloc_map): Map new relocs.
4235 (ELF_DYNAMIC_INTERPRETER): Define.
4236 (PLT_ENTRY_SIZE): Define.
4237 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4238 elf_cris_pic_plt_entry): New, PLT templates.
4239 (struct elf_cris_pcrel_relocs_copied, struct
4240 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4241 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4242 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4243 positive values. Adjust PCREL relocs to be relative to location
4244 after relocation.
4245 (cris_elf_relocate_section): Handle relocations to dynamic
4246 objects. Handle new relocations. Call error handler when seeing
4247 non-PIC relocation for read-only sections while generating shared
4248 object.
4249 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4250 entries.
4251 (bfd_elf32_bfd_link_hash_table_create,
4252 elf_backend_adjust_dynamic_symbol,
4253 elf_backend_size_dynamic_sections,
4254 elf_backend_finish_dynamic_symbol,
4255 elf_backend_finish_dynamic_sections,
4256 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4257 elf_backend_hide_symbol, elf_backend_want_got_plt,
4258 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4259 elf_backend_got_header_size, elf_backend_plt_header_size):
4260 Define.
4261
4262 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4263 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4264 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4265 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4266 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4267 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4268 * bfd-in2.h, libbfd.h: Regenerate.
4269
42702001-03-21 Diego Novillo <dnovillo@redhat.com>
4271
4272 (_bfd_mips_elf_relocate_section): Give a better error message when
4273 a relocation is not recognized.
4274
42752001-03-21 Alan Modra <alan@linuxcare.com.au>
4276
4277 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4278 non-NULL before attempting to dereference.
4279
42802001-03-20 H.J. Lu <hjl@gnu.org>
4281
4282 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4283 * configure: Rebuild.
4284
42852001-03-20 Andreas Schwab <schwab@suse.de>
4286
4287 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4288 relocation value when resolving a reference from a debugging
4289 section.
4290
42912001-03-16 Scott Thomason <SThomaso@hii.com>
4292
4293 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4294 (xcoff64_swap_sym_out): Fix syntax errors.
4295
42962001-03-16 Richard Sandiford <rsandifo@redhat.com>
4297
4298 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4299
43002001-03-15 Alan Modra <alan@linuxcare.com.au>
4301
4302 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4303 (hppa_link_hash_newfunc): Init it.
4304 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4305 section appears to be non-PIC.
4306 (final_link_relocate): Likewise.
4307 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4308 possible candidate function, and set pic_call for those that will
4309 only have a .plt entry for the PIC call stub.
4310 (hppa_handle_PIC_calls): Set maybe_pic_call.
4311
43122001-03-12 DJ Delorie <dj@redhat.com>
4313
4314 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4315 R_SH_DIR8WP* relocs if they're against external symbols, else
4316 they're just for relaxing. Validate the reloc values.
4317
43182001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4319
4320 * binary.c (bfd_external_binary_architecture): Declare.
4321 (binary_object_p): If bfd_external_binary_architecture is defined,
4322 set the architecture to this string.
4323
43242001-03-11 Philip Blundell <philb@gnu.org>
4325
4326 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4327 entries that could serve as a definition for a weak symbol.
4328
43292001-03-08 Nick Clifton <nickc@redhat.com>
4330
4331 * Most files: Update copyright notices using Perl script created
4332 by Kevin Buettner <kevinb@redhat.com>.
4333
43342001-03-07 Nick Clifton <nickc@redhat.com>
4335
4336 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4337 prior patch on ! defined OLD_ARM_ABI.
4338
43392001-03-07 Andreas Jaeger <aj@suse.de>
4340
4341 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4342 some relocation values.
4343
43442001-03-06 Nick Clifton <nickc@redhat.com>
4345
4346 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4347 of offset in BLX(1) instruction.
4348 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4349 offset in BLX(1) instruction.
4350 Fix formatting.
4351
43522001-03-06 Nick Clifton <nickc@redhat.com>
4353
4354 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4355 BFD_RELOC_THUMB_PCREL_BLX.
4356
43572001-03-06 Igor Shevlyakov <igor@windriver.com>
4358
4359 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4360 * bfd-in2.h: Regenerate.
4361 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4362 * ieee.c (ieee_write_processor): Set proper id for
4363 Coldfire CPUs.
4364
43652001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4366
4367 * configure.in: Add s390 target.
4368 * configure: Regenerate.
4369
43702001-02-28 Andreas Jaeger <aj@suse.de>
4371
4372 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4373 to addend.
4374
43752001-02-28 Philip Blundell <pb@futuretv.com>
4376
4377 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4378 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4379
43802001-02-27 H.J. Lu <hjl@gnu.org>
4381
4382 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4383 abfd->tdata.aout_data == NULL.
4384
43852001-02-27 Alan Modra <alan@linuxcare.com.au>
4386
4387 * elf32-hppa.c: Correct field selector in stub comments.
4388 (clobber_millicode_symbols): Formatting fix.
4389
4390 * configure.in: Bump version to 2.11.90.
4391 * configure: Regenerate.
4392 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4393 (CFILES): $SOURCE_CFILES + generated C files.
4394 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4395 Run "make dep-am"
4396 * Makefile.in: Regenerate.
4397 * doc/Makefile.in: This too.
4398
43992001-02-26 Timothy Wall <twall@cygnus.com>
4400
4401 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4402 comments.
4403
44042001-02-26 Nick Clifton <nickc@redhat.com>
4405
4406 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4407 up, replacing multiple if statements with a switch.
4408 (handle_COMDAT): New function.
4409
44102001-02-26 H.J. Lu <hjl@gnu.org>
4411
4412 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4413 a warning for section flags we do not handle instead of
4414 aborting.
4415
44162001-02-26 Andreas Jaeger <aj@suse.de>
4417
4418 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4419
44202001-02-22 Timothy Wall <twall@cygnus.com>
4421
4422 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4423 * configure.in: Add objects for elf64_ia64_aix vectors.
4424 * configure: Regenerated.
4425 * configure.host: Recognize ia64-*-aix*.
4426 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4427 for AIX. AIX5 requires most relocations to be dynamic (*all*
4428 binaries are somewhat similar to shared libraries).
4429 * targets.c: Add elf64_ia64_aix vectors.
4430
44312001-02-21 David Mosberger <davidm@hpl.hp.com>
4432
4433 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4434 C8 said "1" instead of "8". Clarify error string for IMM22:
4435 "signed integer" instead of just "integer".
4436
44372001-02-20 Andreas Jaeger <aj@suse.de>
4438
4439 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4440 PLT entries that could serve as a definition for a weak symbol.
4441
44422001-02-19 Jakub Jelinek <jakub@redhat.com>
4443
4444 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4445 entries that could serve as a definition for a weak symbol.
4446 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4447
44482001-02-18 David O'Brien <obrien@FreeBSD>
4449
4450 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4451 FreeBSD/i386-CURRENT differently until I can figure out the needed
4452 corefile changes.
4453 * configure: Regenerate.
4454 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4455 FreeBSD/PowerPC, and FreeBSD/sparc64.
4456
44572001-02-18 lars brinkhoff <lars@nocrew.org>
4458
4459 * Makefile.am: Add PDP-11 a.out target.
4460 * config.bfd: Likewise.
4461 * configure.in: Likewise.
4462 * targets.c: Likewise.
4463 * archures.c: Likewise.
4464 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4465 * libbfd.h: Add PDP-11 relocations.
4466 * reloc.c: Likewise.
4467 * cpu-pdp11.c: New file.
4468 * pdp11.c: New file.
4469
4470 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4471 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4472 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4473 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4474 (GET_MAGIC): New macro.
4475 (PUT_MAGIC): Likewise.
4476 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4477
44782001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4479
4480 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4481 multiarch needs it).
4482
44832001-02-18 H.J. Lu <hjl@gnu.org>
4484
4485 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4486 index.
4487
44882001-02-18 Kazu Hirata <kazu@hxi.com>
4489
4490 * vms-misc.c: Fix formatting.
4491
44922001-02-16 Kazu Hirata <kazu@hxi.com>
4493
4494 * vms.c: Fix formatting.
4495
44962001-02-14 H.J. Lu <hjl@gnu.org>
4497
4498 * elf.c (elf_find_function): New function.
4499 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4500 the file name and function name.
4501
45022001-02-14 Nick Clifton <nickc@redhat.com>
4503
4504 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4505 asection structure.
4506
4507 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4508 (BFD64_BACKENDS): Add pepigen.c
4509 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4510
4511 * Makefile.in: Regenerate.
4512 * configure: Regenerate.
4513 * po/POTFILES.in: Regenerate.
4514 * po/bfd.pot: Regenerate.
4515
45162001-02-14 H.J. Lu <hjl@gnu.org>
4517
4518 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4519 force_minimum_alignment.
4520
45212001-02-14 Bo Thorsen <bo@suse.de>
4522
4523 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4524 (elf64_86_64_size_info): Struct added to fix a problem
4525 with the hashtable string entries.
4526 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4527 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4528 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4529 remove the FIXME for this.
4530 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4531 section. Also removed the FIXME for it.
4532 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4533 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4534 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4535
45362001-02-13 Richard Henderson <rth@redhat.com>
4537
4538 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4539 and not user provided.
4540
45412001-02-13 Kazu Hirata <kazu@hxi.com>
4542
4543 * vms.c (vms_print_symbol): Remove unreachable code.
4544
4545 * rs6000-core.c: Fix formatting.
4546
45472001-02-13 David Mosberger <davidm@hpl.hp.com>
4548
4549 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4550 as _bfd_XXi_only_swap_filehdr_out.
4551 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4552 pe->force_minimum_alignment to TRUE.
4553 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4554 PEI_TARGET_SUBSYSTEM.
4555 (pe_print_private_bfd_data): Call
4556 _bfd_XX_print_private_bfd_data_common() instead of
4557 _bfd_pe_print_private_bfd_data_common().
4558 (pe_bfd_copy_private_bfd_data): Call
4559 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4560 _bfd_pe_bfd_copy_private_bfd_data_common().
4561 (coff_bfd_copy_private_section_data): Define as
4562 _bfd_XX_bfd_copy_private_section_data instead of
4563 _bfd_pe_bfd_copy_private_section_data.
4564 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4565 of a _bfd_pe_get_symbol_info.
4566
4567 * peigen.c: Delete.
4568
4569 * peXXigen.c: Renamed from peigen.c.
4570 (COFF_WITH_XX): Define this macro (will get expanded into
4571 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4572 compiled as peigen.c or pepigen.c.
4573 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4574 define the canonical PEP structures and definitions.
4575 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4576 effect, enforce minimum file and section alignments. If
4577 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4578 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4579 so, by default, this is a no-op).
4580
4581 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4582 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4583 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4584 _bfd_pefoo if it's not defined. Use these macros to define
4585 coff swap macros.
4586
4587 * libcoff.h (pe_tdata): Add members target_subsystem and
4588 force_minimum_alignment.
4589
4590 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4591 COFF_WITH_pep.
4592 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4593
4594 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4595 peigen.lo.
4596
4597 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4598 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4599 PEPAOUTHDR.
4600
4601 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4602 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4603 (peigen.c): Add rule to generate from peXXigen.c.
4604 (pepigen.c): Ditto.
4605 (pepigen.lo): List dependencies for pepigen.lo.
4606
46072001-02-13 Alan Modra <alan@linuxcare.com.au>
4608
4609 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4610 $global$ referenced but not defined, set its value here.
4611
46122001-02-09 Bo Thorsen <bo@suse.de>
4613
4614 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4615 alignment to 3.
4616 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4617 and relocation.
4618 (elf64_x86_64_relocate_section): Fix formatting.
4619 (elf64_x86_64_relocate_section): Fix addend for relocation of
4620 R_X86_64_(8|16|32|PC8|PC16|PC32).
4621
46222001-02-12 Jan Hubicka <jh@suse.cz>
4623
4624 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4625
46262001-02-11 H.J. Lu <hjl@gnu.org>
4627
4628 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4629 alignment.
4630
46312001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4632
4633 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4634 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4635 relocations against dynsym symbols.
4636
4637 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4638 the R_MIPS_26 relocation.
4639 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4640 the R_MIPS_26 relocation.
4641 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4642 relocation.
4643 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4644 the R_MIPS_26 relocation.
4645 (mips_elf64_howto_table_rela): Likewise.
4646
4647 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4648 member to mark symbols that have non-CALL relocations against
4649 them.
4650 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4651 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4652 R_MIPS_GOT16.
4653 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4654 non-CALL relocation against it is encountered.
4655 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4656 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4657 no_fn_stub is not set.
4658
4659 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4660 information from the real symbol for indirect ones.
4661 Check no_fn_stub to find out if a symbol has a function stub
4662 indeed.
4663
46642001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4665
4666 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4667 * Makefile.in: Regenerate.
4668
46692001-02-09 David Mosberger <davidm@hpl.hp.com>
4670
4671 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4672 true if section name is an unwind table section name.
4673 (elfNN_ia64_additional_program_headers): Count each unwind section
4674 separately.
4675 (elfNN_ia64_modify_segment_map): Install one unwind program header
4676 for each unwind separate section. Note: normally the linker
4677 script merges the unwind sections that go into a single segment,
4678 so this still generates at most one unwind program header per
4679 segment.
4680
4681 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4682 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4683 (elfNN_ia64_fake_sections): Mark sections with names that start
4684 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4685 unwind section.
4686
4687 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4688 Use it to make sh_info in unwind section point to the text section
4689 it applies to.
4690
46912001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4692
4693 * Makefile.am: Add linux target for S/390.
4694 * archures.c: Likewise.
4695 * bfd-in2.h: Likewise.
4696 * config.bfd: Likewise.
4697 * configure.in: Likewise.
4698 * elf.c: Likewise.
4699 * libbfd.h: Likewise.
4700 * targets.c: Likewise.
4701 * cpu-s390.c: New file.
4702 * elf32-s390.c: New file.
4703 * elf64-s390.c: New file.
4704
47052001-02-09 Nick Clifton <nickc@redhat.com>
4706
4707 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4708 ImageBase. This has already been done by coff_swap_hdr_in.
4709
47102001-02-09 Jakub Jelinek <jakub@redhat.com>
4711
4712 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4713
47142001-02-09 Jakub Jelinek <jakub@redhat.com>
4715
4716 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4717 (sparc64_elf_relocate_section): Likewise.
4718
47192001-02-09 Mark Kettenis <kettenis@gnu.org>
4720
4721 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4722 similar to R_SPARC_32.
4723 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4724
47252001-02-08 H.J. Lu <hjl@gnu.org>
4726
4727 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4728 relocation entries for weak definitions when building DSO with
4729 -Bsymbolic.
4730
47312001-02-08 Richard Henderson <rth@redhat.com>
4732
4733 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4734 before visibility. Locally defined protected symbols are not
4735 dynamic.
4736
47372001-02-08 Geoffrey Keating <geoffk@redhat.com>
4738
4739 * config.bfd: Enable coff64 for rs6000-*. Patch from
4740 <hzoli@austin.ibm.com>.
4741
47422001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4743
4744 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4745 found, do not attempt to find dwarf2 info before returning.
4746
47472001-02-07 Jakub Jelinek <jakub@redhat.com>
4748
4749 * elflink.h (is_global_symbol_definition): Rename to
4750 is_global_data_symbol_definition and have it reject function
4751 symbols.
4752 (elf_link_is_defined_archive_symbol): Use renamed function.
4753
47542001-02-07 Todd Vierling <tv@wasabisystems.com>
4755
4756 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4757 * libbfd.h (bfd_target_vector): Likewise.
4758 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4759 make static; create pointer reference named bfd_target_vector.
4760 (_bfd_target_vector_entries): Calculate this based on the array
4761 typed _bfd_target_vector.
4762
47632001-02-06 H.J. Lu <hjl@gnu.org>
4764
4765 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4766 internal symbols are not dynamic.
4767 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4768
47692001-02-06 Nick Clifton <nickc@redhat.com>
4770
4771 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4772 that it will not be pulled into the list of files that make up
4773 po/POTFILES.in.
4774 * Makefile.in: Regenerate.
4775 * po/bfd.pot: Regenerate.
4776
47772001-02-06 H.J. Lu <hjl@gnu.org>
4778
4779 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4780 checking.
4781 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4782 external_PEI_IMAGE_hdr.
4783
47842001-02-06 Kazu Hirata <kazu@hxi.com>
4785
4786 * elf-m10200.c: Fix formatting.
4787
47882001-02-04 Nick Clifton <nickc@redhat.com>
4789
4790 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4791 rel, it will be handled later on.
4792
47932001-02-02 Fred Fish <fnf@ninemoons.com>
4794
4795 * Makefile.in: Fix typo.
4796
47972001-02-01 Kazu Hirata <kazu@hxi.com>
4798
4799 * elf-m10300.c: Fix formatting.
4800
48012001-01-30 Alan Modra <alan@linuxcare.com.au>
4802
4803 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4804 (elf_backend_get_symbol_type): Define.
4805 (elf64_hppa_object_p): Set architecture and machine from elf
4806 header flags.
4807
48082001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4809
4810 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4811 before mdebug.
4812
48132001-01-26 Richard Henderson <rth@redhat.com>
4814
4815 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4816 for non-default visibility.
4817 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4818 delete ugly macro and replace with pretty function.
4819
48202001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4821
4822 * coff-go32.c: Update copyright.
4823 * coff-stgo32.c: Likewise.
4824 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4825 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4826 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4827 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4828
48292001-01-25 Kazu Hirata <kazu@hxi.com>
4830
4831 * bfd-in2.h: Rebuild.
4832 * libbfd.h: Likewise.
4833
48342001-01-23 H.J. Lu <hjl@gnu.org>
4835
4836 * bfd-in2.h: Rebuild.
4837
48382001-01-23 H.J. Lu <hjl@gnu.org>
4839
4840 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4841 is NULL or PRIV(vms_rec) is outside of the buffer.
4842
48432001-01-23 Kazu Hirata <kazu@hxi.com>
4844
4845 * coff64-rs6000.c: Fix formatting.
4846 * coff-arm.c: Likewise.
4847 * coffgen.c: Likewise.
4848 * cofflink.c: Likewise.
4849 * coff-mcore.c: Likewise.
4850 * coff-mips.c: Likewise.
4851 * coff-pmac.c: Likewise.
4852 * coff-ppc.c: Likewise.
4853 * coff-rs6000.c: Likewise.
4854 * elf32.c: Likewise.
4855 * elf32-fr30.c: Likewise.
4856 * elf32-i370.c: Likewise.
4857 * elf32-i860.c: Likewise.
4858 * elf32-m32r.c: Likewise.
4859 * elf32-m68k.c: Likewise.
4860 * elf32-mcore.c: Likewise.
4861 * elf32-ppc.c: Likewise.
4862 * elf32-sh.c: Likewise.
4863 * elf32-v850.c: Likewise.
4864 * elf64-alpha.c: Likewise.
4865 * elf64-sparc.c: Likewise.
4866 * elflink.c: Likewise.
4867 * elflink.h: Likewise.
4868 * elf-m10200.c: Likewise.
4869 * elf-m10300.c: Likewise.
4870 * elfxx-ia64.c: Likewise.
4871
4872 * aoutx.h: Fix formatting.
4873 * bfd.c: Likewise.
4874 * bfd-in2.h: Likewise.
4875 * bfd-in.h: Likewise.
4876 * cpu-i386.c: Likewise.
4877 * cpu-m68hc11.c: Likewise.
4878 * dwarf2.c: Likewise.
4879 * elf64-x86-64.c: Likewise.
4880 * format.c: Likewise.
4881 * freebsd.h: Likewise.
4882 * hash.c: Likewise.
4883 * hp300hpux.c: Likewise.
4884 * hppabsd-core.c: Likewise.
4885 * hpux-core.c: Likewise.
4886
48872001-01-22 Bo Thorsen <bo@suse.de>
4888
4889 * elf64-x86-64.c: Added PIC support for X86-64.
4890 (elf64_x86_64_link_hash_newfunc): Function added.
4891 (elf64_x86_64_link_hash_table_create): Likewise.
4892 (elf64_x86_64_check_relocs): Likewise.
4893 (elf64_x86_64_gc_mark_hook): Likewise.
4894 (elf64_x86_64_gc_sweep_hook): Likewise.
4895 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4896 (elf64_x86_64_size_dynamic_sections): Likewise.
4897 (elf64_x86_64_discard_copies): Likewise.
4898 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4899 (elf64_x86_64_finish_dynamic_sections): Likewise.
4900 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4901
49022001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4903
4904 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4905 * Makefile.in: Regenerate.
4906
49072001-01-21 Kazu Hirata <kazu@hxi.com>
4908
4909 * coff-a29k.c: Fix formatting.
4910
49112001-01-19 H.J. Lu <hjl@gnu.org>
4912
4913 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4914 relocation section names.
4915 (elf_i386_relocate_section): Report files with bad relocation
4916 section names and return false.
4917
49182001-01-17 Bo Thorsen <bo@suse.de>
4919
4920 * targets.c: Alphabetize list of xvecs.
4921
49222001-01-14 Alan Modra <alan@linuxcare.com.au>
4923
4924 * config.bfd: Add linux target variant for elfxx-hppa.
4925 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4926 bfd_elf64_hppa_linux_vec.
4927 * configure: Regenerate.
4928 * elf64-hppa.c: Include elf64-target.h again to support linux
4929 target variant.
4930 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4931 * elf32-hppa.c: Include elf32-target.h again to support linux
4932 target variant.
4933 (elf32_hppa_post_process_headers): New function.
4934 (elf_backend_post_process_headers): Define.
4935 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4936 bfd_elf32_hppa_linux_vec.
4937
4938 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4939 and data_segment_base fields.
4940 (elf32_hppa_link_hash_table_create ): Init them.
4941 (elf32_hppa_check_relocs): Update comments.
4942 (hppa_record_segment_addr): New function.
4943 (elf32_hppa_relocate_section): Call it.
4944 (final_link_relocate): Handle R_PARISC_SEGREL32.
4945 (elf32_hppa_final_link): New function.
4946 (bfd_elf32_bfd_final_link): Define to call it.
4947 (hppa_unwind_entry_compare): New function.
4948 * cache.c (bfd_open_file): Create files in write+read mode.
4949
4950 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4951 SEGREL32 and numerous other relocs. Change duplicate
4952 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4953
4954 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4955 O_ACCMODE.
4956
4957 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4958 .plt entries for DT_INIT and DT_FINI.
4959 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4960 DT_INIT and DT_FINI.
4961
4962 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4963 offsets for stub .plt access if wide mode. Check offset in range.
4964
49652001-01-13 Nick Clifton <nickc@redhat.com>
4966
4967 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4968 line.
4969
4970 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4971 line.
4972
49732001-01-12 Alan Modra <alan@linuxcare.com.au>
4974
4975 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4976 * configure: Regenerate.
4977
49782001-01-11 Peter Targett <peter.targett@arccores.com>
4979
4980 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4981 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4982 * cpu-arc.c (arch_info_struct): Add entries for variants.
4983 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4984 (arc_get_mach) Don't assume machine names prefixed arc- before
4985 testing.
4986 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4987 selections.
4988 (arc_elf_final_write_processing) Likewise.
4989 (ELF_MACHINE_CODE) Use EM_ARC.
4990
49912001-01-10 Nick Clifton <nickc@redhat.com>
4992
4993 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4994
49952001-01-07 Philip Blundell <philb@gnu.org>
4996
4997 * README: Replace `bug-gnu-utils@gnu.org' with
4998 `bug-binutils@gnu.org'.
4999
50002001-01-04 Kazu Hirata <kazu@hxi.com>
5001
5002 * som.c: Fix formatting.
5003
50042001-01-03 Kazu Hirata <kazu@hxi.com>
5005
5006 * ecoffswap.h: Fix formatting.
5007 * elf-bfd.h: Likewise.
5008 * elfarm-nabi.c: Likewise.
5009 * elfarm-oabi.c: Likewise.
5010 * elfcode.h: Likewise.
5011 * elfcore.h: Likewise.
5012 * elflink.c: Likewise.
5013 * elflink.h: Likewise.
5014 * elfxx-ia64.c: Likewise.
5015 * elfxx-target.h: Likewise.
5016 * libbfd.c: Likewise
5017 * linker.c: Likewise.
5018 * lynx-core.c: Likewise.
5019
50202001-01-02 Kazu Hirata <kazu@hxi.com>
5021
5022 * pc532-mach.c: Fix formatting.
5023 * pe-arm.c: Likewise.
5024 * pe-i386.c: Likewise.
5025 * pe-mips.c: Likewise.
5026 * pe-ppc.c: Likewise.
5027 * pe-sh.c: Likewise.
5028 * pei-mips.c: Likewise.
5029 * pei-sh.c: Likewise.
5030 * peicode.h: Likewise.
5031 * ppcboot.c: Likewise.
5032 * ptrace-core.c: Likewise.
5033
50342001-01-01 Kazu Hirata <kazu@hxi.com>
5035
5036 * reloc.c: Fix formatting.
5037 * riscix.c: Likewise.
5038 * rs6000-core.c: Likewise.
5039 * xcoff-target.h: Likewise.
5040
50412000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5042
5043 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5044 error, by calling bfd_default_set_arch_mach with incoming
5045 values.
5046
50472000-12-26 Kazu Hirata <kazu@hxi.com>
5048
5049 * vaxnetbsd.c: Fix formatting.
5050 * versados.c: Likewise.
5051 * vms-gsd.c: Likewise.
5052 * vms-hdr.c: Likewise.
5053 * vms-misc.c: Likewise.
5054
50552000-12-25 Alexandre Oliva <aoliva@redhat.com>
5056
5057 * archive.c (coff_write_armap): Don't write more than symbol_count
5058 `archive_member_file_ptr's.
5059
50602000-12-25 Kazu Hirata <kazu@hxi.com>
5061
5062 * vms-tir.c: Fix formatting.
5063
50642000-12-23 Kazu Hirata <kazu@hxi.com>
5065
5066 * vms.c: Fix formatting.
5067 * vms.h: Likewise.
5068
50692000-12-21 Santeri Paavolainen <santtu@ssh.com>
5070
5071 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5072
5073 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5074
5075 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5076 arithmetic.
5077
5078 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5079
5080 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5081
50822000-12-21 Richard Sandiford <rsandifo@redhat.com>
5083
5084 * libbfd.c (bfd_get_bits): Added
5085 (bfd_put_bits): Likewise
5086 * bfd-in.h: Declared the above.
5087 * bfd-in2.h: Regenerated.
5088
50892000-12-20 Kazu Hirata <kazu@hxi.com>
5090
5091 * targets.c: Fix formatting.
5092 * tekhex.c: Likewise.
5093 * trad-core.c: Likewise.
5094
50952000-12-19 Kazu Hirata <kazu@hxi.com>
5096
5097 * sco5-core.c: Fix formatting.
5098 * section.c: Likewise.
5099 * sparclinux.c: Likewise.
5100 * sparclynx.c: Likewise.
5101 * sparcnetbsd.c: Likewise.
5102 * srec.c: Likewise.
5103 * stabs.c: Likewise.
5104 * stab-syms.c: Likewise.
5105 * sunos.c: Likewise.
5106 * syms.c: Likewise.
5107 * sysdep.h: Likewise.
5108
51092000-12-18 Nick Clifton <nickc@redhat.com>
5110
5111 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5112 defined.
5113 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5114 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5115
51162000-12-18 Nick Clifton <nickc@redhat.com>
5117
5118 * vms-misc.c (_bfd_vms_get_record): Add default case to
5119 file_format switch.
5120
51212000-12-15 Miloslav Trmac <mitr@volny.cz>
5122
5123 * elfcore.h (elf_core_file_p): Move to the start of the program
5124 headers before attempting to read them.
5125
51262000-12-14 Kazu Hirata <kazu@hxi.com>
5127
5128 * peigen.c: Fix formatting.
5129 * som.c: Likewise.
5130 * som.h: Likewise.
5131
51322000-12-13 Kazu Hirata <kazu@hxi.com>
5133
5134 * peigen.c: Fix formatting.
5135
51362000-12-12 Jim Wilson <wilson@redhat.com>
5137
5138 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5139
51402000-12-08 Mark Salter <msalter@redhat.com>
5141
5142 * binary.c (binary_set_section_contents): Ignore sections
5143 with zero size.
5144
51452000-12-12 Kazu Hirata <kazu@hxi.com>
5146
5147 * m68klinux.c: Fix formatting.
5148 * m68knetbsd.c: Likewise.
5149 * mipsbsd.c: Likewise.
5150 * netbsd-core.c: Likewise.
5151 * netbsd.h: Likewise.
5152 * newsos3.c: Likewise.
5153 * nlm32-alpha.c: Likewise.
5154 * nlm32-i386.c: Likewise.
5155 * nlm32-ppc.c: Likewise.
5156 * nlm32-sparc.c: Likewise.
5157 * nlmcode.h: Likewise.
5158 * nlmswap.h: Likewise.
5159 * nlm-target.h: Likewise.
5160 * ns32knetbsd.c: Likewise.
5161
51622000-12-10 Fred Fish <fnf@be.com>
5163
5164 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5165 symbols in shared objects if allow_shlib_undefined is true.
5166
51672000-12-12 Nick Clifton <nickc@redhat.com>
5168
5169 * cpu-sh.c: Fix formattng.
5170 * elf.c: Fix formattng.
5171 * elf32-mips.c: Fix formattng.
5172 * elf32-sh.c: Fix formattng.
5173 * elf64-alpha.c: Fix formattng.
5174
51752000-12-09 Nick Clifton <nickc@redhat.com>
5176
5177 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5178 dwarf2_find_line_info as last parameter to invocation of
5179 _bfd_dwarf2_find_nearest_line.
5180 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5181 dwarf2_find_line_info as last parameter to invocation of
5182 _bfd_dwarf2_find_nearest_line.
5183
51842000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5185
5186 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5187 (BFD_LIBS): ...to here.
5188 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5189 (BFD_LIBS_CFILES): ...to here.
5190 * Makefile.in: Regenerate.
5191 * configure.in: Remove dwarf.lo from the elf shell variable.
5192 * configure: Regenerate.
5193 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5194 * libcoff.h: Regenerate.
5195 * coffgen.c (coff_find_nearest_line): Call
5196 _bfd_dwarf2_find_nearest_line.
5197 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5198 accordingly.
5199 (read_abbrevs): Likewise
5200 (decode_line_info): Likewise.
5201 (parse_comp_unit): Likewise.
5202 (comp_unit_find_nearest_line): Likewise.
5203 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5204 * libbfd.h: Regenerate.
5205 * elf.c (_bfd_elf_find_nearest_line): Update call.
5206 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5207 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5208 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5209 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5210 (styp_to_sec_flags): Handle DWARF2 sections.
5211 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5212 to _bfd_find_nearest_line.
5213 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5214 call to _bfd_find_nearest_line.
5215
52162000-12-08 Kazu Hirata <kazu@hxi.com>
5217
5218 * coffgen.c: Fix formatting.
5219 * elf-m10300.c: Likewise.
5220 * elf32-i386.c: Likewise.
5221 * elf32-i960.c: Likewise.
5222 * elf32-m68k.c: Likewise.
5223 * elf32-mcore.c: Likewise.
5224 * elf32-ppc.c: Likewise.
5225 * elf32-sh.c: Likewise.
5226 * elf32-sparc.c: Likewise.
5227 * elf32-v850.c: Likewise.
5228 * elf64-alpha.c: Likewise.
5229 * elf64-hppa.c: Likewise.
5230 * elf64-mips.c: Likewise.
5231 * elf64-sparc.c: Likewise.
5232
52332000-12-07 Kazu Hirata <kazu@hxi.com>
5234
5235 * elf32-ppc.c: Fix formatting.
5236 * elf64-x86-64.c: Likewise.
5237
52382000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5239
5240 From Ralf Baechle <ralf@gnu.org>
5241
5242 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5243 BFDs containing no sections or empty .text, .data or .bss sections
5244 to be merged, regardless of their flags.
5245
52462000-12-06 Kazu Hirata <kazu@hxi.com>
5247
5248 * elf32-m32r.c: Fix formatting.
5249 * elf32-m68hc11.c: Likewise.
5250 * elf32-m68hc12.c: Likewise.
5251 * elf32-m68k.c: Likewise.
5252 * elf32-mcore.c: Likewise.
5253 * elf32-pj.c: Likewise.
5254 * elf32-ppc.c: Likewise.
5255
52562000-12-05 Kazu Hirata <kazu@hxi.com>
5257
5258 * elf32-fr30.c: Fix formatting.
5259 * elf32-hppa.c: Likewise.
5260 * elf32-i370.c: Likewise.
5261 * elf32-i386.c: Likewise.
5262 * elf32-i860.c: Likewise.
5263 * elf32-i960.c: Likewise.
5264
52652000-12-03 Kazu Hirata <kazu@hxi.com>
5266
5267 * elf32-arm.h: Fix formatting.
5268 * elf32-avr.c: Likewise.
5269 * elf32-cris.c: Likewise.
5270 * elf32-d10v.c: Likewise.
5271 * elf32-d30v.c: Likewise.
5272 * elf-hppa.h: Likewise.
5273 * elf-m10200.c: Likewise.
5274 * elf-m10300.c: Likewise.
5275
52762000-12-01 Chris Demetriou <cgd@sibyte.com>
5277
5278 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5279 bfd_mach_mips32_4k. Update FIXME comment.
5280 * archures.c (bfd_mach_mips32): New constant.
5281 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5282 the latter, renumber it.
5283 * bfd-in2.h (bfd_mach_mips32): New constant.
5284 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5285 the latter, renumber it.
5286 * cpu-mips.c (I_mips32): New constant.
5287 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5288 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5289 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5290 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5291 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5292 with E_MIPS_MACH_MIPS32_4K.
5293 (_bfd_mips_elf_final_write_processing): Replace
5294 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5295 bfd_mach_mips32 case.
5296 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5297 comparison with support for MIPS32.
5298 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5299 MIPS32.
5300
5301 * aoutx.h (NAME(aout,machine_type)): Add cases for
5302 bfd_mach_mips5 and bfd_mach_mips64.
5303 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5304 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5305 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5306 (arch_info_struct): Add entries for bfd_mach_mips5 and
5307 bfd_mach_mips64.
5308 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5309 _bfd_mips_elf_print_private_bfd_data): Add cases for
5310 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5311 (_bfd_mips_elf_final_write_processing): Add cases for
5312 bfd_mach_mips5 and bfd_mach_mips64.
5313
5314 * aoutx.h (NAME(aout,machine_type)): Add a
5315 bfd_mach_mips_sb1 case.
5316 * archures.c (bfd_mach_mips_sb1): New constant.
5317 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5318 * cpu-mips.c (I_sb1): New constant.
5319 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5320 * elf32-mips.c (elf_mips_mach): Add case for
5321 E_MIPS_MACH_SB1.
5322 (_bfd_mips_elf_final_write_processing): Add case for
5323 bfd_mach_mips_sb1.
5324
53252000-12-01 Joel Sherrill <joel@OARcorp.com>
5326
5327 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5328 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5329 (sparc*-*-rtems*): Switched from a.out to ELF.
5330
53312000-11-30 Jan Hubicka <jh@suse.cz>
5332
5333 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5334 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5335 (elf64-x86-64.lo): Add dependencies.
5336 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5337 bfd_mach_x86_64_intel_syntax.
5338 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5339 * config.bfd (x86_64): Add.
5340 * configure.in: Add support for bfd_elf64_x86_64_vec.
5341 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5342 (bfd_i386_arch, i8086_ar): Link in.
5343 * elf64-x86-64.c: New file.
5344 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5345 * targets.c (bfd_elf64_x86_64_vec): Add.
5346 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5347
53482000-11-30 Kazu Hirata <kazu@hxi.com>
5349
5350 * xcofflink.c: Fix formatting.
5351
53522000-11-28 Kazu Hirata <kazu@hxi.com>
5353
5354 * aoutx.h: Fix formatting.
5355 * bfd-in.h: Likewise.
5356 * bfd-in2.h: Likewise.
5357 * cache.c: Likewise.
5358 * cisco-core.c: Likewise.
5359 * coff64-rs6000.c: Likewise.
5360 * coffcode.h: Likewise.
5361 * coffswap.h: Likewise.
5362 * corefile.c: Likewise.
5363 * elf32-mips.c: Likewise.
5364
53652000-11-27 Kazu Hirata <kazu@hxi.com>
5366
5367 * aout-adobe.c: Fix formatting.
5368 * coff64-rs6000.c: Likewise.
5369 * coffgen.c: Likewise.
5370 * cofflink.c: Likewise.
5371
53722000-11-27 Philip Blundell <pb@futuretv.com>
5373
5374 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5375 (obj_coff_strings_written): New accessor macro for above.
5376 * libcoff.h: Regenerate.
5377 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5378 strings.
5379 * coffcode.h (coff_write_object_contents): No need to write out
5380 the string table if it's already been done.
5381
53822000-11-22 Philip Blundell <pb@futuretv.com>
5383
5384 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5385 weak undefined symbols.
5386
53872000-11-24 Nick Clifton <nickc@redhat.com>
5388
5389 * archures.c (bfd_mach_arm_5TE): Define.
5390 (bfd_mach_arm+XScale): Define.
5391 * bfd-in2.h: Regenerate.
5392
5393 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5394 BFD_RELOC_ARM_PCREL_BLX.
5395
5396 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5397 XScale machine numbers.
5398
5399 * config.bfd (xscale-elf): Add target.
5400 (xscale-coff): Add target.
5401
5402 * cpu-arm.c: Add xscale machine name.
5403 Add v5t, v5te and XScale machine numbers.
5404
54052000-11-23 Kazu Hirata <kazu@hxi.com>
5406
5407 * aix386-core.c: Fix formatting.
5408
54092000-11-22 Jim Wilson <wilson@redhat.com>
5410
5411 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5412 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5413 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5414 (ins_imms_scaled): Initialize sign_bit at function entry.
5415 (elf64_ia64_operands): Add missing initializers.
5416 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5417 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5418 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5419 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5420 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5421 parameters.
5422 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5423 and free_extsyms at function entry.
5424 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5425 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5426 (get_got): Delete unused local srel.
5427 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5428 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5429
54302000-11-21 Kazu Hirata <kazu@hxi.com>
5431
5432 * coff-a29k.c: Fix formatting.
5433 * coff-h8500.c: Likewise.
5434 * coff-i960.c: Likewise.
5435 * coff-ppc.c: Likewise.
5436 * coff-rs6000.c: Likewise.
5437 * coff-stgo32.c: Likewise.
5438 * coff-tic54x.c: Likewise.
5439 * coff-w65.c: Likewise.
5440 * cpu-h8500.c: Likewise.
5441 * cpu-hppa.c: Likewise.
5442 * cpu-ns32k.c: Likewise.
5443 * ecoff.c: Likewise.
5444 * ecofflink.c: Likewise.
5445
54462000-11-21 Nick Clifton <nickc@redhat.com>
5447
5448 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5449 remove possibility of infinite loop.
5450
54512000-11-20 Kazu Hirata <kazu@hxi.com>
5452
5453 * aix386-core.c: Fix formatting.
5454 * aout-adobe.c: Likewise.
5455 * aout-arm.c: Likewise.
5456 * aout-encap.c: Likewise.
5457 * aout-ns32k.c: Likewise.
5458 * aout-target.h: Likewise.
5459 * aout-tic30.c: Likewise.
5460 * aoutf1.h: Likewise.
5461 * aoutx.h: Likewise.
5462 * archive.c: Likewise.
5463 * bfd-in.h: Likewise.
5464 * bfd-in2.h: Likewise.
5465 * bfd.c: Likewise.
5466 * bout.c: Likewise.
5467
54682000-11-17 H.J. Lu <hjl@gnu.org>
5469
5470 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5471 pltoff entries for DT_INIT and DT_FINI.
5472 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5473 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5474 entries.
5475
54762000-11-16 Richard Henderson <rth@redhat.com>
5477
5478 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5479 (allocate_dynrel_entries): Likewise.
5480 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5481 (set_pltoff_entry): Likewise.
5482 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5483 (elfNN_ia64_reloc_type_lookup): Likewise.
5484 (elfNN_ia64_install_value): Likewise.
5485 (elfNN_ia64_relocate_section): Likewise.
5486 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5487 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5488
54892000-11-16 Kazu Hirata <kazu@hxi.com>
5490
5491 * cpu-a29k.c: Fix formatting.
5492 * cpu-alpha.c: Likewise.
5493 * cpu-arm.c: Likewise.
5494 * cpu-avr.c: Likewise.
5495 * cpu-d10v.c: Likewise.
5496 * cpu-h8500.c: Likewise.
5497 * cpu-hppa.c: Likewise.
5498 * cpu-i370.c: Likewise.
5499 * cpu-i386.c: Likewise.
5500 * cpu-i960.c: Likewise.
5501 * cpu-ia64-opc.c: Likewise.
5502 * cpu-ia64.c: Likewise.
5503 * cpu-m32r.c: Likewise.
5504 * cpu-m68hc11.c: Likewise.
5505 * cpu-m68hc12.c: Likewise.
5506 * cpu-m68k.c: Likewise.
5507 * cpu-m88k.c: Likewise.
5508 * cpu-mips.c: Likewise.
5509 * cpu-ns32k.c: Likewise.
5510 * cpu-pj.c: Likewise.
5511 * cpu-powerpc.c: Likewise.
5512 * cpu-sh.c: Likewise.
5513 * cpu-sparc.c: Likewise.
5514 * cpu-tic54x.c: Likewise.
5515 * cpu-v850.c: Likewise.
5516 * cpu-vax.c: Likewise.
5517 * cpu-w65.c: Likewise.
5518 * cpu-we32k.c: Likewise.
5519 * cpu-z8k.c: Likewise.
5520 * dwarf1.c: Likewise.
5521 * dwarf2.c: Likewise.
5522
55232000-11-15 Kazu Hirata <kazu@hxi.com>
5524
5525 * coff-arm.c: Fix formatting.
5526 * coff-ppc.c: Likewise.
5527 * coff-rs6000.c: Likewise.
5528 * coff-sh.c: Likewise.
5529 * coff-sparc.c: Likewise.
5530 * coff-tic30.c: Likewise.
5531 * coff-tic54x.c: Likewise.
5532 * coff-tic80.c: Likewise.
5533 * coff-w65.c: Likewise.
5534 * coff-we32k.c: Likewise.
5535 * coff-z8k.c: Likewise.
5536
55372000-11-15 Richard Henderson <rth@redhat.com>
5538
5539 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5540 section with the same ALLOC|LOAD flags as the source section.
5541
55422000-11-14 Jakub Jelinek <jakub@redhat.com>
5543
5544 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5545 by STO_ALPHA constants.
5546
55472000-11-14 Kazu Hirata <kazu@hxi.com>
5548
5549 * coff-pmac.c: Fix formatting.
5550 * coff-ppc.c: Likewise.
5551
55522000-11-13 H.J. Lu <hjl@gnu.org>
5553
5554 * elflink.h (elf_link_add_object_symbols): Also add indirect
5555 symbols for common symbols with the default version.
5556
55572000-11-09 Philip Blundell <pb@futuretv.com>
5558
5559 * section.c (STD_SECTION): Set gc_mark flag.
5560
55612000-11-11 Kazu Hirata <kazu@hxi.com>
5562
5563 * coff-i960.c: Likewise.
5564 * coff-m68k.c: Likewise.
5565 * coff-m88k.c: Likewise.
5566 * coff-mcore.c: Likewise.
5567 * coff-mips.c: Likewise.
5568
55692000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5570
5571 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5572
55732000-11-10 Kazu Hirata <kazu@hxi.com>
5574
5575 * coff-h8300.c: Fix formatting.
5576 * coff-h8500.c: Likewise.
5577 * coff-i386.c: Likewise.
5578 * coff-i860.c: Likewise.
5579 * coff-i960.c: Likewise.
5580 * coff-ia64.c: Likewise.
5581
55822000-11-09 Kazu Hirata <kazu@hxi.com>
5583
5584 * archive.c: Fix formatting.
5585 * archures.c: Likewise.
5586
55872000-11-07 Richard Henderson <rth@redhat.com>
5588
5589 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5590 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5591 * section.c (bfd_set_section_contents): Call memcpy if
5592 section->contents set and location not equal to contents plus offset.
5593
55942000-11-08 Kazu Hirata <kazu@hxi.com>
5595
5596 * bfd-in.h: Fix formatting.
5597 * bfd-in2.h: Likewise.
5598 * bfd.c: Likewise.
5599 * binary.c: Likewise.
5600 * bout.c: Likewise.
5601 * coff-a29k.c: Likewise.
5602 * coff-alpha.c: Likewise.
5603 * coff-apollo.c: Likewise.
5604 * coff-aux.c: Likewise.
5605
56062000-11-07 Kazu Hirata <kazu@hxi.com>
5607
5608 * aix386-core.c: Fix formatting.
5609 * aoutf1.h: Likewise.
5610 * aoutx.h: Likewise.
5611 * archures.c: Likewise.
5612 * armnetbsd.c: Likewise.
5613
56142000-11-07 Alan Modra <alan@linuxcare.com.au>
5615
5616 * coff-h8300.c (special): Adjust reloc address.
5617
56182000-11-06 Steve Ellcey <sje@cup.hp.com>
5619
5620 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5621 to differentiate elf32 and elf64 on ia64.
5622 * bfd-in2.h: Regenerate.
5623 * config.bfd: Add target for "ia64*-*-hpux*".
5624 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5625 * configure: Regenerate.
5626 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5627 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5628
5629 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5630 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5631 * Makefile.in: Regnerate.
5632 * elf64-ia64.c: Deleted.
5633 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5634
56352000-11-06 Kazu Hirata <kazu@hxi.com>
5636
5637 * aout-adobe.c: Fix formatting.
5638 * aout-arm.c: Likewise.
5639 * aout-cris.c: Likewise.
5640 * aout-encap.c: Likewise.
5641 * aout-ns32k.c: Likewise.
5642 * aout-target.h: Likewise.
5643 * aout-tic30.c: Likewise.
5644
56452000-11-05 Philip Blundell <philb@gnu.org>
5646
5647 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5648 BFDs containing no sections to be merged, regardless of their flags.
5649
56502000-11-04 Philip Blundell <philb@gnu.org>
5651
5652 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5653 if a relocation for an undefined symbol also results in an
5654 overflow.
5655
56562000-11-06 Christopher Faylor <cgf@cygnus.com>
5657
5658 * config.bfd: Add support for Sun Chorus.
5659
56602000-11-05 David O'Brien <obrien@FreeBSD.org>
5661
5662 * configure.in: Recognize alpha-*-freebsd*.
5663 * configure: Regenerate.
5664
56652000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5666
5667 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5668 (Chunk): New global variable set by a parameter in objcopy.c.
5669 (S3Forced): New global variable set by a parameter in
5670 objcopy.c.
5671 (srec_set_section_contents): If S3Forced is true, always generate
5672 S3 records.
5673 (srec_write_section): Use 'Chunk' to limit maximum length of S
5674 records.
5675
56762000-11-02 Per Lundberg <plundis@chaosdev.org>
5677
5678 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5679 * Makefile.in: Regenerate.
5680 * bfd-in2.h: Regenerate.
5681 * po/bfd.pot: Regenerate.
5682
56832000-10-31 Philip Blundell <philb@gnu.org>
5684
5685 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5686 EF_SOFT_FLOAT if it is defined.
5687
56882000-10-27 Philip Blundell <philb@gnu.org>
5689
5690 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5691 attempts to mix PIC code with non-PIC, just mark the output as
5692 being position dependent.
5693 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5694 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5695 all mismatches, not just the first one.
5696
56972000-10-25 Chris Demetriou <cgd@sibyte.com>
5698
5699 * ieee.c (ieee_archive_p): Plug one of many possible
5700 memory leaks in error handling.
5701
57022000-10-20 Jakub Jelinek <jakub@redhat.com>
5703
5704 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5705 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5706 Support v8plusb.
5707 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5708 sparc64_elf_object_p): Support v9b.
5709 * archures.c: Declare v8plusb and v9b machines.
5710 * bfd-in2.h: Ditto.
5711 * cpu-sparc.c: Ditto.
5712
57132000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5714
5715 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5716 of a GOT reloc.
5717
5718 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5719 (SYMBOL_CALLS_LOCAL): New macro.
5720 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5721 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5722 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5723 (ppc_elf_relocate_section): Use flag variable to determine
5724 whether the relocation refers to a local symbol.
5725 Test whether a PLTREL24 reloc will produce a reloc by looking
5726 to see whether a PLT entry was made.
5727
57282000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5729
5730 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5731 entries that could serve as a definition for a weak symbol.
5732
57332000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5734
5735 From Ralf Baechle <ralf@gnu.org>
5736
5737 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5738 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5739 against local symbols.
5740 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5741
57422000-10-12 Alan Modra <alan@linuxcare.com.au>
5743
5744 * section.c (struct sec): Add kept_section.
5745 (struct bfd_comdat_info): Remove sec, we can use above.
5746 (STD_SECTION): Add initializer.
5747 (bfd_make_section_anyway): Init here too.
5748
5749 * bfd-in2.h: Regenerate.
5750
5751 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5752 zeroing of `flags'.
5753 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5754 fudge values for discarded link-once section symbols.
5755
5756 * elf64-hppa.c: Include alloca-conf.h
5757
57582000-10-11 Alan Modra <alan@linuxcare.com.au>
5759
5760 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5761
5762 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5763
57642000-10-10 Alan Modra <alan@linuxcare.com.au>
5765
5766 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5767
57682000-10-10 Tom Rix <trix@redhat.com>
5769
5770 * section.c (bfd_make_section_anyway): Release newsect ptr when
5771 newsect->symbol fails to alloc. Use bfd_release instead of free.
5772
57732000-10-09 Richard Henderson <rth@cygnus.com
5774
5775 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5776 (elf64_ia64_unwind_entry_compare): New.
5777 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5778
57792000-10-07 Alan Modra <alan@linuxcare.com.au>
5780
5781 * elflink.h (size_dynamic_sections): Don't create various tags if
5782 .dynstr is excluded from the link. Don't set first dynsym entry
5783 if dynsymcount is zero.
5784 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5785 .dynsym excluded from the link. Don't try to write any dynamic
5786 sections excluded from the link.
5787
5788 * elf.c (swap_out_syms): Handle global section symbols.
5789
57902000-10-05 DJ Delorie <dj@redhat.com>
5791
5792 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5793 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5794 (coff_write_relocs): write extended reloc count
5795 (coff_write_object_contents): account for extended relocs
5796
57972000-10-05 Jim Wilson <wilson@cygnus.com>
5798
5799 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5800 field.
5801 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5802 elf_backend_section_flags function.
5803 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5804 code.
5805 (elf64_ia64_section_flags): New function containing flag conversion
5806 code.
5807 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5808 * elfxx-target.h (elf_backend_section_flags): Define.
5809 (elfNN_bed): Initialize elf_backend_section_flags field.
5810
58112000-10-02 Alan Modra <alan@linuxcare.com.au>
5812
5813 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5814 _bfd_elf32_gc_record_vtable. Correct a comment.
5815
58162000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5817
5818 From Ralf Baechle <ralf@gnu.org>
5819
5820 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5821 produces binaries with got[1] = 0x80000001 to differenciate them
5822 for the dynamic linker from the broken binaries produced by old
5823 versions.
5824
58252000-09-30 Petr Sorfa <petrs@sco.com>
5826
5827 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5828 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5829 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5830 * configure: Regenerate.
5831
58322000-09-27 Hans-Peter Nilsson <hp@axis.com>
5833
5834 Define two bfd_targets for absence and presence of leading
5835 underscore on symbols. Make sure to only link same kind.
5836 * elf32-cris.c (cris_elf_object_p,
5837 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5838 cris_elf_merge_private_bfd_data): New.
5839 (elf_backend_object_p, elf_backend_final_write_processing,
5840 bfd_elf32_bfd_print_private_bfd_data,
5841 bfd_elf32_bfd_merge_private_bfd_data): Define.
5842 <Target vector definition>: Include elf32-target.h twice with
5843 different macro settings:
5844 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5845 bfd_elf32_us_cris_vec.
5846 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5847 (elf_symbol_leading_char): First as 0, then '_'.
5848 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5849 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5850 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5851 * configure: Regenerate.
5852 * targets.c: Declare bfd_elf32_us_cris_vec.
5853 * po/bfd.pot: Regenerate.
5854
58552000-09-29 Momchil Velikov <velco@fadata.bg>
5856
5857 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5858 R_ARM_THM_PC22 relocations.
5859
58602000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5861
5862 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5863
58642000-09-29 Momchil Velikov <velco@fadata.bg>
5865
5866 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5867 is has the SEC_HAS_CONTENTS flag set.
5868