1 2001-12-04 Alexandre Oliva <aoliva@redhat.com>
3 * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
4 R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
5 R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
6 Disable pointless overflow checking of NONE and 32.
8 2001-12-04 Alan Modra <amodra@bigpond.net.au>
10 * reloc.c (bfd_install_relocation): Correct reloc address test.
11 (bfd_perform_relocation): Formatting fix.
12 * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
14 2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
16 * configure.in (LINGUAS): Add tr.
17 * configure: Regenerate.
18 * po/tr.po: Import from translation project's web site.
20 2001-12-03 Alan Modra <amodra@bigpond.net.au>
22 * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
23 happens to trigger on undefined symbols.
24 (final_link_relocate): Return bfd_reloc_undefined for undefined
26 (elf32_hppa_relocate_section): Don't say we can't handle a reloc
27 if we have already warned about an undefined symbol.
29 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
31 * elf32-mips.c (NEWABI_P): New define.
32 (USE_REL): Remove, replaced by
33 (elf_backend_may_use_rel_p): New define.
34 (elf_backend_may_use_rela_p): Likewise.
35 (elf_backend_default_use_rela_p): Likewise.
36 (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
37 Fix some relocation definitions.
38 (elf_mips_howto_table_rela): New RELA relocation definitions for
40 (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
41 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
42 (mips_rtype_to_howto): Likewise.
43 (_bfd_mips_elf_relocate_section): Likewise.
44 (_bfd_mips_elf_object_p): Typo.
45 (elf_backend_sign_extend_vma): Reordered together with many other
46 defines nearby to resemble the order of declaration in the header
49 2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
51 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
52 BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
53 * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
54 * elf32-mips.c (mips_reloc_map): Likewise. Replace
55 BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
56 * elf64-mips.c (mips_reloc_map): Likewise.
57 * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
58 (BFD_RELOC_MIPS_GPREL32): Remove.
60 2001-11-30 H.J. Lu <hjl@gnu.org>
62 * elflink.h (elf_add_default_symbol): New.
63 (elf_link_add_object_symbols): Call elf_add_default_symbol ()
64 to create an indirect symbol from the default for the symbol
65 with the default version if needed.
67 2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
69 * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
70 if it has already been set by another thread.
72 2001-11-28 Jakub Jelinek <jakub@redhat.com>
74 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
75 (elf64_alpha_relocate_section): Translate local_got_entries
76 for STT_SECTION symbol to SHF_MERGE section the first time
78 * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
80 (get_local_sym_hash): New, extracted from get_dyn_sym_info.
81 (get_dyn_sym_info): Use it.
82 (elfNN_ia64_relocate_section): Translate local dyn entries
83 for STT_SECTION symbol to SHF_MERGE section the first time
86 2001-11-27 H.J. Lu <hjl@gnu.org>
88 * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
91 Mon Nov 26 12:33:44 2001 Jeffrey A Law (law@cygnus.com)
93 * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
96 2001-11-24 Alan Modra <amodra@bigpond.net.au>
98 * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
99 group sizes to accommodate c++.
101 2001-11-23 Jakub Jelinek <jakub@redhat.com>
103 * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
104 relocations in non-alloced sections against global symbols
105 defined in shared library being built.
106 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
108 2001-11-23 Jakub Jelinek <jakub@redhat.com>
110 * elf.c (_bfd_elf_rela_local_sym): New.
111 * elflink.h (elf_link_input_bfd): Don't consider empty
112 merged sections as removed in relocation tests.
113 * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
114 * elf32-i386.c (elf_i386_relocate_section): Handle relocs
115 against STT_SECTION symbol of SHF_MERGE section.
116 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
117 * elf32-avr.c (elf32_avr_relocate_section): Call
118 _bfd_elf_rela_local_sym.
119 * elf32-cris.c (cris_elf_relocate_section): Likewise.
120 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
121 * elf32-fr30.c (fr30_final_link_relocate): Likewise.
122 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
123 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
124 * elf32-i370.c (i370_elf_relocate_section): Likewise.
125 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
126 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
127 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
128 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
129 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
130 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
131 * elf32-s390.c (elf_s390_relocate_section): Likewise.
132 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
133 * elf32-v850.c (v850_elf_relocate_section): Likewise.
134 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
135 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
136 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
137 * elf64-s390.c (elf_s390_relocate_section): Likewise.
138 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
139 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
140 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
141 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
142 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
143 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
144 * elf32-sh.c (sh_elf_relocate_section): Likewise for
145 !partial_inplace relocs. Handle relocs against STT_SECTION
146 symbol of SHF_MERGE for partial_inplace relocs.
148 2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
150 * po/Make-in (distclean): Move SRC-POTFILES.in and
151 BLD-POTFILES.in to maintainer-clean target.
153 2001-11-21 Alan Modra <amodra@bigpond.net.au>
155 * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
156 than sym_sec->output_section to detect relocs against discarded
159 2001-11-19 H.J. Lu <hjl@gnu.org>
161 * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
162 discarding relocations.
164 2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
166 * section.c (bfd_is_const_section): New macro. Return true if the
167 given seciton is one of the special, constant, sections.
168 * bfd-in2.h: Regenerate.
169 * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
170 (coff_write_native_symbol): Use bfd_is_const_section.
172 2001-11-19 Alan Modra <amodra@bigpond.net.au>
174 * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
176 * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
177 millicode syms as candidates for import stubs.
179 * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
180 (allocate_PIC_calls): Rename to allocate_plt_static.
181 (allocate_dynrelocs): Move most of code handling .plt entries to..
182 (allocate_plt_static): ..here. Don't drop plabel entries.
184 2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
186 * mmo.c: Adjust documentation tags to use texinfo 4 features.
188 2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
190 * section.c (bfd_is_const_section): New macro. Return true if the
191 section pointer refers to one of the special, constant sections.
192 * bfd-in2.h: Regenerate.
194 * coffgen.c (coff_count_linenumbers): Only update the line number
195 count in non-special sections.
196 (coff_write_native_symbol): Only update the line number file
197 position in non-special sections.
199 2001-11-15 Daniel Jacobowitz <drow@mvista.com>
201 * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
202 local syms from discarded sections. Update comment.
204 2001-11-15 Alan Modra <amodra@bigpond.net.au>
206 * po/SRC-POTFILES.in: Regenerate.
208 * elflink.h (elf_link_input_bfd): Complain about all relocs
209 against local syms from discarded sections. K&R fixes.
210 (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
213 2001-11-15 Alexandre Oliva <aoliva@redhat.com>
215 * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
216 overflows in the .stab section.
218 2001-11-14 Daniel Jacobowitz <drow@mvista.com>
220 * bfd-in.h (bfd_elf32_discard_info): Add prototype.
221 (bfd_elf64_discard_info): Likewise.
222 * bfd-in2.h: Regenerate.
223 * elf-bfd.h (struct elf_reloc_cookie): New.
224 (struct elf_backend_data): Add elf_backend_discard_info,
225 elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
226 (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
227 (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
228 * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
229 (_bfd_elf32_mips_ignore_discarded_relocs): New.
230 (_bfd_elf32_mips_write_section): New.
231 (elf_backend_discard_info): Define.
232 (elf_backend_ignore_discarded_relocs): Define.
233 (elf_backend_write_section): Define.
234 * elfcode.h (elf_bfd_discard_info): Define.
235 (elf_reloc_symbol_deleted_p): Define.
236 * elflink.h (elf_link_input_bfd): Check
237 elf_section_ignore_discarded_relocs. Call
238 bed->elf_backend_write_section if available.
239 (elf_reloc_symbol_deleted_p): New.
240 (elf_bfd_discard_info): New.
241 (elf_section_ignore_discarded_relocs): New.
242 * elfxx-target.h (elf_backend_discard_info): Define.
243 (elf_backend_ignore_discarded_relocs): Define.
244 (elf_backend_write_section): Define.
245 (elfNN_bed): Add elf_backend_discard_info,
246 elf_backend_ignore_discarded_relocs, and
247 elf_backend_write_section.
248 * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
249 * libbfd.h: Regenerate.
250 * stabs.c (_bfd_discard_section_stabs): New.
252 2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
254 * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
255 scheme to get rid of an ugly complicated test.
256 * elf64-s390.c (elf_s390_relocate_section): Likewise.
258 2001-11-14 Andreas Jaeger <aj@suse.de>
260 * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
263 2001-11-14 Jakub Jelinek <jakub@redhat.com>
265 * dwarf2.c (struct line_head) [total_length]: Change type to
267 (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
268 (struct comp_unit): Add stash and offset_size.
269 (read_8_bytes): Return bfd_vma.
270 (read_indirect_string): New.
271 (read_attribute): Handle DW_FORM_strp.
272 (decode_line_info): Support 64-bit DWARF format.
273 (_bfd_dwarf2_find_nearest_line): Likewise.
274 (parse_comp_unit): Set offset_size and stash.
276 2001-11-13 Keith Walker <keith.walker@arm.com>
278 * dwarf2.c (read_attribute_value): New function to handle
280 (read_attribute): Use it.
282 2001-11-13 Geoffrey Keating <geoffk@redhat.com>
284 * dwarf2.c (decode_line_info): Properly deal with unknown standard
287 2001-11-13 John Marshall <jmarshall@acm.org>
288 Alan Modra <amodra@bigpond.net.au>
290 * section.c (bfd_make_section_anyway): Don't increment section_id
291 and the BFD's section_count if adding the section failed.
292 * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
295 2001-11-12 Orjan Friberg <orjanf@axis.com>
297 * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
300 2001-11-11 H.J. Lu <hjl@gnu.org>
302 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
303 _bfd_elf_strtab_size instead of _bfd_stringtab_size.
305 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
306 dynstr type to `struct elf_strtab_hash *'.
308 2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
310 * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
311 size_t. Rename second i to j.
313 Sat Nov 10 08:56:02 2001 Jeffrey A Law (law@cygnus.com)
315 * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
317 2001-11-10 Alan Modra <amodra@bigpond.net.au>
319 * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
320 relocs into shared libs.
321 * elf32-cris.c (cris_elf_relocate_section): Likewise.
322 * elf32-i370.c (i370_elf_relocate_section): Likewise.
323 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
324 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
325 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
326 * elf32-sh.c (sh_elf_relocate_section): Likewise.
327 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
328 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
329 * elf64-s390.c (elf_s390_relocate_section): Likewise.
330 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
331 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
332 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
334 * elf.c (bfd_section_from_r_symndx): New function.
335 * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
336 (struct sym_sec_cache): New.
337 (bfd_section_from_r_symndx): Declare.
338 (struct bfd_elf_section_data): Change local_dynrel type to PTR.
339 * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
340 relocs when relocatable. Don't zero entire reloc, just zero the
342 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
343 (elf32_hppa_link_hash_table_create): Init it.
344 (elf32_hppa_check_relocs): Track dynamic relocs needed for local
345 syms on a per-section basis as we do for globals.
346 (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
347 (allocate_dynrelocs): Warning fix.
348 (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
349 section has been discarded.
350 (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
352 * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
353 (elf_i386_link_hash_table_create): Init it.
354 (elf_i386_check_relocs): Track dynamic relocs needed for local
355 syms on a per-section basis as we do for globals.
356 (elf_i386_gc_sweep_hook): Update for local_dynrel change.
358 (allocate_dynrelocs): Warning fix.
359 (elf_i386_size_dynamic_sections): Don't allocate relocs when
360 section has been discarded.
361 (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
363 * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
364 (elf_s390_link_hash_table_create): Init it.
365 (elf_s390_check_relocs): Track dynamic relocs needed for local
366 syms on a per-section basis as we do for globals.
367 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
369 (allocate_dynrelocs): Warning fix.
370 (elf_s390_size_dynamic_sections): Don't allocate relocs when
371 section has been discarded.
372 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
374 * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
375 (ppc64_link_hash_table_create): Init it.
376 (ppc64_elf_check_relocs): Track dynamic relocs needed for local
377 syms on a per-section basis as we do for globals.
378 (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
379 (allocate_dynrelocs): Call the correct record_dynamic_dymbol
380 function. Warning fix.
381 (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
382 section has been discarded.
383 (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
385 * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
386 (elf_s390_link_hash_table_create): Init it.
387 (elf_s390_check_relocs): Track dynamic relocs needed for local
388 syms on a per-section basis as we do for globals.
389 (elf_s390_gc_sweep_hook): Update for local_dynrel change.
391 (allocate_dynrelocs): Warning fix.
392 (elf_s390_size_dynamic_sections): Don't allocate relocs when
393 section has been discarded.
394 (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
397 2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
399 * elf32-s390: Major rework that introduces all recent changes to
400 the s390 backends. Get a closer match to elf32-i386.
401 (elf_s390_relocate_section): Make use of dynamic section short-cuts.
402 Localise vars, and delay setting. Better error reporting, replace
403 BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
404 symbol is not defined in the regular object file and tread the weak
405 definition as the normal one. Don't discard relocs for undefweak or
406 undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
407 test for avoided copy relocs. Reinstate fudge for unresolved relocs
408 in debugging sections.
409 (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
410 reloc processing for weakdefs. Remove redundant casts and aborts.
411 Delay setting of vars until needed. Move creation of dynamic symbols
412 and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
413 BFD_ASSERT with abort. Discard .plt entries for everything with
415 (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
416 .got or .relgot here but do it in allocate_dynrelocs. Reference count
417 possible .plt and .got entries. Don't test input section SEC_READONLY
418 here to try to avoid copy relocs, and keep dyn_relocs regardless of
419 ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
420 variables until needed. Remove separate switch stmt for creating .got
421 section. Initialise local_got_refcounts to 0. Cache pointer to
422 "sreloc" section in elf_section_data. Tweak condition under which .got
423 created. Report files with bad relocation section names.
424 (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
425 have been forced local. Use same test to decide if we can use a
426 relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
427 comment. Move expressions out of function calls. Replace BFD_ASSERT
429 (elf_s390_finish_dynamic_sections): Migrate common code out of switch
430 statement. Replace BFD_ASSERT with abort.
431 (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
432 to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
433 instead of looking up section names for DT_TEXTREL. Replace
434 BFD_ASSERT with abort. Zero out the dynamic allocated content space.
435 Add a comment to remind us that one day this ought to be fixed.
436 (struct elf_s390_link_hash_entry): Rename "root" to "elf".
437 (struct elf_s390_link_hash_table): Likewise.
438 (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
439 rid of unnecessary casts.
440 (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
441 Remove "section" field.
442 (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
443 Reference count possible .plt entries. Don't deallocate .got and
445 (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
447 (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
449 (elf_s390_discard_copies): Delete.
450 (elf_s390_link_hash_traverse): Delete.
451 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
452 rather than gc variety).
453 (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
454 srelplt, sdynbss, srelbss fields.
455 (elf_s390_link_hash_table_create): Init them.
456 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
457 (allocate_dynrelocs): New function.
458 (create_got_section): New function.
459 (elf_backend_can_refcount): Define.
460 (elf_backend_copy_indirect_symbol): Define.
461 (elf_s390_copy_indirect_symbol): New function.
462 (elf_s390_create_dynamic_sections): New function.
463 (readonly_dynrelocs): New function.
464 * elf64-s390.c: Likewise.
466 2001-11-07 Jakub Jelinek <jakub@redhat.com>
468 * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
469 (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
470 (elf-strtab.lo): Add rule.
471 * Makefile.in: Rebuilt.
472 * configure.in (elf): Add elf-strtab.lo.
473 * configure: Rebuilt.
474 * elf-bfd.h (elf_strtab_hash): Forward declare.
475 (struct elf_link_hash_table): Change dynstr type to
476 struct elf_strtab_hash *.
477 (struct elf_obj_tdata): Change strtab_ptr type to
478 struct elf_strtab_hash *.
479 (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
480 _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
481 _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
482 _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
483 _bfd_elf_strtab_finalize): New prototypes.
484 * elf-strtab.c: New file.
485 * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
486 and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
487 Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
488 when forcing dynamic symbol to local.
489 (elf_link_create_dynamic_sections): Call
490 _bfd_elf_strtab_init instead of elf_stringtab_init.
491 (elf_link_record_local_dynamic_symbol): Likewise, change
492 dynstr type. Use _bfd_elf_strtab functions instead of
493 _bfd_stringtab calls.
494 (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
495 _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
496 call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
497 (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
498 (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
499 dynamic symbol to local.
500 (elf_link_assign_sym_version): Likewise.
501 (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
503 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
504 type. Call _bfd_elf_strtab functions instead of
505 _bfd_stringtab functions.
506 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
507 * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
508 (elf_fake_sections): Likewise.
509 (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
510 on shstrtab hash table, call _bfd_elf_strtab_addref on each section
511 name in the output. Call _bfd_elf_strtab_finalize and
512 use _bfd_elf_strtab_offset to finalize sh_name section header fields.
513 (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
514 instead of _bfd_stringtab_size.
515 (prep_headers): Change shstrtab type.
516 Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
518 2001-11-07 Alan Modra <amodra@bigpond.net.au>
520 * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
521 bad symtab segfault. Formatting and warning fixes. Improve
522 error message for internationalisation.
524 2001-11-06 H.J. Lu (hjl@gnu.org)
526 * elflink.h (elf_link_input_bfd): Complain about relocs against
529 2001-11-03 Alan Modra <amodra@bigpond.net.au>
531 * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
533 2001-11-02 H.J. Lu <hjl@gnu.org>
535 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
536 dynamic relocation for symbols defined in regular objects when
537 creating executables.
539 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
541 * configure.in (ALL_LINGUAS): Add "fr".
542 * configure: Regenerate.
543 * po/fr.po: New file.
545 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
547 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
549 * som.c (setup_sections): Initialize subspace_sections.
551 2001-11-02 H.J. Lu (hjl@gnu.org)
553 * coffgen.c (coff_object_p): Return 0 if the header is too big.
555 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
557 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
558 information. Save bfd arch and mach values. Restore on error.
560 2001-11-02 Alan Modra <amodra@bigpond.net.au>
562 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
563 (allocate_PIC_calls): New function.
564 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
565 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
566 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
568 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
570 * elf32-cris.c (cris_elf_grok_prstatus): New function.
571 (cris_elf_grok_psinfo): New function.
572 (elf_backend_grok_prstatus): Define.
573 (elf_backend_grok_psinfo): Define.
575 2001-11-01 Alan Modra <amodra@bigpond.net.au>
577 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
580 2001-10-31 Chris Demetriou <cgd@demetriou.com>
582 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
583 relocations properly.
585 2001-10-31 H.J. Lu <hjl@gnu.org>
587 * elflink.h (elf_link_output_extsym): Don't clear the visibility
588 field for relocateable.
590 2001-11-01 Alan Modra <amodra@bigpond.net.au>
592 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
593 .plt relocs in DT_RELASZ.
595 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
597 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
600 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
602 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
604 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
606 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
607 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
608 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
609 Regenerate dependencies.
610 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
611 * config.bfd: [BFD64] (mmix-*-*): New case.
612 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
613 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
614 (bfd_mmix_arch): Declare.
615 (bfd_archures_list): Add bfd_mmix_arch.
616 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
617 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
618 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
620 * reloc.c: Add MMIX relocations.
621 * bfd.c (struct _bfd, tdata): Add mmo_data.
622 * Makefile.in: Regenerate.
623 * configure: Regenerate.
624 * libbfd.h: Regenerate.
625 * bfd-in2.h: Regenerate.
626 * configure: Rebuild.
628 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
630 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
631 p_paddr of the segment that contains it.
632 (copy_private_bfd_data): If the LMA for a segment is known, use it
633 for matching sections to segments.
634 (assign_file_positions_for_segments): Use the LMA when adjusting
635 for inter-section alignment padding.
637 2001-10-29 Kazu Hirata <kazu@hxi.com>
639 * README: Fix a typo.
641 2001-10-24 Richard Henderson <rth@redhat.com>
643 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
644 timestamp to time_t for ctime.
646 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
648 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
649 unsigned, increasing index.
651 2001-10-23 H.J. Lu <hjl@gnu.org>
653 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
654 m != NULL before accessing it.
656 2001-10-23 Alan Modra <amodra@bigpond.net.au>
658 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
659 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
660 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
662 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
663 (hppa_link_hash_newfunc): Likewise.
664 (elf32_hppa_finish_dynamic_symbol): Likewise.
665 (allocate_dynrelocs): Always allocate .got relocs if shared.
666 (elf32_hppa_relocate_section): Output them too. Similarly
667 consolidate .plt reloc code, and no longer initialise .plt
668 when a reloc is output.
669 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
670 when no reloc is output.
672 From Herbert Xu <herbert@gondor.apana.org.au>
673 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
674 unreachable branches.
676 2001-10-22 H.J. Lu <hjl@gnu.org>
678 * configure.in (WIN32LIBADD): Use -L../libiberty for
680 * configure: Rebuild.
682 2001-10-21 H.J. Lu <hjl@gnu.org>
684 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
685 if shared library is enabled only for Linux hosts.
686 * configure: Rebuild.
688 2001-10-21 H.J. Lu <hjl@gnu.org>
690 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
691 ../libiberty/Makefile instead of $enable_shared.
692 * configure: Rebuild.
694 2001-10-21 H.J. Lu <hjl@gnu.org>
696 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
699 2001-10-20 H.J. Lu <hjl@gnu.org>
701 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
702 if shared library is enabled.
703 * configure: Rebuild.
705 2001-10-20 H.J. Lu <hjl@gnu.org>
707 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
709 2001-10-19 H.J. Lu <hjl@gnu.org>
711 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
714 2001-10-18 H.J. Lu <hjl@gnu.org>
716 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
717 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
719 2001-10-18 Jakub Jelinek <jakub@redhat.com>
721 * section.c (_bfd_strip_section_from_output): Don't count
722 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
724 2001-10-17 Alan Modra <amodra@bigpond.net.au>
726 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
727 Elf_Internal_Shdr.contents now that it's no longer a PTR.
728 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
729 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
730 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
731 * elf32-sh.c (sh_elf_relax_section): Likewise.
732 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
733 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
734 * elf.c (setup_group): Warning fixes.
735 * elflink.h (elf_link_sort_relocs): Likewise.
736 * pdp11.c (slurp_reloc_table): Likewise.
738 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
740 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
743 2001-10-15 H.J. Lu <hjl@gnu.org>
745 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
746 for relocations against discarded link-once section.
748 2001-10-15 Alan Modra <amodra@bigpond.net.au>
750 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
751 bfd_reloc_outofrange and similar errors.
753 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
754 rather than ind->weakdef.
755 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
756 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
757 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
758 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
759 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
761 2001-10-15 Alan Modra <amodra@bigpond.net.au>
762 H.J. Lu <hjl@gnu.org>
764 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
765 counts for aliases instead of aborting.
766 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
767 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
769 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
770 to -1 for non-function symbols.
771 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
772 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
773 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
774 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
775 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
776 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
777 plt.offset instead of plt.refcount when setting to -1.
779 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
781 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
782 like R_ARM_PC24. Include reloc number in error message about
785 2001-10-10 Jakub Jelinek <jakub@redhat.com>
787 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
788 relocations against the same symbol in .rel{,a}.dyn section.
790 2001-10-10 Kazu Hirata <kazu@hxi.com>
792 * aout-encap.c: Fix comment typos.
794 * archive.c: Likewise.
796 * coff64-rs6000.c: Likewise.
797 * coffcode.h: Likewise.
798 * coffgen.c: Likewise.
799 * cofflink.c: Likewise.
800 * coff-mips.c: Likewise.
802 * elf32-m32r.c: Likewise.
803 * libcoff-in.h: Likewise.
804 * libecoff.h: Likewise.
805 * libxcoff.h: Likewise.
806 * nlm32-i386.c: Likewise.
808 * section.c: Likewise.
811 * bfd-in2.h: Regenerate.
812 * libcoff.h: Likewise.
814 2001-10-10 Alan Modra <amodra@bigpond.net.au>
816 * elf.c (elf_map_symbols): Don't create new section symbols; Use
817 existing section syms. Update comments.
818 (copy_private_bfd_data): Formatting fixes.
819 (elfcore_grok_win32pstatus): Likewise.
820 (swap_out_syms): Likewise. Remove unnecessary level of braces.
822 2001-10-09 Alan Modra <amodra@bigpond.net.au>
824 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
826 (elf_group_name): Define.
827 (elf_next_in_group): Define.
828 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
829 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
830 first member section; Instead use elf_next_in_group.
831 (bfd_section_from_shdr): Likewise.
832 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
834 2001-10-09 Alan Modra <amodra@bigpond.net.au>
836 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
837 "next_in_group". Fix gp and gp_size comments.
838 * elf.c (union elf_internal_group): New.
839 (setup_group): New function.
840 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
841 Call setup_group for SHF_GROUP sections.
842 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
843 (elf_fake_sections): Set header type for SEC_GROUP, and header
844 flags for sections in a group.
845 (set_group_contents): New function.
846 (_bfd_elf_compute_section_file_positions): Call it.
847 (assign_section_numbers): Set sh_link for SHT_GROUP.
849 * elflink.h (gc_mark_hook): Handle section groups.
850 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
851 * section.c (SEC_GROUP): Define.
852 (struct sec): Comment fixes.
853 * bfd-in2.h: Regenerate.
855 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
856 out of function args.
857 (_bfd_elf_canonicalize_reloc): Similarly.
858 (_bfd_elf_get_symtab): Here too.
859 (_bfd_elf_canonicalize_dynamic_symtab): And here.
860 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
861 bfd_bread, and remove unnecessary cast.
863 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
865 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
867 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
869 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
872 2001-10-06 Alan Modra <amodra@bigpond.net.au>
874 * bfd.c (bfd_assert): Report bfd version.
875 (_bfd_abort): Likewise.
877 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
878 section sym values. Instead replace any relocs against them with
879 relocs against STN_UNDEF, which has a zero value.
881 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
884 2001-10-05 Jeff Law <law@redhat.com>
886 * som.h (som_exec_data): New field "version_id".
887 * som.c (som_object_setup): Record the version_id if it
889 (som_prep_headers): Do not initialize version_id here.
890 (som_finish_writing): Initialize version_id here.
892 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
894 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
895 according to the MIPS/SGI ELF64 ABI Draft.
896 (mips_elf_sort_hash_table): Typo.
898 2001-10-04 Alan Modra <amodra@bigpond.net.au>
900 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
902 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
903 copying flags if this is a weakdef.
905 2001-10-04 Alan Modra <amodra@bigpond.net.au>
907 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
910 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
911 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
912 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
914 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
915 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
916 backends we configure. Run "make dep-am".
917 (install-data-local): Install symcat.h.
918 * dep-in.sed: Remove symcat.h from dependencies.
919 * Makefile.in: Regenerate.
921 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
923 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
925 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
927 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
928 (elf_backend_default_use_rela_p): New define.
930 2001-10-03 Alan Modra <amodra@bigpond.net.au>
932 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
935 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
936 * configure: Regenerate.
937 * Makefile.am (BFD_H_FILES): Add version.h.
938 * Makefile.in: Regenerate.
939 * po/SRC-POTFILES.in: Regenerate.
941 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
942 elf_backend_copy_indirect_symbol so that backend has a chance to
943 copy other necessary fields.
944 * elf-bfd.h (struct elf_backend_data): Update description of
945 elf_backend_copy_indirect_symbol.
946 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
947 copying flags if this is a weakdef.
948 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
949 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
950 than bfd_link_hash_lookup.
951 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
952 reloc processing for weakdefs.
953 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
954 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
956 2001-10-02 Alan Modra <amodra@bigpond.net.au>
958 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
959 result of ELF64_R_TYPE to enum before using in a switch.
960 (ppc64_elf_gc_mark_hook): Likewise.
961 (ppc64_elf_gc_sweep_hook): Likewise.
962 (ppc64_elf_reloc_type_class): Likewise.
964 2001-10-02 Alan Modra <amodra@bigpond.net.au>
966 * version.h: New file.
967 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
968 (BFD_VERSION_DATE): Define.
969 (BFD_VERSION_STRING): Define.
970 * configure.in: AC_SUBST bfd_version, bfd_version_date and
972 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
973 * bfd-in2.h: Regenerate.
974 * configure: Regenerate.
975 * Makefile.am: Run "make dep-am".
976 * Makefile.in: Regenerate.
978 * bfd-in.h: Include "symcat.h".
979 (CONCAT4): Redefine as for old CAT4.
980 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
981 Add warning regarding whitespace.
982 * aout-cris.c: Likewise.
983 * aout-ns32k.c: Likewise.
984 * aout-sparcle.c: Likewise.
985 * aout-tic30.c: Likewise.
987 * armnetbsd.c: Likewise.
988 * demo64.c: Likewise.
989 * elf-bfd.h: Likewise.
990 * gen-aout.c: Likewise.
991 * host-aout.c: Likewise.
992 * hp300bsd.c: Likewise.
993 * hp300hpux.c: Likewise.
994 * i386aout.c: Likewise.
995 * i386bsd.c: Likewise.
996 * i386dynix.c: Likewise.
997 * i386freebsd.c: Likewise.
998 * i386linux.c: Likewise.
999 * i386lynx.c: Likewise.
1000 * i386mach3.c: Likewise.
1001 * i386netbsd.c: Likewise.
1002 * libaout.h: Likewise.
1003 * m68k4knetbsd.c: Likewise.
1004 * m68klinux.c: Likewise.
1005 * m68klynx.c: Likewise.
1006 * m68knetbsd.c: Likewise.
1007 * m88kmach3.c: Likewise.
1008 * mipsbsd.c: Likewise.
1009 * newsos3.c: Likewise.
1010 * ns32knetbsd.c: Likewise.
1011 * pc532-mach.c: Likewise.
1012 * pdp11.c: Likewise.
1013 * riscix.c: Likewise.
1014 * sparclinux.c: Likewise.
1015 * sparclynx.c: Likewise.
1016 * sparcnetbsd.c: Likewise.
1017 * sunos.c: Likewise.
1018 * targets.c: Likewise.
1019 * vaxnetbsd.c: Likewise.
1020 * vms-hdr.c: Likewise.
1022 2001-10-01 Alan Modra <amodra@bigpond.net.au>
1024 * bfd-in.h: Remove comments regarding generated files.
1025 * libbfd-in.h: Likewise.
1026 * libcoff-in.h: Likewise.
1027 * bfd-in2.h: Regenerate.
1028 * libbfd.h: Likewise.
1029 * libcoff.h: Likewise.
1031 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
1032 Hans-Peter Nilsson <hp@bitrange.com>
1034 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1035 partial_inplace, matching assembler output. Set src_mask to
1037 (sh_elf_relocate_section): Delete misplaced comment.
1038 For relocatable linking against section symbol, call
1039 _bfd_relocate_contents for partial_inplace relocs and adjust
1040 rel->r_addend for others.
1041 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1042 bfd_get_32, not at rel->r_addend.
1044 2001-09-30 Alan Modra <amodra@bigpond.net.au>
1046 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1047 the old dir refcount, so we indirectly set them to init_refcount.
1048 Short-circuit asserts when we've just verified they are true.
1050 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1052 * section.c (struct sec): Remove kept_section.
1053 (STD_SECTION): Remove kept_section initialisation.
1054 (bfd_make_section_anyway): Here too.
1055 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1056 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1057 * elflink.h (elf_link_input_bfd): Set discarded link-once section
1058 symbols to zero, and remove all code involved with kept_section
1059 and tracking section symbol values.
1060 * bfd-in2.h: Regenerate.
1061 * configure.in: Bump version number.
1062 * configure: Regenerate.
1064 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1066 * elf64-ppc.c (struct ppc_dyn_relocs): New.
1067 (IS_ABSOLUTE_RELOC): Define.
1068 (struct ppc_link_hash_entry): New.
1069 (struct ppc_link_hash_table): New.
1070 (ppc_hash_table): Define.
1071 (link_hash_newfunc): New function.
1072 (ppc64_elf_link_hash_table_create): New function.
1073 (create_got_section): New function.
1074 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
1075 pointers to our dynamic sections in hash table.
1076 (ppc64_elf_copy_indirect_symbol): New function.
1077 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
1078 dynamic sections. Localise vars. Modify code for refcounts
1079 starting from zero. Don't allocate here, or force symbols dynamic.
1080 Don't copy all relocs if shared, select ones we need. Add code
1081 to track possible copy relocs for non-shared link.
1082 (ppc64_elf_gc_mark_hook): Update comment.
1083 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1084 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
1085 code for reference counting garbage collection. Don't create .plt
1086 entries for functions that don't comply with ABI naming convention,
1087 and don't allocate .plt space here. Use short-cuts to dynamic
1088 sections. If possible, keep dynamic relocations instead of using
1089 copy relocs. Remove confused comments.
1090 (ppc_adjust_dynindx): Delete.
1091 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1092 (allocate_dynrelocs): New function.
1093 (readonly_dynrelocs): New function.
1094 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
1095 space here, and call allocate_dynrelocs to allocate space for
1096 global .plt, .got and reloc sections. Use short-cuts to dynamic
1097 sections. Call readonly_dynrelocs to determine whether we need
1098 DT_TEXTREL. Don't generate section symbols here, the generic
1099 ELF linker code does it for us.
1100 (ppc64_elf_final_link): Call regular ELF backend linker rather than
1101 gc variety, since we do our own .got handling.
1102 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
1103 dynamic section short-cuts. Localise vars, and delay setting.
1104 Handle unknown relocs in main switch statement. Replace ugly
1105 complicated tests for unresolvable relocs with a simple direct
1106 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
1107 before allowing an undefined sym in a shared lib. Do R_*_DS tests
1108 after main switch, when we've set addend. Do non-addend insn
1109 tweaks before main swithc. Ignore input_section->vma when
1110 calculating reloc offsets as it's always zero. Rewrite dynamic
1111 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
1112 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
1113 of dynamic section short-cuts. Reorganise .plt handling code.
1114 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
1115 Move expressions out of swap_reloca_out function calls.
1116 (ppc64_elf_reloc_type_class): New function.
1117 (ppc64_elf_info_to_howto): Move common expression to local var.
1118 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
1119 of dynamic section short-cuts. Don't fiddle with section syms
1120 here as the ELF linker does it for us.
1121 (elf_backend_can_refcount): Define.
1122 (bfd_elf64_bfd_link_hash_table_create): Define.
1123 (elf_backend_copy_indirect_symbol): Define.
1124 (elf_backend_reloc_type_class): Define.
1125 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1127 2001-09-29 Alan Modra <amodra@bigpond.net.au>
1129 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1130 (struct elf_backend_data): Add can_refcount.
1131 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
1132 got.refcount and plt.refcount from init_refcount.
1133 (_bfd_elf_link_hash_table_init): Set up init_refcount.
1134 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1135 rather than got/plt.offset, and test for <= 0 rather than -1.
1136 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1137 * elfxx-target.h (elf_backend_can_refcount): Define.
1138 (elfNN_bed): Init can_refcount.
1139 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1140 (_bfd_generic_link_hash_newfunc): Likewise.
1141 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1143 (elf_backend_can_refcount): Define.
1144 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1146 (elf32_hppa_copy_indirect_symbol): Make static to agree with
1148 (elf_backend_can_refcount): Define.
1149 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1151 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1152 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1153 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1154 (elf_backend_can_refcount): Define.
1155 (elf_i386_copy_indirect_symbol): Make static to agree with
1156 prototype. Formatting fix.
1157 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1159 (elf_backend_can_refcount): Define.
1160 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1162 (elf_backend_can_refcount): Define.
1163 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1165 (elf_backend_can_refcount): Define.
1166 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1168 (elf_backend_can_refcount): Define.
1169 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1171 (elf_backend_can_refcount): Define.
1173 * som.c (som_write_symbol_strings): Cast current_offset in
1174 bfd_seek call to match param type.
1176 2001-09-28 J. Brobecker <brobecker@gnat.com>
1178 * som.c (som_write_symbol_strings): Fix incorrect type of
1179 current_offset to match the function definition. Fixes a build
1180 failure on HPUX-11.00.
1182 2001-09-28 Richard Henderson <rth@redhat.com>
1184 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1185 SEC_MERGE, SEC_STRINGS.
1187 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1188 * bfd-in2.h: Rebuild.
1190 2001-09-28 Alan Modra <amodra@bigpond.net.au>
1192 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1193 reloc code using x86_64_reloc_map.
1195 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1196 no longer allocate here. Localise some vars to blocks where they
1198 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
1199 setting of vars until needed.
1200 (allocate_dynrelocs): Don't create a .plt entry without a reloc
1201 when symbol visibilty makes a function local.
1202 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1203 swap_reloca_out function calls.
1204 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
1205 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1208 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1209 no longer allocate here. Localise some vars to blocks where they
1210 are used. Remove separate switch stmt for creating .got sec.
1211 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
1212 redundant casts and aborts. Delay setting of vars until needed.
1213 (allocate_dynrelocs): Remove redundant casts and aborts.
1214 (elf_i386_size_dynamic_sections): Move comment.
1215 (elf_i386_finish_dynamic_symbol): Move expressions out of function
1217 (elf_i386_relocate_section): Likewise. Comment typo fix.
1218 (elf_i386_finish_dynamic_sections): Migrate common code out of
1220 (elf_backend_* defines): Sort.
1222 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1223 without a reloc when symbol visibilty makes a function local.
1225 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
1227 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1228 conflicting float flags.
1230 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1232 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1233 (elf_backend_copy_indirect_symbol): Define.
1234 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1235 (struct elf_i386_link_hash_table): Likewise.
1236 (link_hash_newfunc): Get rid of unnecessary casts.
1237 (elf_i386_link_hash_table_create): Likewise.
1238 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1239 Don't test input section SEC_READONLY here to try to avoid copy
1240 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1241 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1242 here to properly test whether we need copy relocs. Do so for weak
1245 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1246 (elf_backend_copy_indirect_symbol): Define.
1247 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1248 (stub_hash_newfunc): Get rid of unnecessary casts.
1249 (hppa_link_hash_newfunc): Likewise.
1250 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1251 Don't test input section SEC_READONLY here to try to avoid copy
1252 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1253 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1254 here to properly test whether we need copy relocs. Do so for weak
1257 2001-09-26 Alan Modra <amodra@bigpond.net.au>
1259 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1260 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1261 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1263 2001-09-25 Jakub Jelinek <jakub@redhat.com>
1265 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1268 2001-09-25 H.J. Lu <hjl@gnu.org>
1270 * bfd-in2.h: Regenerated.
1272 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1274 * elf32-i386.c: Add comment re linker function names and ordering.
1275 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1276 (elf_i386_grok_prstatus): Move before linker functions.
1277 (elf_i386_grok_psinfo): Likewise.
1278 (elf_i386_fake_sections): Move so that functions are ordered.
1279 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
1281 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1283 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1286 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
1287 code handling this option.
1288 (LONG_BRANCH_VIA_PLT): Likewise.
1289 (RELATIVE_DYNRELOCS): Define as zero.
1290 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1291 "pc_count" fields. Remove "section" field.
1292 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1293 (elf32_hppa_check_relocs): Don't allocate space for dynamic
1294 relocs here. Instead, record all needed dynamic relocs via
1295 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
1296 in elf_section_data.
1297 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1298 (allocate_plt_and_got_and_discard_relocs): Rename to
1299 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1300 (readonly_dynrelocs): New function.
1301 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1302 Call readonly_dynrelocs to determine need for DT_TEXTREL.
1303 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1304 (elf32_hppa_relocate_section): Make use of cached sreloc.
1305 (elf32_hppa_reloc_type_class): New function.
1306 (elf_backend_reloc_type_class): Define.
1308 2001-09-25 Alan Modra <amodra@bigpond.net.au>
1310 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1311 and "sreloc" fields.
1312 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1313 "pc_count" fields. Remove "section" field.
1314 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
1315 allocate space for dynamic relocs here. Instead, record all
1316 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
1317 pointer to "sreloc" section in elf_section_data.
1318 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1319 (allocate_plt_and_got_and_discard_relocs): Rename to
1320 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
1321 (readonly_dynrelocs): New function.
1322 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1323 Rename "i" to "ibfd". Allocate space for local dyn relocs.
1324 (elf_i386_relocate_section): Make use of cached sreloc.
1326 2001-09-24 Alan Modra <amodra@bigpond.net.au>
1328 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1329 reloc rather than just the type.
1330 (_bfd_elf_reloc_type_class): Likewise.
1331 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1332 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1333 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1334 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1335 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1336 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1337 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1338 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1339 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1340 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1341 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1342 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1343 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1344 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1345 * elflink.h: Formatting fixes.
1346 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1347 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
1348 o->contents to PTR. Update call to elf_backend_reloc_type_class.
1350 2001-09-22 John Reiser <jreiser@BitWagon.com>
1352 * elfcode.h (elf_object_p): Allow for no section header at all in
1353 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
1355 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1357 * elfxx-ia64.c: Fix compile time warning messages.
1358 * coff-mcore.c: Fix compile time warning messages.
1359 * coff-ppc.c: Fix compile time warning messages.
1360 * coffcode.h: Fix compile time warning messages.
1361 * elf32-mips.c: Fix compile time warning messages.
1362 * elf64-alpha.c: Fix compile time warning messages.
1363 * libbfd.c: Fix compile time warning messages.
1364 * bfd-in2.h: Regenerate.
1366 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1368 * Makefile.am: Run "make dep-am".
1369 * Makefile.in: Regenerate.
1371 * aoutx.h: Formatting fixes.
1372 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1374 * linker.c: Replace bfd_get_filename with bfd_archive_filename
1377 2001-09-21 Alan Modra <amodra@bigpond.net.au>
1379 * bfd.c (bfd_archive_filename): New function.
1380 * bfd-in2.h: Regenerate.
1381 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1382 in error messages where the bfd is an input bfd.
1383 * aout-cris.c: Likewise.
1384 * coff-arm.c: Likewise.
1385 * coff-mcore.c: Likewise.
1386 * coff-ppc.c: Likewise.
1387 * coff-rs6000.c: Likewise.
1388 * coff-sh.c: Likewise.
1389 * coff-tic54x.c: Likewise.
1390 * coff-tic80.c: Likewise.
1391 * coff64-rs6000.c: Likewise.
1392 * coffcode.h: Likewise.
1393 * coffgen.c: Likewise.
1394 * cofflink.c: Likewise.
1395 * ecofflink.c: Likewise.
1396 * elf-hppa.h: Likewise.
1398 * elf32-arm.h: Likewise.
1399 * elf32-cris.c: Likewise.
1400 * elf32-gen.c: Likewise.
1401 * elf32-hppa.c: Likewise.
1402 * elf32-i370.c: Likewise.
1403 * elf32-i386.c: Likewise.
1404 * elf32-m32r.c: Likewise.
1405 * elf32-mcore.c: Likewise.
1406 * elf32-mips.c: Likewise.
1407 * elf32-ppc.c: Likewise.
1408 * elf32-s390.c: Likewise.
1409 * elf32-sh.c: Likewise.
1410 * elf32-sparc.c: Likewise.
1411 * elf32-v850.c: Likewise.
1412 * elf64-alpha.c: Likewise.
1413 * elf64-gen.c: Likewise.
1414 * elf64-ppc.c: Likewise.
1415 * elf64-s390.c: Likewise.
1416 * elf64-sparc.c: Likewise.
1417 * elf64-x86-64.c: Likewise.
1418 * elflink.h: Likewise.
1419 * elfxx-ia64.c: Likewise.
1422 * libbfd.c: Likewise.
1423 * pdp11.c: Likewise.
1424 * pe-mips.c: Likewise.
1425 * peicode.h: Likewise.
1427 * xcofflink.c: Likewise.
1429 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1431 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1434 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1437 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1438 Consolidate error messages, and split long messages to two lines.
1440 2001-09-20 John Reiser <jreiser@BitWagon.com>
1442 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1443 and info->allow_shlib_undefined.
1444 * elf32-cris.c: Likewise.
1445 * elf32-hppa.c: Likewise.
1446 * elf32-m68k.c: Likewise.
1447 * elf32-mips.c: Likewise.
1448 * elf32-ppc.c: Likewise.
1449 * elf32-s390.c: Likewise.
1450 * elf32-sh.c: Likewise.
1451 * elf32-sparc.c: Likewise.
1452 * elf64-alpha.c: Likewise.
1453 * elf64-hppa.c: Likewise.
1454 * elf64-ppc.c: Likewise.
1455 * elf64-s390.c: Likewise.
1456 * elf64-sparc.c: Likewise.
1457 * elf64-x86-64.c: Likewise.
1458 * elfxx-ia64.c: Likewise.
1460 2001-09-18 Bruno Haible <haible@clisp.cons.org>
1462 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1463 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1464 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1465 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1466 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1467 (bfd_default_scan): Use ISDIGIT instead of isdigit.
1468 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1469 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1470 isxdigit/isdigit/islower.
1471 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1472 (mangle_name): Use ISALNUM instead of isalnum.
1473 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1474 (scan): Use ISDIGIT instead of isdigit.
1475 * hosts/alphavms.h: Don't include <ctype.h>.
1476 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1477 (ieee_object_p): Use TOUPPER instead of toupper.
1478 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1479 (ihex_bad_byte): Use ISPRINT instead of isprint.
1480 * merge.c: Don't include <ctype.h>.
1481 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1482 (oasys_write_sections): Use ISDIGIT instead of isdigit.
1483 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1484 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1485 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1486 (mangle_name): Use ISALNUM instead of isalnum.
1487 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1488 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1489 isupper/islower/isdigit.
1490 (som_decode_symclass): Use TOUPPER instead of toupper.
1491 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1492 (srec_bad_byte): Use ISPRINT instead of isprint.
1493 (srec_scan): Use ISSPACE instead of isspace.
1494 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1495 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1496 * syms.c: Include "safe-ctype.h"
1497 (islower, toupper): Remove macro definitions.
1498 (bfd_decode_symclass): Use TOUPPER instead of toupper.
1499 * vms-gsd.c: Don't include <ctype.h>.
1500 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1501 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1503 * vms-tir.c: Don't include <ctype.h>.
1505 2001-09-18 Alan Modra <amodra@bigpond.net.au>
1507 * libbfd.c (bfd_bread): New function replacing bfd_read without
1508 redundant params. Allow reads up to (size_t) -2 in length.
1509 (bfd_bwrite): Similarly for bfd_write.
1510 (real_read): Return a size_t.
1511 (bfd_read): Call bfd_bread.
1512 (bfd_write): Call bfd_bwrite.
1513 (warn_deprecated): New function to annoy everybody.
1514 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1515 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1516 (bfd_read, bfd_write): Define as macro.
1517 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1518 likewise for bfd_write. Ensure function args are correct size by
1519 using casts or local vars. In some cases, remove unnecessary
1520 casts. Formatting fixes, in some cases removing a large expression
1521 from function args by using a local var. Replace CONST with const.
1522 Modify variable types to avoid warings. Use casts to avoid
1523 warnings when using negative numbers in unsigned expressions.
1524 * aout-adobe.c: Likewise.
1525 * aout-arm.c: Likewise.
1526 * aout-cris.c: Likewise.
1527 * aout-encap.c: Likewise.
1528 * aout-ns32k.c: Likewise.
1529 * aout-target.h: Likewise.
1530 * aout-tic30.c: Likewise.
1531 * aoutf1.h: Likewise.
1532 * aoutx.h: Likewise.
1533 * archive.c: Likewise.
1534 * archures.c: Likewise.
1535 * bfd-in.h: Likewise.
1537 * binary.c: Likewise.
1539 * cache.c: Likewise.
1540 * cisco-core.c: Likewise.
1541 * coff-a29k.c: Likewise.
1542 * coff-alpha.c: Likewise.
1543 * coff-arm.c: Likewise.
1544 * coff-h8300.c: Likewise.
1545 * coff-h8500.c: Likewise.
1546 * coff-i386.c: Likewise.
1547 * coff-i860.c: Likewise.
1548 * coff-i960.c: Likewise.
1549 * coff-ia64.c: Likewise.
1550 * coff-m68k.c: Likewise.
1551 * coff-m88k.c: Likewise.
1552 * coff-mcore.c: Likewise.
1553 * coff-mips.c: Likewise.
1554 * coff-ppc.c: Likewise.
1555 * coff-rs6000.c: Likewise.
1556 * coff-sh.c: Likewise.
1557 * coff-sparc.c: Likewise.
1558 * coff-stgo32.c: Likewise.
1559 * coff-tic30.c: Likewise.
1560 * coff-tic54x.c: Likewise.
1561 * coff-tic80.c: Likewise.
1562 * coff-w65.c: Likewise.
1563 * coff-z8k.c: Likewise.
1564 * coff64-rs6000.c: Likewise.
1565 * coffcode.h: Likewise.
1566 * coffgen.c: Likewise.
1567 * cofflink.c: Likewise.
1568 * coffswap.h: Likewise.
1569 * corefile.c: Likewise.
1570 * cpu-arc.c: Likewise.
1571 * cpu-h8300.c: Likewise.
1572 * cpu-h8500.c: Likewise.
1573 * cpu-i960.c: Likewise.
1574 * cpu-ia64-opc.c: Likewise.
1575 * cpu-ns32k.c: Likewise.
1576 * cpu-pdp11.c: Likewise.
1577 * cpu-pj.c: Likewise.
1578 * cpu-sh.c: Likewise.
1579 * cpu-w65.c: Likewise.
1580 * cpu-z8k.c: Likewise.
1581 * dwarf1.c: Likewise.
1582 * dwarf2.c: Likewise.
1583 * ecoff.c: Likewise.
1584 * ecofflink.c: Likewise.
1585 * ecoffswap.h: Likewise.
1586 * elf-bfd.h: Likewise.
1587 * elf-hppa.h: Likewise.
1588 * elf-m10200.c: Likewise.
1589 * elf-m10300.c: Likewise.
1591 * elf32-arc.c: Likewise.
1592 * elf32-arm.h: Likewise.
1593 * elf32-avr.c: Likewise.
1594 * elf32-cris.c: Likewise.
1595 * elf32-fr30.c: Likewise.
1596 * elf32-gen.c: Likewise.
1597 * elf32-h8300.c: Likewise.
1598 * elf32-hppa.c: Likewise.
1599 * elf32-i370.c: Likewise.
1600 * elf32-i386.c: Likewise.
1601 * elf32-i860.c: Likewise.
1602 * elf32-m32r.c: Likewise.
1603 * elf32-m68k.c: Likewise.
1604 * elf32-mcore.c: Likewise.
1605 * elf32-mips.c: Likewise.
1606 * elf32-openrisc.c: Likewise.
1607 * elf32-pj.c: Likewise.
1608 * elf32-ppc.c: Likewise.
1609 * elf32-s390.c: Likewise.
1610 * elf32-sh-lin.c: Likewise.
1611 * elf32-sh.c: Likewise.
1612 * elf32-sparc.c: Likewise.
1613 * elf32-v850.c: Likewise.
1614 * elf64-alpha.c: Likewise.
1615 * elf64-hppa.c: Likewise.
1616 * elf64-mips.c: Likewise.
1617 * elf64-ppc.c: Likewise.
1618 * elf64-s390.c: Likewise.
1619 * elf64-sparc.c: Likewise.
1620 * elf64-x86-64.c: Likewise.
1621 * elfarm-nabi.c: Likewise.
1622 * elfcode.h: Likewise.
1623 * elfcore.h: Likewise.
1624 * elflink.c: Likewise.
1625 * elflink.h: Likewise.
1626 * elfxx-ia64.c: Likewise.
1627 * elfxx-target.h: Likewise.
1628 * format.c: Likewise.
1630 * hp300hpux.c: Likewise.
1631 * hppabsd-core.c: Likewise.
1632 * hpux-core.c: Likewise.
1633 * i386aout.c: Likewise.
1634 * i386dynix.c: Likewise.
1635 * i386linux.c: Likewise.
1636 * i386lynx.c: Likewise.
1637 * i386mach3.c: Likewise.
1638 * i386msdos.c: Likewise.
1639 * i386os9k.c: Likewise.
1642 * irix-core.c: Likewise.
1643 * libaout.h: Likewise.
1644 * libbfd-in.h: Likewise.
1645 * libbfd.c: Likewise.
1646 * libcoff-in.h: Likewise.
1647 * libecoff.h: Likewise.
1648 * libieee.h: Likewise.
1649 * libnlm.h: Likewise.
1650 * libpei.h: Likewise.
1651 * libxcoff.h: Likewise.
1652 * linker.c: Likewise.
1653 * lynx-core.c: Likewise.
1654 * m68klinux.c: Likewise.
1655 * merge.c: Likewise.
1656 * mipsbsd.c: Likewise.
1657 * netbsd-core.c: Likewise.
1659 * nlm32-alpha.c: Likewise.
1660 * nlm32-i386.c: Likewise.
1661 * nlm32-ppc.c: Likewise.
1662 * nlm32-sparc.c: Likewise.
1663 * nlmcode.h: Likewise.
1664 * nlmswap.h: Likewise.
1665 * ns32k.h: Likewise.
1666 * oasys.c: Likewise.
1667 * opncls.c: Likewise.
1668 * osf-core.c: Likewise.
1669 * pc532-mach.c: Likewise.
1670 * pdp11.c: Likewise.
1671 * pe-mips.c: Likewise.
1672 * peXXigen.c: Likewise.
1673 * peicode.h: Likewise.
1674 * ppcboot.c: Likewise.
1675 * ptrace-core.c: Likewise.
1676 * reloc.c: Likewise.
1677 * reloc16.c: Likewise.
1678 * riscix.c: Likewise.
1679 * rs6000-core.c: Likewise.
1680 * sco5-core.c: Likewise.
1681 * section.c: Likewise.
1683 * sparclinux.c: Likewise.
1684 * sparclynx.c: Likewise.
1686 * stabs.c: Likewise.
1687 * sunos.c: Likewise.
1689 * targets.c: Likewise.
1690 * tekhex.c: Likewise.
1691 * trad-core.c: Likewise.
1692 * versados.c: Likewise.
1693 * vms-gsd.c: Likewise.
1694 * vms-hdr.c: Likewise.
1695 * vms-misc.c: Likewise.
1696 * vms-tir.c: Likewise.
1699 * xcofflink.c: Likewise.
1700 * bfd-in2.h: Regenerate.
1701 * libbfd.h: Regenerate.
1702 * libcoff.h: Regenerate.
1704 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1705 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1706 (ufile_ptr): Define.
1707 (bfd_tell): Return a ufile_ptr.
1708 * libbfd.c (bfd_tell): Likewise.
1709 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1711 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1712 * aoutf1.h: Likewise.
1714 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1715 larger than unsigned long can represent.
1717 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1718 size overflows size_t.
1719 (bfd_realloc): Likewise.
1720 (bfd_zmalloc): Likewise.
1721 * opncls.c (bfd_alloc): Likewise.
1722 (bfd_zalloc): Likewise.
1723 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1724 (bfd_alloc, bfd_zalloc): Update.
1726 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1728 (bfd_get_signed_8): Likewise.
1729 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1730 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1731 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1732 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1733 * libaout.h: Likewise define and use here.
1734 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1735 * aout-arm.c: Likewise.
1736 * aout-encap.c: Likewise.
1737 * aout-ns32k.c: Likewise.
1738 * aout-tic30.c: Likewise.
1739 * aoutf1.h: Likewise.
1740 * aoutx.h: Likewise.
1742 * coff-alpha.c: Likewise.
1743 * coff-h8300.c: Likewise.
1744 * coff-h8500.c: Likewise.
1745 * coff-i960.c: Likewise.
1746 * coff-ia64.c: Likewise.
1747 * coff-m88k.c: Likewise.
1748 * coff-mips.c: Likewise.
1749 * coff-ppc.c: Likewise.
1750 * coff-rs6000.c: Likewise.
1751 * coff-sh.c: Likewise.
1752 * coff-sparc.c: Likewise.
1753 * coff-stgo32.c: Likewise.
1754 * coff-tic30.c: Likewise.
1755 * coff-tic80.c: Likewise.
1756 * coff-w65.c: Likewise.
1757 * coff-z8k.c: Likewise.
1758 * coff64-rs6000.c: Likewise.
1759 * coffgen.c: Likewise.
1760 * cofflink.c: Likewise.
1761 * coffswap.h: Likewise.
1762 * ecoff.c: Likewise.
1763 * ecoffswap.h: Likewise.
1765 * elf32-mips.c: Likewise.
1766 * elf64-mips.c: Likewise.
1767 * hp300hpux.c: Likewise.
1768 * i386dynix.c: Likewise.
1769 * i386lynx.c: Likewise.
1770 * i386msdos.c: Likewise.
1771 * i386os9k.c: Likewise.
1772 * libpei.h: Likewise.
1773 * nlm32-alpha.c: Likewise.
1774 * nlm32-i386.c: Likewise.
1775 * nlm32-ppc.c: Likewise.
1776 * nlmcode.h: Likewise.
1777 * nlmswap.h: Likewise.
1778 * oasys.c: Likewise.
1779 * pdp11.c: Likewise.
1780 * pe-mips.c: Likewise.
1781 * peXXigen.c: Likewise.
1782 * peicode.h: Likewise.
1783 * riscix.c: Likewise.
1784 * sunos.c: Likewise.
1785 * xcofflink.c: Likewise.
1786 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1787 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1788 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1789 equivalent H_PUT_* macro instead.
1790 (GETWORD, GETHALF, GETBYTE): Similarly.
1791 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1792 (GETWORD, GETHALF, GETBYTE): Likewise.
1793 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1795 * bfd-in.h (struct orl): Change "pos" to a union.
1796 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1797 (bsd_write_armap): Here too.
1798 (coff_write_armap): And here.
1799 * coff-rs6000.c (xcoff_write_armap_old): And here.
1800 (xcoff_write_one_armap_big): And here.
1801 (xcoff_write_armap_big): And here.
1802 * ecoff.c (_bfd_ecoff_write_armap): And here.
1803 * elf64-mips.c (mips_elf64_write_armap): And here.
1805 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1806 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1807 * elf32-h8300.c (elf32_h8_mach): Likewise.
1808 * elf32-mips.c (elf_mips_mach): Likewise.
1809 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1811 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1813 (aix386_core_vec): Typo fix.
1815 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1816 etc. to avoid redefined macro warning.
1817 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1818 (MY(fix_pcrel_26)): Likewise.
1819 * aout-ns32k.c (MY(put_reloc)): Likewise.
1820 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1821 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1822 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1824 * aout-encap.c: Include "file", not <file> for binutils headers.
1825 (encap_object_p): Half baked attempt to fix compile errors in
1826 code dealing with "magic".
1828 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1829 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1830 bfd_vma's rather than longs.
1831 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1832 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1833 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1835 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1836 Use unsigned comparisons.
1837 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1838 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1839 (_bfd_do_ns32k_reloc_contents): Likewise.
1840 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1841 (_bfd_ns32k_get_immediate): Likewise.
1842 (_bfd_ns32k_put_displacement): Likewise.
1843 (_bfd_ns32k_put_immediate): Likewise.
1844 (bfd_reloc_status_type): Likewise.
1846 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1848 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1849 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1850 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1852 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1853 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1854 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1856 (_bfd_elfcore_strndup): Likewise for "dup".
1857 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1858 "name" to avoid shadowing.
1859 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1860 definition of "off".
1861 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1862 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1864 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1866 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1868 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1870 (elf_link_input_bfd): Likewise.
1871 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1872 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1873 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1875 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1876 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1877 (sunos_write_dynamic_symbol): Remove unused vars.
1878 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1879 innermost "directory_name" and "file_name" vars.
1880 * tekhex.c (first_phase): Rename local var "type" to "stype".
1881 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1882 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1883 doing comparison at caller.
1884 (vms_esecflag_by_name): Likewise.
1885 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1886 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1887 (xcoff_write_global_symbol): Rename "p" param to "inf".
1889 * cisco-core.c: Add missing prototypes.
1890 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1891 (cisco_core_file_failing_signal): Likewise.
1892 (cisco_core_file_matches_executable_p): Likewise.
1893 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1894 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1895 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1896 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1898 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1899 thumb_glue_size and arm_glue_size.
1900 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1902 * coff64-rs6000.c: Group prototypes together.
1904 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1905 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1907 * cpu-arc.c: Add missing prototypes.
1908 * cpu-h8500.c: Likewise.
1909 * cpu-i960.c: Likewise.
1910 * cpu-pj.c: Likewise.
1911 * cpu-sh.c: Likewise.
1912 * cpu-w65.c: Likewise.
1913 * cpu-z8k.c: Likewise.
1914 * elf32-fr30.c: Likewise.
1915 * elf32-h8300.c: Likewise.
1916 * elf32-i370.c: Likewise.
1917 * hpux-core.c: Likewise.
1918 * versados.c: Likewise.
1920 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1921 * cpu-h8500.c: Likewise.
1922 * cpu-i960.c: Likewise.
1923 * cpu-z8k.c: Likewise.
1925 * cpu-ia64-opc.c: Correct comment.
1927 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1929 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1931 (bfd_elf32_write_out_phdrs): Likewise.
1932 (bfd_elf64_write_out_phdrs): Likewise.
1933 (elf_linker_section_pointers): Change addend to bfd_vma.
1934 (_bfd_elf_find_pointer_linker_section): Likewise.
1935 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1936 filepos to unsigned file_ptr.
1937 (_bfd_elfcore_strndup): Change max param to size_t.
1938 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1939 (_bfd_elfcore_strndup): Likewise.
1940 (_bfd_elf_find_pointer_linker_section): Likewise.
1942 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1943 insn and sym_value to ints.
1945 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1947 (elfcore_read_notes): Likewise.
1949 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1950 param from unsigned char to int.
1951 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1952 for info_to_howto call.
1953 (add_dynamic_entry): Define macro.
1954 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1956 * elf32-cris.c (add_dynamic_entry): Define macro.
1957 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1959 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1960 (elf32_h8_object_p): Likewise.
1961 (elf32_h8_merge_private_bfd_data): Likewise.
1962 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1964 * elf32-hppa.c (add_dynamic_entry): Define macro.
1965 (elf32_hppa_size_dynamic_sections): Use it.
1966 * elf32-i370.c (add_dynamic_entry): Define macro.
1967 (i370_elf_size_dynamic_sections): Use it.
1968 (i370_noop): Make static.
1969 * elf32-i386.c (add_dynamic_entry): Define macro.
1970 (elf_i386_size_dynamic_sections): Use it.
1971 * elf32-m68k.c (add_dynamic_entry): Define macro.
1972 (elf_m68k_size_dynamic_sections): Use it.
1973 * elf32-ppc.c (add_dynamic_entry): Define macro.
1974 (ppc_elf_size_dynamic_sections): Use it.
1975 * elf32-s390.c (add_dynamic_entry): Define macro.
1976 (elf_s390_size_dynamic_sections): Use it.
1977 * elf64-alpha.c (add_dynamic_entry): Define macro.
1978 (elf64_alpha_size_dynamic_sections): Use it.
1979 * elf64-hppa.c (add_dynamic_entry): Define macro.
1980 (elf64_hppa_size_dynamic_sections): Use it.
1981 * elf64-ppc.c (add_dynamic_entry): Define macro.
1982 (ppc64_elf_size_dynamic_sections): Use it.
1983 * elf64-s390.c (add_dynamic_entry): Define macro.
1984 (elf_s390_size_dynamic_sections): Use it.
1985 * elf64-sparc.c (add_dynamic_entry): Define macro.
1986 (sparc64_elf_size_dynamic_sections): Use it.
1987 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1988 (elf64_x86_64_size_dynamic_sections): Use it.
1989 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1990 (elfNN_ia64_size_dynamic_sections): Use it.
1992 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1993 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1995 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1996 false if the first malloc fails rather than going via error_return.
1998 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2000 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2002 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2004 * elfxx-ia64.c (global_sym_index): Return a long.
2006 * ieee.c (get_symbol): Use int rather than char param.
2007 (ieee_slurp_sections): Move "section" var to inner blocks.
2008 (copy_expression): Don't init "value" to zero or worry about
2009 clearing to zero after using.
2010 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2013 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2016 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2017 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2019 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2021 * pc532-mach.c (MYNSX): Delete.
2022 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2023 (write_object_contents): Correct prototype.
2025 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2026 than unsigned short.
2028 * section.c (bfd_set_section_contents): Remove redundant
2029 "offset < 0" test. Check that "count" doesn't overflow size_t.
2030 (bfd_get_section_contents): Likewise.
2032 * som.c (som_fixup_formats): Add missing braces.
2033 (som_reloc_addend): Pass a bfd_vma for "addend".
2035 * srec.c (srec_write_record): Pass "type" as an unsigned int.
2036 (srec_write_symbols): Remove an unnecessary var.
2038 * targets.c (_bfd_target_vector): Sort entries. Sort externs
2040 * configure.in: Sort to match. Bump version number.
2041 * configure: Regenerate.
2043 * tekhex.c (move_section_contents): Assert offset == 0.
2045 * versados.c (new_symbol_string): Constify arg.
2046 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2047 (versados_get_symbol_info): Make static.
2048 (versados_print_symbol): Likewise.
2049 (versados_get_reloc_upper_bound): Likewise.
2050 (versados_canonicalize_reloc): Likewise.
2052 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
2054 * elflink.h (elf_link_input_bfd): Fix typo in error message.
2056 2001-09-17 H.J. Lu <hjl@gnu.org>
2058 * dwarf1.c (parse_die): Take a new arg for the end of the
2059 section. Return false if die is beyond the section.
2060 (parse_functions_in_unit): Pass the end of the section to
2062 (_bfd_dwarf1_find_nearest_line): Likewise.
2064 2001-09-14 Michael Rauch <mrauch@netbsd.org>
2066 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2067 just like R_SPARC_32.
2069 2001-09-14 Kevin Lo <kevlo@openbsd.org>
2071 * configure.bfd: Add arm-openbsd target.
2073 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2075 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2076 Add support for mips64.
2078 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
2080 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2082 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2084 * elf.c (prep_headers): Get the machine code from the elf
2086 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2087 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2088 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2089 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2090 * elf-arc.c (arc_elf_final_write_processing): Don't override
2091 e_machine, it's now properly set in prep_headers.
2092 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2094 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2095 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2096 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2097 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2098 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2099 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2100 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2101 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2102 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2103 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2104 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2105 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2107 2001-09-11 Richard Henderson <rth@redhat.com>
2109 * elf64-alpha.c (elf64_alpha_section_flags): New.
2110 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2112 2001-09-11 Richard Henderson <rth@redhat.com>
2114 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2115 apply HINT relocations against dynamic symbols.
2117 2001-09-11 H.J. Lu <hjl@gnu.org>
2119 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2121 2001-09-09 Richard Henderson <rth@redhat.com>
2123 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2125 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2126 following a call to a near function.
2128 2001-09-08 Richard Henderson <rth@redhat.com>
2130 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2131 relocation errors. Fail gp-relative relocations against
2134 2001-09-08 Alan Modra <amodra@bigpond.net.au>
2136 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2137 as well as DEF_DYNAMIC in test for avoided copy relocs.
2138 (allocate_plt_and_got_and_discard_relocs): Likewise.
2139 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2140 (allocate_plt_and_got_and_discard_relocs): Likewise.
2142 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2144 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2147 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2149 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2151 (mips_elf64_howto_table_rel): Likewise.
2153 2001-09-05 Tom Rix <trix@redhat.com>
2155 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2156 and syscall symbols.
2157 (write_global_symbol) : Same.
2158 (bfd_xcoff_export_symbol): Remove unused syscall param.
2159 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2160 bfd_xcoff_import_symbol.
2162 * bfd-in2.h : Regenerate.
2164 2001-09-04 Richard Henderson <rth@redhat.com>
2166 * elf64-alpha.c (SKIP_HOWTO): New.
2167 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2168 Fix sizes of 16-bit mem format relocs.
2169 (elf64_alpha_reloc_map): Update to match.
2170 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2171 (elf64_alpha_relax_without_lituse): Likewise.
2172 (elf64_alpha_check_relocs): Handle GPREL16.
2173 (elf64_alpha_relocate_section): Likewise.
2174 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2175 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2176 * bfd-in2.h, libbfd.h: Rebuild.
2178 2001-09-04 Jeff Law <law@redhat.com>
2180 * elf32-h8300.c (elf32_h8_relax_section): New function.
2181 (elf32_h8_relax_delete_bytes): Likewise.
2182 (elf32_h8_symbol_address_p): Likewise.
2183 (elf32_h8_get_relocated_section_contents): Likewise.
2184 (bfd_elf32_bfd_relax_section): Define.
2185 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2187 * elf32-h8300.c (special): New function.
2188 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2190 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2191 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
2192 Fix minor problems with 8bit and 16bit PC relative relocations.
2194 2001-09-01 Andreas Jaeger <aj@suse.de>
2196 * vms-tir.c: Add missing prototypes.
2197 * vms-hdr.c: Likewise.
2198 * vms-gsd.c: Likewise.
2199 * vms-misc.c: Likewise.
2201 2001-08-31 H.J. Lu <hjl@gnu.org>
2203 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2204 with bad relocation.
2206 2001-08-31 Eric Christopher <echristo@redhat.com>
2207 Jason Eckhardt <jle@redhat.com>
2209 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2210 mips32_4k and mips64.
2211 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2212 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2213 * bfd/cpu-mips.c: Ditto.
2214 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2215 * bfd/bfd-in2.h: Regenerate.
2217 2001-08-31 Jakub Jelinek <jakub@redhat.com>
2219 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2220 value into R_ALPHA_RELATIVE's addend.
2221 (elf64_alpha_finish_dynamic_symbol): Likewise.
2223 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
2225 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2226 recomputed addend during relocatable link if not USE_REL.
2228 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2231 2001-08-30 H.J. Lu <hjl@gnu.org>
2233 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2235 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2236 relocations for weak definitions.
2238 2001-08-30 H.J. Lu <hjl@gnu.org>
2240 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2241 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2242 * Makefile.in: Rebuild.
2244 2001-08-30 H.J. Lu <hjl@gnu.org>
2246 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2247 dynamic relocation for undefined weak symbols when creating
2248 executables. Check h->root.root.type, instead of h->root.type.
2250 2001-08-29 Joel Sherrill <joel@OARcorp.com>
2252 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2253 default from coff to elf.
2255 2001-08-29 Jeff Law <law@redhat.com>
2257 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2259 (h8_reloc_map): Similarly.
2260 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2261 Add support for PC relative relocations.
2263 * elf32-h8300.c: Put all prototypes together.
2264 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2265 (elf32_h8_final_link_relocate): New function for linker.
2266 (elf32_h8_relocate_section): Similarly.
2267 (elf_backend_relocate_section): Define.
2269 * cpu-h8300.c (h8300_scan, compatible): Prototype.
2270 (h8300_scan): Handle architecture:machine encodings typically
2271 found in linker scripts.
2272 * elf.c (prep_headers): Do not try to do H8 machine recognition
2274 * elf32-h8300.c: Add some missing prototypes.
2275 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2276 (elf32_h8_object_p): Similarly.
2278 2001-08-29 Tom Rix <trix@redhat.com>
2280 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
2281 does not follow a XTY_SD.
2283 2001-08-29 Alan Modra <amodra@bigpond.net.au>
2285 * targmatch.sed: Delete case statements.
2286 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2289 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
2291 * Makefile.am (elf32-h8300.lo): New target.
2292 * config.bfd (h8300*-*-elf): New case.
2293 * configure.in (bfd_elf32_h8300_vec): New case.
2294 * elf.c (prep_headers): Add case for bfd_arch_h8300.
2295 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2296 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2297 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2298 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2299 * elf32-h8300.c: New file.
2300 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2302 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
2304 * sparclynx.c: Add missing prototypes.
2305 * coff-mcore.c: Add missing prototypes.
2306 * elf32-pj.c: Add missing prototypes.
2307 * nlm32-sparc.c: Add missing prototypes.
2308 * oasys.c: Add missing prototypes.
2309 * pdp11.c: Add missing prototypes.
2310 * pe-mips.c: Add missing prototypes.
2311 * riscix.c: Add missing prototypes.
2313 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2315 * elf32-i386.c: Add missing prototypes.
2316 * elf32-ppc.c: Likewise.
2317 * elf32-sh-lin.c: Likewise.
2318 * elfarm-nabi.c: Likewise.
2320 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
2322 * elf32-i386.c (elf_i386_grok_prstatus): New function.
2323 (elf_i386_grok_psinfo): New function.
2324 (elf_backend_grok_prstatus): Define.
2325 (elf_backend_grok_psinfo): Likewise.
2326 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2327 (ppc_elf_grok_psinfo): New function.
2328 (elf_backend_grok_prstatus): Define.
2329 (elf_backend_grok_psinfo): Likewise.
2330 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2331 (elf32_shlin_grok_psinfo): New function.
2332 (elf_backend_grok_prstatus): Define.
2333 (elf_backend_grok_psinfo): Likewise.
2334 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2335 (elf32_arm_nabi_grok_psinfo): New function.
2336 (elf_backend_grok_prstatus): Define.
2337 (elf_backend_grok_psinfo): Likewise.
2339 2001-08-27 H.J. Lu <hjl@gnu.org>
2341 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2343 (mips_elf_calculate_relocation): Create dynamic relocation for
2344 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2347 2001-08-27 H.J. Lu <hjl@gnu.org>
2349 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2350 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2351 (_bfd_elf32_mips_grok_prstatus): Likewise.
2352 (_bfd_elf32_mips_grok_psinfo): Likewise.
2353 (_bfd_mips_elf_hide_symbol): Make it static and cast to
2354 `struct mips_elf_link_hash_entry *'.
2355 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2357 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
2359 * mipsbsd.c: Add missing prototypes.
2360 * hp300hpux.c: Add missing prototypes.
2361 * i386aout.c: Add missing prototypes.
2362 * i386lynx.c: Add missing prototypes.
2363 * i386mach3.c: Add missing prototypes.
2364 * i386msdos.c: Add missing prototypes.
2365 * i386os9k.c: Add missing prototypes.
2367 2001-08-27 Linus Nordberg <linus@swox.se>
2368 Torbjorn Granlund <tege@swox.com>
2369 Staffan Ulfberg <staffanu@swox.se>
2370 Alan Modra <amodra@bigpond.net.au>
2372 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
2373 targ64_selvecs for 32 bit powerpc targets.
2374 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2375 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2377 * Makefile.in: Regenerate.
2378 * configure.in: Add elf64_powerpc vecs.
2379 * configure: Regenerate.
2380 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2381 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2382 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2383 * elf64-ppc.c: New file.
2384 * reloc.c: Add powerpc64 relocs.
2385 * libbfd.h: Regenerate.
2386 * bfd-in2.h: Regenerate.
2388 2001-08-27 Andreas Schwab <schwab@suse.de>
2390 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2391 reloc is against read-only section.
2392 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2393 looking up section names for DT_TEXTREL.
2394 (elf32_m68k_reloc_type_class): New function.
2395 (elf_backend_reloc_type_class): Define.
2397 2001-08-27 Andreas Jaeger <aj@suse.de>
2399 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2400 reloc is against read-only section.
2401 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2402 looking up section names for DT_TEXTREL.
2403 (elf_s390_reloc_type_class): New.
2404 (elf_backend_reloc_type_class): Define.
2406 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2407 reloc is against read-only section.
2408 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2409 looking up section names for DT_TEXTREL.
2410 (elf_s390_reloc_type_class): New.
2411 (elf_backend_reloc_type_class): Define.
2413 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2414 is against read-only section.
2415 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2416 looking up section names for DT_TEXTREL.
2417 (ppc_elf_reloc_type_class): New.
2418 (elf_backend_reloc_type_class): Define.
2420 2001-08-26 Andreas Jaeger <aj@suse.de>
2422 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2423 reloc is against read-only section.
2424 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2425 looking up section names for DT_TEXTREL.
2426 (elf_cris_reloc_type_class): New.
2427 (elf_backend_reloc_type_class): Define.
2429 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2430 against read-only section.
2431 (elf_backend_reloc_type_class): Define.
2432 (sh_elf_reloc_type_class): New.
2433 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2434 looking up section names for DT_TEXTREL.
2436 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2437 reloc is against read-only section.
2438 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2439 looking up section names for DT_TEXTREL.
2440 (elf32_arm_reloc_type_class): New.
2441 (elf_backend_reloc_type_class): Define.
2443 2001-08-25 Andreas Jaeger <aj@suse.de>
2445 * oasys.c: Add missing prototypes.
2447 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2448 attribute for parameter.
2449 * elf.c (_bfd_elf_reloc_type_class): Likewise.
2451 * versados.c (get_4): Make static.
2452 (get_10): Make static.
2453 Add missing prototypes.
2454 (process_esd): Fix call to versados_new_symbol.
2456 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
2458 * coff-a29k.c: Add missing prototypes.
2459 * coff-apollo.c: Add missing prototypes.
2460 * coff-arm.c: Add missing prototypes.
2461 * coff-i860.c: Add missing prototypes.
2462 * coff-rs6000.c: Add missing prototypes.
2463 * coff-tic80.c: Add missing prototypes.
2464 * elf-m10200.c: Add missing prototypes.
2465 * elf-m10300.c: Add missing prototypes.
2466 * elf32-arm.h: Add missing prototypes.
2467 * elf32-d10v.c: Add missing prototypes.
2468 * elf32-m32r.c: Add missing prototypes.
2469 * elf32-mcore.c: Add missing prototypes.
2470 * elf32-openrisc.c: Add missing prototypes.
2471 * elf32-sh.c: Add missing prototypes.
2472 * elf32-sparc.c: Add missing prototypes.
2473 * elf32-v850.c: Add missing prototypes.
2474 * elfarm-nabi.c: Add missing prototypes.
2475 * elfarm-oabi.c: Add missing prototypes.
2477 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2479 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2480 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2482 2001-08-24 H.J. Lu <hjl@gnu.org>
2484 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2487 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
2489 * elf-bfd.h (elf_hash_table): Revert definition.
2490 (is_elf_hash_table): New macro.
2491 * elflink.h (elf_link_add_object_symbols): Test
2492 is_elf_hash_table before accessing ELF only fields in hash
2494 (elf_link_create_dynamic_sections): Fail if not using an ELF
2496 (elf_add_dynamic_entry): Fail if not using an ELF hash
2498 (elf_link_record_local_dynamic_symbol): Fail if not using an
2500 (size_dynamic_sections): Fail if not using an ELF hash
2502 (elf_adjust_dynamic_symbol): Fail if not using an ELF
2504 (elf_bfd_final_link): Fail if not using an ELF hash
2507 2001-08-24 H.J. Lu <hjl@gnu.org>
2509 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2510 table is not an ELF linker hash table.
2512 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2513 table type to bfd_link_elf_hash_table.
2515 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2518 * linker.c (_bfd_link_hash_table_init): Set the linker hash
2519 table type to bfd_link_generic_hash_table.
2521 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2523 * bfd.c (bfd_alt_mach_code): New function.
2524 * bfd-in2.h: Rebuilt.
2526 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2528 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2529 `type' field in the hash entry when deciding whether to follow a
2532 2001-08-24 Jakub Jelinek <jakub@redhat.com>
2534 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2536 (elf_link_sort_relocs): Adjust accordingly.
2538 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2539 (elf64_alpha_check_relocs): Set it if section this reloc is against
2540 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2542 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2543 is is against read-only section.
2544 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2545 check section names.
2546 (elf64_alpha_reloc_type_class): New.
2547 (elf_backend_reloc_type_class): Define.
2549 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2551 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2554 2001-08-23 Andreas Jaeger <aj@suse.de>
2556 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2557 the reloc is against read-only section.
2558 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2559 of looking up section names for DT_TEXTREL.
2560 (elf64_x86_64_reloc_type_class): New.
2561 (elf_backend_reloc_type_class): Define.
2563 2001-08-23 H.J. Lu <hjl@gnu.org>
2565 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2566 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2568 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2569 bfd_print_symbol_vandf.
2570 * coffgen.c (coff_print_symbol): Likewise.
2571 * elf.c (bfd_elf_print_symbol): Likewise.
2572 * ieee.c (ieee_print_symbol): Likewise.
2573 * nlmcode.h (nlm_print_symbol): Likewise.
2574 * oasys.c (oasys_print_symbol): Likewise.
2575 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2576 * som.c (som_print_symbol): Likewise.
2577 * srec.c (srec_print_symbol): Likewise.
2578 * tekhex.c (tekhex_print_symbol): Likewise.
2579 * versados.c (versados_print_symbol): Likewise.
2580 * vms.c (vms_print_symbol): Likewise.
2582 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2583 with bfd_fprintf_vma.
2584 (bfd_elf_print_symbol): Likewise.
2585 * syms.c (bfd_print_symbol_vandf): Likewise.
2587 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2589 * aoutf1.h (sunos_write_object_contents): Silence compile time
2591 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2593 * bout.c: Add missing function prototypes. Fix formatting.
2594 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2595 * coff-w65.c: Add missing function prototypes. Fix formatting.
2596 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2597 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2598 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2599 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2600 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2601 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2602 * coff-sh.c: Add missing function prototypes. Fix formatting.
2604 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2606 * elf-bfd.h (enum elf_reloc_type_class): New.
2607 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2608 (_bfd_elf_reloc_type_class): New.
2609 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2610 (elfNN_bed): Add elf_backend_reloc_type_class.
2611 * elf.c (_bfd_elf_reloc_type_class): New.
2612 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2613 is against read-only section.
2614 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2615 looking up section names for DT_TEXTREL.
2616 (elf_i386_reloc_type_class): New.
2617 (elf_backend_reloc_type_class): Define.
2618 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2619 reloc is against read-only section.
2620 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2621 looking up section names for DT_TEXTREL.
2622 (elf32_sparc_reloc_type_class): New.
2623 (elf_backend_reloc_type_class): Define.
2624 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2625 reloc is against read-only section.
2626 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2627 looking up section names for DT_TEXTREL.
2628 (sparc64_elf_reloc_type_class): New.
2629 (elf_backend_reloc_type_class): Define.
2630 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2631 (elfNN_ia64_hash_table_create): Clear ia64_info.
2632 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2634 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2635 instead of looking up section names for DT_TEXTREL.
2636 (elfNN_ia64_reloc_type_class): New.
2637 (elf_backend_reloc_type_class): Define.
2638 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2639 (struct elf_link_sort_rela): New.
2640 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2641 (elf_bfd_final_link): Call elf_link_sort_relocs.
2642 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2645 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2647 * configure.in (x86-bsdi): No corefile support.
2648 * configure: Regenerate.
2650 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2652 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2655 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2657 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2658 the alignment of dwarf2 linkonce sections to 0.
2659 * coff-sto32.c: Likewise.
2661 2001-08-20 Andreas Jaeger <aj@suse.de>
2663 * coff-sparc.c: Add missing prototypes.
2664 * elf32-s390.c: Likewise.
2665 * elf32-i960.c: Likewise.
2666 * aout-target.h: Likewise.
2668 2001-08-20 H.J. Lu <hjl@gnu.org>
2670 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2671 (elf_num_section_syms): New for num_section_syms.
2673 * elf.c (elf_map_symbols): Set num_section_syms.
2674 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2675 the section symbol index.
2677 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2679 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2680 select the generic has table creator. All elf backends need elf
2681 specific fields in the hash table.
2683 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2685 * archive.c (offsetof): Remove define.
2688 * sysdep.h (offsetof): Define.
2690 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2692 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2693 (bfd_set_gp_size): Make param unsigned.
2694 * bfd-in2.h: Regenerate.
2695 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2696 than calling bfd_get_gp_size.
2697 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2698 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2700 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2702 * linker.c (default_fill_link_order): Handle four byte fill value.
2704 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2706 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2708 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2710 * elf64-mips.c (UNUSED_RELOC): Define.
2711 (mips_elf64_howto_table_rel): Use it.
2712 (mips_elf64_howto_table_rela): Here too.
2713 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2715 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2717 * coffgen.c (coff_print_symbol): Fix warnings.
2718 (coff_find_nearest_line): Likewise.
2719 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2720 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2721 * format.c (bfd_check_format_matches): Likewise.
2722 (bfd_set_format): Likewise.
2723 * coff-ia64.c: Add missing prototypes.
2724 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2725 signed to silence warnings.
2726 (elf64_alpha_relocate_section): Likewise.
2727 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2728 (elf64_alpha_add_symbol_hook): Likewise.
2729 (elf64_alpha_final_link): Likewise.
2730 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2731 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2732 (elf64_alpha_size_got_sections): Likewise.
2733 * elfxx-ia64.c: Add missing prototypes.
2734 (elfNN_ia64_relocate_section): Fix warning.
2735 (elfNN_ia64_unwind_entry_compare): Make params const.
2737 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2739 * config.bfd (targ64_selvecs): New.
2740 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2742 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2743 (BFD_DEFAULT_TARGET_SIZE): New.
2744 (BFD_ARCH_SIZE): Comment.
2745 * configure.in (target_size): New. Set instead of target64 in
2746 selvecs case statement. Set target64 from it.
2747 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2748 * bfd-in2.h: Regenerate.
2749 * configure: Regenerate.
2751 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2753 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2754 (bfd_errmsgs): Add corresponding message.
2755 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2756 finding an archive that contains different format object files.
2757 Return bfd_error_wrong_object_format for this case.
2758 * format.c: Formatting fixes. s/CONST/const/.
2759 (bfd_check_format_matches): Accept archives that give
2760 bfd_error_wrong_object_format if no full match is found. Tidy
2761 code handling matching_vector. Don't return a pointer to freed
2762 memory in `matching'. Handle ambiguous matches as for partial
2764 * bfd-in2.h: Regenerate.
2766 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2768 * libieee.h (common_header_type): Add last_byte field.
2770 * ieee.c: Add missing prototypes. Some format fixes.
2771 (struct output_buffer_struct): Move for availability to prototypes.
2772 (ieee_part_after): New function.
2773 (ieee_slurp_debug): Use it here.
2774 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2775 ieee_part_after to set last_byte to one past end of current part.
2777 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2779 (parse_expression): Don't go beyond the end of the current part.
2780 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2781 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2782 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2783 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2784 ieee_set_section_contents, ieee_write_object_contents,
2785 ieee_make_empty_symbol): Make static.
2786 (ieee_archive_p): Correct comments regarding bfd_read.
2787 (ieee_object_p): Similarly.
2788 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2789 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2790 input_bfd, output_bfd, output_buffer.
2791 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2792 do_with_relocs, ie. as a symbol for relocatable files.
2793 (ieee_vec): Add comments showing functions referenced by macros.
2795 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2797 * aout-tic30.c: Add missing prototypes. Fix formatting.
2798 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2799 * peXXigen.c: Add missining prototypes. Fix formatting.
2800 * aout-adobe.c: Add missining prototypes. Fix formatting.
2802 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2804 * elf32-v850.c: Add missing function prototypes.
2805 Fix some formatting.
2807 * cpu-v850.c: Add missing function prototype.
2808 Fix some formatting.
2810 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2812 * elf-bfd.h (struct elf_backend_data): Add new fields
2813 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2814 (bfd_elf_sprintf_vma): Rename function prototype to
2815 '_bfd_elf_sprintf_vma'.
2816 (bfd_elf_fprintf_vma): Rename function prototype to
2817 '_bfd_elf_fprintf_vma'.
2818 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2819 directly, instead indirect via the elf_backend_data structure.
2820 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2821 instead indirect via the elf_backend_data structure.
2822 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2823 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2824 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2826 (elf_backend_fprintf_vma): Initialise if not already defined.
2827 (struct elf_backend_data): Initialise the
2828 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2830 2001-08-10 Andreas Jaeger <aj@suse.de>
2832 * elf64-sparc.c: Add missing prototypes.
2833 * elf32-cris.c: Likewise.
2834 * elf32-i370.c: Likewise.
2835 * elf64-hppa.c: Likewise.
2836 * elf64-s390.c: Likewise.
2838 2001-08-10 Andreas Jaeger <aj@suse.de>
2840 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2841 Add prototypes where needed.
2843 2001-08-10 H.J. Lu <hjl@gnu.org>
2845 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2846 (bfd_fprintf_vma): Likewise.
2848 2001-08-10 H.J. Lu <hjl@gnu.org>
2850 * bfd.c (bfd_sprintf_vma): Don't return void.
2851 (bfd_fprintf_vma): Likewise.
2853 2001-08-10 Andreas Jaeger <aj@suse.de>
2855 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2857 * configure: Regenerate.
2859 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2861 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2862 warning if not BFD64. Add braces so emacs auto format works.
2863 (bfd_elf_fprintf_vma): Likewise.
2865 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2867 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2868 param to agree with libxcoff.h.
2869 (xcoff_swap_ldhdr_out): Likewise.
2870 (xcoff_swap_ldsym_in): Likewise.
2871 (xcoff_swap_ldsym_out): Likewise.
2872 (xcoff_swap_ldrel_in): Likewise.
2873 (xcoff_swap_ldrel_out): Likewise.
2874 (xcoff_create_csect_from_smclas): Likewise.
2875 * coff64-rs6000.c: Add missing prototypes.
2876 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2878 (xcoff64_swap_ldhdr_out): Likewise.
2879 (xcoff64_swap_ldsym_in): Likewise.
2880 (xcoff64_swap_ldsym_out): Likewise.
2881 (xcoff64_swap_ldrel_in): Likewise.
2882 (xcoff64_swap_ldrel_out): Likewise.
2883 (xcoff64_ppc_relocate_section): Make static.
2884 (xcoff64_slurp_armap): Likewise.
2885 (xcoff64_archive_p): Likewise.
2886 (xcoff64_openr_next_archived_file): Likewise.
2887 (xcoff64_sizeof_headers): Likewise.
2888 (xcoff64_is_lineno_count_overflow): Likewise.
2889 (xcoff64_is_reloc_count_overflow): Likewise.
2890 (xcoff64_loader_symbol_offset): Likewise.
2891 (xcoff64_loader_reloc_offset): Likewise.
2892 * elf64-gen.c: Add missing prototypes.
2894 2001-08-09 H.J. Lu <hjl@gnu.org>
2896 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2897 (bfd_elf_fprintf_vma): Likewise.
2899 2001-08-09 H.J. Lu <hjl@gnu.org>
2901 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2904 * bfd-in2.h: Regenerated.
2906 2001-08-09 H.J. Lu <hjl@gnu.org>
2908 * bfd-in.h (bfd_sprintf_vma): New prototype.
2909 (bfd_fprintf_vma): Likewise.
2910 (bfd_elf_sprintf_vma): Likewise.
2911 (bfd_elf_fprintf_vma): Likewise.
2912 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2913 * bfd-in2.h: Regenerated.
2915 * bfd.c (bfd_sprintf_vma): New. Defined.
2916 (bfd_fprintf_vma): Likewise.
2918 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2919 (bfd_elf_fprintf_vma): Likewise.
2921 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2923 * coff-rs6000.c: Add missing prototypes.
2924 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2925 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2926 xcoff_loader_reloc_offset): Make static.
2927 * dwarf1.c: Add missing prototypes.
2928 * dwarf2.c: Add missing prototypes.
2929 (struct abbrev_info): Move definition.
2930 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2931 * elf.c: Add missing prototypes.
2932 * elf32-gen.c: Likewise.
2933 * elf32-i386.c: Likewise.
2934 * elf32-ppc.c: Likewise.
2935 (ppc_elf_sort_rela): Use PTR instead of "void *".
2936 * elflink.h: Add missing prototypes. Formatting fixes.
2937 * merge.c: Add missing prototypes.
2938 (last4_eq): Use PTR instead of "void *".
2939 (last_eq): Likewise.
2940 * syms.c: Add missing prototypes.
2942 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2944 * bfd.c: Fix formatting.
2945 * bfd-in2.h: Regenerate.
2947 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2949 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2950 true (this target uses REL relocations) and 'pcrel_offset' to
2951 false (the PC is implied, not stored in the offset).
2953 2001-08-08 Alan Modra <amodra@bigpond.net.au>
2955 1999-10-19 Linus Nordberg <linus@swox.se>
2956 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2957 * elfxx-target.h (elf_backend_want_got_sym): Define.
2958 (elfNN_bed): Add elf_backend_want_got_sym.
2959 * elflink.c (_bfd_elf_create_got_section): Define
2960 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2962 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
2964 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2965 (find_rela_addend): New function.
2966 (parse_comp_unit): Call it to find the abbrev offset addend.
2967 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2968 members of dwarf2_debug as debugging information is read.
2970 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2972 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2973 targets as well as sh-pe.
2975 2001-08-03 Ben Harris <bjh21@netbsd.org>
2977 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2978 reloc from start of section when computing value for R_ARM_REL32
2981 2001-08-03 Alan Modra <amodra@bigpond.net.au>
2983 From H.J. Lu <hjl@gnu.org>
2984 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2985 keep relocs for undefined syms if there are no dynamic sections in
2987 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2989 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2991 * cofflink.c (coff_link_check_ar_symbols): also search for
2992 __imp__symbol as well as _symbol.
2993 * linker.c (_bfd_generic_link_add_archive_symbols): also
2994 search for __imp__symbol as well as _symbol.
2996 2001-08-01 Adam Nemet <anemet@lnxw.com>
2998 * elf.c (elf_sort_sections): Return zero only as the last step.
3000 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
3002 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3004 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3005 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3008 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3010 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3011 to match corresponding bfd_coff_backend data member.
3013 2001-07-24 Alan Modra <amodra@bigpond.net.au>
3015 * Makefile.am: Update dependencies with "make dep-am".
3016 * Makefile.in: Regenerate
3018 2001-07-15 H.J. Lu <hjl@gnu.org>
3020 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3021 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3022 * Makefile.in: Regenerate.
3024 2001-07-11 H.J. Lu <hjl@gnu.org>
3026 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3027 flags when creating the reloc section if the ALLOC flag in the
3028 source section is set.
3030 2001-07-11 Steve Ellcey <sje@cup.hp.com>
3032 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3033 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3034 * bfd-in2.h: Regenerate.
3035 * libbfd.h: Regenerate.
3036 * elfxx-ia64.c (ia64_howto_table): Define how to handle
3038 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3039 (elfNN_ia64_check_relocs): Likewise.
3040 (elfNN_ia64_install_value): Likewise.
3041 (elfNN_ia64_relocate_section): Likewise.
3043 2001-07-11 Jakub Jelinek <jakub@redhat.com>
3045 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3047 (elf32_sparc_check_relocs): Likewise.
3048 Only create .rela section for alloced sections in shared libraries.
3049 (elf32_sparc_relocate_section): Likewise.
3050 Remove redundant check.
3051 Optimize unaligned reloc usage.
3052 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3055 2001-07-11 H.J. Lu <hjl@gnu.org>
3057 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3058 ALLOC|LOAD flags as the source section for debugging sections
3059 when creating the reloc section.
3061 2001-07-05 Jim Wilson <wilson@redhat.com>
3063 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3064 the section of the bigger symbol.
3066 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3068 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
3070 * peicode.h (coff_swap_scnhdr_in): For sections containing
3071 uninitialised data, only set their size to s_paddr if this does
3072 not reset their size to zero. MS's latest compilers will set
3075 2001-07-04 H.J. Lu <hjl@gnu.org>
3077 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3078 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3081 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
3083 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3085 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3086 sections being discarded.
3088 2001-06-30 Alan Modra <amodra@bigpond.net.au>
3090 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3091 instead of _bfd_elfcore_section_from_phdr.
3092 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3093 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3094 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3095 (elfcore_grok_prstatus): Likewise.
3096 (elfcore_grok_lwpstatus): Likewise.
3097 (bfd_get_elf_phdr_upper_bound): Likewise.
3098 (elfcore_make_note_pseudosection): Formatting.
3099 (_bfd_elfcore_strndup): Formatting.
3100 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3101 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3103 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
3105 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3106 and _bfd_elfcore_strndup.
3107 (struct elf_backend_data): Add elf_backend_grok_prstatus
3108 and elf_backend_grok_psinfo.
3109 * elf.c (_bfd_elfcore_make_pseudosection): New function.
3110 (elfcore_grok_prstatus): Use it.
3111 (elfcore_make_note_pseudosection): Likewise.
3112 (elfcore_strndup): Rename to...
3113 (_bfd_elfcore_strndup): Here, and make global.
3114 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3115 (elfcore_grok_note): Call elf_backend_grok_prstatus
3116 and elf_backend_grok_psinfo if available.
3117 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3118 (_bfd_elf32_mips_grok_psinfo): New function.
3119 (elf_backend_grok_prstatus): Define.
3120 (elf_backend_grok_psinfo): Define.
3121 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3122 (elf_backend_grok_psinfo): Likewise.
3123 (elfNN_bed): Include elf_backend_grok_prstatus and
3124 elf_backend_grok_psinfo.
3126 2001-06-29 H.J. Lu <hjl@gnu.org>
3128 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3129 hplink->sgot is NULL before filling GOT. Check if hplink->splt
3130 is NULL before filling PLT.
3132 2001-06-29 Alan Modra <amodra@bigpond.net.au>
3134 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3136 2001-06-27 Alan Modra <amodra@bigpond.net.au>
3138 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3140 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3141 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3144 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3145 (IS_ABSOLUTE_RELOC): Define.
3146 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3147 (hppa_link_hash_newfunc): Always init it.
3148 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3149 create COPY relocs only when the reloc is in a read-only section.
3150 Instead, allocate space for a dynamic reloc to reference the
3151 library symbol directly. Keep track of space we allocate using
3153 (hppa_discard_copies): Delete, and move code to..
3154 (allocate_plt_and_got): ..here. Rename to
3155 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3156 relocs for non-shared link.
3157 (elf32_hppa_size_dynamic_sections): Update calls to above.
3158 (elf32_hppa_relocate_section): Write out the dynamic relocs used
3159 in lieu of COPY relocs.
3161 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3163 (elf_i386_adjust_dynamic_symbol): ..nor here..
3164 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3166 (elf_i386_size_dynamic_sections): Fix a comment.
3167 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3168 involved in writing reloc out.
3170 2001-06-25 Alan Modra <amodra@bigpond.net.au>
3172 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3173 Ensure syms are dynamic if we might be emitting a reloc.
3174 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3175 for undefweak or undefined syms..
3176 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3178 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3179 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3180 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3181 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3183 2001-06-24 H.J. Lu <hjl@gnu.org>
3185 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3186 strncasecmp/strcasecmp instead of strncmp/strcmp.
3188 2001-06-23 H.J. Lu <hjl@gnu.org>
3190 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3191 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3192 in the regular object file and treat the weak definition as
3195 2001-06-23 Alan Modra <amodra@bigpond.net.au>
3197 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3198 unresolved_reloc test to exclude cases where we use "relocation"
3199 before setting it to point into the .got. Reinstate fudge for
3200 unresolved relocs in debugging sections.
3202 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3203 complicated tests for unresolvable relocs with a simple direct
3204 scheme using "unresolved_reloc" var.
3206 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3207 elf_i386_dyn_relocs. Update comment.
3208 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3210 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3212 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3214 (elf_i386_size_dynamic_sections): Likewise.
3215 (elf_i386_finish_dynamic_symbol): Likewise.
3216 (elf_i386_finish_dynamic_sections): Likewise.
3217 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
3220 Avoid creating COPY relocs if possible.
3221 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3222 which .got created. Mark symbols used by R_386_32 and R_386_PC32
3223 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3224 reloc is in a read-only section. Instead, allocate space for a
3225 dynamic reloc to reference the library symbol directly. Keep
3226 track of space we allocate using pcrel_relocs_copied.
3227 (discard_copies): Delete, and move code to ..
3228 (allocate_plt_and_got): ..here. Rename to
3229 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
3230 relocs for non-shared link.
3231 (elf_i386_size_dynamic_sections): Update calls to above functions.
3232 (elf_i386_relocate_section): Write out the dynamic relocs. Add
3233 more ugly logic to avoid "unresolvable relocation" error. Use
3234 htab shortcut in place of elf_hash_table macro.
3235 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3236 not always be created now.
3238 2001-06-20 Bo Thorsen <bo@suse.co.uk>
3240 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3243 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3245 * configure.host (mips64-*-linux): Reformat.
3247 2001-06-21 Alan Modra <amodra@bigpond.net.au>
3249 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3250 allocate local .got space. Use shortcuts from hash table for .got
3251 and .plt rather than comparing section names.
3252 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3253 adjusting index into local_got_refcounts to document what we are
3255 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3256 Tidy .got and .plt error checking.
3258 2001-06-20 Catherine Moore <clm@redhat.com>
3260 * elf-bfd.h (struct elf_backend_data):
3261 elf_backend_emit_relocs: New field: Function for emitting
3263 elf_backend_count_relocs: New field: Function for determining
3264 the number of relocs to be emitted.
3265 * elfxx-target.h: Provide default (NULL) values for
3266 elf_backend_emit_relocs and elf_backend_count_relocs.
3267 * elflink.h (elf_link_size_reloc_section): Make the hash table
3268 big enough to hold the relocs counted by either reloc_count or
3270 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3271 should be emitted, either because of a command line option
3272 stored in the info structure or because the target provides a
3273 special reloc emitting function.
3274 If the target provides a reloc counting function use it,
3275 unless performing a relocatable link or emitting all relocs.
3276 Also set the SEC_RELOC flag on any output section which will
3278 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3279 should be emitted, either because of a command line option
3280 stored in the info structure or because the target provides a
3281 special reloc emitting function.
3282 If the target provides a reloc emitting function, use it,
3283 unless performing a relocatable link or emitting all relocs.
3285 2001-06-20 H.J. Lu <hjl@gnu.org>
3287 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3288 allocate local .got space.
3290 2001-06-19 Andreas Jaeger <aj@suse.de>
3292 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3295 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
3297 * elflink.h (struct elf_assign_sym_version_info): Remove member
3298 export_dynamic. All users changed to use info member.
3299 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3300 export_dynamic, instead use member in parameter info.
3301 * bfd-in.h (bfd_elf32_size_dynamic_sections,
3302 bfd_elf64_size_dynamic_sections): Update prototype.
3303 * bfd-in2.h: Regenerate.
3305 2001-06-18 H.J. Lu <hjl@gnu.org>
3307 * elflink.h (elf_info_failed): Add a new field, verdefs.
3308 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3310 (elf_export_symbol): Check eif->verdefs to decide if a symbol
3313 2001-06-17 H.J. Lu <hjl@gnu.org>
3315 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3316 readonly_reloc, to record if a relocation in the .rel.dyn
3317 section is against a read-only section.
3318 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3320 (_bfd_mips_elf_check_relocs): Record if there is a relocation
3321 in the .rel.dyn section against a read-only section by setting
3322 DF_TEXTREL or readonly_reloc.
3323 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3325 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3326 there is a relocation in the .rel.dyn section against a
3328 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3331 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
3333 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3334 function. Move flagword result into parameter list. Remove
3335 comment about setting bfd_error_handler to intercept failure
3337 * coffgen.c (make_a_section_from_file): Examine result of
3338 calling bfd_coff_styp_to_sec_flags and pass a failure back to
3340 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3341 function. Move flagword result into parameter list.
3342 * libcoff.h: Regenerate.
3343 * libecoff.h: Regenerate.
3345 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
3347 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3348 section is going to follow it.
3350 2001-06-12 Catherine Moore <clm@redhat.com>
3352 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3353 with the file_align entry from elf_backend_data.
3354 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3355 (elf_gc_record_vtentry): Likewise.
3357 2001-06-10 Alan Modra <amodra@bigpond.net.au>
3359 * elflink.h: Whitespace changes.
3360 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3361 rather than "unsigned char".
3362 (elf_link_output_relocs): Likewise.
3363 (elf_link_input_bfd): Likewise.
3364 (elf_reloc_link_order): LIkewise.
3365 * elf.c: s/CONST/const/. Whitespace changes.
3366 * elf32-mips.c: Formatting fix.
3368 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3369 * Makefile.in: Regenerate.
3370 * po/Make-in: Remove trailing tab.
3372 2001-06-09 Philip Blundell <philb@gnu.org>
3374 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3376 (elf32_arm_plt_entry): Likewise.
3378 2001-06-08 H.J. Lu <hjl@gnu.org>
3380 * elf.c (swap_out_syms): Keep names for global section symbols.
3382 2001-06-07 H.J. Lu <hjl@gnu.org>
3384 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3385 MIPS-based machines need it.
3387 2001-06-07 H.J. Lu <hjl@gnu.org>
3389 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3392 * config.bfd: Remove ecoff from Linux/mips.
3394 2001-06-07 Andreas Jaeger <aj@suse.de>
3396 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3398 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3399 alignment of 8 for .rela sections; handle further relocations.
3401 2001-06-06 Christian Groessler <cpg@aladdin.de>
3403 * coff-z8k.c: Fix formatting.
3404 Fix howtos: howto->size was always 1.
3406 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3408 * configure.host (mips64*-*-linux*): Define.
3410 2001-06-05 Alan Modra <amodra@bigpond.net.au>
3412 * elf32-i386.c (elf_i386_discard_copies): Rename to
3413 discard_copies, and use elf_link_hash_entry arg rather than
3414 elf_i386_link_hash_entry.
3415 (elf_i386_link_hash_traverse): Delete.
3416 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3417 Tidy sizing of dynamic sections.
3418 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3419 possible .plt entries.
3420 (elf_i386_gc_sweep_hook): Likewise.
3421 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3422 everything with plt.refcount <= 0.
3424 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3426 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3427 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3429 (allocate_plt_and_got): ..instead do it all here. New function.
3430 (elf_i386_size_dynamic_sections): Allocate local .got space and
3431 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
3432 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
3433 rather than gc variety).
3434 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3435 (elf_i386_relocate_section): Use it here and correct handling of
3436 R_386_GOT32. Provide section and offset for "unresolvable
3437 relocation" error message.
3438 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3440 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3441 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3442 (elf_i386_link_hash_table_create): Init them.
3443 (create_got_section): New function.
3444 (elf_i386_create_dynamic_sections): New function.
3445 (elf_backend_create_dynamic_sections): Set to above.
3446 (elf_i386_check_relocs): Use shortcuts from hash table rather than
3447 calling bfd_get_section_by_name.
3448 (elf_i386_gc_sweep_hook): Likewise.
3449 (elf_i386_adjust_dynamic_symbol): Likewise.
3450 (elf_i386_size_dynamic_sections): Likewise.
3451 (elf_i386_relocate_section): Likewise.
3452 (elf_i386_finish_dynamic_sections): Likewise.
3454 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3456 2001-06-02 H.J. Lu <hjl@gnu.org>
3458 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3460 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3462 2001-06-02 H.J. Lu <hjl@gnu.org>
3464 * aout-cris.c (MACHTYPE_OK): New. Defined.
3466 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
3468 * section.c (_bfd_strip_section_from_output): Handle NULL
3471 2001-06-02 H.J. Lu <hjl@gnu.org>
3473 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3474 rs6000coff64_vec only if BFD64 is defined.
3475 (powerpc64-*-aix*): Enable only if BFD64 is defined.
3477 2001-06-02 H.J. Lu <hjl@gnu.org>
3479 * coff-ia64.c (ia64coff_object_p): Rewrite with
3480 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3482 2001-06-01 Andreas Jaeger <aj@suse.de>
3484 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3485 relocation, small reformatting.
3487 2001-05-29 Andreas Jaeger <aj@suse.de>
3489 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3490 (elf64_x86_64_relocate_section): Likewise.
3492 2001-05-30 Alan Modra <amodra@one.net.au>
3494 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3495 millicode. Don't allocate .got and .rela.got space here..
3496 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3497 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3499 (hppa_handle_PIC_calls): ..nor here..
3500 (allocate_plt_and_got): ..instead do it all here. New function.
3501 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3502 call allocate_plt_and_got. No need to zap .got if not dynamic.
3503 (elf32_hppa_final_link): Call regular bfd_final_link instead of
3504 gc_common_final_link.
3505 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3506 (elf32_hppa_relocate_section): Use it here.
3507 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3508 dynamic_sections_created.
3509 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3511 2001-05-28 Andreas Jaeger <aj@suse.de>
3513 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3514 generic version since we want a hashsize of 4.
3515 (elf_backend_size_info): Likewise.
3517 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3519 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3521 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3522 (elf_link_input_bfd): Likewise.
3523 (elf_reloc_link_order): Likewise.
3524 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3525 relocations correctly.
3527 2001-05-28 Nicolas Pitre <nico@cam.org>
3529 * elf32-arm.h: fix PLT generation for big endian ARM
3531 2001-05-28 Alan Modra <amodra@one.net.au>
3533 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3534 for symbols forced local that need plabels.
3535 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3536 .plt.rela for local syms if non-shared.
3537 (hppa_build_one_stub): Mask lsb of plt.offset.
3538 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3539 (clobber_millicode_symbols): Correct comment.
3540 (elf32_hppa_relocate_section): Likewise.
3541 (elf32_hppa_finish_dynamic_symbol): Likewise.
3543 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3545 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3546 * bfd-in2.h: Regenerate.
3547 * libbfd.h: Regenerate.
3548 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3549 and BFD_RELOC_SPARC_UA64 mapping
3550 * elf64-sparc.c: Likewise.
3552 2001-05-25 H.J. Lu <hjl@gnu.org>
3554 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3555 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3556 (coff-rs6000.lo): Remove the old dependency.
3557 * Makefile.in: Rebuild.
3559 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3562 2001-05-25 H.J. Lu <hjl@gnu.org>
3564 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3565 rs6000coff_core_file_matches_executable_p,
3566 rs6000coff_core_file_failing_command and
3567 rs6000coff_core_file_failing_signal only if AIX_CORE is
3569 (pmac_xcoff_vec): Likewise.
3570 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3572 2001-05-25 Timothy Wall <twall@redhat.com>
3574 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3575 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3577 2001-05-25 H.J. Lu <hjl@gnu.org>
3579 * bfd-in2.h: Regenerated.
3580 * libcoff.h: Likewise.
3582 2001-05-25 Alan Modra <amodra@one.net.au>
3584 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3585 undefined millicode syms in shared libs.
3586 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3587 (elf32_hppa_check_relocs): Likewise.
3588 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3589 (elf32_hppa_size_dynamic_sections): Likewise.
3590 (elf32_hppa_relocate_section): Likewise.
3591 (elf32_hppa_finish_dynamic_symbol): Likewise.
3592 (elf32_hppa_finish_dynamic_sections): Likewise.
3594 2001-05-24 Tom Rix <trix@redhat.com>
3596 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3597 xcoff-target.h not used to define rs6000 or ppc bfd.
3600 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3603 * coff-rs6000.c : Many changes for 64 bit support. Move common
3604 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3607 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3608 linker now supported. Explictly define the rs6000coff64_vec.
3610 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3611 (coff_print_aux) same
3612 (coff_write_object_contents) same
3613 (coff_slurp_line_table) same
3615 * coffgen.c : (coff_fix_symbol_name) formatting
3616 (coff_mangle_symbols) xcoff 64 bit support
3617 (coff_write_symbol) same
3618 (coff_write_alien_symbol) same
3619 (coff_write_native_symbol) same
3620 (coff_write_symbols) same
3621 (coff_get_symbol_info) same
3622 (bfd_coff_get_syment) same
3623 (coff_print_symbol) same
3625 * config.bfd : add powerpc64-*-aix* target
3627 * libcoff-in.h : formatting
3629 * libcoff.h : move xcoff extern declarations to libxcoff.h
3631 * libxcoff.h : New file
3633 * xcofflink.c : Many changes for xcoff64 support. Move common
3634 structures to include/coff/xcoff.h. Move specific structure to
3635 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3636 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3638 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3641 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3643 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3645 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3648 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3650 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3651 * libbfd.h: Regenerate.
3652 * bfd-in2.h: Regenerate.
3654 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3655 * archures.c (bfd_mach_mips12000): Define.
3656 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3657 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3659 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3660 * bfd-in2.h: Regenerate.
3661 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3663 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3665 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3666 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3667 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3668 that is used by GCC.
3670 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3672 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3673 of entries in a structured section.
3674 * elf.c: Use new macro.
3675 * elf32-i386.c: Use new macro.
3676 * elf32-mips.c: Use new macro.
3677 * elf64-alpha.c: Use new macro.
3678 * elf64-sparc.c: Use new macro.
3679 * elfcode.h: Use new macro.
3680 * elflink.h: Use new macro.
3682 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3684 * bfdint.texi: Replace -oformat with --oformat.
3686 2001-05-21 Andreas Jaeger <aj@suse.de>
3688 * dwarf2.c (decode_line_info): Fix error message.
3689 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3690 adjust error message.
3692 2001-05-18 H.J. Lu <hjl@gnu.org>
3694 * elflink.h (elf_link_add_object_symbols): Revert the last
3697 2001-05-17 Alan Modra <amodra@one.net.au>
3699 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3700 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3701 (hppa_build_one_stub): Add an assert to check plt.offset.
3703 2001-05-17 H.J. Lu <hjl@gnu.org>
3705 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3706 version definition to basename of the output filename.
3708 2001-05-17 H.J. Lu <hjl@gnu.org>
3710 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3711 basename of the bfd filename.
3713 2001-05-16 Alan Modra <amodra@one.net.au>
3715 * section.c (asection): Add linker_has_input field.
3716 (STD_SECTION): Adjust initialization to suit.
3717 * ecoff.c (bfd_debug_section): Likewise.
3718 * bfd-in2.h: Regenerate.
3720 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3722 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3723 negative 32-bit operands to 16 operands when the operand is
3724 going to be zero-extended by the modified opcode.
3726 2001-05-12 Peter Targett <peter.targett@arccores.com>
3728 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3729 name for 'arc5' core versions.
3730 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3732 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3734 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3736 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3738 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3740 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3741 to .gnu.linkonce.t.FOO text section.
3743 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3745 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3746 fields, change sec into secinfo.
3747 (struct sec_merge_info): Add chain, remove last fields.
3748 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3749 (sec_merge_hash_lookup): If lookup could not use a string only
3750 because it has bad alignment, mark the old string for deletion.
3751 (sec_merge_add): Add secinfo argument. Don't compute entry's
3752 position, instead record the section.
3753 (sec_merge_emit): Update for the sec into secinfo change in
3754 struct sec_merge_hash_entry.
3755 (_bfd_merge_section): Only record the section for merging, defer
3756 putting strings into the hash table.
3757 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3758 _bfd_merge_sections): New functions.
3759 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3761 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3762 (_bfd_nolink_bfd_merge_sections): Define.
3763 * libbfd.h: Likewise.
3764 (bfd_generic_merge_sections): Add prototype.
3765 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3766 (struct bfd_target): Likewise.
3767 * bfd.c (bfd_merge_sections): Define.
3768 * bfd-in2.h: Rebuilt.
3769 * elf.c (_bfd_elf_merge_sections): New function.
3770 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3771 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3772 * reloc.c (bfd_generic_merge_sections): New function.
3773 * vms.c (vms_bfd_merge_sections): New function.
3774 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3775 * aout-target.h (MY_bfd_merge_sections): Define.
3776 * aout-tic30.c (MY_bfd_merge_sections): Define.
3777 * binary.c (binary_bfd_merge_sections): Define.
3778 * bout.c (b_out_bfd_merge_sections): Define.
3779 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3780 * coffcode.c (coff_bfd_merge_sections): Define.
3781 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3782 * i386msdos.c (msdos_bfd_merge_sections): Define.
3783 * i386os9k.c (os9k_bfd_merge_sections): Define.
3784 * ieee.c (ieee_bfd_merge_sections): Define.
3785 * ihex.c (ihex_bfd_merge_sections): Define.
3786 * nlm-target.h (nlm_bfd_merge_sections): Define.
3787 * oasys.c (oasys_bfd_merge_sections): Define.
3788 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3789 * som.c (som_bfd_merge_sections): Define.
3790 * srec.c (srec_bfd_merge_sections): Define.
3791 * tekhex.c (tekhex_bfd_merge_sections): Define.
3792 * versados.c (versados_bfd_merge_sections): Define.
3793 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3795 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3797 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3798 to be unsigned long, in order to match its use.
3800 2001-05-10 H.J. Lu <hjl@gnu.org>
3802 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3805 2001-05-09 H.J. Lu <hjl@gnu.org>
3807 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3808 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3809 Remove the unused veriable `dynver'.
3811 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3813 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3814 NULL or is not COFF.
3815 (coff_i386_rtype_to_howto): Don't dump core if output section
3818 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3820 * ecoff.c (bfd_debug_section): Fix initialization.
3821 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3822 is always a positive integer. Cast away sign mismatch.
3823 * elf32-mips.c: Fix misleading comment and typo.
3824 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3826 * elflink.c: Fix typo.
3827 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3828 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3830 2001-05-04 Richard Henderson <rth@redhat.com>
3832 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3834 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3836 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3837 EF_ARM_HASENTRY if the start address is set.
3839 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3841 * targets.c (_bfd_target_vector_entries): Compute value based on
3842 the size of the _bfd_target_vector and not bfd_target_vector.
3844 2001-05-03 H.J. Lu <hjl@gnu.org>
3846 * elfcode.h: Include "libiberty.h".
3848 * elflink.h (elf_link_add_object_symbols): Set
3849 elf_dt_name (abfd) to basename of the bfd filename.
3850 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3851 of the bfd filename.
3853 2001-05-03 Andreas Jaeger <aj@suse.de>
3855 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3856 (elf_generic_info_to_howto_rel): Likewise.
3857 * coff-alpha.c (reloc_nil): Likewise.
3858 (alpha_ecoff_bad_format_hook): Likewise.
3859 (alpha_adjust_reloc_out): Likewise.
3860 (alpha_bfd_reloc_type_lookup): Likewise.
3861 (alpha_convert_external_reloc): Likewise.
3862 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3863 (elf64_alpha_reloc_bad): Likewise.
3864 (elf64_alpha_reloc_gpdisp): Likewise.
3865 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3866 (elf64_alpha_info_to_howto): Likewise.
3867 (elf64_alpha_add_symbol_hook): Likewise.
3868 (elf64_alpha_create_got_section): Likewise.
3869 (elf64_alpha_is_local_label_name): Likewise.
3870 (elf64_alpha_merge_ind_symbols): Likewise.
3871 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3872 (mips_elf64_get_reloc_upper_bound): Likewise.
3873 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3874 (nlm_alpha_get_public_offset): Likewise.
3876 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3878 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3879 about overflow in R_OPENRISC_LO_16_IN_INSN and
3880 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3882 2001-04-30 H.J. Lu <hjl@gnu.org>
3884 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3885 only for ELF_LINK_FORCED_LOCAL.
3886 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3887 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3888 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3890 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3891 if the symbol has hidden or internal visibility.
3893 2001-04-30 Alan Modra <amodra@one.net.au>
3895 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3896 calls to undefined weak symbols.
3898 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3900 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3901 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3903 2001-04-27 Andreas Jaeger <aj@suse.de>
3905 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3906 out handled entries.
3907 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3908 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3909 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3912 2001-04-27 Sean McNeil <sean@mcneil.com>
3914 * config.bfd: Add arm-vxworks target.
3915 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3916 addend (fro VXworks targets).
3918 2001-04-26 H.J. Lu <hjl@gnu.org>
3920 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3923 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3925 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3926 * bfd-in2.h: Regenerated.
3928 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3930 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3931 (struct sec_merge_hash): Remove alignment_power.
3932 (sec_merge_hash_newfunc): Clear alignment.
3933 (sec_merge_hash_lookup): Pass alignment as argument.
3934 Use hashp->root.next, not hashp->next to walk the hash chain.
3935 If a string already in the hashtable does not have required
3936 alignment, create a new hashtable entry.
3937 (sec_merge_init): Remove alignment_power argument.
3938 (sec_merge_add): Add alignment argument.
3939 (sec_merge_emit): Alignment is now a per-entity thing, not per
3941 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3942 for proper alignment.
3943 Pass alignment information to sec_merge_add.
3945 2001-04-24 Christian Groessler <cpg@aladdin.de>
3947 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3948 and R_REL16 reloc types; accept odd values for R_REL16 type
3950 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3952 * cpu-openrisc.c: New file.
3953 * elf32-openrisc.c: Likewise.
3955 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3956 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3957 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3958 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3959 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3960 * Makefile.in: Regenerated.
3961 * config.bfd: (openrisc-*-elf): New target.
3962 * configure.in (bfd_elf32_openrisc_vec): New vector.
3963 * configure: Regenerated.
3964 * libbfd.h: Regenerated.
3965 * bfd-in2.h: Regenerated.
3966 * reloc.c: Add OpenRISC relocations.
3967 * targets.c (bfd_elf32_openrisc_vec): Declare.
3968 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3969 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3970 (bfd_openrisc_arch): Declare.
3971 (bfd_archures_list): Add bfd_openrisc_arch.
3972 * elf.c (prep_headers): Add bfd_arch_openrisc.
3974 2001-04-23 Bo Thorsen <bo@suse.de>
3976 * elf64-x86-64.c: Add c++ vtable hack.
3977 Small whitespace and comment changes.
3979 2001-04-19 Andreas Jaeger <aj@suse.de>
3981 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3982 (elf64_x86_64_plt_entry): Likewise.
3983 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3984 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3986 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
3988 * elf32-cris.c: Tweak comments related to dynamic linking.
3989 (cris_elf_relocate_section): When not creating shared object, fill
3990 in the .got table for any symbol not in the dynamic symbol table.
3991 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3992 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3994 (cris_elf_check_relocs): Use variable r_type in all places rather
3995 than the original expression. Add default case in switch for
3997 (elf_cris_size_dynamic_sections): Iterate over
3998 elf_cris_discard_excess_program_dynamics when not creating shared
4000 (elf_cris_discard_excess_dso_dynamics): Renamed from
4001 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
4002 (elf_cris_discard_excess_program_dynamics): New.
4004 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
4006 * coffcode.h (coff_write_object_contents): Use
4007 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4009 2001-04-14 H.J. Lu <hjl@gnu.org>
4011 * bfd-in2.h: Regenerate.
4013 2001-04-14 Jakub Jelinek <jakub@redhat.com>
4015 * section.c (STD_SECTION): Add entsize.
4017 2001-04-13 H.J. Lu <hjl@gnu.org>
4019 * section.c (SEC_MERGE): Define new flag for merging.
4020 (SEC_STRINGS): Likewise.
4021 (entsize): New field.
4023 2001-04-13 Roger Sayle <roger@metaphorics.com>
4025 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4026 flag on pe-i386 targets.
4028 2001-04-13 Jakub Jelinek <jakub@redhat.com>
4030 * libbfd-in.h (_bfd_merge_section): New.
4031 (_bfd_write_merged_section): New.
4032 (_bfd_merged_section_offset): New.
4033 * libbfd.h: Rebuilt.
4034 * linker.c (_bfd_generic_link_output_symbols): Handle
4036 * aoutx.h (aout_link_write_symbols): Likewise.
4037 * pdp11.c (aout_link_write_symbols): Likewise.
4038 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4039 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4041 (elf_link_sec_merge_syms): New.
4042 (elf_link_input_bfd): Call _bfd_merged_section_offset
4043 and _bfd_write_merged_section.
4044 Handle discard_sec_merge.
4045 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4047 (struct bfd_elf_section_data): Likewise.
4048 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4049 SEC_STRINGS section flags and entsize from their ELF counterparts.
4050 (_bfd_elf_link_hash_table_init): Initialize merge_info.
4051 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4052 from their BFD counterparts.
4053 * merge.c: New file.
4054 * Makefile.am: Add strtab.lo.
4055 * Makefile.in: Rebuilt.
4057 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
4059 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4060 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4062 2001-04-05 Steven J. Hill <sjhill@cotw.com>
4064 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4065 endian MIPS ELF target.
4066 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4069 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4070 64bit big endian MIPS ELF target.
4071 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4072 endian MIPS ELF target.
4073 * configure: Regenerated.
4075 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4076 little endian targets.
4077 (mips_elf_sym_is_global): Handle traditional targets.
4079 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4080 64bit big endian MIPS ELF target.
4081 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4082 endian MIPS ELF target.
4084 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4085 and bfd_elf64_tradlittlemips_vec.
4087 2001-04-05 David Mosberger <davidm@hpl.hp.com>
4089 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4090 ordinary "progbits" section.
4092 2001-04-04 Alan Modra <alan@linuxcare.com.au>
4094 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4095 when -Bsymbolic causes a symbol to no longer need a .plt entry.
4097 2001-04-03 David Mosberger <davidm@hpl.hp.com>
4099 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4101 2001-03-30 H.J. Lu <hjl@gnu.org>
4103 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4104 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4106 2001-03-26 H.J. Lu <hjl@gnu.org>
4108 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4109 if there are any relocations for generic ELF.
4110 (bfd_elf32_bfd_link_add_symbols): Defined to
4111 elf32_generic_link_add_symbols.
4112 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4113 if there are any relocations for generic ELF.
4114 (bfd_elf64_bfd_link_add_symbols): Defined to
4115 elf64_generic_link_add_symbols.
4117 2001-03-23 Nick Clifton <nickc@redhat.com>
4119 * Makefile.am (BUILD_CFILES): New variable: List of C source
4120 files created in build directory.
4121 (BUILD_HFILES): New variable: List of header files created in
4124 (po/POTFILES.in): Replace rule with empty entry.
4125 (po/SRC-POTFILES.in): New rule: Create a list of source files
4126 in the source directory.
4127 (po/BLD-POTFILES.in): New rule: Create a list of source files
4128 in the build directory.
4129 (MOSTLYCLEAN): Do not delete source files created in build
4131 * Makefile.in: Regenerate.
4132 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4134 * configure: Regenerate.
4136 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4138 Add .. to the search path when building bfd.pot.
4139 Delete POTFILES when performing distclean.
4140 Add comment describing why distclean is broken in maintainer mode.
4141 * po/POTFILES.in: Delete.
4142 * po/SRC-POTFILES.in: New file.
4143 * po/BLD-POTFILES.in: New file.
4144 * po/bfd.pot: Regenerate.
4146 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
4148 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
4149 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4150 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4151 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4152 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4153 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4155 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4156 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
4157 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4158 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4159 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4160 New HOWTO members for new relocs.
4161 (cris_reloc_map): Map new relocs.
4162 (ELF_DYNAMIC_INTERPRETER): Define.
4163 (PLT_ENTRY_SIZE): Define.
4164 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4165 elf_cris_pic_plt_entry): New, PLT templates.
4166 (struct elf_cris_pcrel_relocs_copied, struct
4167 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4168 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4169 (cris_final_link_relocate): Check that 16-bit GOT relocs have
4170 positive values. Adjust PCREL relocs to be relative to location
4172 (cris_elf_relocate_section): Handle relocations to dynamic
4173 objects. Handle new relocations. Call error handler when seeing
4174 non-PIC relocation for read-only sections while generating shared
4176 (cris_elf_check_relocs): Set reference counts for GOT and PLT
4178 (bfd_elf32_bfd_link_hash_table_create,
4179 elf_backend_adjust_dynamic_symbol,
4180 elf_backend_size_dynamic_sections,
4181 elf_backend_finish_dynamic_symbol,
4182 elf_backend_finish_dynamic_sections,
4183 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4184 elf_backend_hide_symbol, elf_backend_want_got_plt,
4185 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4186 elf_backend_got_header_size, elf_backend_plt_header_size):
4189 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4190 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4191 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4192 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4193 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4194 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4195 * bfd-in2.h, libbfd.h: Regenerate.
4197 2001-03-21 Diego Novillo <dnovillo@redhat.com>
4199 (_bfd_mips_elf_relocate_section): Give a better error message when
4200 a relocation is not recognized.
4202 2001-03-21 Alan Modra <alan@linuxcare.com.au>
4204 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4205 non-NULL before attempting to dereference.
4207 2001-03-20 H.J. Lu <hjl@gnu.org>
4209 * configure.in: Remove the redundent AC_ARG_PROGRAM.
4210 * configure: Rebuild.
4212 2001-03-20 Andreas Schwab <schwab@suse.de>
4214 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4215 relocation value when resolving a reference from a debugging
4218 2001-03-16 Scott Thomason <SThomaso@hii.com>
4220 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4221 (xcoff64_swap_sym_out): Fix syntax errors.
4223 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
4225 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4227 2001-03-15 Alan Modra <alan@linuxcare.com.au>
4229 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4230 (hppa_link_hash_newfunc): Init it.
4231 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4232 section appears to be non-PIC.
4233 (final_link_relocate): Likewise.
4234 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4235 possible candidate function, and set pic_call for those that will
4236 only have a .plt entry for the PIC call stub.
4237 (hppa_handle_PIC_calls): Set maybe_pic_call.
4239 2001-03-12 DJ Delorie <dj@redhat.com>
4241 * elf32-sh.c (sh_elf_relocate_section): Only relocation
4242 R_SH_DIR8WP* relocs if they're against external symbols, else
4243 they're just for relaxing. Validate the reloc values.
4245 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
4247 * binary.c (bfd_external_binary_architecture): Declare.
4248 (binary_object_p): If bfd_external_binary_architecture is defined,
4249 set the architecture to this string.
4251 2001-03-11 Philip Blundell <philb@gnu.org>
4253 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4254 entries that could serve as a definition for a weak symbol.
4256 2001-03-08 Nick Clifton <nickc@redhat.com>
4258 * Most files: Update copyright notices using Perl script created
4259 by Kevin Buettner <kevinb@redhat.com>.
4261 2001-03-07 Nick Clifton <nickc@redhat.com>
4263 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4264 prior patch on ! defined OLD_ARM_ABI.
4266 2001-03-07 Andreas Jaeger <aj@suse.de>
4268 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4269 some relocation values.
4271 2001-03-06 Nick Clifton <nickc@redhat.com>
4273 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4274 of offset in BLX(1) instruction.
4275 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4276 offset in BLX(1) instruction.
4279 2001-03-06 Nick Clifton <nickc@redhat.com>
4281 * coff-arm.c (coff_arm_reloc_type_lookup): Add
4282 BFD_RELOC_THUMB_PCREL_BLX.
4284 2001-03-06 Igor Shevlyakov <igor@windriver.com>
4286 * archures.c (bfd_default_scan): Add Coldfire CPUs.
4287 * bfd-in2.h: Regenerate.
4288 * cpu-m68k.c: Add Coldfire CPUs for arch table.
4289 * ieee.c (ieee_write_processor): Set proper id for
4292 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4294 * configure.in: Add s390 target.
4295 * configure: Regenerate.
4297 2001-02-28 Andreas Jaeger <aj@suse.de>
4299 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4302 2001-02-28 Philip Blundell <pb@futuretv.com>
4304 * elf32-arm.h: Update mentions of renamed EF_xx constants.
4305 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4307 2001-02-27 H.J. Lu <hjl@gnu.org>
4309 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4310 abfd->tdata.aout_data == NULL.
4312 2001-02-27 Alan Modra <alan@linuxcare.com.au>
4314 * elf32-hppa.c: Correct field selector in stub comments.
4315 (clobber_millicode_symbols): Formatting fix.
4317 * configure.in: Bump version to 2.11.90.
4318 * configure: Regenerate.
4319 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4320 (CFILES): $SOURCE_CFILES + generated C files.
4321 (POTFILES): Include $HFILES not $SOURCE_HFILES.
4323 * Makefile.in: Regenerate.
4324 * doc/Makefile.in: This too.
4326 2001-02-26 Timothy Wall <twall@cygnus.com>
4328 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4331 2001-02-26 Nick Clifton <nickc@redhat.com>
4333 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4334 up, replacing multiple if statements with a switch.
4335 (handle_COMDAT): New function.
4337 2001-02-26 H.J. Lu <hjl@gnu.org>
4339 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4340 a warning for section flags we do not handle instead of
4343 2001-02-26 Andreas Jaeger <aj@suse.de>
4345 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4347 2001-02-22 Timothy Wall <twall@cygnus.com>
4349 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4350 * configure.in: Add objects for elf64_ia64_aix vectors.
4351 * configure: Regenerated.
4352 * configure.host: Recognize ia64-*-aix*.
4353 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
4354 for AIX. AIX5 requires most relocations to be dynamic (*all*
4355 binaries are somewhat similar to shared libraries).
4356 * targets.c: Add elf64_ia64_aix vectors.
4358 2001-02-21 David Mosberger <davidm@hpl.hp.com>
4360 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4361 C8 said "1" instead of "8". Clarify error string for IMM22:
4362 "signed integer" instead of just "integer".
4364 2001-02-20 Andreas Jaeger <aj@suse.de>
4366 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4367 PLT entries that could serve as a definition for a weak symbol.
4369 2001-02-19 Jakub Jelinek <jakub@redhat.com>
4371 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4372 entries that could serve as a definition for a weak symbol.
4373 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4375 2001-02-18 David O'Brien <obrien@FreeBSD>
4377 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4378 FreeBSD/i386-CURRENT differently until I can figure out the needed
4380 * configure: Regenerate.
4381 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4382 FreeBSD/PowerPC, and FreeBSD/sparc64.
4384 2001-02-18 lars brinkhoff <lars@nocrew.org>
4386 * Makefile.am: Add PDP-11 a.out target.
4387 * config.bfd: Likewise.
4388 * configure.in: Likewise.
4389 * targets.c: Likewise.
4390 * archures.c: Likewise.
4391 * bfd-in2.h: Likewise. Add PDP-11 relocations.
4392 * libbfd.h: Add PDP-11 relocations.
4393 * reloc.c: Likewise.
4394 * cpu-pdp11.c: New file.
4395 * pdp11.c: New file.
4397 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4398 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4399 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4400 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4401 (GET_MAGIC): New macro.
4402 (PUT_MAGIC): Likewise.
4403 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4405 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
4407 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4408 multiarch needs it).
4410 2001-02-18 H.J. Lu <hjl@gnu.org>
4412 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4415 2001-02-18 Kazu Hirata <kazu@hxi.com>
4417 * vms-misc.c: Fix formatting.
4419 2001-02-16 Kazu Hirata <kazu@hxi.com>
4421 * vms.c: Fix formatting.
4423 2001-02-14 H.J. Lu <hjl@gnu.org>
4425 * elf.c (elf_find_function): New function.
4426 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4427 the file name and function name.
4429 2001-02-14 Nick Clifton <nickc@redhat.com>
4431 * ecoff.c (bfd_debug_section): Update to initialise new fields in
4434 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4435 (BFD64_BACKENDS): Add pepigen.c
4436 Add rules to create peigen.c and pepigen.c from peXXigen.c.
4438 * Makefile.in: Regenerate.
4439 * configure: Regenerate.
4440 * po/POTFILES.in: Regenerate.
4441 * po/bfd.pot: Regenerate.
4443 2001-02-14 H.J. Lu <hjl@gnu.org>
4445 * libcoff-in.h (pe_tdata): Add members target_subsystem and
4446 force_minimum_alignment.
4448 2001-02-14 Bo Thorsen <bo@suse.de>
4450 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4451 (elf64_86_64_size_info): Struct added to fix a problem
4452 with the hashtable string entries.
4453 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4454 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4455 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4456 remove the FIXME for this.
4457 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4458 section. Also removed the FIXME for it.
4459 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4460 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4461 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4463 2001-02-13 Richard Henderson <rth@redhat.com>
4465 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4466 and not user provided.
4468 2001-02-13 Kazu Hirata <kazu@hxi.com>
4470 * vms.c (vms_print_symbol): Remove unreachable code.
4472 * rs6000-core.c: Fix formatting.
4474 2001-02-13 David Mosberger <davidm@hpl.hp.com>
4476 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4477 as _bfd_XXi_only_swap_filehdr_out.
4478 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4479 pe->force_minimum_alignment to TRUE.
4480 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4481 PEI_TARGET_SUBSYSTEM.
4482 (pe_print_private_bfd_data): Call
4483 _bfd_XX_print_private_bfd_data_common() instead of
4484 _bfd_pe_print_private_bfd_data_common().
4485 (pe_bfd_copy_private_bfd_data): Call
4486 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4487 _bfd_pe_bfd_copy_private_bfd_data_common().
4488 (coff_bfd_copy_private_section_data): Define as
4489 _bfd_XX_bfd_copy_private_section_data instead of
4490 _bfd_pe_bfd_copy_private_section_data.
4491 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4492 of a _bfd_pe_get_symbol_info.
4496 * peXXigen.c: Renamed from peigen.c.
4497 (COFF_WITH_XX): Define this macro (will get expanded into
4498 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4499 compiled as peigen.c or pepigen.c.
4500 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4501 define the canonical PEP structures and definitions.
4502 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4503 effect, enforce minimum file and section alignments. If
4504 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4505 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4506 so, by default, this is a no-op).
4508 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4509 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4510 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4511 _bfd_pefoo if it's not defined. Use these macros to define
4514 * libcoff.h (pe_tdata): Add members target_subsystem and
4515 force_minimum_alignment.
4517 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4519 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4521 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4524 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4525 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4528 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4529 (BFD64_BACKENDS_CFILES): Mention pepigen.c
4530 (peigen.c): Add rule to generate from peXXigen.c.
4532 (pepigen.lo): List dependencies for pepigen.lo.
4534 2001-02-13 Alan Modra <alan@linuxcare.com.au>
4536 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
4537 $global$ referenced but not defined, set its value here.
4539 2001-02-09 Bo Thorsen <bo@suse.de>
4541 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4543 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4545 (elf64_x86_64_relocate_section): Fix formatting.
4546 (elf64_x86_64_relocate_section): Fix addend for relocation of
4547 R_X86_64_(8|16|32|PC8|PC16|PC32).
4549 2001-02-12 Jan Hubicka <jh@suse.cz>
4551 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4553 2001-02-11 H.J. Lu <hjl@gnu.org>
4555 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4558 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4560 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4561 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4562 relocations against dynsym symbols.
4564 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4565 the R_MIPS_26 relocation.
4566 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4567 the R_MIPS_26 relocation.
4568 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4570 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4571 the R_MIPS_26 relocation.
4572 (mips_elf64_howto_table_rela): Likewise.
4574 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4575 member to mark symbols that have non-CALL relocations against
4577 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4578 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4580 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4581 non-CALL relocation against it is encountered.
4582 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4583 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4584 no_fn_stub is not set.
4586 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4587 information from the real symbol for indirect ones.
4588 Check no_fn_stub to find out if a symbol has a function stub
4591 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4593 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4594 * Makefile.in: Regenerate.
4596 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4598 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4599 true if section name is an unwind table section name.
4600 (elfNN_ia64_additional_program_headers): Count each unwind section
4602 (elfNN_ia64_modify_segment_map): Install one unwind program header
4603 for each unwind separate section. Note: normally the linker
4604 script merges the unwind sections that go into a single segment,
4605 so this still generates at most one unwind program header per
4608 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4609 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4610 (elfNN_ia64_fake_sections): Mark sections with names that start
4611 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4614 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4615 Use it to make sh_info in unwind section point to the text section
4618 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4620 * Makefile.am: Add linux target for S/390.
4621 * archures.c: Likewise.
4622 * bfd-in2.h: Likewise.
4623 * config.bfd: Likewise.
4624 * configure.in: Likewise.
4626 * libbfd.h: Likewise.
4627 * targets.c: Likewise.
4628 * cpu-s390.c: New file.
4629 * elf32-s390.c: New file.
4630 * elf64-s390.c: New file.
4632 2001-02-09 Nick Clifton <nickc@redhat.com>
4634 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4635 ImageBase. This has already been done by coff_swap_hdr_in.
4637 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4639 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4641 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4643 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4644 (sparc64_elf_relocate_section): Likewise.
4646 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4648 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4649 similar to R_SPARC_32.
4650 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4652 2001-02-08 H.J. Lu <hjl@gnu.org>
4654 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4655 relocation entries for weak definitions when building DSO with
4658 2001-02-08 Richard Henderson <rth@redhat.com>
4660 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4661 before visibility. Locally defined protected symbols are not
4664 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4666 * config.bfd: Enable coff64 for rs6000-*. Patch from
4667 <hzoli@austin.ibm.com>.
4669 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4671 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4672 found, do not attempt to find dwarf2 info before returning.
4674 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4676 * elflink.h (is_global_symbol_definition): Rename to
4677 is_global_data_symbol_definition and have it reject function
4679 (elf_link_is_defined_archive_symbol): Use renamed function.
4681 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4683 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4684 * libbfd.h (bfd_target_vector): Likewise.
4685 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4686 make static; create pointer reference named bfd_target_vector.
4687 (_bfd_target_vector_entries): Calculate this based on the array
4688 typed _bfd_target_vector.
4690 2001-02-06 H.J. Lu <hjl@gnu.org>
4692 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4693 internal symbols are not dynamic.
4694 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4696 2001-02-06 Nick Clifton <nickc@redhat.com>
4698 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4699 that it will not be pulled into the list of files that make up
4701 * Makefile.in: Regenerate.
4702 * po/bfd.pot: Regenerate.
4704 2001-02-06 H.J. Lu <hjl@gnu.org>
4706 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4708 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4709 external_PEI_IMAGE_hdr.
4711 2001-02-06 Kazu Hirata <kazu@hxi.com>
4713 * elf-m10200.c: Fix formatting.
4715 2001-02-04 Nick Clifton <nickc@redhat.com>
4717 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4718 rel, it will be handled later on.
4720 2001-02-02 Fred Fish <fnf@ninemoons.com>
4722 * Makefile.in: Fix typo.
4724 2001-02-01 Kazu Hirata <kazu@hxi.com>
4726 * elf-m10300.c: Fix formatting.
4728 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4730 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4731 (elf_backend_get_symbol_type): Define.
4732 (elf64_hppa_object_p): Set architecture and machine from elf
4735 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4737 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4740 2001-01-26 Richard Henderson <rth@redhat.com>
4742 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4743 for non-default visibility.
4744 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4745 delete ugly macro and replace with pretty function.
4747 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4749 * coff-go32.c: Update copyright.
4750 * coff-stgo32.c: Likewise.
4751 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4752 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4753 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4754 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4756 2001-01-25 Kazu Hirata <kazu@hxi.com>
4758 * bfd-in2.h: Rebuild.
4759 * libbfd.h: Likewise.
4761 2001-01-23 H.J. Lu <hjl@gnu.org>
4763 * bfd-in2.h: Rebuild.
4765 2001-01-23 H.J. Lu <hjl@gnu.org>
4767 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4768 is NULL or PRIV(vms_rec) is outside of the buffer.
4770 2001-01-23 Kazu Hirata <kazu@hxi.com>
4772 * coff64-rs6000.c: Fix formatting.
4773 * coff-arm.c: Likewise.
4774 * coffgen.c: Likewise.
4775 * cofflink.c: Likewise.
4776 * coff-mcore.c: Likewise.
4777 * coff-mips.c: Likewise.
4778 * coff-pmac.c: Likewise.
4779 * coff-ppc.c: Likewise.
4780 * coff-rs6000.c: Likewise.
4781 * elf32.c: Likewise.
4782 * elf32-fr30.c: Likewise.
4783 * elf32-i370.c: Likewise.
4784 * elf32-i860.c: Likewise.
4785 * elf32-m32r.c: Likewise.
4786 * elf32-m68k.c: Likewise.
4787 * elf32-mcore.c: Likewise.
4788 * elf32-ppc.c: Likewise.
4789 * elf32-sh.c: Likewise.
4790 * elf32-v850.c: Likewise.
4791 * elf64-alpha.c: Likewise.
4792 * elf64-sparc.c: Likewise.
4793 * elflink.c: Likewise.
4794 * elflink.h: Likewise.
4795 * elf-m10200.c: Likewise.
4796 * elf-m10300.c: Likewise.
4797 * elfxx-ia64.c: Likewise.
4799 * aoutx.h: Fix formatting.
4801 * bfd-in2.h: Likewise.
4802 * bfd-in.h: Likewise.
4803 * cpu-i386.c: Likewise.
4804 * cpu-m68hc11.c: Likewise.
4805 * dwarf2.c: Likewise.
4806 * elf64-x86-64.c: Likewise.
4807 * format.c: Likewise.
4808 * freebsd.h: Likewise.
4810 * hp300hpux.c: Likewise.
4811 * hppabsd-core.c: Likewise.
4812 * hpux-core.c: Likewise.
4814 2001-01-22 Bo Thorsen <bo@suse.de>
4816 * elf64-x86-64.c: Added PIC support for X86-64.
4817 (elf64_x86_64_link_hash_newfunc): Function added.
4818 (elf64_x86_64_link_hash_table_create): Likewise.
4819 (elf64_x86_64_check_relocs): Likewise.
4820 (elf64_x86_64_gc_mark_hook): Likewise.
4821 (elf64_x86_64_gc_sweep_hook): Likewise.
4822 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4823 (elf64_x86_64_size_dynamic_sections): Likewise.
4824 (elf64_x86_64_discard_copies): Likewise.
4825 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4826 (elf64_x86_64_finish_dynamic_sections): Likewise.
4827 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4829 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4831 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4832 * Makefile.in: Regenerate.
4834 2001-01-21 Kazu Hirata <kazu@hxi.com>
4836 * coff-a29k.c: Fix formatting.
4838 2001-01-19 H.J. Lu <hjl@gnu.org>
4840 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4841 relocation section names.
4842 (elf_i386_relocate_section): Report files with bad relocation
4843 section names and return false.
4845 2001-01-17 Bo Thorsen <bo@suse.de>
4847 * targets.c: Alphabetize list of xvecs.
4849 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4851 * config.bfd: Add linux target variant for elfxx-hppa.
4852 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4853 bfd_elf64_hppa_linux_vec.
4854 * configure: Regenerate.
4855 * elf64-hppa.c: Include elf64-target.h again to support linux
4857 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4858 * elf32-hppa.c: Include elf32-target.h again to support linux
4860 (elf32_hppa_post_process_headers): New function.
4861 (elf_backend_post_process_headers): Define.
4862 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4863 bfd_elf32_hppa_linux_vec.
4865 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4866 and data_segment_base fields.
4867 (elf32_hppa_link_hash_table_create ): Init them.
4868 (elf32_hppa_check_relocs): Update comments.
4869 (hppa_record_segment_addr): New function.
4870 (elf32_hppa_relocate_section): Call it.
4871 (final_link_relocate): Handle R_PARISC_SEGREL32.
4872 (elf32_hppa_final_link): New function.
4873 (bfd_elf32_bfd_final_link): Define to call it.
4874 (hppa_unwind_entry_compare): New function.
4875 * cache.c (bfd_open_file): Create files in write+read mode.
4877 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4878 SEGREL32 and numerous other relocs. Change duplicate
4879 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4881 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4884 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4885 .plt entries for DT_INIT and DT_FINI.
4886 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4887 DT_INIT and DT_FINI.
4889 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4890 offsets for stub .plt access if wide mode. Check offset in range.
4892 2001-01-13 Nick Clifton <nickc@redhat.com>
4894 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4897 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4900 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4902 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4903 * configure: Regenerate.
4905 2001-01-11 Peter Targett <peter.targett@arccores.com>
4907 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4908 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4909 * cpu-arc.c (arch_info_struct): Add entries for variants.
4910 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4911 (arc_get_mach) Don't assume machine names prefixed arc- before
4913 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4915 (arc_elf_final_write_processing) Likewise.
4916 (ELF_MACHINE_CODE) Use EM_ARC.
4918 2001-01-10 Nick Clifton <nickc@redhat.com>
4920 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4922 2001-01-07 Philip Blundell <philb@gnu.org>
4924 * README: Replace `bug-gnu-utils@gnu.org' with
4925 `bug-binutils@gnu.org'.
4927 2001-01-04 Kazu Hirata <kazu@hxi.com>
4929 * som.c: Fix formatting.
4931 2001-01-03 Kazu Hirata <kazu@hxi.com>
4933 * ecoffswap.h: Fix formatting.
4934 * elf-bfd.h: Likewise.
4935 * elfarm-nabi.c: Likewise.
4936 * elfarm-oabi.c: Likewise.
4937 * elfcode.h: Likewise.
4938 * elfcore.h: Likewise.
4939 * elflink.c: Likewise.
4940 * elflink.h: Likewise.
4941 * elfxx-ia64.c: Likewise.
4942 * elfxx-target.h: Likewise.
4943 * libbfd.c: Likewise
4944 * linker.c: Likewise.
4945 * lynx-core.c: Likewise.
4947 2001-01-02 Kazu Hirata <kazu@hxi.com>
4949 * pc532-mach.c: Fix formatting.
4950 * pe-arm.c: Likewise.
4951 * pe-i386.c: Likewise.
4952 * pe-mips.c: Likewise.
4953 * pe-ppc.c: Likewise.
4954 * pe-sh.c: Likewise.
4955 * pei-mips.c: Likewise.
4956 * pei-sh.c: Likewise.
4957 * peicode.h: Likewise.
4958 * ppcboot.c: Likewise.
4959 * ptrace-core.c: Likewise.
4961 2001-01-01 Kazu Hirata <kazu@hxi.com>
4963 * reloc.c: Fix formatting.
4964 * riscix.c: Likewise.
4965 * rs6000-core.c: Likewise.
4966 * xcoff-target.h: Likewise.
4968 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4970 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4971 error, by calling bfd_default_set_arch_mach with incoming
4974 2000-12-26 Kazu Hirata <kazu@hxi.com>
4976 * vaxnetbsd.c: Fix formatting.
4977 * versados.c: Likewise.
4978 * vms-gsd.c: Likewise.
4979 * vms-hdr.c: Likewise.
4980 * vms-misc.c: Likewise.
4982 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4984 * archive.c (coff_write_armap): Don't write more than symbol_count
4985 `archive_member_file_ptr's.
4987 2000-12-25 Kazu Hirata <kazu@hxi.com>
4989 * vms-tir.c: Fix formatting.
4991 2000-12-23 Kazu Hirata <kazu@hxi.com>
4993 * vms.c: Fix formatting.
4996 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4998 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5000 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5002 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5005 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5007 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5009 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
5011 * libbfd.c (bfd_get_bits): Added
5012 (bfd_put_bits): Likewise
5013 * bfd-in.h: Declared the above.
5014 * bfd-in2.h: Regenerated.
5016 2000-12-20 Kazu Hirata <kazu@hxi.com>
5018 * targets.c: Fix formatting.
5019 * tekhex.c: Likewise.
5020 * trad-core.c: Likewise.
5022 2000-12-19 Kazu Hirata <kazu@hxi.com>
5024 * sco5-core.c: Fix formatting.
5025 * section.c: Likewise.
5026 * sparclinux.c: Likewise.
5027 * sparclynx.c: Likewise.
5028 * sparcnetbsd.c: Likewise.
5030 * stabs.c: Likewise.
5031 * stab-syms.c: Likewise.
5032 * sunos.c: Likewise.
5034 * sysdep.h: Likewise.
5036 2000-12-18 Nick Clifton <nickc@redhat.com>
5038 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5040 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5041 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5043 2000-12-18 Nick Clifton <nickc@redhat.com>
5045 * vms-misc.c (_bfd_vms_get_record): Add default case to
5048 2000-12-15 Miloslav Trmac <mitr@volny.cz>
5050 * elfcore.h (elf_core_file_p): Move to the start of the program
5051 headers before attempting to read them.
5053 2000-12-14 Kazu Hirata <kazu@hxi.com>
5055 * peigen.c: Fix formatting.
5059 2000-12-13 Kazu Hirata <kazu@hxi.com>
5061 * peigen.c: Fix formatting.
5063 2000-12-12 Jim Wilson <wilson@redhat.com>
5065 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5067 2000-12-08 Mark Salter <msalter@redhat.com>
5069 * binary.c (binary_set_section_contents): Ignore sections
5072 2000-12-12 Kazu Hirata <kazu@hxi.com>
5074 * m68klinux.c: Fix formatting.
5075 * m68knetbsd.c: Likewise.
5076 * mipsbsd.c: Likewise.
5077 * netbsd-core.c: Likewise.
5078 * netbsd.h: Likewise.
5079 * newsos3.c: Likewise.
5080 * nlm32-alpha.c: Likewise.
5081 * nlm32-i386.c: Likewise.
5082 * nlm32-ppc.c: Likewise.
5083 * nlm32-sparc.c: Likewise.
5084 * nlmcode.h: Likewise.
5085 * nlmswap.h: Likewise.
5086 * nlm-target.h: Likewise.
5087 * ns32knetbsd.c: Likewise.
5089 2000-12-10 Fred Fish <fnf@be.com>
5091 * elflink.h (elf_link_output_extsym): Don't complain about undefined
5092 symbols in shared objects if allow_shlib_undefined is true.
5094 2000-12-12 Nick Clifton <nickc@redhat.com>
5096 * cpu-sh.c: Fix formattng.
5097 * elf.c: Fix formattng.
5098 * elf32-mips.c: Fix formattng.
5099 * elf32-sh.c: Fix formattng.
5100 * elf64-alpha.c: Fix formattng.
5102 2000-12-09 Nick Clifton <nickc@redhat.com>
5104 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5105 dwarf2_find_line_info as last parameter to invocation of
5106 _bfd_dwarf2_find_nearest_line.
5107 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5108 dwarf2_find_line_info as last parameter to invocation of
5109 _bfd_dwarf2_find_nearest_line.
5111 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
5113 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5114 (BFD_LIBS): ...to here.
5115 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5116 (BFD_LIBS_CFILES): ...to here.
5117 * Makefile.in: Regenerate.
5118 * configure.in: Remove dwarf.lo from the elf shell variable.
5119 * configure: Regenerate.
5120 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5121 * libcoff.h: Regenerate.
5122 * coffgen.c (coff_find_nearest_line): Call
5123 _bfd_dwarf2_find_nearest_line.
5124 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5126 (read_abbrevs): Likewise
5127 (decode_line_info): Likewise.
5128 (parse_comp_unit): Likewise.
5129 (comp_unit_find_nearest_line): Likewise.
5130 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5131 * libbfd.h: Regenerate.
5132 * elf.c (_bfd_elf_find_nearest_line): Update call.
5133 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5134 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5135 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5136 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5137 (styp_to_sec_flags): Handle DWARF2 sections.
5138 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5139 to _bfd_find_nearest_line.
5140 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5141 call to _bfd_find_nearest_line.
5143 2000-12-08 Kazu Hirata <kazu@hxi.com>
5145 * coffgen.c: Fix formatting.
5146 * elf-m10300.c: Likewise.
5147 * elf32-i386.c: Likewise.
5148 * elf32-i960.c: Likewise.
5149 * elf32-m68k.c: Likewise.
5150 * elf32-mcore.c: Likewise.
5151 * elf32-ppc.c: Likewise.
5152 * elf32-sh.c: Likewise.
5153 * elf32-sparc.c: Likewise.
5154 * elf32-v850.c: Likewise.
5155 * elf64-alpha.c: Likewise.
5156 * elf64-hppa.c: Likewise.
5157 * elf64-mips.c: Likewise.
5158 * elf64-sparc.c: Likewise.
5160 2000-12-07 Kazu Hirata <kazu@hxi.com>
5162 * elf32-ppc.c: Fix formatting.
5163 * elf64-x86-64.c: Likewise.
5165 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
5167 From Ralf Baechle <ralf@gnu.org>
5169 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5170 BFDs containing no sections or empty .text, .data or .bss sections
5171 to be merged, regardless of their flags.
5173 2000-12-06 Kazu Hirata <kazu@hxi.com>
5175 * elf32-m32r.c: Fix formatting.
5176 * elf32-m68hc11.c: Likewise.
5177 * elf32-m68hc12.c: Likewise.
5178 * elf32-m68k.c: Likewise.
5179 * elf32-mcore.c: Likewise.
5180 * elf32-pj.c: Likewise.
5181 * elf32-ppc.c: Likewise.
5183 2000-12-05 Kazu Hirata <kazu@hxi.com>
5185 * elf32-fr30.c: Fix formatting.
5186 * elf32-hppa.c: Likewise.
5187 * elf32-i370.c: Likewise.
5188 * elf32-i386.c: Likewise.
5189 * elf32-i860.c: Likewise.
5190 * elf32-i960.c: Likewise.
5192 2000-12-03 Kazu Hirata <kazu@hxi.com>
5194 * elf32-arm.h: Fix formatting.
5195 * elf32-avr.c: Likewise.
5196 * elf32-cris.c: Likewise.
5197 * elf32-d10v.c: Likewise.
5198 * elf32-d30v.c: Likewise.
5199 * elf-hppa.h: Likewise.
5200 * elf-m10200.c: Likewise.
5201 * elf-m10300.c: Likewise.
5203 2000-12-01 Chris Demetriou <cgd@sibyte.com>
5205 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5206 bfd_mach_mips32_4k. Update FIXME comment.
5207 * archures.c (bfd_mach_mips32): New constant.
5208 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5209 the latter, renumber it.
5210 * bfd-in2.h (bfd_mach_mips32): New constant.
5211 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5212 the latter, renumber it.
5213 * cpu-mips.c (I_mips32): New constant.
5214 (I_mips4K, I_mips32_4k): Rename the former to the latter.
5215 (arch_info_struct): Add bfd_mach_mips32 entry, replace
5216 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5217 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5218 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
5219 with E_MIPS_MACH_MIPS32_4K.
5220 (_bfd_mips_elf_final_write_processing): Replace
5221 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5222 bfd_mach_mips32 case.
5223 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5224 comparison with support for MIPS32.
5225 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5228 * aoutx.h (NAME(aout,machine_type)): Add cases for
5229 bfd_mach_mips5 and bfd_mach_mips64.
5230 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5231 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5232 * cpu_mips.c (I_mips5, I_mips64): New definitions.
5233 (arch_info_struct): Add entries for bfd_mach_mips5 and
5235 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5236 _bfd_mips_elf_print_private_bfd_data): Add cases for
5237 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5238 (_bfd_mips_elf_final_write_processing): Add cases for
5239 bfd_mach_mips5 and bfd_mach_mips64.
5241 * aoutx.h (NAME(aout,machine_type)): Add a
5242 bfd_mach_mips_sb1 case.
5243 * archures.c (bfd_mach_mips_sb1): New constant.
5244 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5245 * cpu-mips.c (I_sb1): New constant.
5246 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5247 * elf32-mips.c (elf_mips_mach): Add case for
5249 (_bfd_mips_elf_final_write_processing): Add case for
5252 2000-12-01 Joel Sherrill <joel@OARcorp.com>
5254 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5255 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5256 (sparc*-*-rtems*): Switched from a.out to ELF.
5258 2000-11-30 Jan Hubicka <jh@suse.cz>
5260 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5261 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5262 (elf64-x86-64.lo): Add dependencies.
5263 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5264 bfd_mach_x86_64_intel_syntax.
5265 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5266 * config.bfd (x86_64): Add.
5267 * configure.in: Add support for bfd_elf64_x86_64_vec.
5268 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5269 (bfd_i386_arch, i8086_ar): Link in.
5270 * elf64-x86-64.c: New file.
5271 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5272 * targets.c (bfd_elf64_x86_64_vec): Add.
5273 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5275 2000-11-30 Kazu Hirata <kazu@hxi.com>
5277 * xcofflink.c: Fix formatting.
5279 2000-11-28 Kazu Hirata <kazu@hxi.com>
5281 * aoutx.h: Fix formatting.
5282 * bfd-in.h: Likewise.
5283 * bfd-in2.h: Likewise.
5284 * cache.c: Likewise.
5285 * cisco-core.c: Likewise.
5286 * coff64-rs6000.c: Likewise.
5287 * coffcode.h: Likewise.
5288 * coffswap.h: Likewise.
5289 * corefile.c: Likewise.
5290 * elf32-mips.c: Likewise.
5292 2000-11-27 Kazu Hirata <kazu@hxi.com>
5294 * aout-adobe.c: Fix formatting.
5295 * coff64-rs6000.c: Likewise.
5296 * coffgen.c: Likewise.
5297 * cofflink.c: Likewise.
5299 2000-11-27 Philip Blundell <pb@futuretv.com>
5301 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5302 (obj_coff_strings_written): New accessor macro for above.
5303 * libcoff.h: Regenerate.
5304 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5306 * coffcode.h (coff_write_object_contents): No need to write out
5307 the string table if it's already been done.
5309 2000-11-22 Philip Blundell <pb@futuretv.com>
5311 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5312 weak undefined symbols.
5314 2000-11-24 Nick Clifton <nickc@redhat.com>
5316 * archures.c (bfd_mach_arm_5TE): Define.
5317 (bfd_mach_arm+XScale): Define.
5318 * bfd-in2.h: Regenerate.
5320 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5321 BFD_RELOC_ARM_PCREL_BLX.
5323 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5324 XScale machine numbers.
5326 * config.bfd (xscale-elf): Add target.
5327 (xscale-coff): Add target.
5329 * cpu-arm.c: Add xscale machine name.
5330 Add v5t, v5te and XScale machine numbers.
5332 2000-11-23 Kazu Hirata <kazu@hxi.com>
5334 * aix386-core.c: Fix formatting.
5336 2000-11-22 Jim Wilson <wilson@redhat.com>
5338 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5339 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5340 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5341 (ins_imms_scaled): Initialize sign_bit at function entry.
5342 (elf64_ia64_operands): Add missing initializers.
5343 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5344 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5345 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5346 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5347 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5349 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5350 and free_extsyms at function entry.
5351 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5352 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5353 (get_got): Delete unused local srel.
5354 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5355 (elfNN_ia64_relocate_section): Delete unused local dynindx.
5357 2000-11-21 Kazu Hirata <kazu@hxi.com>
5359 * coff-a29k.c: Fix formatting.
5360 * coff-h8500.c: Likewise.
5361 * coff-i960.c: Likewise.
5362 * coff-ppc.c: Likewise.
5363 * coff-rs6000.c: Likewise.
5364 * coff-stgo32.c: Likewise.
5365 * coff-tic54x.c: Likewise.
5366 * coff-w65.c: Likewise.
5367 * cpu-h8500.c: Likewise.
5368 * cpu-hppa.c: Likewise.
5369 * cpu-ns32k.c: Likewise.
5370 * ecoff.c: Likewise.
5371 * ecofflink.c: Likewise.
5373 2000-11-21 Nick Clifton <nickc@redhat.com>
5375 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5376 remove possibility of infinite loop.
5378 2000-11-20 Kazu Hirata <kazu@hxi.com>
5380 * aix386-core.c: Fix formatting.
5381 * aout-adobe.c: Likewise.
5382 * aout-arm.c: Likewise.
5383 * aout-encap.c: Likewise.
5384 * aout-ns32k.c: Likewise.
5385 * aout-target.h: Likewise.
5386 * aout-tic30.c: Likewise.
5387 * aoutf1.h: Likewise.
5388 * aoutx.h: Likewise.
5389 * archive.c: Likewise.
5390 * bfd-in.h: Likewise.
5391 * bfd-in2.h: Likewise.
5395 2000-11-17 H.J. Lu <hjl@gnu.org>
5397 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5398 pltoff entries for DT_INIT and DT_FINI.
5399 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5400 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5403 2000-11-16 Richard Henderson <rth@redhat.com>
5405 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5406 (allocate_dynrel_entries): Likewise.
5407 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
5408 (set_pltoff_entry): Likewise.
5409 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5410 (elfNN_ia64_reloc_type_lookup): Likewise.
5411 (elfNN_ia64_install_value): Likewise.
5412 (elfNN_ia64_relocate_section): Likewise.
5413 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5414 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5416 2000-11-16 Kazu Hirata <kazu@hxi.com>
5418 * cpu-a29k.c: Fix formatting.
5419 * cpu-alpha.c: Likewise.
5420 * cpu-arm.c: Likewise.
5421 * cpu-avr.c: Likewise.
5422 * cpu-d10v.c: Likewise.
5423 * cpu-h8500.c: Likewise.
5424 * cpu-hppa.c: Likewise.
5425 * cpu-i370.c: Likewise.
5426 * cpu-i386.c: Likewise.
5427 * cpu-i960.c: Likewise.
5428 * cpu-ia64-opc.c: Likewise.
5429 * cpu-ia64.c: Likewise.
5430 * cpu-m32r.c: Likewise.
5431 * cpu-m68hc11.c: Likewise.
5432 * cpu-m68hc12.c: Likewise.
5433 * cpu-m68k.c: Likewise.
5434 * cpu-m88k.c: Likewise.
5435 * cpu-mips.c: Likewise.
5436 * cpu-ns32k.c: Likewise.
5437 * cpu-pj.c: Likewise.
5438 * cpu-powerpc.c: Likewise.
5439 * cpu-sh.c: Likewise.
5440 * cpu-sparc.c: Likewise.
5441 * cpu-tic54x.c: Likewise.
5442 * cpu-v850.c: Likewise.
5443 * cpu-vax.c: Likewise.
5444 * cpu-w65.c: Likewise.
5445 * cpu-we32k.c: Likewise.
5446 * cpu-z8k.c: Likewise.
5447 * dwarf1.c: Likewise.
5448 * dwarf2.c: Likewise.
5450 2000-11-15 Kazu Hirata <kazu@hxi.com>
5452 * coff-arm.c: Fix formatting.
5453 * coff-ppc.c: Likewise.
5454 * coff-rs6000.c: Likewise.
5455 * coff-sh.c: Likewise.
5456 * coff-sparc.c: Likewise.
5457 * coff-tic30.c: Likewise.
5458 * coff-tic54x.c: Likewise.
5459 * coff-tic80.c: Likewise.
5460 * coff-w65.c: Likewise.
5461 * coff-we32k.c: Likewise.
5462 * coff-z8k.c: Likewise.
5464 2000-11-15 Richard Henderson <rth@redhat.com>
5466 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5467 section with the same ALLOC|LOAD flags as the source section.
5469 2000-11-14 Jakub Jelinek <jakub@redhat.com>
5471 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5472 by STO_ALPHA constants.
5474 2000-11-14 Kazu Hirata <kazu@hxi.com>
5476 * coff-pmac.c: Fix formatting.
5477 * coff-ppc.c: Likewise.
5479 2000-11-13 H.J. Lu <hjl@gnu.org>
5481 * elflink.h (elf_link_add_object_symbols): Also add indirect
5482 symbols for common symbols with the default version.
5484 2000-11-09 Philip Blundell <pb@futuretv.com>
5486 * section.c (STD_SECTION): Set gc_mark flag.
5488 2000-11-11 Kazu Hirata <kazu@hxi.com>
5490 * coff-i960.c: Likewise.
5491 * coff-m68k.c: Likewise.
5492 * coff-m88k.c: Likewise.
5493 * coff-mcore.c: Likewise.
5494 * coff-mips.c: Likewise.
5496 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
5498 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5500 2000-11-10 Kazu Hirata <kazu@hxi.com>
5502 * coff-h8300.c: Fix formatting.
5503 * coff-h8500.c: Likewise.
5504 * coff-i386.c: Likewise.
5505 * coff-i860.c: Likewise.
5506 * coff-i960.c: Likewise.
5507 * coff-ia64.c: Likewise.
5509 2000-11-09 Kazu Hirata <kazu@hxi.com>
5511 * archive.c: Fix formatting.
5512 * archures.c: Likewise.
5514 2000-11-07 Richard Henderson <rth@redhat.com>
5516 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5517 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
5518 * section.c (bfd_set_section_contents): Call memcpy if
5519 section->contents set and location not equal to contents plus offset.
5521 2000-11-08 Kazu Hirata <kazu@hxi.com>
5523 * bfd-in.h: Fix formatting.
5524 * bfd-in2.h: Likewise.
5526 * binary.c: Likewise.
5528 * coff-a29k.c: Likewise.
5529 * coff-alpha.c: Likewise.
5530 * coff-apollo.c: Likewise.
5531 * coff-aux.c: Likewise.
5533 2000-11-07 Kazu Hirata <kazu@hxi.com>
5535 * aix386-core.c: Fix formatting.
5536 * aoutf1.h: Likewise.
5537 * aoutx.h: Likewise.
5538 * archures.c: Likewise.
5539 * armnetbsd.c: Likewise.
5541 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5543 * coff-h8300.c (special): Adjust reloc address.
5545 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5547 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5548 to differentiate elf32 and elf64 on ia64.
5549 * bfd-in2.h: Regenerate.
5550 * config.bfd: Add target for "ia64*-*-hpux*".
5551 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5552 * configure: Regenerate.
5553 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5554 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5556 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5557 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5558 * Makefile.in: Regnerate.
5559 * elf64-ia64.c: Deleted.
5560 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5562 2000-11-06 Kazu Hirata <kazu@hxi.com>
5564 * aout-adobe.c: Fix formatting.
5565 * aout-arm.c: Likewise.
5566 * aout-cris.c: Likewise.
5567 * aout-encap.c: Likewise.
5568 * aout-ns32k.c: Likewise.
5569 * aout-target.h: Likewise.
5570 * aout-tic30.c: Likewise.
5572 2000-11-05 Philip Blundell <philb@gnu.org>
5574 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5575 BFDs containing no sections to be merged, regardless of their flags.
5577 2000-11-04 Philip Blundell <philb@gnu.org>
5579 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5580 if a relocation for an undefined symbol also results in an
5583 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5585 * config.bfd: Add support for Sun Chorus.
5587 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5589 * configure.in: Recognize alpha-*-freebsd*.
5590 * configure: Regenerate.
5592 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5594 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5595 (Chunk): New global variable set by a parameter in objcopy.c.
5596 (S3Forced): New global variable set by a parameter in
5598 (srec_set_section_contents): If S3Forced is true, always generate
5600 (srec_write_section): Use 'Chunk' to limit maximum length of S
5603 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5605 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5606 * Makefile.in: Regenerate.
5607 * bfd-in2.h: Regenerate.
5608 * po/bfd.pot: Regenerate.
5610 2000-10-31 Philip Blundell <philb@gnu.org>
5612 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5613 EF_SOFT_FLOAT if it is defined.
5615 2000-10-27 Philip Blundell <philb@gnu.org>
5617 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5618 attempts to mix PIC code with non-PIC, just mark the output as
5619 being position dependent.
5620 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5621 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5622 all mismatches, not just the first one.
5624 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5626 * ieee.c (ieee_archive_p): Plug one of many possible
5627 memory leaks in error handling.
5629 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5631 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5632 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5634 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5635 sparc64_elf_object_p): Support v9b.
5636 * archures.c: Declare v8plusb and v9b machines.
5638 * cpu-sparc.c: Ditto.
5640 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5642 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5645 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5646 (SYMBOL_CALLS_LOCAL): New macro.
5647 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5648 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5649 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5650 (ppc_elf_relocate_section): Use flag variable to determine
5651 whether the relocation refers to a local symbol.
5652 Test whether a PLTREL24 reloc will produce a reloc by looking
5653 to see whether a PLT entry was made.
5655 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5657 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5658 entries that could serve as a definition for a weak symbol.
5660 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5662 From Ralf Baechle <ralf@gnu.org>
5664 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5665 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5666 against local symbols.
5667 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5669 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5671 * section.c (struct sec): Add kept_section.
5672 (struct bfd_comdat_info): Remove sec, we can use above.
5673 (STD_SECTION): Add initializer.
5674 (bfd_make_section_anyway): Init here too.
5676 * bfd-in2.h: Regenerate.
5678 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5680 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5681 fudge values for discarded link-once section symbols.
5683 * elf64-hppa.c: Include alloca-conf.h
5685 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5687 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5689 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5691 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5693 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5695 2000-10-10 Tom Rix <trix@redhat.com>
5697 * section.c (bfd_make_section_anyway): Release newsect ptr when
5698 newsect->symbol fails to alloc. Use bfd_release instead of free.
5700 2000-10-09 Richard Henderson <rth@cygnus.com
5702 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5703 (elf64_ia64_unwind_entry_compare): New.
5704 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5706 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5708 * elflink.h (size_dynamic_sections): Don't create various tags if
5709 .dynstr is excluded from the link. Don't set first dynsym entry
5710 if dynsymcount is zero.
5711 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5712 .dynsym excluded from the link. Don't try to write any dynamic
5713 sections excluded from the link.
5715 * elf.c (swap_out_syms): Handle global section symbols.
5717 2000-10-05 DJ Delorie <dj@redhat.com>
5719 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5720 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5721 (coff_write_relocs): write extended reloc count
5722 (coff_write_object_contents): account for extended relocs
5724 2000-10-05 Jim Wilson <wilson@cygnus.com>
5726 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5728 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5729 elf_backend_section_flags function.
5730 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5732 (elf64_ia64_section_flags): New function containing flag conversion
5734 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5735 * elfxx-target.h (elf_backend_section_flags): Define.
5736 (elfNN_bed): Initialize elf_backend_section_flags field.
5738 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5740 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5741 _bfd_elf32_gc_record_vtable. Correct a comment.
5743 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5745 From Ralf Baechle <ralf@gnu.org>
5747 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5748 produces binaries with got[1] = 0x80000001 to differenciate them
5749 for the dynamic linker from the broken binaries produced by old
5752 2000-09-30 Petr Sorfa <petrs@sco.com>
5754 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5755 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5756 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5757 * configure: Regenerate.
5759 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5761 Define two bfd_targets for absence and presence of leading
5762 underscore on symbols. Make sure to only link same kind.
5763 * elf32-cris.c (cris_elf_object_p,
5764 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5765 cris_elf_merge_private_bfd_data): New.
5766 (elf_backend_object_p, elf_backend_final_write_processing,
5767 bfd_elf32_bfd_print_private_bfd_data,
5768 bfd_elf32_bfd_merge_private_bfd_data): Define.
5769 <Target vector definition>: Include elf32-target.h twice with
5770 different macro settings:
5771 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5772 bfd_elf32_us_cris_vec.
5773 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5774 (elf_symbol_leading_char): First as 0, then '_'.
5775 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5776 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5777 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5778 * configure: Regenerate.
5779 * targets.c: Declare bfd_elf32_us_cris_vec.
5780 * po/bfd.pot: Regenerate.
5782 2000-09-29 Momchil Velikov <velco@fadata.bg>
5784 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5785 R_ARM_THM_PC22 relocations.
5787 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5789 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5791 2000-09-29 Momchil Velikov <velco@fadata.bg>
5793 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5794 is has the SEC_HAS_CONTENTS flag set.
5796 2000-09-28
\81Örjan Friberg <orjanf@axis.com>
5797 Hans-Peter Nilsson <hp@axis.com>
5799 * aout-cris.c (N_TXTADDR): Define.
5801 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5803 * som.c: Include alloca-conf.h.
5804 * Makefile.am: "make dep-am"
5805 * Makefile.in: Regenerate.
5807 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5809 * elf32-hppa.c (plt_stub): New.
5810 (PLT_STUB_ENTRY): Define.
5811 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5812 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5813 (elf32_hppa_link_hash_table_create): Init to suit.
5814 (elf32_hppa_check_relocs): Set has_12bit_branch and
5815 has_17bit_branch as appropriate.
5816 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5817 non-local functions.
5818 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5819 Add space for plt_stub as needed.
5820 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5821 functions at plt_stub.
5822 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5823 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5825 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5826 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5827 of fixed size, and if negative, disable handling of input sections
5828 before stub section. Set up default stub group size depending
5829 on detected branch relocs.
5830 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5831 ensure different offsets from sym_value aren't rounded to
5832 different 2k blocks. Use lrsel and rrsel for other stubs too for
5833 consistency rather than necessity.
5834 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5835 (final_link_relocate): Likewise.
5836 (elf32_hppa_relocate_section): Likewise.
5838 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5839 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5840 (elf_hppa_final_link_relocate): Handle them.
5841 (elf_hppa_relocate_insn): Likewise.
5842 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5844 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5846 * elfcode.h (elf_object_p): Preserve and clear abfd section
5847 information. Restore at error.
5849 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5851 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5852 is empty, make sure that its rva also 0. NT loader dislikes
5855 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5857 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5860 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5862 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5863 currently unused RELATIVE_DYNAMIC_RELOCS code.
5864 (hppa_discard_copies): Likewise.
5865 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5866 comments. Don't check non-code output sections for stub grouping.
5868 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5870 * section.c (bfd_get_unique_section_name): Return NULL if
5873 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5875 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5876 instruction sequence to actually work.
5877 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5880 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5882 * elf32-sh.c (sh_elf_relocate_section): Use
5883 _bfd_final_link_relocate to apply the relocation against a section
5884 symbol, when doing relocatable links.
5886 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5888 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5890 (stub_hash_newfunc): Here too.
5891 (hppa_add_stub): And here.
5892 (elf32_hppa_link_hash_table): Remove stub_section_created,
5893 reloc_section_created, first_init_sec and first_fini_sec. Add
5895 (elf32_hppa_link_hash_table_create): Init to suit.
5896 (hppa_get_stub_entry): Add support for grouping stub sections.
5897 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5898 section code. Index stub vars by section->id.
5899 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5900 exit paths. Zap allocation of above removed vars. Refine
5903 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5904 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5905 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5906 rather than pointer to bfd_link_info.
5907 (hppa_add_stub): Likewise.
5908 (final_link_relocate): Likewise.
5910 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5912 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5915 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5917 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5918 ld/emulparams/shelf.sh.
5920 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5922 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5923 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5924 * bfd-in2.h: Regenerate.
5926 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5928 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5929 LITUSE relocations incorrectly if -relax is specified on the ld
5930 command line and the displacement field of the load or store
5931 instruction is non-zero. (Patch by paul.winalski@compaq.com)
5933 2000-09-15 Alan Modra <alan@linuxcare.com.au>
5935 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5936 first_fini_sec here.
5937 (elf32_hppa_size_stubs): Instead correctly find the first .init
5938 and .fini section here.
5940 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5942 * elf32-hppa.c (clobber_millicode_symbols): New function.
5943 (elf32_hppa_size_dynamic_sections): Call it.
5945 2000-09-14 Alan Modra <alan@linuxcare.com.au>
5947 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5948 packed. Add plabel, plt_abs packed booleans.
5949 (hppa_link_hash_newfunc): Init new fields.
5950 (PLABEL_PLT_ENTRY_SIZE): Define.
5951 (hppa_stub_name): Use size_t len vars.
5952 (hppa_add_stub): Likewise.
5953 (elf32_hppa_build_stubs): Likewise.
5954 (hppa_build_one_stub): Kill some compiler warnings.
5955 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5956 if dynamic linking. Munge the local plt offsets into
5957 local_got_refcounts. Set h->plabel for all global PLABELs. Use
5958 size_t len vars. Add assert for plabel addend.
5959 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5960 (elf32_hppa_hide_symbol): New function.
5961 (elf_backend_hide_symbol): Define.
5962 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5963 with h->plabel set. Don't make plt entries to have dynamic syms
5964 when they have been forced local. If plt entry is used by a
5965 plabel, make it PLABEL_PLT_ENTRY_SIZE.
5966 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5967 Set up .plt offsets for local syms.
5968 (elf32_hppa_relocate_section): Initialise plt entries for local
5969 syms. Leave weak undefined plabels zero. Make global plabel
5970 relocs against function symbol, and leave the addend zero.
5971 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5972 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5973 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
5974 relocs instead of SEGREL32 for dynamic got relocs.
5975 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5976 (elf_backend_got_header_size): Adjust.
5977 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5979 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5980 (hppa_type_of_stub): Use it instead of #if 0
5981 (hppa_discard_copies): Use it here too.
5982 (elf32_hppa_size_dynamic_sections): And here.
5984 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5985 (elf32_hppa_link_hash_table_create): And here.
5986 (hppa_build_one_stub): And here. Instead keep track of stub
5987 offset using _raw_size.
5988 (elf32_hppa_size_stubs): Likewise.
5989 (elf32_hppa_build_stubs): Likewise.
5990 (hppa_size_one_stub): Likewise. Resize reloc section too.
5992 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5993 first_fini_sec handling. Don't search for reloc section or set
5994 hplink->reloc_section_created here.
5995 (elf32_hppa_size_stubs): Instead search for reloc sections, and
5996 set reloc_section_created here.
5997 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5998 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6000 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6002 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6003 with `hplink->root.'.
6004 (elf32_hppa_check_relocs): Likewise.
6005 (elf32_hppa_gc_sweep_hook): Likewise.
6006 (elf32_hppa_adjust_dynamic_symbol): Likewise.
6007 (hppa_handle_PIC_calls): Likewise.
6008 (elf32_hppa_size_dynamic_sections): Likewise.
6009 (elf32_hppa_set_gp): Likewise.
6010 (elf32_hppa_relocate_section): Likewise.
6011 (elf32_hppa_finish_dynamic_symbol): Likewise.
6012 (elf32_hppa_finish_dynamic_sections): Likewise.
6014 From David Huggins-Daines <dhd@linuxcare.com>
6015 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6016 defined weak symbols in shared links.
6017 (final_link_relocate): Calls to defined weak symbols in shared
6018 objects must go via import stubs, as the target might not be known
6021 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
6023 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6024 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6025 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
6026 the original entries with EMPTY_HOWTOs, and added new ones to fill
6028 (sh_elf_info_to_howto): Make sure the new gap isn't used.
6029 (sh_elf_relocate_section): Likewise.
6031 2000-09-13 Anders Norlander <anorland@acc.umu.se>
6033 * cpu-mips.c (arch_info_struct): Add mips:4K
6034 * bfd-in2.h (bfd_mach_mips4K): New define.
6035 * archures.c: Add bfd_mach_mips4K to comment.
6036 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6037 E_MIPS_ARCH_2 for bfd_mach_mips4K.
6039 2000-09-13 Marco Franzen <marcof@thyron.com>
6041 * som.c (som_write_symbol_strings): Do not used fixed buffers,
6042 use size_t as a counter.
6043 (som_write_space_strings): Similarly.
6045 2000-09-12 Jason Eckhardt <jle@cygnus.com>
6047 * elf32-i860.c (elf32_i860_relocate_pc26): New function
6049 (elf32_i860_relocate_section): Invoke new function from here.
6051 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6053 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6056 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6058 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6059 target section name instead of dumping core when the target symbol is
6062 2000-09-09 Kazu Hirata <kazu@hxi.com>
6064 * riscix.c: Remove DEFUN.
6066 2000-09-08 Nick Clifton <nickc@redhat.com>
6068 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6069 initialise flags in output bfd if the input bfd is the default
6070 architecture with the default flags.
6072 2000-09-08 Kazu Hirata <kazu@hxi.com>
6074 * archive.c: Fix formatting.
6075 * coff-arm.c: Likewise.
6076 * doc/chew.c: Likewise.
6078 2000-09-08 Alan Modra <alan@linuxcare.com.au>
6080 * section.c (bfd_get_unique_section_name): Put a dot before the
6083 2000-09-07 Kazu Hirata <kazu@hxi.com>
6085 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6086 * elf.c: Fix formatting.
6088 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
6090 * config.bfd (sh-*-linux*): Added.
6091 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6092 * targets.c: Declare them.
6093 * elf32-sh-lin.c: New file.
6094 * Makefile.am: Compile it.
6095 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6096 * configure, Makefile.in: Rebuilt.
6098 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
6100 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6101 pseduo-section when determining where the TOC ends.
6103 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6104 output x_tvndx as it is only two bytes wide.
6106 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6107 reloc is 26 or 32 bits wide.
6109 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6110 for relocs that don't change anything. Also look at the full
6113 2000-09-06 Philip Blundell <philb@gnu.org>
6115 * config.bfd (arm*-*-uclinux*): New target.
6117 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
6119 * configure: Rebuilt with new libtool.m4.
6121 2000-09-06 Alan Modra <alan@linuxcare.com.au>
6123 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6124 word for variable name.
6125 * bfd-in2.h: Regenerate.
6127 2000-09-05 Nick Clifton <nickc@redhat.com>
6129 * config.in: Regenerate.
6130 * libbfd.h: Regenerate.
6131 * po/bfd.pot: Regenerate.
6132 * doc/bfdint.texi: Remove CVS date string - it foils compares with
6135 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
6137 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
6139 2000-09-05 Alan Modra <alan@linuxcare.com.au>
6141 Shared library and PIC support.
6142 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6143 (GOT_ENTRY_SIZE): New.
6144 (ELF_DYNAMIC_INTERPRETER): New.
6145 (STUB_SUFFIX): Define.
6146 (LONG_BRANCH_PIC_IN_SHLIB): Define.
6147 (RELATIVE_DYNAMIC_RELOCS): Define.
6148 (enum elf32_hppa_stub_type): New.
6149 (struct elf32_hppa_stub_hash_entry): Rename offset to
6150 stub_offset. Add a number of new fields.
6151 (struct elf32_hppa_link_hash_entry): New.
6152 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
6154 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6155 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6156 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
6158 (hppa_link_hash_newfunc): New function.
6159 (elf32_hppa_link_hash_table_create): Use above function. Init new
6161 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
6162 instead of addend, and remove sym_name from args. Don't use
6163 symbol name for local syms, instead use sym index.
6164 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6165 stub type rather than size. Pass in hash and handle import stub
6166 case. Also pass in reloc instead of offset so we can calculate
6167 PCREL22F and PCREL12F branches properly.
6168 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
6169 import and export stubs too.
6170 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
6171 import and export stub sizing.
6172 (elf32_hppa_check_relocs): New function.
6173 (elf32_hppa_adjust_dynamic_symbol): New function.
6174 (hppa_discard_copies): New function.
6175 (elf32_hppa_size_dynamic_sections): New function.
6176 (elf_backend_size_dynamic_sections): Define.
6177 (elf32_hppa_finish_dynamic_symbol): New function.
6178 (elf_backend_finish_dynamic_symbol): Define.
6179 (elf32_hppa_size_stubs): Stash params in link hash table, and move
6180 some local vars into the link hash table too. For shared links,
6181 trundle over function syms, generating export stubs. Handle
6182 PCREL22F branches. Break out stub creation code from here..
6183 (hppa_add_stub): .. to here. New function.
6184 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6185 call the bfd linker. Use elf_gp to record global pointer.
6186 Calculate a value from sections if $global$ is missing.
6187 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6188 (elf32_hppa_gc_mark_hook): New function.
6189 (elf_backend_gc_mark_hook): Define.
6190 (elf32_hppa_gc_sweep_hook): New function.
6191 (elf_backend_gc_sweep_hook): Define.
6192 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6193 Add rel to args, and remove howto, input_bfd, offset, addend,
6194 sym_name as we can recalculate these locally. Handle calls to
6195 dynamic objects, extra PIC relocs, PCREL22F branches. Change
6196 handling of undefined weak syms. Check that stubs are in range.
6197 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
6198 message on hitting a DPREL21L reloc that needs fixing. Subtract
6199 off PC for PCREL14F. Break out code that does a stub lookup from
6201 (hppa_get_stub_entry): ..to here. New function.
6202 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6203 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6205 (elf32_hppa_finish_dynamic_sections): New function.
6206 (elf_backend_finish_dynamic_sections): Define.
6207 (elf_backend_final_write_processing) Define.
6208 (hppa_handle_PIC_calls): New function.
6209 (elf32_hppa_build_stubs): Call it. Pass link_info to
6210 hppa_build_one_stub.
6211 (elf32_hppa_create_dynamic_sections): New function
6212 to create .plt and .got then set .plt flags correctly.
6213 (elf_backend_create_dynamic_sections): Define.
6214 (elf32_hppa_object_p): New function.
6215 (elf_backend_object_p): Define.
6216 (elf32_hppa_elf_get_symbol_type): New function.
6217 (elf_backend_get_symbol_type): Define.
6218 (elf_backend_can_gc_sections): Define.
6219 (elf_backend_want_got_plt): Define.
6220 (elf_backend_plt_alignment): Set to 2.
6221 (elf_backend_plt_readonly): Define.
6222 (elf_backend_want_plt_sym): Define.
6223 (elf_backend_got_header_size): Reserve one entry.
6225 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6226 (elf32_hppa_size_stubs): Pass in multi_subspace.
6227 (elf32_hppa_set_gp): Declare.
6229 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6230 (bfd_get_unique_section_name): New function.
6231 * bfd-in2.h: Regenerate.
6233 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6234 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6237 From David Huggins-Daines <dhd@linuxcare.com>
6238 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6239 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6240 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6241 been updated in finish_dynamic_symbol before modifying function
6244 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6245 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
6246 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6247 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
6248 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
6249 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6250 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
6251 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6253 From David Huggins-Daines <dhd@linuxcare.com>
6254 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6255 style of local labels as well.
6257 2000-09-03 Philip Blundell <philb@gnu.org>
6259 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6260 references to undefined symbols in debugging sections.
6262 2000-09-02 H.J. Lu <hjl@gnu.org>
6264 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6265 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6266 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6269 2000-09-02 Jason Eckhardt <jle@cygnus.com>
6271 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6272 (elf32_i860_is_local_label_name): New function and prototype.
6274 2000-09-02 Nick Clifton <nickc@redhat.com>
6276 * configure.in: Increase version number to 2.10.91.
6277 * configure: Regenerate.
6278 * aclocal.m4: Regenerate.
6279 * config.in: Regenerate.
6280 * po/bfd.pot: Regenerate.
6282 2000-09-02 Daniel Berlin <dberlin@redhat.com>
6284 * elf.c (_bfd_elf_make_section_from_shdr): Add
6285 .gnu.linkobce.wi. to the list of debug section names.
6287 2000-09-02 Nick Clifton <nickc@redhat.com>
6289 * dwarf2.c (find_debug_info): New function: Locate a section
6290 containing dwarf2 debug information.
6291 (bfd_dwarf2_find_nearest_line): Find all sections containing
6292 debug information and include them in the stash.
6294 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
6296 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6297 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6298 (sh_reloc_map): Add new relocs.
6299 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6300 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6301 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6302 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6304 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6305 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6306 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6307 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6308 New array constants.
6309 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6311 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6312 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6313 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6314 elf_sh_plt_reloc_offset): Define.
6315 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6316 elf_sh_link_hash_table): New structs.
6317 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6318 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6320 (elf_backend_create_dynamic_sections,
6321 bfd_elf32_bfd_link_hash_table_create,
6322 elf_backend_adjust_dynamic_symbol,
6323 elf_backend_size_dynamic_sections,
6324 elf_backend_finish_dynamic_symbol,
6325 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6326 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6327 elf_backend_got_header_size, elf_backend_plt_header_size):
6329 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6330 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6332 * bfd-in2.h, libbfd.h: Rebuilt.
6334 2000-09-01 Alan Modra <alan@linuxcare.com.au>
6336 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6339 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
6341 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6342 not initialized, set them to indicate the SH1 instruction set.
6344 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
6346 * acinclude.m4: Include libtool and gettext macros from the
6348 * aclocal.m4, configure: Rebuilt.
6350 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
6352 * elf.c: Eliminate references to __sparcv9 macro; replace with
6353 autoconf variables HAVE_PSINFO32_T etc.
6354 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6355 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6357 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6358 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6359 * aclocal.m4: Ditto.
6360 * configure: Regenerate.
6362 2000-08-27 Alan Modra <alan@linuxcare.com.au>
6364 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6365 for any shared link, not just shared -Bsymbolic.
6366 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6367 any shared link, and pass link info to it.
6368 (elf_i386_size_dynamic_sections): Update comment.
6369 (elf_i386_discard_copies): Modify to discard relocs for symbols
6370 that have been forced local.
6371 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6372 that have been forced local.
6374 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
6376 * elflink.h (elf_link_add_object_symbols): Allow common
6377 symbols to have an alignment of 1 if explicitly requested, and
6378 not overridden by other definitions.
6380 2000-08-22 Doug Kwan <dkwan@transmeta.com>
6382 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6383 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6385 2000-08-22 H.J. Lu <hjl@gnu.org>
6387 * elf-bfd.h (elf_link_hash_table): Add runpath.
6389 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6390 * bfd-in2.h: Rebuilt.
6392 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6393 "runpath" field to NULL.
6394 (bfd_elf_get_runpath_list): New function.
6396 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6399 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
6401 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6402 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6403 explicitly. Improve validation of r_type.
6405 2000-08-21 H.J. Lu <hjl@gnu.org>
6407 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6408 dynamic allocated content space. Add a comment to remind us that
6409 one day this ought to be fixed.
6410 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6411 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6412 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6414 2000-08-21 Jason Eckhardt <jle@cygnus.com>
6416 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6417 field with the newly relocated value instead of adding it to the
6418 existing immediate field.
6419 (elf32_i860_relocate_splitn): Likewise.
6420 (elf32_i860_relocate_highadj): Likewise.
6422 2000-08-16 Jason Eckhardt <jle@cygnus.com>
6424 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6425 was previously just a stub).
6427 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
6429 * elflink.c (_bfd_elf_create_got_section): Don't abort().
6431 (_bfd_elf_create_dynamic_sections): Likewise.
6433 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
6435 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6436 for undefined symbols to be the beginning of the section.
6438 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6439 four extra entries at the beginning of the .rela.plt section.
6440 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6441 section to account for the four reserved entries in the .plt section.
6443 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
6445 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6446 to the list of NOPs we recognize after a branch-and-link.
6447 Use the ori NOP when one is needed.
6449 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6452 2000-08-14 Jim Wilson <wilson@cygnus.com>
6454 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6455 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6456 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
6459 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
6461 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6463 2000-08-10 Jason Eckhardt <jle@cygnus.com>
6465 * elf32-i860.c (elf32_i860_relocate_section): New function.
6466 (i860_final_link_relocate): New function.
6467 (elf32_i860_relocate_splitn): New function.
6468 (elf32_i860_relocate_pc16): New function.
6469 (elf32_i860_relocate_highadj): New function.
6470 (elf32_i860_howto): Minor adjustments to some relocations.
6471 (elf_info_to_howto_rel): Define.
6472 (elf_backend_relocate_section): Define.
6474 2000-08-10 Nick Clifton <nickc@cygnus.com>
6476 * elf32-arm.h: Fix formatting.
6478 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
6480 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6482 2000-08-08 Jason Eckhardt <jle@cygnus.com>
6484 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6486 2000-08-07 Kazu Hirata <kazu@hxi.com>
6488 * ieee.c (ieee_write_debug_part): Rewrite a comment.
6489 * elf64-ia64.c: Fix a typo.
6491 2000-08-05 Jason Eckhardt <jle@cygnus.com>
6493 * elf32-i860.c (elf32_i860_howto_table): New structure.
6494 (lookup_howto): New function.
6495 (elf32_i860_reloc_type_lookup): New function.
6496 (elf32_i860_info_to_howto_rela): New function.
6497 (elf_code_to_howto_index): New structure.
6498 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6499 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6500 elf32_i860_reloc_type_lookup.
6502 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
6504 * som.c (struct fixup_format): Constify `format'.
6505 (som_hppa_howto_table): Use SOM_HOWTO macro.
6506 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6507 (som_bfd_reloc_type_lookup): Likewise.
6508 (compare_subspaces): Remove unused `count1', `count2'.
6509 (som_begin_writing): Remove unused `total_reloc_size'.
6510 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6511 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6512 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6513 (som_find_nearest_line): Decorate unused parameter(s).
6514 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6515 (som_bfd_link_split_section): Likewise.
6517 2000-08-03 Nick Clifton <nickc@cygnus.com>
6519 * section.c: Restore backed out code.
6520 * elf.c: Restore backed out code.
6521 (copy_private_bfd_data): Fix bug preventing stipped dynamic
6522 binaries from working.
6523 * bfd-in2.h: Regenerate.
6525 2000-08-03 H.J. Lu <hjl@gnu.org>
6527 * section.c: Back out the change made by Nick Clifton
6528 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6530 * bfd-in2.h: Likewise.
6533 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
6535 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6537 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6539 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6540 * bfd-in2.h, libbfd.h: Regenerate.
6542 2000-07-31 Nick Clifton <nickc@cygnus.com>
6544 * section.c (struct sec): Add new boolean field 'segment_mark'.
6545 (STD_SECTION): Initialise new field to zero.
6547 * bfd-in2.h: Regenerate.
6549 * elf.c (copy_private_bfd_data): Reorganise section to segment
6550 mapping to cope with moved sections requiring new segments,
6551 and overlapping segments.
6552 (SEGMENT_END): New macro: Return the end address of a segment.
6553 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6554 contains a section by comparing their VMA addresses.
6555 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6556 contains a section by comparing their LMA addresses.
6557 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6558 section should be included in a segment.
6559 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6560 follows another in memory.
6561 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6564 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6566 * cpu-i860.c: Added comments.
6568 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6569 bfd_elf32_i860_little_vec.
6570 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6571 (ELF_MAXPAGESIZE): Changed to 4096.
6573 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6575 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6577 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6578 config for little endian elf32 i860.
6579 (targ_defvec): Define for the new config above
6580 as "bfd_elf32_i860_little_vec".
6581 (targ_selvecs): Define for the new config above
6582 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6584 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6587 * configure: Regenerated.
6589 2000-07-27 H.J. Lu <hjl@gnu.org>
6591 * elflink.h (elf_merge_symbol): Take one more argument,
6592 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6593 entry. Don't overide the existing weak definition if dt_needed
6595 (elf_link_add_object_symbols): Pass dt_needed to
6596 elf_merge_symbol ().
6598 2000-07-27 Nick Clifton <nickc@cygnus.com>
6600 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6603 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6605 * configure.host (*-*-aix*): AIX has 'long long' always.
6607 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6608 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6609 (xcoff_write_archive_contents_big): Don't update the offset
6610 of the symbol table, xcoff_write_armap will do it.
6612 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6614 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6615 of dynobj for SGI_COMPAT checks.
6617 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6619 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6620 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6621 * bfd-in2.h: Regenerate.
6623 2000-07-21 Nick Clifton <nickc@cygnus.com>
6625 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6626 range symbol indices in relocs and issue an error message.
6628 2000-07-20 H.J. Lu <hjl@gnu.org>
6630 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6631 info->new_dtags when setting DT_FLAGS_1. It will only be set
6632 by the new linker options. It shouldn't break anything.
6634 2000-07-20 H.J. Lu <hjl@gnu.org>
6636 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6637 only if info->new_dtags is true.
6639 2000-07-20 H.J. Lu <hjl@gnu.org>
6641 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6642 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6644 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6646 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6647 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6648 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6649 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6650 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6651 * Makefile.in: Rebuild.
6652 * aclocal.m4: Rebuild.
6653 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6654 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6655 (bfd_cris_arch): Declare.
6656 (bfd_archures_list): Add bfd_cris_arch.
6657 * bfd-in2.h: Rebuild.
6658 * config.bfd: (cris-*-*): New target.
6659 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6660 * configure: Rebuild.
6661 * elf.c (prep_headers): Add bfd_arch_cris.
6662 * libbfd.h: Rebuild.
6663 * libaout.h (enum machine_type): Add M_CRIS.
6664 * reloc.c: Add CRIS relocations.
6665 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6666 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6667 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6668 * po/POTFILES.in, po/bfd.pot: Regenerate.
6670 2000-07-19 H.J. Lu <hjl@gnu.org>
6672 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6673 DF_TEXTREL if DT_TEXTREL is set.
6674 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6675 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6676 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6677 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6678 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6679 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6680 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6681 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6682 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6683 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6685 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6686 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6688 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6690 2000-07-19 H.J. Lu <hjl@gnu.org>
6692 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6693 * bfd-in2.h: Rebuild.
6695 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6696 (elf_dt_soname): New.
6698 * elf.c (bfd_elf_set_dt_needed_soname): New.
6700 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6701 entry if the shared object loaded by DT_NEEDED is used to
6702 resolve the reference in a regular object.
6704 2000-07-19 H.J. Lu <hjl@gnu.org>
6706 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6707 DT_DEPAUDIT and DT_AUDIT as strings.
6709 2000-07-19 Nick Clifton <nickc@cygnus.com>
6711 * format.c: Fix formatting.
6713 2000-07-19 H.J. Lu <hjl@gnu.org>
6715 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6717 2000-07-19 H.J. Lu <hjl@gnu.org>
6719 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6720 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6721 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6722 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6723 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6724 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6725 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6727 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6729 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6730 renamed functions from here...
6731 (assign_section_numbers): Use renamed functions.
6732 (prep_headers): Use renamed functions.
6734 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6735 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6736 * bfd-in2.h: Regenerate.
6738 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6740 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6741 parenthesis in if statement.
6743 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6745 Enable the support for Traditional MIPS.
6746 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6747 return ict_none appropriately for traditional mips targets.
6748 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6749 (STUB_MOVE): Conditionalize for traditonal mips.
6750 (STUB_LI16): Likewise.
6751 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6752 room for RTPROC header.
6753 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6754 the permission for the PT_DYNAMIC as read, write and execute.
6755 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6756 for traditonal mips.
6757 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6758 _DYNAMIC_LINKING for traditonal mips.
6759 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6760 in case of traditonal mips.
6761 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6762 entry is required. For a function if PLT is not required then set the
6763 corresponding hash table entry to 0.
6764 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6766 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6767 shared object set the value to 0.
6768 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6769 _DYNAMIC_LINKING for traditonal mips.
6770 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6771 for traditonal mips.
6773 2000-07-15 H.J. Lu <hjl@gnu.org>
6775 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6777 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6779 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6780 out a structure that is BFD_IN_MEMORY.
6782 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6784 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6785 bfd pointer. Print section id instead of bfd pointer for local
6786 syms. Prefix addend with `+' for global syms as well as local.
6787 Correct calculation of name component lengths.
6788 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6790 From David Huggins-Daines <dhd@linuxcare.com>
6791 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6792 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6793 (elf64_hppa_modify_segment_map): Likewise.
6795 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6797 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6798 addresses to be "naturally" sign extended. Return -1 if unknown.
6799 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6800 * bfd-in2.h: Regenerate.
6802 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6804 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6805 and ECOF_SIGNED_64 to list ways to extract an offset.
6806 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6807 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6809 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6810 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6812 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6814 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6815 bfd_get_start_address.
6816 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6817 (elf_swap_ehdr_out): Ditto.
6819 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6821 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6822 compatibility with older binutils.
6824 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6826 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6827 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6829 From Ryan Bradetich <rbradetich@uswest.net>
6830 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6831 (parse_line_table): Ditto.
6832 (_bfd_dwarf1_find_nearest_line): Ditto.
6833 * syms.c (cmpindexentry): Remove extra `*' from params.
6835 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6837 * elf32-mips.c (sort_dynamic_relocs): New Function.
6838 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6839 via qsort to sort the dynamic relocations in increasing r_symndx
6842 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6844 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6845 ATTRIBUTE_UNUSED to unused args.
6846 (get_opd): Likewise.
6847 (get_plt): Likewise.
6848 (get_dlt): Likewise.
6849 (get_stub): Likewise.
6850 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6851 (elf64_hppa_link_output_symbol_hook): Likewise.
6852 (elf64_hppa_check_relocs): Delete unused var.
6853 (elf64_hppa_size_dynamic_sections): Likewise.
6854 (elf64_hppa_finalize_opd): Likewise.
6855 (elf64_hppa_finalize_dynreloc): Likewise.
6856 (elf64_hppa_modify_segment_map): Likewise.
6857 (elf64_hppa_finish_dynamic_sections): Likewise.
6859 * elf-hppa.h (elf_hppa_final_write_processing): Add
6860 ATTRIBUTE_UNUSED to unused args.
6861 (elf_hppa_final_link_relocate): Likewise.
6862 (elf_hppa_record_segment_addrs): Add paretheses.
6863 (elf_hppa_relocate_section): Constify dyn_name.
6865 From David Huggins-Daines <dhd@linuxcare.com>
6866 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6867 rearrange case statement so that it gets preferred to 32-bit ones.
6869 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6870 asection->id instead of address of asection structure.
6871 (elf32_hppa_size_stubs): Likewise.
6873 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6874 for .init* and .fini*.
6876 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6877 and addends used in stub names to 32 bits.
6878 (elf32_hppa_size_stubs): Likewise.
6880 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6881 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6882 not bfd_put_64. Fix minor comment typo and formatting.
6884 Changes to create multiple linker stubs, positioned immediately
6885 before the section where they are required.
6886 * elf32-hppa.c: Don't include hppa_stubs.h.
6887 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6888 (elf32_hppa_stub_hash_table): Delete.
6889 (elf32_hppa_link_hash_entry): Delete.
6890 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6891 stub_hash_table, and store the struct here rather than a pointer.
6892 Delete output_symbol_count. Add offset array. Change
6893 global_value to a bfd_vma.
6894 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6895 (elf32_hppa_stub_hash_traverse): Delete.
6896 (elf32_hppa_name_of_stub): Delete.
6897 (elf32_hppa_link_hash_lookup): Delete.
6898 (elf32_hppa_link_hash_traverse): Delete.
6899 (elf32_hppa_stub_hash_table_init): Delete.
6900 (elf32_hppa_size_of_stub): Pass input section and offset rather
6901 than location and calculate location here. Don't pass name as all
6902 stubs are now the same size.
6903 (elf32_hppa_stub_hash_newfunc): Init new fields.
6904 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6906 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6907 comparing against ints. Rewrite stub handling code.
6908 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6909 Case enums to int before comparing against ints. Remove
6910 bfd_reloc_dangerous case.
6911 (elf32_hppa_build_one_stub): Rewrite.
6912 (elf32_hppa_size_one_stub): New function.
6913 (elf32_hppa_build_stubs): Rewrite.
6914 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6915 Rewrite stub-handling specific code.
6917 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6919 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6921 * hppa_stubs.h: Delete.
6922 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6923 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6924 * Makefile.in: Regenerate.
6926 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6929 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6931 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6932 and section name for bfd_reloc_notsupported error message.
6933 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6934 bfd_reloc_notsupported.
6935 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6937 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6938 undefined weak symbols for all relocs.
6939 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6940 offsets are relative to one past the delay slot.
6941 (elf32_hppa_size_stubs): Account for reloc addend when calculating
6942 branch destination. Put addend into stub name too.
6943 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6944 adjust by 8 when deciding whether a linker stub is needed. Put
6945 addend into stub name as for above.
6947 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6948 various args and vars.
6949 (elf32_hppa_bfd_final_link_relocate): Here too.
6950 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
6951 inner block var to avoid shadowing.
6953 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
6955 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6956 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6957 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6959 * libhppa.h: Change practically all unsigned ints to plain ints.
6960 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
6963 From Ryan Bradetich <rbradetich@uswest.net>
6964 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6965 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6967 From David Huggins-Daines <dhd@linuxcare.com>
6968 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6969 to the new OP_* ones.
6971 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6972 error exit. Bail out earlier on plabel relocs that we aren't
6973 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
6974 string, and then don't free our copy.
6975 (elf32_hppa_build_one_stub): Make insn unsigned int.
6977 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6978 available with BL, not BE and BLE.
6980 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6981 code for elf arg relocs.
6982 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6983 argument with elf_link_hash_entry h. Handle undefined weak
6984 symbols. Move $global$ lookup from here...
6985 (elf32_hppa_relocate_section): ...to here. Return correct error
6986 message for non-handled relocs.
6987 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
6988 wrong test was -0x3ffff to +0x40000.
6990 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6991 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6992 Handle them as such.
6993 (elf_hppa_relocate_insn): Fix a typo.
6995 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6996 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6997 assemble_17, assemble_21): Delete.
6998 Supply defines for all 64 possible opcodes.
6999 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7000 formats. Handle COMICLR.
7001 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
7004 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7005 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7006 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7008 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
7009 the local syms - did this code get deleted accidentally? Ignore
7010 undefined and undefweak syms.
7012 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7013 block. Use it instead of elf64_hppa_hash_table (info).
7014 (elf_hppa_final_link_relocate): Use hppa_info instead of
7015 elf64_hppa_hash_table (info).
7017 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7018 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7019 (hppa_rebuild_insn): Mask immediate bits here instead.
7020 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7022 2000-07-08 Alan Modra <alan@linuxcare.com.au>
7024 * section.c (struct sec): Add id field. Tidy comment formatting.
7025 (bfd_make_section_anyway): Set id.
7026 (STD_SECTION): Init id too.
7027 Change CONST to const throughout.
7028 * archures.c (bfd_arch_info): Tidy comment.
7029 (bfd_arch_list): Change a CONST to const.
7030 * libbfd-in.h: Tidy comments and replace CONST with const.
7031 * elf-bfd.h: Likewise.
7032 * libbfd.h: Regenerate.
7033 * bfd-in2.h: Regenerate.
7034 * libcoff.h: Regenerate.
7036 2000-07-07 DJ Delorie <dj@redhat.com>
7038 * archive.c (_bfd_write_archive_contents): Add an informative
7041 2000-07-06 Kazu Hirata <kazu@hxi.com>
7043 * srec.c: Fix formatting.
7045 2000-06-05 DJ Delorie <dj@redhat.com>
7049 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
7051 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7052 value of PC-relative offsets.
7054 2000-07-03 Jim Wilson <wilson@cygnus.com>
7056 * elf64-alpha.c (alpha_elf_size_info): New.
7057 (elf_backend_size_info): Define to alpha_elf_size_info.
7058 * elfcode.h (elf_size_info): Change hash bucket size to 4.
7060 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
7062 * elf32-mips.c: Include elf32-target.h again for the traditional
7065 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
7067 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7068 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7069 (avr_info_to_howto_rela): Likewise.
7070 (elf32_avr_gc_mark_hook): Likewise.
7071 (elf32_avr_gc_sweep_hook): Likewise.
7072 (elf32_avr_relocate_section): Likewise.
7074 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
7076 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7077 an external symbol for a non-shared, non-relocatable link.
7079 2000-07-03 Nick Clifton <nickc@redhat.com>
7081 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7082 is an external symbol.
7083 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7086 2000-07-03 Kazu Hirata <kazu@hxi.com>
7088 * reloc16.c: Fix formatting.
7090 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
7092 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7093 to add a new target for traditional mips i.e
7094 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7095 * configure.in: Likewise.
7096 * configure: Rebuild.
7097 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7099 (bfd_elf32_tradlittlemips_vec): Likewise.
7100 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7101 to see that elfNN_bed does not get redefined even if the target file
7102 is included twice for a chip. See elf32-mips.c.
7104 2000-07-01 Alan Modra <alan@linuxcare.com.au>
7106 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
7107 (CLEANFILES): Add DEPA.
7108 * Makefile.in: Regenerate.
7110 2000-06-30 DJ Delorie <dj@cygnus.com>
7112 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7113 can't assume the PE header is at 0x80.
7115 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
7117 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7119 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
7121 * go32stub.h: Update stub.
7123 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
7125 * archures.c (bfd_mach_avr5): Define.
7126 * bfd-in2.h (bfd_mach_avr5): Define.
7127 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7128 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
7129 (compatible): Update comment. Add missing test.
7130 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7131 for avr2 and avr4. Simplify 8K wrap code.
7132 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7133 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7135 2000-06-26 Kazu Hirata <kazu@hxi.com>
7137 * coff-h8300.c: Fix formatting.
7138 * cpu-h8300.c: Likewise.
7140 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
7142 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7143 for local symbols whose names are unknown.
7145 2000-06-22 Alan Modra <alan@linuxcare.com.au>
7147 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7149 * Makefile.in: Regenerate.
7150 * doc/Makefile.in: Regenerate.
7152 2000-06-20 H.J. Lu <hjl@gnu.org>
7154 * Makefile.am: Rebuild dependency.
7155 * Makefile.in: Rebuild.
7157 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7159 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7160 (elf_backend_copy_indirect_symbol): Map to the new function.
7162 2000-06-20 Alan Modra <alan@linuxcare.com.au>
7164 * archive.c (normalize): Correct pointer comparison when checking
7166 (bfd_bsd_truncate_arname): Likewise.
7167 (bfd_gnu_truncate_arname): Likewise.
7169 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
7171 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7172 sections elf_{text,data}_{section,symbol}.
7173 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7174 (_bfd_mips_elf_hide_symbol): New function.
7175 (elf_backend_hide_symbol): Map to the new function.
7176 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7177 definitions of mips_elf_{text,data}_{section,symbol}.
7178 (mips_elf_local_relocation_p): Try to find the direct symbol
7179 based on new check_forced argument.
7180 (mips_elf_calculate_relocation): Use new version of
7181 mips_elf_local_relocation_p.
7182 (mips_elf_relocate_section): Likewise.
7183 (_bfd_mips_elf_relocate_section): Likewise.
7184 (mips_elf_sort_hash_table): Only assert that have enough GOT
7186 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7187 entry if the relocation based on the new external argument.
7188 (mips_elf_create_dynamic_relocation): Assert that we have a
7189 section contents allocated where we can swap out the dynamic
7191 (mips_elf_calculate_relocation): Find the real hash-table entry
7192 correctly by using h->root.root.type. Only create a dynamic
7193 relocation entry if the symbol is defined in a shared library.
7194 Create an external GOT entry for the GOT16 relocation if the
7195 symbol was forced local.
7196 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7197 dynamic index if the symbol was forced local.
7199 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7201 * elf32-mips.c: Fix typos in comments.
7203 2000-06-19 Mark Kettenis <kettenis@gnu.org>
7205 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7208 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
7210 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7211 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7212 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7213 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7214 (bfd_elf32_m68hc11_vec): Likewise.
7215 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7216 Supports 68hc11 & 68hc12 at the same time.
7217 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7219 (bfd_elf32_m68hc11_vec): Likewise.
7220 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7221 * archures.c (bfd_m68hc12_arch): Define and register in global list
7222 (bfd_m68hc11_arch): Likewise.
7223 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7224 BFD_RELOC_M68HC11_3B): Define.
7225 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7226 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7228 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
7230 * elf_bfd.h (struct elf_backend_data): Add info argument to
7231 elf_backend_hide_symbol.
7232 (_bfd_elf_link_hash_hide_symbol): Likewise.
7233 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7234 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7235 * elflink.h (elf_link_add_object_symbols): Likewise.
7236 (elf_link_assign_sym_version): Likewise.
7238 2000-06-18 H.J. Lu <hjl@gnu.org>
7240 * coff-i386.c (coff_i386_reloc): Don't return in case of
7241 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7242 Compensate PE relocations when linking with non-PE object
7243 files to generate a non-PE executable.
7245 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
7247 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7248 GOT entries if we're doing a static link or -Bsymbolic link.
7250 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
7252 * elflink.h (elf_link_adjust_relocs): Check for and call backend
7253 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7255 (elf_link_output_relocs): Likewise.
7256 (elf_reloc_link_order): Likewise.
7258 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7260 * archures.c (enum bfd_architecture): #define constants for
7261 PowerPc and RS6000 machine numbers.
7262 * bfd-in2.h: Regenerate.
7263 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7264 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
7265 and RS6000 machine numbers using #defined constants from
7267 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7268 machine numbers using #defined constants from archures.c. Add
7269 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
7270 64-bit words in 620 entry.
7271 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7273 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7275 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
7277 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7278 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7279 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7281 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7283 * bfd-in.h (bfd_family_coff): Define.
7284 * bfd-in2.h: Regenerate.
7285 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7286 coff_find_nearest_line): Check COFFness using bfd_family_coff()
7287 instead of bfd_target_coff_flavour.
7288 * cofflink.c (_bfd_coff_final_link): Likewise.
7289 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7290 exclude XCOFF files.
7291 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7293 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7294 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7295 * xcofflink.c (XCOFF_XVECP): Delete.
7296 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7297 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7298 bfd_xcoff_record_link_assignment,
7299 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7300 check for bfd_target_xcoff_flavour.
7302 2000-06-16 Nicholas Duffek <nsd@redhat.com>
7304 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7306 (read_hdr): New function.
7307 (rs6000coff_core_p): Store mstsave or __context64 struct instead
7308 of trying to extract individual registers. Set abfd->arch_info
7309 to match the architecture that created the core file.
7310 (rs6000coff_get_section_contents): Delete.
7311 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7313 2000-06-14 H.J. Lu <hjl@gnu.org>
7315 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7318 2000-06-13 H.J. Lu <hjl@gnu.org>
7320 * configure: Regenerate.
7322 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
7324 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7327 2000-06-08 David O'Brien <obrien@FreeBSD.org>
7329 * configure.in (VERSION): Update to show this is the CVS mainline.
7331 2000-06-07 Alan Modra <alan@linuxcare.com.au>
7333 * elf32-d10v.c: Include elf/d10v.h
7334 (enum reloc_type): Delete.
7335 * elf32-d30v.c: Include elf/d30v.h
7336 (enum reloc_type): Delete.
7338 * Makefile.am: Run "make dep-am" to regenerate dependencies.
7339 * Makefile.in: Regenerate.
7341 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7342 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7343 move HOWTOs into elf_howto_table.
7344 (R_386_standard, R_386_ext_offset): Define.
7345 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7346 (elf_i386_reloc_type_lookup): Modify calculation of index into
7347 elf_howto_table since we've removed the padding.
7348 (elf_i386_info_to_howto_rel): Likewise.
7349 (elf_i386_relocate_section): Likewise.
7351 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
7353 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7355 2000-06-05 H.J. Lu <hjl@gnu.org>
7357 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7358 an error when seeing an undefined symbol with hidden/internal
7359 attribute. It is handled in *_relocate_section ().
7361 2000-06-05 H.J. Lu <hjl@gnu.org>
7363 * elflink.h (elf_fix_symbol_flags): Follow the link for the
7364 indirect symbol for the ELF_LINK_NON_ELF bit.
7365 (elf_link_output_extsym): Don't output the indirect symbol even
7366 if the ELF_LINK_NON_ELF bit is set.
7368 2000-06-01 J.T. Conklin <jtc@redback.com>
7370 * config.bfd (i[3456]86-*-netbsdelf*): New target.
7371 (i[3456]86-*-netbsdaout*): New target.
7372 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7373 (i[3456]86-*-openbsd*): Likewise.
7375 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
7377 * trad-core.c: From hpux-core.c, include <dirent.h> or
7378 <sys/ndir.h> when possible.
7380 2000-05-31 Ulrich Drepper <drepper@redhat.com>
7382 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7383 definitions. We must not assume they are sorted in the file
7384 according to their index numbers.
7386 2000-05-31 Alan Modra <alan@linuxcare.com.au>
7388 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7389 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
7390 R_PARISC_DIR17F are for absolute branches; Handle them as such.
7392 2000-05-30 Nick Clifton <nickc@cygnus.com>
7394 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7395 80960CA, 80960MC as valid machine names.
7397 2000-05-30 H.J. Lu <hjl@gnu.org>
7399 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7400 visibility bits if the symbol is undefined. Correctly handle
7401 weak undefined symbols with hidden and internal attributes.
7403 * elflink.h (elf_link_add_object_symbols): Always turn the
7404 symbol into local if it has the hidden or internal attribute.
7406 2000-05-29 Philip Blundell <philb@gnu.org>
7408 * ppcboot.c: Add packed attribute if compiling with GCC.
7410 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
7412 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7414 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
7416 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7417 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7418 corefile on a 64-bit (Sparc Solaris) host. Also clean up
7421 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7423 * Makefile.am: Update dependencies with "make dep-am"
7424 * Makefile.in: Regenerate.
7426 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7427 bindtextdomain): Replace defines with those from intl/libgettext.h
7428 to quieten gcc warnings.
7430 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
7432 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7434 * archive.c (normalize, bfd_bsd_truncate_arname,
7435 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7436 file names with backslashes.
7438 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7441 * sysdep.h: Include filenames.h.
7443 2000-05-26 Alan Modra <alan@linuxcare.com.au>
7445 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7447 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7449 * elf64-sparc.c (sparc64_elf_relax_section): New.
7450 (sparc64_elf_relocate_section): Optimize tail call into branch always
7452 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7453 (elf32_sparc_relax_section): New.
7455 2000-05-26 Jakub Jelinek <jakub@redhat.com>
7457 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7458 Remove unusued variables.
7459 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7460 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7461 previous fix, so that shared libs really don't influence targets
7462 extension mask and memory model.
7464 2000-05-23 H.J. Lu <hjl@gnu.org>
7466 * elf64-alpha.c (elf64_alpha_relocate_section): Check
7467 h->root.other not h->other.
7468 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7470 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7472 2000-05-23 H.J. Lu <hjl@gnu.org>
7474 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7475 undefined symbol with the non-default visibility attributes.
7476 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7477 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7478 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7479 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7480 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7481 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7482 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7483 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7484 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7485 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7486 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7488 2000-05-22 Richard Henderson <rth@cygnus.com>
7490 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7491 PCREL22, PCREL64I. Zero size of special relocs.
7492 (elf64_ia64_reloc_type_lookup): Likewise.
7493 (USE_BRL, oor_brl, oor_ip): New.
7494 (elf64_ia64_relax_section): New.
7495 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7496 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7497 (elf64_ia64_relocate_section): Likewise.
7498 (bfd_elf64_bfd_relax_section): New.
7499 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7500 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7501 * bfd-in2.h, libbfd.h: Regenerate.
7503 2000-05-22 Nick Clifton <nickc@cygnus.com>
7505 * configure.in : Add peigen.lo to MIPS PE targets.
7506 * configure: Regenerate.
7508 2000-05-22 Momchil Velikov <velco@fadata.bg>
7510 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7511 only if it is known for both input and output bfds. Separate
7512 error message strings as in some languages, it may be necessary
7513 to change more than one place in the string to change between
7516 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7517 endianess checks, call _bfd_generic_verify_endian_match() instead.
7519 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7521 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7523 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7524 endianess before checking bfd flavours.
7526 2000-05-22 H.J. Lu <hjl@gnu.org>
7528 * elflink.h (elf_link_output_extsym): Clear the visibility
7529 field for symbols not defined locally.
7531 2000-05-18 Alan Modra <alan@linuxcare.com.au>
7533 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7534 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7535 (hppa_rebuild_insn): Mask immediate bits here instead.
7536 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7538 2000-05-18 Momchil Velikov <velco@fadata.bg>
7540 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7541 relocs for an executable, ensure that they are virtual addresses.
7543 2000-05-18 Jeffrey A Law (law@cygnus.com)
7545 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7547 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7548 Rick Gorton <gorton@scrugs.lkg.dec.com>
7550 * elflink.h: Add emitrelocations support: when enabled, relocation
7551 information and relocation sections are put into final output
7552 executables. If the emitrelocations flag is set, do the following:
7553 (elf_bfd_final_link): Emit relocation sections.
7554 (elf_link_input_bfd): Compute relocation section contents.
7555 (elf_gc_sections): Don't clean relocation sections.
7557 2000-05-16 Catherine Moore <clm@cygnus.com>
7559 * som.c (som_decode_symclass): Recognize weak symbols.
7561 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7563 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7564 read idata section only from dataoff.
7565 (pe_print_edata): Correctly check for valid eat_member.
7567 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7569 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7571 2000-05-14 Philip Blundell <philb@gnu.org>
7573 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7575 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7577 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7579 * peigen.c (pe_print_idata): Look for .idata section and print
7580 info even if data directory has zero entries. Read idata section
7581 starting from dataoff, and adjust all data offsets to suit. Cast
7582 all bfd_vma vars to unsigned long before passing to fprintf.
7583 * peigen.c (pe_print_edata): Similarly, look for .edata section
7584 and print info even if data directory has zero entries. Cast
7585 all bfd_vma vars to unsigned long before passing to fprintf.
7587 From Szabolcs Szakacsits <szaka@F-Secure.com>
7588 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7589 directory size which may be bogus.
7590 * peigen.c (pe_print_edata): Similarly.
7592 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7594 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7596 (copy_private_bfd_data): Allow for space possibly taken up by elf
7597 headers when calculating segment physical address from lma.
7599 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7601 * versados.c (versados_scan): Init stringlen and pass_2_done.
7603 * trad-core.c (trad_unix_core_file_p): Return
7604 bfd_error_wrong_format rather than bfd_error_file_truncated.
7606 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7607 add_data_entry. DataDirectory virtual address is relative.
7608 (pe_print_idata): Account for relative DataDirectory virtual
7609 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7610 (pe_print_edata): Similarly.
7612 From Szabolcs Szakacsits <szaka@F-Secure.com>
7613 * peigen.c (dir_names): Add Delay Import Directory.
7614 (pe_print_idata): Always search for bfd section containing
7615 idata address rather than looking up section name. Print this
7616 section name rather than .idata.
7617 (pe_print_edata): Similarly. Also print some fields as %08lx.
7618 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7621 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7623 * xcoff.h: Rename to xcoff-target.h
7624 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7625 * coff-rs6000.c: Ditto.
7626 * coff64-rs6000.c: Ditto.
7627 * coff-pmac.c: Ditto.
7628 * Makefile.in: Regenerate.
7630 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7632 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7633 Change U802TOC64MAGIC to U803XTOCMAGIC.
7635 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7637 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7638 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7639 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7641 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7643 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7645 2000-05-03 Martin v. L
\81öwis <loewis@informatik.hu-berlin.de>
7647 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7648 hidden and internal symbols.
7649 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7651 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7652 assign a PLT or GOT entry to symbols with hidden and
7653 internal visibility.
7655 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7657 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7659 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7661 2000-05-02 H.J. Lu <hjl@gnu.org>
7663 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7666 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7668 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7669 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7671 * Makefile.in: Regenerate.
7673 2000-05-01 Jim Wilson <wilson@cygnus.com>
7675 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7676 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7677 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7678 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7679 * Makefile.in: Rebuild.
7681 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7683 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7684 doesn't work very well.
7686 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7687 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7688 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7689 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7690 (elf_hppa_info_to_howto): Likewise.
7691 (elf_hppa_info_to_howto_rel): Likewise.
7692 (elf_hppa_reloc_type_lookup): Likewise.
7693 (elf_hppa_is_local_label_name): Likewise.
7694 (elf_hppa_fake_sections): Likewise.
7695 (elf_hppa_final_write_processing): Likewise.
7696 (elf_hppa_howto_table): Fully initialise all entries.
7697 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7698 (elf_hppa_info_to_howto): Likewise.
7699 (elf_hppa_info_to_howto_rel): Likewise.
7700 (elf_hppa_reloc_type_lookup): Likewise.
7701 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7702 elf_hppa_unmark_useless_dynamic_symbols,
7703 elf_hppa_remark_useless_dynamic_symbols,
7704 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7705 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7706 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7707 elf32-hppa.c mess is cleaned up.
7708 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7709 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7710 r_field then call hppa_field_adjust inline func with variable
7711 r_field arg, instead call hppa_field_adjust with fixed arg.
7712 In case R_PARISC_PCREL22F, don't set r_field.
7713 (elf_hppa_relocate_insn): Change args and return type to unsigned
7714 int. Call re_assemble_* funcs to do the work.
7716 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7719 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7721 (sign_extend): Mask first before sign extending.
7722 (low_sign_extend): Rewrite without condition expression.
7723 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7724 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7725 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7726 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7727 result as function return value rather than through pointer arg.
7728 Accept unsigned int args, and return unsigned int.
7729 (re_assemble_3): New. Combines function of dis_assemble_3 with
7730 re-assembly of opcode and immediate.
7731 (re_assemble_12): Likewise.
7732 (re_assemble_16): Likewise.
7733 (re_assemble_17): Likewise.
7734 (re_assemble_21): Likewise.
7735 (re_assemble_22): Likewise.
7736 (hppa_field_adjust): Rewrite and document, paying attention to
7737 size of types and signed/unsigned issues.
7738 (get_opcode): Shift before masking.
7739 (FDLW): Rename to FLDW.
7740 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7741 (hppa_rebuild_insn): Change args and return value to unsigned
7742 int. Make use of re_assemble_*. Correct case 11.
7744 * dep-in.sed: Handle ../opcodes/.
7745 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7746 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7747 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7748 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7749 elfarm-nabi.lo dependencies outside of auto-dependency area.
7750 Regenerate dependencies.
7751 * Makefile.in: Regenerate.
7753 * configure.in (TRAD_HEADER): Test non-null before
7755 * configure: Regenerate.
7757 * reloc.c: Fix mis-spelling in comment.
7759 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7761 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7762 * vms.c (vms_openr_next_archived_file): Return NULL.
7764 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7766 * coffcode.h Copy changes mistakenly done to libcoff.h in
7769 2000-04-29 Andreas Jaeger <aj@suse.de>
7771 * libbfd-in.h: Correctly check GCC version.
7772 * bfd-in.h: Likewise.
7773 * libhppa.h: Likewise.
7774 * libbfd.h: Regenerate.
7775 * bfd-in2.h: Regenerate.
7777 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7779 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7780 coffdu-rs6000.{lo,c}.
7781 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7783 * Makefile.in: Regenerate.
7784 * xcoff.h: New file.
7785 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7786 * coff-rs6000.c: Move all declarations and defines that are
7787 common to the xcoff backends into xcoff.h
7788 * coff64-rs6000.c: Ditto,
7790 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7792 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7793 _bfd_coff_force_symnames in strings and
7794 _bfd_coff_debug_string_prefix_length to their default values.
7795 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7797 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7799 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7800 _bfd_coff_force_symnames in strings and
7801 _bfd_coff_debug_string_prefix_length to their default values.
7803 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7805 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7806 Check local_got_refcounts before dereferencing.
7808 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7809 before deciding we don't need R_PPC_PLT32 relocation.
7810 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7813 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7815 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7817 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7818 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7819 (elf_i386_relocate_section): Allow for .plt to go missing.
7820 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7821 can use a relative reloc for got as elf_i386_relocate_section.
7822 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7824 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7826 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7828 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7830 * Makefile.am (coff64-rs6000.lo): New rule.
7831 * Makefile.in: Regenerate.
7832 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7833 xcoff_is_local_label_name, xcoff_rtype2howto,
7834 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7835 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7836 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7837 (NO_COFF_SYMBOLS): Define.
7838 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7839 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7841 (MINUS_ONE): New macro.
7842 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7844 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7845 coff_SWAP_aux_out): Map to the new functions.
7846 * coff64-rs6000.c: New file.
7847 * libcoff.h (bfd_coff_backend_data): Add new fields
7848 _bfd_coff_force_symnames_in_strings and
7849 _bfd_coff_debug_string_prefix_length.
7850 (bfd_coff_force_symnames_in_strings,
7851 bfd_coff_debug_string_prefix_length): New macros for above fields.
7852 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7853 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7854 of using coff_swap_sym_in directly.
7855 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7856 (coff_set_flags) Set magic for XCOFF64.
7857 (coff_compute_section_file_positions): Add symbol name length to
7858 string section length if bfd_coff_debug_string_prefix_length is
7860 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7861 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7862 using coff_swap_lineno_in directly.
7863 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7864 and _bfd_coff_debug_string_prefix_length fields.
7865 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7866 symbol names into strings table when
7867 bfd_coff_force_symnames_in_strings is true.
7868 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7869 SET_RELOC_VADDR): New macros.
7870 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7871 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7873 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7874 changes within RS6000COFF_C specific code.
7875 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7876 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7877 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7878 Extend existing hack on target name.
7879 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7881 * coff-tic54x.c (ticof): Keep up to date with new fields
7882 in bfd_coff_backend_data.
7883 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7884 targ_selvecs to include rs6000coff64_vec for rs6000.
7885 * configure.in: Add rs6000coff64_vec case.
7886 * cpu-powerpc.c: New bfd_arch_info_type.
7888 2000-04-24 Jeffrey A Law (law@cygnus.com)
7890 * config.bfd: Only disable elf32-hppa vectors, not all of the
7891 BSD and OSF configuration support. Provide (disabled) clauses
7893 * configure.in: Add clause for PA64 support.
7894 * configure: Rebuilt.
7896 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7897 (bfd_elf64_hppa_vec): Declare.
7899 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7900 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7901 (elf64-hppa.lo): Add dependencies.
7902 * Makefile.in: Rebuilt.
7904 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7906 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7908 * libhppa.h (dis_assemble_16): New function.
7909 (pa_arch): Added pa20w element.
7911 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7913 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7914 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7915 bfd_elf64_slurp_reloc_table.
7917 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7918 definitions to get external names.
7919 (elf_write_relocs): Renamed from write_relocs and make global.
7920 (elf_slurp_reloc_table): Make global.
7921 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7923 * archive.c (hpux_uid_gid_encode): New function.
7924 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7925 defined and the ID is greater than 99999.
7926 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7927 special uid/gid fields into 32 bit values.
7929 2000-04-21 Matthew Green <mrg@cygnus.com>
7931 * config.bfd: Add NetBSD/sparc64 support.
7933 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
7934 David Mosberger <davidm@hpl.hp.com>
7935 Timothy Wall <twall@cygnus.com>
7936 Jim Wilson <wilson@cygnus.com>
7938 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7939 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7940 (BFD64_BACKENDS): Add elf64-ia64.lo.
7941 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7942 (cpu-ia64.lo, elf64-ia64.lo): New rules.
7943 * Makefile.in: Rebuild.
7944 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7945 (bfd_ia64_arch): Declare.
7946 (bfd_archures_list): Add bfd_ia64_arch.
7947 * bfd-in2.h: Rebuild.
7948 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7949 * configure: Rebuild.
7950 * configure.host: (ia64-*-linux*): New host.
7951 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7952 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7953 * elf.c (prep_headers): Add bfd_arch_ia64.
7954 * libbfd.h: Rebuild.
7955 * reloc.c: Add IA-64 relocations.
7956 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7958 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7959 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7961 2000-04-21 Richard Henderson <rth@cygnus.com>
7963 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7964 contents when performing a partial link.
7965 (bfd_elf_d30v_reloc_21): Likewise.
7967 2000-04-20 H.J. Lu <hjl@gnu.org>
7969 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7970 patch to symbols defined by a shared object.
7971 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7973 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7976 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7977 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7979 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
7981 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7982 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7983 (coff-ia64.lo): Add dependency.
7984 * Makefile.in: Regenerate.
7985 * coff-ia64.c: New file.
7986 * efi-app-ia32.c: Ditto.
7987 * efi-app-ia64.c: Ditto.
7988 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7989 (coff_set_flags): Ditto.
7990 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7991 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7992 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7993 * configure: Regenerate.
7994 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7995 (PUT_OPTHDR_IMAGE_BASE): Ditto.
7996 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7997 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7998 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7999 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8000 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8001 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8002 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8003 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8004 (GET_PDATA_ENTRY): Ditto.
8005 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8006 data_start. Use above macros to read fields that are 64 bit wide for
8007 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
8008 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8009 FileAlignment and SectionAlignment to minimum alignment if they
8011 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8012 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8013 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8014 Use above macros to write fields that are 64 bit wide for
8016 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8017 5*4 otherwise. This should be right for IA-32 and IA-64, but may
8018 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
8019 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
8020 begin address, end address, and unwind info address only. Use
8021 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
8023 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8024 HIGH3ADJ relocation names.
8025 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8026 * targets.c: Declare bfd_efi_app_ia32_vec and
8027 bfd_efi_app_ia64_vec.
8028 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8029 bfd_efi_app_ia64_vec.
8031 2000-04-17 Timothy Wall <twall@cygnus.com>
8033 * bfd-in2.h: Add prototypes for tic54x load page access.
8034 * bfd-in.h: Regenerate.
8035 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8036 in customized _set_arch_mach function.
8037 * coffcode.h (coff_set_alignment_hook): Set section load page if
8038 the appropriate macro is defined.
8039 (write_object_contents): Read section load page.
8041 2000-04-13 Alan Modra <alan@linuxcare.com.au>
8043 * elf32-hppa.h: Update copyright date.
8045 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8046 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8048 * elf32-d30v.c (MAX32): Don't use LL suffix.
8049 (MIN32): Define in terms of MAX32.
8050 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8052 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8055 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8057 2000-04-12 Alan Modra <alan@linuxcare.com.au>
8059 * dep-in.sed: Match space before file name, not after.
8060 * Makefile.am: Regenerate dependencies.
8061 * Makefile.in: Regenerate.
8063 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8064 case, allow address wrap-around stupidly removed 2000-03-17. Sign
8065 extend without an if statement.
8067 2000-04-11 Alan Modra <alan@linuxcare.com.au>
8069 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8071 * elf32-mips.c (gprel16_with_gp): Likewise.
8072 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8073 here using -0x40000, not (int)0xfffc0000.
8074 (elf32_hppa_size_of_stub): Likewise.
8076 2000-04-11 Timothy Wall <twall@cygnus.com>
8078 * coff-tic54x.c: Now builds with all targets.
8079 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8080 * Makefile.in: Regenerate.
8081 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8082 unitialized variable.
8084 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
8086 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
8087 --enable-build-warnings option.
8088 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8089 * Makefile.in, configure: Re-generate.
8091 2000-04-07 Nick Clifton <nickc@cygnus.com>
8093 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8094 BFD_RELOC_THUMB_PCREL_BLX.
8096 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8097 R_ARM_XPC25 and R_ARM_THM_PC22.
8099 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8100 R_ARM_XPC25 and R_ARM_THM_XPC22.
8101 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8102 R_ARM_[XPC25|THM_XPC22].
8104 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8105 elf/arm-oabi.h to elf/arm.h
8107 * Makefile.am: Fix dependency for elfarm-oabi.c
8108 * Makefile.in: Regenerate.
8110 * bfd-in2.h: Regenerate.
8111 * libbfd.h: Regenerate.
8113 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8115 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8116 and restore it on failure. Release newly allocated tdata on
8119 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
8121 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8122 (decode_line_info): Set it. Report error if unit->line_offset is
8123 equal to or larger than it.
8125 2000-04-07 Timothy Wall <twall@cygnus.com>
8127 * targets.c: Added vecs for tic54x.
8128 * reloc.c: Added relocs for tic54x.
8129 * libbfd.h: Regenerated.
8130 * configure: Add TI COFF vecs for tic54x.
8131 * configure.in: Ditto.
8132 * config.bfd (targ_cpu): Recognize new tic54x target.
8133 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8134 * bfd-in2.h: Add tic54x target and relocations.
8135 * Makefile.am, Makefile.in: Add tic54x target.
8136 * archures.c (bfd_archures_list): Add tic54x target.
8137 * coff-tic54x.c: New.
8138 * cpu-tic54x.c: New.
8140 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
8142 * elfcore.h (elf_core_file_p): call backend_object_p which
8143 thereby gets an opportunity to update the arch/machine type.
8145 2000-04-06 Timothy Wall <twall@cygnus.com>
8147 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8148 class. Handle SEC_CLINK and SEC_BLOCK flags.
8149 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8150 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8152 2000-04-06 Nick Clifton <nickc@cygnus.com>
8154 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8155 EF_INTERWORK if this is an unknown EABI.
8156 (elf32_arm_merge_private_bfd_data): Check EABI version
8157 numbers. Only check EF_xxx flags if the EABI version number
8159 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8160 if the EABI version number is unknown.
8161 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8162 if the EABI version number is unknown.
8164 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8166 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8167 BFD_RELOC_SH_LOOP_END.
8168 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8169 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8170 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8171 (sh_elf_reloc_loop): New function.
8172 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8174 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8175 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8176 * bfd-in2.h, libbfd.h: Regenerate.
8178 2000-04-04 Alan Modra <alan@linuxcare.com.au>
8180 * po/bfd.pot: Regenerate.
8182 * Makefile.am: Remove extraneous mkdep comment.
8183 (MKDEP): Use gcc -MM rather than mkdep.
8184 (DEP): Quote when passing vars to sub-make. Add warning
8186 (DEP1): Rewrite for "gcc -MM".
8187 (CLEANFILES): Add DEP2.
8188 Update dependencies.
8189 * Makefile.in: Regenerate.
8191 2000-04-03 Kevin Buettner <kevinb@redhat.com>
8193 * configure.in: Added corefile support for AIX 4.3. In particular,
8194 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8195 compiling rs6000-core.c.
8196 * configure: Regenerated.
8198 2000-04-03 H.J. Lu <hjl@gnu.org>
8200 * cache.c (bfd_open_file): Unlink the output file only if
8201 it has non-zero size.
8203 2000-04-01 Ken Block USG <block@zk3.dec.com>
8205 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8206 relative relocations for non-loaded sections in shared objects.
8207 (elf64_alpha_check_relocs): Similarly.
8209 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
8211 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8212 BFD_RELOC_16 to switch for extended relocs.
8213 (MY_swap_ext_reloc_in): New.
8214 (MY_swap_ext_reloc_out): New.
8215 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8216 than NAME(aout,swap_ext_reloc_in) for extended relocs.
8217 (NAME(aout,squirt_out_relocs)): Similarly use
8218 MY_swap_ext_reloc_out.
8219 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8221 2000-04-03 Kazu Hirata <kazu@hxi.com>
8223 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8224 the R_PCRWORD_B case.
8226 2000-03-31 Thomas de Lellis <tdel@wrs.com>
8228 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8232 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
8234 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
8235 HOWTO references to bfd_elf_generic_reloc, that have
8236 partial_inplace == true, now use the new function. The function
8237 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8238 extends its fixes to the R_M32R_{16,24,32} relocs.
8239 The new logic in m32r_elf_lo16_reloc() has been removed, and
8240 it instead calls the new routine to obtain that functionality.
8242 2000-03-27 Alan Modra <alan@linuxcare.com.au>
8244 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8245 elf32_avr_check_relocs, avr_final_link_relocate,
8246 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8247 elf32_avr_object_p): Add prototypes.
8248 (elf32_avr_gc_mark_hook): Add default for h->root.type.
8249 (bfd_elf_avr_final_write_processing): Make static.
8251 2000-03-27 Denis Chertykov <denisc@overta.ru>
8253 * cpu-avr.c: New file. BFD support routines for AVR architecture.
8254 * archures.c (bfd_architecture): Add AVR architecture.
8255 (bfd_archures_list): Add reference to AVR architecture info.
8256 * elf.c (prep_headers): Handle bfd_arch_avr.
8257 * reloc.c: Add various AVR relocation enums.
8258 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8260 * Makefile.am: Add support for AVR elf.
8261 * configure.in: Likewise.
8262 * config.bfd: Likewise.
8263 * Makefile.in: Regenerate.
8264 * configure: This too.
8265 * bfd-in2.h: And this.
8266 * libbfd.h: And this.
8268 2000-03-24 H.J. Lu <hjl@gnu.org>
8270 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8271 (elf64_alpha_find_reloc_at_ofs): Likewise.
8273 2000-03-17 Alan Modra <alan@linuxcare.com.au>
8275 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8276 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
8277 allowable range used to be -2**(n-1) to 2**n-1.
8278 * reloc.c (_bfd_relocate_contents): Same here. Also replace
8279 "boolean overflow" with "bfd_reloc_status_type flag".
8281 2000-03-14 Doug Evans <dje@casey.transmeta.com>
8283 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8285 2000-03-14 Kazu Hirata <kazu@hxi.com>
8287 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8288 of shrinks properly, including the last reloc.
8290 2000-03-13 Kazu Hirata <kazu@hxi.com>
8292 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8295 2000-03-11 Alan Modra <alan@linuxcare.com.au>
8297 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8298 a format mismatch rather than an "error" from bfd_read such as
8299 bfd_error_file_truncated.
8301 2000-03-10 Geoff Keating <geoffk@cygnus.com>
8303 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8304 sign-extension and big-endian compensation for
8305 R_MIPS_64 even in ld -r.
8307 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
8309 * elf32-mips.c (mips_elf_next_relocation): Rename from
8310 mips_elf_next_lo16_relocation, and generalize to look
8311 for any relocation type.
8312 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8313 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8314 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8315 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8316 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8317 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8318 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8319 (mips_rtype_to_howto): Likewise.
8320 (mips_elf_calculate_relocation): Handle new relocs.
8321 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8322 are paired. The addend for R_MIPS_GNU_REL16_S2
8323 is shifted right two bits.
8325 2000-03-10 Alan Modra <alan@linuxcare.com.au>
8327 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8328 comment, and ensure it doesn't happen again.
8329 (bfd_install_relocation): Same here.
8330 (_bfd_relocate_contents): Don't bother assigning unused signmask
8331 shift result. Fix typos in comments.
8332 Remove trailing whitespace throughout file.
8334 2000-03-07 Doug Evans <dje@casey.transmeta.com>
8336 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8337 * bfd-in2.h: Rebuild.
8339 2000-03-06 Nick Clifton <nickc@cygnus.com>
8341 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8343 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8344 (SIZEOF_ILF_STRINGS): Redefine.
8345 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
8346 relative reloc, as opposed to a section relative reloc.
8347 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8349 Add length of symbol's prefix to string pointer.
8350 Store a pointer to the symbol in the symbol pointer table.
8351 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8352 Initialise the symbol pointer table.
8353 Store the hint in the Hint/Name table.
8354 Make the jump reloc be symbol realtive, not section relative.
8355 Create an import symbol for imported code.
8357 2000-03-06 Catherine Moore <clm@cygnus.com>
8359 * elf.c (swap_out_syms): Check for null type_ptr.
8361 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
8363 * aout-target.h (MY(write_object_contents)): Remove unused
8364 and unusable "#if CHOOSE_RELOC_SIZE".
8365 * pc532-mach.c (MY(write_object_contents)): Ditto.
8366 * netbsd.h (MY(write_object_contents)): Ditto.
8367 * hp300hpux.c (MY(write_object_contents)): Ditto.
8368 * freebsd.h (MY(write_object_contents)): Ditto.
8369 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8371 2000-02-29 H.J. Lu <hjl@gnu.org>
8373 * peicode.h (jtab): Make it static.
8375 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8376 defined and COFF_IMAGE_WITH_PE is not defined.
8377 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8378 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8380 2000-03-01 Nick Clifton <nickc@cygnus.com>
8382 * coff-arm.c (bfd_arm_process_before_allocation): Make
8383 'symndx' signed to prevent compile time warning.
8385 * coff-mcore.c: Remove unused prototype for pe_object_p.
8387 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8388 functions that are not used when COFF_IMAGE_WITH_PE is
8390 (struct sh_opcode): Change type of 'flags' field to unsigned
8391 long so that it can hold the USESAS flag.
8393 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8395 * elf-m10300.c (mn10300_elf_relax_section): Initialise
8398 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8400 Remove unusued variables and code.
8401 (elf_backend_add_symbol_hook): Fix prototype.
8403 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8406 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8409 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8411 Remove unusued variables and code.
8412 (elf_backend_add_symbol_hook): Fix prototype.
8414 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8416 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8417 to unused function parameter.
8419 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8421 Use EMPTY_HOWTO to initialise empty howto slots.
8422 Remove unused variables.
8424 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8426 2000-03-01 H.J. Lu <hjl@gnu.org>
8428 * aoutx.h (aout_link_input_section_std): Pass "true" to
8429 the undefined_symbol callback.
8430 (aout_link_input_section_ext): Likewise.
8431 * bout.c (get_value): Likewise.
8432 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8433 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8435 (alpha_relocate_section): Likewise.
8436 * coff-arm.c (coff_arm_relocate_section): Likewise.
8437 * coff-i960.c (coff_i960_relocate_section): Likewise.
8438 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8439 * coff-mips.c (mips_relocate_section): Likewise.
8440 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8441 * coff-sh.c (sh_relocate_section): Likewise.
8442 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8443 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8444 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8445 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8446 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8447 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8448 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8449 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8450 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8451 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8452 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8453 * elf32-v850.c (v850_elf_relocate_section): Likewise.
8454 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8455 * elflink.h (elf_link_output_extsym): Likewise.
8456 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8457 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8458 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8460 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8461 undefined_symbol callback when building shared library with
8462 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8464 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8465 * elf32-i386.c (elf_i386_relocate_section): Likewise.
8466 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8467 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8468 (elf32_mips_get_relocated_section_content): Likewise.
8469 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8470 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8471 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8472 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8474 2000-02-28 Nick Clifton <nickc@cygnus.com>
8476 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8477 * Makefile.in: Regenerate.
8479 * configure.in: Add support for mips and sh pe vectors.
8480 * configure: regenerate.
8482 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8485 * targets.c: Add mips and sh pe vectors.
8487 * libpei.h (coff_final_link_postscript): Only define if not
8490 * coffcode.h: Add support for WinCE magic numbers.
8492 * peigen.c (pe_print_reloc): Update comment and rearrange
8493 appending of newline character.
8495 * peicode.h: Add support for Image Library Format.
8496 (pe_ILF_vars): Structure containing data used by ILF code.
8497 (pe_ILF_make_a_section): New function. Create a section based
8499 (pe_ILF_make_a_reloc): New function. Create a reloc based on
8501 (pe_ILF_make_a_symbol): New function. Create a symbol based
8503 (pe_ILF_save_relocs): New function. Store the relocs created
8504 by pe_ILF_make_a_reloc in a section.
8505 (pe_ILF_build_a_bfd): New function. Create a BFD describing
8507 (pe_ILF_object_p): New function. Return a bfd_target pointer
8509 (pe_bfd_object_p): If an ILF object is detected call
8510 pe_ILF_object_p on it.
8512 * coff-arm.c: Add support for WinCE relocs which are different
8513 from normal ARM COFF relocs.
8514 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8516 * coff-sh.c: Add support for sh-pe target.
8517 * pe-sh.c: New file. Support code for sh-pe target.
8518 * pei-sh.c: New file. Support code for sh-pe target.
8520 * pe-mips.c: New file. Support code for mips-pe target.
8521 * pei-mips.c: New file. Support code for mips-pe target.
8523 2000-02-27 Jakub Jelinek <jakub@redhat.com>
8525 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8526 architecture if the object causing the bump is dynamic.
8527 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8528 and also don't it for memory ordering.
8529 (sparc64_elf_write_relocs): Take src_rela out of the loop.
8531 2000-02-27 Ian Lance Taylor <ian@zembu.com>
8533 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8534 calling bfd_get_section_size_before_reloc.
8535 (decode_line_info): Likewise.
8536 (_bfd_dwarf2_find_nearest_line): Likewise.
8538 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8540 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8541 name of the libtool directory.
8542 * Makefile.in: Rebuild.
8544 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
8546 * som.c (SOM_HOWTO): Define.
8547 (som_hppa_howto_table): Use it.
8549 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8551 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8553 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8555 2000-02-24 Catherine Moore <clm@cygnus.com>
8557 * som.c (som_misc_symbol_info): Add field
8559 (som_bfd_derive_misc_symbol_info): Initialize
8561 (som_build_and_write_symbol_table): Keep track
8562 of secondary_def field.
8563 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8564 if secondary_def field is set.
8565 (som_bfd_ar_write_symbol_stuff): Initialize
8568 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8570 * dwarf2.c (read_address): Read 16-bits addresses.
8571 (parse_comp_unit): Accept addr_size == 2.
8573 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8575 * bfd-in.h: Update copyright date.
8577 2000-02-23 Linas Vepstas <linas@linas.org>
8579 * cpu-i370.c: New file.
8580 * elf32-i370.c: New file.
8581 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8582 (bfd_i370_arch): New.
8583 (bfd_archures_list): Add bfd_i370_arch.
8584 * elf.c (prep_headers): Add bfd_arch_i370.
8585 * Makefile.am: Add support for IBM 370 elf.
8586 * config.bfd: Likewise.
8587 * configure.in: Likewise.
8588 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8589 * reloc.c (bfd_reloc_code_type): Likewise.
8590 * targets.c: Likewise.
8592 * Makefile.in: Regenerate.
8593 * configure: Regenerate.
8594 * bfd-in2.h: Regenerate.
8596 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8598 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8599 invalid relocation types, and change them to R_386_NONE.
8601 2000-02-22 H.J. Lu <hjl@gnu.org>
8603 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8604 not defined, don't add a second ELF_VER_CHR.
8606 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8607 symbols converted to local symbols even when stripping all
8609 (elf_link_output_extsym): Process global symbols converted to
8610 local symbols even if they are being stripped.
8612 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8614 * archures.c (bfd_octets_per_byte): Return unsigned int.
8615 (bfd_arch_mach_octets_per_byte): Ditto.
8616 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8618 * section.c (bfd_get_section_size_before_reloc): Quell signed
8619 vs. unsigned comparison warning.
8620 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8621 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8622 change. What was I thinking?
8623 * bfd-in2.h: Regenerate.
8625 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8626 (elf_gc_sections): Same here.
8627 (elf_gc_common_finalize_got_offsets): And here.
8629 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8631 ELF HPPA doesn't work at present; remove it until it does.
8632 * config.bfd: Comment out setting targ_defvec to
8634 * Makefile.am: Rebuild dependencies.
8635 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8636 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8637 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8638 * Makefile.in: Rebuild.
8639 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8641 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8643 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8644 is no bfd_free(). Revert bfd_free part of previous change.
8646 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8648 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8650 (coff_compute_section_file_positions): Use bfd_free to pair
8652 (coff_write_object_contents): Likewise.
8654 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8655 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8657 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8659 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8660 (xcoff_ar_file_hdr_big): New structure.
8661 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8662 (xcoff_ar_hdr_big): New structure.
8663 (SIZEOF_AR_HDR_BIG): New macro.
8664 (xcoff_big_format_p): New macro.
8665 (xcoff_ardata_big): New macro.
8666 (arch_xhdr_big): New macro.
8667 (xcoff_slurp_armap): Handle large archives.
8668 (xcoff_archive_p): Detect large archives.
8669 (xcoff_read_ar_hdr): Handle large archives.
8670 (xcoff_openr_next_archived_file): Handle large archives.
8671 (xcoff_generic_stat_arch_elt): Handle large archives.
8672 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8673 (xcoff_write_armap_big): New function.
8674 (xcoff_write_armap): New function, dispatch to _old or _big.
8675 (xcoff_write_archive_contents_old): Rename from
8676 xcoff_write_archive_contents.
8677 (xcoff_write_archive_contents_big): New function.
8678 (xcoff_write_archive_contents): New function, dispatch to _old or
8681 2000-02-18 Richard Henderson <rth@cygnus.com>
8683 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8684 and hide_symbol members.
8685 (elf_link_hash_copy_indirect): Remove.
8686 (elf_link_hash_hide_symbol): Remove.
8687 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8688 and elf_backend_hide_symbol.
8689 (_bfd_elf_link_hash_copy_indirect): Declare.
8690 (_bfd_elf_link_hash_hide_symbol): Declare.
8691 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8692 (_bfd_elf_link_hash_hide_symbol): Likewise.
8693 (_bfd_elf_link_hash_table_init): Don't init killed members.
8694 * elflink.h (elf_link_add_object_symbols): Use the bed function
8695 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8696 (elf_link_assign_sym_version): Likewise.
8697 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8698 (elf_backend_hide_symbol): Likewise.
8699 (elfNN_bed): Update for new members.
8701 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8703 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8704 STACK_END_ADDR): Define for new core file format.
8705 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8706 for handling the vagaries of the various core file structures used
8707 by AIX over the years.
8708 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8709 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8710 core_dumpx structure.
8712 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8714 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8715 (bfd_mach_sh3_dsp): Likewise.
8716 (bfd_mach_sh4): Reinstate.
8717 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8718 * bfd-in2.h: Regenerate.
8719 * coff-sh.c (struct sh_opcode): flags is no longer short.
8720 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8721 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8722 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8723 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8724 (sh_opcodes): No longer const.
8725 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8726 (sh_insn_uses_reg): Check for USESAS and USESR8.
8727 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8728 (_bfd_sh_align_load_span): Return early for SH4.
8729 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8730 Take into account that field b of a parallel processing insn
8731 could be mistaken for a separate insn.
8732 * cpu-sh.c (arch_info_struct): New array elements for
8733 sh2, sh-dsp and sh3-dsp.
8734 Reinstate element for sh4.
8735 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8736 (SH4_NEXT): Reinstate.
8737 (SH3_NEXT, SH3E_NEXT): Adjust.
8738 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8739 * elf32-sh.c (sh_elf_set_private_flags): New function.
8740 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8741 (sh_elf_merge_private_data): New function.
8742 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8743 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8744 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8745 sh_elf_merge_private_data.
8747 2000-02-13 Richard Henderson <rth@cygnus.com>
8749 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8750 hide_symbol members.
8751 (elf_link_hash_copy_indirect): New.
8752 (elf_link_hash_hide_symbol): New.
8753 * elflink.h (elf_link_add_object_symbols): Break out copy from
8754 indirect new new symbol to elf.c.
8755 (elf_link_assign_sym_version): Break out privatization of
8756 non-exported symbol to elf.c.
8757 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8758 (_bfd_elf_link_hash_hide_symbol): New.
8759 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8761 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8763 * section.c (_bfd_strip_section_from_output): Add info parameter.
8764 If it passed as non-NULL, use it to check whether any input BFD
8765 has an input section which uses this output section. Change all
8767 * bfd-in2.h: Rebuild.
8769 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8770 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8772 * bfd-in2.h: Rebuild.
8774 2000-02-10 Timothy Wall <twall@cygnus.com>
8776 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8777 allow final modifications of swapped-in symbol.
8778 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8779 * coffcode.h (coff_write_relocs): Use macro
8780 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8781 symbol index should be set to -1.
8783 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
8785 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8786 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8787 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8788 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8789 sh_insns_uses_or_sets_freg): New functions.
8790 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8791 * (sh_insns_conflict): Use new functions and new macros to
8792 detect conflicts when two instructions both set same integer registers,
8793 both set same fp register, and both set special register.
8795 2000-02-09 Timothy Wall <twall@cygnus.com>
8797 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8798 swapping in sections, so that the swapping routines have access to
8801 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8803 * coff-go32.c: Update comment. Update copyright.
8805 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8807 * syms.c (bfd_decode_symclass)
8808 Two new class characters were added - 'V' and 'v'. The
8809 meaning of 'W' is now restricted to just weak non-object
8810 symbols. This allows differentiation between, for example,
8811 weak functions vs weak objects. nm for example now dumps:
8813 'w' = weak unresolved
8814 'V' = weak global object
8815 'v' = weak unresolved object
8817 (bfd_is_undefined_symclass): New function. Return true if the
8818 given symbol class represents and undefined/unresolved symbol.
8820 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8823 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8825 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8826 STT_ARM_16BIT flag set, but it is not attached to a data object
8827 return STT_ARM_16BIT so that it will be treated as code by the
8830 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8832 * coff-i386.c (i3coff_object_p): Remove prototype.
8835 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8836 to name. Update copyright.
8838 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8839 assignment to avoid warning. Update copyright.
8841 2000-01-24 Robert Lipe (robertl@sco.com)
8843 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8844 instead of using GNU C extension.
8846 2000-01-21 Nick Clifton <nickc@cygnus.com>
8848 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8849 amount from a bfd_in_memory structure.
8850 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8853 2000-01-14 Nick Clifton <nickc@cygnus.com>
8855 * linker.c (default_indirect_link_order): oops - fix incorrectly
8856 applied patch from Tim Wall.
8858 2000-01-13 Timothy Wall (twall@tiac.net>
8860 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8861 = scnhsz, filhsz, relsz, aoutsz, etc)
8863 * coffswap.h: Ditto.
8865 2000-01-13 Nick Clifton <nickc@cygnus.com>
8867 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8868 interwork thumb to arm stub.
8870 2000-01-13 Timothy Wall (twall@tiac.net>
8872 * archures.c (bfd_octets_per_byte): New function: Return
8874 (bfd_arch_mach_octets_per_byte): New function: Return target
8877 * section.c: Distinguish between octets and bytes for usage of
8878 _cooked_size, _raw_size, and output_offset. Clarify
8879 description of bfd_set_section_contents.
8881 * bfd-in2.h: Regenerate.
8883 * coffgen.c: Indicate that the offset parameter is in bytes, not
8886 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8887 where appropriate to get the octet offset when calling
8888 bfd_set_section_contents.
8889 (bfd_coff_reloc_link_order): Ditto.
8891 * linker.c (bfd_generic_reloc_link_order): Ditto.
8892 (_bfd_default_link_order): Ditto.
8894 * reloc.c (bfd_perform_relocation): Distinguish between octets
8895 and bytes. Use octets when indexing into octet data; use bytes
8896 when calculating target addresses.
8897 (bfd_install_relocation): Ditto.
8899 * srec.c (srec_write_section): Ditto.
8901 2000-01-13 Nick Clifton <nickc@cygnus.com>
8903 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8904 3 to 2. This allows 4 byte sized sections, which is necessary for
8905 dlltool to build functioning DLLs.
8907 2000-01-10 Philip Blundell <pb@futuretv.com>
8909 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8910 (arm*-*-conix*): New target.
8912 2000-01-10 Egor Duda <deo@logos-m.ru>
8914 * config.bfd: Include elf32_i386 vector to target list for cygwin
8917 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8918 * configure.in: Test for structure win32_pstatus_t in
8920 * configure: Regenerate.
8922 * elf.c (elfcore_grok_win32pstatus): New function: process
8923 win32_pstatus_t notes in elf core file.
8924 (elfcore_grok_note): Detect win32_pstatus notes.
8926 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8928 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8930 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8931 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8933 For older changes see ChangeLog-9899
8939 version-control: never