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