1 2001-12-07 Jakub Jelinek <jakub@redhat.com>
3 * elf.c (_bfd_elf_rela_local_sym): Only call
4 _bfd_merged_section_offset if merge_info is non-NULL.
5 (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
6 * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
8 * elf32-arm.h (elf32_arm_final_link_relocate): Use
9 _bfd_elf_section_offset.
10 (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
11 * elf32-i386.c (elf_i386_relocate_section): Use
12 _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
13 * elf32-sh.c (sh_elf_relocate_section): Likewise.
14 * elf32-sparc.c (elf32_sparc_relocate_section): Use
15 _bfd_elf_section_offset.
16 * elf32-cris.c (cris_elf_relocate_section): Likewise.
17 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
18 * elf32-i370.c (i370_elf_relocate_section): Likewise.
19 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
20 * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
21 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
22 * elf32-s390.c (elf_s390_relocate_section): Likewise.
23 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
24 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
25 * elf64-s390.c (elf_s390_relocate_section): Likewise.
26 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
27 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
28 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
30 2001-12-07 Alan Modra <amodra@bigpond.net.au>
32 * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
35 2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
37 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
38 fragmented sentence parts into a whole sentence to permit
39 better translation into foreign languages.
41 2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
43 * configure: Regenerate.
44 * Makefile.in: Regenerate.
46 2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
48 * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
49 BFD64_LIBS, make the latter depending on the availability of BFD64.
50 Add archive64.c source file.
51 * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
52 and bfd_elf64_archive_write_armap, code from elf64-mips.c
53 * archive.c (bfd_slurp_armap): Add ELF64 archive support.
54 * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
55 (mips64*el-*-linux*): Likewise.
56 (mips*el-*-linux*): Likewise. Reorder entries.
57 * configure.in (bfd_libs): Define in dependency of BFD64 and
59 * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
60 bfd_elf64_archive_slurp_armap instead.
61 (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
64 2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
66 * config.bfd: Remove trailing blanks.
67 * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
69 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
71 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
72 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
73 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
74 Disable pointless overflow checking of NONE and 32.
76 2001-12-04 Alan Modra <amodra@bigpond.net.au>
78 * reloc.c (bfd_install_relocation): Correct reloc address test.
79 (bfd_perform_relocation): Formatting fix.
80 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
82 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
84 * configure.in (LINGUAS): Add tr.
85 * configure: Regenerate.
86 * po/tr.po: Import from translation project's web site.
88 2001-12-03 Alan Modra <amodra@bigpond.net.au>
90 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
91 happens to trigger on undefined symbols.
92 (final_link_relocate): Return bfd_reloc_undefined for undefined
94 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
95 if we have already warned about an undefined symbol.
97 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
99 * elf32-mips.c (NEWABI_P): New define.
100 (USE_REL): Remove, replaced by
101 (elf_backend_may_use_rel_p): New define.
102 (elf_backend_may_use_rela_p): Likewise.
103 (elf_backend_default_use_rela_p): Likewise.
104 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
105 Fix some relocation definitions.
106 (elf_mips_howto_table_rela): New RELA relocation definitions for
108 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
109 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
110 (mips_rtype_to_howto): Likewise.
111 (_bfd_mips_elf_relocate_section): Likewise.
112 (_bfd_mips_elf_object_p): Typo.
113 (elf_backend_sign_extend_vma): Reordered together with many other
114 defines nearby to resemble the order of declaration in the header
117 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
119 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
120 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
121 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
122 * elf32-mips.c (mips_reloc_map): Likewise. Replace
123 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
124 * elf64-mips.c (mips_reloc_map): Likewise.
125 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
126 (BFD_RELOC_MIPS_GPREL32): Remove.
128 2001-11-30 H.J. Lu <hjl@gnu.org>
130 * elflink.h (elf_add_default_symbol): New.
131 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
132 to create an indirect symbol from the default for the symbol
133 with the default version if needed.
135 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
137 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
138 if it has already been set by another thread.
140 2001-11-28 Jakub Jelinek <jakub@redhat.com>
142 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
143 (elf64_alpha_relocate_section): Translate local_got_entries
144 for STT_SECTION symbol to SHF_MERGE section the first time
146 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
148 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
149 (get_dyn_sym_info): Use it.
150 (elfNN_ia64_relocate_section): Translate local dyn entries
151 for STT_SECTION symbol to SHF_MERGE section the first time
154 2001-11-27 H.J. Lu <hjl@gnu.org>
156 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
159 Mon Nov 26 12:33:44 2001 Jeffrey A Law (law@cygnus.com)
161 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
164 2001-11-24 Alan Modra <amodra@bigpond.net.au>
166 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
167 group sizes to accommodate c++.
169 2001-11-23 Jakub Jelinek <jakub@redhat.com>
171 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
172 relocations in non-alloced sections against global symbols
173 defined in shared library being built.
174 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
176 2001-11-23 Jakub Jelinek <jakub@redhat.com>
178 * elf.c (_bfd_elf_rela_local_sym): New.
179 * elflink.h (elf_link_input_bfd): Don't consider empty
180 merged sections as removed in relocation tests.
181 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
182 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
183 against STT_SECTION symbol of SHF_MERGE section.
184 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
185 * elf32-avr.c (elf32_avr_relocate_section): Call
186 _bfd_elf_rela_local_sym.
187 * elf32-cris.c (cris_elf_relocate_section): Likewise.
188 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
189 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
190 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
191 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
192 * elf32-i370.c (i370_elf_relocate_section): Likewise.
193 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
194 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
195 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
196 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
197 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
198 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
199 * elf32-s390.c (elf_s390_relocate_section): Likewise.
200 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
201 * elf32-v850.c (v850_elf_relocate_section): Likewise.
202 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
203 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
204 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
205 * elf64-s390.c (elf_s390_relocate_section): Likewise.
206 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
207 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
208 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
209 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
210 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
211 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
212 * elf32-sh.c (sh_elf_relocate_section): Likewise for
213 !partial_inplace relocs. Handle relocs against STT_SECTION
214 symbol of SHF_MERGE for partial_inplace relocs.
216 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
218 * po/Make-in (distclean): Move SRC-POTFILES.in and
219 BLD-POTFILES.in to maintainer-clean target.
221 2001-11-21 Alan Modra <amodra@bigpond.net.au>
223 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
224 than sym_sec->output_section to detect relocs against discarded
227 2001-11-19 H.J. Lu <hjl@gnu.org>
229 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
230 discarding relocations.
232 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
234 * section.c (bfd_is_const_section): New macro. Return true if the
235 given seciton is one of the special, constant, sections.
236 * bfd-in2.h: Regenerate.
237 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
238 (coff_write_native_symbol): Use bfd_is_const_section.
240 2001-11-19 Alan Modra <amodra@bigpond.net.au>
242 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
244 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
245 millicode syms as candidates for import stubs.
247 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
248 (allocate_PIC_calls): Rename to allocate_plt_static.
249 (allocate_dynrelocs): Move most of code handling .plt entries to..
250 (allocate_plt_static): ..here. Don't drop plabel entries.
252 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
254 * mmo.c: Adjust documentation tags to use texinfo 4 features.
256 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
258 * section.c (bfd_is_const_section): New macro. Return true if the
259 section pointer refers to one of the special, constant sections.
260 * bfd-in2.h: Regenerate.
262 * coffgen.c (coff_count_linenumbers): Only update the line number
263 count in non-special sections.
264 (coff_write_native_symbol): Only update the line number file
265 position in non-special sections.
267 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
269 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
270 local syms from discarded sections. Update comment.
272 2001-11-15 Alan Modra <amodra@bigpond.net.au>
274 * po/SRC-POTFILES.in: Regenerate.
276 * elflink.h (elf_link_input_bfd): Complain about all relocs
277 against local syms from discarded sections. K&R fixes.
278 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
281 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
283 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
284 overflows in the .stab section.
286 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
288 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
289 (bfd_elf64_discard_info): Likewise.
290 * bfd-in2.h: Regenerate.
291 * elf-bfd.h (struct elf_reloc_cookie): New.
292 (struct elf_backend_data): Add elf_backend_discard_info,
293 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
294 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
295 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
296 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
297 (_bfd_elf32_mips_ignore_discarded_relocs): New.
298 (_bfd_elf32_mips_write_section): New.
299 (elf_backend_discard_info): Define.
300 (elf_backend_ignore_discarded_relocs): Define.
301 (elf_backend_write_section): Define.
302 * elfcode.h (elf_bfd_discard_info): Define.
303 (elf_reloc_symbol_deleted_p): Define.
304 * elflink.h (elf_link_input_bfd): Check
305 elf_section_ignore_discarded_relocs. Call
306 bed->elf_backend_write_section if available.
307 (elf_reloc_symbol_deleted_p): New.
308 (elf_bfd_discard_info): New.
309 (elf_section_ignore_discarded_relocs): New.
310 * elfxx-target.h (elf_backend_discard_info): Define.
311 (elf_backend_ignore_discarded_relocs): Define.
312 (elf_backend_write_section): Define.
313 (elfNN_bed): Add elf_backend_discard_info,
314 elf_backend_ignore_discarded_relocs, and
315 elf_backend_write_section.
316 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
317 * libbfd.h: Regenerate.
318 * stabs.c (_bfd_discard_section_stabs): New.
320 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
322 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
323 scheme to get rid of an ugly complicated test.
324 * elf64-s390.c (elf_s390_relocate_section): Likewise.
326 2001-11-14 Andreas Jaeger <aj@suse.de>
328 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
331 2001-11-14 Jakub Jelinek <jakub@redhat.com>
333 * dwarf2.c (struct line_head) [total_length]: Change type to
335 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
336 (struct comp_unit): Add stash and offset_size.
337 (read_8_bytes): Return bfd_vma.
338 (read_indirect_string): New.
339 (read_attribute): Handle DW_FORM_strp.
340 (decode_line_info): Support 64-bit DWARF format.
341 (_bfd_dwarf2_find_nearest_line): Likewise.
342 (parse_comp_unit): Set offset_size and stash.
344 2001-11-13 Keith Walker <keith.walker@arm.com>
346 * dwarf2.c (read_attribute_value): New function to handle
348 (read_attribute): Use it.
350 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
352 * dwarf2.c (decode_line_info): Properly deal with unknown standard
355 2001-11-13 John Marshall <jmarshall@acm.org>
356 Alan Modra <amodra@bigpond.net.au>
358 * section.c (bfd_make_section_anyway): Don't increment section_id
359 and the BFD's section_count if adding the section failed.
360 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
363 2001-11-12 Orjan Friberg <orjanf@axis.com>
365 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
368 2001-11-11 H.J. Lu <hjl@gnu.org>
370 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
371 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
373 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
374 dynstr type to `struct elf_strtab_hash *'.
376 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
378 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
379 size_t. Rename second i to j.
381 Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
383 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
385 2001-11-10 Alan Modra <amodra@bigpond.net.au>
387 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
388 relocs into shared libs.
389 * elf32-cris.c (cris_elf_relocate_section): Likewise.
390 * elf32-i370.c (i370_elf_relocate_section): Likewise.
391 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
392 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
393 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
394 * elf32-sh.c (sh_elf_relocate_section): Likewise.
395 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
396 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
397 * elf64-s390.c (elf_s390_relocate_section): Likewise.
398 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
399 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
400 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
402 * elf.c (bfd_section_from_r_symndx): New function.
403 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
404 (struct sym_sec_cache): New.
405 (bfd_section_from_r_symndx): Declare.
406 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
407 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
408 relocs when relocatable. Don't zero entire reloc, just zero the
410 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
411 (elf32_hppa_link_hash_table_create): Init it.
412 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
413 syms on a per-section basis as we do for globals.
414 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
415 (allocate_dynrelocs): Warning fix.
416 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
417 section has been discarded.
418 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
420 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
421 (elf_i386_link_hash_table_create): Init it.
422 (elf_i386_check_relocs): Track dynamic relocs needed for local
423 syms on a per-section basis as we do for globals.
424 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
426 (allocate_dynrelocs): Warning fix.
427 (elf_i386_size_dynamic_sections): Don't allocate relocs when
428 section has been discarded.
429 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
431 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
432 (elf_s390_link_hash_table_create): Init it.
433 (elf_s390_check_relocs): Track dynamic relocs needed for local
434 syms on a per-section basis as we do for globals.
435 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
437 (allocate_dynrelocs): Warning fix.
438 (elf_s390_size_dynamic_sections): Don't allocate relocs when
439 section has been discarded.
440 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
442 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
443 (ppc64_link_hash_table_create): Init it.
444 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
445 syms on a per-section basis as we do for globals.
446 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
447 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
448 function. Warning fix.
449 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
450 section has been discarded.
451 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
453 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
454 (elf_s390_link_hash_table_create): Init it.
455 (elf_s390_check_relocs): Track dynamic relocs needed for local
456 syms on a per-section basis as we do for globals.
457 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
459 (allocate_dynrelocs): Warning fix.
460 (elf_s390_size_dynamic_sections): Don't allocate relocs when
461 section has been discarded.
462 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
465 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
467 * elf32-s390: Major rework that introduces all recent changes to
468 the s390 backends. Get a closer match to elf32-i386.
469 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
470 Localise vars, and delay setting. Better error reporting, replace
471 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
472 symbol is not defined in the regular object file and tread the weak
473 definition as the normal one. Don't discard relocs for undefweak or
474 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
475 test for avoided copy relocs. Reinstate fudge for unresolved relocs
476 in debugging sections.
477 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
478 reloc processing for weakdefs. Remove redundant casts and aborts.
479 Delay setting of vars until needed. Move creation of dynamic symbols
480 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
481 BFD_ASSERT with abort. Discard .plt entries for everything with
483 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
484 .got or .relgot here but do it in allocate_dynrelocs. Reference count
485 possible .plt and .got entries. Don't test input section SEC_READONLY
486 here to try to avoid copy relocs, and keep dyn_relocs regardless of
487 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
488 variables until needed. Remove separate switch stmt for creating .got
489 section. Initialise local_got_refcounts to 0. Cache pointer to
490 "sreloc" section in elf_section_data. Tweak condition under which .got
491 created. Report files with bad relocation section names.
492 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
493 have been forced local. Use same test to decide if we can use a
494 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
495 comment. Move expressions out of function calls. Replace BFD_ASSERT
497 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
498 statement. Replace BFD_ASSERT with abort.
499 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
500 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
501 instead of looking up section names for DT_TEXTREL. Replace
502 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
503 Add a comment to remind us that one day this ought to be fixed.
504 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
505 (struct elf_s390_link_hash_table): Likewise.
506 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
507 rid of unnecessary casts.
508 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
509 Remove "section" field.
510 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
511 Reference count possible .plt entries. Don't deallocate .got and
513 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
515 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
517 (elf_s390_discard_copies): Delete.
518 (elf_s390_link_hash_traverse): Delete.
519 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
520 rather than gc variety).
521 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
522 srelplt, sdynbss, srelbss fields.
523 (elf_s390_link_hash_table_create): Init them.
524 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
525 (allocate_dynrelocs): New function.
526 (create_got_section): New function.
527 (elf_backend_can_refcount): Define.
528 (elf_backend_copy_indirect_symbol): Define.
529 (elf_s390_copy_indirect_symbol): New function.
530 (elf_s390_create_dynamic_sections): New function.
531 (readonly_dynrelocs): New function.
532 * elf64-s390.c: Likewise.
534 2001-11-07 Jakub Jelinek <jakub@redhat.com>
536 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
537 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
538 (elf-strtab.lo): Add rule.
539 * Makefile.in: Rebuilt.
540 * configure.in (elf): Add elf-strtab.lo.
541 * configure: Rebuilt.
542 * elf-bfd.h (elf_strtab_hash): Forward declare.
543 (struct elf_link_hash_table): Change dynstr type to
544 struct elf_strtab_hash *.
545 (struct elf_obj_tdata): Change strtab_ptr type to
546 struct elf_strtab_hash *.
547 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
548 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
549 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
550 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
551 _bfd_elf_strtab_finalize): New prototypes.
552 * elf-strtab.c: New file.
553 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
554 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
555 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
556 when forcing dynamic symbol to local.
557 (elf_link_create_dynamic_sections): Call
558 _bfd_elf_strtab_init instead of elf_stringtab_init.
559 (elf_link_record_local_dynamic_symbol): Likewise, change
560 dynstr type. Use _bfd_elf_strtab functions instead of
561 _bfd_stringtab calls.
562 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
563 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
564 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
565 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
566 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
567 dynamic symbol to local.
568 (elf_link_assign_sym_version): Likewise.
569 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
571 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
572 type. Call _bfd_elf_strtab functions instead of
573 _bfd_stringtab functions.
574 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
575 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
576 (elf_fake_sections): Likewise.
577 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
578 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
579 name in the output. Call _bfd_elf_strtab_finalize and
580 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
581 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
582 instead of _bfd_stringtab_size.
583 (prep_headers): Change shstrtab type.
584 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
586 2001-11-07 Alan Modra <amodra@bigpond.net.au>
588 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
589 bad symtab segfault. Formatting and warning fixes. Improve
590 error message for internationalisation.
592 2001-11-06 H.J. Lu (hjl@gnu.org)
594 * elflink.h (elf_link_input_bfd): Complain about relocs against
597 2001-11-03 Alan Modra <amodra@bigpond.net.au>
599 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
601 2001-11-02 H.J. Lu <hjl@gnu.org>
603 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
604 dynamic relocation for symbols defined in regular objects when
605 creating executables.
607 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
609 * configure.in (ALL_LINGUAS): Add "fr".
610 * configure: Regenerate.
611 * po/fr.po: New file.
613 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
615 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
617 * som.c (setup_sections): Initialize subspace_sections.
619 2001-11-02 H.J. Lu (hjl@gnu.org)
621 * coffgen.c (coff_object_p): Return 0 if the header is too big.
623 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
625 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
626 information. Save bfd arch and mach values. Restore on error.
628 2001-11-02 Alan Modra <amodra@bigpond.net.au>
630 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
631 (allocate_PIC_calls): New function.
632 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
633 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
634 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
636 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
638 * elf32-cris.c (cris_elf_grok_prstatus): New function.
639 (cris_elf_grok_psinfo): New function.
640 (elf_backend_grok_prstatus): Define.
641 (elf_backend_grok_psinfo): Define.
643 2001-11-01 Alan Modra <amodra@bigpond.net.au>
645 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
648 2001-10-31 Chris Demetriou <cgd@demetriou.com>
650 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
651 relocations properly.
653 2001-10-31 H.J. Lu <hjl@gnu.org>
655 * elflink.h (elf_link_output_extsym): Don't clear the visibility
656 field for relocateable.
658 2001-11-01 Alan Modra <amodra@bigpond.net.au>
660 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
661 .plt relocs in DT_RELASZ.
663 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
665 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
668 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
670 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
672 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
674 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
675 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
676 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
677 Regenerate dependencies.
678 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
679 * config.bfd: [BFD64] (mmix-*-*): New case.
680 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
681 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
682 (bfd_mmix_arch): Declare.
683 (bfd_archures_list): Add bfd_mmix_arch.
684 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
685 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
686 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
688 * reloc.c: Add MMIX relocations.
689 * bfd.c (struct _bfd, tdata): Add mmo_data.
690 * Makefile.in: Regenerate.
691 * configure: Regenerate.
692 * libbfd.h: Regenerate.
693 * bfd-in2.h: Regenerate.
694 * configure: Rebuild.
696 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
698 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
699 p_paddr of the segment that contains it.
700 (copy_private_bfd_data): If the LMA for a segment is known, use it
701 for matching sections to segments.
702 (assign_file_positions_for_segments): Use the LMA when adjusting
703 for inter-section alignment padding.
705 2001-10-29 Kazu Hirata <kazu@hxi.com>
707 * README: Fix a typo.
709 2001-10-24 Richard Henderson <rth@redhat.com>
711 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
712 timestamp to time_t for ctime.
714 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
716 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
717 unsigned, increasing index.
719 2001-10-23 H.J. Lu <hjl@gnu.org>
721 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
722 m != NULL before accessing it.
724 2001-10-23 Alan Modra <amodra@bigpond.net.au>
726 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
727 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
728 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
730 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
731 (hppa_link_hash_newfunc): Likewise.
732 (elf32_hppa_finish_dynamic_symbol): Likewise.
733 (allocate_dynrelocs): Always allocate .got relocs if shared.
734 (elf32_hppa_relocate_section): Output them too. Similarly
735 consolidate .plt reloc code, and no longer initialise .plt
736 when a reloc is output.
737 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
738 when no reloc is output.
740 From Herbert Xu <herbert@gondor.apana.org.au>
741 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
742 unreachable branches.
744 2001-10-22 H.J. Lu <hjl@gnu.org>
746 * configure.in (WIN32LIBADD): Use -L../libiberty for
748 * configure: Rebuild.
750 2001-10-21 H.J. Lu <hjl@gnu.org>
752 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
753 if shared library is enabled only for Linux hosts.
754 * configure: Rebuild.
756 2001-10-21 H.J. Lu <hjl@gnu.org>
758 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
759 ../libiberty/Makefile instead of $enable_shared.
760 * configure: Rebuild.
762 2001-10-21 H.J. Lu <hjl@gnu.org>
764 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
767 2001-10-20 H.J. Lu <hjl@gnu.org>
769 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
770 if shared library is enabled.
771 * configure: Rebuild.
773 2001-10-20 H.J. Lu <hjl@gnu.org>
775 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
777 2001-10-19 H.J. Lu <hjl@gnu.org>
779 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
782 2001-10-18 H.J. Lu <hjl@gnu.org>
784 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
785 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
787 2001-10-18 Jakub Jelinek <jakub@redhat.com>
789 * section.c (_bfd_strip_section_from_output): Don't count
790 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
792 2001-10-17 Alan Modra <amodra@bigpond.net.au>
794 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
795 Elf_Internal_Shdr.contents now that it's no longer a PTR.
796 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
797 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
798 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
799 * elf32-sh.c (sh_elf_relax_section): Likewise.
800 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
801 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
802 * elf.c (setup_group): Warning fixes.
803 * elflink.h (elf_link_sort_relocs): Likewise.
804 * pdp11.c (slurp_reloc_table): Likewise.
806 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
808 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
811 2001-10-15 H.J. Lu <hjl@gnu.org>
813 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
814 for relocations against discarded link-once section.
816 2001-10-15 Alan Modra <amodra@bigpond.net.au>
818 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
819 bfd_reloc_outofrange and similar errors.
821 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
822 rather than ind->weakdef.
823 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
824 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
825 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
826 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
827 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
829 2001-10-15 Alan Modra <amodra@bigpond.net.au>
830 H.J. Lu <hjl@gnu.org>
832 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
833 counts for aliases instead of aborting.
834 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
835 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
837 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
838 to -1 for non-function symbols.
839 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
840 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
841 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
842 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
843 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
844 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
845 plt.offset instead of plt.refcount when setting to -1.
847 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
849 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
850 like R_ARM_PC24. Include reloc number in error message about
853 2001-10-10 Jakub Jelinek <jakub@redhat.com>
855 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
856 relocations against the same symbol in .rel{,a}.dyn section.
858 2001-10-10 Kazu Hirata <kazu@hxi.com>
860 * aout-encap.c: Fix comment typos.
862 * archive.c: Likewise.
864 * coff64-rs6000.c: Likewise.
865 * coffcode.h: Likewise.
866 * coffgen.c: Likewise.
867 * cofflink.c: Likewise.
868 * coff-mips.c: Likewise.
870 * elf32-m32r.c: Likewise.
871 * libcoff-in.h: Likewise.
872 * libecoff.h: Likewise.
873 * libxcoff.h: Likewise.
874 * nlm32-i386.c: Likewise.
876 * section.c: Likewise.
879 * bfd-in2.h: Regenerate.
880 * libcoff.h: Likewise.
882 2001-10-10 Alan Modra <amodra@bigpond.net.au>
884 * elf.c (elf_map_symbols): Don't create new section symbols; Use
885 existing section syms. Update comments.
886 (copy_private_bfd_data): Formatting fixes.
887 (elfcore_grok_win32pstatus): Likewise.
888 (swap_out_syms): Likewise. Remove unnecessary level of braces.
890 2001-10-09 Alan Modra <amodra@bigpond.net.au>
892 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
894 (elf_group_name): Define.
895 (elf_next_in_group): Define.
896 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
897 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
898 first member section; Instead use elf_next_in_group.
899 (bfd_section_from_shdr): Likewise.
900 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
902 2001-10-09 Alan Modra <amodra@bigpond.net.au>
904 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
905 "next_in_group". Fix gp and gp_size comments.
906 * elf.c (union elf_internal_group): New.
907 (setup_group): New function.
908 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
909 Call setup_group for SHF_GROUP sections.
910 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
911 (elf_fake_sections): Set header type for SEC_GROUP, and header
912 flags for sections in a group.
913 (set_group_contents): New function.
914 (_bfd_elf_compute_section_file_positions): Call it.
915 (assign_section_numbers): Set sh_link for SHT_GROUP.
917 * elflink.h (gc_mark_hook): Handle section groups.
918 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
919 * section.c (SEC_GROUP): Define.
920 (struct sec): Comment fixes.
921 * bfd-in2.h: Regenerate.
923 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
924 out of function args.
925 (_bfd_elf_canonicalize_reloc): Similarly.
926 (_bfd_elf_get_symtab): Here too.
927 (_bfd_elf_canonicalize_dynamic_symtab): And here.
928 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
929 bfd_bread, and remove unnecessary cast.
931 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
933 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
935 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
937 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
940 2001-10-06 Alan Modra <amodra@bigpond.net.au>
942 * bfd.c (bfd_assert): Report bfd version.
943 (_bfd_abort): Likewise.
945 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
946 section sym values. Instead replace any relocs against them with
947 relocs against STN_UNDEF, which has a zero value.
949 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
952 2001-10-05 Jeff Law <law@redhat.com>
954 * som.h (som_exec_data): New field "version_id".
955 * som.c (som_object_setup): Record the version_id if it
957 (som_prep_headers): Do not initialize version_id here.
958 (som_finish_writing): Initialize version_id here.
960 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
962 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
963 according to the MIPS/SGI ELF64 ABI Draft.
964 (mips_elf_sort_hash_table): Typo.
966 2001-10-04 Alan Modra <amodra@bigpond.net.au>
968 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
970 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
971 copying flags if this is a weakdef.
973 2001-10-04 Alan Modra <amodra@bigpond.net.au>
975 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
978 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
979 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
980 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
982 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
983 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
984 backends we configure. Run "make dep-am".
985 (install-data-local): Install symcat.h.
986 * dep-in.sed: Remove symcat.h from dependencies.
987 * Makefile.in: Regenerate.
989 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
991 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
993 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
995 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
996 (elf_backend_default_use_rela_p): New define.
998 2001-10-03 Alan Modra <amodra@bigpond.net.au>
1000 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1003 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1004 * configure: Regenerate.
1005 * Makefile.am (BFD_H_FILES): Add version.h.
1006 * Makefile.in: Regenerate.
1007 * po/SRC-POTFILES.in: Regenerate.
1009 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1010 elf_backend_copy_indirect_symbol so that backend has a chance to
1011 copy other necessary fields.
1012 * elf-bfd.h (struct elf_backend_data): Update description of
1013 elf_backend_copy_indirect_symbol.
1014 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1015 copying flags if this is a weakdef.
1016 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1017 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1018 than bfd_link_hash_lookup.
1019 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1020 reloc processing for weakdefs.
1021 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1022 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1024 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1026 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1027 result of ELF64_R_TYPE to enum before using in a switch.
1028 (ppc64_elf_gc_mark_hook): Likewise.
1029 (ppc64_elf_gc_sweep_hook): Likewise.
1030 (ppc64_elf_reloc_type_class): Likewise.
1032 2001-10-02 Alan Modra <amodra@bigpond.net.au>
1034 * version.h: New file.
1035 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1036 (BFD_VERSION_DATE): Define.
1037 (BFD_VERSION_STRING): Define.
1038 * configure.in: AC_SUBST bfd_version, bfd_version_date and
1040 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1041 * bfd-in2.h: Regenerate.
1042 * configure: Regenerate.
1043 * Makefile.am: Run "make dep-am".
1044 * Makefile.in: Regenerate.
1046 * bfd-in.h: Include "symcat.h".
1047 (CONCAT4): Redefine as for old CAT4.
1048 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1049 Add warning regarding whitespace.
1050 * aout-cris.c: Likewise.
1051 * aout-ns32k.c: Likewise.
1052 * aout-sparcle.c: Likewise.
1053 * aout-tic30.c: Likewise.
1054 * aout0.c: Likewise.
1055 * armnetbsd.c: Likewise.
1056 * demo64.c: Likewise.
1057 * elf-bfd.h: Likewise.
1058 * gen-aout.c: Likewise.
1059 * host-aout.c: Likewise.
1060 * hp300bsd.c: Likewise.
1061 * hp300hpux.c: Likewise.
1062 * i386aout.c: Likewise.
1063 * i386bsd.c: Likewise.
1064 * i386dynix.c: Likewise.
1065 * i386freebsd.c: Likewise.
1066 * i386linux.c: Likewise.
1067 * i386lynx.c: Likewise.
1068 * i386mach3.c: Likewise.
1069 * i386netbsd.c: Likewise.
1070 * libaout.h: Likewise.
1071 * m68k4knetbsd.c: Likewise.
1072 * m68klinux.c: Likewise.
1073 * m68klynx.c: Likewise.
1074 * m68knetbsd.c: Likewise.
1075 * m88kmach3.c: Likewise.
1076 * mipsbsd.c: Likewise.
1077 * newsos3.c: Likewise.
1078 * ns32knetbsd.c: Likewise.
1079 * pc532-mach.c: Likewise.
1080 * pdp11.c: Likewise.
1081 * riscix.c: Likewise.
1082 * sparclinux.c: Likewise.
1083 * sparclynx.c: Likewise.
1084 * sparcnetbsd.c: Likewise.
1085 * sunos.c: Likewise.
1086 * targets.c: Likewise.
1087 * vaxnetbsd.c: Likewise.
1088 * vms-hdr.c: Likewise.
1090 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1092 * bfd-in.h: Remove comments regarding generated files.
1093 * libbfd-in.h: Likewise.
1094 * libcoff-in.h: Likewise.
1095 * bfd-in2.h: Regenerate.
1096 * libbfd.h: Likewise.
1097 * libcoff.h: Likewise.
1099 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1100 Hans-Peter Nilsson <hp@bitrange.com>
1102 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1103 partial_inplace, matching assembler output. Set src_mask to
1105 (sh_elf_relocate_section): Delete misplaced comment.
1106 For relocatable linking against section symbol, call
1107 _bfd_relocate_contents for partial_inplace relocs and adjust
1108 rel->r_addend for others.
1109 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1110 bfd_get_32, not at rel->r_addend.
1112 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1114 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1115 the old dir refcount, so we indirectly set them to init_refcount.
1116 Short-circuit asserts when we've just verified they are true.
1118 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1120 * section.c (struct sec): Remove kept_section.
1121 (STD_SECTION): Remove kept_section initialisation.
1122 (bfd_make_section_anyway): Here too.
1123 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1124 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1125 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1126 symbols to zero, and remove all code involved with kept_section
1127 and tracking section symbol values.
1128 * bfd-in2.h: Regenerate.
1129 * configure.in: Bump version number.
1130 * configure: Regenerate.
1132 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1134 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1135 (IS_ABSOLUTE_RELOC): Define.
1136 (struct ppc_link_hash_entry): New.
1137 (struct ppc_link_hash_table): New.
1138 (ppc_hash_table): Define.
1139 (link_hash_newfunc): New function.
1140 (ppc64_elf_link_hash_table_create): New function.
1141 (create_got_section): New function.
1142 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1143 pointers to our dynamic sections in hash table.
1144 (ppc64_elf_copy_indirect_symbol): New function.
1145 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1146 dynamic sections. Localise vars. Modify code for refcounts
1147 starting from zero. Don't allocate here, or force symbols dynamic.
1148 Don't copy all relocs if shared, select ones we need. Add code
1149 to track possible copy relocs for non-shared link.
1150 (ppc64_elf_gc_mark_hook): Update comment.
1151 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1152 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1153 code for reference counting garbage collection. Don't create .plt
1154 entries for functions that don't comply with ABI naming convention,
1155 and don't allocate .plt space here. Use short-cuts to dynamic
1156 sections. If possible, keep dynamic relocations instead of using
1157 copy relocs. Remove confused comments.
1158 (ppc_adjust_dynindx): Delete.
1159 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1160 (allocate_dynrelocs): New function.
1161 (readonly_dynrelocs): New function.
1162 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1163 space here, and call allocate_dynrelocs to allocate space for
1164 global .plt, .got and reloc sections. Use short-cuts to dynamic
1165 sections. Call readonly_dynrelocs to determine whether we need
1166 DT_TEXTREL. Don't generate section symbols here, the generic
1167 ELF linker code does it for us.
1168 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1169 gc variety, since we do our own .got handling.
1170 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1171 dynamic section short-cuts. Localise vars, and delay setting.
1172 Handle unknown relocs in main switch statement. Replace ugly
1173 complicated tests for unresolvable relocs with a simple direct
1174 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1175 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1176 after main switch, when we've set addend. Do non-addend insn
1177 tweaks before main swithc. Ignore input_section->vma when
1178 calculating reloc offsets as it's always zero. Rewrite dynamic
1179 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1180 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1181 of dynamic section short-cuts. Reorganise .plt handling code.
1182 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1183 Move expressions out of swap_reloca_out function calls.
1184 (ppc64_elf_reloc_type_class): New function.
1185 (ppc64_elf_info_to_howto): Move common expression to local var.
1186 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1187 of dynamic section short-cuts. Don't fiddle with section syms
1188 here as the ELF linker does it for us.
1189 (elf_backend_can_refcount): Define.
1190 (bfd_elf64_bfd_link_hash_table_create): Define.
1191 (elf_backend_copy_indirect_symbol): Define.
1192 (elf_backend_reloc_type_class): Define.
1193 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1195 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1197 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1198 (struct elf_backend_data): Add can_refcount.
1199 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1200 got.refcount and plt.refcount from init_refcount.
1201 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1202 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1203 rather than got/plt.offset, and test for <= 0 rather than -1.
1204 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1205 * elfxx-target.h (elf_backend_can_refcount): Define.
1206 (elfNN_bed): Init can_refcount.
1207 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1208 (_bfd_generic_link_hash_newfunc): Likewise.
1209 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1211 (elf_backend_can_refcount): Define.
1212 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1214 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1216 (elf_backend_can_refcount): Define.
1217 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1219 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1220 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1221 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1222 (elf_backend_can_refcount): Define.
1223 (elf_i386_copy_indirect_symbol): Make static to agree with
1224 prototype. Formatting fix.
1225 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1227 (elf_backend_can_refcount): Define.
1228 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1230 (elf_backend_can_refcount): Define.
1231 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1233 (elf_backend_can_refcount): Define.
1234 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1236 (elf_backend_can_refcount): Define.
1237 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1239 (elf_backend_can_refcount): Define.
1241 * som.c (som_write_symbol_strings): Cast current_offset in
1242 bfd_seek call to match param type.
1244 2001-09-28 J. Brobecker <brobecker@gnat.com>
1246 * som.c (som_write_symbol_strings): Fix incorrect type of
1247 current_offset to match the function definition. Fixes a build
1248 failure on HPUX-11.00.
1250 2001-09-28 Richard Henderson <rth@redhat.com>
1252 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1253 SEC_MERGE, SEC_STRINGS.
1255 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1256 * bfd-in2.h: Rebuild.
1258 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1260 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1261 reloc code using x86_64_reloc_map.
1263 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1264 no longer allocate here. Localise some vars to blocks where they
1266 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1267 setting of vars until needed.
1268 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1269 when symbol visibilty makes a function local.
1270 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1271 swap_reloca_out function calls.
1272 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1273 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1276 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1277 no longer allocate here. Localise some vars to blocks where they
1278 are used. Remove separate switch stmt for creating .got sec.
1279 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1280 redundant casts and aborts. Delay setting of vars until needed.
1281 (allocate_dynrelocs): Remove redundant casts and aborts.
1282 (elf_i386_size_dynamic_sections): Move comment.
1283 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1285 (elf_i386_relocate_section): Likewise. Comment typo fix.
1286 (elf_i386_finish_dynamic_sections): Migrate common code out of
1288 (elf_backend_* defines): Sort.
1290 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1291 without a reloc when symbol visibilty makes a function local.
1293 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1295 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1296 conflicting float flags.
1298 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1300 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1301 (elf_backend_copy_indirect_symbol): Define.
1302 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1303 (struct elf_i386_link_hash_table): Likewise.
1304 (link_hash_newfunc): Get rid of unnecessary casts.
1305 (elf_i386_link_hash_table_create): Likewise.
1306 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1307 Don't test input section SEC_READONLY here to try to avoid copy
1308 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1309 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1310 here to properly test whether we need copy relocs. Do so for weak
1313 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1314 (elf_backend_copy_indirect_symbol): Define.
1315 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1316 (stub_hash_newfunc): Get rid of unnecessary casts.
1317 (hppa_link_hash_newfunc): Likewise.
1318 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1319 Don't test input section SEC_READONLY here to try to avoid copy
1320 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1321 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1322 here to properly test whether we need copy relocs. Do so for weak
1325 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1327 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1328 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1329 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1331 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1333 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1336 2001-09-25 H.J. Lu <hjl@gnu.org>
1338 * bfd-in2.h: Regenerated.
1340 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1342 * elf32-i386.c: Add comment re linker function names and ordering.
1343 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1344 (elf_i386_grok_prstatus): Move before linker functions.
1345 (elf_i386_grok_psinfo): Likewise.
1346 (elf_i386_fake_sections): Move so that functions are ordered.
1347 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1349 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1351 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1354 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1355 code handling this option.
1356 (LONG_BRANCH_VIA_PLT): Likewise.
1357 (RELATIVE_DYNRELOCS): Define as zero.
1358 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1359 "pc_count" fields. Remove "section" field.
1360 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1361 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1362 relocs here. Instead, record all needed dynamic relocs via
1363 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1364 in elf_section_data.
1365 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1366 (allocate_plt_and_got_and_discard_relocs): Rename to
1367 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1368 (readonly_dynrelocs): New function.
1369 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1370 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1371 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1372 (elf32_hppa_relocate_section): Make use of cached sreloc.
1373 (elf32_hppa_reloc_type_class): New function.
1374 (elf_backend_reloc_type_class): Define.
1376 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1378 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1379 and "sreloc" fields.
1380 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1381 "pc_count" fields. Remove "section" field.
1382 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1383 allocate space for dynamic relocs here. Instead, record all
1384 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1385 pointer to "sreloc" section in elf_section_data.
1386 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1387 (allocate_plt_and_got_and_discard_relocs): Rename to
1388 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1389 (readonly_dynrelocs): New function.
1390 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1391 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1392 (elf_i386_relocate_section): Make use of cached sreloc.
1394 2001-09-24 Alan Modra <amodra@bigpond.net.au>
1396 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1397 reloc rather than just the type.
1398 (_bfd_elf_reloc_type_class): Likewise.
1399 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1400 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1401 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1402 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1403 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1404 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1405 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1406 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1407 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1408 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1409 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1410 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1411 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1412 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1413 * elflink.h: Formatting fixes.
1414 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1415 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1416 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1418 2001-09-22 John Reiser <jreiser@BitWagon.com>
1420 * elfcode.h (elf_object_p): Allow for no section header at all in
1421 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1423 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1425 * elfxx-ia64.c: Fix compile time warning messages.
1426 * coff-mcore.c: Fix compile time warning messages.
1427 * coff-ppc.c: Fix compile time warning messages.
1428 * coffcode.h: Fix compile time warning messages.
1429 * elf32-mips.c: Fix compile time warning messages.
1430 * elf64-alpha.c: Fix compile time warning messages.
1431 * libbfd.c: Fix compile time warning messages.
1432 * bfd-in2.h: Regenerate.
1434 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1436 * Makefile.am: Run "make dep-am".
1437 * Makefile.in: Regenerate.
1439 * aoutx.h: Formatting fixes.
1440 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1442 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1445 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1447 * bfd.c (bfd_archive_filename): New function.
1448 * bfd-in2.h: Regenerate.
1449 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1450 in error messages where the bfd is an input bfd.
1451 * aout-cris.c: Likewise.
1452 * coff-arm.c: Likewise.
1453 * coff-mcore.c: Likewise.
1454 * coff-ppc.c: Likewise.
1455 * coff-rs6000.c: Likewise.
1456 * coff-sh.c: Likewise.
1457 * coff-tic54x.c: Likewise.
1458 * coff-tic80.c: Likewise.
1459 * coff64-rs6000.c: Likewise.
1460 * coffcode.h: Likewise.
1461 * coffgen.c: Likewise.
1462 * cofflink.c: Likewise.
1463 * ecofflink.c: Likewise.
1464 * elf-hppa.h: Likewise.
1466 * elf32-arm.h: Likewise.
1467 * elf32-cris.c: Likewise.
1468 * elf32-gen.c: Likewise.
1469 * elf32-hppa.c: Likewise.
1470 * elf32-i370.c: Likewise.
1471 * elf32-i386.c: Likewise.
1472 * elf32-m32r.c: Likewise.
1473 * elf32-mcore.c: Likewise.
1474 * elf32-mips.c: Likewise.
1475 * elf32-ppc.c: Likewise.
1476 * elf32-s390.c: Likewise.
1477 * elf32-sh.c: Likewise.
1478 * elf32-sparc.c: Likewise.
1479 * elf32-v850.c: Likewise.
1480 * elf64-alpha.c: Likewise.
1481 * elf64-gen.c: Likewise.
1482 * elf64-ppc.c: Likewise.
1483 * elf64-s390.c: Likewise.
1484 * elf64-sparc.c: Likewise.
1485 * elf64-x86-64.c: Likewise.
1486 * elflink.h: Likewise.
1487 * elfxx-ia64.c: Likewise.
1490 * libbfd.c: Likewise.
1491 * pdp11.c: Likewise.
1492 * pe-mips.c: Likewise.
1493 * peicode.h: Likewise.
1495 * xcofflink.c: Likewise.
1497 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1499 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1502 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1505 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1506 Consolidate error messages, and split long messages to two lines.
1508 2001-09-20 John Reiser <jreiser@BitWagon.com>
1510 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1511 and info->allow_shlib_undefined.
1512 * elf32-cris.c: Likewise.
1513 * elf32-hppa.c: Likewise.
1514 * elf32-m68k.c: Likewise.
1515 * elf32-mips.c: Likewise.
1516 * elf32-ppc.c: Likewise.
1517 * elf32-s390.c: Likewise.
1518 * elf32-sh.c: Likewise.
1519 * elf32-sparc.c: Likewise.
1520 * elf64-alpha.c: Likewise.
1521 * elf64-hppa.c: Likewise.
1522 * elf64-ppc.c: Likewise.
1523 * elf64-s390.c: Likewise.
1524 * elf64-sparc.c: Likewise.
1525 * elf64-x86-64.c: Likewise.
1526 * elfxx-ia64.c: Likewise.
1528 2001-09-18 Bruno Haible <haible@clisp.cons.org>
1530 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1531 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1532 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1533 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1534 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1535 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1536 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1537 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1538 isxdigit/isdigit/islower.
1539 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1540 (mangle_name): Use ISALNUM instead of isalnum.
1541 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1542 (scan): Use ISDIGIT instead of isdigit.
1543 * hosts/alphavms.h: Don't include <ctype.h>.
1544 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1545 (ieee_object_p): Use TOUPPER instead of toupper.
1546 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1547 (ihex_bad_byte): Use ISPRINT instead of isprint.
1548 * merge.c: Don't include <ctype.h>.
1549 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1550 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1551 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1552 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1553 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1554 (mangle_name): Use ISALNUM instead of isalnum.
1555 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1556 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1557 isupper/islower/isdigit.
1558 (som_decode_symclass): Use TOUPPER instead of toupper.
1559 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1560 (srec_bad_byte): Use ISPRINT instead of isprint.
1561 (srec_scan): Use ISSPACE instead of isspace.
1562 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1563 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1564 * syms.c: Include "safe-ctype.h"
1565 (islower, toupper): Remove macro definitions.
1566 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1567 * vms-gsd.c: Don't include <ctype.h>.
1568 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1569 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1571 * vms-tir.c: Don't include <ctype.h>.
1573 2001-09-18 Alan Modra <amodra@bigpond.net.au>
1575 * libbfd.c (bfd_bread): New function replacing bfd_read without
1576 redundant params. Allow reads up to (size_t) -2 in length.
1577 (bfd_bwrite): Similarly for bfd_write.
1578 (real_read): Return a size_t.
1579 (bfd_read): Call bfd_bread.
1580 (bfd_write): Call bfd_bwrite.
1581 (warn_deprecated): New function to annoy everybody.
1582 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1583 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1584 (bfd_read, bfd_write): Define as macro.
1585 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1586 likewise for bfd_write. Ensure function args are correct size by
1587 using casts or local vars. In some cases, remove unnecessary
1588 casts. Formatting fixes, in some cases removing a large expression
1589 from function args by using a local var. Replace CONST with const.
1590 Modify variable types to avoid warings. Use casts to avoid
1591 warnings when using negative numbers in unsigned expressions.
1592 * aout-adobe.c: Likewise.
1593 * aout-arm.c: Likewise.
1594 * aout-cris.c: Likewise.
1595 * aout-encap.c: Likewise.
1596 * aout-ns32k.c: Likewise.
1597 * aout-target.h: Likewise.
1598 * aout-tic30.c: Likewise.
1599 * aoutf1.h: Likewise.
1600 * aoutx.h: Likewise.
1601 * archive.c: Likewise.
1602 * archures.c: Likewise.
1603 * bfd-in.h: Likewise.
1605 * binary.c: Likewise.
1607 * cache.c: Likewise.
1608 * cisco-core.c: Likewise.
1609 * coff-a29k.c: Likewise.
1610 * coff-alpha.c: Likewise.
1611 * coff-arm.c: Likewise.
1612 * coff-h8300.c: Likewise.
1613 * coff-h8500.c: Likewise.
1614 * coff-i386.c: Likewise.
1615 * coff-i860.c: Likewise.
1616 * coff-i960.c: Likewise.
1617 * coff-ia64.c: Likewise.
1618 * coff-m68k.c: Likewise.
1619 * coff-m88k.c: Likewise.
1620 * coff-mcore.c: Likewise.
1621 * coff-mips.c: Likewise.
1622 * coff-ppc.c: Likewise.
1623 * coff-rs6000.c: Likewise.
1624 * coff-sh.c: Likewise.
1625 * coff-sparc.c: Likewise.
1626 * coff-stgo32.c: Likewise.
1627 * coff-tic30.c: Likewise.
1628 * coff-tic54x.c: Likewise.
1629 * coff-tic80.c: Likewise.
1630 * coff-w65.c: Likewise.
1631 * coff-z8k.c: Likewise.
1632 * coff64-rs6000.c: Likewise.
1633 * coffcode.h: Likewise.
1634 * coffgen.c: Likewise.
1635 * cofflink.c: Likewise.
1636 * coffswap.h: Likewise.
1637 * corefile.c: Likewise.
1638 * cpu-arc.c: Likewise.
1639 * cpu-h8300.c: Likewise.
1640 * cpu-h8500.c: Likewise.
1641 * cpu-i960.c: Likewise.
1642 * cpu-ia64-opc.c: Likewise.
1643 * cpu-ns32k.c: Likewise.
1644 * cpu-pdp11.c: Likewise.
1645 * cpu-pj.c: Likewise.
1646 * cpu-sh.c: Likewise.
1647 * cpu-w65.c: Likewise.
1648 * cpu-z8k.c: Likewise.
1649 * dwarf1.c: Likewise.
1650 * dwarf2.c: Likewise.
1651 * ecoff.c: Likewise.
1652 * ecofflink.c: Likewise.
1653 * ecoffswap.h: Likewise.
1654 * elf-bfd.h: Likewise.
1655 * elf-hppa.h: Likewise.
1656 * elf-m10200.c: Likewise.
1657 * elf-m10300.c: Likewise.
1659 * elf32-arc.c: Likewise.
1660 * elf32-arm.h: Likewise.
1661 * elf32-avr.c: Likewise.
1662 * elf32-cris.c: Likewise.
1663 * elf32-fr30.c: Likewise.
1664 * elf32-gen.c: Likewise.
1665 * elf32-h8300.c: Likewise.
1666 * elf32-hppa.c: Likewise.
1667 * elf32-i370.c: Likewise.
1668 * elf32-i386.c: Likewise.
1669 * elf32-i860.c: Likewise.
1670 * elf32-m32r.c: Likewise.
1671 * elf32-m68k.c: Likewise.
1672 * elf32-mcore.c: Likewise.
1673 * elf32-mips.c: Likewise.
1674 * elf32-openrisc.c: Likewise.
1675 * elf32-pj.c: Likewise.
1676 * elf32-ppc.c: Likewise.
1677 * elf32-s390.c: Likewise.
1678 * elf32-sh-lin.c: Likewise.
1679 * elf32-sh.c: Likewise.
1680 * elf32-sparc.c: Likewise.
1681 * elf32-v850.c: Likewise.
1682 * elf64-alpha.c: Likewise.
1683 * elf64-hppa.c: Likewise.
1684 * elf64-mips.c: Likewise.
1685 * elf64-ppc.c: Likewise.
1686 * elf64-s390.c: Likewise.
1687 * elf64-sparc.c: Likewise.
1688 * elf64-x86-64.c: Likewise.
1689 * elfarm-nabi.c: Likewise.
1690 * elfcode.h: Likewise.
1691 * elfcore.h: Likewise.
1692 * elflink.c: Likewise.
1693 * elflink.h: Likewise.
1694 * elfxx-ia64.c: Likewise.
1695 * elfxx-target.h: Likewise.
1696 * format.c: Likewise.
1698 * hp300hpux.c: Likewise.
1699 * hppabsd-core.c: Likewise.
1700 * hpux-core.c: Likewise.
1701 * i386aout.c: Likewise.
1702 * i386dynix.c: Likewise.
1703 * i386linux.c: Likewise.
1704 * i386lynx.c: Likewise.
1705 * i386mach3.c: Likewise.
1706 * i386msdos.c: Likewise.
1707 * i386os9k.c: Likewise.
1710 * irix-core.c: Likewise.
1711 * libaout.h: Likewise.
1712 * libbfd-in.h: Likewise.
1713 * libbfd.c: Likewise.
1714 * libcoff-in.h: Likewise.
1715 * libecoff.h: Likewise.
1716 * libieee.h: Likewise.
1717 * libnlm.h: Likewise.
1718 * libpei.h: Likewise.
1719 * libxcoff.h: Likewise.
1720 * linker.c: Likewise.
1721 * lynx-core.c: Likewise.
1722 * m68klinux.c: Likewise.
1723 * merge.c: Likewise.
1724 * mipsbsd.c: Likewise.
1725 * netbsd-core.c: Likewise.
1727 * nlm32-alpha.c: Likewise.
1728 * nlm32-i386.c: Likewise.
1729 * nlm32-ppc.c: Likewise.
1730 * nlm32-sparc.c: Likewise.
1731 * nlmcode.h: Likewise.
1732 * nlmswap.h: Likewise.
1733 * ns32k.h: Likewise.
1734 * oasys.c: Likewise.
1735 * opncls.c: Likewise.
1736 * osf-core.c: Likewise.
1737 * pc532-mach.c: Likewise.
1738 * pdp11.c: Likewise.
1739 * pe-mips.c: Likewise.
1740 * peXXigen.c: Likewise.
1741 * peicode.h: Likewise.
1742 * ppcboot.c: Likewise.
1743 * ptrace-core.c: Likewise.
1744 * reloc.c: Likewise.
1745 * reloc16.c: Likewise.
1746 * riscix.c: Likewise.
1747 * rs6000-core.c: Likewise.
1748 * sco5-core.c: Likewise.
1749 * section.c: Likewise.
1751 * sparclinux.c: Likewise.
1752 * sparclynx.c: Likewise.
1754 * stabs.c: Likewise.
1755 * sunos.c: Likewise.
1757 * targets.c: Likewise.
1758 * tekhex.c: Likewise.
1759 * trad-core.c: Likewise.
1760 * versados.c: Likewise.
1761 * vms-gsd.c: Likewise.
1762 * vms-hdr.c: Likewise.
1763 * vms-misc.c: Likewise.
1764 * vms-tir.c: Likewise.
1767 * xcofflink.c: Likewise.
1768 * bfd-in2.h: Regenerate.
1769 * libbfd.h: Regenerate.
1770 * libcoff.h: Regenerate.
1772 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1773 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1774 (ufile_ptr): Define.
1775 (bfd_tell): Return a ufile_ptr.
1776 * libbfd.c (bfd_tell): Likewise.
1777 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1779 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1780 * aoutf1.h: Likewise.
1782 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1783 larger than unsigned long can represent.
1785 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1786 size overflows size_t.
1787 (bfd_realloc): Likewise.
1788 (bfd_zmalloc): Likewise.
1789 * opncls.c (bfd_alloc): Likewise.
1790 (bfd_zalloc): Likewise.
1791 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1792 (bfd_alloc, bfd_zalloc): Update.
1794 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1796 (bfd_get_signed_8): Likewise.
1797 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1798 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1799 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1800 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1801 * libaout.h: Likewise define and use here.
1802 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1803 * aout-arm.c: Likewise.
1804 * aout-encap.c: Likewise.
1805 * aout-ns32k.c: Likewise.
1806 * aout-tic30.c: Likewise.
1807 * aoutf1.h: Likewise.
1808 * aoutx.h: Likewise.
1810 * coff-alpha.c: Likewise.
1811 * coff-h8300.c: Likewise.
1812 * coff-h8500.c: Likewise.
1813 * coff-i960.c: Likewise.
1814 * coff-ia64.c: Likewise.
1815 * coff-m88k.c: Likewise.
1816 * coff-mips.c: Likewise.
1817 * coff-ppc.c: Likewise.
1818 * coff-rs6000.c: Likewise.
1819 * coff-sh.c: Likewise.
1820 * coff-sparc.c: Likewise.
1821 * coff-stgo32.c: Likewise.
1822 * coff-tic30.c: Likewise.
1823 * coff-tic80.c: Likewise.
1824 * coff-w65.c: Likewise.
1825 * coff-z8k.c: Likewise.
1826 * coff64-rs6000.c: Likewise.
1827 * coffgen.c: Likewise.
1828 * cofflink.c: Likewise.
1829 * coffswap.h: Likewise.
1830 * ecoff.c: Likewise.
1831 * ecoffswap.h: Likewise.
1833 * elf32-mips.c: Likewise.
1834 * elf64-mips.c: Likewise.
1835 * hp300hpux.c: Likewise.
1836 * i386dynix.c: Likewise.
1837 * i386lynx.c: Likewise.
1838 * i386msdos.c: Likewise.
1839 * i386os9k.c: Likewise.
1840 * libpei.h: Likewise.
1841 * nlm32-alpha.c: Likewise.
1842 * nlm32-i386.c: Likewise.
1843 * nlm32-ppc.c: Likewise.
1844 * nlmcode.h: Likewise.
1845 * nlmswap.h: Likewise.
1846 * oasys.c: Likewise.
1847 * pdp11.c: Likewise.
1848 * pe-mips.c: Likewise.
1849 * peXXigen.c: Likewise.
1850 * peicode.h: Likewise.
1851 * riscix.c: Likewise.
1852 * sunos.c: Likewise.
1853 * xcofflink.c: Likewise.
1854 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1855 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1856 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1857 equivalent H_PUT_* macro instead.
1858 (GETWORD, GETHALF, GETBYTE): Similarly.
1859 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1860 (GETWORD, GETHALF, GETBYTE): Likewise.
1861 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1863 * bfd-in.h (struct orl): Change "pos" to a union.
1864 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1865 (bsd_write_armap): Here too.
1866 (coff_write_armap): And here.
1867 * coff-rs6000.c (xcoff_write_armap_old): And here.
1868 (xcoff_write_one_armap_big): And here.
1869 (xcoff_write_armap_big): And here.
1870 * ecoff.c (_bfd_ecoff_write_armap): And here.
1871 * elf64-mips.c (mips_elf64_write_armap): And here.
1873 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1874 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1875 * elf32-h8300.c (elf32_h8_mach): Likewise.
1876 * elf32-mips.c (elf_mips_mach): Likewise.
1877 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1879 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1881 (aix386_core_vec): Typo fix.
1883 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1884 etc. to avoid redefined macro warning.
1885 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1886 (MY(fix_pcrel_26)): Likewise.
1887 * aout-ns32k.c (MY(put_reloc)): Likewise.
1888 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1889 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1890 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1892 * aout-encap.c: Include "file", not <file> for binutils headers.
1893 (encap_object_p): Half baked attempt to fix compile errors in
1894 code dealing with "magic".
1896 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1897 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1898 bfd_vma's rather than longs.
1899 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1900 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1901 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1903 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1904 Use unsigned comparisons.
1905 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1906 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1907 (_bfd_do_ns32k_reloc_contents): Likewise.
1908 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1909 (_bfd_ns32k_get_immediate): Likewise.
1910 (_bfd_ns32k_put_displacement): Likewise.
1911 (_bfd_ns32k_put_immediate): Likewise.
1912 (bfd_reloc_status_type): Likewise.
1914 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1916 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1917 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1918 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1920 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1921 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1922 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1924 (_bfd_elfcore_strndup): Likewise for "dup".
1925 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1926 "name" to avoid shadowing.
1927 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1928 definition of "off".
1929 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1930 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1932 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1934 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1936 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1938 (elf_link_input_bfd): Likewise.
1939 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1940 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1941 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1943 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1944 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1945 (sunos_write_dynamic_symbol): Remove unused vars.
1946 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1947 innermost "directory_name" and "file_name" vars.
1948 * tekhex.c (first_phase): Rename local var "type" to "stype".
1949 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1950 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1951 doing comparison at caller.
1952 (vms_esecflag_by_name): Likewise.
1953 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1954 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1955 (xcoff_write_global_symbol): Rename "p" param to "inf".
1957 * cisco-core.c: Add missing prototypes.
1958 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1959 (cisco_core_file_failing_signal): Likewise.
1960 (cisco_core_file_matches_executable_p): Likewise.
1961 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1962 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1963 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1964 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1966 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1967 thumb_glue_size and arm_glue_size.
1968 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1970 * coff64-rs6000.c: Group prototypes together.
1972 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1973 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1975 * cpu-arc.c: Add missing prototypes.
1976 * cpu-h8500.c: Likewise.
1977 * cpu-i960.c: Likewise.
1978 * cpu-pj.c: Likewise.
1979 * cpu-sh.c: Likewise.
1980 * cpu-w65.c: Likewise.
1981 * cpu-z8k.c: Likewise.
1982 * elf32-fr30.c: Likewise.
1983 * elf32-h8300.c: Likewise.
1984 * elf32-i370.c: Likewise.
1985 * hpux-core.c: Likewise.
1986 * versados.c: Likewise.
1988 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1989 * cpu-h8500.c: Likewise.
1990 * cpu-i960.c: Likewise.
1991 * cpu-z8k.c: Likewise.
1993 * cpu-ia64-opc.c: Correct comment.
1995 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1997 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1999 (bfd_elf32_write_out_phdrs): Likewise.
2000 (bfd_elf64_write_out_phdrs): Likewise.
2001 (elf_linker_section_pointers): Change addend to bfd_vma.
2002 (_bfd_elf_find_pointer_linker_section): Likewise.
2003 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2004 filepos to unsigned file_ptr.
2005 (_bfd_elfcore_strndup): Change max param to size_t.
2006 * elf.c (_bfd_elfcore_make_pseudosection): As above.
2007 (_bfd_elfcore_strndup): Likewise.
2008 (_bfd_elf_find_pointer_linker_section): Likewise.
2010 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2011 insn and sym_value to ints.
2013 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2015 (elfcore_read_notes): Likewise.
2017 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2018 param from unsigned char to int.
2019 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2020 for info_to_howto call.
2021 (add_dynamic_entry): Define macro.
2022 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2024 * elf32-cris.c (add_dynamic_entry): Define macro.
2025 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2027 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2028 (elf32_h8_object_p): Likewise.
2029 (elf32_h8_merge_private_bfd_data): Likewise.
2030 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2032 * elf32-hppa.c (add_dynamic_entry): Define macro.
2033 (elf32_hppa_size_dynamic_sections): Use it.
2034 * elf32-i370.c (add_dynamic_entry): Define macro.
2035 (i370_elf_size_dynamic_sections): Use it.
2036 (i370_noop): Make static.
2037 * elf32-i386.c (add_dynamic_entry): Define macro.
2038 (elf_i386_size_dynamic_sections): Use it.
2039 * elf32-m68k.c (add_dynamic_entry): Define macro.
2040 (elf_m68k_size_dynamic_sections): Use it.
2041 * elf32-ppc.c (add_dynamic_entry): Define macro.
2042 (ppc_elf_size_dynamic_sections): Use it.
2043 * elf32-s390.c (add_dynamic_entry): Define macro.
2044 (elf_s390_size_dynamic_sections): Use it.
2045 * elf64-alpha.c (add_dynamic_entry): Define macro.
2046 (elf64_alpha_size_dynamic_sections): Use it.
2047 * elf64-hppa.c (add_dynamic_entry): Define macro.
2048 (elf64_hppa_size_dynamic_sections): Use it.
2049 * elf64-ppc.c (add_dynamic_entry): Define macro.
2050 (ppc64_elf_size_dynamic_sections): Use it.
2051 * elf64-s390.c (add_dynamic_entry): Define macro.
2052 (elf_s390_size_dynamic_sections): Use it.
2053 * elf64-sparc.c (add_dynamic_entry): Define macro.
2054 (sparc64_elf_size_dynamic_sections): Use it.
2055 * elf64-x86-64.c (add_dynamic_entry): Define macro.
2056 (elf64_x86_64_size_dynamic_sections): Use it.
2057 * elfxx-ia64.c (add_dynamic_entry): Define macro.
2058 (elfNN_ia64_size_dynamic_sections): Use it.
2060 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2061 (v850_elf_perform_relocation): Make "r_type" param unsigned.
2063 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2064 false if the first malloc fails rather than going via error_return.
2066 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2068 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2070 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2072 * elfxx-ia64.c (global_sym_index): Return a long.
2074 * ieee.c (get_symbol): Use int rather than char param.
2075 (ieee_slurp_sections): Move "section" var to inner blocks.
2076 (copy_expression): Don't init "value" to zero or worry about
2077 clearing to zero after using.
2078 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2081 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2084 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2085 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2087 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2089 * pc532-mach.c (MYNSX): Delete.
2090 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2091 (write_object_contents): Correct prototype.
2093 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2094 than unsigned short.
2096 * section.c (bfd_set_section_contents): Remove redundant
2097 "offset < 0" test. Check that "count" doesn't overflow size_t.
2098 (bfd_get_section_contents): Likewise.
2100 * som.c (som_fixup_formats): Add missing braces.
2101 (som_reloc_addend): Pass a bfd_vma for "addend".
2103 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2104 (srec_write_symbols): Remove an unnecessary var.
2106 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2108 * configure.in: Sort to match. Bump version number.
2109 * configure: Regenerate.
2111 * tekhex.c (move_section_contents): Assert offset == 0.
2113 * versados.c (new_symbol_string): Constify arg.
2114 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2115 (versados_get_symbol_info): Make static.
2116 (versados_print_symbol): Likewise.
2117 (versados_get_reloc_upper_bound): Likewise.
2118 (versados_canonicalize_reloc): Likewise.
2120 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2122 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2124 2001-09-17 H.J. Lu <hjl@gnu.org>
2126 * dwarf1.c (parse_die): Take a new arg for the end of the
2127 section. Return false if die is beyond the section.
2128 (parse_functions_in_unit): Pass the end of the section to
2130 (_bfd_dwarf1_find_nearest_line): Likewise.
2132 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2134 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2135 just like R_SPARC_32.
2137 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2139 * configure.bfd: Add arm-openbsd target.
2141 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2143 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2144 Add support for mips64.
2146 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2148 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2150 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2152 * elf.c (prep_headers): Get the machine code from the elf
2154 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2155 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2156 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2157 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2158 * elf-arc.c (arc_elf_final_write_processing): Don't override
2159 e_machine, it's now properly set in prep_headers.
2160 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2162 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2163 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2164 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2165 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2166 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2167 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2168 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2169 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2170 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2171 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2172 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2173 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2175 2001-09-11 Richard Henderson <rth@redhat.com>
2177 * elf64-alpha.c (elf64_alpha_section_flags): New.
2178 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2180 2001-09-11 Richard Henderson <rth@redhat.com>
2182 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2183 apply HINT relocations against dynamic symbols.
2185 2001-09-11 H.J. Lu <hjl@gnu.org>
2187 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2189 2001-09-09 Richard Henderson <rth@redhat.com>
2191 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2193 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2194 following a call to a near function.
2196 2001-09-08 Richard Henderson <rth@redhat.com>
2198 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2199 relocation errors. Fail gp-relative relocations against
2202 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2204 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2205 as well as DEF_DYNAMIC in test for avoided copy relocs.
2206 (allocate_plt_and_got_and_discard_relocs): Likewise.
2207 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2208 (allocate_plt_and_got_and_discard_relocs): Likewise.
2210 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2212 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2215 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2217 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2219 (mips_elf64_howto_table_rel): Likewise.
2221 2001-09-05 Tom Rix <trix@redhat.com>
2223 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2224 and syscall symbols.
2225 (write_global_symbol) : Same.
2226 (bfd_xcoff_export_symbol): Remove unused syscall param.
2227 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2228 bfd_xcoff_import_symbol.
2230 * bfd-in2.h : Regenerate.
2232 2001-09-04 Richard Henderson <rth@redhat.com>
2234 * elf64-alpha.c (SKIP_HOWTO): New.
2235 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2236 Fix sizes of 16-bit mem format relocs.
2237 (elf64_alpha_reloc_map): Update to match.
2238 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2239 (elf64_alpha_relax_without_lituse): Likewise.
2240 (elf64_alpha_check_relocs): Handle GPREL16.
2241 (elf64_alpha_relocate_section): Likewise.
2242 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2243 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2244 * bfd-in2.h, libbfd.h: Rebuild.
2246 2001-09-04 Jeff Law <law@redhat.com>
2248 * elf32-h8300.c (elf32_h8_relax_section): New function.
2249 (elf32_h8_relax_delete_bytes): Likewise.
2250 (elf32_h8_symbol_address_p): Likewise.
2251 (elf32_h8_get_relocated_section_contents): Likewise.
2252 (bfd_elf32_bfd_relax_section): Define.
2253 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2255 * elf32-h8300.c (special): New function.
2256 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2258 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2259 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2260 Fix minor problems with 8bit and 16bit PC relative relocations.
2262 2001-09-01 Andreas Jaeger <aj@suse.de>
2264 * vms-tir.c: Add missing prototypes.
2265 * vms-hdr.c: Likewise.
2266 * vms-gsd.c: Likewise.
2267 * vms-misc.c: Likewise.
2269 2001-08-31 H.J. Lu <hjl@gnu.org>
2271 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2272 with bad relocation.
2274 2001-08-31 Eric Christopher <echristo@redhat.com>
2275 Jason Eckhardt <jle@redhat.com>
2277 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2278 mips32_4k and mips64.
2279 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2280 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2281 * bfd/cpu-mips.c: Ditto.
2282 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2283 * bfd/bfd-in2.h: Regenerate.
2285 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2287 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2288 value into R_ALPHA_RELATIVE's addend.
2289 (elf64_alpha_finish_dynamic_symbol): Likewise.
2291 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2293 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2294 recomputed addend during relocatable link if not USE_REL.
2296 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2299 2001-08-30 H.J. Lu <hjl@gnu.org>
2301 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2303 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2304 relocations for weak definitions.
2306 2001-08-30 H.J. Lu <hjl@gnu.org>
2308 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2309 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2310 * Makefile.in: Rebuild.
2312 2001-08-30 H.J. Lu <hjl@gnu.org>
2314 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2315 dynamic relocation for undefined weak symbols when creating
2316 executables. Check h->root.root.type, instead of h->root.type.
2318 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2320 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2321 default from coff to elf.
2323 2001-08-29 Jeff Law <law@redhat.com>
2325 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2327 (h8_reloc_map): Similarly.
2328 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2329 Add support for PC relative relocations.
2331 * elf32-h8300.c: Put all prototypes together.
2332 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2333 (elf32_h8_final_link_relocate): New function for linker.
2334 (elf32_h8_relocate_section): Similarly.
2335 (elf_backend_relocate_section): Define.
2337 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2338 (h8300_scan): Handle architecture:machine encodings typically
2339 found in linker scripts.
2340 * elf.c (prep_headers): Do not try to do H8 machine recognition
2342 * elf32-h8300.c: Add some missing prototypes.
2343 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2344 (elf32_h8_object_p): Similarly.
2346 2001-08-29 Tom Rix <trix@redhat.com>
2348 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2349 does not follow a XTY_SD.
2351 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2353 * targmatch.sed: Delete case statements.
2354 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2357 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
2359 * Makefile.am (elf32-h8300.lo): New target.
2360 * config.bfd (h8300*-*-elf): New case.
2361 * configure.in (bfd_elf32_h8300_vec): New case.
2362 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2363 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2364 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2365 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2366 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2367 * elf32-h8300.c: New file.
2368 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2370 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2372 * sparclynx.c: Add missing prototypes.
2373 * coff-mcore.c: Add missing prototypes.
2374 * elf32-pj.c: Add missing prototypes.
2375 * nlm32-sparc.c: Add missing prototypes.
2376 * oasys.c: Add missing prototypes.
2377 * pdp11.c: Add missing prototypes.
2378 * pe-mips.c: Add missing prototypes.
2379 * riscix.c: Add missing prototypes.
2381 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2383 * elf32-i386.c: Add missing prototypes.
2384 * elf32-ppc.c: Likewise.
2385 * elf32-sh-lin.c: Likewise.
2386 * elfarm-nabi.c: Likewise.
2388 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2390 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2391 (elf_i386_grok_psinfo): New function.
2392 (elf_backend_grok_prstatus): Define.
2393 (elf_backend_grok_psinfo): Likewise.
2394 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2395 (ppc_elf_grok_psinfo): New function.
2396 (elf_backend_grok_prstatus): Define.
2397 (elf_backend_grok_psinfo): Likewise.
2398 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2399 (elf32_shlin_grok_psinfo): New function.
2400 (elf_backend_grok_prstatus): Define.
2401 (elf_backend_grok_psinfo): Likewise.
2402 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2403 (elf32_arm_nabi_grok_psinfo): New function.
2404 (elf_backend_grok_prstatus): Define.
2405 (elf_backend_grok_psinfo): Likewise.
2407 2001-08-27 H.J. Lu <hjl@gnu.org>
2409 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2411 (mips_elf_calculate_relocation): Create dynamic relocation for
2412 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2415 2001-08-27 H.J. Lu <hjl@gnu.org>
2417 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2418 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2419 (_bfd_elf32_mips_grok_prstatus): Likewise.
2420 (_bfd_elf32_mips_grok_psinfo): Likewise.
2421 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2422 `struct mips_elf_link_hash_entry *'.
2423 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2425 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2427 * mipsbsd.c: Add missing prototypes.
2428 * hp300hpux.c: Add missing prototypes.
2429 * i386aout.c: Add missing prototypes.
2430 * i386lynx.c: Add missing prototypes.
2431 * i386mach3.c: Add missing prototypes.
2432 * i386msdos.c: Add missing prototypes.
2433 * i386os9k.c: Add missing prototypes.
2435 2001-08-27 Linus Nordberg <linus@swox.se>
2436 Torbjorn Granlund <tege@swox.com>
2437 Staffan Ulfberg <staffanu@swox.se>
2438 Alan Modra <amodra@bigpond.net.au>
2440 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2441 targ64_selvecs for 32 bit powerpc targets.
2442 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2443 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2445 * Makefile.in: Regenerate.
2446 * configure.in: Add elf64_powerpc vecs.
2447 * configure: Regenerate.
2448 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2449 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2450 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2451 * elf64-ppc.c: New file.
2452 * reloc.c: Add powerpc64 relocs.
2453 * libbfd.h: Regenerate.
2454 * bfd-in2.h: Regenerate.
2456 2001-08-27 Andreas Schwab <schwab@suse.de>
2458 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2459 reloc is against read-only section.
2460 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2461 looking up section names for DT_TEXTREL.
2462 (elf32_m68k_reloc_type_class): New function.
2463 (elf_backend_reloc_type_class): Define.
2465 2001-08-27 Andreas Jaeger <aj@suse.de>
2467 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2468 reloc is against read-only section.
2469 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2470 looking up section names for DT_TEXTREL.
2471 (elf_s390_reloc_type_class): New.
2472 (elf_backend_reloc_type_class): Define.
2474 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2475 reloc is against read-only section.
2476 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2477 looking up section names for DT_TEXTREL.
2478 (elf_s390_reloc_type_class): New.
2479 (elf_backend_reloc_type_class): Define.
2481 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2482 is against read-only section.
2483 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2484 looking up section names for DT_TEXTREL.
2485 (ppc_elf_reloc_type_class): New.
2486 (elf_backend_reloc_type_class): Define.
2488 2001-08-26 Andreas Jaeger <aj@suse.de>
2490 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2491 reloc is against read-only section.
2492 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2493 looking up section names for DT_TEXTREL.
2494 (elf_cris_reloc_type_class): New.
2495 (elf_backend_reloc_type_class): Define.
2497 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2498 against read-only section.
2499 (elf_backend_reloc_type_class): Define.
2500 (sh_elf_reloc_type_class): New.
2501 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2502 looking up section names for DT_TEXTREL.
2504 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2505 reloc is against read-only section.
2506 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2507 looking up section names for DT_TEXTREL.
2508 (elf32_arm_reloc_type_class): New.
2509 (elf_backend_reloc_type_class): Define.
2511 2001-08-25 Andreas Jaeger <aj@suse.de>
2513 * oasys.c: Add missing prototypes.
2515 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2516 attribute for parameter.
2517 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2519 * versados.c (get_4): Make static.
2520 (get_10): Make static.
2521 Add missing prototypes.
2522 (process_esd): Fix call to versados_new_symbol.
2524 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2526 * coff-a29k.c: Add missing prototypes.
2527 * coff-apollo.c: Add missing prototypes.
2528 * coff-arm.c: Add missing prototypes.
2529 * coff-i860.c: Add missing prototypes.
2530 * coff-rs6000.c: Add missing prototypes.
2531 * coff-tic80.c: Add missing prototypes.
2532 * elf-m10200.c: Add missing prototypes.
2533 * elf-m10300.c: Add missing prototypes.
2534 * elf32-arm.h: Add missing prototypes.
2535 * elf32-d10v.c: Add missing prototypes.
2536 * elf32-m32r.c: Add missing prototypes.
2537 * elf32-mcore.c: Add missing prototypes.
2538 * elf32-openrisc.c: Add missing prototypes.
2539 * elf32-sh.c: Add missing prototypes.
2540 * elf32-sparc.c: Add missing prototypes.
2541 * elf32-v850.c: Add missing prototypes.
2542 * elfarm-nabi.c: Add missing prototypes.
2543 * elfarm-oabi.c: Add missing prototypes.
2545 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2547 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2548 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2550 2001-08-24 H.J. Lu <hjl@gnu.org>
2552 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2555 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2557 * elf-bfd.h (elf_hash_table): Revert definition.
2558 (is_elf_hash_table): New macro.
2559 * elflink.h (elf_link_add_object_symbols): Test
2560 is_elf_hash_table before accessing ELF only fields in hash
2562 (elf_link_create_dynamic_sections): Fail if not using an ELF
2564 (elf_add_dynamic_entry): Fail if not using an ELF hash
2566 (elf_link_record_local_dynamic_symbol): Fail if not using an
2568 (size_dynamic_sections): Fail if not using an ELF hash
2570 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2572 (elf_bfd_final_link): Fail if not using an ELF hash
2575 2001-08-24 H.J. Lu <hjl@gnu.org>
2577 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2578 table is not an ELF linker hash table.
2580 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2581 table type to bfd_link_elf_hash_table.
2583 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2586 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2587 table type to bfd_link_generic_hash_table.
2589 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2591 * bfd.c (bfd_alt_mach_code): New function.
2592 * bfd-in2.h: Rebuilt.
2594 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2596 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2597 `type' field in the hash entry when deciding whether to follow a
2600 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2602 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2604 (elf_link_sort_relocs): Adjust accordingly.
2606 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2607 (elf64_alpha_check_relocs): Set it if section this reloc is against
2608 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2610 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2611 is is against read-only section.
2612 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2613 check section names.
2614 (elf64_alpha_reloc_type_class): New.
2615 (elf_backend_reloc_type_class): Define.
2617 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2619 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2622 2001-08-23 Andreas Jaeger <aj@suse.de>
2624 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2625 the reloc is against read-only section.
2626 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2627 of looking up section names for DT_TEXTREL.
2628 (elf64_x86_64_reloc_type_class): New.
2629 (elf_backend_reloc_type_class): Define.
2631 2001-08-23 H.J. Lu <hjl@gnu.org>
2633 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2634 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2636 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2637 bfd_print_symbol_vandf.
2638 * coffgen.c (coff_print_symbol): Likewise.
2639 * elf.c (bfd_elf_print_symbol): Likewise.
2640 * ieee.c (ieee_print_symbol): Likewise.
2641 * nlmcode.h (nlm_print_symbol): Likewise.
2642 * oasys.c (oasys_print_symbol): Likewise.
2643 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2644 * som.c (som_print_symbol): Likewise.
2645 * srec.c (srec_print_symbol): Likewise.
2646 * tekhex.c (tekhex_print_symbol): Likewise.
2647 * versados.c (versados_print_symbol): Likewise.
2648 * vms.c (vms_print_symbol): Likewise.
2650 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2651 with bfd_fprintf_vma.
2652 (bfd_elf_print_symbol): Likewise.
2653 * syms.c (bfd_print_symbol_vandf): Likewise.
2655 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2657 * aoutf1.h (sunos_write_object_contents): Silence compile time
2659 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2661 * bout.c: Add missing function prototypes. Fix formatting.
2662 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2663 * coff-w65.c: Add missing function prototypes. Fix formatting.
2664 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2665 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2666 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2667 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2668 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2669 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2670 * coff-sh.c: Add missing function prototypes. Fix formatting.
2672 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2674 * elf-bfd.h (enum elf_reloc_type_class): New.
2675 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2676 (_bfd_elf_reloc_type_class): New.
2677 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2678 (elfNN_bed): Add elf_backend_reloc_type_class.
2679 * elf.c (_bfd_elf_reloc_type_class): New.
2680 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2681 is against read-only section.
2682 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2683 looking up section names for DT_TEXTREL.
2684 (elf_i386_reloc_type_class): New.
2685 (elf_backend_reloc_type_class): Define.
2686 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2687 reloc is against read-only section.
2688 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2689 looking up section names for DT_TEXTREL.
2690 (elf32_sparc_reloc_type_class): New.
2691 (elf_backend_reloc_type_class): Define.
2692 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2693 reloc is against read-only section.
2694 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2695 looking up section names for DT_TEXTREL.
2696 (sparc64_elf_reloc_type_class): New.
2697 (elf_backend_reloc_type_class): Define.
2698 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2699 (elfNN_ia64_hash_table_create): Clear ia64_info.
2700 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2702 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2703 instead of looking up section names for DT_TEXTREL.
2704 (elfNN_ia64_reloc_type_class): New.
2705 (elf_backend_reloc_type_class): Define.
2706 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2707 (struct elf_link_sort_rela): New.
2708 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2709 (elf_bfd_final_link): Call elf_link_sort_relocs.
2710 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2713 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2715 * configure.in (x86-bsdi): No corefile support.
2716 * configure: Regenerate.
2718 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2720 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2723 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2725 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2726 the alignment of dwarf2 linkonce sections to 0.
2727 * coff-sto32.c: Likewise.
2729 2001-08-20 Andreas Jaeger <aj@suse.de>
2731 * coff-sparc.c: Add missing prototypes.
2732 * elf32-s390.c: Likewise.
2733 * elf32-i960.c: Likewise.
2734 * aout-target.h: Likewise.
2736 2001-08-20 H.J. Lu <hjl@gnu.org>
2738 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2739 (elf_num_section_syms): New for num_section_syms.
2741 * elf.c (elf_map_symbols): Set num_section_syms.
2742 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2743 the section symbol index.
2745 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2747 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2748 select the generic has table creator. All elf backends need elf
2749 specific fields in the hash table.
2751 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2753 * archive.c (offsetof): Remove define.
2756 * sysdep.h (offsetof): Define.
2758 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2760 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2761 (bfd_set_gp_size): Make param unsigned.
2762 * bfd-in2.h: Regenerate.
2763 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2764 than calling bfd_get_gp_size.
2765 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2766 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2768 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2770 * linker.c (default_fill_link_order): Handle four byte fill value.
2772 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2774 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2776 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2778 * elf64-mips.c (UNUSED_RELOC): Define.
2779 (mips_elf64_howto_table_rel): Use it.
2780 (mips_elf64_howto_table_rela): Here too.
2781 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2783 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2785 * coffgen.c (coff_print_symbol): Fix warnings.
2786 (coff_find_nearest_line): Likewise.
2787 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2788 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2789 * format.c (bfd_check_format_matches): Likewise.
2790 (bfd_set_format): Likewise.
2791 * coff-ia64.c: Add missing prototypes.
2792 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2793 signed to silence warnings.
2794 (elf64_alpha_relocate_section): Likewise.
2795 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2796 (elf64_alpha_add_symbol_hook): Likewise.
2797 (elf64_alpha_final_link): Likewise.
2798 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2799 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2800 (elf64_alpha_size_got_sections): Likewise.
2801 * elfxx-ia64.c: Add missing prototypes.
2802 (elfNN_ia64_relocate_section): Fix warning.
2803 (elfNN_ia64_unwind_entry_compare): Make params const.
2805 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2807 * config.bfd (targ64_selvecs): New.
2808 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2810 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2811 (BFD_DEFAULT_TARGET_SIZE): New.
2812 (BFD_ARCH_SIZE): Comment.
2813 * configure.in (target_size): New. Set instead of target64 in
2814 selvecs case statement. Set target64 from it.
2815 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2816 * bfd-in2.h: Regenerate.
2817 * configure: Regenerate.
2819 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2821 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2822 (bfd_errmsgs): Add corresponding message.
2823 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2824 finding an archive that contains different format object files.
2825 Return bfd_error_wrong_object_format for this case.
2826 * format.c: Formatting fixes. s/CONST/const/.
2827 (bfd_check_format_matches): Accept archives that give
2828 bfd_error_wrong_object_format if no full match is found. Tidy
2829 code handling matching_vector. Don't return a pointer to freed
2830 memory in `matching'. Handle ambiguous matches as for partial
2832 * bfd-in2.h: Regenerate.
2834 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2836 * libieee.h (common_header_type): Add last_byte field.
2838 * ieee.c: Add missing prototypes. Some format fixes.
2839 (struct output_buffer_struct): Move for availability to prototypes.
2840 (ieee_part_after): New function.
2841 (ieee_slurp_debug): Use it here.
2842 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2843 ieee_part_after to set last_byte to one past end of current part.
2845 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2847 (parse_expression): Don't go beyond the end of the current part.
2848 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2849 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2850 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2851 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2852 ieee_set_section_contents, ieee_write_object_contents,
2853 ieee_make_empty_symbol): Make static.
2854 (ieee_archive_p): Correct comments regarding bfd_read.
2855 (ieee_object_p): Similarly.
2856 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2857 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2858 input_bfd, output_bfd, output_buffer.
2859 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2860 do_with_relocs, ie. as a symbol for relocatable files.
2861 (ieee_vec): Add comments showing functions referenced by macros.
2863 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2865 * aout-tic30.c: Add missing prototypes. Fix formatting.
2866 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2867 * peXXigen.c: Add missining prototypes. Fix formatting.
2868 * aout-adobe.c: Add missining prototypes. Fix formatting.
2870 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2872 * elf32-v850.c: Add missing function prototypes.
2873 Fix some formatting.
2875 * cpu-v850.c: Add missing function prototype.
2876 Fix some formatting.
2878 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2880 * elf-bfd.h (struct elf_backend_data): Add new fields
2881 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2882 (bfd_elf_sprintf_vma): Rename function prototype to
2883 '_bfd_elf_sprintf_vma'.
2884 (bfd_elf_fprintf_vma): Rename function prototype to
2885 '_bfd_elf_fprintf_vma'.
2886 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2887 directly, instead indirect via the elf_backend_data structure.
2888 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2889 instead indirect via the elf_backend_data structure.
2890 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2891 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2892 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2894 (elf_backend_fprintf_vma): Initialise if not already defined.
2895 (struct elf_backend_data): Initialise the
2896 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2898 2001-08-10 Andreas Jaeger <aj@suse.de>
2900 * elf64-sparc.c: Add missing prototypes.
2901 * elf32-cris.c: Likewise.
2902 * elf32-i370.c: Likewise.
2903 * elf64-hppa.c: Likewise.
2904 * elf64-s390.c: Likewise.
2906 2001-08-10 Andreas Jaeger <aj@suse.de>
2908 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2909 Add prototypes where needed.
2911 2001-08-10 H.J. Lu <hjl@gnu.org>
2913 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2914 (bfd_fprintf_vma): Likewise.
2916 2001-08-10 H.J. Lu <hjl@gnu.org>
2918 * bfd.c (bfd_sprintf_vma): Don't return void.
2919 (bfd_fprintf_vma): Likewise.
2921 2001-08-10 Andreas Jaeger <aj@suse.de>
2923 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2925 * configure: Regenerate.
2927 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2929 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2930 warning if not BFD64. Add braces so emacs auto format works.
2931 (bfd_elf_fprintf_vma): Likewise.
2933 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2935 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2936 param to agree with libxcoff.h.
2937 (xcoff_swap_ldhdr_out): Likewise.
2938 (xcoff_swap_ldsym_in): Likewise.
2939 (xcoff_swap_ldsym_out): Likewise.
2940 (xcoff_swap_ldrel_in): Likewise.
2941 (xcoff_swap_ldrel_out): Likewise.
2942 (xcoff_create_csect_from_smclas): Likewise.
2943 * coff64-rs6000.c: Add missing prototypes.
2944 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2946 (xcoff64_swap_ldhdr_out): Likewise.
2947 (xcoff64_swap_ldsym_in): Likewise.
2948 (xcoff64_swap_ldsym_out): Likewise.
2949 (xcoff64_swap_ldrel_in): Likewise.
2950 (xcoff64_swap_ldrel_out): Likewise.
2951 (xcoff64_ppc_relocate_section): Make static.
2952 (xcoff64_slurp_armap): Likewise.
2953 (xcoff64_archive_p): Likewise.
2954 (xcoff64_openr_next_archived_file): Likewise.
2955 (xcoff64_sizeof_headers): Likewise.
2956 (xcoff64_is_lineno_count_overflow): Likewise.
2957 (xcoff64_is_reloc_count_overflow): Likewise.
2958 (xcoff64_loader_symbol_offset): Likewise.
2959 (xcoff64_loader_reloc_offset): Likewise.
2960 * elf64-gen.c: Add missing prototypes.
2962 2001-08-09 H.J. Lu <hjl@gnu.org>
2964 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2965 (bfd_elf_fprintf_vma): Likewise.
2967 2001-08-09 H.J. Lu <hjl@gnu.org>
2969 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2972 * bfd-in2.h: Regenerated.
2974 2001-08-09 H.J. Lu <hjl@gnu.org>
2976 * bfd-in.h (bfd_sprintf_vma): New prototype.
2977 (bfd_fprintf_vma): Likewise.
2978 (bfd_elf_sprintf_vma): Likewise.
2979 (bfd_elf_fprintf_vma): Likewise.
2980 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2981 * bfd-in2.h: Regenerated.
2983 * bfd.c (bfd_sprintf_vma): New. Defined.
2984 (bfd_fprintf_vma): Likewise.
2986 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2987 (bfd_elf_fprintf_vma): Likewise.
2989 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2991 * coff-rs6000.c: Add missing prototypes.
2992 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2993 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2994 xcoff_loader_reloc_offset): Make static.
2995 * dwarf1.c: Add missing prototypes.
2996 * dwarf2.c: Add missing prototypes.
2997 (struct abbrev_info): Move definition.
2998 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2999 * elf.c: Add missing prototypes.
3000 * elf32-gen.c: Likewise.
3001 * elf32-i386.c: Likewise.
3002 * elf32-ppc.c: Likewise.
3003 (ppc_elf_sort_rela): Use PTR instead of "void *".
3004 * elflink.h: Add missing prototypes. Formatting fixes.
3005 * merge.c: Add missing prototypes.
3006 (last4_eq): Use PTR instead of "void *".
3007 (last_eq): Likewise.
3008 * syms.c: Add missing prototypes.
3010 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3012 * bfd.c: Fix formatting.
3013 * bfd-in2.h: Regenerate.
3015 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
3017 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3018 true (this target uses REL relocations) and 'pcrel_offset' to
3019 false (the PC is implied, not stored in the offset).
3021 2001-08-08 Alan Modra <amodra@bigpond.net.au>
3023 1999-10-19 Linus Nordberg <linus@swox.se>
3024 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3025 * elfxx-target.h (elf_backend_want_got_sym): Define.
3026 (elfNN_bed): Add elf_backend_want_got_sym.
3027 * elflink.c (_bfd_elf_create_got_section): Define
3028 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3030 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
3032 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3033 (find_rela_addend): New function.
3034 (parse_comp_unit): Call it to find the abbrev offset addend.
3035 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3036 members of dwarf2_debug as debugging information is read.
3038 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
3040 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3041 targets as well as sh-pe.
3043 2001-08-03 Ben Harris <bjh21@netbsd.org>
3045 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3046 reloc from start of section when computing value for R_ARM_REL32
3049 2001-08-03 Alan Modra <amodra@bigpond.net.au>
3051 From H.J. Lu <hjl@gnu.org>
3052 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3053 keep relocs for undefined syms if there are no dynamic sections in
3055 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3057 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
3059 * cofflink.c (coff_link_check_ar_symbols): also search for
3060 __imp__symbol as well as _symbol.
3061 * linker.c (_bfd_generic_link_add_archive_symbols): also
3062 search for __imp__symbol as well as _symbol.
3064 2001-08-01 Adam Nemet <anemet@lnxw.com>
3066 * elf.c (elf_sort_sections): Return zero only as the last step.
3068 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3070 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3072 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3073 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3076 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3078 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3079 to match corresponding bfd_coff_backend data member.
3081 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3083 * Makefile.am: Update dependencies with "make dep-am".
3084 * Makefile.in: Regenerate
3086 2001-07-15 H.J. Lu <hjl@gnu.org>
3088 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3089 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3090 * Makefile.in: Regenerate.
3092 2001-07-11 H.J. Lu <hjl@gnu.org>
3094 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3095 flags when creating the reloc section if the ALLOC flag in the
3096 source section is set.
3098 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3100 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3101 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3102 * bfd-in2.h: Regenerate.
3103 * libbfd.h: Regenerate.
3104 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3106 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3107 (elfNN_ia64_check_relocs): Likewise.
3108 (elfNN_ia64_install_value): Likewise.
3109 (elfNN_ia64_relocate_section): Likewise.
3111 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3113 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3115 (elf32_sparc_check_relocs): Likewise.
3116 Only create .rela section for alloced sections in shared libraries.
3117 (elf32_sparc_relocate_section): Likewise.
3118 Remove redundant check.
3119 Optimize unaligned reloc usage.
3120 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3123 2001-07-11 H.J. Lu <hjl@gnu.org>
3125 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3126 ALLOC|LOAD flags as the source section for debugging sections
3127 when creating the reloc section.
3129 2001-07-05 Jim Wilson <wilson@redhat.com>
3131 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3132 the section of the bigger symbol.
3134 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3136 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3138 * peicode.h (coff_swap_scnhdr_in): For sections containing
3139 uninitialised data, only set their size to s_paddr if this does
3140 not reset their size to zero. MS's latest compilers will set
3143 2001-07-04 H.J. Lu <hjl@gnu.org>
3145 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3146 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3149 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3151 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3153 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3154 sections being discarded.
3156 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3158 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3159 instead of _bfd_elfcore_section_from_phdr.
3160 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3161 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3162 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3163 (elfcore_grok_prstatus): Likewise.
3164 (elfcore_grok_lwpstatus): Likewise.
3165 (bfd_get_elf_phdr_upper_bound): Likewise.
3166 (elfcore_make_note_pseudosection): Formatting.
3167 (_bfd_elfcore_strndup): Formatting.
3168 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3169 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3171 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3173 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3174 and _bfd_elfcore_strndup.
3175 (struct elf_backend_data): Add elf_backend_grok_prstatus
3176 and elf_backend_grok_psinfo.
3177 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3178 (elfcore_grok_prstatus): Use it.
3179 (elfcore_make_note_pseudosection): Likewise.
3180 (elfcore_strndup): Rename to...
3181 (_bfd_elfcore_strndup): Here, and make global.
3182 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3183 (elfcore_grok_note): Call elf_backend_grok_prstatus
3184 and elf_backend_grok_psinfo if available.
3185 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3186 (_bfd_elf32_mips_grok_psinfo): New function.
3187 (elf_backend_grok_prstatus): Define.
3188 (elf_backend_grok_psinfo): Define.
3189 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3190 (elf_backend_grok_psinfo): Likewise.
3191 (elfNN_bed): Include elf_backend_grok_prstatus and
3192 elf_backend_grok_psinfo.
3194 2001-06-29 H.J. Lu <hjl@gnu.org>
3196 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3197 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3198 is NULL before filling PLT.
3200 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3202 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3204 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3206 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3208 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3209 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3212 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3213 (IS_ABSOLUTE_RELOC): Define.
3214 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3215 (hppa_link_hash_newfunc): Always init it.
3216 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3217 create COPY relocs only when the reloc is in a read-only section.
3218 Instead, allocate space for a dynamic reloc to reference the
3219 library symbol directly. Keep track of space we allocate using
3221 (hppa_discard_copies): Delete, and move code to..
3222 (allocate_plt_and_got): ..here. Rename to
3223 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3224 relocs for non-shared link.
3225 (elf32_hppa_size_dynamic_sections): Update calls to above.
3226 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3227 in lieu of COPY relocs.
3229 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3231 (elf_i386_adjust_dynamic_symbol): ..nor here..
3232 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3234 (elf_i386_size_dynamic_sections): Fix a comment.
3235 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3236 involved in writing reloc out.
3238 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3240 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3241 Ensure syms are dynamic if we might be emitting a reloc.
3242 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3243 for undefweak or undefined syms..
3244 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3246 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3247 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3248 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3249 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3251 2001-06-24 H.J. Lu <hjl@gnu.org>
3253 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3254 strncasecmp/strcasecmp instead of strncmp/strcmp.
3256 2001-06-23 H.J. Lu <hjl@gnu.org>
3258 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3259 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3260 in the regular object file and treat the weak definition as
3263 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3265 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3266 unresolved_reloc test to exclude cases where we use "relocation"
3267 before setting it to point into the .got. Reinstate fudge for
3268 unresolved relocs in debugging sections.
3270 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3271 complicated tests for unresolvable relocs with a simple direct
3272 scheme using "unresolved_reloc" var.
3274 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3275 elf_i386_dyn_relocs. Update comment.
3276 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3278 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3280 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3282 (elf_i386_size_dynamic_sections): Likewise.
3283 (elf_i386_finish_dynamic_symbol): Likewise.
3284 (elf_i386_finish_dynamic_sections): Likewise.
3285 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3288 Avoid creating COPY relocs if possible.
3289 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3290 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3291 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3292 reloc is in a read-only section. Instead, allocate space for a
3293 dynamic reloc to reference the library symbol directly. Keep
3294 track of space we allocate using pcrel_relocs_copied.
3295 (discard_copies): Delete, and move code to ..
3296 (allocate_plt_and_got): ..here. Rename to
3297 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3298 relocs for non-shared link.
3299 (elf_i386_size_dynamic_sections): Update calls to above functions.
3300 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3301 more ugly logic to avoid "unresolvable relocation" error. Use
3302 htab shortcut in place of elf_hash_table macro.
3303 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3304 not always be created now.
3306 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3308 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3311 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3313 * configure.host (mips64-*-linux): Reformat.
3315 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3317 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3318 allocate local .got space. Use shortcuts from hash table for .got
3319 and .plt rather than comparing section names.
3320 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3321 adjusting index into local_got_refcounts to document what we are
3323 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3324 Tidy .got and .plt error checking.
3326 2001-06-20 Catherine Moore <clm@redhat.com>
3328 * elf-bfd.h (struct elf_backend_data):
3329 elf_backend_emit_relocs: New field: Function for emitting
3331 elf_backend_count_relocs: New field: Function for determining
3332 the number of relocs to be emitted.
3333 * elfxx-target.h: Provide default (NULL) values for
3334 elf_backend_emit_relocs and elf_backend_count_relocs.
3335 * elflink.h (elf_link_size_reloc_section): Make the hash table
3336 big enough to hold the relocs counted by either reloc_count or
3338 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3339 should be emitted, either because of a command line option
3340 stored in the info structure or because the target provides a
3341 special reloc emitting function.
3342 If the target provides a reloc counting function use it,
3343 unless performing a relocatable link or emitting all relocs.
3344 Also set the SEC_RELOC flag on any output section which will
3346 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3347 should be emitted, either because of a command line option
3348 stored in the info structure or because the target provides a
3349 special reloc emitting function.
3350 If the target provides a reloc emitting function, use it,
3351 unless performing a relocatable link or emitting all relocs.
3353 2001-06-20 H.J. Lu <hjl@gnu.org>
3355 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3356 allocate local .got space.
3358 2001-06-19 Andreas Jaeger <aj@suse.de>
3360 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3363 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3365 * elflink.h (struct elf_assign_sym_version_info): Remove member
3366 export_dynamic. All users changed to use info member.
3367 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3368 export_dynamic, instead use member in parameter info.
3369 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3370 bfd_elf64_size_dynamic_sections): Update prototype.
3371 * bfd-in2.h: Regenerate.
3373 2001-06-18 H.J. Lu <hjl@gnu.org>
3375 * elflink.h (elf_info_failed): Add a new field, verdefs.
3376 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3378 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3381 2001-06-17 H.J. Lu <hjl@gnu.org>
3383 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3384 readonly_reloc, to record if a relocation in the .rel.dyn
3385 section is against a read-only section.
3386 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3388 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3389 in the .rel.dyn section against a read-only section by setting
3390 DF_TEXTREL or readonly_reloc.
3391 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3393 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3394 there is a relocation in the .rel.dyn section against a
3396 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3399 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3401 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3402 function. Move flagword result into parameter list. Remove
3403 comment about setting bfd_error_handler to intercept failure
3405 * coffgen.c (make_a_section_from_file): Examine result of
3406 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3408 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3409 function. Move flagword result into parameter list.
3410 * libcoff.h: Regenerate.
3411 * libecoff.h: Regenerate.
3413 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3415 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3416 section is going to follow it.
3418 2001-06-12 Catherine Moore <clm@redhat.com>
3420 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3421 with the file_align entry from elf_backend_data.
3422 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3423 (elf_gc_record_vtentry): Likewise.
3425 2001-06-10 Alan Modra <amodra@bigpond.net.au>
3427 * elflink.h: Whitespace changes.
3428 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3429 rather than "unsigned char".
3430 (elf_link_output_relocs): Likewise.
3431 (elf_link_input_bfd): Likewise.
3432 (elf_reloc_link_order): LIkewise.
3433 * elf.c: s/CONST/const/. Whitespace changes.
3434 * elf32-mips.c: Formatting fix.
3436 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3437 * Makefile.in: Regenerate.
3438 * po/Make-in: Remove trailing tab.
3440 2001-06-09 Philip Blundell <philb@gnu.org>
3442 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3444 (elf32_arm_plt_entry): Likewise.
3446 2001-06-08 H.J. Lu <hjl@gnu.org>
3448 * elf.c (swap_out_syms): Keep names for global section symbols.
3450 2001-06-07 H.J. Lu <hjl@gnu.org>
3452 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3453 MIPS-based machines need it.
3455 2001-06-07 H.J. Lu <hjl@gnu.org>
3457 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3460 * config.bfd: Remove ecoff from Linux/mips.
3462 2001-06-07 Andreas Jaeger <aj@suse.de>
3464 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3466 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3467 alignment of 8 for .rela sections; handle further relocations.
3469 2001-06-06 Christian Groessler <cpg@aladdin.de>
3471 * coff-z8k.c: Fix formatting.
3472 Fix howtos: howto->size was always 1.
3474 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3476 * configure.host (mips64*-*-linux*): Define.
3478 2001-06-05 Alan Modra <amodra@bigpond.net.au>
3480 * elf32-i386.c (elf_i386_discard_copies): Rename to
3481 discard_copies, and use elf_link_hash_entry arg rather than
3482 elf_i386_link_hash_entry.
3483 (elf_i386_link_hash_traverse): Delete.
3484 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3485 Tidy sizing of dynamic sections.
3486 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3487 possible .plt entries.
3488 (elf_i386_gc_sweep_hook): Likewise.
3489 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3490 everything with plt.refcount <= 0.
3492 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3494 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3495 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3497 (allocate_plt_and_got): ..instead do it all here. New function.
3498 (elf_i386_size_dynamic_sections): Allocate local .got space and
3499 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3500 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3501 rather than gc variety).
3502 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3503 (elf_i386_relocate_section): Use it here and correct handling of
3504 R_386_GOT32. Provide section and offset for "unresolvable
3505 relocation" error message.
3506 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3508 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3509 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3510 (elf_i386_link_hash_table_create): Init them.
3511 (create_got_section): New function.
3512 (elf_i386_create_dynamic_sections): New function.
3513 (elf_backend_create_dynamic_sections): Set to above.
3514 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3515 calling bfd_get_section_by_name.
3516 (elf_i386_gc_sweep_hook): Likewise.
3517 (elf_i386_adjust_dynamic_symbol): Likewise.
3518 (elf_i386_size_dynamic_sections): Likewise.
3519 (elf_i386_relocate_section): Likewise.
3520 (elf_i386_finish_dynamic_sections): Likewise.
3522 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3524 2001-06-02 H.J. Lu <hjl@gnu.org>
3526 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3528 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3530 2001-06-02 H.J. Lu <hjl@gnu.org>
3532 * aout-cris.c (MACHTYPE_OK): New. Defined.
3534 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
3536 * section.c (_bfd_strip_section_from_output): Handle NULL
3539 2001-06-02 H.J. Lu <hjl@gnu.org>
3541 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3542 rs6000coff64_vec only if BFD64 is defined.
3543 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3545 2001-06-02 H.J. Lu <hjl@gnu.org>
3547 * coff-ia64.c (ia64coff_object_p): Rewrite with
3548 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3550 2001-06-01 Andreas Jaeger <aj@suse.de>
3552 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3553 relocation, small reformatting.
3555 2001-05-29 Andreas Jaeger <aj@suse.de>
3557 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3558 (elf64_x86_64_relocate_section): Likewise.
3560 2001-05-30 Alan Modra <amodra@one.net.au>
3562 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3563 millicode. Don't allocate .got and .rela.got space here..
3564 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3565 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3567 (hppa_handle_PIC_calls): ..nor here..
3568 (allocate_plt_and_got): ..instead do it all here. New function.
3569 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3570 call allocate_plt_and_got. No need to zap .got if not dynamic.
3571 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3572 gc_common_final_link.
3573 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3574 (elf32_hppa_relocate_section): Use it here.
3575 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3576 dynamic_sections_created.
3577 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3579 2001-05-28 Andreas Jaeger <aj@suse.de>
3581 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3582 generic version since we want a hashsize of 4.
3583 (elf_backend_size_info): Likewise.
3585 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3587 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3589 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3590 (elf_link_input_bfd): Likewise.
3591 (elf_reloc_link_order): Likewise.
3592 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3593 relocations correctly.
3595 2001-05-28 Nicolas Pitre <nico@cam.org>
3597 * elf32-arm.h: fix PLT generation for big endian ARM
3599 2001-05-28 Alan Modra <amodra@one.net.au>
3601 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3602 for symbols forced local that need plabels.
3603 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3604 .plt.rela for local syms if non-shared.
3605 (hppa_build_one_stub): Mask lsb of plt.offset.
3606 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3607 (clobber_millicode_symbols): Correct comment.
3608 (elf32_hppa_relocate_section): Likewise.
3609 (elf32_hppa_finish_dynamic_symbol): Likewise.
3611 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3613 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3614 * bfd-in2.h: Regenerate.
3615 * libbfd.h: Regenerate.
3616 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3617 and BFD_RELOC_SPARC_UA64 mapping
3618 * elf64-sparc.c: Likewise.
3620 2001-05-25 H.J. Lu <hjl@gnu.org>
3622 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3623 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3624 (coff-rs6000.lo): Remove the old dependency.
3625 * Makefile.in: Rebuild.
3627 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3630 2001-05-25 H.J. Lu <hjl@gnu.org>
3632 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3633 rs6000coff_core_file_matches_executable_p,
3634 rs6000coff_core_file_failing_command and
3635 rs6000coff_core_file_failing_signal only if AIX_CORE is
3637 (pmac_xcoff_vec): Likewise.
3638 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3640 2001-05-25 Timothy Wall <twall@redhat.com>
3642 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3643 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3645 2001-05-25 H.J. Lu <hjl@gnu.org>
3647 * bfd-in2.h: Regenerated.
3648 * libcoff.h: Likewise.
3650 2001-05-25 Alan Modra <amodra@one.net.au>
3652 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3653 undefined millicode syms in shared libs.
3654 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3655 (elf32_hppa_check_relocs): Likewise.
3656 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3657 (elf32_hppa_size_dynamic_sections): Likewise.
3658 (elf32_hppa_relocate_section): Likewise.
3659 (elf32_hppa_finish_dynamic_symbol): Likewise.
3660 (elf32_hppa_finish_dynamic_sections): Likewise.
3662 2001-05-24 Tom Rix <trix@redhat.com>
3664 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3665 xcoff-target.h not used to define rs6000 or ppc bfd.
3668 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3671 * coff-rs6000.c : Many changes for 64 bit support. Move common
3672 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3675 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3676 linker now supported. Explictly define the rs6000coff64_vec.
3678 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3679 (coff_print_aux) same
3680 (coff_write_object_contents) same
3681 (coff_slurp_line_table) same
3683 * coffgen.c : (coff_fix_symbol_name) formatting
3684 (coff_mangle_symbols) xcoff 64 bit support
3685 (coff_write_symbol) same
3686 (coff_write_alien_symbol) same
3687 (coff_write_native_symbol) same
3688 (coff_write_symbols) same
3689 (coff_get_symbol_info) same
3690 (bfd_coff_get_syment) same
3691 (coff_print_symbol) same
3693 * config.bfd : add powerpc64-*-aix* target
3695 * libcoff-in.h : formatting
3697 * libcoff.h : move xcoff extern declarations to libxcoff.h
3699 * libxcoff.h : New file
3701 * xcofflink.c : Many changes for xcoff64 support. Move common
3702 structures to include/coff/xcoff.h. Move specific structure to
3703 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3704 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3706 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3709 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3711 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3713 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3716 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3718 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3719 * libbfd.h: Regenerate.
3720 * bfd-in2.h: Regenerate.
3722 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3723 * archures.c (bfd_mach_mips12000): Define.
3724 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3725 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3727 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3728 * bfd-in2.h: Regenerate.
3729 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3731 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3733 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3734 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3735 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3736 that is used by GCC.
3738 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3740 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3741 of entries in a structured section.
3742 * elf.c: Use new macro.
3743 * elf32-i386.c: Use new macro.
3744 * elf32-mips.c: Use new macro.
3745 * elf64-alpha.c: Use new macro.
3746 * elf64-sparc.c: Use new macro.
3747 * elfcode.h: Use new macro.
3748 * elflink.h: Use new macro.
3750 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3752 * bfdint.texi: Replace -oformat with --oformat.
3754 2001-05-21 Andreas Jaeger <aj@suse.de>
3756 * dwarf2.c (decode_line_info): Fix error message.
3757 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3758 adjust error message.
3760 2001-05-18 H.J. Lu <hjl@gnu.org>
3762 * elflink.h (elf_link_add_object_symbols): Revert the last
3765 2001-05-17 Alan Modra <amodra@one.net.au>
3767 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3768 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3769 (hppa_build_one_stub): Add an assert to check plt.offset.
3771 2001-05-17 H.J. Lu <hjl@gnu.org>
3773 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3774 version definition to basename of the output filename.
3776 2001-05-17 H.J. Lu <hjl@gnu.org>
3778 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3779 basename of the bfd filename.
3781 2001-05-16 Alan Modra <amodra@one.net.au>
3783 * section.c (asection): Add linker_has_input field.
3784 (STD_SECTION): Adjust initialization to suit.
3785 * ecoff.c (bfd_debug_section): Likewise.
3786 * bfd-in2.h: Regenerate.
3788 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3790 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3791 negative 32-bit operands to 16 operands when the operand is
3792 going to be zero-extended by the modified opcode.
3794 2001-05-12 Peter Targett <peter.targett@arccores.com>
3796 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3797 name for 'arc5' core versions.
3798 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3800 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3802 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3804 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3806 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3808 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3809 to .gnu.linkonce.t.FOO text section.
3811 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3813 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3814 fields, change sec into secinfo.
3815 (struct sec_merge_info): Add chain, remove last fields.
3816 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3817 (sec_merge_hash_lookup): If lookup could not use a string only
3818 because it has bad alignment, mark the old string for deletion.
3819 (sec_merge_add): Add secinfo argument. Don't compute entry's
3820 position, instead record the section.
3821 (sec_merge_emit): Update for the sec into secinfo change in
3822 struct sec_merge_hash_entry.
3823 (_bfd_merge_section): Only record the section for merging, defer
3824 putting strings into the hash table.
3825 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3826 _bfd_merge_sections): New functions.
3827 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3829 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3830 (_bfd_nolink_bfd_merge_sections): Define.
3831 * libbfd.h: Likewise.
3832 (bfd_generic_merge_sections): Add prototype.
3833 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3834 (struct bfd_target): Likewise.
3835 * bfd.c (bfd_merge_sections): Define.
3836 * bfd-in2.h: Rebuilt.
3837 * elf.c (_bfd_elf_merge_sections): New function.
3838 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3839 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3840 * reloc.c (bfd_generic_merge_sections): New function.
3841 * vms.c (vms_bfd_merge_sections): New function.
3842 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3843 * aout-target.h (MY_bfd_merge_sections): Define.
3844 * aout-tic30.c (MY_bfd_merge_sections): Define.
3845 * binary.c (binary_bfd_merge_sections): Define.
3846 * bout.c (b_out_bfd_merge_sections): Define.
3847 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3848 * coffcode.c (coff_bfd_merge_sections): Define.
3849 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3850 * i386msdos.c (msdos_bfd_merge_sections): Define.
3851 * i386os9k.c (os9k_bfd_merge_sections): Define.
3852 * ieee.c (ieee_bfd_merge_sections): Define.
3853 * ihex.c (ihex_bfd_merge_sections): Define.
3854 * nlm-target.h (nlm_bfd_merge_sections): Define.
3855 * oasys.c (oasys_bfd_merge_sections): Define.
3856 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3857 * som.c (som_bfd_merge_sections): Define.
3858 * srec.c (srec_bfd_merge_sections): Define.
3859 * tekhex.c (tekhex_bfd_merge_sections): Define.
3860 * versados.c (versados_bfd_merge_sections): Define.
3861 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3863 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3865 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3866 to be unsigned long, in order to match its use.
3868 2001-05-10 H.J. Lu <hjl@gnu.org>
3870 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3873 2001-05-09 H.J. Lu <hjl@gnu.org>
3875 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3876 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3877 Remove the unused veriable `dynver'.
3879 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3881 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3882 NULL or is not COFF.
3883 (coff_i386_rtype_to_howto): Don't dump core if output section
3886 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3888 * ecoff.c (bfd_debug_section): Fix initialization.
3889 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3890 is always a positive integer. Cast away sign mismatch.
3891 * elf32-mips.c: Fix misleading comment and typo.
3892 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3894 * elflink.c: Fix typo.
3895 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3896 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3898 2001-05-04 Richard Henderson <rth@redhat.com>
3900 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3902 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3904 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3905 EF_ARM_HASENTRY if the start address is set.
3907 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3909 * targets.c (_bfd_target_vector_entries): Compute value based on
3910 the size of the _bfd_target_vector and not bfd_target_vector.
3912 2001-05-03 H.J. Lu <hjl@gnu.org>
3914 * elfcode.h: Include "libiberty.h".
3916 * elflink.h (elf_link_add_object_symbols): Set
3917 elf_dt_name (abfd) to basename of the bfd filename.
3918 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3919 of the bfd filename.
3921 2001-05-03 Andreas Jaeger <aj@suse.de>
3923 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3924 (elf_generic_info_to_howto_rel): Likewise.
3925 * coff-alpha.c (reloc_nil): Likewise.
3926 (alpha_ecoff_bad_format_hook): Likewise.
3927 (alpha_adjust_reloc_out): Likewise.
3928 (alpha_bfd_reloc_type_lookup): Likewise.
3929 (alpha_convert_external_reloc): Likewise.
3930 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3931 (elf64_alpha_reloc_bad): Likewise.
3932 (elf64_alpha_reloc_gpdisp): Likewise.
3933 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3934 (elf64_alpha_info_to_howto): Likewise.
3935 (elf64_alpha_add_symbol_hook): Likewise.
3936 (elf64_alpha_create_got_section): Likewise.
3937 (elf64_alpha_is_local_label_name): Likewise.
3938 (elf64_alpha_merge_ind_symbols): Likewise.
3939 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3940 (mips_elf64_get_reloc_upper_bound): Likewise.
3941 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3942 (nlm_alpha_get_public_offset): Likewise.
3944 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3946 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3947 about overflow in R_OPENRISC_LO_16_IN_INSN and
3948 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3950 2001-04-30 H.J. Lu <hjl@gnu.org>
3952 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3953 only for ELF_LINK_FORCED_LOCAL.
3954 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3955 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3956 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3958 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3959 if the symbol has hidden or internal visibility.
3961 2001-04-30 Alan Modra <amodra@one.net.au>
3963 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3964 calls to undefined weak symbols.
3966 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3968 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3969 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3971 2001-04-27 Andreas Jaeger <aj@suse.de>
3973 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3974 out handled entries.
3975 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3976 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3977 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3980 2001-04-27 Sean McNeil <sean@mcneil.com>
3982 * config.bfd: Add arm-vxworks target.
3983 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3984 addend (fro VXworks targets).
3986 2001-04-26 H.J. Lu <hjl@gnu.org>
3988 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3991 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3993 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3994 * bfd-in2.h: Regenerated.
3996 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3998 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3999 (struct sec_merge_hash): Remove alignment_power.
4000 (sec_merge_hash_newfunc): Clear alignment.
4001 (sec_merge_hash_lookup): Pass alignment as argument.
4002 Use hashp->root.next, not hashp->next to walk the hash chain.
4003 If a string already in the hashtable does not have required
4004 alignment, create a new hashtable entry.
4005 (sec_merge_init): Remove alignment_power argument.
4006 (sec_merge_add): Add alignment argument.
4007 (sec_merge_emit): Alignment is now a per-entity thing, not per
4009 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4010 for proper alignment.
4011 Pass alignment information to sec_merge_add.
4013 2001-04-24 Christian Groessler <cpg@aladdin.de>
4015 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4016 and R_REL16 reloc types; accept odd values for R_REL16 type
4018 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
4020 * cpu-openrisc.c: New file.
4021 * elf32-openrisc.c: Likewise.
4023 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4024 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4025 (BFD32_BACKENDS): Add elf32-openrisc.lo.
4026 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4027 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4028 * Makefile.in: Regenerated.
4029 * config.bfd: (openrisc-*-elf): New target.
4030 * configure.in (bfd_elf32_openrisc_vec): New vector.
4031 * configure: Regenerated.
4032 * libbfd.h: Regenerated.
4033 * bfd-in2.h: Regenerated.
4034 * reloc.c: Add OpenRISC relocations.
4035 * targets.c (bfd_elf32_openrisc_vec): Declare.
4036 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4037 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4038 (bfd_openrisc_arch): Declare.
4039 (bfd_archures_list): Add bfd_openrisc_arch.
4040 * elf.c (prep_headers): Add bfd_arch_openrisc.
4042 2001-04-23 Bo Thorsen <bo@suse.de>
4044 * elf64-x86-64.c: Add c++ vtable hack.
4045 Small whitespace and comment changes.
4047 2001-04-19 Andreas Jaeger <aj@suse.de>
4049 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4050 (elf64_x86_64_plt_entry): Likewise.
4051 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4052 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4054 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
4056 * elf32-cris.c: Tweak comments related to dynamic linking.
4057 (cris_elf_relocate_section): When not creating shared object, fill
4058 in the .got table for any symbol not in the dynamic symbol table.
4059 (elf_cris_finish_dynamic_symbol): When not creating shared object,
4060 only emit a .got.rela reloc if the symbol is in the dynamic symbol
4062 (cris_elf_check_relocs): Use variable r_type in all places rather
4063 than the original expression. Add default case in switch for
4065 (elf_cris_size_dynamic_sections): Iterate over
4066 elf_cris_discard_excess_program_dynamics when not creating shared
4068 (elf_cris_discard_excess_dso_dynamics): Renamed from
4069 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4070 (elf_cris_discard_excess_program_dynamics): New.
4072 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4074 * coffcode.h (coff_write_object_contents): Use
4075 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4077 2001-04-14 H.J. Lu <hjl@gnu.org>
4079 * bfd-in2.h: Regenerate.
4081 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4083 * section.c (STD_SECTION): Add entsize.
4085 2001-04-13 H.J. Lu <hjl@gnu.org>
4087 * section.c (SEC_MERGE): Define new flag for merging.
4088 (SEC_STRINGS): Likewise.
4089 (entsize): New field.
4091 2001-04-13 Roger Sayle <roger@metaphorics.com>
4093 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4094 flag on pe-i386 targets.
4096 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4098 * libbfd-in.h (_bfd_merge_section): New.
4099 (_bfd_write_merged_section): New.
4100 (_bfd_merged_section_offset): New.
4101 * libbfd.h: Rebuilt.
4102 * linker.c (_bfd_generic_link_output_symbols): Handle
4104 * aoutx.h (aout_link_write_symbols): Likewise.
4105 * pdp11.c (aout_link_write_symbols): Likewise.
4106 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4107 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4109 (elf_link_sec_merge_syms): New.
4110 (elf_link_input_bfd): Call _bfd_merged_section_offset
4111 and _bfd_write_merged_section.
4112 Handle discard_sec_merge.
4113 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4115 (struct bfd_elf_section_data): Likewise.
4116 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4117 SEC_STRINGS section flags and entsize from their ELF counterparts.
4118 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4119 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4120 from their BFD counterparts.
4121 * merge.c: New file.
4122 * Makefile.am: Add strtab.lo.
4123 * Makefile.in: Rebuilt.
4125 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4127 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4128 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4130 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4132 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4133 endian MIPS ELF target.
4134 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4137 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4138 64bit big endian MIPS ELF target.
4139 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4140 endian MIPS ELF target.
4141 * configure: Regenerated.
4143 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4144 little endian targets.
4145 (mips_elf_sym_is_global): Handle traditional targets.
4147 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4148 64bit big endian MIPS ELF target.
4149 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4150 endian MIPS ELF target.
4152 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4153 and bfd_elf64_tradlittlemips_vec.
4155 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4157 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4158 ordinary "progbits" section.
4160 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4162 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4163 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4165 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4167 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4169 2001-03-30 H.J. Lu <hjl@gnu.org>
4171 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4172 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4174 2001-03-26 H.J. Lu <hjl@gnu.org>
4176 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4177 if there are any relocations for generic ELF.
4178 (bfd_elf32_bfd_link_add_symbols): Defined to
4179 elf32_generic_link_add_symbols.
4180 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4181 if there are any relocations for generic ELF.
4182 (bfd_elf64_bfd_link_add_symbols): Defined to
4183 elf64_generic_link_add_symbols.
4185 2001-03-23 Nick Clifton <nickc@redhat.com>
4187 * Makefile.am (BUILD_CFILES): New variable: List of C source
4188 files created in build directory.
4189 (BUILD_HFILES): New variable: List of header files created in
4192 (po/POTFILES.in): Replace rule with empty entry.
4193 (po/SRC-POTFILES.in): New rule: Create a list of source files
4194 in the source directory.
4195 (po/BLD-POTFILES.in): New rule: Create a list of source files
4196 in the build directory.
4197 (MOSTLYCLEAN): Do not delete source files created in build
4199 * Makefile.in: Regenerate.
4200 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4202 * configure: Regenerate.
4204 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4206 Add .. to the search path when building bfd.pot.
4207 Delete POTFILES when performing distclean.
4208 Add comment describing why distclean is broken in maintainer mode.
4209 * po/POTFILES.in: Delete.
4210 * po/SRC-POTFILES.in: New file.
4211 * po/BLD-POTFILES.in: New file.
4212 * po/bfd.pot: Regenerate.
4214 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4216 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4217 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4218 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4219 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4220 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4221 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4223 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4224 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4225 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4226 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4227 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4228 New HOWTO members for new relocs.
4229 (cris_reloc_map): Map new relocs.
4230 (ELF_DYNAMIC_INTERPRETER): Define.
4231 (PLT_ENTRY_SIZE): Define.
4232 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4233 elf_cris_pic_plt_entry): New, PLT templates.
4234 (struct elf_cris_pcrel_relocs_copied, struct
4235 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4236 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4237 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4238 positive values. Adjust PCREL relocs to be relative to location
4240 (cris_elf_relocate_section): Handle relocations to dynamic
4241 objects. Handle new relocations. Call error handler when seeing
4242 non-PIC relocation for read-only sections while generating shared
4244 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4246 (bfd_elf32_bfd_link_hash_table_create,
4247 elf_backend_adjust_dynamic_symbol,
4248 elf_backend_size_dynamic_sections,
4249 elf_backend_finish_dynamic_symbol,
4250 elf_backend_finish_dynamic_sections,
4251 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4252 elf_backend_hide_symbol, elf_backend_want_got_plt,
4253 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4254 elf_backend_got_header_size, elf_backend_plt_header_size):
4257 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4258 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4259 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4260 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4261 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4262 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4263 * bfd-in2.h, libbfd.h: Regenerate.
4265 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4267 (_bfd_mips_elf_relocate_section): Give a better error message when
4268 a relocation is not recognized.
4270 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4272 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4273 non-NULL before attempting to dereference.
4275 2001-03-20 H.J. Lu <hjl@gnu.org>
4277 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4278 * configure: Rebuild.
4280 2001-03-20 Andreas Schwab <schwab@suse.de>
4282 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4283 relocation value when resolving a reference from a debugging
4286 2001-03-16 Scott Thomason <SThomaso@hii.com>
4288 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4289 (xcoff64_swap_sym_out): Fix syntax errors.
4291 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4293 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4295 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4297 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4298 (hppa_link_hash_newfunc): Init it.
4299 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4300 section appears to be non-PIC.
4301 (final_link_relocate): Likewise.
4302 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4303 possible candidate function, and set pic_call for those that will
4304 only have a .plt entry for the PIC call stub.
4305 (hppa_handle_PIC_calls): Set maybe_pic_call.
4307 2001-03-12 DJ Delorie <dj@redhat.com>
4309 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4310 R_SH_DIR8WP* relocs if they're against external symbols, else
4311 they're just for relaxing. Validate the reloc values.
4313 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4315 * binary.c (bfd_external_binary_architecture): Declare.
4316 (binary_object_p): If bfd_external_binary_architecture is defined,
4317 set the architecture to this string.
4319 2001-03-11 Philip Blundell <philb@gnu.org>
4321 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4322 entries that could serve as a definition for a weak symbol.
4324 2001-03-08 Nick Clifton <nickc@redhat.com>
4326 * Most files: Update copyright notices using Perl script created
4327 by Kevin Buettner <kevinb@redhat.com>.
4329 2001-03-07 Nick Clifton <nickc@redhat.com>
4331 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4332 prior patch on ! defined OLD_ARM_ABI.
4334 2001-03-07 Andreas Jaeger <aj@suse.de>
4336 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4337 some relocation values.
4339 2001-03-06 Nick Clifton <nickc@redhat.com>
4341 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4342 of offset in BLX(1) instruction.
4343 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4344 offset in BLX(1) instruction.
4347 2001-03-06 Nick Clifton <nickc@redhat.com>
4349 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4350 BFD_RELOC_THUMB_PCREL_BLX.
4352 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4354 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4355 * bfd-in2.h: Regenerate.
4356 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4357 * ieee.c (ieee_write_processor): Set proper id for
4360 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4362 * configure.in: Add s390 target.
4363 * configure: Regenerate.
4365 2001-02-28 Andreas Jaeger <aj@suse.de>
4367 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4370 2001-02-28 Philip Blundell <pb@futuretv.com>
4372 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4373 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4375 2001-02-27 H.J. Lu <hjl@gnu.org>
4377 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4378 abfd->tdata.aout_data == NULL.
4380 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4382 * elf32-hppa.c: Correct field selector in stub comments.
4383 (clobber_millicode_symbols): Formatting fix.
4385 * configure.in: Bump version to 2.11.90.
4386 * configure: Regenerate.
4387 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4388 (CFILES): $SOURCE_CFILES + generated C files.
4389 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4391 * Makefile.in: Regenerate.
4392 * doc/Makefile.in: This too.
4394 2001-02-26 Timothy Wall <twall@cygnus.com>
4396 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4399 2001-02-26 Nick Clifton <nickc@redhat.com>
4401 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4402 up, replacing multiple if statements with a switch.
4403 (handle_COMDAT): New function.
4405 2001-02-26 H.J. Lu <hjl@gnu.org>
4407 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4408 a warning for section flags we do not handle instead of
4411 2001-02-26 Andreas Jaeger <aj@suse.de>
4413 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4415 2001-02-22 Timothy Wall <twall@cygnus.com>
4417 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4418 * configure.in: Add objects for elf64_ia64_aix vectors.
4419 * configure: Regenerated.
4420 * configure.host: Recognize ia64-*-aix*.
4421 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4422 for AIX. AIX5 requires most relocations to be dynamic (*all*
4423 binaries are somewhat similar to shared libraries).
4424 * targets.c: Add elf64_ia64_aix vectors.
4426 2001-02-21 David Mosberger <davidm@hpl.hp.com>
4428 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4429 C8 said "1" instead of "8". Clarify error string for IMM22:
4430 "signed integer" instead of just "integer".
4432 2001-02-20 Andreas Jaeger <aj@suse.de>
4434 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4435 PLT entries that could serve as a definition for a weak symbol.
4437 2001-02-19 Jakub Jelinek <jakub@redhat.com>
4439 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4440 entries that could serve as a definition for a weak symbol.
4441 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4443 2001-02-18 David O'Brien <obrien@FreeBSD>
4445 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4446 FreeBSD/i386-CURRENT differently until I can figure out the needed
4448 * configure: Regenerate.
4449 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4450 FreeBSD/PowerPC, and FreeBSD/sparc64.
4452 2001-02-18 lars brinkhoff <lars@nocrew.org>
4454 * Makefile.am: Add PDP-11 a.out target.
4455 * config.bfd: Likewise.
4456 * configure.in: Likewise.
4457 * targets.c: Likewise.
4458 * archures.c: Likewise.
4459 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4460 * libbfd.h: Add PDP-11 relocations.
4461 * reloc.c: Likewise.
4462 * cpu-pdp11.c: New file.
4463 * pdp11.c: New file.
4465 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4466 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4467 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4468 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4469 (GET_MAGIC): New macro.
4470 (PUT_MAGIC): Likewise.
4471 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4473 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4475 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4476 multiarch needs it).
4478 2001-02-18 H.J. Lu <hjl@gnu.org>
4480 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4483 2001-02-18 Kazu Hirata <kazu@hxi.com>
4485 * vms-misc.c: Fix formatting.
4487 2001-02-16 Kazu Hirata <kazu@hxi.com>
4489 * vms.c: Fix formatting.
4491 2001-02-14 H.J. Lu <hjl@gnu.org>
4493 * elf.c (elf_find_function): New function.
4494 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4495 the file name and function name.
4497 2001-02-14 Nick Clifton <nickc@redhat.com>
4499 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4502 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4503 (BFD64_BACKENDS): Add pepigen.c
4504 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4506 * Makefile.in: Regenerate.
4507 * configure: Regenerate.
4508 * po/POTFILES.in: Regenerate.
4509 * po/bfd.pot: Regenerate.
4511 2001-02-14 H.J. Lu <hjl@gnu.org>
4513 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4514 force_minimum_alignment.
4516 2001-02-14 Bo Thorsen <bo@suse.de>
4518 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4519 (elf64_86_64_size_info): Struct added to fix a problem
4520 with the hashtable string entries.
4521 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4522 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4523 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4524 remove the FIXME for this.
4525 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4526 section. Also removed the FIXME for it.
4527 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4528 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4529 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4531 2001-02-13 Richard Henderson <rth@redhat.com>
4533 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4534 and not user provided.
4536 2001-02-13 Kazu Hirata <kazu@hxi.com>
4538 * vms.c (vms_print_symbol): Remove unreachable code.
4540 * rs6000-core.c: Fix formatting.
4542 2001-02-13 David Mosberger <davidm@hpl.hp.com>
4544 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4545 as _bfd_XXi_only_swap_filehdr_out.
4546 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4547 pe->force_minimum_alignment to TRUE.
4548 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4549 PEI_TARGET_SUBSYSTEM.
4550 (pe_print_private_bfd_data): Call
4551 _bfd_XX_print_private_bfd_data_common() instead of
4552 _bfd_pe_print_private_bfd_data_common().
4553 (pe_bfd_copy_private_bfd_data): Call
4554 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4555 _bfd_pe_bfd_copy_private_bfd_data_common().
4556 (coff_bfd_copy_private_section_data): Define as
4557 _bfd_XX_bfd_copy_private_section_data instead of
4558 _bfd_pe_bfd_copy_private_section_data.
4559 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4560 of a _bfd_pe_get_symbol_info.
4564 * peXXigen.c: Renamed from peigen.c.
4565 (COFF_WITH_XX): Define this macro (will get expanded into
4566 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4567 compiled as peigen.c or pepigen.c.
4568 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4569 define the canonical PEP structures and definitions.
4570 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4571 effect, enforce minimum file and section alignments. If
4572 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4573 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4574 so, by default, this is a no-op).
4576 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4577 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4578 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4579 _bfd_pefoo if it's not defined. Use these macros to define
4582 * libcoff.h (pe_tdata): Add members target_subsystem and
4583 force_minimum_alignment.
4585 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4587 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4589 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4592 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4593 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4596 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4597 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4598 (peigen.c): Add rule to generate from peXXigen.c.
4600 (pepigen.lo): List dependencies for pepigen.lo.
4602 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4604 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4605 $global$ referenced but not defined, set its value here.
4607 2001-02-09 Bo Thorsen <bo@suse.de>
4609 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4611 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4613 (elf64_x86_64_relocate_section): Fix formatting.
4614 (elf64_x86_64_relocate_section): Fix addend for relocation of
4615 R_X86_64_(8|16|32|PC8|PC16|PC32).
4617 2001-02-12 Jan Hubicka <jh@suse.cz>
4619 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4621 2001-02-11 H.J. Lu <hjl@gnu.org>
4623 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4626 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4628 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4629 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4630 relocations against dynsym symbols.
4632 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4633 the R_MIPS_26 relocation.
4634 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4635 the R_MIPS_26 relocation.
4636 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4638 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4639 the R_MIPS_26 relocation.
4640 (mips_elf64_howto_table_rela): Likewise.
4642 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4643 member to mark symbols that have non-CALL relocations against
4645 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4646 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4648 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4649 non-CALL relocation against it is encountered.
4650 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4651 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4652 no_fn_stub is not set.
4654 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4655 information from the real symbol for indirect ones.
4656 Check no_fn_stub to find out if a symbol has a function stub
4659 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4661 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4662 * Makefile.in: Regenerate.
4664 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4666 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4667 true if section name is an unwind table section name.
4668 (elfNN_ia64_additional_program_headers): Count each unwind section
4670 (elfNN_ia64_modify_segment_map): Install one unwind program header
4671 for each unwind separate section. Note: normally the linker
4672 script merges the unwind sections that go into a single segment,
4673 so this still generates at most one unwind program header per
4676 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4677 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4678 (elfNN_ia64_fake_sections): Mark sections with names that start
4679 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4682 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4683 Use it to make sh_info in unwind section point to the text section
4686 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4688 * Makefile.am: Add linux target for S/390.
4689 * archures.c: Likewise.
4690 * bfd-in2.h: Likewise.
4691 * config.bfd: Likewise.
4692 * configure.in: Likewise.
4694 * libbfd.h: Likewise.
4695 * targets.c: Likewise.
4696 * cpu-s390.c: New file.
4697 * elf32-s390.c: New file.
4698 * elf64-s390.c: New file.
4700 2001-02-09 Nick Clifton <nickc@redhat.com>
4702 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4703 ImageBase. This has already been done by coff_swap_hdr_in.
4705 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4707 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4709 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4711 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4712 (sparc64_elf_relocate_section): Likewise.
4714 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4716 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4717 similar to R_SPARC_32.
4718 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4720 2001-02-08 H.J. Lu <hjl@gnu.org>
4722 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4723 relocation entries for weak definitions when building DSO with
4726 2001-02-08 Richard Henderson <rth@redhat.com>
4728 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4729 before visibility. Locally defined protected symbols are not
4732 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4734 * config.bfd: Enable coff64 for rs6000-*. Patch from
4735 <hzoli@austin.ibm.com>.
4737 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4739 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4740 found, do not attempt to find dwarf2 info before returning.
4742 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4744 * elflink.h (is_global_symbol_definition): Rename to
4745 is_global_data_symbol_definition and have it reject function
4747 (elf_link_is_defined_archive_symbol): Use renamed function.
4749 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4751 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4752 * libbfd.h (bfd_target_vector): Likewise.
4753 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4754 make static; create pointer reference named bfd_target_vector.
4755 (_bfd_target_vector_entries): Calculate this based on the array
4756 typed _bfd_target_vector.
4758 2001-02-06 H.J. Lu <hjl@gnu.org>
4760 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4761 internal symbols are not dynamic.
4762 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4764 2001-02-06 Nick Clifton <nickc@redhat.com>
4766 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4767 that it will not be pulled into the list of files that make up
4769 * Makefile.in: Regenerate.
4770 * po/bfd.pot: Regenerate.
4772 2001-02-06 H.J. Lu <hjl@gnu.org>
4774 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4776 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4777 external_PEI_IMAGE_hdr.
4779 2001-02-06 Kazu Hirata <kazu@hxi.com>
4781 * elf-m10200.c: Fix formatting.
4783 2001-02-04 Nick Clifton <nickc@redhat.com>
4785 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4786 rel, it will be handled later on.
4788 2001-02-02 Fred Fish <fnf@ninemoons.com>
4790 * Makefile.in: Fix typo.
4792 2001-02-01 Kazu Hirata <kazu@hxi.com>
4794 * elf-m10300.c: Fix formatting.
4796 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4798 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4799 (elf_backend_get_symbol_type): Define.
4800 (elf64_hppa_object_p): Set architecture and machine from elf
4803 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4805 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4808 2001-01-26 Richard Henderson <rth@redhat.com>
4810 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4811 for non-default visibility.
4812 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4813 delete ugly macro and replace with pretty function.
4815 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4817 * coff-go32.c: Update copyright.
4818 * coff-stgo32.c: Likewise.
4819 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4820 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4821 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4822 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4824 2001-01-25 Kazu Hirata <kazu@hxi.com>
4826 * bfd-in2.h: Rebuild.
4827 * libbfd.h: Likewise.
4829 2001-01-23 H.J. Lu <hjl@gnu.org>
4831 * bfd-in2.h: Rebuild.
4833 2001-01-23 H.J. Lu <hjl@gnu.org>
4835 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4836 is NULL or PRIV(vms_rec) is outside of the buffer.
4838 2001-01-23 Kazu Hirata <kazu@hxi.com>
4840 * coff64-rs6000.c: Fix formatting.
4841 * coff-arm.c: Likewise.
4842 * coffgen.c: Likewise.
4843 * cofflink.c: Likewise.
4844 * coff-mcore.c: Likewise.
4845 * coff-mips.c: Likewise.
4846 * coff-pmac.c: Likewise.
4847 * coff-ppc.c: Likewise.
4848 * coff-rs6000.c: Likewise.
4849 * elf32.c: Likewise.
4850 * elf32-fr30.c: Likewise.
4851 * elf32-i370.c: Likewise.
4852 * elf32-i860.c: Likewise.
4853 * elf32-m32r.c: Likewise.
4854 * elf32-m68k.c: Likewise.
4855 * elf32-mcore.c: Likewise.
4856 * elf32-ppc.c: Likewise.
4857 * elf32-sh.c: Likewise.
4858 * elf32-v850.c: Likewise.
4859 * elf64-alpha.c: Likewise.
4860 * elf64-sparc.c: Likewise.
4861 * elflink.c: Likewise.
4862 * elflink.h: Likewise.
4863 * elf-m10200.c: Likewise.
4864 * elf-m10300.c: Likewise.
4865 * elfxx-ia64.c: Likewise.
4867 * aoutx.h: Fix formatting.
4869 * bfd-in2.h: Likewise.
4870 * bfd-in.h: Likewise.
4871 * cpu-i386.c: Likewise.
4872 * cpu-m68hc11.c: Likewise.
4873 * dwarf2.c: Likewise.
4874 * elf64-x86-64.c: Likewise.
4875 * format.c: Likewise.
4876 * freebsd.h: Likewise.
4878 * hp300hpux.c: Likewise.
4879 * hppabsd-core.c: Likewise.
4880 * hpux-core.c: Likewise.
4882 2001-01-22 Bo Thorsen <bo@suse.de>
4884 * elf64-x86-64.c: Added PIC support for X86-64.
4885 (elf64_x86_64_link_hash_newfunc): Function added.
4886 (elf64_x86_64_link_hash_table_create): Likewise.
4887 (elf64_x86_64_check_relocs): Likewise.
4888 (elf64_x86_64_gc_mark_hook): Likewise.
4889 (elf64_x86_64_gc_sweep_hook): Likewise.
4890 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4891 (elf64_x86_64_size_dynamic_sections): Likewise.
4892 (elf64_x86_64_discard_copies): Likewise.
4893 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4894 (elf64_x86_64_finish_dynamic_sections): Likewise.
4895 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4897 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4899 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4900 * Makefile.in: Regenerate.
4902 2001-01-21 Kazu Hirata <kazu@hxi.com>
4904 * coff-a29k.c: Fix formatting.
4906 2001-01-19 H.J. Lu <hjl@gnu.org>
4908 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4909 relocation section names.
4910 (elf_i386_relocate_section): Report files with bad relocation
4911 section names and return false.
4913 2001-01-17 Bo Thorsen <bo@suse.de>
4915 * targets.c: Alphabetize list of xvecs.
4917 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4919 * config.bfd: Add linux target variant for elfxx-hppa.
4920 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4921 bfd_elf64_hppa_linux_vec.
4922 * configure: Regenerate.
4923 * elf64-hppa.c: Include elf64-target.h again to support linux
4925 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4926 * elf32-hppa.c: Include elf32-target.h again to support linux
4928 (elf32_hppa_post_process_headers): New function.
4929 (elf_backend_post_process_headers): Define.
4930 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4931 bfd_elf32_hppa_linux_vec.
4933 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4934 and data_segment_base fields.
4935 (elf32_hppa_link_hash_table_create ): Init them.
4936 (elf32_hppa_check_relocs): Update comments.
4937 (hppa_record_segment_addr): New function.
4938 (elf32_hppa_relocate_section): Call it.
4939 (final_link_relocate): Handle R_PARISC_SEGREL32.
4940 (elf32_hppa_final_link): New function.
4941 (bfd_elf32_bfd_final_link): Define to call it.
4942 (hppa_unwind_entry_compare): New function.
4943 * cache.c (bfd_open_file): Create files in write+read mode.
4945 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4946 SEGREL32 and numerous other relocs. Change duplicate
4947 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4949 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4952 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4953 .plt entries for DT_INIT and DT_FINI.
4954 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4955 DT_INIT and DT_FINI.
4957 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4958 offsets for stub .plt access if wide mode. Check offset in range.
4960 2001-01-13 Nick Clifton <nickc@redhat.com>
4962 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4965 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4968 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4970 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4971 * configure: Regenerate.
4973 2001-01-11 Peter Targett <peter.targett@arccores.com>
4975 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4976 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4977 * cpu-arc.c (arch_info_struct): Add entries for variants.
4978 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4979 (arc_get_mach) Don't assume machine names prefixed arc- before
4981 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4983 (arc_elf_final_write_processing) Likewise.
4984 (ELF_MACHINE_CODE) Use EM_ARC.
4986 2001-01-10 Nick Clifton <nickc@redhat.com>
4988 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4990 2001-01-07 Philip Blundell <philb@gnu.org>
4992 * README: Replace `bug-gnu-utils@gnu.org' with
4993 `bug-binutils@gnu.org'.
4995 2001-01-04 Kazu Hirata <kazu@hxi.com>
4997 * som.c: Fix formatting.
4999 2001-01-03 Kazu Hirata <kazu@hxi.com>
5001 * ecoffswap.h: Fix formatting.
5002 * elf-bfd.h: Likewise.
5003 * elfarm-nabi.c: Likewise.
5004 * elfarm-oabi.c: Likewise.
5005 * elfcode.h: Likewise.
5006 * elfcore.h: Likewise.
5007 * elflink.c: Likewise.
5008 * elflink.h: Likewise.
5009 * elfxx-ia64.c: Likewise.
5010 * elfxx-target.h: Likewise.
5011 * libbfd.c: Likewise
5012 * linker.c: Likewise.
5013 * lynx-core.c: Likewise.
5015 2001-01-02 Kazu Hirata <kazu@hxi.com>
5017 * pc532-mach.c: Fix formatting.
5018 * pe-arm.c: Likewise.
5019 * pe-i386.c: Likewise.
5020 * pe-mips.c: Likewise.
5021 * pe-ppc.c: Likewise.
5022 * pe-sh.c: Likewise.
5023 * pei-mips.c: Likewise.
5024 * pei-sh.c: Likewise.
5025 * peicode.h: Likewise.
5026 * ppcboot.c: Likewise.
5027 * ptrace-core.c: Likewise.
5029 2001-01-01 Kazu Hirata <kazu@hxi.com>
5031 * reloc.c: Fix formatting.
5032 * riscix.c: Likewise.
5033 * rs6000-core.c: Likewise.
5034 * xcoff-target.h: Likewise.
5036 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
5038 * elfcode.h (elf_object_p): Also restore the bfd mach field on
5039 error, by calling bfd_default_set_arch_mach with incoming
5042 2000-12-26 Kazu Hirata <kazu@hxi.com>
5044 * vaxnetbsd.c: Fix formatting.
5045 * versados.c: Likewise.
5046 * vms-gsd.c: Likewise.
5047 * vms-hdr.c: Likewise.
5048 * vms-misc.c: Likewise.
5050 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
5052 * archive.c (coff_write_armap): Don't write more than symbol_count
5053 `archive_member_file_ptr's.
5055 2000-12-25 Kazu Hirata <kazu@hxi.com>
5057 * vms-tir.c: Fix formatting.
5059 2000-12-23 Kazu Hirata <kazu@hxi.com>
5061 * vms.c: Fix formatting.
5064 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
5066 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5068 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5070 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5073 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5075 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5077 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5079 * libbfd.c (bfd_get_bits): Added
5080 (bfd_put_bits): Likewise
5081 * bfd-in.h: Declared the above.
5082 * bfd-in2.h: Regenerated.
5084 2000-12-20 Kazu Hirata <kazu@hxi.com>
5086 * targets.c: Fix formatting.
5087 * tekhex.c: Likewise.
5088 * trad-core.c: Likewise.
5090 2000-12-19 Kazu Hirata <kazu@hxi.com>
5092 * sco5-core.c: Fix formatting.
5093 * section.c: Likewise.
5094 * sparclinux.c: Likewise.
5095 * sparclynx.c: Likewise.
5096 * sparcnetbsd.c: Likewise.
5098 * stabs.c: Likewise.
5099 * stab-syms.c: Likewise.
5100 * sunos.c: Likewise.
5102 * sysdep.h: Likewise.
5104 2000-12-18 Nick Clifton <nickc@redhat.com>
5106 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5108 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5109 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5111 2000-12-18 Nick Clifton <nickc@redhat.com>
5113 * vms-misc.c (_bfd_vms_get_record): Add default case to
5116 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5118 * elfcore.h (elf_core_file_p): Move to the start of the program
5119 headers before attempting to read them.
5121 2000-12-14 Kazu Hirata <kazu@hxi.com>
5123 * peigen.c: Fix formatting.
5127 2000-12-13 Kazu Hirata <kazu@hxi.com>
5129 * peigen.c: Fix formatting.
5131 2000-12-12 Jim Wilson <wilson@redhat.com>
5133 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5135 2000-12-08 Mark Salter <msalter@redhat.com>
5137 * binary.c (binary_set_section_contents): Ignore sections
5140 2000-12-12 Kazu Hirata <kazu@hxi.com>
5142 * m68klinux.c: Fix formatting.
5143 * m68knetbsd.c: Likewise.
5144 * mipsbsd.c: Likewise.
5145 * netbsd-core.c: Likewise.
5146 * netbsd.h: Likewise.
5147 * newsos3.c: Likewise.
5148 * nlm32-alpha.c: Likewise.
5149 * nlm32-i386.c: Likewise.
5150 * nlm32-ppc.c: Likewise.
5151 * nlm32-sparc.c: Likewise.
5152 * nlmcode.h: Likewise.
5153 * nlmswap.h: Likewise.
5154 * nlm-target.h: Likewise.
5155 * ns32knetbsd.c: Likewise.
5157 2000-12-10 Fred Fish <fnf@be.com>
5159 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5160 symbols in shared objects if allow_shlib_undefined is true.
5162 2000-12-12 Nick Clifton <nickc@redhat.com>
5164 * cpu-sh.c: Fix formattng.
5165 * elf.c: Fix formattng.
5166 * elf32-mips.c: Fix formattng.
5167 * elf32-sh.c: Fix formattng.
5168 * elf64-alpha.c: Fix formattng.
5170 2000-12-09 Nick Clifton <nickc@redhat.com>
5172 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5173 dwarf2_find_line_info as last parameter to invocation of
5174 _bfd_dwarf2_find_nearest_line.
5175 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5176 dwarf2_find_line_info as last parameter to invocation of
5177 _bfd_dwarf2_find_nearest_line.
5179 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5181 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5182 (BFD_LIBS): ...to here.
5183 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5184 (BFD_LIBS_CFILES): ...to here.
5185 * Makefile.in: Regenerate.
5186 * configure.in: Remove dwarf.lo from the elf shell variable.
5187 * configure: Regenerate.
5188 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5189 * libcoff.h: Regenerate.
5190 * coffgen.c (coff_find_nearest_line): Call
5191 _bfd_dwarf2_find_nearest_line.
5192 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5194 (read_abbrevs): Likewise
5195 (decode_line_info): Likewise.
5196 (parse_comp_unit): Likewise.
5197 (comp_unit_find_nearest_line): Likewise.
5198 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5199 * libbfd.h: Regenerate.
5200 * elf.c (_bfd_elf_find_nearest_line): Update call.
5201 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5202 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5203 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5204 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5205 (styp_to_sec_flags): Handle DWARF2 sections.
5206 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5207 to _bfd_find_nearest_line.
5208 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5209 call to _bfd_find_nearest_line.
5211 2000-12-08 Kazu Hirata <kazu@hxi.com>
5213 * coffgen.c: Fix formatting.
5214 * elf-m10300.c: Likewise.
5215 * elf32-i386.c: Likewise.
5216 * elf32-i960.c: Likewise.
5217 * elf32-m68k.c: Likewise.
5218 * elf32-mcore.c: Likewise.
5219 * elf32-ppc.c: Likewise.
5220 * elf32-sh.c: Likewise.
5221 * elf32-sparc.c: Likewise.
5222 * elf32-v850.c: Likewise.
5223 * elf64-alpha.c: Likewise.
5224 * elf64-hppa.c: Likewise.
5225 * elf64-mips.c: Likewise.
5226 * elf64-sparc.c: Likewise.
5228 2000-12-07 Kazu Hirata <kazu@hxi.com>
5230 * elf32-ppc.c: Fix formatting.
5231 * elf64-x86-64.c: Likewise.
5233 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5235 From Ralf Baechle <ralf@gnu.org>
5237 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5238 BFDs containing no sections or empty .text, .data or .bss sections
5239 to be merged, regardless of their flags.
5241 2000-12-06 Kazu Hirata <kazu@hxi.com>
5243 * elf32-m32r.c: Fix formatting.
5244 * elf32-m68hc11.c: Likewise.
5245 * elf32-m68hc12.c: Likewise.
5246 * elf32-m68k.c: Likewise.
5247 * elf32-mcore.c: Likewise.
5248 * elf32-pj.c: Likewise.
5249 * elf32-ppc.c: Likewise.
5251 2000-12-05 Kazu Hirata <kazu@hxi.com>
5253 * elf32-fr30.c: Fix formatting.
5254 * elf32-hppa.c: Likewise.
5255 * elf32-i370.c: Likewise.
5256 * elf32-i386.c: Likewise.
5257 * elf32-i860.c: Likewise.
5258 * elf32-i960.c: Likewise.
5260 2000-12-03 Kazu Hirata <kazu@hxi.com>
5262 * elf32-arm.h: Fix formatting.
5263 * elf32-avr.c: Likewise.
5264 * elf32-cris.c: Likewise.
5265 * elf32-d10v.c: Likewise.
5266 * elf32-d30v.c: Likewise.
5267 * elf-hppa.h: Likewise.
5268 * elf-m10200.c: Likewise.
5269 * elf-m10300.c: Likewise.
5271 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5273 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5274 bfd_mach_mips32_4k. Update FIXME comment.
5275 * archures.c (bfd_mach_mips32): New constant.
5276 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5277 the latter, renumber it.
5278 * bfd-in2.h (bfd_mach_mips32): New constant.
5279 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5280 the latter, renumber it.
5281 * cpu-mips.c (I_mips32): New constant.
5282 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5283 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5284 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5285 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5286 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5287 with E_MIPS_MACH_MIPS32_4K.
5288 (_bfd_mips_elf_final_write_processing): Replace
5289 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5290 bfd_mach_mips32 case.
5291 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5292 comparison with support for MIPS32.
5293 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5296 * aoutx.h (NAME(aout,machine_type)): Add cases for
5297 bfd_mach_mips5 and bfd_mach_mips64.
5298 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5299 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5300 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5301 (arch_info_struct): Add entries for bfd_mach_mips5 and
5303 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5304 _bfd_mips_elf_print_private_bfd_data): Add cases for
5305 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5306 (_bfd_mips_elf_final_write_processing): Add cases for
5307 bfd_mach_mips5 and bfd_mach_mips64.
5309 * aoutx.h (NAME(aout,machine_type)): Add a
5310 bfd_mach_mips_sb1 case.
5311 * archures.c (bfd_mach_mips_sb1): New constant.
5312 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5313 * cpu-mips.c (I_sb1): New constant.
5314 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5315 * elf32-mips.c (elf_mips_mach): Add case for
5317 (_bfd_mips_elf_final_write_processing): Add case for
5320 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5322 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5323 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5324 (sparc*-*-rtems*): Switched from a.out to ELF.
5326 2000-11-30 Jan Hubicka <jh@suse.cz>
5328 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5329 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5330 (elf64-x86-64.lo): Add dependencies.
5331 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5332 bfd_mach_x86_64_intel_syntax.
5333 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5334 * config.bfd (x86_64): Add.
5335 * configure.in: Add support for bfd_elf64_x86_64_vec.
5336 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5337 (bfd_i386_arch, i8086_ar): Link in.
5338 * elf64-x86-64.c: New file.
5339 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5340 * targets.c (bfd_elf64_x86_64_vec): Add.
5341 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5343 2000-11-30 Kazu Hirata <kazu@hxi.com>
5345 * xcofflink.c: Fix formatting.
5347 2000-11-28 Kazu Hirata <kazu@hxi.com>
5349 * aoutx.h: Fix formatting.
5350 * bfd-in.h: Likewise.
5351 * bfd-in2.h: Likewise.
5352 * cache.c: Likewise.
5353 * cisco-core.c: Likewise.
5354 * coff64-rs6000.c: Likewise.
5355 * coffcode.h: Likewise.
5356 * coffswap.h: Likewise.
5357 * corefile.c: Likewise.
5358 * elf32-mips.c: Likewise.
5360 2000-11-27 Kazu Hirata <kazu@hxi.com>
5362 * aout-adobe.c: Fix formatting.
5363 * coff64-rs6000.c: Likewise.
5364 * coffgen.c: Likewise.
5365 * cofflink.c: Likewise.
5367 2000-11-27 Philip Blundell <pb@futuretv.com>
5369 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5370 (obj_coff_strings_written): New accessor macro for above.
5371 * libcoff.h: Regenerate.
5372 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5374 * coffcode.h (coff_write_object_contents): No need to write out
5375 the string table if it's already been done.
5377 2000-11-22 Philip Blundell <pb@futuretv.com>
5379 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5380 weak undefined symbols.
5382 2000-11-24 Nick Clifton <nickc@redhat.com>
5384 * archures.c (bfd_mach_arm_5TE): Define.
5385 (bfd_mach_arm+XScale): Define.
5386 * bfd-in2.h: Regenerate.
5388 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5389 BFD_RELOC_ARM_PCREL_BLX.
5391 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5392 XScale machine numbers.
5394 * config.bfd (xscale-elf): Add target.
5395 (xscale-coff): Add target.
5397 * cpu-arm.c: Add xscale machine name.
5398 Add v5t, v5te and XScale machine numbers.
5400 2000-11-23 Kazu Hirata <kazu@hxi.com>
5402 * aix386-core.c: Fix formatting.
5404 2000-11-22 Jim Wilson <wilson@redhat.com>
5406 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5407 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5408 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5409 (ins_imms_scaled): Initialize sign_bit at function entry.
5410 (elf64_ia64_operands): Add missing initializers.
5411 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5412 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5413 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5414 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5415 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5417 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5418 and free_extsyms at function entry.
5419 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5420 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5421 (get_got): Delete unused local srel.
5422 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5423 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5425 2000-11-21 Kazu Hirata <kazu@hxi.com>
5427 * coff-a29k.c: Fix formatting.
5428 * coff-h8500.c: Likewise.
5429 * coff-i960.c: Likewise.
5430 * coff-ppc.c: Likewise.
5431 * coff-rs6000.c: Likewise.
5432 * coff-stgo32.c: Likewise.
5433 * coff-tic54x.c: Likewise.
5434 * coff-w65.c: Likewise.
5435 * cpu-h8500.c: Likewise.
5436 * cpu-hppa.c: Likewise.
5437 * cpu-ns32k.c: Likewise.
5438 * ecoff.c: Likewise.
5439 * ecofflink.c: Likewise.
5441 2000-11-21 Nick Clifton <nickc@redhat.com>
5443 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5444 remove possibility of infinite loop.
5446 2000-11-20 Kazu Hirata <kazu@hxi.com>
5448 * aix386-core.c: Fix formatting.
5449 * aout-adobe.c: Likewise.
5450 * aout-arm.c: Likewise.
5451 * aout-encap.c: Likewise.
5452 * aout-ns32k.c: Likewise.
5453 * aout-target.h: Likewise.
5454 * aout-tic30.c: Likewise.
5455 * aoutf1.h: Likewise.
5456 * aoutx.h: Likewise.
5457 * archive.c: Likewise.
5458 * bfd-in.h: Likewise.
5459 * bfd-in2.h: Likewise.
5463 2000-11-17 H.J. Lu <hjl@gnu.org>
5465 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5466 pltoff entries for DT_INIT and DT_FINI.
5467 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5468 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5471 2000-11-16 Richard Henderson <rth@redhat.com>
5473 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5474 (allocate_dynrel_entries): Likewise.
5475 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5476 (set_pltoff_entry): Likewise.
5477 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5478 (elfNN_ia64_reloc_type_lookup): Likewise.
5479 (elfNN_ia64_install_value): Likewise.
5480 (elfNN_ia64_relocate_section): Likewise.
5481 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5482 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5484 2000-11-16 Kazu Hirata <kazu@hxi.com>
5486 * cpu-a29k.c: Fix formatting.
5487 * cpu-alpha.c: Likewise.
5488 * cpu-arm.c: Likewise.
5489 * cpu-avr.c: Likewise.
5490 * cpu-d10v.c: Likewise.
5491 * cpu-h8500.c: Likewise.
5492 * cpu-hppa.c: Likewise.
5493 * cpu-i370.c: Likewise.
5494 * cpu-i386.c: Likewise.
5495 * cpu-i960.c: Likewise.
5496 * cpu-ia64-opc.c: Likewise.
5497 * cpu-ia64.c: Likewise.
5498 * cpu-m32r.c: Likewise.
5499 * cpu-m68hc11.c: Likewise.
5500 * cpu-m68hc12.c: Likewise.
5501 * cpu-m68k.c: Likewise.
5502 * cpu-m88k.c: Likewise.
5503 * cpu-mips.c: Likewise.
5504 * cpu-ns32k.c: Likewise.
5505 * cpu-pj.c: Likewise.
5506 * cpu-powerpc.c: Likewise.
5507 * cpu-sh.c: Likewise.
5508 * cpu-sparc.c: Likewise.
5509 * cpu-tic54x.c: Likewise.
5510 * cpu-v850.c: Likewise.
5511 * cpu-vax.c: Likewise.
5512 * cpu-w65.c: Likewise.
5513 * cpu-we32k.c: Likewise.
5514 * cpu-z8k.c: Likewise.
5515 * dwarf1.c: Likewise.
5516 * dwarf2.c: Likewise.
5518 2000-11-15 Kazu Hirata <kazu@hxi.com>
5520 * coff-arm.c: Fix formatting.
5521 * coff-ppc.c: Likewise.
5522 * coff-rs6000.c: Likewise.
5523 * coff-sh.c: Likewise.
5524 * coff-sparc.c: Likewise.
5525 * coff-tic30.c: Likewise.
5526 * coff-tic54x.c: Likewise.
5527 * coff-tic80.c: Likewise.
5528 * coff-w65.c: Likewise.
5529 * coff-we32k.c: Likewise.
5530 * coff-z8k.c: Likewise.
5532 2000-11-15 Richard Henderson <rth@redhat.com>
5534 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5535 section with the same ALLOC|LOAD flags as the source section.
5537 2000-11-14 Jakub Jelinek <jakub@redhat.com>
5539 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5540 by STO_ALPHA constants.
5542 2000-11-14 Kazu Hirata <kazu@hxi.com>
5544 * coff-pmac.c: Fix formatting.
5545 * coff-ppc.c: Likewise.
5547 2000-11-13 H.J. Lu <hjl@gnu.org>
5549 * elflink.h (elf_link_add_object_symbols): Also add indirect
5550 symbols for common symbols with the default version.
5552 2000-11-09 Philip Blundell <pb@futuretv.com>
5554 * section.c (STD_SECTION): Set gc_mark flag.
5556 2000-11-11 Kazu Hirata <kazu@hxi.com>
5558 * coff-i960.c: Likewise.
5559 * coff-m68k.c: Likewise.
5560 * coff-m88k.c: Likewise.
5561 * coff-mcore.c: Likewise.
5562 * coff-mips.c: Likewise.
5564 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5566 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5568 2000-11-10 Kazu Hirata <kazu@hxi.com>
5570 * coff-h8300.c: Fix formatting.
5571 * coff-h8500.c: Likewise.
5572 * coff-i386.c: Likewise.
5573 * coff-i860.c: Likewise.
5574 * coff-i960.c: Likewise.
5575 * coff-ia64.c: Likewise.
5577 2000-11-09 Kazu Hirata <kazu@hxi.com>
5579 * archive.c: Fix formatting.
5580 * archures.c: Likewise.
5582 2000-11-07 Richard Henderson <rth@redhat.com>
5584 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5585 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5586 * section.c (bfd_set_section_contents): Call memcpy if
5587 section->contents set and location not equal to contents plus offset.
5589 2000-11-08 Kazu Hirata <kazu@hxi.com>
5591 * bfd-in.h: Fix formatting.
5592 * bfd-in2.h: Likewise.
5594 * binary.c: Likewise.
5596 * coff-a29k.c: Likewise.
5597 * coff-alpha.c: Likewise.
5598 * coff-apollo.c: Likewise.
5599 * coff-aux.c: Likewise.
5601 2000-11-07 Kazu Hirata <kazu@hxi.com>
5603 * aix386-core.c: Fix formatting.
5604 * aoutf1.h: Likewise.
5605 * aoutx.h: Likewise.
5606 * archures.c: Likewise.
5607 * armnetbsd.c: Likewise.
5609 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5611 * coff-h8300.c (special): Adjust reloc address.
5613 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5615 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5616 to differentiate elf32 and elf64 on ia64.
5617 * bfd-in2.h: Regenerate.
5618 * config.bfd: Add target for "ia64*-*-hpux*".
5619 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5620 * configure: Regenerate.
5621 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5622 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5624 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5625 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5626 * Makefile.in: Regnerate.
5627 * elf64-ia64.c: Deleted.
5628 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5630 2000-11-06 Kazu Hirata <kazu@hxi.com>
5632 * aout-adobe.c: Fix formatting.
5633 * aout-arm.c: Likewise.
5634 * aout-cris.c: Likewise.
5635 * aout-encap.c: Likewise.
5636 * aout-ns32k.c: Likewise.
5637 * aout-target.h: Likewise.
5638 * aout-tic30.c: Likewise.
5640 2000-11-05 Philip Blundell <philb@gnu.org>
5642 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5643 BFDs containing no sections to be merged, regardless of their flags.
5645 2000-11-04 Philip Blundell <philb@gnu.org>
5647 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5648 if a relocation for an undefined symbol also results in an
5651 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5653 * config.bfd: Add support for Sun Chorus.
5655 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5657 * configure.in: Recognize alpha-*-freebsd*.
5658 * configure: Regenerate.
5660 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5662 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5663 (Chunk): New global variable set by a parameter in objcopy.c.
5664 (S3Forced): New global variable set by a parameter in
5666 (srec_set_section_contents): If S3Forced is true, always generate
5668 (srec_write_section): Use 'Chunk' to limit maximum length of S
5671 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5673 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5674 * Makefile.in: Regenerate.
5675 * bfd-in2.h: Regenerate.
5676 * po/bfd.pot: Regenerate.
5678 2000-10-31 Philip Blundell <philb@gnu.org>
5680 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5681 EF_SOFT_FLOAT if it is defined.
5683 2000-10-27 Philip Blundell <philb@gnu.org>
5685 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5686 attempts to mix PIC code with non-PIC, just mark the output as
5687 being position dependent.
5688 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5689 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5690 all mismatches, not just the first one.
5692 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5694 * ieee.c (ieee_archive_p): Plug one of many possible
5695 memory leaks in error handling.
5697 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5699 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5700 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5702 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5703 sparc64_elf_object_p): Support v9b.
5704 * archures.c: Declare v8plusb and v9b machines.
5706 * cpu-sparc.c: Ditto.
5708 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5710 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5713 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5714 (SYMBOL_CALLS_LOCAL): New macro.
5715 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5716 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5717 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5718 (ppc_elf_relocate_section): Use flag variable to determine
5719 whether the relocation refers to a local symbol.
5720 Test whether a PLTREL24 reloc will produce a reloc by looking
5721 to see whether a PLT entry was made.
5723 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5725 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5726 entries that could serve as a definition for a weak symbol.
5728 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5730 From Ralf Baechle <ralf@gnu.org>
5732 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5733 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5734 against local symbols.
5735 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5737 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5739 * section.c (struct sec): Add kept_section.
5740 (struct bfd_comdat_info): Remove sec, we can use above.
5741 (STD_SECTION): Add initializer.
5742 (bfd_make_section_anyway): Init here too.
5744 * bfd-in2.h: Regenerate.
5746 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5748 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5749 fudge values for discarded link-once section symbols.
5751 * elf64-hppa.c: Include alloca-conf.h
5753 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5755 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5757 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5759 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5761 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5763 2000-10-10 Tom Rix <trix@redhat.com>
5765 * section.c (bfd_make_section_anyway): Release newsect ptr when
5766 newsect->symbol fails to alloc. Use bfd_release instead of free.
5768 2000-10-09 Richard Henderson <rth@cygnus.com
5770 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5771 (elf64_ia64_unwind_entry_compare): New.
5772 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5774 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5776 * elflink.h (size_dynamic_sections): Don't create various tags if
5777 .dynstr is excluded from the link. Don't set first dynsym entry
5778 if dynsymcount is zero.
5779 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5780 .dynsym excluded from the link. Don't try to write any dynamic
5781 sections excluded from the link.
5783 * elf.c (swap_out_syms): Handle global section symbols.
5785 2000-10-05 DJ Delorie <dj@redhat.com>
5787 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5788 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5789 (coff_write_relocs): write extended reloc count
5790 (coff_write_object_contents): account for extended relocs
5792 2000-10-05 Jim Wilson <wilson@cygnus.com>
5794 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5796 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5797 elf_backend_section_flags function.
5798 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5800 (elf64_ia64_section_flags): New function containing flag conversion
5802 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5803 * elfxx-target.h (elf_backend_section_flags): Define.
5804 (elfNN_bed): Initialize elf_backend_section_flags field.
5806 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5808 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5809 _bfd_elf32_gc_record_vtable. Correct a comment.
5811 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5813 From Ralf Baechle <ralf@gnu.org>
5815 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5816 produces binaries with got[1] = 0x80000001 to differenciate them
5817 for the dynamic linker from the broken binaries produced by old
5820 2000-09-30 Petr Sorfa <petrs@sco.com>
5822 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5823 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5824 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5825 * configure: Regenerate.
5827 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5829 Define two bfd_targets for absence and presence of leading
5830 underscore on symbols. Make sure to only link same kind.
5831 * elf32-cris.c (cris_elf_object_p,
5832 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5833 cris_elf_merge_private_bfd_data): New.
5834 (elf_backend_object_p, elf_backend_final_write_processing,
5835 bfd_elf32_bfd_print_private_bfd_data,
5836 bfd_elf32_bfd_merge_private_bfd_data): Define.
5837 <Target vector definition>: Include elf32-target.h twice with
5838 different macro settings:
5839 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5840 bfd_elf32_us_cris_vec.
5841 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5842 (elf_symbol_leading_char): First as 0, then '_'.
5843 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5844 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5845 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5846 * configure: Regenerate.
5847 * targets.c: Declare bfd_elf32_us_cris_vec.
5848 * po/bfd.pot: Regenerate.
5850 2000-09-29 Momchil Velikov <velco@fadata.bg>
5852 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5853 R_ARM_THM_PC22 relocations.
5855 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5857 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5859 2000-09-29 Momchil Velikov <velco@fadata.bg>
5861 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5862 is has the SEC_HAS_CONTENTS flag set.
5864 2000-09-28
\81Örjan Friberg <orjanf@axis.com>
5865 Hans-Peter Nilsson <hp@axis.com>
5867 * aout-cris.c (N_TXTADDR): Define.
5869 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5871 * som.c: Include alloca-conf.h.
5872 * Makefile.am: "make dep-am"
5873 * Makefile.in: Regenerate.
5875 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5877 * elf32-hppa.c (plt_stub): New.
5878 (PLT_STUB_ENTRY): Define.
5879 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5880 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5881 (elf32_hppa_link_hash_table_create): Init to suit.
5882 (elf32_hppa_check_relocs): Set has_12bit_branch and
5883 has_17bit_branch as appropriate.
5884 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5885 non-local functions.
5886 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5887 Add space for plt_stub as needed.
5888 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5889 functions at plt_stub.
5890 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5891 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5893 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5894 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5895 of fixed size, and if negative, disable handling of input sections
5896 before stub section. Set up default stub group size depending
5897 on detected branch relocs.
5898 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5899 ensure different offsets from sym_value aren't rounded to
5900 different 2k blocks. Use lrsel and rrsel for other stubs too for
5901 consistency rather than necessity.
5902 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5903 (final_link_relocate): Likewise.
5904 (elf32_hppa_relocate_section): Likewise.
5906 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5907 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5908 (elf_hppa_final_link_relocate): Handle them.
5909 (elf_hppa_relocate_insn): Likewise.
5910 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5912 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5914 * elfcode.h (elf_object_p): Preserve and clear abfd section
5915 information. Restore at error.
5917 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5919 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5920 is empty, make sure that its rva also 0. NT loader dislikes
5923 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5925 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5928 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5930 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5931 currently unused RELATIVE_DYNAMIC_RELOCS code.
5932 (hppa_discard_copies): Likewise.
5933 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5934 comments. Don't check non-code output sections for stub grouping.
5936 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5938 * section.c (bfd_get_unique_section_name): Return NULL if
5941 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5943 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5944 instruction sequence to actually work.
5945 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5948 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5950 * elf32-sh.c (sh_elf_relocate_section): Use
5951 _bfd_final_link_relocate to apply the relocation against a section
5952 symbol, when doing relocatable links.
5954 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5956 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5958 (stub_hash_newfunc): Here too.
5959 (hppa_add_stub): And here.
5960 (elf32_hppa_link_hash_table): Remove stub_section_created,
5961 reloc_section_created, first_init_sec and first_fini_sec. Add
5963 (elf32_hppa_link_hash_table_create): Init to suit.
5964 (hppa_get_stub_entry): Add support for grouping stub sections.
5965 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5966 section code. Index stub vars by section->id.
5967 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5968 exit paths. Zap allocation of above removed vars. Refine
5971 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5972 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5973 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5974 rather than pointer to bfd_link_info.
5975 (hppa_add_stub): Likewise.
5976 (final_link_relocate): Likewise.
5978 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5980 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5983 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5985 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5986 ld/emulparams/shelf.sh.
5988 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5990 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5991 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5992 * bfd-in2.h: Regenerate.
5994 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5996 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5997 LITUSE relocations incorrectly if -relax is specified on the ld
5998 command line and the displacement field of the load or store
5999 instruction is non-zero. (Patch by paul.winalski@compaq.com)
6001 2000-09-15 Alan Modra <alan@linuxcare.com.au>
6003 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6004 first_fini_sec here.
6005 (elf32_hppa_size_stubs): Instead correctly find the first .init
6006 and .fini section here.
6008 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
6010 * elf32-hppa.c (clobber_millicode_symbols): New function.
6011 (elf32_hppa_size_dynamic_sections): Call it.
6013 2000-09-14 Alan Modra <alan@linuxcare.com.au>
6015 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6016 packed. Add plabel, plt_abs packed booleans.
6017 (hppa_link_hash_newfunc): Init new fields.
6018 (PLABEL_PLT_ENTRY_SIZE): Define.
6019 (hppa_stub_name): Use size_t len vars.
6020 (hppa_add_stub): Likewise.
6021 (elf32_hppa_build_stubs): Likewise.
6022 (hppa_build_one_stub): Kill some compiler warnings.
6023 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6024 if dynamic linking. Munge the local plt offsets into
6025 local_got_refcounts. Set h->plabel for all global PLABELs. Use
6026 size_t len vars. Add assert for plabel addend.
6027 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6028 (elf32_hppa_hide_symbol): New function.
6029 (elf_backend_hide_symbol): Define.
6030 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6031 with h->plabel set. Don't make plt entries to have dynamic syms
6032 when they have been forced local. If plt entry is used by a
6033 plabel, make it PLABEL_PLT_ENTRY_SIZE.
6034 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6035 Set up .plt offsets for local syms.
6036 (elf32_hppa_relocate_section): Initialise plt entries for local
6037 syms. Leave weak undefined plabels zero. Make global plabel
6038 relocs against function symbol, and leave the addend zero.
6039 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6040 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6041 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
6042 relocs instead of SEGREL32 for dynamic got relocs.
6043 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6044 (elf_backend_got_header_size): Adjust.
6045 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6047 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6048 (hppa_type_of_stub): Use it instead of #if 0
6049 (hppa_discard_copies): Use it here too.
6050 (elf32_hppa_size_dynamic_sections): And here.
6052 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6053 (elf32_hppa_link_hash_table_create): And here.
6054 (hppa_build_one_stub): And here. Instead keep track of stub
6055 offset using _raw_size.
6056 (elf32_hppa_size_stubs): Likewise.
6057 (elf32_hppa_build_stubs): Likewise.
6058 (hppa_size_one_stub): Likewise. Resize reloc section too.
6060 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6061 first_fini_sec handling. Don't search for reloc section or set
6062 hplink->reloc_section_created here.
6063 (elf32_hppa_size_stubs): Instead search for reloc sections, and
6064 set reloc_section_created here.
6065 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6066 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6068 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6070 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6071 with `hplink->root.'.
6072 (elf32_hppa_check_relocs): Likewise.
6073 (elf32_hppa_gc_sweep_hook): Likewise.
6074 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6075 (hppa_handle_PIC_calls): Likewise.
6076 (elf32_hppa_size_dynamic_sections): Likewise.
6077 (elf32_hppa_set_gp): Likewise.
6078 (elf32_hppa_relocate_section): Likewise.
6079 (elf32_hppa_finish_dynamic_symbol): Likewise.
6080 (elf32_hppa_finish_dynamic_sections): Likewise.
6082 From David Huggins-Daines <dhd@linuxcare.com>
6083 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6084 defined weak symbols in shared links.
6085 (final_link_relocate): Calls to defined weak symbols in shared
6086 objects must go via import stubs, as the target might not be known
6089 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6091 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6092 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6093 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6094 the original entries with EMPTY_HOWTOs, and added new ones to fill
6096 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6097 (sh_elf_relocate_section): Likewise.
6099 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6101 * cpu-mips.c (arch_info_struct): Add mips:4K
6102 * bfd-in2.h (bfd_mach_mips4K): New define.
6103 * archures.c: Add bfd_mach_mips4K to comment.
6104 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6105 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6107 2000-09-13 Marco Franzen <marcof@thyron.com>
6109 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6110 use size_t as a counter.
6111 (som_write_space_strings): Similarly.
6113 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6115 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6117 (elf32_i860_relocate_section): Invoke new function from here.
6119 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6121 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6124 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6126 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6127 target section name instead of dumping core when the target symbol is
6130 2000-09-09 Kazu Hirata <kazu@hxi.com>
6132 * riscix.c: Remove DEFUN.
6134 2000-09-08 Nick Clifton <nickc@redhat.com>
6136 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6137 initialise flags in output bfd if the input bfd is the default
6138 architecture with the default flags.
6140 2000-09-08 Kazu Hirata <kazu@hxi.com>
6142 * archive.c: Fix formatting.
6143 * coff-arm.c: Likewise.
6144 * doc/chew.c: Likewise.
6146 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6148 * section.c (bfd_get_unique_section_name): Put a dot before the
6151 2000-09-07 Kazu Hirata <kazu@hxi.com>
6153 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6154 * elf.c: Fix formatting.
6156 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6158 * config.bfd (sh-*-linux*): Added.
6159 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6160 * targets.c: Declare them.
6161 * elf32-sh-lin.c: New file.
6162 * Makefile.am: Compile it.
6163 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6164 * configure, Makefile.in: Rebuilt.
6166 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6168 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6169 pseduo-section when determining where the TOC ends.
6171 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6172 output x_tvndx as it is only two bytes wide.
6174 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6175 reloc is 26 or 32 bits wide.
6177 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6178 for relocs that don't change anything. Also look at the full
6181 2000-09-06 Philip Blundell <philb@gnu.org>
6183 * config.bfd (arm*-*-uclinux*): New target.
6185 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6187 * configure: Rebuilt with new libtool.m4.
6189 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6191 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6192 word for variable name.
6193 * bfd-in2.h: Regenerate.
6195 2000-09-05 Nick Clifton <nickc@redhat.com>
6197 * config.in: Regenerate.
6198 * libbfd.h: Regenerate.
6199 * po/bfd.pot: Regenerate.
6200 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6203 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6205 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6207 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6209 Shared library and PIC support.
6210 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6211 (GOT_ENTRY_SIZE): New.
6212 (ELF_DYNAMIC_INTERPRETER): New.
6213 (STUB_SUFFIX): Define.
6214 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6215 (RELATIVE_DYNAMIC_RELOCS): Define.
6216 (enum elf32_hppa_stub_type): New.
6217 (struct elf32_hppa_stub_hash_entry): Rename offset to
6218 stub_offset. Add a number of new fields.
6219 (struct elf32_hppa_link_hash_entry): New.
6220 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6222 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6223 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6224 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6226 (hppa_link_hash_newfunc): New function.
6227 (elf32_hppa_link_hash_table_create): Use above function. Init new
6229 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6230 instead of addend, and remove sym_name from args. Don't use
6231 symbol name for local syms, instead use sym index.
6232 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6233 stub type rather than size. Pass in hash and handle import stub
6234 case. Also pass in reloc instead of offset so we can calculate
6235 PCREL22F and PCREL12F branches properly.
6236 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6237 import and export stubs too.
6238 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6239 import and export stub sizing.
6240 (elf32_hppa_check_relocs): New function.
6241 (elf32_hppa_adjust_dynamic_symbol): New function.
6242 (hppa_discard_copies): New function.
6243 (elf32_hppa_size_dynamic_sections): New function.
6244 (elf_backend_size_dynamic_sections): Define.
6245 (elf32_hppa_finish_dynamic_symbol): New function.
6246 (elf_backend_finish_dynamic_symbol): Define.
6247 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6248 some local vars into the link hash table too. For shared links,
6249 trundle over function syms, generating export stubs. Handle
6250 PCREL22F branches. Break out stub creation code from here..
6251 (hppa_add_stub): .. to here. New function.
6252 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6253 call the bfd linker. Use elf_gp to record global pointer.
6254 Calculate a value from sections if $global$ is missing.
6255 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6256 (elf32_hppa_gc_mark_hook): New function.
6257 (elf_backend_gc_mark_hook): Define.
6258 (elf32_hppa_gc_sweep_hook): New function.
6259 (elf_backend_gc_sweep_hook): Define.
6260 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6261 Add rel to args, and remove howto, input_bfd, offset, addend,
6262 sym_name as we can recalculate these locally. Handle calls to
6263 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6264 handling of undefined weak syms. Check that stubs are in range.
6265 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6266 message on hitting a DPREL21L reloc that needs fixing. Subtract
6267 off PC for PCREL14F. Break out code that does a stub lookup from
6269 (hppa_get_stub_entry): ..to here. New function.
6270 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6271 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6273 (elf32_hppa_finish_dynamic_sections): New function.
6274 (elf_backend_finish_dynamic_sections): Define.
6275 (elf_backend_final_write_processing) Define.
6276 (hppa_handle_PIC_calls): New function.
6277 (elf32_hppa_build_stubs): Call it. Pass link_info to
6278 hppa_build_one_stub.
6279 (elf32_hppa_create_dynamic_sections): New function
6280 to create .plt and .got then set .plt flags correctly.
6281 (elf_backend_create_dynamic_sections): Define.
6282 (elf32_hppa_object_p): New function.
6283 (elf_backend_object_p): Define.
6284 (elf32_hppa_elf_get_symbol_type): New function.
6285 (elf_backend_get_symbol_type): Define.
6286 (elf_backend_can_gc_sections): Define.
6287 (elf_backend_want_got_plt): Define.
6288 (elf_backend_plt_alignment): Set to 2.
6289 (elf_backend_plt_readonly): Define.
6290 (elf_backend_want_plt_sym): Define.
6291 (elf_backend_got_header_size): Reserve one entry.
6293 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6294 (elf32_hppa_size_stubs): Pass in multi_subspace.
6295 (elf32_hppa_set_gp): Declare.
6297 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6298 (bfd_get_unique_section_name): New function.
6299 * bfd-in2.h: Regenerate.
6301 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6302 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6305 From David Huggins-Daines <dhd@linuxcare.com>
6306 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6307 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6308 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6309 been updated in finish_dynamic_symbol before modifying function
6312 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6313 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6314 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6315 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6316 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6317 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6318 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6319 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6321 From David Huggins-Daines <dhd@linuxcare.com>
6322 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6323 style of local labels as well.
6325 2000-09-03 Philip Blundell <philb@gnu.org>
6327 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6328 references to undefined symbols in debugging sections.
6330 2000-09-02 H.J. Lu <hjl@gnu.org>
6332 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6333 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6334 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6337 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6339 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6340 (elf32_i860_is_local_label_name): New function and prototype.
6342 2000-09-02 Nick Clifton <nickc@redhat.com>
6344 * configure.in: Increase version number to 2.10.91.
6345 * configure: Regenerate.
6346 * aclocal.m4: Regenerate.
6347 * config.in: Regenerate.
6348 * po/bfd.pot: Regenerate.
6350 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6352 * elf.c (_bfd_elf_make_section_from_shdr): Add
6353 .gnu.linkobce.wi. to the list of debug section names.
6355 2000-09-02 Nick Clifton <nickc@redhat.com>
6357 * dwarf2.c (find_debug_info): New function: Locate a section
6358 containing dwarf2 debug information.
6359 (bfd_dwarf2_find_nearest_line): Find all sections containing
6360 debug information and include them in the stash.
6362 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6364 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6365 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6366 (sh_reloc_map): Add new relocs.
6367 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6368 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6369 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6370 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6372 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6373 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6374 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6375 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6376 New array constants.
6377 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6379 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6380 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6381 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6382 elf_sh_plt_reloc_offset): Define.
6383 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6384 elf_sh_link_hash_table): New structs.
6385 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6386 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6388 (elf_backend_create_dynamic_sections,
6389 bfd_elf32_bfd_link_hash_table_create,
6390 elf_backend_adjust_dynamic_symbol,
6391 elf_backend_size_dynamic_sections,
6392 elf_backend_finish_dynamic_symbol,
6393 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6394 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6395 elf_backend_got_header_size, elf_backend_plt_header_size):
6397 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6398 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6400 * bfd-in2.h, libbfd.h: Rebuilt.
6402 2000-09-01 Alan Modra <alan@linuxcare.com.au>
6404 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6407 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
6409 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6410 not initialized, set them to indicate the SH1 instruction set.
6412 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
6414 * acinclude.m4: Include libtool and gettext macros from the
6416 * aclocal.m4, configure: Rebuilt.
6418 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
6420 * elf.c: Eliminate references to __sparcv9 macro; replace with
6421 autoconf variables HAVE_PSINFO32_T etc.
6422 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6423 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6425 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6426 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6427 * aclocal.m4: Ditto.
6428 * configure: Regenerate.
6430 2000-08-27 Alan Modra <alan@linuxcare.com.au>
6432 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6433 for any shared link, not just shared -Bsymbolic.
6434 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6435 any shared link, and pass link info to it.
6436 (elf_i386_size_dynamic_sections): Update comment.
6437 (elf_i386_discard_copies): Modify to discard relocs for symbols
6438 that have been forced local.
6439 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6440 that have been forced local.
6442 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
6444 * elflink.h (elf_link_add_object_symbols): Allow common
6445 symbols to have an alignment of 1 if explicitly requested, and
6446 not overridden by other definitions.
6448 2000-08-22 Doug Kwan <dkwan@transmeta.com>
6450 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6451 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6453 2000-08-22 H.J. Lu <hjl@gnu.org>
6455 * elf-bfd.h (elf_link_hash_table): Add runpath.
6457 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6458 * bfd-in2.h: Rebuilt.
6460 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6461 "runpath" field to NULL.
6462 (bfd_elf_get_runpath_list): New function.
6464 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6467 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
6469 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6470 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6471 explicitly. Improve validation of r_type.
6473 2000-08-21 H.J. Lu <hjl@gnu.org>
6475 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6476 dynamic allocated content space. Add a comment to remind us that
6477 one day this ought to be fixed.
6478 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6479 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6480 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6482 2000-08-21 Jason Eckhardt <jle@cygnus.com>
6484 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6485 field with the newly relocated value instead of adding it to the
6486 existing immediate field.
6487 (elf32_i860_relocate_splitn): Likewise.
6488 (elf32_i860_relocate_highadj): Likewise.
6490 2000-08-16 Jason Eckhardt <jle@cygnus.com>
6492 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6493 was previously just a stub).
6495 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
6497 * elflink.c (_bfd_elf_create_got_section): Don't abort().
6499 (_bfd_elf_create_dynamic_sections): Likewise.
6501 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
6503 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6504 for undefined symbols to be the beginning of the section.
6506 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6507 four extra entries at the beginning of the .rela.plt section.
6508 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6509 section to account for the four reserved entries in the .plt section.
6511 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
6513 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6514 to the list of NOPs we recognize after a branch-and-link.
6515 Use the ori NOP when one is needed.
6517 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6520 2000-08-14 Jim Wilson <wilson@cygnus.com>
6522 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6523 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6524 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
6527 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
6529 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6531 2000-08-10 Jason Eckhardt <jle@cygnus.com>
6533 * elf32-i860.c (elf32_i860_relocate_section): New function.
6534 (i860_final_link_relocate): New function.
6535 (elf32_i860_relocate_splitn): New function.
6536 (elf32_i860_relocate_pc16): New function.
6537 (elf32_i860_relocate_highadj): New function.
6538 (elf32_i860_howto): Minor adjustments to some relocations.
6539 (elf_info_to_howto_rel): Define.
6540 (elf_backend_relocate_section): Define.
6542 2000-08-10 Nick Clifton <nickc@cygnus.com>
6544 * elf32-arm.h: Fix formatting.
6546 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
6548 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6550 2000-08-08 Jason Eckhardt <jle@cygnus.com>
6552 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6554 2000-08-07 Kazu Hirata <kazu@hxi.com>
6556 * ieee.c (ieee_write_debug_part): Rewrite a comment.
6557 * elf64-ia64.c: Fix a typo.
6559 2000-08-05 Jason Eckhardt <jle@cygnus.com>
6561 * elf32-i860.c (elf32_i860_howto_table): New structure.
6562 (lookup_howto): New function.
6563 (elf32_i860_reloc_type_lookup): New function.
6564 (elf32_i860_info_to_howto_rela): New function.
6565 (elf_code_to_howto_index): New structure.
6566 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6567 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6568 elf32_i860_reloc_type_lookup.
6570 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
6572 * som.c (struct fixup_format): Constify `format'.
6573 (som_hppa_howto_table): Use SOM_HOWTO macro.
6574 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6575 (som_bfd_reloc_type_lookup): Likewise.
6576 (compare_subspaces): Remove unused `count1', `count2'.
6577 (som_begin_writing): Remove unused `total_reloc_size'.
6578 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6579 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6580 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6581 (som_find_nearest_line): Decorate unused parameter(s).
6582 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6583 (som_bfd_link_split_section): Likewise.
6585 2000-08-03 Nick Clifton <nickc@cygnus.com>
6587 * section.c: Restore backed out code.
6588 * elf.c: Restore backed out code.
6589 (copy_private_bfd_data): Fix bug preventing stipped dynamic
6590 binaries from working.
6591 * bfd-in2.h: Regenerate.
6593 2000-08-03 H.J. Lu <hjl@gnu.org>
6595 * section.c: Back out the change made by Nick Clifton
6596 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6598 * bfd-in2.h: Likewise.
6601 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6603 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6605 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6607 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6608 * bfd-in2.h, libbfd.h: Regenerate.
6610 2000-07-31 Nick Clifton <nickc@cygnus.com>
6612 * section.c (struct sec): Add new boolean field 'segment_mark'.
6613 (STD_SECTION): Initialise new field to zero.
6615 * bfd-in2.h: Regenerate.
6617 * elf.c (copy_private_bfd_data): Reorganise section to segment
6618 mapping to cope with moved sections requiring new segments,
6619 and overlapping segments.
6620 (SEGMENT_END): New macro: Return the end address of a segment.
6621 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6622 contains a section by comparing their VMA addresses.
6623 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6624 contains a section by comparing their LMA addresses.
6625 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6626 section should be included in a segment.
6627 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6628 follows another in memory.
6629 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6632 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6634 * cpu-i860.c: Added comments.
6636 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6637 bfd_elf32_i860_little_vec.
6638 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6639 (ELF_MAXPAGESIZE): Changed to 4096.
6641 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6643 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6645 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6646 config for little endian elf32 i860.
6647 (targ_defvec): Define for the new config above
6648 as "bfd_elf32_i860_little_vec".
6649 (targ_selvecs): Define for the new config above
6650 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6652 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6655 * configure: Regenerated.
6657 2000-07-27 H.J. Lu <hjl@gnu.org>
6659 * elflink.h (elf_merge_symbol): Take one more argument,
6660 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6661 entry. Don't overide the existing weak definition if dt_needed
6663 (elf_link_add_object_symbols): Pass dt_needed to
6664 elf_merge_symbol ().
6666 2000-07-27 Nick Clifton <nickc@cygnus.com>
6668 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6671 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6673 * configure.host (*-*-aix*): AIX has 'long long' always.
6675 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6676 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6677 (xcoff_write_archive_contents_big): Don't update the offset
6678 of the symbol table, xcoff_write_armap will do it.
6680 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6682 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6683 of dynobj for SGI_COMPAT checks.
6685 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6687 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6688 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6689 * bfd-in2.h: Regenerate.
6691 2000-07-21 Nick Clifton <nickc@cygnus.com>
6693 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6694 range symbol indices in relocs and issue an error message.
6696 2000-07-20 H.J. Lu <hjl@gnu.org>
6698 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6699 info->new_dtags when setting DT_FLAGS_1. It will only be set
6700 by the new linker options. It shouldn't break anything.
6702 2000-07-20 H.J. Lu <hjl@gnu.org>
6704 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6705 only if info->new_dtags is true.
6707 2000-07-20 H.J. Lu <hjl@gnu.org>
6709 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6710 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6712 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6714 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6715 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6716 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6717 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6718 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6719 * Makefile.in: Rebuild.
6720 * aclocal.m4: Rebuild.
6721 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6722 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6723 (bfd_cris_arch): Declare.
6724 (bfd_archures_list): Add bfd_cris_arch.
6725 * bfd-in2.h: Rebuild.
6726 * config.bfd: (cris-*-*): New target.
6727 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6728 * configure: Rebuild.
6729 * elf.c (prep_headers): Add bfd_arch_cris.
6730 * libbfd.h: Rebuild.
6731 * libaout.h (enum machine_type): Add M_CRIS.
6732 * reloc.c: Add CRIS relocations.
6733 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6734 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6735 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6736 * po/POTFILES.in, po/bfd.pot: Regenerate.
6738 2000-07-19 H.J. Lu <hjl@gnu.org>
6740 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6741 DF_TEXTREL if DT_TEXTREL is set.
6742 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6743 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6744 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6745 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6746 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6747 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6748 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6749 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6750 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6751 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6753 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6754 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6756 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6758 2000-07-19 H.J. Lu <hjl@gnu.org>
6760 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6761 * bfd-in2.h: Rebuild.
6763 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6764 (elf_dt_soname): New.
6766 * elf.c (bfd_elf_set_dt_needed_soname): New.
6768 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6769 entry if the shared object loaded by DT_NEEDED is used to
6770 resolve the reference in a regular object.
6772 2000-07-19 H.J. Lu <hjl@gnu.org>
6774 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6775 DT_DEPAUDIT and DT_AUDIT as strings.
6777 2000-07-19 Nick Clifton <nickc@cygnus.com>
6779 * format.c: Fix formatting.
6781 2000-07-19 H.J. Lu <hjl@gnu.org>
6783 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6785 2000-07-19 H.J. Lu <hjl@gnu.org>
6787 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6788 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6789 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6790 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6791 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6792 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6793 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6795 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6797 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6798 renamed functions from here...
6799 (assign_section_numbers): Use renamed functions.
6800 (prep_headers): Use renamed functions.
6802 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6803 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6804 * bfd-in2.h: Regenerate.
6806 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6808 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6809 parenthesis in if statement.
6811 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6813 Enable the support for Traditional MIPS.
6814 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6815 return ict_none appropriately for traditional mips targets.
6816 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6817 (STUB_MOVE): Conditionalize for traditonal mips.
6818 (STUB_LI16): Likewise.
6819 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6820 room for RTPROC header.
6821 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6822 the permission for the PT_DYNAMIC as read, write and execute.
6823 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6824 for traditonal mips.
6825 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6826 _DYNAMIC_LINKING for traditonal mips.
6827 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6828 in case of traditonal mips.
6829 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6830 entry is required. For a function if PLT is not required then set the
6831 corresponding hash table entry to 0.
6832 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6834 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6835 shared object set the value to 0.
6836 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6837 _DYNAMIC_LINKING for traditonal mips.
6838 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6839 for traditonal mips.
6841 2000-07-15 H.J. Lu <hjl@gnu.org>
6843 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6845 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6847 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6848 out a structure that is BFD_IN_MEMORY.
6850 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6852 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6853 bfd pointer. Print section id instead of bfd pointer for local
6854 syms. Prefix addend with `+' for global syms as well as local.
6855 Correct calculation of name component lengths.
6856 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6858 From David Huggins-Daines <dhd@linuxcare.com>
6859 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6860 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6861 (elf64_hppa_modify_segment_map): Likewise.
6863 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6865 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6866 addresses to be "naturally" sign extended. Return -1 if unknown.
6867 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6868 * bfd-in2.h: Regenerate.
6870 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6872 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6873 and ECOF_SIGNED_64 to list ways to extract an offset.
6874 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6875 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6877 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6878 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6880 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6882 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6883 bfd_get_start_address.
6884 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6885 (elf_swap_ehdr_out): Ditto.
6887 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6889 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6890 compatibility with older binutils.
6892 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6894 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6895 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6897 From Ryan Bradetich <rbradetich@uswest.net>
6898 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6899 (parse_line_table): Ditto.
6900 (_bfd_dwarf1_find_nearest_line): Ditto.
6901 * syms.c (cmpindexentry): Remove extra `*' from params.
6903 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6905 * elf32-mips.c (sort_dynamic_relocs): New Function.
6906 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6907 via qsort to sort the dynamic relocations in increasing r_symndx
6910 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6912 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6913 ATTRIBUTE_UNUSED to unused args.
6914 (get_opd): Likewise.
6915 (get_plt): Likewise.
6916 (get_dlt): Likewise.
6917 (get_stub): Likewise.
6918 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6919 (elf64_hppa_link_output_symbol_hook): Likewise.
6920 (elf64_hppa_check_relocs): Delete unused var.
6921 (elf64_hppa_size_dynamic_sections): Likewise.
6922 (elf64_hppa_finalize_opd): Likewise.
6923 (elf64_hppa_finalize_dynreloc): Likewise.
6924 (elf64_hppa_modify_segment_map): Likewise.
6925 (elf64_hppa_finish_dynamic_sections): Likewise.
6927 * elf-hppa.h (elf_hppa_final_write_processing): Add
6928 ATTRIBUTE_UNUSED to unused args.
6929 (elf_hppa_final_link_relocate): Likewise.
6930 (elf_hppa_record_segment_addrs): Add paretheses.
6931 (elf_hppa_relocate_section): Constify dyn_name.
6933 From David Huggins-Daines <dhd@linuxcare.com>
6934 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6935 rearrange case statement so that it gets preferred to 32-bit ones.
6937 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6938 asection->id instead of address of asection structure.
6939 (elf32_hppa_size_stubs): Likewise.
6941 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6942 for .init* and .fini*.
6944 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6945 and addends used in stub names to 32 bits.
6946 (elf32_hppa_size_stubs): Likewise.
6948 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6949 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6950 not bfd_put_64. Fix minor comment typo and formatting.
6952 Changes to create multiple linker stubs, positioned immediately
6953 before the section where they are required.
6954 * elf32-hppa.c: Don't include hppa_stubs.h.
6955 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6956 (elf32_hppa_stub_hash_table): Delete.
6957 (elf32_hppa_link_hash_entry): Delete.
6958 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6959 stub_hash_table, and store the struct here rather than a pointer.
6960 Delete output_symbol_count. Add offset array. Change
6961 global_value to a bfd_vma.
6962 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6963 (elf32_hppa_stub_hash_traverse): Delete.
6964 (elf32_hppa_name_of_stub): Delete.
6965 (elf32_hppa_link_hash_lookup): Delete.
6966 (elf32_hppa_link_hash_traverse): Delete.
6967 (elf32_hppa_stub_hash_table_init): Delete.
6968 (elf32_hppa_size_of_stub): Pass input section and offset rather
6969 than location and calculate location here. Don't pass name as all
6970 stubs are now the same size.
6971 (elf32_hppa_stub_hash_newfunc): Init new fields.
6972 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6974 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6975 comparing against ints. Rewrite stub handling code.
6976 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6977 Case enums to int before comparing against ints. Remove
6978 bfd_reloc_dangerous case.
6979 (elf32_hppa_build_one_stub): Rewrite.
6980 (elf32_hppa_size_one_stub): New function.
6981 (elf32_hppa_build_stubs): Rewrite.
6982 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6983 Rewrite stub-handling specific code.
6985 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6987 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6989 * hppa_stubs.h: Delete.
6990 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6991 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6992 * Makefile.in: Regenerate.
6994 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6997 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6999 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7000 and section name for bfd_reloc_notsupported error message.
7001 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7002 bfd_reloc_notsupported.
7003 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7005 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7006 undefined weak symbols for all relocs.
7007 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7008 offsets are relative to one past the delay slot.
7009 (elf32_hppa_size_stubs): Account for reloc addend when calculating
7010 branch destination. Put addend into stub name too.
7011 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7012 adjust by 8 when deciding whether a linker stub is needed. Put
7013 addend into stub name as for above.
7015 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7016 various args and vars.
7017 (elf32_hppa_bfd_final_link_relocate): Here too.
7018 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
7019 inner block var to avoid shadowing.
7021 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
7023 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7024 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7025 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7027 * libhppa.h: Change practically all unsigned ints to plain ints.
7028 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
7031 From Ryan Bradetich <rbradetich@uswest.net>
7032 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7033 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7035 From David Huggins-Daines <dhd@linuxcare.com>
7036 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7037 to the new OP_* ones.
7039 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7040 error exit. Bail out earlier on plabel relocs that we aren't
7041 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
7042 string, and then don't free our copy.
7043 (elf32_hppa_build_one_stub): Make insn unsigned int.
7045 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7046 available with BL, not BE and BLE.
7048 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7049 code for elf arg relocs.
7050 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7051 argument with elf_link_hash_entry h. Handle undefined weak
7052 symbols. Move $global$ lookup from here...
7053 (elf32_hppa_relocate_section): ...to here. Return correct error
7054 message for non-handled relocs.
7055 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
7056 wrong test was -0x3ffff to +0x40000.
7058 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7059 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7060 Handle them as such.
7061 (elf_hppa_relocate_insn): Fix a typo.
7063 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7064 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7065 assemble_17, assemble_21): Delete.
7066 Supply defines for all 64 possible opcodes.
7067 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7068 formats. Handle COMICLR.
7069 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7072 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7073 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7074 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7076 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7077 the local syms - did this code get deleted accidentally? Ignore
7078 undefined and undefweak syms.
7080 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7081 block. Use it instead of elf64_hppa_hash_table (info).
7082 (elf_hppa_final_link_relocate): Use hppa_info instead of
7083 elf64_hppa_hash_table (info).
7085 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7086 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7087 (hppa_rebuild_insn): Mask immediate bits here instead.
7088 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7090 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7092 * section.c (struct sec): Add id field. Tidy comment formatting.
7093 (bfd_make_section_anyway): Set id.
7094 (STD_SECTION): Init id too.
7095 Change CONST to const throughout.
7096 * archures.c (bfd_arch_info): Tidy comment.
7097 (bfd_arch_list): Change a CONST to const.
7098 * libbfd-in.h: Tidy comments and replace CONST with const.
7099 * elf-bfd.h: Likewise.
7100 * libbfd.h: Regenerate.
7101 * bfd-in2.h: Regenerate.
7102 * libcoff.h: Regenerate.
7104 2000-07-07 DJ Delorie <dj@redhat.com>
7106 * archive.c (_bfd_write_archive_contents): Add an informative
7109 2000-07-06 Kazu Hirata <kazu@hxi.com>
7111 * srec.c: Fix formatting.
7113 2000-06-05 DJ Delorie <dj@redhat.com>
7117 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7119 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7120 value of PC-relative offsets.
7122 2000-07-03 Jim Wilson <wilson@cygnus.com>
7124 * elf64-alpha.c (alpha_elf_size_info): New.
7125 (elf_backend_size_info): Define to alpha_elf_size_info.
7126 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7128 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7130 * elf32-mips.c: Include elf32-target.h again for the traditional
7133 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7135 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7136 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7137 (avr_info_to_howto_rela): Likewise.
7138 (elf32_avr_gc_mark_hook): Likewise.
7139 (elf32_avr_gc_sweep_hook): Likewise.
7140 (elf32_avr_relocate_section): Likewise.
7142 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7144 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7145 an external symbol for a non-shared, non-relocatable link.
7147 2000-07-03 Nick Clifton <nickc@redhat.com>
7149 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7150 is an external symbol.
7151 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7154 2000-07-03 Kazu Hirata <kazu@hxi.com>
7156 * reloc16.c: Fix formatting.
7158 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7160 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7161 to add a new target for traditional mips i.e
7162 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7163 * configure.in: Likewise.
7164 * configure: Rebuild.
7165 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7167 (bfd_elf32_tradlittlemips_vec): Likewise.
7168 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7169 to see that elfNN_bed does not get redefined even if the target file
7170 is included twice for a chip. See elf32-mips.c.
7172 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7174 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7175 (CLEANFILES): Add DEPA.
7176 * Makefile.in: Regenerate.
7178 2000-06-30 DJ Delorie <dj@cygnus.com>
7180 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7181 can't assume the PE header is at 0x80.
7183 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7185 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7187 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7189 * go32stub.h: Update stub.
7191 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7193 * archures.c (bfd_mach_avr5): Define.
7194 * bfd-in2.h (bfd_mach_avr5): Define.
7195 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7196 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7197 (compatible): Update comment. Add missing test.
7198 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7199 for avr2 and avr4. Simplify 8K wrap code.
7200 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7201 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7203 2000-06-26 Kazu Hirata <kazu@hxi.com>
7205 * coff-h8300.c: Fix formatting.
7206 * cpu-h8300.c: Likewise.
7208 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7210 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7211 for local symbols whose names are unknown.
7213 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7215 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7217 * Makefile.in: Regenerate.
7218 * doc/Makefile.in: Regenerate.
7220 2000-06-20 H.J. Lu <hjl@gnu.org>
7222 * Makefile.am: Rebuild dependency.
7223 * Makefile.in: Rebuild.
7225 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7227 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7228 (elf_backend_copy_indirect_symbol): Map to the new function.
7230 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7232 * archive.c (normalize): Correct pointer comparison when checking
7234 (bfd_bsd_truncate_arname): Likewise.
7235 (bfd_gnu_truncate_arname): Likewise.
7237 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7239 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7240 sections elf_{text,data}_{section,symbol}.
7241 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7242 (_bfd_mips_elf_hide_symbol): New function.
7243 (elf_backend_hide_symbol): Map to the new function.
7244 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7245 definitions of mips_elf_{text,data}_{section,symbol}.
7246 (mips_elf_local_relocation_p): Try to find the direct symbol
7247 based on new check_forced argument.
7248 (mips_elf_calculate_relocation): Use new version of
7249 mips_elf_local_relocation_p.
7250 (mips_elf_relocate_section): Likewise.
7251 (_bfd_mips_elf_relocate_section): Likewise.
7252 (mips_elf_sort_hash_table): Only assert that have enough GOT
7254 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7255 entry if the relocation based on the new external argument.
7256 (mips_elf_create_dynamic_relocation): Assert that we have a
7257 section contents allocated where we can swap out the dynamic
7259 (mips_elf_calculate_relocation): Find the real hash-table entry
7260 correctly by using h->root.root.type. Only create a dynamic
7261 relocation entry if the symbol is defined in a shared library.
7262 Create an external GOT entry for the GOT16 relocation if the
7263 symbol was forced local.
7264 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7265 dynamic index if the symbol was forced local.
7267 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7269 * elf32-mips.c: Fix typos in comments.
7271 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7273 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7276 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7278 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7279 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7280 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7281 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7282 (bfd_elf32_m68hc11_vec): Likewise.
7283 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7284 Supports 68hc11 & 68hc12 at the same time.
7285 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7287 (bfd_elf32_m68hc11_vec): Likewise.
7288 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7289 * archures.c (bfd_m68hc12_arch): Define and register in global list
7290 (bfd_m68hc11_arch): Likewise.
7291 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7292 BFD_RELOC_M68HC11_3B): Define.
7293 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7294 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7296 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7298 * elf_bfd.h (struct elf_backend_data): Add info argument to
7299 elf_backend_hide_symbol.
7300 (_bfd_elf_link_hash_hide_symbol): Likewise.
7301 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7302 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7303 * elflink.h (elf_link_add_object_symbols): Likewise.
7304 (elf_link_assign_sym_version): Likewise.
7306 2000-06-18 H.J. Lu <hjl@gnu.org>
7308 * coff-i386.c (coff_i386_reloc): Don't return in case of
7309 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7310 Compensate PE relocations when linking with non-PE object
7311 files to generate a non-PE executable.
7313 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7315 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7316 GOT entries if we're doing a static link or -Bsymbolic link.
7318 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7320 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7321 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7323 (elf_link_output_relocs): Likewise.
7324 (elf_reloc_link_order): Likewise.
7326 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7328 * archures.c (enum bfd_architecture): #define constants for
7329 PowerPc and RS6000 machine numbers.
7330 * bfd-in2.h: Regenerate.
7331 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7332 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7333 and RS6000 machine numbers using #defined constants from
7335 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7336 machine numbers using #defined constants from archures.c. Add
7337 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7338 64-bit words in 620 entry.
7339 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7341 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7343 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7345 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7346 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7347 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7349 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7351 * bfd-in.h (bfd_family_coff): Define.
7352 * bfd-in2.h: Regenerate.
7353 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7354 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7355 instead of bfd_target_coff_flavour.
7356 * cofflink.c (_bfd_coff_final_link): Likewise.
7357 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7358 exclude XCOFF files.
7359 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7361 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7362 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7363 * xcofflink.c (XCOFF_XVECP): Delete.
7364 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7365 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7366 bfd_xcoff_record_link_assignment,
7367 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7368 check for bfd_target_xcoff_flavour.
7370 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7372 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7374 (read_hdr): New function.
7375 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7376 of trying to extract individual registers. Set abfd->arch_info
7377 to match the architecture that created the core file.
7378 (rs6000coff_get_section_contents): Delete.
7379 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7381 2000-06-14 H.J. Lu <hjl@gnu.org>
7383 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7386 2000-06-13 H.J. Lu <hjl@gnu.org>
7388 * configure: Regenerate.
7390 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
7392 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7395 2000-06-08 David O'Brien <obrien@FreeBSD.org>
7397 * configure.in (VERSION): Update to show this is the CVS mainline.
7399 2000-06-07 Alan Modra <alan@linuxcare.com.au>
7401 * elf32-d10v.c: Include elf/d10v.h
7402 (enum reloc_type): Delete.
7403 * elf32-d30v.c: Include elf/d30v.h
7404 (enum reloc_type): Delete.
7406 * Makefile.am: Run "make dep-am" to regenerate dependencies.
7407 * Makefile.in: Regenerate.
7409 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7410 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7411 move HOWTOs into elf_howto_table.
7412 (R_386_standard, R_386_ext_offset): Define.
7413 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7414 (elf_i386_reloc_type_lookup): Modify calculation of index into
7415 elf_howto_table since we've removed the padding.
7416 (elf_i386_info_to_howto_rel): Likewise.
7417 (elf_i386_relocate_section): Likewise.
7419 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
7421 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7423 2000-06-05 H.J. Lu <hjl@gnu.org>
7425 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7426 an error when seeing an undefined symbol with hidden/internal
7427 attribute. It is handled in *_relocate_section ().
7429 2000-06-05 H.J. Lu <hjl@gnu.org>
7431 * elflink.h (elf_fix_symbol_flags): Follow the link for the
7432 indirect symbol for the ELF_LINK_NON_ELF bit.
7433 (elf_link_output_extsym): Don't output the indirect symbol even
7434 if the ELF_LINK_NON_ELF bit is set.
7436 2000-06-01 J.T. Conklin <jtc@redback.com>
7438 * config.bfd (i[3456]86-*-netbsdelf*): New target.
7439 (i[3456]86-*-netbsdaout*): New target.
7440 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7441 (i[3456]86-*-openbsd*): Likewise.
7443 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
7445 * trad-core.c: From hpux-core.c, include <dirent.h> or
7446 <sys/ndir.h> when possible.
7448 2000-05-31 Ulrich Drepper <drepper@redhat.com>
7450 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7451 definitions. We must not assume they are sorted in the file
7452 according to their index numbers.
7454 2000-05-31 Alan Modra <alan@linuxcare.com.au>
7456 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7457 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
7458 R_PARISC_DIR17F are for absolute branches; Handle them as such.
7460 2000-05-30 Nick Clifton <nickc@cygnus.com>
7462 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7463 80960CA, 80960MC as valid machine names.
7465 2000-05-30 H.J. Lu <hjl@gnu.org>
7467 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7468 visibility bits if the symbol is undefined. Correctly handle
7469 weak undefined symbols with hidden and internal attributes.
7471 * elflink.h (elf_link_add_object_symbols): Always turn the
7472 symbol into local if it has the hidden or internal attribute.
7474 2000-05-29 Philip Blundell <philb@gnu.org>
7476 * ppcboot.c: Add packed attribute if compiling with GCC.
7478 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
7480 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7482 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
7484 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7485 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7486 corefile on a 64-bit (Sparc Solaris) host. Also clean up
7489 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7491 * Makefile.am: Update dependencies with "make dep-am"
7492 * Makefile.in: Regenerate.
7494 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7495 bindtextdomain): Replace defines with those from intl/libgettext.h
7496 to quieten gcc warnings.
7498 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
7500 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7502 * archive.c (normalize, bfd_bsd_truncate_arname,
7503 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7504 file names with backslashes.
7506 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7509 * sysdep.h: Include filenames.h.
7511 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7513 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7515 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7517 * elf64-sparc.c (sparc64_elf_relax_section): New.
7518 (sparc64_elf_relocate_section): Optimize tail call into branch always
7520 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7521 (elf32_sparc_relax_section): New.
7523 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7525 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7526 Remove unusued variables.
7527 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7528 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7529 previous fix, so that shared libs really don't influence targets
7530 extension mask and memory model.
7532 2000-05-23 H.J. Lu <hjl@gnu.org>
7534 * elf64-alpha.c (elf64_alpha_relocate_section): Check
7535 h->root.other not h->other.
7536 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7538 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7540 2000-05-23 H.J. Lu <hjl@gnu.org>
7542 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7543 undefined symbol with the non-default visibility attributes.
7544 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7545 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7546 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7547 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7548 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7549 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7550 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7551 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7552 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7553 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7554 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7556 2000-05-22 Richard Henderson <rth@cygnus.com>
7558 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7559 PCREL22, PCREL64I. Zero size of special relocs.
7560 (elf64_ia64_reloc_type_lookup): Likewise.
7561 (USE_BRL, oor_brl, oor_ip): New.
7562 (elf64_ia64_relax_section): New.
7563 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7564 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7565 (elf64_ia64_relocate_section): Likewise.
7566 (bfd_elf64_bfd_relax_section): New.
7567 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7568 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7569 * bfd-in2.h, libbfd.h: Regenerate.
7571 2000-05-22 Nick Clifton <nickc@cygnus.com>
7573 * configure.in : Add peigen.lo to MIPS PE targets.
7574 * configure: Regenerate.
7576 2000-05-22 Momchil Velikov <velco@fadata.bg>
7578 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7579 only if it is known for both input and output bfds. Separate
7580 error message strings as in some languages, it may be necessary
7581 to change more than one place in the string to change between
7584 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7585 endianess checks, call _bfd_generic_verify_endian_match() instead.
7587 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7589 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7591 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7592 endianess before checking bfd flavours.
7594 2000-05-22 H.J. Lu <hjl@gnu.org>
7596 * elflink.h (elf_link_output_extsym): Clear the visibility
7597 field for symbols not defined locally.
7599 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7601 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7602 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7603 (hppa_rebuild_insn): Mask immediate bits here instead.
7604 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7606 2000-05-18 Momchil Velikov <velco@fadata.bg>
7608 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7609 relocs for an executable, ensure that they are virtual addresses.
7611 2000-05-18 Jeffrey A Law (law@cygnus.com)
7613 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7615 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7616 Rick Gorton <gorton@scrugs.lkg.dec.com>
7618 * elflink.h: Add emitrelocations support: when enabled, relocation
7619 information and relocation sections are put into final output
7620 executables. If the emitrelocations flag is set, do the following:
7621 (elf_bfd_final_link): Emit relocation sections.
7622 (elf_link_input_bfd): Compute relocation section contents.
7623 (elf_gc_sections): Don't clean relocation sections.
7625 2000-05-16 Catherine Moore <clm@cygnus.com>
7627 * som.c (som_decode_symclass): Recognize weak symbols.
7629 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7631 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7632 read idata section only from dataoff.
7633 (pe_print_edata): Correctly check for valid eat_member.
7635 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7637 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7639 2000-05-14 Philip Blundell <philb@gnu.org>
7641 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7643 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7645 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7647 * peigen.c (pe_print_idata): Look for .idata section and print
7648 info even if data directory has zero entries. Read idata section
7649 starting from dataoff, and adjust all data offsets to suit. Cast
7650 all bfd_vma vars to unsigned long before passing to fprintf.
7651 * peigen.c (pe_print_edata): Similarly, look for .edata section
7652 and print info even if data directory has zero entries. Cast
7653 all bfd_vma vars to unsigned long before passing to fprintf.
7655 From Szabolcs Szakacsits <szaka@F-Secure.com>
7656 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7657 directory size which may be bogus.
7658 * peigen.c (pe_print_edata): Similarly.
7660 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7662 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7664 (copy_private_bfd_data): Allow for space possibly taken up by elf
7665 headers when calculating segment physical address from lma.
7667 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7669 * versados.c (versados_scan): Init stringlen and pass_2_done.
7671 * trad-core.c (trad_unix_core_file_p): Return
7672 bfd_error_wrong_format rather than bfd_error_file_truncated.
7674 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7675 add_data_entry. DataDirectory virtual address is relative.
7676 (pe_print_idata): Account for relative DataDirectory virtual
7677 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7678 (pe_print_edata): Similarly.
7680 From Szabolcs Szakacsits <szaka@F-Secure.com>
7681 * peigen.c (dir_names): Add Delay Import Directory.
7682 (pe_print_idata): Always search for bfd section containing
7683 idata address rather than looking up section name. Print this
7684 section name rather than .idata.
7685 (pe_print_edata): Similarly. Also print some fields as %08lx.
7686 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7689 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7691 * xcoff.h: Rename to xcoff-target.h
7692 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7693 * coff-rs6000.c: Ditto.
7694 * coff64-rs6000.c: Ditto.
7695 * coff-pmac.c: Ditto.
7696 * Makefile.in: Regenerate.
7698 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7700 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7701 Change U802TOC64MAGIC to U803XTOCMAGIC.
7703 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7705 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7706 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7707 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7709 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7711 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7713 2000-05-03 Martin v. L
\81öwis <loewis@informatik.hu-berlin.de>
7715 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7716 hidden and internal symbols.
7717 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7719 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7720 assign a PLT or GOT entry to symbols with hidden and
7721 internal visibility.
7723 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7725 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7727 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7729 2000-05-02 H.J. Lu <hjl@gnu.org>
7731 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7734 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7736 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7737 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7739 * Makefile.in: Regenerate.
7741 2000-05-01 Jim Wilson <wilson@cygnus.com>
7743 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7744 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7745 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7746 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7747 * Makefile.in: Rebuild.
7749 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7751 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7752 doesn't work very well.
7754 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7755 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7756 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7757 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7758 (elf_hppa_info_to_howto): Likewise.
7759 (elf_hppa_info_to_howto_rel): Likewise.
7760 (elf_hppa_reloc_type_lookup): Likewise.
7761 (elf_hppa_is_local_label_name): Likewise.
7762 (elf_hppa_fake_sections): Likewise.
7763 (elf_hppa_final_write_processing): Likewise.
7764 (elf_hppa_howto_table): Fully initialise all entries.
7765 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7766 (elf_hppa_info_to_howto): Likewise.
7767 (elf_hppa_info_to_howto_rel): Likewise.
7768 (elf_hppa_reloc_type_lookup): Likewise.
7769 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7770 elf_hppa_unmark_useless_dynamic_symbols,
7771 elf_hppa_remark_useless_dynamic_symbols,
7772 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7773 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7774 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7775 elf32-hppa.c mess is cleaned up.
7776 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7777 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7778 r_field then call hppa_field_adjust inline func with variable
7779 r_field arg, instead call hppa_field_adjust with fixed arg.
7780 In case R_PARISC_PCREL22F, don't set r_field.
7781 (elf_hppa_relocate_insn): Change args and return type to unsigned
7782 int. Call re_assemble_* funcs to do the work.
7784 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7787 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7789 (sign_extend): Mask first before sign extending.
7790 (low_sign_extend): Rewrite without condition expression.
7791 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7792 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7793 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7794 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7795 result as function return value rather than through pointer arg.
7796 Accept unsigned int args, and return unsigned int.
7797 (re_assemble_3): New. Combines function of dis_assemble_3 with
7798 re-assembly of opcode and immediate.
7799 (re_assemble_12): Likewise.
7800 (re_assemble_16): Likewise.
7801 (re_assemble_17): Likewise.
7802 (re_assemble_21): Likewise.
7803 (re_assemble_22): Likewise.
7804 (hppa_field_adjust): Rewrite and document, paying attention to
7805 size of types and signed/unsigned issues.
7806 (get_opcode): Shift before masking.
7807 (FDLW): Rename to FLDW.
7808 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7809 (hppa_rebuild_insn): Change args and return value to unsigned
7810 int. Make use of re_assemble_*. Correct case 11.
7812 * dep-in.sed: Handle ../opcodes/.
7813 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7814 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7815 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7816 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7817 elfarm-nabi.lo dependencies outside of auto-dependency area.
7818 Regenerate dependencies.
7819 * Makefile.in: Regenerate.
7821 * configure.in (TRAD_HEADER): Test non-null before
7823 * configure: Regenerate.
7825 * reloc.c: Fix mis-spelling in comment.
7827 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7829 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7830 * vms.c (vms_openr_next_archived_file): Return NULL.
7832 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7834 * coffcode.h Copy changes mistakenly done to libcoff.h in
7837 2000-04-29 Andreas Jaeger <aj@suse.de>
7839 * libbfd-in.h: Correctly check GCC version.
7840 * bfd-in.h: Likewise.
7841 * libhppa.h: Likewise.
7842 * libbfd.h: Regenerate.
7843 * bfd-in2.h: Regenerate.
7845 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7847 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7848 coffdu-rs6000.{lo,c}.
7849 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7851 * Makefile.in: Regenerate.
7852 * xcoff.h: New file.
7853 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7854 * coff-rs6000.c: Move all declarations and defines that are
7855 common to the xcoff backends into xcoff.h
7856 * coff64-rs6000.c: Ditto,
7858 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7860 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7861 _bfd_coff_force_symnames in strings and
7862 _bfd_coff_debug_string_prefix_length to their default values.
7863 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7865 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7867 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7868 _bfd_coff_force_symnames in strings and
7869 _bfd_coff_debug_string_prefix_length to their default values.
7871 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7873 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7874 Check local_got_refcounts before dereferencing.
7876 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7877 before deciding we don't need R_PPC_PLT32 relocation.
7878 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7881 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7883 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7885 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7886 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7887 (elf_i386_relocate_section): Allow for .plt to go missing.
7888 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7889 can use a relative reloc for got as elf_i386_relocate_section.
7890 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7892 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7894 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7896 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7898 * Makefile.am (coff64-rs6000.lo): New rule.
7899 * Makefile.in: Regenerate.
7900 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7901 xcoff_is_local_label_name, xcoff_rtype2howto,
7902 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7903 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7904 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7905 (NO_COFF_SYMBOLS): Define.
7906 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7907 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7909 (MINUS_ONE): New macro.
7910 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7912 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7913 coff_SWAP_aux_out): Map to the new functions.
7914 * coff64-rs6000.c: New file.
7915 * libcoff.h (bfd_coff_backend_data): Add new fields
7916 _bfd_coff_force_symnames_in_strings and
7917 _bfd_coff_debug_string_prefix_length.
7918 (bfd_coff_force_symnames_in_strings,
7919 bfd_coff_debug_string_prefix_length): New macros for above fields.
7920 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7921 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7922 of using coff_swap_sym_in directly.
7923 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7924 (coff_set_flags) Set magic for XCOFF64.
7925 (coff_compute_section_file_positions): Add symbol name length to
7926 string section length if bfd_coff_debug_string_prefix_length is
7928 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7929 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7930 using coff_swap_lineno_in directly.
7931 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7932 and _bfd_coff_debug_string_prefix_length fields.
7933 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7934 symbol names into strings table when
7935 bfd_coff_force_symnames_in_strings is true.
7936 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7937 SET_RELOC_VADDR): New macros.
7938 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7939 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7941 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7942 changes within RS6000COFF_C specific code.
7943 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7944 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7945 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7946 Extend existing hack on target name.
7947 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7949 * coff-tic54x.c (ticof): Keep up to date with new fields
7950 in bfd_coff_backend_data.
7951 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7952 targ_selvecs to include rs6000coff64_vec for rs6000.
7953 * configure.in: Add rs6000coff64_vec case.
7954 * cpu-powerpc.c: New bfd_arch_info_type.
7956 2000-04-24 Jeffrey A Law (law@cygnus.com)
7958 * config.bfd: Only disable elf32-hppa vectors, not all of the
7959 BSD and OSF configuration support. Provide (disabled) clauses
7961 * configure.in: Add clause for PA64 support.
7962 * configure: Rebuilt.
7964 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7965 (bfd_elf64_hppa_vec): Declare.
7967 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7968 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7969 (elf64-hppa.lo): Add dependencies.
7970 * Makefile.in: Rebuilt.
7972 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7974 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7976 * libhppa.h (dis_assemble_16): New function.
7977 (pa_arch): Added pa20w element.
7979 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7981 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7982 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7983 bfd_elf64_slurp_reloc_table.
7985 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7986 definitions to get external names.
7987 (elf_write_relocs): Renamed from write_relocs and make global.
7988 (elf_slurp_reloc_table): Make global.
7989 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7991 * archive.c (hpux_uid_gid_encode): New function.
7992 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7993 defined and the ID is greater than 99999.
7994 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7995 special uid/gid fields into 32 bit values.
7997 2000-04-21 Matthew Green <mrg@cygnus.com>
7999 * config.bfd: Add NetBSD/sparc64 support.
8001 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
8002 David Mosberger <davidm@hpl.hp.com>
8003 Timothy Wall <twall@cygnus.com>
8004 Jim Wilson <wilson@cygnus.com>
8006 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8007 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8008 (BFD64_BACKENDS): Add elf64-ia64.lo.
8009 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8010 (cpu-ia64.lo, elf64-ia64.lo): New rules.
8011 * Makefile.in: Rebuild.
8012 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8013 (bfd_ia64_arch): Declare.
8014 (bfd_archures_list): Add bfd_ia64_arch.
8015 * bfd-in2.h: Rebuild.
8016 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8017 * configure: Rebuild.
8018 * configure.host: (ia64-*-linux*): New host.
8019 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8020 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8021 * elf.c (prep_headers): Add bfd_arch_ia64.
8022 * libbfd.h: Rebuild.
8023 * reloc.c: Add IA-64 relocations.
8024 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8026 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8027 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8029 2000-04-21 Richard Henderson <rth@cygnus.com>
8031 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8032 contents when performing a partial link.
8033 (bfd_elf_d30v_reloc_21): Likewise.
8035 2000-04-20 H.J. Lu <hjl@gnu.org>
8037 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8038 patch to symbols defined by a shared object.
8039 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8041 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
8044 * dwarf2.c (concat_filename): Avoid string literal concatenation.
8045 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8047 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
8049 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8050 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8051 (coff-ia64.lo): Add dependency.
8052 * Makefile.in: Regenerate.
8053 * coff-ia64.c: New file.
8054 * efi-app-ia32.c: Ditto.
8055 * efi-app-ia64.c: Ditto.
8056 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8057 (coff_set_flags): Ditto.
8058 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8059 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8060 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8061 * configure: Regenerate.
8062 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8063 (PUT_OPTHDR_IMAGE_BASE): Ditto.
8064 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8065 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8066 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8067 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8068 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8069 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8070 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8071 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8072 (GET_PDATA_ENTRY): Ditto.
8073 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8074 data_start. Use above macros to read fields that are 64 bit wide for
8075 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8076 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8077 FileAlignment and SectionAlignment to minimum alignment if they
8079 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8080 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8081 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8082 Use above macros to write fields that are 64 bit wide for
8084 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8085 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8086 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8087 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8088 begin address, end address, and unwind info address only. Use
8089 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8091 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8092 HIGH3ADJ relocation names.
8093 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8094 * targets.c: Declare bfd_efi_app_ia32_vec and
8095 bfd_efi_app_ia64_vec.
8096 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8097 bfd_efi_app_ia64_vec.
8099 2000-04-17 Timothy Wall <twall@cygnus.com>
8101 * bfd-in2.h: Add prototypes for tic54x load page access.
8102 * bfd-in.h: Regenerate.
8103 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8104 in customized _set_arch_mach function.
8105 * coffcode.h (coff_set_alignment_hook): Set section load page if
8106 the appropriate macro is defined.
8107 (write_object_contents): Read section load page.
8109 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8111 * elf32-hppa.h: Update copyright date.
8113 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8114 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8116 * elf32-d30v.c (MAX32): Don't use LL suffix.
8117 (MIN32): Define in terms of MAX32.
8118 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8120 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8123 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8125 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8127 * dep-in.sed: Match space before file name, not after.
8128 * Makefile.am: Regenerate dependencies.
8129 * Makefile.in: Regenerate.
8131 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8132 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8133 extend without an if statement.
8135 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8137 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8139 * elf32-mips.c (gprel16_with_gp): Likewise.
8140 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8141 here using -0x40000, not (int)0xfffc0000.
8142 (elf32_hppa_size_of_stub): Likewise.
8144 2000-04-11 Timothy Wall <twall@cygnus.com>
8146 * coff-tic54x.c: Now builds with all targets.
8147 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8148 * Makefile.in: Regenerate.
8149 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8150 unitialized variable.
8152 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
8154 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8155 --enable-build-warnings option.
8156 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8157 * Makefile.in, configure: Re-generate.
8159 2000-04-07 Nick Clifton <nickc@cygnus.com>
8161 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8162 BFD_RELOC_THUMB_PCREL_BLX.
8164 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8165 R_ARM_XPC25 and R_ARM_THM_PC22.
8167 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8168 R_ARM_XPC25 and R_ARM_THM_XPC22.
8169 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8170 R_ARM_[XPC25|THM_XPC22].
8172 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8173 elf/arm-oabi.h to elf/arm.h
8175 * Makefile.am: Fix dependency for elfarm-oabi.c
8176 * Makefile.in: Regenerate.
8178 * bfd-in2.h: Regenerate.
8179 * libbfd.h: Regenerate.
8181 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8183 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8184 and restore it on failure. Release newly allocated tdata on
8187 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
8189 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8190 (decode_line_info): Set it. Report error if unit->line_offset is
8191 equal to or larger than it.
8193 2000-04-07 Timothy Wall <twall@cygnus.com>
8195 * targets.c: Added vecs for tic54x.
8196 * reloc.c: Added relocs for tic54x.
8197 * libbfd.h: Regenerated.
8198 * configure: Add TI COFF vecs for tic54x.
8199 * configure.in: Ditto.
8200 * config.bfd (targ_cpu): Recognize new tic54x target.
8201 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8202 * bfd-in2.h: Add tic54x target and relocations.
8203 * Makefile.am, Makefile.in: Add tic54x target.
8204 * archures.c (bfd_archures_list): Add tic54x target.
8205 * coff-tic54x.c: New.
8206 * cpu-tic54x.c: New.
8208 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8210 * elfcore.h (elf_core_file_p): call backend_object_p which
8211 thereby gets an opportunity to update the arch/machine type.
8213 2000-04-06 Timothy Wall <twall@cygnus.com>
8215 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8216 class. Handle SEC_CLINK and SEC_BLOCK flags.
8217 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8218 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8220 2000-04-06 Nick Clifton <nickc@cygnus.com>
8222 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8223 EF_INTERWORK if this is an unknown EABI.
8224 (elf32_arm_merge_private_bfd_data): Check EABI version
8225 numbers. Only check EF_xxx flags if the EABI version number
8227 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8228 if the EABI version number is unknown.
8229 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8230 if the EABI version number is unknown.
8232 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8234 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8235 BFD_RELOC_SH_LOOP_END.
8236 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8237 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8238 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8239 (sh_elf_reloc_loop): New function.
8240 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8242 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8243 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8244 * bfd-in2.h, libbfd.h: Regenerate.
8246 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8248 * po/bfd.pot: Regenerate.
8250 * Makefile.am: Remove extraneous mkdep comment.
8251 (MKDEP): Use gcc -MM rather than mkdep.
8252 (DEP): Quote when passing vars to sub-make. Add warning
8254 (DEP1): Rewrite for "gcc -MM".
8255 (CLEANFILES): Add DEP2.
8256 Update dependencies.
8257 * Makefile.in: Regenerate.
8259 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8261 * configure.in: Added corefile support for AIX 4.3. In particular,
8262 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8263 compiling rs6000-core.c.
8264 * configure: Regenerated.
8266 2000-04-03 H.J. Lu <hjl@gnu.org>
8268 * cache.c (bfd_open_file): Unlink the output file only if
8269 it has non-zero size.
8271 2000-04-01 Ken Block USG <block@zk3.dec.com>
8273 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8274 relative relocations for non-loaded sections in shared objects.
8275 (elf64_alpha_check_relocs): Similarly.
8277 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
8279 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8280 BFD_RELOC_16 to switch for extended relocs.
8281 (MY_swap_ext_reloc_in): New.
8282 (MY_swap_ext_reloc_out): New.
8283 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8284 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8285 (NAME(aout,squirt_out_relocs)): Similarly use
8286 MY_swap_ext_reloc_out.
8287 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8289 2000-04-03 Kazu Hirata <kazu@hxi.com>
8291 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8292 the R_PCRWORD_B case.
8294 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8296 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8300 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
8302 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8303 HOWTO references to bfd_elf_generic_reloc, that have
8304 partial_inplace == true, now use the new function. The function
8305 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8306 extends its fixes to the R_M32R_{16,24,32} relocs.
8307 The new logic in m32r_elf_lo16_reloc() has been removed, and
8308 it instead calls the new routine to obtain that functionality.
8310 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8312 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8313 elf32_avr_check_relocs, avr_final_link_relocate,
8314 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8315 elf32_avr_object_p): Add prototypes.
8316 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8317 (bfd_elf_avr_final_write_processing): Make static.
8319 2000-03-27 Denis Chertykov <denisc@overta.ru>
8321 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8322 * archures.c (bfd_architecture): Add AVR architecture.
8323 (bfd_archures_list): Add reference to AVR architecture info.
8324 * elf.c (prep_headers): Handle bfd_arch_avr.
8325 * reloc.c: Add various AVR relocation enums.
8326 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8328 * Makefile.am: Add support for AVR elf.
8329 * configure.in: Likewise.
8330 * config.bfd: Likewise.
8331 * Makefile.in: Regenerate.
8332 * configure: This too.
8333 * bfd-in2.h: And this.
8334 * libbfd.h: And this.
8336 2000-03-24 H.J. Lu <hjl@gnu.org>
8338 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8339 (elf64_alpha_find_reloc_at_ofs): Likewise.
8341 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8343 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8344 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8345 allowable range used to be -2**(n-1) to 2**n-1.
8346 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8347 "boolean overflow" with "bfd_reloc_status_type flag".
8349 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8351 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8353 2000-03-14 Kazu Hirata <kazu@hxi.com>
8355 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8356 of shrinks properly, including the last reloc.
8358 2000-03-13 Kazu Hirata <kazu@hxi.com>
8360 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8363 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8365 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8366 a format mismatch rather than an "error" from bfd_read such as
8367 bfd_error_file_truncated.
8369 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8371 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8372 sign-extension and big-endian compensation for
8373 R_MIPS_64 even in ld -r.
8375 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8377 * elf32-mips.c (mips_elf_next_relocation): Rename from
8378 mips_elf_next_lo16_relocation, and generalize to look
8379 for any relocation type.
8380 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8381 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8382 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8383 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8384 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8385 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8386 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8387 (mips_rtype_to_howto): Likewise.
8388 (mips_elf_calculate_relocation): Handle new relocs.
8389 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8390 are paired. The addend for R_MIPS_GNU_REL16_S2
8391 is shifted right two bits.
8393 2000-03-10 Alan Modra <alan@linuxcare.com.au>
8395 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8396 comment, and ensure it doesn't happen again.
8397 (bfd_install_relocation): Same here.
8398 (_bfd_relocate_contents): Don't bother assigning unused signmask
8399 shift result. Fix typos in comments.
8400 Remove trailing whitespace throughout file.
8402 2000-03-07 Doug Evans <dje@casey.transmeta.com>
8404 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8405 * bfd-in2.h: Rebuild.
8407 2000-03-06 Nick Clifton <nickc@cygnus.com>
8409 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8411 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8412 (SIZEOF_ILF_STRINGS): Redefine.
8413 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
8414 relative reloc, as opposed to a section relative reloc.
8415 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8417 Add length of symbol's prefix to string pointer.
8418 Store a pointer to the symbol in the symbol pointer table.
8419 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8420 Initialise the symbol pointer table.
8421 Store the hint in the Hint/Name table.
8422 Make the jump reloc be symbol realtive, not section relative.
8423 Create an import symbol for imported code.
8425 2000-03-06 Catherine Moore <clm@cygnus.com>
8427 * elf.c (swap_out_syms): Check for null type_ptr.
8429 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
8431 * aout-target.h (MY(write_object_contents)): Remove unused
8432 and unusable "#if CHOOSE_RELOC_SIZE".
8433 * pc532-mach.c (MY(write_object_contents)): Ditto.
8434 * netbsd.h (MY(write_object_contents)): Ditto.
8435 * hp300hpux.c (MY(write_object_contents)): Ditto.
8436 * freebsd.h (MY(write_object_contents)): Ditto.
8437 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8439 2000-02-29 H.J. Lu <hjl@gnu.org>
8441 * peicode.h (jtab): Make it static.
8443 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8444 defined and COFF_IMAGE_WITH_PE is not defined.
8445 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8446 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8448 2000-03-01 Nick Clifton <nickc@cygnus.com>
8450 * coff-arm.c (bfd_arm_process_before_allocation): Make
8451 'symndx' signed to prevent compile time warning.
8453 * coff-mcore.c: Remove unused prototype for pe_object_p.
8455 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8456 functions that are not used when COFF_IMAGE_WITH_PE is
8458 (struct sh_opcode): Change type of 'flags' field to unsigned
8459 long so that it can hold the USESAS flag.
8461 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8463 * elf-m10300.c (mn10300_elf_relax_section): Initialise
8466 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8468 Remove unusued variables and code.
8469 (elf_backend_add_symbol_hook): Fix prototype.
8471 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8474 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8477 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8479 Remove unusued variables and code.
8480 (elf_backend_add_symbol_hook): Fix prototype.
8482 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8484 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8485 to unused function parameter.
8487 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8489 Use EMPTY_HOWTO to initialise empty howto slots.
8490 Remove unused variables.
8492 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8494 2000-03-01 H.J. Lu <hjl@gnu.org>
8496 * aoutx.h (aout_link_input_section_std): Pass "true" to
8497 the undefined_symbol callback.
8498 (aout_link_input_section_ext): Likewise.
8499 * bout.c (get_value): Likewise.
8500 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8501 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8503 (alpha_relocate_section): Likewise.
8504 * coff-arm.c (coff_arm_relocate_section): Likewise.
8505 * coff-i960.c (coff_i960_relocate_section): Likewise.
8506 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8507 * coff-mips.c (mips_relocate_section): Likewise.
8508 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8509 * coff-sh.c (sh_relocate_section): Likewise.
8510 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8511 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8512 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8513 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8514 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8515 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8516 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8517 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8518 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8519 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8520 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8521 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8522 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8523 * elflink.h (elf_link_output_extsym): Likewise.
8524 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8525 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8526 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8528 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8529 undefined_symbol callback when building shared library with
8530 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8532 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8533 * elf32-i386.c (elf_i386_relocate_section): Likewise.
8534 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8535 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8536 (elf32_mips_get_relocated_section_content): Likewise.
8537 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8538 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8539 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8540 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8542 2000-02-28 Nick Clifton <nickc@cygnus.com>
8544 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8545 * Makefile.in: Regenerate.
8547 * configure.in: Add support for mips and sh pe vectors.
8548 * configure: regenerate.
8550 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8553 * targets.c: Add mips and sh pe vectors.
8555 * libpei.h (coff_final_link_postscript): Only define if not
8558 * coffcode.h: Add support for WinCE magic numbers.
8560 * peigen.c (pe_print_reloc): Update comment and rearrange
8561 appending of newline character.
8563 * peicode.h: Add support for Image Library Format.
8564 (pe_ILF_vars): Structure containing data used by ILF code.
8565 (pe_ILF_make_a_section): New function. Create a section based
8567 (pe_ILF_make_a_reloc): New function. Create a reloc based on
8569 (pe_ILF_make_a_symbol): New function. Create a symbol based
8571 (pe_ILF_save_relocs): New function. Store the relocs created
8572 by pe_ILF_make_a_reloc in a section.
8573 (pe_ILF_build_a_bfd): New function. Create a BFD describing
8575 (pe_ILF_object_p): New function. Return a bfd_target pointer
8577 (pe_bfd_object_p): If an ILF object is detected call
8578 pe_ILF_object_p on it.
8580 * coff-arm.c: Add support for WinCE relocs which are different
8581 from normal ARM COFF relocs.
8582 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8584 * coff-sh.c: Add support for sh-pe target.
8585 * pe-sh.c: New file. Support code for sh-pe target.
8586 * pei-sh.c: New file. Support code for sh-pe target.
8588 * pe-mips.c: New file. Support code for mips-pe target.
8589 * pei-mips.c: New file. Support code for mips-pe target.
8591 2000-02-27 Jakub Jelinek <jakub@redhat.com>
8593 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8594 architecture if the object causing the bump is dynamic.
8595 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8596 and also don't it for memory ordering.
8597 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8599 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8601 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8602 calling bfd_get_section_size_before_reloc.
8603 (decode_line_info): Likewise.
8604 (_bfd_dwarf2_find_nearest_line): Likewise.
8606 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8608 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8609 name of the libtool directory.
8610 * Makefile.in: Rebuild.
8612 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
8614 * som.c (SOM_HOWTO): Define.
8615 (som_hppa_howto_table): Use it.
8617 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8619 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8621 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8623 2000-02-24 Catherine Moore <clm@cygnus.com>
8625 * som.c (som_misc_symbol_info): Add field
8627 (som_bfd_derive_misc_symbol_info): Initialize
8629 (som_build_and_write_symbol_table): Keep track
8630 of secondary_def field.
8631 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8632 if secondary_def field is set.
8633 (som_bfd_ar_write_symbol_stuff): Initialize
8636 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8638 * dwarf2.c (read_address): Read 16-bits addresses.
8639 (parse_comp_unit): Accept addr_size == 2.
8641 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8643 * bfd-in.h: Update copyright date.
8645 2000-02-23 Linas Vepstas <linas@linas.org>
8647 * cpu-i370.c: New file.
8648 * elf32-i370.c: New file.
8649 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8650 (bfd_i370_arch): New.
8651 (bfd_archures_list): Add bfd_i370_arch.
8652 * elf.c (prep_headers): Add bfd_arch_i370.
8653 * Makefile.am: Add support for IBM 370 elf.
8654 * config.bfd: Likewise.
8655 * configure.in: Likewise.
8656 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8657 * reloc.c (bfd_reloc_code_type): Likewise.
8658 * targets.c: Likewise.
8660 * Makefile.in: Regenerate.
8661 * configure: Regenerate.
8662 * bfd-in2.h: Regenerate.
8664 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8666 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8667 invalid relocation types, and change them to R_386_NONE.
8669 2000-02-22 H.J. Lu <hjl@gnu.org>
8671 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8672 not defined, don't add a second ELF_VER_CHR.
8674 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8675 symbols converted to local symbols even when stripping all
8677 (elf_link_output_extsym): Process global symbols converted to
8678 local symbols even if they are being stripped.
8680 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8682 * archures.c (bfd_octets_per_byte): Return unsigned int.
8683 (bfd_arch_mach_octets_per_byte): Ditto.
8684 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8686 * section.c (bfd_get_section_size_before_reloc): Quell signed
8687 vs. unsigned comparison warning.
8688 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8689 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8690 change. What was I thinking?
8691 * bfd-in2.h: Regenerate.
8693 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8694 (elf_gc_sections): Same here.
8695 (elf_gc_common_finalize_got_offsets): And here.
8697 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8699 ELF HPPA doesn't work at present; remove it until it does.
8700 * config.bfd: Comment out setting targ_defvec to
8702 * Makefile.am: Rebuild dependencies.
8703 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8704 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8705 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8706 * Makefile.in: Rebuild.
8707 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8709 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8711 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8712 is no bfd_free(). Revert bfd_free part of previous change.
8714 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8716 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8718 (coff_compute_section_file_positions): Use bfd_free to pair
8720 (coff_write_object_contents): Likewise.
8722 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8723 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8725 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8727 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8728 (xcoff_ar_file_hdr_big): New structure.
8729 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8730 (xcoff_ar_hdr_big): New structure.
8731 (SIZEOF_AR_HDR_BIG): New macro.
8732 (xcoff_big_format_p): New macro.
8733 (xcoff_ardata_big): New macro.
8734 (arch_xhdr_big): New macro.
8735 (xcoff_slurp_armap): Handle large archives.
8736 (xcoff_archive_p): Detect large archives.
8737 (xcoff_read_ar_hdr): Handle large archives.
8738 (xcoff_openr_next_archived_file): Handle large archives.
8739 (xcoff_generic_stat_arch_elt): Handle large archives.
8740 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8741 (xcoff_write_armap_big): New function.
8742 (xcoff_write_armap): New function, dispatch to _old or _big.
8743 (xcoff_write_archive_contents_old): Rename from
8744 xcoff_write_archive_contents.
8745 (xcoff_write_archive_contents_big): New function.
8746 (xcoff_write_archive_contents): New function, dispatch to _old or
8749 2000-02-18 Richard Henderson <rth@cygnus.com>
8751 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8752 and hide_symbol members.
8753 (elf_link_hash_copy_indirect): Remove.
8754 (elf_link_hash_hide_symbol): Remove.
8755 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8756 and elf_backend_hide_symbol.
8757 (_bfd_elf_link_hash_copy_indirect): Declare.
8758 (_bfd_elf_link_hash_hide_symbol): Declare.
8759 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8760 (_bfd_elf_link_hash_hide_symbol): Likewise.
8761 (_bfd_elf_link_hash_table_init): Don't init killed members.
8762 * elflink.h (elf_link_add_object_symbols): Use the bed function
8763 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8764 (elf_link_assign_sym_version): Likewise.
8765 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8766 (elf_backend_hide_symbol): Likewise.
8767 (elfNN_bed): Update for new members.
8769 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8771 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8772 STACK_END_ADDR): Define for new core file format.
8773 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8774 for handling the vagaries of the various core file structures used
8775 by AIX over the years.
8776 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8777 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8778 core_dumpx structure.
8780 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8782 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8783 (bfd_mach_sh3_dsp): Likewise.
8784 (bfd_mach_sh4): Reinstate.
8785 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8786 * bfd-in2.h: Regenerate.
8787 * coff-sh.c (struct sh_opcode): flags is no longer short.
8788 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8789 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8790 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8791 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8792 (sh_opcodes): No longer const.
8793 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8794 (sh_insn_uses_reg): Check for USESAS and USESR8.
8795 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8796 (_bfd_sh_align_load_span): Return early for SH4.
8797 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8798 Take into account that field b of a parallel processing insn
8799 could be mistaken for a separate insn.
8800 * cpu-sh.c (arch_info_struct): New array elements for
8801 sh2, sh-dsp and sh3-dsp.
8802 Reinstate element for sh4.
8803 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8804 (SH4_NEXT): Reinstate.
8805 (SH3_NEXT, SH3E_NEXT): Adjust.
8806 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8807 * elf32-sh.c (sh_elf_set_private_flags): New function.
8808 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8809 (sh_elf_merge_private_data): New function.
8810 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8811 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8812 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8813 sh_elf_merge_private_data.
8815 2000-02-13 Richard Henderson <rth@cygnus.com>
8817 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8818 hide_symbol members.
8819 (elf_link_hash_copy_indirect): New.
8820 (elf_link_hash_hide_symbol): New.
8821 * elflink.h (elf_link_add_object_symbols): Break out copy from
8822 indirect new new symbol to elf.c.
8823 (elf_link_assign_sym_version): Break out privatization of
8824 non-exported symbol to elf.c.
8825 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8826 (_bfd_elf_link_hash_hide_symbol): New.
8827 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8829 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8831 * section.c (_bfd_strip_section_from_output): Add info parameter.
8832 If it passed as non-NULL, use it to check whether any input BFD
8833 has an input section which uses this output section. Change all
8835 * bfd-in2.h: Rebuild.
8837 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8838 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8840 * bfd-in2.h: Rebuild.
8842 2000-02-10 Timothy Wall <twall@cygnus.com>
8844 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8845 allow final modifications of swapped-in symbol.
8846 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8847 * coffcode.h (coff_write_relocs): Use macro
8848 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8849 symbol index should be set to -1.
8851 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
8853 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8854 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8855 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8856 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8857 sh_insns_uses_or_sets_freg): New functions.
8858 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8859 * (sh_insns_conflict): Use new functions and new macros to
8860 detect conflicts when two instructions both set same integer registers,
8861 both set same fp register, and both set special register.
8863 2000-02-09 Timothy Wall <twall@cygnus.com>
8865 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8866 swapping in sections, so that the swapping routines have access to
8869 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8871 * coff-go32.c: Update comment. Update copyright.
8873 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8875 * syms.c (bfd_decode_symclass)
8876 Two new class characters were added - 'V' and 'v'. The
8877 meaning of 'W' is now restricted to just weak non-object
8878 symbols. This allows differentiation between, for example,
8879 weak functions vs weak objects. nm for example now dumps:
8881 'w' = weak unresolved
8882 'V' = weak global object
8883 'v' = weak unresolved object
8885 (bfd_is_undefined_symclass): New function. Return true if the
8886 given symbol class represents and undefined/unresolved symbol.
8888 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8891 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8893 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8894 STT_ARM_16BIT flag set, but it is not attached to a data object
8895 return STT_ARM_16BIT so that it will be treated as code by the
8898 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8900 * coff-i386.c (i3coff_object_p): Remove prototype.
8903 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8904 to name. Update copyright.
8906 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8907 assignment to avoid warning. Update copyright.
8909 2000-01-24 Robert Lipe (robertl@sco.com)
8911 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8912 instead of using GNU C extension.
8914 2000-01-21 Nick Clifton <nickc@cygnus.com>
8916 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8917 amount from a bfd_in_memory structure.
8918 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8921 2000-01-14 Nick Clifton <nickc@cygnus.com>
8923 * linker.c (default_indirect_link_order): oops - fix incorrectly
8924 applied patch from Tim Wall.
8926 2000-01-13 Timothy Wall (twall@tiac.net>
8928 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8929 = scnhsz, filhsz, relsz, aoutsz, etc)
8931 * coffswap.h: Ditto.
8933 2000-01-13 Nick Clifton <nickc@cygnus.com>
8935 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8936 interwork thumb to arm stub.
8938 2000-01-13 Timothy Wall (twall@tiac.net>
8940 * archures.c (bfd_octets_per_byte): New function: Return
8942 (bfd_arch_mach_octets_per_byte): New function: Return target
8945 * section.c: Distinguish between octets and bytes for usage of
8946 _cooked_size, _raw_size, and output_offset. Clarify
8947 description of bfd_set_section_contents.
8949 * bfd-in2.h: Regenerate.
8951 * coffgen.c: Indicate that the offset parameter is in bytes, not
8954 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8955 where appropriate to get the octet offset when calling
8956 bfd_set_section_contents.
8957 (bfd_coff_reloc_link_order): Ditto.
8959 * linker.c (bfd_generic_reloc_link_order): Ditto.
8960 (_bfd_default_link_order): Ditto.
8962 * reloc.c (bfd_perform_relocation): Distinguish between octets
8963 and bytes. Use octets when indexing into octet data; use bytes
8964 when calculating target addresses.
8965 (bfd_install_relocation): Ditto.
8967 * srec.c (srec_write_section): Ditto.
8969 2000-01-13 Nick Clifton <nickc@cygnus.com>
8971 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8972 3 to 2. This allows 4 byte sized sections, which is necessary for
8973 dlltool to build functioning DLLs.
8975 2000-01-10 Philip Blundell <pb@futuretv.com>
8977 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8978 (arm*-*-conix*): New target.
8980 2000-01-10 Egor Duda <deo@logos-m.ru>
8982 * config.bfd: Include elf32_i386 vector to target list for cygwin
8985 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8986 * configure.in: Test for structure win32_pstatus_t in
8988 * configure: Regenerate.
8990 * elf.c (elfcore_grok_win32pstatus): New function: process
8991 win32_pstatus_t notes in elf core file.
8992 (elfcore_grok_note): Detect win32_pstatus notes.
8994 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8996 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8998 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8999 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9001 For older changes see ChangeLog-9899
9007 version-control: never