Import new turkish translations from Translation Project's website.
[binutils.git] / bfd / ChangeLog
blob183fc0c81957a196dffe1e0480cb627ebbdf5164
1 2001-12-03  Nick Clifton  <nickc@cambridge.redhat.com>
3         * configure.in (LINGUAS): Add tr.
4         * configure: Regenerate.
5         * po/tr.po: Important from translation project's web site.
7 2001-12-03  Alan Modra  <amodra@bigpond.net.au>
9         * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
10         happens to trigger on undefined symbols.
11         (final_link_relocate): Return bfd_reloc_undefined for undefined
12         stubs.
13         (elf32_hppa_relocate_section): Don't say we can't handle a reloc
14         if we have already warned about an undefined symbol.
16 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
18         * elf32-mips.c (NEWABI_P): New define.
19         (USE_REL): Remove, replaced by
20         (elf_backend_may_use_rel_p): New define.
21         (elf_backend_may_use_rela_p): Likewise.
22         (elf_backend_default_use_rela_p): Likewise.
23         (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
24         Fix some relocation definitions.
25         (elf_mips_howto_table_rela): New RELA relocation definitions for
26         NewABI support.
27         (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
28         (bfd_elf32_bfd_reloc_type_lookup): Likewise.
29         (mips_rtype_to_howto): Likewise.
30         (_bfd_mips_elf_relocate_section): Likewise.
31         (_bfd_mips_elf_object_p): Typo.
32         (elf_backend_sign_extend_vma): Reordered together with many other
33         defines nearby to resemble the order of declaration in the header
34         file.
36 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
38         * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
39         BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
40         * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
41         * elf32-mips.c (mips_reloc_map): Likewise. Replace
42         BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
43         * elf64-mips.c (mips_reloc_map): Likewise.
44         * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
45         (BFD_RELOC_MIPS_GPREL32): Remove.
47 2001-11-30  H.J. Lu <hjl@gnu.org>
49         * elflink.h (elf_add_default_symbol): New.
50         (elf_link_add_object_symbols): Call elf_add_default_symbol ()
51         to create an indirect symbol from the default for the symbol
52         with the default version if needed.
54 2001-11-29  "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
56         * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
57         if it has already been set by another thread.
59 2001-11-28  Jakub Jelinek  <jakub@redhat.com>
61         * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
62         (elf64_alpha_relocate_section): Translate local_got_entries
63         for STT_SECTION symbol to SHF_MERGE section the first time
64         we see it.
65         * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
66         sec_merge_done.
67         (get_local_sym_hash): New, extracted from get_dyn_sym_info.
68         (get_dyn_sym_info): Use it.
69         (elfNN_ia64_relocate_section): Translate local dyn entries
70         for STT_SECTION symbol to SHF_MERGE section the first time
71         we see it.
73 2001-11-27  H.J. Lu <hjl@gnu.org>
75         * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
76         ELF.
78 Mon Nov 26 12:33:44 2001  Jeffrey A Law  (law@cygnus.com)
80         * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
81         prototypes.
83 2001-11-24  Alan Modra  <amodra@bigpond.net.au>
85         * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
86         group sizes to accommodate c++.
88 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
90         * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
91         relocations in non-alloced sections against global symbols
92         defined in shared library being built.
93         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
95 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
97         * elf.c (_bfd_elf_rela_local_sym): New.
98         * elflink.h (elf_link_input_bfd): Don't consider empty
99         merged sections as removed in relocation tests.
100         * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
101         * elf32-i386.c (elf_i386_relocate_section): Handle relocs
102         against STT_SECTION symbol of SHF_MERGE section.
103         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
104         * elf32-avr.c (elf32_avr_relocate_section): Call
105         _bfd_elf_rela_local_sym.
106         * elf32-cris.c (cris_elf_relocate_section): Likewise.
107         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
108         * elf32-fr30.c (fr30_final_link_relocate): Likewise.
109         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
110         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
111         * elf32-i370.c (i370_elf_relocate_section): Likewise.
112         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
113         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
114         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
115         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
116         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
117         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
118         * elf32-s390.c (elf_s390_relocate_section): Likewise.
119         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
120         * elf32-v850.c (v850_elf_relocate_section): Likewise.
121         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
122         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
123         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
124         * elf64-s390.c (elf_s390_relocate_section): Likewise.
125         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
126         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
127         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
128         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
129         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
130         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
131         * elf32-sh.c (sh_elf_relocate_section): Likewise for
132         !partial_inplace relocs. Handle relocs against STT_SECTION
133         symbol of SHF_MERGE for partial_inplace relocs.
135 2001-11-21  Nick Clifton  <nickc@cambridge.redhat.com>
137         * po/Make-in (distclean): Move SRC-POTFILES.in and
138         BLD-POTFILES.in to maintainer-clean target.
140 2001-11-21  Alan Modra  <amodra@bigpond.net.au>
142         * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
143         than sym_sec->output_section to detect relocs against discarded
144         sections.
146 2001-11-19  H.J. Lu  <hjl@gnu.org>
148         * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
149         discarding relocations.
151 2001-11-19  Nick Clifton  <nickc@cambridge.redhat.com>
153         * section.c (bfd_is_const_section): New macro.  Return true if the
154         given seciton is one of the special, constant, sections.
155         * bfd-in2.h: Regenerate.        
156         * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
157         (coff_write_native_symbol): Use bfd_is_const_section.
159 2001-11-19  Alan Modra  <amodra@bigpond.net.au>
161         * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
163         * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
164         millicode syms as candidates for import stubs.
166         * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
167         (allocate_PIC_calls): Rename to allocate_plt_static.
168         (allocate_dynrelocs): Move most of code handling .plt entries to..
169         (allocate_plt_static): ..here.  Don't drop plabel entries.
171 2001-11-19  Hans-Peter Nilsson  <hp@bitrange.com>
173         * mmo.c: Adjust documentation tags to use texinfo 4 features.
175 2001-11-16  Nick Clifton  <nickc@cambridge.redhat.com>
177         * section.c (bfd_is_const_section): New macro.  Return true if the
178         section pointer refers to one of the special, constant sections.
179         * bfd-in2.h: Regenerate.
181         * coffgen.c (coff_count_linenumbers): Only update the line number
182         count in non-special sections.
183         (coff_write_native_symbol): Only update the line number file
184         position in non-special sections.
186 2001-11-15  Daniel Jacobowitz  <drow@mvista.com>
188         * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
189         local syms from discarded sections.  Update comment.
191 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
193         * po/SRC-POTFILES.in: Regenerate.
195         * elflink.h (elf_link_input_bfd): Complain about all relocs
196         against local syms from discarded sections.  K&R fixes.
197         (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
198         K&R fixes.
200 2001-11-15  Alexandre Oliva  <aoliva@redhat.com>
202         * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
203         overflows in the .stab section.
205 2001-11-14  Daniel Jacobowitz  <drow@mvista.com>
207         * bfd-in.h (bfd_elf32_discard_info): Add prototype.
208         (bfd_elf64_discard_info): Likewise.
209         * bfd-in2.h: Regenerate.
210         * elf-bfd.h (struct elf_reloc_cookie): New.
211         (struct elf_backend_data): Add elf_backend_discard_info,
212         elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
213         (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
214         (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
215         * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
216         (_bfd_elf32_mips_ignore_discarded_relocs): New.
217         (_bfd_elf32_mips_write_section): New.
218         (elf_backend_discard_info): Define.
219         (elf_backend_ignore_discarded_relocs): Define.
220         (elf_backend_write_section): Define.
221         * elfcode.h (elf_bfd_discard_info): Define.
222         (elf_reloc_symbol_deleted_p): Define.
223         * elflink.h (elf_link_input_bfd): Check
224         elf_section_ignore_discarded_relocs.  Call
225         bed->elf_backend_write_section if available.
226         (elf_reloc_symbol_deleted_p): New.
227         (elf_bfd_discard_info): New.
228         (elf_section_ignore_discarded_relocs): New.
229         * elfxx-target.h (elf_backend_discard_info): Define.
230         (elf_backend_ignore_discarded_relocs): Define.
231         (elf_backend_write_section): Define.
232         (elfNN_bed): Add elf_backend_discard_info,
233         elf_backend_ignore_discarded_relocs, and
234         elf_backend_write_section.
235         * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
236         * libbfd.h: Regenerate.
237         * stabs.c (_bfd_discard_section_stabs): New.
239 2001-11-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
241         * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
242         scheme to get rid of an ugly complicated test. 
243         * elf64-s390.c (elf_s390_relocate_section): Likewise.
245 2001-11-14  Andreas Jaeger  <aj@suse.de>
247         * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
248         x86-64 for display.
250 2001-11-14  Jakub Jelinek  <jakub@redhat.com>
252         * dwarf2.c (struct line_head) [total_length]: Change type to
253         bfd_vma.
254         (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
255         (struct comp_unit): Add stash and offset_size.
256         (read_8_bytes): Return bfd_vma.
257         (read_indirect_string): New.
258         (read_attribute): Handle DW_FORM_strp.
259         (decode_line_info): Support 64-bit DWARF format.
260         (_bfd_dwarf2_find_nearest_line): Likewise.
261         (parse_comp_unit): Set offset_size and stash.
263 2001-11-13  Keith Walker <keith.walker@arm.com>
265         * dwarf2.c (read_attribute_value): New function to handle
266         DW_FORM_indirect.
267         (read_attribute): Use it.
269 2001-11-13  Geoffrey Keating  <geoffk@redhat.com>
271         * dwarf2.c (decode_line_info): Properly deal with unknown standard
272         opcodes.
274 2001-11-13  John Marshall  <jmarshall@acm.org>
275             Alan Modra  <amodra@bigpond.net.au>
277         * section.c (bfd_make_section_anyway): Don't increment section_id
278         and the BFD's section_count if adding the section failed.
279         * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
280         change.
282 2001-11-12  Orjan Friberg  <orjanf@axis.com>
284         * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
285         core dump format.
287 2001-11-11  H.J. Lu <hjl@gnu.org>
289         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
290         _bfd_elf_strtab_size instead of _bfd_stringtab_size.
292         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
293         dynstr type to `struct elf_strtab_hash *'.
295 2001-11-11  Hans-Peter Nilsson  <hp@bitrange.com>
297         * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
298         size_t.  Rename second i to j.
300 Sat Nov 10 08:56:02 2001  Jeffrey A Law  (law@cygnus.com)
302         * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
304 2001-11-10  Alan Modra  <amodra@bigpond.net.au>
306         * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
307         relocs into shared libs.
308         * elf32-cris.c (cris_elf_relocate_section): Likewise.
309         * elf32-i370.c (i370_elf_relocate_section): Likewise.
310         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
311         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
312         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
313         * elf32-sh.c (sh_elf_relocate_section): Likewise.
314         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
315         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
316         * elf64-s390.c (elf_s390_relocate_section): Likewise.
317         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
318         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
319         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
321         * elf.c (bfd_section_from_r_symndx): New function.
322         * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
323         (struct sym_sec_cache): New.
324         (bfd_section_from_r_symndx): Declare.
325         (struct bfd_elf_section_data): Change local_dynrel type to PTR.
326         * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
327         relocs when relocatable.  Don't zero entire reloc, just zero the
328         addend and sym.
329         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
330         (elf32_hppa_link_hash_table_create): Init it.
331         (elf32_hppa_check_relocs): Track dynamic relocs needed for local
332         syms on a per-section basis as we do for globals.
333         (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
334         (allocate_dynrelocs): Warning fix.
335         (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
336         section has been discarded.
337         (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
338         into shared libs.
339         * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
340         (elf_i386_link_hash_table_create): Init it.
341         (elf_i386_check_relocs): Track dynamic relocs needed for local
342         syms on a per-section basis as we do for globals.
343         (elf_i386_gc_sweep_hook): Update for local_dynrel change.
344         Remove dead code.
345         (allocate_dynrelocs): Warning fix.
346         (elf_i386_size_dynamic_sections): Don't allocate relocs when
347         section has been discarded.
348         (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
349         into shared libs.
350         * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
351         (elf_s390_link_hash_table_create): Init it.
352         (elf_s390_check_relocs): Track dynamic relocs needed for local
353         syms on a per-section basis as we do for globals.
354         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
355         Remove dead code.
356         (allocate_dynrelocs): Warning fix.
357         (elf_s390_size_dynamic_sections): Don't allocate relocs when
358         section has been discarded.
359         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
360         into shared libs.
361         * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
362         (ppc64_link_hash_table_create): Init it.
363         (ppc64_elf_check_relocs): Track dynamic relocs needed for local
364         syms on a per-section basis as we do for globals.
365         (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
366         (allocate_dynrelocs): Call the correct record_dynamic_dymbol
367         function.  Warning fix.
368         (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
369         section has been discarded.
370         (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
371         into shared libs.
372         * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
373         (elf_s390_link_hash_table_create): Init it.
374         (elf_s390_check_relocs): Track dynamic relocs needed for local
375         syms on a per-section basis as we do for globals.
376         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
377         Remove dead code.
378         (allocate_dynrelocs): Warning fix.
379         (elf_s390_size_dynamic_sections): Don't allocate relocs when
380         section has been discarded.
381         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
382         into shared libs.
384 2001-11-08  Martin Schwidefsky  <schwidefsky@de.ibm.com>
386         * elf32-s390: Major rework that introduces all recent changes to
387         the s390 backends.  Get a closer match to elf32-i386.
388         (elf_s390_relocate_section): Make use of dynamic section short-cuts.
389         Localise vars, and delay setting.  Better error reporting, replace
390         BFD_ASSERT with abort.  Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
391         symbol is not defined in the regular object file and tread the weak
392         definition as the normal one.  Don't discard relocs for undefweak or
393         undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
394         test for avoided copy relocs.  Reinstate fudge for unresolved relocs
395         in debugging sections.
396         (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc.  Don't do copy
397         reloc processing for weakdefs.  Remove redundant casts and aborts.
398         Delay setting of vars until needed.  Move creation of dynamic symbols
399         and allocation of .plt and .rela.plt to allocate_dynrelocs.  Replace
400         BFD_ASSERT with abort.  Discard .plt entries for everything with
401         plt.refcount <= 0.
402         (elf_s390_check_relocs):  Don't allocate space for dynamic relocs,
403         .got or .relgot here but do it in allocate_dynrelocs.  Reference count
404         possible .plt and .got entries.  Don't test input section SEC_READONLY
405         here to try to avoid copy relocs, and keep dyn_relocs regardless of
406         ELF_LINK_NON_GOT_REF.  Don't set DF_TEXTREL here.  Delay setting of
407         variables until needed.  Remove separate switch stmt for creating .got
408         section.  Initialise local_got_refcounts to 0.  Cache pointer to
409         "sreloc" section in elf_section_data. Tweak condition under which .got
410         created.  Report files with bad relocation section names.
411         (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
412         have been forced local.  Use same test to decide if we can use a
413         relative reloc for got as elf_s390_relocate_section.  Expand SHN_UNDEF
414         comment.  Move expressions out of function calls.  Replace BFD_ASSERT
415         with abort.
416         (elf_s390_finish_dynamic_sections): Migrate common code out of switch
417         statement.  Replace BFD_ASSERT with abort.
418         (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
419         to "ibfd".  Allocate space for local dyn relocs.  Use DF_TEXTREL flag
420         instead of looking up section names for DT_TEXTREL.  Replace
421         BFD_ASSERT with abort.  Zero out the dynamic allocated content space.
422         Add a comment to remind us that one day this ought to be fixed.
423         (struct elf_s390_link_hash_entry): Rename "root" to "elf".
424         (struct elf_s390_link_hash_table): Likewise.
425         (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
426         rid of unnecessary casts.
427         (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
428         Remove "section" field.
429         (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
430         Reference count possible .plt entries.  Don't deallocate .got and
431         .relgot space here.
432         (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
433         Update comment.
434         (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
435         dyn_relocs.
436         (elf_s390_discard_copies):  Delete.
437         (elf_s390_link_hash_traverse): Delete.
438         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
439         rather than gc variety).
440         (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
441         srelplt, sdynbss, srelbss fields.
442         (elf_s390_link_hash_table_create): Init them.
443         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
444         (allocate_dynrelocs): New function.
445         (create_got_section): New function.
446         (elf_backend_can_refcount): Define.
447         (elf_backend_copy_indirect_symbol): Define.
448         (elf_s390_copy_indirect_symbol): New function.
449         (elf_s390_create_dynamic_sections): New function.
450         (readonly_dynrelocs): New function.
451         * elf64-s390.c: Likewise.
453 2001-11-07  Jakub Jelinek  <jakub@redhat.com>
455         * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
456         (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
457         (elf-strtab.lo): Add rule.
458         * Makefile.in: Rebuilt.
459         * configure.in (elf): Add elf-strtab.lo.
460         * configure: Rebuilt.
461         * elf-bfd.h (elf_strtab_hash): Forward declare.
462         (struct elf_link_hash_table): Change dynstr type to
463         struct elf_strtab_hash *.
464         (struct elf_obj_tdata): Change strtab_ptr type to
465         struct elf_strtab_hash *.
466         (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
467         _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
468         _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
469         _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
470         _bfd_elf_strtab_finalize): New prototypes.
471         * elf-strtab.c: New file.
472         * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
473         and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
474         Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
475         when forcing dynamic symbol to local.
476         (elf_link_create_dynamic_sections): Call
477         _bfd_elf_strtab_init instead of elf_stringtab_init.
478         (elf_link_record_local_dynamic_symbol): Likewise, change
479         dynstr type.  Use _bfd_elf_strtab functions instead of
480         _bfd_stringtab calls.
481         (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
482         _bfd_stringtab calls.  For DT_RUNPATH and Verdaux vda_name fields,
483         call _bfd_elf_strtab_addref.  Call elf_finalize_dynstr.
484         (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
485         (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
486         dynamic symbol to local.
487         (elf_link_assign_sym_version): Likewise.
488         (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
489         _bfd_stringtab_emit.
490         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
491         type.  Call _bfd_elf_strtab functions instead of
492         _bfd_stringtab functions.
493         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
494         * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
495         (elf_fake_sections): Likewise.
496         (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
497         on shstrtab hash table, call _bfd_elf_strtab_addref on each section
498         name in the output.  Call _bfd_elf_strtab_finalize and
499         use _bfd_elf_strtab_offset to finalize sh_name section header fields.
500         (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
501         instead of _bfd_stringtab_size.
502         (prep_headers): Change shstrtab type.
503         Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
505 2001-11-07  Alan Modra  <amodra@bigpond.net.au>
507         * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
508         bad symtab segfault.  Formatting and warning fixes.  Improve
509         error message for internationalisation.
511 2001-11-06  H.J. Lu  (hjl@gnu.org)
513         * elflink.h (elf_link_input_bfd): Complain about relocs against
514         discarded sections.
516 2001-11-03  Alan Modra  <amodra@bigpond.net.au>
518         * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
520 2001-11-02  H.J. Lu  <hjl@gnu.org>
522         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
523         dynamic relocation for symbols defined in regular objects when
524         creating executables.
526 2001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>
528         * configure.in (ALL_LINGUAS): Add "fr".
529         * configure: Regenerate.
530         * po/fr.po: New file.
532         * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
534 2001-11-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
536         * som.c (setup_sections): Initialize subspace_sections.
538 2001-11-02  H.J. Lu  (hjl@gnu.org)
540         * coffgen.c (coff_object_p): Return 0 if the header is too big.
542 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
544         * elfcore.h (elf_core_file_p): Preserve and clear abfd section
545         information.  Save bfd arch and mach values.  Restore on error.
547 2001-11-02  Alan Modra  <amodra@bigpond.net.au>
549         * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
550         (allocate_PIC_calls): New function.
551         (allocate_dynrelocs): Don't allocate pic_call plt entries here.
552         (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
553         (elf32_hppa_finish_dynamic_symbol): Remove dead code.
555 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
557         * elf32-cris.c (cris_elf_grok_prstatus): New function.
558         (cris_elf_grok_psinfo): New function.
559         (elf_backend_grok_prstatus): Define.
560         (elf_backend_grok_psinfo): Define.
562 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
564         * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
565         prediction bits.
567 2001-10-31  Chris Demetriou  <cgd@demetriou.com>
569         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
570         relocations properly.
572 2001-10-31  H.J. Lu <hjl@gnu.org>
574         * elflink.h (elf_link_output_extsym): Don't clear the visibility
575         field for relocateable.
577 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
579         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
580         .plt relocs in DT_RELASZ.
582 2001-10-29  NIIBE Yutaka  <gniibe@m17n.org>
584         * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
585         targets.
587 2001-10-31  Nick Clifton  <nickc@cambridge.redhat.com>
589         * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
591 2001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>
593         * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
594         (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
595         (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
596         Regenerate dependencies.
597         * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
598         * config.bfd: [BFD64] (mmix-*-*): New case.
599         * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
600         * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
601         (bfd_mmix_arch): Declare.
602         (bfd_archures_list): Add bfd_mmix_arch.
603         * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
604         (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
605         (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
606         bfd_mmo_mmix_vec.
607         * reloc.c: Add MMIX relocations.
608         * bfd.c (struct _bfd, tdata): Add mmo_data.
609         * Makefile.in: Regenerate.
610         * configure: Regenerate.
611         * libbfd.h: Regenerate.
612         * bfd-in2.h: Regenerate.
613         * configure: Rebuild.
615 2001-10-30  Richard Earnshaw (rearnsha@arm.com)
617         * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
618         p_paddr of the segment that contains it.
619         (copy_private_bfd_data): If the LMA for a segment is known, use it
620         for matching sections to segments.
621         (assign_file_positions_for_segments): Use the LMA when adjusting
622         for inter-section alignment padding.
624 2001-10-29  Kazu Hirata  <kazu@hxi.com>
626         * README: Fix a typo.
628 2001-10-24  Richard Henderson  <rth@redhat.com>
630         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
631         timestamp to time_t for ctime.
633 2001-10-24  Hans-Peter Nilsson  <hp@axis.com>
635         * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
636         unsigned, increasing index.
638 2001-10-23  H.J. Lu <hjl@gnu.org>
640         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
641         m != NULL before accessing it.
643 2001-10-23  Alan Modra  <amodra@bigpond.net.au>
645         * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
646         bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
647         doesn't accept BFD_RELOC_* on some targets, eg. hppa.
649         * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
650         (hppa_link_hash_newfunc): Likewise.
651         (elf32_hppa_finish_dynamic_symbol): Likewise.
652         (allocate_dynrelocs): Always allocate .got relocs if shared.
653         (elf32_hppa_relocate_section): Output them too.  Similarly
654         consolidate .plt reloc code, and no longer initialise .plt
655         when a reloc is output.
656         (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
657         when no reloc is output.
659         From Herbert Xu <herbert@gondor.apana.org.au>
660         * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
661         unreachable branches.
663 2001-10-22  H.J. Lu <hjl@gnu.org>
665         * configure.in (WIN32LIBADD): Use -L../libiberty for
666         mips*-*-linux*.
667         * configure: Rebuild.
669 2001-10-21  H.J. Lu <hjl@gnu.org>
671         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
672         if shared library is enabled only for Linux hosts.
673         * configure: Rebuild.
675 2001-10-21  H.J. Lu <hjl@gnu.org>
677         * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
678         ../libiberty/Makefile instead of $enable_shared.
679         * configure: Rebuild.
681 2001-10-21  H.J. Lu <hjl@gnu.org>
683         * elf32-cris.c (cris_reloc_type_lookup): Use int for index.  Cover
684         index 0.
686 2001-10-20  H.J. Lu <hjl@gnu.org>
688         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
689         if shared library is enabled.
690         * configure: Rebuild.
692 2001-10-20  H.J. Lu <hjl@gnu.org>
694         * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
696 2001-10-19  H.J. Lu <hjl@gnu.org>
698         * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
699         size is empty.
701 2001-10-18  H.J. Lu <hjl@gnu.org>
703         * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
704         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
706 2001-10-18  Jakub Jelinek  <jakub@redhat.com>
708         * section.c (_bfd_strip_section_from_output): Don't count
709         SEC_EXCLUDE sections as references.  Set SEC_EXCLUDE.
711 2001-10-17  Alan Modra  <amodra@bigpond.net.au>
713         * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
714         Elf_Internal_Shdr.contents now that it's no longer a PTR.
715         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
716         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
717         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
718         * elf32-sh.c (sh_elf_relax_section): Likewise.
719         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
720         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
721         * elf.c (setup_group): Warning fixes.
722         * elflink.h (elf_link_sort_relocs): Likewise.
723         * pdp11.c (slurp_reloc_table): Likewise.
725 2001-10-16  Jeff Holcomb  <jeffh@redhat.com>
727         * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
728         casts.
730 2001-10-15  H.J. Lu <hjl@gnu.org>
732         * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
733         for relocations against discarded link-once section.
735 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
737         * elf32-i386.c (elf_i386_relocate_section): Report some detail on
738         bfd_reloc_outofrange and similar errors.
740         * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
741         rather than ind->weakdef.
742         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
743         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
744         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
745         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
746         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
748 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
749             H.J. Lu  <hjl@gnu.org>
751         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
752         counts for aliases instead of aborting.
753         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
754         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
756         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
757         to -1 for non-function symbols.
758         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
759         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
760         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
761         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
762         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
763         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
764         plt.offset instead of plt.refcount when setting to -1.
766 2001-10-12  Nick Clifton  <nickc@cambridge.redhat.com>
768         * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
769         like R_ARM_PC24.  Include reloc number in error message about
770         unresolvable relocs.
772 2001-10-10  Jakub Jelinek  <jakub@redhat.com>
774         * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
775         relocations against the same symbol in .rel{,a}.dyn section.
777 2001-10-10  Kazu Hirata  <kazu@hxi.com>
779         * aout-encap.c: Fix comment typos.
780         * aoutx.h: Likewise.
781         * archive.c: Likewise.
782         * bout.c: Likewise.
783         * coff64-rs6000.c: Likewise.
784         * coffcode.h: Likewise.
785         * coffgen.c: Likewise.
786         * cofflink.c: Likewise.
787         * coff-mips.c: Likewise.
788         * ecoff.c: Likewise.
789         * elf32-m32r.c: Likewise.
790         * libcoff-in.h: Likewise.
791         * libecoff.h: Likewise.
792         * libxcoff.h: Likewise.
793         * nlm32-i386.c: Likewise.
794         * pdp11.c: Likewise.
795         * section.c: Likewise.
796         * som.c: Likewise.
797         * som.h: Likewise.
798         * bfd-in2.h: Regenerate.
799         * libcoff.h: Likewise.
801 2001-10-10  Alan Modra  <amodra@bigpond.net.au>
803         * elf.c (elf_map_symbols): Don't create new section symbols; Use
804         existing section syms.  Update comments.
805         (copy_private_bfd_data): Formatting fixes.
806         (elfcore_grok_win32pstatus): Likewise.
807         (swap_out_syms): Likewise.  Remove unnecessary level of braces.
809 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
811         * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
812         "group_name".
813         (elf_group_name): Define.
814         (elf_next_in_group): Define.
815         * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
816         (setup_group): Don't use sec->lineno for SHT_GROUP section to store
817         first member section; Instead use elf_next_in_group.
818         (bfd_section_from_shdr): Likewise.
819         (set_group_contents): Likewise.  Use elf_section_syms, not sec->symbol.
821 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
823         * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
824         "next_in_group".  Fix gp and gp_size comments.
825         * elf.c (union elf_internal_group): New.
826         (setup_group): New function.
827         (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
828         Call setup_group for SHF_GROUP sections.
829         (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
830         (elf_fake_sections): Set header type for SEC_GROUP, and header
831         flags for sections in a group.
832         (set_group_contents): New function.
833         (_bfd_elf_compute_section_file_positions): Call it.
834         (assign_section_numbers): Set sh_link for SHT_GROUP.
836         * elflink.h (gc_mark_hook): Handle section groups.
837         * elfxx-target.h: Add SEC_GROUP to applicable_flags.
838         * section.c (SEC_GROUP): Define.
839         (struct sec): Comment fixes.
840         * bfd-in2.h: Regenerate.
842         * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
843         out of function args.
844         (_bfd_elf_canonicalize_reloc): Similarly.
845         (_bfd_elf_get_symtab): Here too.
846         (_bfd_elf_canonicalize_dynamic_symtab): And here.
847         * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
848         bfd_bread, and remove unnecessary cast.
850 2001-10-08  Aldy Hernandez  <aldyh@redhat.com>
852         * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
854 2001-10-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
856         * dwarf2.c (comp_unit_find_nearest_line): Check for end of
857         compilation unit.
859 2001-10-06  Alan Modra  <amodra@bigpond.net.au>
861         * bfd.c (bfd_assert): Report bfd version.
862         (_bfd_abort): Likewise.
864         * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
865         section sym values.  Instead replace any relocs against them with
866         relocs against STN_UNDEF, which has a zero value.
868         * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
869         relocs.
871 2001-10-05  Jeff Law <law@redhat.com>
873         * som.h (som_exec_data): New field "version_id".
874         * som.c (som_object_setup): Record the version_id if it
875         exists.
876         (som_prep_headers): Do not initialize version_id here.
877         (som_finish_writing): Initialize version_id here.
879 2000-10-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
881         * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
882         according to the MIPS/SGI ELF64 ABI Draft.
883         (mips_elf_sort_hash_table): Typo.
885 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
887         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
889         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
890         copying flags if this is a weakdef.
892 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
894         * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
895         packing.
897         * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
898         to 1 rather than 0 to avoid confusing copy_indirect_symbol.
899         (mips_elf_sort_hash_table_f): Compare got.offset against 1.
901         * Makefile.am (BFD_H_DEPS): Add symcat.h.  Ensure everything
902         depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
903         backends we configure.  Run "make dep-am".
904         (install-data-local): Install symcat.h.
905         * dep-in.sed: Remove symcat.h from dependencies.
906         * Makefile.in: Regenerate.
908 2001-10-03  Vassili Karpov  <malc@pulsesoft.com>
910         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
912 2001-10-03  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
914         * elf64-mips.c (elf_backend_may_use_rela_p): New define.
915         (elf_backend_default_use_rela_p): New define.
917 2001-10-03  Alan Modra  <amodra@bigpond.net.au>
919         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
920         change.
922         * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
923         * configure: Regenerate.
924         * Makefile.am (BFD_H_FILES): Add version.h.
925         * Makefile.in: Regenerate.
926         * po/SRC-POTFILES.in: Regenerate.
928         * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
929         elf_backend_copy_indirect_symbol so that backend has a chance to
930         copy other necessary fields.
931         * elf-bfd.h (struct elf_backend_data): Update description of
932         elf_backend_copy_indirect_symbol.
933         * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
934         copying flags if this is a weakdef.
935         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
936         (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
937         than bfd_link_hash_lookup.
938         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
939         reloc processing for weakdefs.
940         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
941         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
943 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
945         * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
946         result of ELF64_R_TYPE to enum before using in a switch.
947         (ppc64_elf_gc_mark_hook): Likewise.
948         (ppc64_elf_gc_sweep_hook): Likewise.
949         (ppc64_elf_reloc_type_class): Likewise.
951 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
953         * version.h: New file.
954         * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
955         (BFD_VERSION_DATE): Define.
956         (BFD_VERSION_STRING): Define.
957         * configure.in: AC_SUBST bfd_version, bfd_version_date and
958         bfd_version_string.
959         (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
960         * bfd-in2.h: Regenerate.
961         * configure: Regenerate.
962         * Makefile.am: Run "make dep-am".
963         * Makefile.in: Regenerate.
965         * bfd-in.h: Include "symcat.h".
966         (CONCAT4): Redefine as for old CAT4.
967         * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
968         Add warning regarding whitespace.
969         * aout-cris.c: Likewise.
970         * aout-ns32k.c: Likewise.
971         * aout-sparcle.c: Likewise.
972         * aout-tic30.c: Likewise.
973         * aout0.c: Likewise.
974         * armnetbsd.c: Likewise.
975         * demo64.c: Likewise.
976         * elf-bfd.h: Likewise.
977         * gen-aout.c: Likewise.
978         * host-aout.c: Likewise.
979         * hp300bsd.c: Likewise.
980         * hp300hpux.c: Likewise.
981         * i386aout.c: Likewise.
982         * i386bsd.c: Likewise.
983         * i386dynix.c: Likewise.
984         * i386freebsd.c: Likewise.
985         * i386linux.c: Likewise.
986         * i386lynx.c: Likewise.
987         * i386mach3.c: Likewise.
988         * i386netbsd.c: Likewise.
989         * libaout.h: Likewise.
990         * m68k4knetbsd.c: Likewise.
991         * m68klinux.c: Likewise.
992         * m68klynx.c: Likewise.
993         * m68knetbsd.c: Likewise.
994         * m88kmach3.c: Likewise.
995         * mipsbsd.c: Likewise.
996         * newsos3.c: Likewise.
997         * ns32knetbsd.c: Likewise.
998         * pc532-mach.c: Likewise.
999         * pdp11.c: Likewise.
1000         * riscix.c: Likewise.
1001         * sparclinux.c: Likewise.
1002         * sparclynx.c: Likewise.
1003         * sparcnetbsd.c: Likewise.
1004         * sunos.c: Likewise.
1005         * targets.c: Likewise.
1006         * vaxnetbsd.c: Likewise.
1007         * vms-hdr.c: Likewise.
1009 2001-10-01  Alan Modra  <amodra@bigpond.net.au>
1011         * bfd-in.h: Remove comments regarding generated files.
1012         * libbfd-in.h: Likewise.
1013         * libcoff-in.h: Likewise.
1014         * bfd-in2.h: Regenerate.
1015         * libbfd.h: Likewise.
1016         * libcoff.h: Likewise.
1018 2001-09-30  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1019             Hans-Peter Nilsson  <hp@bitrange.com>
1021         * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1022         partial_inplace, matching assembler output.  Set src_mask to
1023         all ones.
1024         (sh_elf_relocate_section): Delete misplaced comment.
1025         For relocatable linking against section symbol, call
1026         _bfd_relocate_contents for partial_inplace relocs and adjust
1027         rel->r_addend for others.
1028         <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1029         bfd_get_32, not at rel->r_addend.
1031 2001-09-30  Alan Modra  <amodra@bigpond.net.au>
1033         * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1034         the old dir refcount, so we indirectly set them to init_refcount.
1035         Short-circuit asserts when we've just verified they are true.
1037 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1039         * section.c (struct sec): Remove kept_section.
1040         (STD_SECTION): Remove kept_section initialisation.
1041         (bfd_make_section_anyway): Here too.
1042         * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1043         * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1044         * elflink.h (elf_link_input_bfd): Set discarded link-once section
1045         symbols to zero, and remove all code involved with kept_section
1046         and tracking section symbol values.
1047         * bfd-in2.h: Regenerate.
1048         * configure.in: Bump version number.
1049         * configure: Regenerate.
1051 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1053         * elf64-ppc.c (struct ppc_dyn_relocs): New.
1054         (IS_ABSOLUTE_RELOC): Define.
1055         (struct ppc_link_hash_entry): New.
1056         (struct ppc_link_hash_table): New.
1057         (ppc_hash_table): Define.
1058         (link_hash_newfunc): New function.
1059         (ppc64_elf_link_hash_table_create): New function.
1060         (create_got_section): New function.
1061         (ppc64_elf_create_dynamic_sections): Call create_got_section.  Stash
1062         pointers to our dynamic sections in hash table.
1063         (ppc64_elf_copy_indirect_symbol): New function.
1064         (ppc64_elf_check_relocs): Remove DEBUG code.  Use short-cuts to
1065         dynamic sections.  Localise vars.  Modify code for refcounts
1066         starting from zero.  Don't allocate here, or force symbols dynamic.
1067         Don't copy all relocs if shared, select ones we need.  Add code
1068         to track possible copy relocs for non-shared link.
1069         (ppc64_elf_gc_mark_hook): Update comment.
1070         (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1071         (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code.  Rewrite .plt
1072         code for reference counting garbage collection.  Don't create .plt
1073         entries for functions that don't comply with ABI naming convention,
1074         and don't allocate .plt space here.  Use short-cuts to dynamic
1075         sections.  If possible, keep dynamic relocations instead of using
1076         copy relocs.  Remove confused comments.
1077         (ppc_adjust_dynindx): Delete.
1078         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1079         (allocate_dynrelocs): New function.
1080         (readonly_dynrelocs): New function.
1081         (ppc64_elf_size_dynamic_sections): Rewrite.  Allocate local .got
1082         space here, and call allocate_dynrelocs to allocate space for
1083         global .plt, .got and reloc sections.  Use short-cuts to dynamic
1084         sections.  Call readonly_dynrelocs to determine whether we need
1085         DT_TEXTREL.  Don't generate section symbols here, the generic
1086         ELF linker code does it for us.
1087         (ppc64_elf_final_link): Call regular ELF backend linker rather than
1088         gc variety, since we do our own .got handling.
1089         (ppc64_elf_relocate_section): Remove DEBUG code.  Make use of
1090         dynamic section short-cuts.  Localise vars, and delay setting.
1091         Handle unknown relocs in main switch statement.  Replace ugly
1092         complicated tests for unresolvable relocs with a simple direct
1093         scheme using "unresolved_reloc" var.  Test ELF_ST_VISIBILITY
1094         before allowing an undefined sym in a shared lib.  Do R_*_DS tests
1095         after main switch, when we've set addend.  Do non-addend insn
1096         tweaks before main swithc.  Ignore input_section->vma when
1097         calculating reloc offsets as it's always zero.  Rewrite dynamic
1098         reloc handling.  Consolidate R_*_HA handling.  Handle more relocs.
1099         (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code.  Make use
1100         of dynamic section short-cuts.  Reorganise .plt handling code.
1101         Remove confused comments.  Take note of ELF_LINK_FORCED_LOCAL.
1102         Move expressions out of swap_reloca_out function calls.
1103         (ppc64_elf_reloc_type_class): New function.
1104         (ppc64_elf_info_to_howto): Move common expression to local var.
1105         (ppc64_elf_finish_dynamic_sections): Remove DEBUG code.  Make use
1106         of dynamic section short-cuts.  Don't fiddle with section syms
1107         here as the ELF linker does it for us.
1108         (elf_backend_can_refcount): Define.
1109         (bfd_elf64_bfd_link_hash_table_create): Define.
1110         (elf_backend_copy_indirect_symbol): Define.
1111         (elf_backend_reloc_type_class): Define.
1112         (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1114 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1116         * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1117         (struct elf_backend_data): Add can_refcount.
1118         * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts.  Set
1119         got.refcount and plt.refcount from init_refcount.
1120         (_bfd_elf_link_hash_table_init): Set up init_refcount.
1121         (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1122         rather than got/plt.offset, and test for <= 0 rather than -1.
1123         * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1124         * elfxx-target.h (elf_backend_can_refcount): Define.
1125         (elfNN_bed): Init can_refcount.
1126         * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1127         (_bfd_generic_link_hash_newfunc): Likewise.
1128         * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1129         starting from zero.
1130         (elf_backend_can_refcount): Define.
1131         * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1132         starting from zero.
1133         (elf32_hppa_copy_indirect_symbol): Make static to agree with
1134         prototype.
1135         (elf_backend_can_refcount): Define.
1136         * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1137         starting from zero.
1138         (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1139         (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1140         (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1141         (elf_backend_can_refcount): Define.
1142         (elf_i386_copy_indirect_symbol): Make static to agree with
1143         prototype.  Formatting fix.
1144         * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1145         starting from zero.
1146         (elf_backend_can_refcount): Define.
1147         * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1148         starting from zero.
1149         (elf_backend_can_refcount): Define.
1150         * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1151         starting from zero.
1152         (elf_backend_can_refcount): Define.
1153         * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1154         starting from zero.
1155         (elf_backend_can_refcount): Define.
1156         * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1157         starting from zero.
1158         (elf_backend_can_refcount): Define.
1160         * som.c (som_write_symbol_strings): Cast current_offset in
1161         bfd_seek call to match param type.
1163 2001-09-28  J. Brobecker <brobecker@gnat.com>
1165         * som.c (som_write_symbol_strings): Fix incorrect type of
1166         current_offset to match the function definition. Fixes a build
1167         failure on HPUX-11.00.
1169 2001-09-28  Richard Henderson  <rth@redhat.com>
1171         * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1172         SEC_MERGE, SEC_STRINGS.
1174         * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1175         * bfd-in2.h: Rebuild.
1177 2001-09-28  Alan Modra  <amodra@bigpond.net.au>
1179         * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1180         reloc code using x86_64_reloc_map.
1182         * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1183         no longer allocate here.  Localise some vars to blocks where they
1184         are used.
1185         (elf32_hppa_adjust_dynamic_symbol): Correct a comment.  Delay
1186         setting of vars until needed.
1187         (allocate_dynrelocs): Don't create a .plt entry without a reloc
1188         when symbol visibilty makes a function local.
1189         (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1190         swap_reloca_out function calls.
1191         (elf32_hppa_relocate_section): Likewies.  Comment typo fix.
1192         (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1193         switch statement.
1195         * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1196         no longer allocate here.  Localise some vars to blocks where they
1197         are used.  Remove separate switch stmt for creating .got sec.
1198         (elf_i386_adjust_dynamic_symbol): Correct a comment.  Remove
1199         redundant casts and aborts.  Delay setting of vars until needed.
1200         (allocate_dynrelocs): Remove redundant casts and aborts.
1201         (elf_i386_size_dynamic_sections): Move comment.
1202         (elf_i386_finish_dynamic_symbol): Move expressions out of function
1203         calls.
1204         (elf_i386_relocate_section): Likewise.  Comment typo fix.
1205         (elf_i386_finish_dynamic_sections): Migrate common code out of
1206         switch statement.
1207         (elf_backend_* defines): Sort.
1209         * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1210         without a reloc when symbol visibilty makes a function local.
1212 2001-09-27  Nick Clifton  <nickc@cambridge.redhat.com>
1214         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1215         conflicting float flags.
1217 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1219         * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1220         (elf_backend_copy_indirect_symbol): Define.
1221         (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1222         (struct elf_i386_link_hash_table): Likewise.
1223         (link_hash_newfunc): Get rid of unnecessary casts.
1224         (elf_i386_link_hash_table_create): Likewise.
1225         (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1226         Don't test input section SEC_READONLY here to try to avoid copy
1227         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1228         (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1229         here to properly test whether we need copy relocs.  Do so for weak
1230         syms too.
1232         * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1233         (elf_backend_copy_indirect_symbol): Define.
1234         (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1235         (stub_hash_newfunc): Get rid of unnecessary casts.
1236         (hppa_link_hash_newfunc): Likewise.
1237         (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1238         Don't test input section SEC_READONLY here to try to avoid copy
1239         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1240         (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1241         here to properly test whether we need copy relocs.  Do so for weak
1242         syms too.
1244 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1246         * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1247         VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1248         (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1250 2001-09-25  Jakub Jelinek  <jakub@redhat.com>
1252         * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1253         computation.
1255 2001-09-25  H.J. Lu  <hjl@gnu.org>
1257         * bfd-in2.h: Regenerated.
1259 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1261         * elf32-i386.c: Add comment re linker function names and ordering.
1262         (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1263         (elf_i386_grok_prstatus): Move before linker functions.
1264         (elf_i386_grok_psinfo): Likewise.
1265         (elf_i386_fake_sections): Move so that functions are ordered.
1266         (elf_i386_reloc_type_class): Likewise.  Comment function purpose.
1268 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1270         * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1271         throughout file.
1273         * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete.  Remove all
1274         code handling this option.
1275         (LONG_BRANCH_VIA_PLT): Likewise.
1276         (RELATIVE_DYNRELOCS): Define as zero.
1277         (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1278         "pc_count" fields.  Remove "section" field.
1279         (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1280         (elf32_hppa_check_relocs): Don't allocate space for dynamic
1281         relocs here.  Instead, record all needed dynamic relocs via
1282         dyn_relocs and local_dynrel.  Cache pointer to "sreloc" section
1283         in elf_section_data.
1284         (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1285         (allocate_plt_and_got_and_discard_relocs): Rename to
1286         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1287         (readonly_dynrelocs): New function.
1288         (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1289         Call readonly_dynrelocs to determine need for DT_TEXTREL.
1290         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1291         (elf32_hppa_relocate_section): Make use of cached sreloc.
1292         (elf32_hppa_reloc_type_class): New function.
1293         (elf_backend_reloc_type_class): Define.
1295 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1297         * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1298         and "sreloc" fields.
1299         * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1300         "pc_count" fields.  Remove "section" field.
1301         (elf_i386_check_relocs): Don't set DF_TEXTREL here.  Don't
1302         allocate space for dynamic relocs here.  Instead, record all
1303         needed dynamic relocs via dyn_relocs and local_dynrel.  Cache
1304         pointer to "sreloc" section in elf_section_data.
1305         (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1306         (allocate_plt_and_got_and_discard_relocs): Rename to
1307         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1308         (readonly_dynrelocs): New function.
1309         (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1310         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1311         (elf_i386_relocate_section): Make use of cached sreloc.
1313 2001-09-24  Alan Modra  <amodra@bigpond.net.au>
1315         * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1316         reloc rather than just the type.
1317         (_bfd_elf_reloc_type_class): Likewise.
1318         * elf.c (_bfd_elf_reloc_type_class): Likewise.
1319         * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1320         * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1321         * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1322         * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1323         * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1324         * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1325         * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1326         * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1327         * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1328         * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1329         * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1330         * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1331         * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1332         * elflink.h: Formatting fixes.
1333         (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1334         Call bfd_zmalloc rather than calloc.  Remove unnecessary cast of
1335         o->contents to PTR.  Update call to elf_backend_reloc_type_class.
1337 2001-09-22  John Reiser  <jreiser@BitWagon.com>
1339         * elfcode.h (elf_object_p): Allow for no section header at all in
1340         non-ET_REL files.  Honor 0 for e_shnum, e_shstrndx, e_shoff.
1342 2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
1344         * elfxx-ia64.c: Fix compile time warning messages.
1345         * coff-mcore.c: Fix compile time warning messages.
1346         * coff-ppc.c: Fix compile time warning messages.
1347         * coffcode.h: Fix compile time warning messages.
1348         * elf32-mips.c: Fix compile time warning messages.
1349         * elf64-alpha.c: Fix compile time warning messages.
1350         * libbfd.c: Fix compile time warning messages.
1351         * bfd-in2.h: Regenerate.
1353 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1355         * Makefile.am: Run "make dep-am".
1356         * Makefile.in: Regenerate.
1358         * aoutx.h: Formatting fixes.
1359         * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1361         * linker.c: Replace bfd_get_filename with bfd_archive_filename
1362         in error message.
1364 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1366         * bfd.c (bfd_archive_filename): New function.
1367         * bfd-in2.h: Regenerate.
1368         * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1369         in error messages where the bfd is an input bfd.
1370         * aout-cris.c: Likewise.
1371         * coff-arm.c: Likewise.
1372         * coff-mcore.c: Likewise.
1373         * coff-ppc.c: Likewise.
1374         * coff-rs6000.c: Likewise.
1375         * coff-sh.c: Likewise.
1376         * coff-tic54x.c: Likewise.
1377         * coff-tic80.c: Likewise.
1378         * coff64-rs6000.c: Likewise.
1379         * coffcode.h: Likewise.
1380         * coffgen.c: Likewise.
1381         * cofflink.c: Likewise.
1382         * ecofflink.c: Likewise.
1383         * elf-hppa.h: Likewise.
1384         * elf.c: Likewise.
1385         * elf32-arm.h: Likewise.
1386         * elf32-cris.c: Likewise.
1387         * elf32-gen.c: Likewise.
1388         * elf32-hppa.c: Likewise.
1389         * elf32-i370.c: Likewise.
1390         * elf32-i386.c: Likewise.
1391         * elf32-m32r.c: Likewise.
1392         * elf32-mcore.c: Likewise.
1393         * elf32-mips.c: Likewise.
1394         * elf32-ppc.c: Likewise.
1395         * elf32-s390.c: Likewise.
1396         * elf32-sh.c: Likewise.
1397         * elf32-sparc.c: Likewise.
1398         * elf32-v850.c: Likewise.
1399         * elf64-alpha.c: Likewise.
1400         * elf64-gen.c: Likewise.
1401         * elf64-ppc.c: Likewise.
1402         * elf64-s390.c: Likewise.
1403         * elf64-sparc.c: Likewise.
1404         * elf64-x86-64.c: Likewise.
1405         * elflink.h: Likewise.
1406         * elfxx-ia64.c: Likewise.
1407         * ieee.c: Likewise.
1408         * ihex.c: Likewise.
1409         * libbfd.c: Likewise.
1410         * pdp11.c: Likewise.
1411         * pe-mips.c: Likewise.
1412         * peicode.h: Likewise.
1413         * srec.c: Likewise.
1414         * xcofflink.c: Likewise.
1416         * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1418         * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1419         error message.
1421         * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1422         error message.
1424         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1425         Consolidate error messages, and split long messages to two lines.
1427 2001-09-20  John Reiser  <jreiser@BitWagon.com>
1429         * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1430         and info->allow_shlib_undefined.
1431         * elf32-cris.c: Likewise.
1432         * elf32-hppa.c: Likewise.
1433         * elf32-m68k.c: Likewise.
1434         * elf32-mips.c: Likewise.
1435         * elf32-ppc.c: Likewise.
1436         * elf32-s390.c: Likewise.
1437         * elf32-sh.c: Likewise.
1438         * elf32-sparc.c: Likewise.
1439         * elf64-alpha.c: Likewise.
1440         * elf64-hppa.c: Likewise.
1441         * elf64-ppc.c: Likewise.
1442         * elf64-s390.c: Likewise.
1443         * elf64-sparc.c: Likewise.
1444         * elf64-x86-64.c: Likewise.
1445         * elfxx-ia64.c: Likewise.
1447 2001-09-18  Bruno Haible  <haible@clisp.cons.org>
1449         * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1450         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1451         * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1452         (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1453         * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1454         (bfd_default_scan): Use ISDIGIT instead of isdigit.
1455         * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1456         (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1457         isxdigit/isdigit/islower.
1458         * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1459         (mangle_name): Use ISALNUM instead of isalnum.
1460         * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1461         (scan): Use ISDIGIT instead of isdigit.
1462         * hosts/alphavms.h: Don't include <ctype.h>.
1463         * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1464         (ieee_object_p): Use TOUPPER instead of toupper.
1465         * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1466         (ihex_bad_byte): Use ISPRINT instead of isprint.
1467         * merge.c: Don't include <ctype.h>.
1468         * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1469         (oasys_write_sections): Use ISDIGIT instead of isdigit.
1470         * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1471         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1472         * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1473         (mangle_name): Use ISALNUM instead of isalnum.
1474         * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1475         (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1476         isupper/islower/isdigit.
1477         (som_decode_symclass): Use TOUPPER instead of toupper.
1478         * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1479         (srec_bad_byte): Use ISPRINT instead of isprint.
1480         (srec_scan): Use ISSPACE instead of isspace.
1481         * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1482         (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1483         * syms.c: Include "safe-ctype.h"
1484         (islower, toupper): Remove macro definitions.
1485         (bfd_decode_symclass): Use TOUPPER instead of toupper.
1486         * vms-gsd.c: Don't include <ctype.h>.
1487         * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1488         (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1489         islower/toupper.
1490         * vms-tir.c: Don't include <ctype.h>.
1492 2001-09-18  Alan Modra  <amodra@bigpond.net.au>
1494         * libbfd.c (bfd_bread): New function replacing bfd_read without
1495         redundant params.  Allow reads up to (size_t) -2 in length.
1496         (bfd_bwrite): Similarly for bfd_write.
1497         (real_read): Return a size_t.
1498         (bfd_read): Call bfd_bread.
1499         (bfd_write): Call bfd_bwrite.
1500         (warn_deprecated): New function to annoy everybody.
1501         (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1502         * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1503         (bfd_read, bfd_write): Define as macro.
1504         * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1505         likewise for bfd_write.  Ensure function args are correct size by
1506         using casts or local vars.  In some cases, remove unnecessary
1507         casts.  Formatting fixes, in some cases removing a large expression
1508         from function args by using a local var.  Replace CONST with const.
1509         Modify variable types to avoid warings.  Use casts to avoid
1510         warnings when using negative numbers in unsigned expressions.
1511         * aout-adobe.c: Likewise.
1512         * aout-arm.c: Likewise.
1513         * aout-cris.c: Likewise.
1514         * aout-encap.c: Likewise.
1515         * aout-ns32k.c: Likewise.
1516         * aout-target.h: Likewise.
1517         * aout-tic30.c: Likewise.
1518         * aoutf1.h: Likewise.
1519         * aoutx.h: Likewise.
1520         * archive.c: Likewise.
1521         * archures.c: Likewise.
1522         * bfd-in.h: Likewise.
1523         * bfd.c: Likewise.
1524         * binary.c: Likewise.
1525         * bout.c: Likewise.
1526         * cache.c: Likewise.
1527         * cisco-core.c: Likewise.
1528         * coff-a29k.c: Likewise.
1529         * coff-alpha.c: Likewise.
1530         * coff-arm.c: Likewise.
1531         * coff-h8300.c: Likewise.
1532         * coff-h8500.c: Likewise.
1533         * coff-i386.c: Likewise.
1534         * coff-i860.c: Likewise.
1535         * coff-i960.c: Likewise.
1536         * coff-ia64.c: Likewise.
1537         * coff-m68k.c: Likewise.
1538         * coff-m88k.c: Likewise.
1539         * coff-mcore.c: Likewise.
1540         * coff-mips.c: Likewise.
1541         * coff-ppc.c: Likewise.
1542         * coff-rs6000.c: Likewise.
1543         * coff-sh.c: Likewise.
1544         * coff-sparc.c: Likewise.
1545         * coff-stgo32.c: Likewise.
1546         * coff-tic30.c: Likewise.
1547         * coff-tic54x.c: Likewise.
1548         * coff-tic80.c: Likewise.
1549         * coff-w65.c: Likewise.
1550         * coff-z8k.c: Likewise.
1551         * coff64-rs6000.c: Likewise.
1552         * coffcode.h: Likewise.
1553         * coffgen.c: Likewise.
1554         * cofflink.c: Likewise.
1555         * coffswap.h: Likewise.
1556         * corefile.c: Likewise.
1557         * cpu-arc.c: Likewise.
1558         * cpu-h8300.c: Likewise.
1559         * cpu-h8500.c: Likewise.
1560         * cpu-i960.c: Likewise.
1561         * cpu-ia64-opc.c: Likewise.
1562         * cpu-ns32k.c: Likewise.
1563         * cpu-pdp11.c: Likewise.
1564         * cpu-pj.c: Likewise.
1565         * cpu-sh.c: Likewise.
1566         * cpu-w65.c: Likewise.
1567         * cpu-z8k.c: Likewise.
1568         * dwarf1.c: Likewise.
1569         * dwarf2.c: Likewise.
1570         * ecoff.c: Likewise.
1571         * ecofflink.c: Likewise.
1572         * ecoffswap.h: Likewise.
1573         * elf-bfd.h: Likewise.
1574         * elf-hppa.h: Likewise.
1575         * elf-m10200.c: Likewise.
1576         * elf-m10300.c: Likewise.
1577         * elf.c: Likewise.
1578         * elf32-arc.c: Likewise.
1579         * elf32-arm.h: Likewise.
1580         * elf32-avr.c: Likewise.
1581         * elf32-cris.c: Likewise.
1582         * elf32-fr30.c: Likewise.
1583         * elf32-gen.c: Likewise.
1584         * elf32-h8300.c: Likewise.
1585         * elf32-hppa.c: Likewise.
1586         * elf32-i370.c: Likewise.
1587         * elf32-i386.c: Likewise.
1588         * elf32-i860.c: Likewise.
1589         * elf32-m32r.c: Likewise.
1590         * elf32-m68k.c: Likewise.
1591         * elf32-mcore.c: Likewise.
1592         * elf32-mips.c: Likewise.
1593         * elf32-openrisc.c: Likewise.
1594         * elf32-pj.c: Likewise.
1595         * elf32-ppc.c: Likewise.
1596         * elf32-s390.c: Likewise.
1597         * elf32-sh-lin.c: Likewise.
1598         * elf32-sh.c: Likewise.
1599         * elf32-sparc.c: Likewise.
1600         * elf32-v850.c: Likewise.
1601         * elf64-alpha.c: Likewise.
1602         * elf64-hppa.c: Likewise.
1603         * elf64-mips.c: Likewise.
1604         * elf64-ppc.c: Likewise.
1605         * elf64-s390.c: Likewise.
1606         * elf64-sparc.c: Likewise.
1607         * elf64-x86-64.c: Likewise.
1608         * elfarm-nabi.c: Likewise.
1609         * elfcode.h: Likewise.
1610         * elfcore.h: Likewise.
1611         * elflink.c: Likewise.
1612         * elflink.h: Likewise.
1613         * elfxx-ia64.c: Likewise.
1614         * elfxx-target.h: Likewise.
1615         * format.c: Likewise.
1616         * hash.c: Likewise.
1617         * hp300hpux.c: Likewise.
1618         * hppabsd-core.c: Likewise.
1619         * hpux-core.c: Likewise.
1620         * i386aout.c: Likewise.
1621         * i386dynix.c: Likewise.
1622         * i386linux.c: Likewise.
1623         * i386lynx.c: Likewise.
1624         * i386mach3.c: Likewise.
1625         * i386msdos.c: Likewise.
1626         * i386os9k.c: Likewise.
1627         * ieee.c: Likewise.
1628         * ihex.c: Likewise.
1629         * irix-core.c: Likewise.
1630         * libaout.h: Likewise.
1631         * libbfd-in.h: Likewise.
1632         * libbfd.c: Likewise.
1633         * libcoff-in.h: Likewise.
1634         * libecoff.h: Likewise.
1635         * libieee.h: Likewise.
1636         * libnlm.h: Likewise.
1637         * libpei.h: Likewise.
1638         * libxcoff.h: Likewise.
1639         * linker.c: Likewise.
1640         * lynx-core.c: Likewise.
1641         * m68klinux.c: Likewise.
1642         * merge.c: Likewise.
1643         * mipsbsd.c: Likewise.
1644         * netbsd-core.c: Likewise.
1645         * nlm.c: Likewise.
1646         * nlm32-alpha.c: Likewise.
1647         * nlm32-i386.c: Likewise.
1648         * nlm32-ppc.c: Likewise.
1649         * nlm32-sparc.c: Likewise.
1650         * nlmcode.h: Likewise.
1651         * nlmswap.h: Likewise.
1652         * ns32k.h: Likewise.
1653         * oasys.c: Likewise.
1654         * opncls.c: Likewise.
1655         * osf-core.c: Likewise.
1656         * pc532-mach.c: Likewise.
1657         * pdp11.c: Likewise.
1658         * pe-mips.c: Likewise.
1659         * peXXigen.c: Likewise.
1660         * peicode.h: Likewise.
1661         * ppcboot.c: Likewise.
1662         * ptrace-core.c: Likewise.
1663         * reloc.c: Likewise.
1664         * reloc16.c: Likewise.
1665         * riscix.c: Likewise.
1666         * rs6000-core.c: Likewise.
1667         * sco5-core.c: Likewise.
1668         * section.c: Likewise.
1669         * som.c: Likewise.
1670         * sparclinux.c: Likewise.
1671         * sparclynx.c: Likewise.
1672         * srec.c: Likewise.
1673         * stabs.c: Likewise.
1674         * sunos.c: Likewise.
1675         * syms.c: Likewise.
1676         * targets.c: Likewise.
1677         * tekhex.c: Likewise.
1678         * trad-core.c: Likewise.
1679         * versados.c: Likewise.
1680         * vms-gsd.c: Likewise.
1681         * vms-hdr.c: Likewise.
1682         * vms-misc.c: Likewise.
1683         * vms-tir.c: Likewise.
1684         * vms.c: Likewise.
1685         * vms.h: Likewise.
1686         * xcofflink.c: Likewise.
1687         * bfd-in2.h: Regenerate.
1688         * libbfd.h: Regenerate.
1689         * libcoff.h: Regenerate.
1691         * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1692         * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1693         (ufile_ptr): Define.
1694         (bfd_tell): Return a ufile_ptr.
1695         * libbfd.c (bfd_tell): Likewise.
1696         (bfd_seek): Use bfd_size_type locals.  Don't call bfd_set_error
1697         unnecessarily.
1698         * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1699         * aoutf1.h: Likewise.
1700         * som.c: Likewise.
1701         * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1702         larger than unsigned long can represent.
1704         * libbfd.c (bfd_malloc): Take a bfd_size_type arg.  Error if
1705         size overflows size_t.
1706         (bfd_realloc): Likewise.
1707         (bfd_zmalloc): Likewise.
1708         * opncls.c (bfd_alloc): Likewise.
1709         (bfd_zalloc): Likewise.
1710         * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1711         (bfd_alloc, bfd_zalloc): Update.
1713         * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1714         8 bits.
1715         (bfd_get_signed_8): Likewise.
1716         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1717         H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1718         H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1719         H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1720         * libaout.h: Likewise define and use here.
1721         * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1722         * aout-arm.c: Likewise.
1723         * aout-encap.c: Likewise.
1724         * aout-ns32k.c: Likewise.
1725         * aout-tic30.c: Likewise.
1726         * aoutf1.h: Likewise.
1727         * aoutx.h: Likewise.
1728         * bout.c: Likewise.
1729         * coff-alpha.c: Likewise.
1730         * coff-h8300.c: Likewise.
1731         * coff-h8500.c: Likewise.
1732         * coff-i960.c: Likewise.
1733         * coff-ia64.c: Likewise.
1734         * coff-m88k.c: Likewise.
1735         * coff-mips.c: Likewise.
1736         * coff-ppc.c: Likewise.
1737         * coff-rs6000.c: Likewise.
1738         * coff-sh.c: Likewise.
1739         * coff-sparc.c: Likewise.
1740         * coff-stgo32.c: Likewise.
1741         * coff-tic30.c: Likewise.
1742         * coff-tic80.c: Likewise.
1743         * coff-w65.c: Likewise.
1744         * coff-z8k.c: Likewise.
1745         * coff64-rs6000.c: Likewise.
1746         * coffgen.c: Likewise.
1747         * cofflink.c: Likewise.
1748         * coffswap.h: Likewise.
1749         * ecoff.c: Likewise.
1750         * ecoffswap.h: Likewise.
1751         * elf.c: Likewise.
1752         * elf32-mips.c: Likewise.
1753         * elf64-mips.c: Likewise.
1754         * hp300hpux.c: Likewise.
1755         * i386dynix.c: Likewise.
1756         * i386lynx.c: Likewise.
1757         * i386msdos.c: Likewise.
1758         * i386os9k.c: Likewise.
1759         * libpei.h: Likewise.
1760         * nlm32-alpha.c: Likewise.
1761         * nlm32-i386.c: Likewise.
1762         * nlm32-ppc.c: Likewise.
1763         * nlmcode.h: Likewise.
1764         * nlmswap.h: Likewise.
1765         * oasys.c: Likewise.
1766         * pdp11.c: Likewise.
1767         * pe-mips.c: Likewise.
1768         * peXXigen.c: Likewise.
1769         * peicode.h: Likewise.
1770         * riscix.c: Likewise.
1771         * sunos.c: Likewise.
1772         * xcofflink.c: Likewise.
1773         * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1774         Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1775         * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1776         equivalent H_PUT_* macro instead.
1777         (GETWORD, GETHALF, GETBYTE): Similarly.
1778         * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1779         (GETWORD, GETHALF, GETBYTE): Likewise.
1780         * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1782         * bfd-in.h (struct orl): Change "pos" to a union.
1783         * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1784         (bsd_write_armap): Here too.
1785         (coff_write_armap): And here.
1786         * coff-rs6000.c (xcoff_write_armap_old): And here.
1787         (xcoff_write_one_armap_big): And here.
1788         (xcoff_write_armap_big): And here.
1789         * ecoff.c (_bfd_ecoff_write_armap): And here.
1790         * elf64-mips.c (mips_elf64_write_armap): And here.
1792         * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1793         * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1794         * elf32-h8300.c (elf32_h8_mach): Likewise.
1795         * elf32-mips.c (elf_mips_mach): Likewise.
1796         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1798         * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1799         calls.
1800         (aix386_core_vec): Typo fix.
1802         * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1803         etc. to avoid redefined macro warning.
1804         (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1805         (MY(fix_pcrel_26)): Likewise.
1806         * aout-ns32k.c (MY(put_reloc)): Likewise.
1807         * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1808         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1809         * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1811         * aout-encap.c: Include "file", not <file> for binutils headers.
1812         (encap_object_p): Half baked attempt to fix compile errors in
1813         code dealing with "magic".
1815         * aout-ns32k.c: Include "file", not <file> for binutils headers.
1816         (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1817         bfd_vma's rather than longs.
1818         * cpu-ns32k.c (ns32k_sign_extend): Delete.
1819         (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1820         (_bfd_ns32k_get_immediate): Likewise.  Add code for 8 byte values,
1821         remove case 3.
1822         (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1823         Use unsigned comparisons.
1824         (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1825         (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1826         (_bfd_do_ns32k_reloc_contents): Likewise.
1827         * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1828         (_bfd_ns32k_get_immediate): Likewise.
1829         (_bfd_ns32k_put_displacement): Likewise.
1830         (_bfd_ns32k_put_immediate): Likewise.
1831         (bfd_reloc_status_type): Likewise.
1833         * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1834         to avoid shadowing.
1835         * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1836         * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1837         * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1838         avoid shadowing.
1839         (record_toc): Use a bfd_signed_vma for our_toc_offset.
1840         * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1841         * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1842         shadow warning.
1843         (_bfd_elfcore_strndup): Likewise for "dup".
1844         * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1845         "name" to avoid shadowing.
1846         * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1847         definition of "off".
1848         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1849         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1850         definition of "s".
1851         (_bfd_mips_elf_final_link): Rename "i" to "j".  Remove duplicate
1852         "secpp".
1853         * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1854         to avoid shadowing.
1855         * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1856         to avoid shadowing.
1857         (elf_link_input_bfd): Likewise.
1858         (elf_bfd_final_link): Remove duplicate innermost "off" var.
1859         * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1860         * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1861         "input_section".
1862         * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1863         * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1864         (sunos_write_dynamic_symbol): Remove unused vars.
1865         * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1866         innermost "directory_name" and "file_name" vars.
1867         * tekhex.c (first_phase): Rename local var "type" to "stype".
1868         (tekhex_write_object_contents): Rename innermost "s" to "sym".
1869         * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1870         doing comparison at caller.
1871         (vms_esecflag_by_name): Likewise.
1872         * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1873         * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1874         (xcoff_write_global_symbol): Rename "p" param to "inf".
1876         * cisco-core.c: Add missing prototypes.
1877         (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1878         (cisco_core_file_failing_signal): Likewise.
1879         (cisco_core_file_matches_executable_p): Likewise.
1880         * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1881         * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1882         * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1883         * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1885         * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1886         thumb_glue_size and arm_glue_size.
1887         * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1889         * coff64-rs6000.c: Group prototypes together.
1891         * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1892         (buy_and_read): Remove "seek" param.  Change "size" to bfd_size_type.
1894         * cpu-arc.c: Add missing prototypes.
1895         * cpu-h8500.c: Likewise.
1896         * cpu-i960.c: Likewise.
1897         * cpu-pj.c: Likewise.
1898         * cpu-sh.c: Likewise.
1899         * cpu-w65.c: Likewise.
1900         * cpu-z8k.c: Likewise.
1901         * elf32-fr30.c: Likewise.
1902         * elf32-h8300.c: Likewise.
1903         * elf32-i370.c: Likewise.
1904         * hpux-core.c: Likewise.
1905         * versados.c: Likewise.
1907         * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1908         * cpu-h8500.c: Likewise.
1909         * cpu-i960.c: Likewise.
1910         * cpu-z8k.c: Likewise.
1912         * cpu-ia64-opc.c: Correct comment.
1914         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1916         * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1917         to unsigned.
1918         (bfd_elf32_write_out_phdrs): Likewise.
1919         (bfd_elf64_write_out_phdrs): Likewise.
1920         (elf_linker_section_pointers): Change addend to bfd_vma.
1921         (_bfd_elf_find_pointer_linker_section): Likewise.
1922         (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1923         filepos to unsigned file_ptr.
1924         (_bfd_elfcore_strndup): Change max param to size_t.
1925         * elf.c (_bfd_elfcore_make_pseudosection): As above.
1926         (_bfd_elfcore_strndup): Likewise.
1927         (_bfd_elf_find_pointer_linker_section): Likewise.
1929         * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1930         insn and sym_value to ints.
1932         * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1933         bfd_size_type.
1934         (elfcore_read_notes): Likewise.
1936         * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1937         param from unsigned char to int.
1938         (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1939         for info_to_howto call.
1940         (add_dynamic_entry): Define macro.
1941         (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1943         * elf32-cris.c (add_dynamic_entry): Define macro.
1944         (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1946         * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1947         (elf32_h8_object_p): Likewise.
1948         (elf32_h8_merge_private_bfd_data): Likewise.
1949         (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1951         * elf32-hppa.c (add_dynamic_entry): Define macro.
1952         (elf32_hppa_size_dynamic_sections): Use it.
1953         * elf32-i370.c (add_dynamic_entry): Define macro.
1954         (i370_elf_size_dynamic_sections): Use it.
1955         (i370_noop): Make static.
1956         * elf32-i386.c (add_dynamic_entry): Define macro.
1957         (elf_i386_size_dynamic_sections): Use it.
1958         * elf32-m68k.c (add_dynamic_entry): Define macro.
1959         (elf_m68k_size_dynamic_sections): Use it.
1960         * elf32-ppc.c (add_dynamic_entry): Define macro.
1961         (ppc_elf_size_dynamic_sections): Use it.
1962         * elf32-s390.c (add_dynamic_entry): Define macro.
1963         (elf_s390_size_dynamic_sections): Use it.
1964         * elf64-alpha.c (add_dynamic_entry): Define macro.
1965         (elf64_alpha_size_dynamic_sections): Use it.
1966         * elf64-hppa.c (add_dynamic_entry): Define macro.
1967         (elf64_hppa_size_dynamic_sections): Use it.
1968         * elf64-ppc.c (add_dynamic_entry): Define macro.
1969         (ppc64_elf_size_dynamic_sections): Use it.
1970         * elf64-s390.c (add_dynamic_entry): Define macro.
1971         (elf_s390_size_dynamic_sections): Use it.
1972         * elf64-sparc.c (add_dynamic_entry): Define macro.
1973         (sparc64_elf_size_dynamic_sections): Use it.
1974         * elf64-x86-64.c (add_dynamic_entry): Define macro.
1975         (elf64_x86_64_size_dynamic_sections): Use it.
1976         * elfxx-ia64.c (add_dynamic_entry): Define macro.
1977         (elfNN_ia64_size_dynamic_sections): Use it.
1979         * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1980         (v850_elf_perform_relocation): Make "r_type" param unsigned.
1982         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1983         false if the first malloc fails rather than going via error_return.
1985         * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1986         "index" param.
1987         (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1989         * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1991         * elfxx-ia64.c (global_sym_index): Return a long.
1993         * ieee.c (get_symbol): Use int rather than char param.
1994         (ieee_slurp_sections): Move "section" var to inner blocks.
1995         (copy_expression): Don't init "value" to zero or worry about
1996         clearing to zero after using.
1997         (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1998         shadowing.
2000         * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2001         unsigned int.
2003         * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2004         (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2006         * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2008         * pc532-mach.c (MYNSX): Delete.
2009         (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2010         (write_object_contents): Correct prototype.
2012         * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2013         than unsigned short.
2015         * section.c (bfd_set_section_contents): Remove redundant
2016         "offset < 0" test.  Check that "count" doesn't overflow size_t.
2017         (bfd_get_section_contents): Likewise.
2019         * som.c (som_fixup_formats): Add missing braces.
2020         (som_reloc_addend): Pass a bfd_vma for "addend".
2022         * srec.c (srec_write_record): Pass "type" as an unsigned int.
2023         (srec_write_symbols): Remove an unnecessary var.
2025         * targets.c (_bfd_target_vector): Sort entries.  Sort externs
2026         to match.
2027         * configure.in: Sort to match.  Bump version number.
2028         * configure: Regenerate.
2030         * tekhex.c (move_section_contents): Assert offset == 0.
2032         * versados.c (new_symbol_string): Constify arg.
2033         (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2034         (versados_get_symbol_info): Make static.
2035         (versados_print_symbol): Likewise.
2036         (versados_get_reloc_upper_bound): Likewise.
2037         (versados_canonicalize_reloc): Likewise.
2039 2001-09-18  Nick Clifton  <nickc@cambridge.redhat.com>
2041         * elflink.h (elf_link_input_bfd): Fix typo in error message.
2043 2001-09-17  H.J. Lu  <hjl@gnu.org>
2045         * dwarf1.c (parse_die): Take a new arg for the end of the
2046         section. Return false if die is beyond the section.
2047         (parse_functions_in_unit): Pass the end of the section to
2048         parse_die ().
2049         (_bfd_dwarf1_find_nearest_line): Likewise.
2051 2001-09-14  Michael Rauch <mrauch@netbsd.org>
2053         * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2054         just like R_SPARC_32.
2056 2001-09-14  Kevin Lo <kevlo@openbsd.org>
2058         * configure.bfd: Add arm-openbsd target.
2060 2001-09-14  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2062         * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2063         Add support for mips64.
2065 2001-09-13  Alexandre Oliva  <aoliva@redhat.com>
2067         * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2069 2001-09-12  Alexandre Oliva  <aoliva@redhat.com>
2071         * elf.c (prep_headers): Get the machine code from the elf
2072         backend data.
2073         * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2074         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2075         * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2076         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2077         * elf-arc.c (arc_elf_final_write_processing): Don't override
2078         e_machine, it's now properly set in prep_headers.
2079         * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2080         EM_AVR_OLD.
2081         (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2082         * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2083         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2084         * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2085         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2086         * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2087         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2088         * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2089         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2090         * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2091         * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2092         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2094 2001-09-11  Richard Henderson  <rth@redhat.com>
2096         * elf64-alpha.c (elf64_alpha_section_flags): New.
2097         (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2099 2001-09-11  Richard Henderson  <rth@redhat.com>
2101         * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2102         apply HINT relocations against dynamic symbols.
2104 2001-09-11  H.J. Lu  <hjl@gnu.org>
2106         * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2108 2001-09-09  Richard Henderson  <rth@redhat.com>
2110         * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2112         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2113         following a call to a near function.
2115 2001-09-08  Richard Henderson  <rth@redhat.com>
2117         * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2118         relocation errors.  Fail gp-relative relocations against
2119         dynamic symbols.
2121 2001-09-08  Alan Modra  <amodra@bigpond.net.au>
2123         * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2124         as well as DEF_DYNAMIC in test for avoided copy relocs.
2125         (allocate_plt_and_got_and_discard_relocs): Likewise.
2126         * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2127         (allocate_plt_and_got_and_discard_relocs): Likewise.
2129 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2131         * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2132         of R_MIPS_PC16.
2134 2001-09-06  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2136         * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2137         definitions.
2138         (mips_elf64_howto_table_rel): Likewise.
2140 2001-09-05  Tom Rix <trix@redhat.com>
2142         * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2143         and syscall symbols.
2144         (write_global_symbol) : Same.
2145         (bfd_xcoff_export_symbol): Remove unused syscall param.
2146         * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2147         bfd_xcoff_import_symbol.
2148         * bfd-in.h: Same.
2149         * bfd-in2.h : Regenerate.
2151 2001-09-04  Richard Henderson  <rth@redhat.com>
2153         * elf64-alpha.c (SKIP_HOWTO): New.
2154         (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2155         Fix sizes of 16-bit mem format relocs.
2156         (elf64_alpha_reloc_map): Update to match.
2157         (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2158         (elf64_alpha_relax_without_lituse): Likewise.
2159         (elf64_alpha_check_relocs): Handle GPREL16.
2160         (elf64_alpha_relocate_section): Likewise.
2161         * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2162         (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2163         * bfd-in2.h, libbfd.h: Rebuild.
2165 2001-09-04  Jeff Law <law@redhat.com>
2167         * elf32-h8300.c (elf32_h8_relax_section): New function.
2168         (elf32_h8_relax_delete_bytes): Likewise.
2169         (elf32_h8_symbol_address_p): Likewise.
2170         (elf32_h8_get_relocated_section_contents): Likewise.
2171         (bfd_elf32_bfd_relax_section): Define.
2172         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2174         * elf32-h8300.c (special): New function.
2175         (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2176         all relocations.
2177         (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2178         relocations.  Fix problems with the true 24bit reloc R_H8_DIR24R8.
2179         Fix minor problems with 8bit and 16bit PC relative relocations.
2181 2001-09-01  Andreas Jaeger  <aj@suse.de>
2183         * vms-tir.c: Add missing prototypes.
2184         * vms-hdr.c: Likewise.
2185         * vms-gsd.c: Likewise.
2186         * vms-misc.c: Likewise.
2188 2001-08-31  H.J. Lu  <hjl@gnu.org>
2190         * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2191         with bad relocation.
2193 2001-08-31  Eric Christopher  <echristo@redhat.com>
2194             Jason Eckhardt  <jle@redhat.com>
2196         * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2197         mips32_4k and mips64.
2198         * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2199         bfd_mach_mips64.  Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2200         * bfd/cpu-mips.c: Ditto.
2201         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2202         * bfd/bfd-in2.h: Regenerate.
2204 2001-08-31  Jakub Jelinek  <jakub@redhat.com>
2206         * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2207         value into R_ALPHA_RELATIVE's addend.
2208         (elf64_alpha_finish_dynamic_symbol): Likewise.
2210 2001-08-31  Nick Clifton  <nickc@cambridge.redhat.com>
2212         * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2213         recomputed addend during relocatable link if not USE_REL.
2215         * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2216         error.
2218 2001-08-30  H.J. Lu  <hjl@gnu.org>
2220         * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2221         2 changes.
2222         (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2223         relocations for weak definitions.
2225 2001-08-30  H.J. Lu  <hjl@gnu.org>
2227         * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2228         (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2229         * Makefile.in: Rebuild.
2231 2001-08-30  H.J. Lu  <hjl@gnu.org>
2233         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2234         dynamic relocation for undefined weak symbols when creating
2235         executables. Check h->root.root.type, instead of h->root.type.
2237 2001-08-29  Joel Sherrill <joel@OARcorp.com>
2239         * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2240         default from coff to elf.
2242 2001-08-29  Jeff Law <law@redhat.com>
2244         * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2245         relocations.
2246         (h8_reloc_map): Similarly.
2247         (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2248         Add support for PC relative relocations.
2250         * elf32-h8300.c: Put all prototypes together.
2251         (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2252         (elf32_h8_final_link_relocate): New function for linker.
2253         (elf32_h8_relocate_section): Similarly.
2254         (elf_backend_relocate_section): Define.
2256         * cpu-h8300.c (h8300_scan, compatible): Prototype.
2257         (h8300_scan): Handle architecture:machine encodings typically
2258         found in linker scripts.
2259         * elf.c (prep_headers): Do not try to do H8 machine recognition
2260         here.
2261         * elf32-h8300.c:  Add some missing prototypes.
2262         (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2263         (elf32_h8_object_p): Similarly.
2265 2001-08-29  Tom Rix <trix@redhat.com>
2267         * xcofflink.c (xcoff_link_add_symbols):  Fix XTY_LD symbol that
2268         does not follow a XTY_SD.
2270 2001-08-29  Alan Modra  <amodra@bigpond.net.au>
2272         * targmatch.sed: Delete case statements.
2273         * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2274         aix4.3 and above.
2276 Wed Aug 29 02:27:36 2001  J"orn Rennecke <amylaar@redhat.com>
2278         * Makefile.am (elf32-h8300.lo): New target.
2279         * config.bfd (h8300*-*-elf): New case.
2280         * configure.in (bfd_elf32_h8300_vec): New case.
2281         * elf.c (prep_headers): Add case for bfd_arch_h8300.
2282         * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2283         (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2284         (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2285         * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2286         * elf32-h8300.c: New file.
2287         * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2289 2001-08-28  Nick Clifton  <nickc@cambridge.redhat.com>
2291         * sparclynx.c: Add missing prototypes.
2292         * coff-mcore.c: Add missing prototypes.
2293         * elf32-pj.c: Add missing prototypes.
2294         * nlm32-sparc.c: Add missing prototypes.
2295         * oasys.c: Add missing prototypes.
2296         * pdp11.c: Add missing prototypes.
2297         * pe-mips.c: Add missing prototypes.
2298         * riscix.c: Add missing prototypes.
2300 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2302         * elf32-i386.c: Add missing prototypes.
2303         * elf32-ppc.c: Likewise.
2304         * elf32-sh-lin.c: Likewise.
2305         * elfarm-nabi.c: Likewise.
2307 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2309         * elf32-i386.c (elf_i386_grok_prstatus): New function.
2310         (elf_i386_grok_psinfo): New function.
2311         (elf_backend_grok_prstatus): Define.
2312         (elf_backend_grok_psinfo): Likewise.
2313         * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2314         (ppc_elf_grok_psinfo): New function.
2315         (elf_backend_grok_prstatus): Define.
2316         (elf_backend_grok_psinfo): Likewise.
2317         * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2318         (elf32_shlin_grok_psinfo): New function.
2319         (elf_backend_grok_prstatus): Define.
2320         (elf_backend_grok_psinfo): Likewise.
2321         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2322         (elf32_arm_nabi_grok_psinfo): New function.
2323         (elf_backend_grok_prstatus): Define.
2324         (elf_backend_grok_psinfo): Likewise.
2326 2001-08-27  H.J. Lu  <hjl@gnu.org>
2328         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2329         sanity check.
2330         (mips_elf_calculate_relocation): Create dynamic relocation for
2331         symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2332         bit is not set.
2334 2001-08-27  H.J. Lu  <hjl@gnu.org>
2336         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2337         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2338         (_bfd_elf32_mips_grok_prstatus): Likewise.
2339         (_bfd_elf32_mips_grok_psinfo): Likewise.
2340         (_bfd_mips_elf_hide_symbol): Make it static and cast to
2341         `struct mips_elf_link_hash_entry *'.
2342         (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2344 2001-08-27  Nick Clifton  <nickc@cambridge.redhat.com>
2346         * mipsbsd.c: Add missing prototypes.
2347         * hp300hpux.c: Add missing prototypes.
2348         * i386aout.c: Add missing prototypes.
2349         * i386lynx.c: Add missing prototypes.
2350         * i386mach3.c: Add missing prototypes.
2351         * i386msdos.c: Add missing prototypes.
2352         * i386os9k.c: Add missing prototypes.
2354 2001-08-27  Linus Nordberg  <linus@swox.se>
2355             Torbjorn Granlund  <tege@swox.com>
2356             Staffan Ulfberg  <staffanu@swox.se>
2357             Alan Modra  <amodra@bigpond.net.au>
2359         * config.bfd: Add powerpc64 target.  Add powerpc64 vectors to
2360         targ64_selvecs for 32 bit powerpc targets.
2361         * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2362         (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2363         Run "make dep-am".
2364         * Makefile.in: Regenerate.
2365         * configure.in: Add elf64_powerpc vecs.
2366         * configure: Regenerate.
2367         * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2368         * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2369         * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2370         * elf64-ppc.c: New file.
2371         * reloc.c: Add powerpc64 relocs.
2372         * libbfd.h: Regenerate.
2373         * bfd-in2.h: Regenerate.
2375 2001-08-27  Andreas Schwab  <schwab@suse.de>
2377         * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2378         reloc is against read-only section.
2379         (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2380         looking up section names for DT_TEXTREL.
2381         (elf32_m68k_reloc_type_class): New function.
2382         (elf_backend_reloc_type_class): Define.
2384 2001-08-27  Andreas Jaeger  <aj@suse.de>
2386         * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2387         reloc is against read-only section.
2388         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2389         looking up section names for DT_TEXTREL.
2390         (elf_s390_reloc_type_class): New.
2391         (elf_backend_reloc_type_class): Define.
2393         * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2394         reloc is against read-only section.
2395         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2396         looking up section names for DT_TEXTREL.
2397         (elf_s390_reloc_type_class): New.
2398         (elf_backend_reloc_type_class): Define.
2400         * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2401         is against read-only section.
2402         (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2403         looking up section names for DT_TEXTREL.
2404         (ppc_elf_reloc_type_class): New.
2405         (elf_backend_reloc_type_class): Define.
2407 2001-08-26  Andreas Jaeger  <aj@suse.de>
2409         * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2410         reloc is against read-only section.
2411         (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2412         looking up section names for DT_TEXTREL.
2413         (elf_cris_reloc_type_class): New.
2414         (elf_backend_reloc_type_class): Define.
2416         * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2417         against read-only section.
2418         (elf_backend_reloc_type_class): Define.
2419         (sh_elf_reloc_type_class): New.
2420         (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2421         looking up section names for DT_TEXTREL.
2423         * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2424         reloc is against read-only section.
2425         (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2426         looking up section names for DT_TEXTREL.
2427         (elf32_arm_reloc_type_class): New.
2428         (elf_backend_reloc_type_class): Define.
2430 2001-08-25  Andreas Jaeger  <aj@suse.de>
2432         * oasys.c: Add missing prototypes.
2434         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2435         attribute for parameter.
2436         * elf.c (_bfd_elf_reloc_type_class): Likewise.
2438         * versados.c (get_4): Make static.
2439         (get_10): Make static.
2440         Add missing prototypes.
2441         (process_esd): Fix call to versados_new_symbol.
2443 2001-08-25  Nick Clifton  <nickc@cambridge.redhat.com>
2445         * coff-a29k.c: Add missing prototypes.
2446         * coff-apollo.c: Add missing prototypes.
2447         * coff-arm.c: Add missing prototypes.
2448         * coff-i860.c: Add missing prototypes.
2449         * coff-rs6000.c: Add missing prototypes.
2450         * coff-tic80.c: Add missing prototypes.
2451         * elf-m10200.c: Add missing prototypes.
2452         * elf-m10300.c: Add missing prototypes.
2453         * elf32-arm.h: Add missing prototypes.
2454         * elf32-d10v.c: Add missing prototypes.
2455         * elf32-m32r.c: Add missing prototypes.
2456         * elf32-mcore.c: Add missing prototypes.
2457         * elf32-openrisc.c: Add missing prototypes.
2458         * elf32-sh.c: Add missing prototypes.
2459         * elf32-sparc.c: Add missing prototypes.
2460         * elf32-v850.c: Add missing prototypes.
2461         * elfarm-nabi.c: Add missing prototypes.
2462         * elfarm-oabi.c: Add missing prototypes.
2464 2001-08-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2466         * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2467         E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2469 2001-08-24  H.J. Lu  <hjl@gnu.org>
2471         * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2472         hash structure.
2474 2001-08-24  Nick Clifton  <nickc@cambridge.redhat.com>
2476         * elf-bfd.h (elf_hash_table): Revert definition.
2477         (is_elf_hash_table): New macro.
2478         * elflink.h (elf_link_add_object_symbols): Test
2479         is_elf_hash_table before accessing ELF only fields in hash
2480         structure.
2481         (elf_link_create_dynamic_sections): Fail if not using an ELF
2482         hash structure.
2483         (elf_add_dynamic_entry): Fail if not using an ELF hash
2484         structure.
2485         (elf_link_record_local_dynamic_symbol): Fail if not using an
2486         ELF hash structure.
2487         (size_dynamic_sections): Fail if not using an ELF hash
2488         structure.
2489         (elf_adjust_dynamic_symbol): Fail if not using an ELF
2490         hash structure.
2491         (elf_bfd_final_link): Fail if not using an ELF hash
2492         structure.
2494 2001-08-24  H.J. Lu  <hjl@gnu.org>
2496         * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2497         table is not an ELF linker hash table.
2499         * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2500         table type to bfd_link_elf_hash_table.
2502         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2503         the last change.
2505         * linker.c (_bfd_link_hash_table_init): Set the linker hash
2506         table type to bfd_link_generic_hash_table.
2508 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
2510         * bfd.c (bfd_alt_mach_code): New function.
2511         * bfd-in2.h: Rebuilt.
2513 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
2515         * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2516         `type' field in the hash entry when deciding whether to follow a
2517         link.
2519 2001-08-24  Jakub Jelinek  <jakub@redhat.com>
2521         * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2522         last.
2523         (elf_link_sort_relocs): Adjust accordingly.
2525         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2526         (elf64_alpha_check_relocs): Set it if section this reloc is against
2527         is read-only.  Set DF_TEXTREL if a RELATIVE reloc is needed against
2528         read-only section.
2529         (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2530         is is against read-only section.
2531         (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2532         check section names.
2533         (elf64_alpha_reloc_type_class): New.
2534         (elf_backend_reloc_type_class): Define.
2536 2001-08-24  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2538         * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2539         by bfd_malloc().
2541 2001-08-23  Andreas Jaeger  <aj@suse.de>
2543         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2544         the reloc is against read-only section.
2545         (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2546         of looking up section names for DT_TEXTREL.
2547         (elf64_x86_64_reloc_type_class): New.
2548         (elf_backend_reloc_type_class): Define.
2550 2001-08-23  H.J. Lu  <hjl@gnu.org>
2552         * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2553         * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2555         * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2556         bfd_print_symbol_vandf.
2557         * coffgen.c (coff_print_symbol): Likewise.
2558         * elf.c (bfd_elf_print_symbol): Likewise.
2559         * ieee.c (ieee_print_symbol): Likewise.
2560         * nlmcode.h (nlm_print_symbol): Likewise.
2561         * oasys.c (oasys_print_symbol): Likewise.
2562         * pdp11.c (NAME(aout,print_symbol)): Likewise.
2563         * som.c (som_print_symbol): Likewise.
2564         * srec.c (srec_print_symbol): Likewise.
2565         * tekhex.c (tekhex_print_symbol): Likewise.
2566         * versados.c (versados_print_symbol): Likewise.
2567         * vms.c (vms_print_symbol): Likewise.
2569         * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2570         with bfd_fprintf_vma.
2571         (bfd_elf_print_symbol): Likewise.
2572         * syms.c (bfd_print_symbol_vandf): Likewise.
2574 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
2576         * aoutf1.h (sunos_write_object_contents): Silence compile time
2577         warning.
2578         * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2580         * bout.c: Add missing function prototypes.  Fix formatting.
2581         * coff-z8k.c: Add missing function prototypes.  Fix formatting.
2582         * coff-w65.c: Add missing function prototypes.  Fix formatting.
2583         * coff-h8500.c: Add missing function prototypes.  Fix formatting.
2584         * coff-h8300.c: Add missing function prototypes.  Fix formatting.
2585         * coff-tic54x.c: Add missing function prototypes.  Fix formatting.
2586         * coff-tic30.c: Add missing function prototypes.  Fix formatting.
2587         * coff-m68k.c: Add missing function prototypes.  Fix formatting.
2588         * coff-rs6000.c: Add missing function prototypes.  Fix formatting.
2589         * coff-sh.c: Add missing function prototypes.  Fix formatting.
2591 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
2593         * elf-bfd.h (enum elf_reloc_type_class): New.
2594         (struct elf_backend_data): Add elf_backend_reloc_type_class.
2595         (_bfd_elf_reloc_type_class): New.
2596         * elfxx-target.h (elf_backend_reloc_type_class): Define.
2597         (elfNN_bed): Add elf_backend_reloc_type_class.
2598         * elf.c (_bfd_elf_reloc_type_class): New.
2599         * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2600         is against read-only section.
2601         (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2602         looking up section names for DT_TEXTREL.
2603         (elf_i386_reloc_type_class): New.
2604         (elf_backend_reloc_type_class): Define.
2605         * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2606         reloc is against read-only section.
2607         (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2608         looking up section names for DT_TEXTREL.
2609         (elf32_sparc_reloc_type_class): New.
2610         (elf_backend_reloc_type_class): Define.
2611         * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2612         reloc is against read-only section.
2613         (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2614         looking up section names for DT_TEXTREL.
2615         (sparc64_elf_reloc_type_class): New.
2616         (elf_backend_reloc_type_class): Define.
2617         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2618         (elfNN_ia64_hash_table_create): Clear ia64_info.
2619         (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2620         section.
2621         (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2622         instead of looking up section names for DT_TEXTREL.
2623         (elfNN_ia64_reloc_type_class): New.
2624         (elf_backend_reloc_type_class): Define.
2625         * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2626         (struct elf_link_sort_rela): New.
2627         (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2628         (elf_bfd_final_link): Call elf_link_sort_relocs.
2629         Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2630         necessary.
2632 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
2634         * configure.in (x86-bsdi): No corefile support.
2635         * configure: Regenerate.
2637 2001-08-22  Nick Clifton  <nickc@cambridge.redhat.com>
2639         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2640         comma.
2642 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
2644         * coff-go32.c: Make DWARF2 sections use an alignment of 0.  Set
2645         the alignment of dwarf2 linkonce sections to 0.
2646         * coff-sto32.c: Likewise.
2648 2001-08-20  Andreas Jaeger  <aj@suse.de>
2650         * coff-sparc.c: Add missing prototypes.
2651         * elf32-s390.c: Likewise.
2652         * elf32-i960.c: Likewise.
2653         * aout-target.h: Likewise.
2655 2001-08-20  H.J. Lu  <hjl@gnu.org>
2657         * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2658         (elf_num_section_syms): New for num_section_syms.
2660         * elf.c (elf_map_symbols): Set num_section_syms.
2661         (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2662         the section symbol index.
2664 2001-08-20  Nick Clifton  <nickc@cambridge.redhat.com>
2666         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2667         select the generic has table creator.  All elf backends need elf
2668         specific fields in the hash table.
2670 2001-08-20  Alan Modra  <amodra@bigpond.net.au>
2672         * archive.c (offsetof): Remove define.
2673         * elf.c: Likewise.
2674         * oasys.c: Likewise
2675         * sysdep.h (offsetof): Define.
2677 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2679         * bfd.c (bfd_get_gp_size): Return an unsigned int.
2680         (bfd_set_gp_size): Make param unsigned.
2681         * bfd-in2.h: Regenerate.
2682         * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2683         than calling bfd_get_gp_size.
2684         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2685         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2687 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2689         * linker.c (default_fill_link_order): Handle four byte fill value.
2691 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2693         * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2694         prototype.
2695         * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2697         * elf64-mips.c (UNUSED_RELOC): Define.
2698         (mips_elf64_howto_table_rel): Use it.
2699         (mips_elf64_howto_table_rela): Here too.
2700         (mips_elf64_write_relocs): Fix signed/unsigned warning.
2702         * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2703         silence warning.
2704         * coffgen.c (coff_print_symbol): Fix warnings.
2705         (coff_find_nearest_line): Likewise.
2706         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2707         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2708         * format.c (bfd_check_format_matches): Likewise.
2709         (bfd_set_format): Likewise.
2710         * coff-ia64.c: Add missing prototypes.
2711         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2712         signed to silence warnings.
2713         (elf64_alpha_relocate_section): Likewise.
2714         (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2715         (elf64_alpha_add_symbol_hook): Likewise.
2716         (elf64_alpha_final_link): Likewise.
2717         (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2718         (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2719         (elf64_alpha_size_got_sections): Likewise.
2720         * elfxx-ia64.c: Add missing prototypes.
2721         (elfNN_ia64_relocate_section): Fix warning.
2722         (elfNN_ia64_unwind_entry_compare): Make params const.
2724 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2726         * config.bfd (targ64_selvecs): New.
2727         <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2729         * bfd-in.h (BFD_VERSION): Remove wrong comment.
2730         (BFD_DEFAULT_TARGET_SIZE): New.
2731         (BFD_ARCH_SIZE): Comment.
2732         * configure.in (target_size): New.  Set instead of target64 in
2733         selvecs case statement.  Set target64 from it.
2734         (bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
2735         * bfd-in2.h: Regenerate.
2736         * configure: Regenerate.
2738 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2740         * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2741         (bfd_errmsgs): Add corresponding message.
2742         * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2743         finding an archive that contains different format object files.
2744         Return bfd_error_wrong_object_format for this case.
2745         * format.c: Formatting fixes.  s/CONST/const/.
2746         (bfd_check_format_matches): Accept archives that give
2747         bfd_error_wrong_object_format if no full match is found.  Tidy
2748         code handling matching_vector.  Don't return a pointer to freed
2749         memory in `matching'.  Handle ambiguous matches as for partial
2750         archive matches.
2751         * bfd-in2.h: Regenerate.
2753 2001-08-15  Alan Modra  <amodra@bigpond.net.au>
2755         * libieee.h (common_header_type): Add last_byte field.
2757         * ieee.c: Add missing prototypes.  Some format fixes.
2758         (struct output_buffer_struct): Move for availability to prototypes.
2759         (ieee_part_after): New function.
2760         (ieee_slurp_debug): Use it here.
2761         (ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
2762         ieee_part_after to set last_byte to one past end of current part.
2763         Update callers.
2764         (ieee_pos): Pass in ieee_data_struct rather than bfd.
2765         Update callers.
2766         (parse_expression): Don't go beyond the end of the current part.
2767         (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2768         (ieee_get_symtab_upper_bound, ieee_get_symtab,
2769         ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2770         ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2771         ieee_set_section_contents, ieee_write_object_contents,
2772         ieee_make_empty_symbol): Make static.
2773         (ieee_archive_p): Correct comments regarding bfd_read.
2774         (ieee_object_p): Similarly.
2775         (ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
2776         output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2777         input_bfd, output_bfd, output_buffer.
2778         (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2779         do_with_relocs, ie. as a symbol for relocatable files.
2780         (ieee_vec): Add comments showing functions referenced by macros.
2782 2001-08-14  Nick Clifton  <nickc@cambridge.redhat.com>
2784         * aout-tic30.c: Add missing prototypes.  Fix formatting.
2785         * aout-ns32k.c: Add missing prototypes.  Fix formatting.
2786         * peXXigen.c: Add missining prototypes.  Fix formatting.
2787         * aout-adobe.c: Add missining prototypes.  Fix formatting.
2789 2001-08-13  Nick Clifton  <nickc@cambridge.redhat.com>
2791         * elf32-v850.c: Add missing function prototypes.
2792         Fix some formatting.
2794         * cpu-v850.c: Add missing function prototype.
2795         Fix some formatting.
2797 2001-08-11  Nick Clifton  <nickc@cambridge.redhat.com>
2799         * elf-bfd.h (struct elf_backend_data): Add new fields
2800         'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2801         (bfd_elf_sprintf_vma): Rename function prototype to
2802         '_bfd_elf_sprintf_vma'.
2803         (bfd_elf_fprintf_vma): Rename function prototype to
2804         '_bfd_elf_fprintf_vma'.
2805         * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2806         directly, instead indirect via the elf_backend_data structure.
2807         (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2808         instead indirect via the elf_backend_data structure.
2809         * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2810         (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2811         * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2812         already defined.
2813         (elf_backend_fprintf_vma): Initialise if not already defined.
2814         (struct elf_backend_data): Initialise the
2815         elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2817 2001-08-10  Andreas Jaeger  <aj@suse.de>
2819         * elf64-sparc.c: Add missing prototypes.
2820         * elf32-cris.c: Likewise.
2821         * elf32-i370.c: Likewise.
2822         * elf64-hppa.c: Likewise.
2823         * elf64-s390.c: Likewise.
2825 2001-08-10  Andreas Jaeger  <aj@suse.de>
2827         * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2828         Add prototypes where needed.
2830 2001-08-10  H.J. Lu  <hjl@gnu.org>
2832         * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2833         (bfd_fprintf_vma): Likewise.
2835 2001-08-10  H.J. Lu  <hjl@gnu.org>
2837         * bfd.c (bfd_sprintf_vma): Don't return void.
2838         (bfd_fprintf_vma): Likewise.
2840 2001-08-10  Andreas Jaeger  <aj@suse.de>
2842         * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2843         to build warnings.
2844         * configure: Regenerate.
2846 2001-08-10  Alan Modra  <amodra@bigpond.net.au>
2848         * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2849         warning if not BFD64.  Add braces so emacs auto format works.
2850         (bfd_elf_fprintf_vma): Likewise.
2852         * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2853         of _xcoff_swap_ld*.
2854         * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2855         param to agree with libxcoff.h.
2856         (xcoff_swap_ldhdr_out): Likewise.
2857         (xcoff_swap_ldsym_in): Likewise.
2858         (xcoff_swap_ldsym_out): Likewise.
2859         (xcoff_swap_ldrel_in): Likewise.
2860         (xcoff_swap_ldrel_out): Likewise.
2861         (xcoff_create_csect_from_smclas): Likewise.
2862         * coff64-rs6000.c: Add missing prototypes.
2863         (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2864         with libxcoff.h.
2865         (xcoff64_swap_ldhdr_out): Likewise.
2866         (xcoff64_swap_ldsym_in): Likewise.
2867         (xcoff64_swap_ldsym_out): Likewise.
2868         (xcoff64_swap_ldrel_in): Likewise.
2869         (xcoff64_swap_ldrel_out): Likewise.
2870         (xcoff64_ppc_relocate_section): Make static.
2871         (xcoff64_slurp_armap): Likewise.
2872         (xcoff64_archive_p): Likewise.
2873         (xcoff64_openr_next_archived_file): Likewise.
2874         (xcoff64_sizeof_headers): Likewise.
2875         (xcoff64_is_lineno_count_overflow): Likewise.
2876         (xcoff64_is_reloc_count_overflow): Likewise.
2877         (xcoff64_loader_symbol_offset): Likewise.
2878         (xcoff64_loader_reloc_offset): Likewise.
2879         * elf64-gen.c: Add missing prototypes.
2881 2001-08-09  H.J. Lu  <hjl@gnu.org>
2883         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2884         (bfd_elf_fprintf_vma): Likewise.
2886 2001-08-09  H.J. Lu  <hjl@gnu.org>
2888         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2889         to ...
2890         * elf-bfd.h: Here.
2891         * bfd-in2.h: Regenerated.
2893 2001-08-09  H.J. Lu  <hjl@gnu.org>
2895         * bfd-in.h (bfd_sprintf_vma): New prototype.
2896         (bfd_fprintf_vma): Likewise.
2897         (bfd_elf_sprintf_vma): Likewise.
2898         (bfd_elf_fprintf_vma): Likewise.
2899         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2900         * bfd-in2.h: Regenerated.
2902         * bfd.c (bfd_sprintf_vma): New. Defined.
2903         (bfd_fprintf_vma): Likewise.
2905         * elf.c (bfd_elf_sprintf_vma): New. Defined.
2906         (bfd_elf_fprintf_vma): Likewise.
2908 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
2910         * coff-rs6000.c: Add missing prototypes.
2911         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2912         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2913         xcoff_loader_reloc_offset): Make static.
2914         * dwarf1.c: Add missing prototypes.
2915         * dwarf2.c: Add missing prototypes.
2916         (struct abbrev_info): Move definition.
2917         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2918         * elf.c: Add missing prototypes.
2919         * elf32-gen.c: Likewise.
2920         * elf32-i386.c: Likewise.
2921         * elf32-ppc.c: Likewise.
2922         (ppc_elf_sort_rela): Use PTR instead of "void *".
2923         * elflink.h: Add missing prototypes.  Formatting fixes.
2924         * merge.c: Add missing prototypes.
2925         (last4_eq): Use PTR instead of "void *".
2926         (last_eq): Likewise.
2927         * syms.c: Add missing prototypes.
2929 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
2931         * bfd.c: Fix formatting.
2932         * bfd-in2.h: Regenerate.
2934 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
2936         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2937         true (this target uses REL relocations) and 'pcrel_offset' to
2938         false (the PC is implied, not stored in the offset).
2940 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
2942         1999-10-19  Linus Nordberg  <linus@swox.se>
2943         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2944         * elfxx-target.h (elf_backend_want_got_sym): Define.
2945         (elfNN_bed): Add elf_backend_want_got_sym.
2946         * elflink.c (_bfd_elf_create_got_section): Define
2947         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2949 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
2951         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2952         (find_rela_addend): New function.
2953         (parse_comp_unit): Call it to find the abbrev offset addend.
2954         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2955         members of dwarf2_debug as debugging information is read.
2957 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
2959         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2960         targets as well as sh-pe.
2962 2001-08-03  Ben Harris <bjh21@netbsd.org>
2964         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2965         reloc from start of section when computing value for R_ARM_REL32
2966         reloc.
2968 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
2970         From  H.J. Lu  <hjl@gnu.org>
2971         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2972         keep relocs for undefined syms if there are no dynamic sections in
2973         executable.
2974         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2976 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
2978         * cofflink.c (coff_link_check_ar_symbols): also search for
2979         __imp__symbol as well as _symbol.
2980         * linker.c (_bfd_generic_link_add_archive_symbols): also
2981         search for __imp__symbol as well as _symbol.
2983 2001-08-01  Adam Nemet  <anemet@lnxw.com>
2985         * elf.c (elf_sort_sections): Return zero only as the last step.
2987 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
2989         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2990         ARM_COFF_BUGFIX.
2991         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2992         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2993         ARM_COFF_BUGFIX.
2995 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2997         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2998         to match corresponding bfd_coff_backend data member.
3000 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
3002         * Makefile.am: Update dependencies with "make dep-am".
3003         * Makefile.in: Regenerate
3005 2001-07-15  H.J. Lu  <hjl@gnu.org>
3007         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3008         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3009         * Makefile.in: Regenerate.
3011 2001-07-11  H.J. Lu  <hjl@gnu.org>
3013         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3014         flags when creating the reloc section if the ALLOC flag in the
3015         source section is set.
3017 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
3019         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3020         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3021         * bfd-in2.h: Regenerate.
3022         * libbfd.h: Regenerate.
3023         * elfxx-ia64.c (ia64_howto_table): Define how to handle
3024         new relocations.
3025         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3026         (elfNN_ia64_check_relocs): Likewise.
3027         (elfNN_ia64_install_value): Likewise.
3028         (elfNN_ia64_relocate_section): Likewise.
3030 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
3032         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3033         R_SPARC_UA64.
3034         (elf32_sparc_check_relocs): Likewise.
3035         Only create .rela section for alloced sections in shared libraries.
3036         (elf32_sparc_relocate_section): Likewise.
3037         Remove redundant check.
3038         Optimize unaligned reloc usage.
3039         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3040         check.
3042 2001-07-11  H.J. Lu  <hjl@gnu.org>
3044         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3045         ALLOC|LOAD flags as the source section for debugging sections
3046         when creating the reloc section.
3048 2001-07-05  Jim Wilson  <wilson@redhat.com>
3050         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3051         the section of the bigger symbol.
3053         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3055 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
3057         * peicode.h (coff_swap_scnhdr_in): For sections containing
3058         uninitialised data, only set their size to s_paddr if this does
3059         not reset their size to zero.  MS's latest compilers will set
3060         s_paddr to zero.
3062 2001-07-04  H.J. Lu  <hjl@gnu.org>
3064         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3065         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3066         bfd_mach_mips5000.
3068 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
3070         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3072         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3073         sections being discarded.
3075 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
3077         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3078         instead of _bfd_elfcore_section_from_phdr.
3079         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3080         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3081         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3082         (elfcore_grok_prstatus): Likewise.
3083         (elfcore_grok_lwpstatus): Likewise.
3084         (bfd_get_elf_phdr_upper_bound): Likewise.
3085         (elfcore_make_note_pseudosection): Formatting.
3086         (_bfd_elfcore_strndup): Formatting.
3087         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3088         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3090 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
3092         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3093         and _bfd_elfcore_strndup.
3094         (struct elf_backend_data): Add elf_backend_grok_prstatus
3095         and elf_backend_grok_psinfo.
3096         * elf.c (_bfd_elfcore_make_pseudosection): New function.
3097         (elfcore_grok_prstatus): Use it.
3098         (elfcore_make_note_pseudosection): Likewise.
3099         (elfcore_strndup):  Rename to...
3100         (_bfd_elfcore_strndup): Here, and make global.
3101         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3102         (elfcore_grok_note): Call elf_backend_grok_prstatus
3103         and elf_backend_grok_psinfo if available.
3104         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3105         (_bfd_elf32_mips_grok_psinfo): New function.
3106         (elf_backend_grok_prstatus): Define.
3107         (elf_backend_grok_psinfo): Define.
3108         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3109         (elf_backend_grok_psinfo): Likewise.
3110         (elfNN_bed): Include elf_backend_grok_prstatus and
3111         elf_backend_grok_psinfo.
3113 2001-06-29  H.J. Lu  <hjl@gnu.org>
3115         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3116         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
3117         is NULL before filling PLT.
3119 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
3121         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3123 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
3125         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3126         here..
3127         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3128         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3129         after gc has run.
3131         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3132         (IS_ABSOLUTE_RELOC): Define.
3133         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3134         (hppa_link_hash_newfunc): Always init it.
3135         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3136         create COPY relocs only when the reloc is in a read-only section.
3137         Instead, allocate space for a dynamic reloc to reference the
3138         library symbol directly.  Keep track of space we allocate using
3139         relocs_entries.
3140         (hppa_discard_copies): Delete, and move code to..
3141         (allocate_plt_and_got): ..here.  Rename to
3142         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3143         relocs for non-shared link.
3144         (elf32_hppa_size_dynamic_sections): Update calls to above.
3145         (elf32_hppa_relocate_section): Write out the dynamic relocs used
3146         in lieu of COPY relocs.
3148         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3149         here..
3150         (elf_i386_adjust_dynamic_symbol): ..nor here..
3151         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3152         after gc has run.
3153         (elf_i386_size_dynamic_sections): Fix a comment.
3154         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3155         involved in writing reloc out.
3157 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
3159         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3160         Ensure syms are dynamic if we might be emitting a reloc.
3161         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3162         for undefweak or undefined syms..
3163         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3165         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3166         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3167         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3168         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3170 2001-06-24  H.J. Lu  <hjl@gnu.org>
3172         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3173         strncasecmp/strcasecmp instead of strncmp/strcmp.
3175 2001-06-23  H.J. Lu  <hjl@gnu.org>
3177         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3178         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3179         in the regular object file and treat the weak definition as
3180         the normal one.
3182 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
3184         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3185         unresolved_reloc test to exclude cases where we use "relocation"
3186         before setting it to point into the .got.  Reinstate fudge for
3187         unresolved relocs in debugging sections.
3189         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3190         complicated tests for unresolvable relocs with a simple direct
3191         scheme using "unresolved_reloc" var.
3193         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3194         elf_i386_dyn_relocs.  Update comment.
3195         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3196         dyn_relocs.
3197         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3198         others to aborts.
3199         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3200         abort.
3201         (elf_i386_size_dynamic_sections): Likewise.
3202         (elf_i386_finish_dynamic_symbol): Likewise.
3203         (elf_i386_finish_dynamic_sections): Likewise.
3204         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
3205         handling code.
3207         Avoid creating COPY relocs if possible.
3208         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3209         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
3210         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3211         reloc is in a read-only section.  Instead, allocate space for a
3212         dynamic reloc to reference the library symbol directly.  Keep
3213         track of space we allocate using pcrel_relocs_copied.
3214         (discard_copies): Delete, and move code to ..
3215         (allocate_plt_and_got): ..here.  Rename to
3216         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3217         relocs for non-shared link.
3218         (elf_i386_size_dynamic_sections): Update calls to above functions.
3219         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
3220         more ugly logic to avoid "unresolvable relocation" error.  Use
3221         htab shortcut in place of elf_hash_table macro.
3222         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3223         not always be created now.
3225 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
3227         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3228         shared libraries.
3230 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3232         * configure.host (mips64-*-linux): Reformat.
3234 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
3236         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3237         allocate local .got space.  Use shortcuts from hash table for .got
3238         and .plt rather than comparing section names.
3239         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3240         adjusting index into local_got_refcounts to document what we are
3241         really doing.
3242         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3243         Tidy .got and .plt error checking.
3245 2001-06-20  Catherine Moore  <clm@redhat.com>
3247         * elf-bfd.h (struct elf_backend_data):
3248         elf_backend_emit_relocs: New field: Function for emitting
3249         relocs.
3250         elf_backend_count_relocs: New field: Function for determining
3251         the number of relocs to be emitted.
3252         * elfxx-target.h: Provide default (NULL) values for
3253         elf_backend_emit_relocs and elf_backend_count_relocs.
3254         * elflink.h (elf_link_size_reloc_section): Make the hash table
3255         big enough to hold the relocs counted by either reloc_count or
3256         o->reloc_count.
3257         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3258         should be emitted, either because of a command line option
3259         stored in the info structure or because the target provides a
3260         special reloc emitting function.
3261         If the target provides a reloc counting function use it,
3262         unless performing a relocatable link or emitting all relocs.
3263         Also set the SEC_RELOC flag on any output section which will
3264         contain relocs.
3265         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3266         should be emitted, either because of a command line option
3267         stored in the info structure or because the target provides a
3268         special reloc emitting function.
3269         If the target provides a reloc emitting function, use it,
3270         unless performing a relocatable link or emitting all relocs.
3272 2001-06-20  H.J. Lu  <hjl@gnu.org>
3274         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3275         allocate local .got space.
3277 2001-06-19  Andreas Jaeger  <aj@suse.de>
3279         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3280         dynamic symbols.
3282 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
3284         * elflink.h (struct elf_assign_sym_version_info): Remove member
3285         export_dynamic.  All users changed to use info member.
3286         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3287         export_dynamic, instead use member in parameter info.
3288         * bfd-in.h (bfd_elf32_size_dynamic_sections,
3289         bfd_elf64_size_dynamic_sections): Update prototype.
3290         * bfd-in2.h: Regenerate.
3292 2001-06-18  H.J. Lu  <hjl@gnu.org>
3294         * elflink.h (elf_info_failed): Add a new field, verdefs.
3295         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3296         elf_export_symbol.
3297         (elf_export_symbol): Check eif->verdefs to decide if a symbol
3298         should be exported.
3300 2001-06-17  H.J. Lu  <hjl@gnu.org>
3302         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3303         readonly_reloc, to record if a relocation in the .rel.dyn
3304         section is against a read-only section.
3305         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3306         field to false.
3307         (_bfd_mips_elf_check_relocs): Record if there is a relocation
3308         in the .rel.dyn section against a read-only section by setting
3309         DF_TEXTREL or readonly_reloc.
3310         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3311         it is true.
3312         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3313         there is a relocation in the .rel.dyn section against a
3314         read-only section.
3315         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3316         DF_TEXTREL is set.
3318 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
3320         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3321         function.  Move flagword result into parameter list.  Remove
3322         comment about setting bfd_error_handler to intercept failure
3323         results.
3324         * coffgen.c (make_a_section_from_file): Examine result of
3325         calling bfd_coff_styp_to_sec_flags and pass a failure back to
3326         caller.
3327         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3328         function.  Move flagword result into parameter list.
3329         * libcoff.h: Regenerate.
3330         * libecoff.h: Regenerate.
3332 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
3334         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3335         section is going to follow it.
3337 2001-06-12  Catherine Moore  <clm@redhat.com>
3339         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3340         with the file_align entry from elf_backend_data.
3341         (elf_gc_smash_unused_vtentry_relocs): Likewise.
3342         (elf_gc_record_vtentry): Likewise.
3344 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
3346         * elflink.h: Whitespace changes.
3347         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3348         rather than "unsigned char".
3349         (elf_link_output_relocs): Likewise.
3350         (elf_link_input_bfd): Likewise.
3351         (elf_reloc_link_order): LIkewise.
3352         * elf.c: s/CONST/const/.  Whitespace changes.
3353         * elf32-mips.c: Formatting fix.
3355         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3356         * Makefile.in: Regenerate.
3357         * po/Make-in: Remove trailing tab.
3359 2001-06-09  Philip Blundell  <philb@gnu.org>
3361         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3362         change.
3363         (elf32_arm_plt_entry): Likewise.
3365 2001-06-08  H.J. Lu  <hjl@gnu.org>
3367         * elf.c (swap_out_syms): Keep names for global section symbols.
3369 2001-06-07  H.J. Lu  <hjl@gnu.org>
3371         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3372         MIPS-based machines need it.
3374 2001-06-07  H.J. Lu  <hjl@gnu.org>
3376         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3377         for SGI only.
3379         * config.bfd: Remove ecoff from Linux/mips.
3381 2001-06-07  Andreas Jaeger  <aj@suse.de>
3383         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3384         assertion.
3385         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3386         alignment of 8 for .rela sections; handle further relocations.
3388 2001-06-06  Christian Groessler <cpg@aladdin.de>
3390         * coff-z8k.c: Fix formatting.
3391         Fix howtos: howto->size was always 1.
3393 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3395         * configure.host (mips64*-*-linux*): Define.
3397 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
3399         * elf32-i386.c (elf_i386_discard_copies): Rename to
3400         discard_copies, and use elf_link_hash_entry arg rather than
3401         elf_i386_link_hash_entry.
3402         (elf_i386_link_hash_traverse): Delete.
3403         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3404         Tidy sizing of dynamic sections.
3405         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3406         possible .plt entries.
3407         (elf_i386_gc_sweep_hook): Likewise.
3408         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3409         everything with plt.refcount <= 0.
3411         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3412         .relgot space here.
3413         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3414         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3415         .rel.plt here..
3416         (allocate_plt_and_got): ..instead do it all here.  New function.
3417         (elf_i386_size_dynamic_sections): Allocate local .got space and
3418         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
3419         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
3420         rather than gc variety).
3421         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3422         (elf_i386_relocate_section): Use it here and correct handling of
3423         R_386_GOT32.  Provide section and offset for "unresolvable
3424         relocation" error message.
3425         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3427         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3428         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3429         (elf_i386_link_hash_table_create): Init them.
3430         (create_got_section): New function.
3431         (elf_i386_create_dynamic_sections): New function.
3432         (elf_backend_create_dynamic_sections): Set to above.
3433         (elf_i386_check_relocs): Use shortcuts from hash table rather than
3434         calling bfd_get_section_by_name.
3435         (elf_i386_gc_sweep_hook): Likewise.
3436         (elf_i386_adjust_dynamic_symbol): Likewise.
3437         (elf_i386_size_dynamic_sections): Likewise.
3438         (elf_i386_relocate_section): Likewise.
3439         (elf_i386_finish_dynamic_sections): Likewise.
3441         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3443 2001-06-02  H.J. Lu  <hjl@gnu.org>
3445         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3446         and ELFOSABI_HPUX.
3447         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3449 2001-06-02  H.J. Lu  <hjl@gnu.org>
3451         * aout-cris.c (MACHTYPE_OK): New. Defined.
3453 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
3455         * section.c (_bfd_strip_section_from_output): Handle NULL
3456         output_section.
3458 2001-06-02  H.J. Lu  <hjl@gnu.org>
3460         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3461         rs6000coff64_vec only if BFD64 is defined.
3462         (powerpc64-*-aix*): Enable only if BFD64 is defined.
3464 2001-06-02  H.J. Lu  <hjl@gnu.org>
3466         * coff-ia64.c (ia64coff_object_p): Rewrite with
3467         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3469 2001-06-01  Andreas Jaeger  <aj@suse.de>
3471         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3472         relocation, small reformatting.
3474 2001-05-29  Andreas Jaeger  <aj@suse.de>
3476         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3477         (elf64_x86_64_relocate_section): Likewise.
3479 2001-05-30  Alan Modra  <amodra@one.net.au>
3481         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3482         millicode.  Don't allocate .got and .rela.got space here..
3483         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3484         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3485         .rela.plt here..
3486         (hppa_handle_PIC_calls): ..nor here..
3487         (allocate_plt_and_got): ..instead do it all here.  New function.
3488         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3489         call allocate_plt_and_got.  No need to zap .got if not dynamic.
3490         (elf32_hppa_final_link): Call regular bfd_final_link instead of
3491         gc_common_final_link.
3492         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3493         (elf32_hppa_relocate_section): Use it here.
3494         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3495         dynamic_sections_created.
3496         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3498 2001-05-28  Andreas Jaeger  <aj@suse.de>
3500         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3501         generic version since we want a hashsize of 4.
3502         (elf_backend_size_info): Likewise.
3504 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3506         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3507         a zeroing loop.
3508         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3509         (elf_link_input_bfd): Likewise.
3510         (elf_reloc_link_order): Likewise.
3511         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3512         relocations correctly.
3514 2001-05-28  Nicolas Pitre <nico@cam.org>
3516         * elf32-arm.h: fix PLT generation for big endian ARM
3518 2001-05-28  Alan Modra  <amodra@one.net.au>
3520         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3521         for symbols forced local that need plabels.
3522         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3523         .plt.rela for local syms if non-shared.
3524         (hppa_build_one_stub): Mask lsb of plt.offset.
3525         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3526         (clobber_millicode_symbols): Correct comment.
3527         (elf32_hppa_relocate_section): Likewise.
3528         (elf32_hppa_finish_dynamic_symbol): Likewise.
3530 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
3532         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3533         * bfd-in2.h: Regenerate.
3534         * libbfd.h: Regenerate.
3535         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3536         and BFD_RELOC_SPARC_UA64 mapping
3537         * elf64-sparc.c: Likewise.
3539 2001-05-25  H.J. Lu  <hjl@gnu.org>
3541         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3542         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3543         (coff-rs6000.lo): Remove the old dependency.
3544         * Makefile.in: Rebuild.
3546         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3547         coff-rs6000.lo.
3549 2001-05-25  H.J. Lu  <hjl@gnu.org>
3551         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3552         rs6000coff_core_file_matches_executable_p,
3553         rs6000coff_core_file_failing_command and
3554         rs6000coff_core_file_failing_signal only if AIX_CORE is
3555         defined.
3556         (pmac_xcoff_vec): Likewise.
3557         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3559 2001-05-25  Timothy Wall  <twall@redhat.com>
3561         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3562         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
3564 2001-05-25  H.J. Lu  <hjl@gnu.org>
3566         * bfd-in2.h: Regenerated.
3567         * libcoff.h: Likewise.
3569 2001-05-25  Alan Modra  <amodra@one.net.au>
3571         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3572         undefined millicode syms in shared libs.
3573         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3574         (elf32_hppa_check_relocs): Likewise.
3575         (elf32_hppa_adjust_dynamic_symbol): Likewise.
3576         (elf32_hppa_size_dynamic_sections): Likewise.
3577         (elf32_hppa_relocate_section): Likewise.
3578         (elf32_hppa_finish_dynamic_symbol): Likewise.
3579         (elf32_hppa_finish_dynamic_sections): Likewise.
3581 2001-05-24  Tom Rix <trix@redhat.com>
3583         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3584         xcoff-target.h not used to define rs6000 or ppc bfd.
3585         * Makefile.in same
3587         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3588         to 64 bit.
3590         * coff-rs6000.c : Many changes for 64 bit support.  Move common
3591         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
3592         and pmac_xcoff_vec
3594         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
3595         linker now supported.  Explictly define the rs6000coff64_vec.
3597         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3598         (coff_print_aux) same
3599         (coff_write_object_contents) same
3600         (coff_slurp_line_table) same
3602         * coffgen.c : (coff_fix_symbol_name) formatting
3603         (coff_mangle_symbols) xcoff 64 bit support
3604         (coff_write_symbol) same
3605         (coff_write_alien_symbol) same
3606         (coff_write_native_symbol) same
3607         (coff_write_symbols) same
3608         (coff_get_symbol_info) same
3609         (bfd_coff_get_syment) same
3610         (coff_print_symbol) same
3612         * config.bfd : add powerpc64-*-aix* target
3614         * libcoff-in.h : formatting
3616         * libcoff.h : move xcoff extern declarations to libxcoff.h
3618         * libxcoff.h : New file
3620         * xcofflink.c : Many changes for xcoff64 support.  Move common
3621         structures to include/coff/xcoff.h.  Move specific structure to
3622         backends coff-rs6000.c and coff64-rs6000.c.  Use new backend
3623         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3625         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3626         aix4.2+ -binitfini.
3628         (xcoff_build_ldsyms) : handle special __rtinit symbol.
3630 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
3632         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3633         s/ENTIRES/ENTRIES/.
3635 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3637         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3638         * libbfd.h: Regenerate.
3639         * bfd-in2.h: Regenerate.
3641         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3642         * archures.c (bfd_mach_mips12000): Define.
3643         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3644         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3645         support.
3646         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3647         * bfd-in2.h: Regenerate.
3648         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3650 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3652         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3653         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3654         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3655         that is used by GCC.
3657 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
3659         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3660         of entries in a structured section.
3661         * elf.c: Use new macro.
3662         * elf32-i386.c: Use new macro.
3663         * elf32-mips.c: Use new macro.
3664         * elf64-alpha.c: Use new macro.
3665         * elf64-sparc.c: Use new macro.
3666         * elfcode.h: Use new macro.
3667         * elflink.h: Use new macro.
3669 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
3671         * bfdint.texi: Replace -oformat with --oformat.
3673 2001-05-21  Andreas Jaeger  <aj@suse.de>
3675         * dwarf2.c (decode_line_info): Fix error message.
3676         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3677         adjust error message.
3679 2001-05-18  H.J. Lu  <hjl@gnu.org>
3681         * elflink.h (elf_link_add_object_symbols): Revert the last
3682         change.
3684 2001-05-17  Alan Modra  <amodra@one.net.au>
3686         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3687         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3688         (hppa_build_one_stub): Add an assert to check plt.offset.
3690 2001-05-17  H.J. Lu  <hjl@gnu.org>
3692         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3693         version definition to basename of the output filename.
3695 2001-05-17  H.J. Lu  <hjl@gnu.org>
3697         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3698         basename of the bfd filename.
3700 2001-05-16  Alan Modra  <amodra@one.net.au>
3702         * section.c (asection): Add linker_has_input field.
3703         (STD_SECTION): Adjust initialization to suit.
3704         * ecoff.c (bfd_debug_section): Likewise.
3705         * bfd-in2.h: Regenerate.
3707 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
3709         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3710         negative 32-bit operands to 16 operands when the operand is
3711         going to be zero-extended by the modified opcode.
3713 2001-05-12  Peter Targett  <peter.targett@arccores.com>
3715         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3716         name for 'arc5' core versions.
3717         (bfd_arc_arch): Make bfd_mach_arc_6 default.
3719         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3720         architecture.
3721         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3723 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
3725         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3726         sections as well.
3727         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3728         to .gnu.linkonce.t.FOO text section.
3730 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
3732         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3733         fields, change sec into secinfo.
3734         (struct sec_merge_info): Add chain, remove last fields.
3735         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3736         (sec_merge_hash_lookup): If lookup could not use a string only
3737         because it has bad alignment, mark the old string for deletion.
3738         (sec_merge_add): Add secinfo argument. Don't compute entry's
3739         position, instead record the section.
3740         (sec_merge_emit): Update for the sec into secinfo change in
3741         struct sec_merge_hash_entry.
3742         (_bfd_merge_section): Only record the section for merging, defer
3743         putting strings into the hash table.
3744         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3745         _bfd_merge_sections): New functions.
3746         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3747         changes.
3748         * libbfd-in.h (_bfd_merge_sections): Add prototype.
3749         (_bfd_nolink_bfd_merge_sections): Define.
3750         * libbfd.h: Likewise.
3751         (bfd_generic_merge_sections): Add prototype.
3752         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3753         (struct bfd_target): Likewise.
3754         * bfd.c (bfd_merge_sections): Define.
3755         * bfd-in2.h: Rebuilt.
3756         * elf.c (_bfd_elf_merge_sections): New function.
3757         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3758         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3759         * reloc.c (bfd_generic_merge_sections): New function.
3760         * vms.c (vms_bfd_merge_sections): New function.
3761         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3762         * aout-target.h (MY_bfd_merge_sections): Define.
3763         * aout-tic30.c (MY_bfd_merge_sections): Define.
3764         * binary.c (binary_bfd_merge_sections): Define.
3765         * bout.c (b_out_bfd_merge_sections): Define.
3766         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3767         * coffcode.c (coff_bfd_merge_sections): Define.
3768         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3769         * i386msdos.c (msdos_bfd_merge_sections): Define.
3770         * i386os9k.c (os9k_bfd_merge_sections): Define.
3771         * ieee.c (ieee_bfd_merge_sections): Define.
3772         * ihex.c (ihex_bfd_merge_sections): Define.
3773         * nlm-target.h (nlm_bfd_merge_sections): Define.
3774         * oasys.c (oasys_bfd_merge_sections): Define.
3775         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3776         * som.c (som_bfd_merge_sections): Define.
3777         * srec.c (srec_bfd_merge_sections): Define.
3778         * tekhex.c (tekhex_bfd_merge_sections): Define.
3779         * versados.c (versados_bfd_merge_sections): Define.
3780         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3782 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
3784         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3785         to be unsigned long, in order to match its use.
3787 2001-05-10  H.J. Lu  <hjl@gnu.org>
3789         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3790         indirect symbols.
3792 2001-05-09  H.J. Lu  <hjl@gnu.org>
3794         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3795         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3796         Remove the unused veriable `dynver'.
3798 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
3800         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3801         NULL or is not COFF.
3802         (coff_i386_rtype_to_howto): Don't dump core if output section
3803         owner is not COFF.
3805 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3807         * ecoff.c (bfd_debug_section): Fix initialization.
3808         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3809         is always a positive integer. Cast away sign mismatch.
3810         * elf32-mips.c: Fix misleading comment and typo.
3811         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3812         correct data type.
3813         * elflink.c: Fix typo.
3814         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3815         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3817 2001-05-04  Richard Henderson  <rth@redhat.com>
3819         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3821 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
3823         * elf32-arm.h (elf32_arm_final_link_relocate): Set
3824         EF_ARM_HASENTRY if the start address is set.
3826 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
3828         * targets.c (_bfd_target_vector_entries): Compute value based on
3829         the size of the _bfd_target_vector and not bfd_target_vector.
3831 2001-05-03  H.J. Lu  <hjl@gnu.org>
3833         * elfcode.h: Include "libiberty.h".
3835         * elflink.h (elf_link_add_object_symbols): Set
3836         elf_dt_name (abfd) to basename of the bfd filename.
3837         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3838         of the bfd filename.
3840 2001-05-03  Andreas Jaeger  <aj@suse.de>
3842         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3843         (elf_generic_info_to_howto_rel): Likewise.
3844         * coff-alpha.c (reloc_nil): Likewise.
3845         (alpha_ecoff_bad_format_hook): Likewise.
3846         (alpha_adjust_reloc_out): Likewise.
3847         (alpha_bfd_reloc_type_lookup): Likewise.
3848         (alpha_convert_external_reloc): Likewise.
3849         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3850         (elf64_alpha_reloc_bad): Likewise.
3851         (elf64_alpha_reloc_gpdisp): Likewise.
3852         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3853         (elf64_alpha_info_to_howto): Likewise.
3854         (elf64_alpha_add_symbol_hook): Likewise.
3855         (elf64_alpha_create_got_section): Likewise.
3856         (elf64_alpha_is_local_label_name): Likewise.
3857         (elf64_alpha_merge_ind_symbols): Likewise.
3858         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3859         (mips_elf64_get_reloc_upper_bound): Likewise.
3860         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3861         (nlm_alpha_get_public_offset): Likewise.
3863 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
3865         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3866         about overflow in R_OPENRISC_LO_16_IN_INSN and
3867         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3869 2001-04-30  H.J. Lu  <hjl@gnu.org>
3871         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3872         only for ELF_LINK_FORCED_LOCAL.
3873         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3874         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3875         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3877         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3878         if the symbol has hidden or internal visibility.
3880 2001-04-30  Alan Modra  <amodra@one.net.au>
3882         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3883         calls to undefined weak symbols.
3885 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3887         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3888         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3890 2001-04-27  Andreas Jaeger  <aj@suse.de>
3892         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3893         out handled entries.
3894         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3895         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3896         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3897         GOT32.
3899 2001-04-27  Sean McNeil <sean@mcneil.com>
3901         * config.bfd: Add arm-vxworks target.
3902         * coff-arm (coff_arm_relocate_section): Add in symbol value to
3903         addend (fro VXworks targets).
3905 2001-04-26  H.J. Lu  <hjl@gnu.org>
3907         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3908         valid.
3910 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
3912         * bfd-in.h (bfd_cache_close): Declare newly exported function.
3913         * bfd-in2.h: Regenerated.
3915 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
3917         * merge.c (struct sec_merge_hash_entry): Add alignment field.
3918         (struct sec_merge_hash): Remove alignment_power.
3919         (sec_merge_hash_newfunc): Clear alignment.
3920         (sec_merge_hash_lookup): Pass alignment as argument.
3921         Use hashp->root.next, not hashp->next to walk the hash chain.
3922         If a string already in the hashtable does not have required
3923         alignment, create a new hashtable entry.
3924         (sec_merge_init): Remove alignment_power argument.
3925         (sec_merge_add): Add alignment argument.
3926         (sec_merge_emit): Alignment is now a per-entity thing, not per
3927         section.
3928         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3929         for proper alignment.
3930         Pass alignment information to sec_merge_add.
3932 2001-04-24  Christian Groessler  <cpg@aladdin.de>
3934         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3935         and R_REL16 reloc types; accept odd values for R_REL16 type
3937 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
3939         * cpu-openrisc.c: New file.
3940         * elf32-openrisc.c: Likewise.
3942         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3943         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3944         (BFD32_BACKENDS): Add elf32-openrisc.lo.
3945         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3946         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3947         * Makefile.in: Regenerated.
3948         * config.bfd: (openrisc-*-elf): New target.
3949         * configure.in (bfd_elf32_openrisc_vec): New vector.
3950         * configure: Regenerated.
3951         * libbfd.h: Regenerated.
3952         * bfd-in2.h: Regenerated.
3953         * reloc.c: Add OpenRISC relocations.
3954         * targets.c (bfd_elf32_openrisc_vec): Declare.
3955         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3956         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3957         (bfd_openrisc_arch): Declare.
3958         (bfd_archures_list): Add bfd_openrisc_arch.
3959         * elf.c (prep_headers): Add bfd_arch_openrisc.
3961 2001-04-23  Bo Thorsen  <bo@suse.de>
3963         * elf64-x86-64.c: Add c++ vtable hack.
3964         Small whitespace and comment changes.
3966 2001-04-19  Andreas Jaeger  <aj@suse.de>
3968         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3969         (elf64_x86_64_plt_entry): Likewise.
3970         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3971         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3973 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
3975         * elf32-cris.c: Tweak comments related to dynamic linking.
3976         (cris_elf_relocate_section): When not creating shared object, fill
3977         in the .got table for any symbol not in the dynamic symbol table.
3978         (elf_cris_finish_dynamic_symbol): When not creating shared object,
3979         only emit a .got.rela reloc if the symbol is in the dynamic symbol
3980         table.
3981         (cris_elf_check_relocs): Use variable r_type in all places rather
3982         than the original expression.  Add default case in switch for
3983         reloc types.
3984         (elf_cris_size_dynamic_sections): Iterate over
3985         elf_cris_discard_excess_program_dynamics when not creating shared
3986         library.
3987         (elf_cris_discard_excess_dso_dynamics): Renamed from
3988         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
3989         (elf_cris_discard_excess_program_dynamics): New.
3991 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
3993         * coffcode.h (coff_write_object_contents): Use
3994         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3996 2001-04-14  H.J. Lu  <hjl@gnu.org>
3998         * bfd-in2.h: Regenerate.
4000 2001-04-14  Jakub Jelinek <jakub@redhat.com>
4002         * section.c (STD_SECTION): Add entsize.
4004 2001-04-13  H.J. Lu  <hjl@gnu.org>
4006         * section.c (SEC_MERGE): Define new flag for merging.
4007         (SEC_STRINGS): Likewise.
4008         (entsize): New field.
4010 2001-04-13  Roger Sayle  <roger@metaphorics.com>
4012         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4013         flag on pe-i386 targets.
4015 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
4017         * libbfd-in.h (_bfd_merge_section): New.
4018         (_bfd_write_merged_section): New.
4019         (_bfd_merged_section_offset): New.
4020         * libbfd.h: Rebuilt.
4021         * linker.c (_bfd_generic_link_output_symbols): Handle
4022         discard_sec_merge.
4023         * aoutx.h (aout_link_write_symbols): Likewise.
4024         * pdp11.c (aout_link_write_symbols): Likewise.
4025         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4026         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4027         sections.
4028         (elf_link_sec_merge_syms): New.
4029         (elf_link_input_bfd): Call _bfd_merged_section_offset
4030         and _bfd_write_merged_section.
4031         Handle discard_sec_merge.
4032         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4033         field.
4034         (struct bfd_elf_section_data): Likewise.
4035         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4036         SEC_STRINGS section flags and entsize from their ELF counterparts.
4037         (_bfd_elf_link_hash_table_init): Initialize merge_info.
4038         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4039         from their BFD counterparts.
4040         * merge.c: New file.
4041         * Makefile.am: Add strtab.lo.
4042         * Makefile.in: Rebuilt.
4044 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
4046         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4047         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4049 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
4051         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4052         endian MIPS ELF target.
4053         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4054         MIPS ELF target.
4056         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4057         64bit big endian MIPS ELF target.
4058         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4059         endian MIPS ELF target.
4060         * configure: Regenerated.
4062         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4063         little endian targets.
4064         (mips_elf_sym_is_global): Handle traditional targets.
4066         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4067         64bit big endian MIPS ELF target.
4068         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4069         endian MIPS ELF target.
4071         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4072         and bfd_elf64_tradlittlemips_vec.
4074 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
4076         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4077         ordinary "progbits" section.
4079 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
4081         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4082         when -Bsymbolic causes a symbol to no longer need a .plt entry.
4084 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
4086         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4088 2001-03-30  H.J. Lu  <hjl@gnu.org>
4090         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4091         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4093 2001-03-26  H.J. Lu  <hjl@gnu.org>
4095         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4096         if there are any relocations for generic ELF.
4097         (bfd_elf32_bfd_link_add_symbols): Defined to
4098         elf32_generic_link_add_symbols.
4099         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4100         if there are any relocations for generic ELF.
4101         (bfd_elf64_bfd_link_add_symbols): Defined to
4102         elf64_generic_link_add_symbols.
4104 2001-03-23  Nick Clifton  <nickc@redhat.com>
4106         * Makefile.am (BUILD_CFILES): New variable: List of C source
4107         files created in build directory.
4108         (BUILD_HFILES): New variable: List of header files created in
4109         build directory.
4110         (POTFILES): Delete.
4111         (po/POTFILES.in): Replace rule with empty entry.
4112         (po/SRC-POTFILES.in): New rule: Create a list of source files
4113         in the source directory.
4114         (po/BLD-POTFILES.in): New rule: Create a list of source files
4115         in the build directory.
4116         (MOSTLYCLEAN): Do not delete source files created in build
4117         directory.
4118         * Makefile.in: Regenerate.
4119         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4120         into po/Makefile.
4121         * configure: Regenerate.
4123         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4124         and BLD_POTFILES.
4125         Add .. to the search path when building bfd.pot.
4126         Delete POTFILES when performing distclean.
4127         Add comment describing why distclean is broken in maintainer mode.
4128         * po/POTFILES.in: Delete.
4129         * po/SRC-POTFILES.in: New file.
4130         * po/BLD-POTFILES.in: New file.
4131         * po/bfd.pot: Regenerate.
4133 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
4135         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
4136         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4137         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4138         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4139         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4140         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4141         functions.
4142         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4143         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
4144         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4145         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4146         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4147         New HOWTO members for new relocs.
4148         (cris_reloc_map): Map new relocs.
4149         (ELF_DYNAMIC_INTERPRETER): Define.
4150         (PLT_ENTRY_SIZE): Define.
4151         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4152         elf_cris_pic_plt_entry): New, PLT templates.
4153         (struct elf_cris_pcrel_relocs_copied, struct
4154         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4155         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4156         (cris_final_link_relocate): Check that 16-bit GOT relocs have
4157         positive values.  Adjust PCREL relocs to be relative to location
4158         after relocation.
4159         (cris_elf_relocate_section): Handle relocations to dynamic
4160         objects.  Handle new relocations.  Call error handler when seeing
4161         non-PIC relocation for read-only sections while generating shared
4162         object.
4163         (cris_elf_check_relocs): Set reference counts for GOT and PLT
4164         entries.
4165         (bfd_elf32_bfd_link_hash_table_create,
4166         elf_backend_adjust_dynamic_symbol,
4167         elf_backend_size_dynamic_sections,
4168         elf_backend_finish_dynamic_symbol,
4169         elf_backend_finish_dynamic_sections,
4170         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4171         elf_backend_hide_symbol, elf_backend_want_got_plt,
4172         elf_backend_plt_readonly, elf_backend_want_plt_sym,
4173         elf_backend_got_header_size, elf_backend_plt_header_size):
4174         Define.
4176         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4177         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4178         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4179         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4180         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4181         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4182         * bfd-in2.h, libbfd.h: Regenerate.
4184 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
4186         (_bfd_mips_elf_relocate_section): Give a better error message when
4187         a relocation is not recognized.
4189 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
4191         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4192         non-NULL before attempting to dereference.
4194 2001-03-20  H.J. Lu  <hjl@gnu.org>
4196         * configure.in: Remove the redundent AC_ARG_PROGRAM.
4197         * configure: Rebuild.
4199 2001-03-20  Andreas Schwab  <schwab@suse.de>
4201         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4202         relocation value when resolving a reference from a debugging
4203         section.
4205 2001-03-16  Scott Thomason  <SThomaso@hii.com>
4207         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4208         (xcoff64_swap_sym_out): Fix syntax errors.
4210 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
4212         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4214 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
4216         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4217         (hppa_link_hash_newfunc): Init it.
4218         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4219         section appears to be non-PIC.
4220         (final_link_relocate): Likewise.
4221         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4222         possible candidate function, and set pic_call for those that will
4223         only have a .plt entry for the PIC call stub.
4224         (hppa_handle_PIC_calls): Set maybe_pic_call.
4226 2001-03-12  DJ Delorie  <dj@redhat.com>
4228         * elf32-sh.c (sh_elf_relocate_section): Only relocation
4229         R_SH_DIR8WP* relocs if they're against external symbols, else
4230         they're just for relaxing.  Validate the reloc values.
4232 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
4234         * binary.c (bfd_external_binary_architecture): Declare.
4235         (binary_object_p): If bfd_external_binary_architecture is defined,
4236         set the architecture to this string.
4238 2001-03-11  Philip Blundell  <philb@gnu.org>
4240         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4241         entries that could serve as a definition for a weak symbol.
4243 2001-03-08  Nick Clifton  <nickc@redhat.com>
4245         * Most files: Update copyright notices using Perl script created
4246         by Kevin Buettner <kevinb@redhat.com>.
4248 2001-03-07  Nick Clifton  <nickc@redhat.com>
4250         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4251         prior patch on ! defined OLD_ARM_ABI.
4253 2001-03-07  Andreas Jaeger  <aj@suse.de>
4255         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4256         some relocation values.
4258 2001-03-06  Nick Clifton  <nickc@redhat.com>
4260         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4261         of offset in BLX(1) instruction.
4262         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4263         offset in BLX(1) instruction.
4264         Fix formatting.
4266 2001-03-06  Nick Clifton  <nickc@redhat.com>
4268         * coff-arm.c (coff_arm_reloc_type_lookup): Add
4269         BFD_RELOC_THUMB_PCREL_BLX.
4271 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
4273         * archures.c (bfd_default_scan): Add Coldfire CPUs.
4274         * bfd-in2.h: Regenerate.
4275         * cpu-m68k.c: Add Coldfire CPUs for arch table.
4276         * ieee.c (ieee_write_processor): Set proper id for
4277         Coldfire CPUs.
4279 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4281         * configure.in: Add s390 target.
4282         * configure: Regenerate.
4284 2001-02-28  Andreas Jaeger  <aj@suse.de>
4286         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4287         to addend.
4289 2001-02-28  Philip Blundell  <pb@futuretv.com>
4291         * elf32-arm.h: Update mentions of renamed EF_xx constants.
4292         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4294 2001-02-27  H.J. Lu  <hjl@gnu.org>
4296         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4297         abfd->tdata.aout_data == NULL.
4299 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
4301         * elf32-hppa.c: Correct field selector in stub comments.
4302         (clobber_millicode_symbols): Formatting fix.
4304         * configure.in: Bump version to 2.11.90.
4305         * configure: Regenerate.
4306         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4307         (CFILES): $SOURCE_CFILES + generated C files.
4308         (POTFILES): Include $HFILES not $SOURCE_HFILES.
4309         Run "make dep-am"
4310         * Makefile.in: Regenerate.
4311         * doc/Makefile.in: This too.
4313 2001-02-26  Timothy Wall  <twall@cygnus.com>
4315         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4316         comments.
4318 2001-02-26  Nick Clifton <nickc@redhat.com>
4320         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4321         up, replacing multiple if statements with a switch.
4322         (handle_COMDAT): New function.
4324 2001-02-26  H.J. Lu  <hjl@gnu.org>
4326         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4327         a warning for section flags we do not handle instead of
4328         aborting.
4330 2001-02-26  Andreas Jaeger  <aj@suse.de>
4332         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4334 2001-02-22  Timothy Wall  <twall@cygnus.com>
4336         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4337         * configure.in: Add objects for elf64_ia64_aix vectors.
4338         * configure: Regenerated.
4339         * configure.host: Recognize ia64-*-aix*.
4340         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
4341         for AIX.  AIX5 requires most relocations to be dynamic (*all*
4342         binaries are somewhat similar to shared libraries).
4343         * targets.c: Add elf64_ia64_aix vectors.
4345 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
4347         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4348         C8 said "1" instead of "8".  Clarify error string for IMM22:
4349         "signed integer" instead of just "integer".
4351 2001-02-20  Andreas Jaeger  <aj@suse.de>
4353         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4354         PLT entries that could serve as a definition for a weak symbol.
4356 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
4358         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4359         entries that could serve as a definition for a weak symbol.
4360         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4362 2001-02-18  David O'Brien  <obrien@FreeBSD>
4364         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4365         FreeBSD/i386-CURRENT differently until I can figure out the needed
4366         corefile changes.
4367         * configure: Regenerate.
4368         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4369         FreeBSD/PowerPC, and FreeBSD/sparc64.
4371 2001-02-18  lars brinkhoff  <lars@nocrew.org>
4373         * Makefile.am: Add PDP-11 a.out target.
4374         * config.bfd: Likewise.
4375         * configure.in: Likewise.
4376         * targets.c: Likewise.
4377         * archures.c: Likewise.
4378         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
4379         * libbfd.h: Add PDP-11 relocations.
4380         * reloc.c: Likewise.
4381         * cpu-pdp11.c: New file.
4382         * pdp11.c: New file.
4384         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4385         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4386         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4387         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4388         (GET_MAGIC): New macro.
4389         (PUT_MAGIC): Likewise.
4390         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4392 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
4394         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4395         multiarch needs it).
4397 2001-02-18  H.J. Lu  <hjl@gnu.org>
4399         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4400         index.
4402 2001-02-18  Kazu Hirata  <kazu@hxi.com>
4404         * vms-misc.c: Fix formatting.
4406 2001-02-16  Kazu Hirata  <kazu@hxi.com>
4408         * vms.c: Fix formatting.
4410 2001-02-14  H.J. Lu  <hjl@gnu.org>
4412         * elf.c (elf_find_function): New function.
4413         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4414         the file name and function name.
4416 2001-02-14  Nick Clifton  <nickc@redhat.com>
4418         * ecoff.c (bfd_debug_section): Update to initialise new fields in
4419         asection structure.
4421         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4422         (BFD64_BACKENDS): Add pepigen.c
4423         Add rules to create peigen.c and pepigen.c from peXXigen.c.
4425         * Makefile.in: Regenerate.
4426         * configure:  Regenerate.
4427         * po/POTFILES.in: Regenerate.
4428         * po/bfd.pot: Regenerate.
4430 2001-02-14  H.J. Lu  <hjl@gnu.org>
4432         * libcoff-in.h (pe_tdata): Add members target_subsystem and
4433         force_minimum_alignment.
4435 2001-02-14  Bo Thorsen  <bo@suse.de>
4437         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4438         (elf64_86_64_size_info): Struct added to fix a problem
4439         with the hashtable string entries.
4440         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4441         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4442         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4443         remove the FIXME for this.
4444         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4445         section. Also removed the FIXME for it.
4446         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4447         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4448         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4450 2001-02-13  Richard Henderson  <rth@redhat.com>
4452         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4453         and not user provided.
4455 2001-02-13  Kazu Hirata  <kazu@hxi.com>
4457         * vms.c (vms_print_symbol): Remove unreachable code.
4459         * rs6000-core.c: Fix formatting.
4461 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
4463         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4464         as _bfd_XXi_only_swap_filehdr_out.
4465         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4466         pe->force_minimum_alignment to TRUE.
4467         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4468         PEI_TARGET_SUBSYSTEM.
4469         (pe_print_private_bfd_data): Call
4470         _bfd_XX_print_private_bfd_data_common() instead of
4471         _bfd_pe_print_private_bfd_data_common().
4472         (pe_bfd_copy_private_bfd_data): Call
4473         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4474         _bfd_pe_bfd_copy_private_bfd_data_common().
4475         (coff_bfd_copy_private_section_data): Define as
4476         _bfd_XX_bfd_copy_private_section_data instead of
4477         _bfd_pe_bfd_copy_private_section_data.
4478         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4479         of a _bfd_pe_get_symbol_info.
4481         * peigen.c: Delete.
4483         * peXXigen.c: Renamed from peigen.c.
4484         (COFF_WITH_XX): Define this macro (will get expanded into
4485         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4486         compiled as peigen.c or pepigen.c.
4487         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4488         define the canonical PEP structures and definitions.
4489         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4490         effect, enforce minimum file and section alignments.  If
4491         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4492         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4493         so, by default, this is a no-op).
4495         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4496         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4497         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4498         _bfd_pefoo if it's not defined.  Use these macros to define
4499         coff swap macros.
4501         * libcoff.h (pe_tdata): Add members target_subsystem and
4502         force_minimum_alignment.
4504         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4505         COFF_WITH_pep.
4506         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4508         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4509         peigen.lo.
4511         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4512         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4513         PEPAOUTHDR.
4515         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4516         (BFD64_BACKENDS_CFILES): Mention pepigen.c
4517         (peigen.c): Add rule to generate from peXXigen.c.
4518         (pepigen.c): Ditto.
4519         (pepigen.lo): List dependencies for pepigen.lo.
4521 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
4523         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
4524         $global$ referenced but not defined, set its value here.
4526 2001-02-09  Bo Thorsen  <bo@suse.de>
4528         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4529         alignment to 3.
4530         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4531         and relocation.
4532         (elf64_x86_64_relocate_section): Fix formatting.
4533         (elf64_x86_64_relocate_section): Fix addend for relocation of
4534         R_X86_64_(8|16|32|PC8|PC16|PC32).
4536 2001-02-12  Jan Hubicka  <jh@suse.cz>
4538         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4540 2001-02-11  H.J. Lu  <hjl@gnu.org>
4542         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4543         alignment.
4545 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4547         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4548         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
4549         relocations against dynsym symbols.
4551         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4552         the R_MIPS_26 relocation.
4553         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4554         the R_MIPS_26 relocation.
4555         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4556         relocation.
4557         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4558         the R_MIPS_26 relocation.
4559         (mips_elf64_howto_table_rela): Likewise.
4561         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4562         member to mark symbols that have non-CALL relocations against
4563         them.
4564         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4565         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4566         R_MIPS_GOT16.
4567         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4568         non-CALL relocation against it is encountered.
4569         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4570         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4571         no_fn_stub is not set.
4573         * elf32-mips.c (mips_elf_output_extsym): Get the output section
4574         information from the real symbol for indirect ones.
4575         Check no_fn_stub to find out if a symbol has a function stub
4576         indeed.
4578 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
4580         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4581         * Makefile.in: Regenerate.
4583 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
4585         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
4586         true if section name is an unwind table section name.
4587         (elfNN_ia64_additional_program_headers): Count each unwind section
4588         separately.
4589         (elfNN_ia64_modify_segment_map): Install one unwind program header
4590         for each unwind separate section.  Note: normally the linker
4591         script merges the unwind sections that go into a single segment,
4592         so this still generates at most one unwind program header per
4593         segment.
4595         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4596         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4597         (elfNN_ia64_fake_sections): Mark sections with names that start
4598         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4599         unwind section.
4601         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4602         Use it to make sh_info in unwind section point to the text section
4603         it applies to.
4605 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4607         * Makefile.am: Add linux target for S/390.
4608         * archures.c: Likewise.
4609         * bfd-in2.h: Likewise.
4610         * config.bfd: Likewise.
4611         * configure.in: Likewise.
4612         * elf.c: Likewise.
4613         * libbfd.h: Likewise.
4614         * targets.c: Likewise.
4615         * cpu-s390.c: New file.
4616         * elf32-s390.c: New file.
4617         * elf64-s390.c: New file.
4619 2001-02-09  Nick Clifton  <nickc@redhat.com>
4621         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4622         ImageBase.  This has already been done by coff_swap_hdr_in.
4624 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
4626         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4628 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
4630         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4631         (sparc64_elf_relocate_section): Likewise.
4633 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
4635         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4636         similar to R_SPARC_32.
4637         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4639 2001-02-08  H.J. Lu  <hjl@gnu.org>
4641         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4642         relocation entries for weak definitions when building DSO with
4643         -Bsymbolic.
4645 2001-02-08  Richard Henderson  <rth@redhat.com>
4647         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4648         before visibility.  Locally defined protected symbols are not
4649         dynamic.
4651 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
4653         * config.bfd: Enable coff64 for rs6000-*.  Patch from
4654         <hzoli@austin.ibm.com>.
4656 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
4658         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4659         found, do not attempt to find dwarf2 info before returning.
4661 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
4663         * elflink.h (is_global_symbol_definition): Rename to
4664         is_global_data_symbol_definition and have it reject function
4665         symbols.
4666         (elf_link_is_defined_archive_symbol): Use renamed function.
4668 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
4670         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4671         * libbfd.h (bfd_target_vector): Likewise.
4672         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4673         make static; create pointer reference named bfd_target_vector.
4674         (_bfd_target_vector_entries): Calculate this based on the array
4675         typed _bfd_target_vector.
4677 2001-02-06  H.J. Lu  <hjl@gnu.org>
4679         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4680         internal symbols are not dynamic.
4681         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4683 2001-02-06  Nick Clifton  <nickc@redhat.com>
4685         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4686         that it will not be pulled into the list of files that make up
4687         po/POTFILES.in.
4688         * Makefile.in: Regenerate.
4689         * po/bfd.pot:  Regenerate.
4691 2001-02-06  H.J. Lu  <hjl@gnu.org>
4693         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4694         checking.
4695         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4696         external_PEI_IMAGE_hdr.
4698 2001-02-06  Kazu Hirata  <kazu@hxi.com>
4700         * elf-m10200.c: Fix formatting.
4702 2001-02-04  Nick Clifton  <nickc@redhat.com>
4704         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4705         rel, it will be handled later on.
4707 2001-02-02  Fred Fish  <fnf@ninemoons.com>
4709         * Makefile.in: Fix typo.
4711 2001-02-01  Kazu Hirata  <kazu@hxi.com>
4713         * elf-m10300.c: Fix formatting.
4715 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
4717         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4718         (elf_backend_get_symbol_type): Define.
4719         (elf64_hppa_object_p): Set architecture and machine from elf
4720         header flags.
4722 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
4724         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4725         before mdebug.
4727 2001-01-26  Richard Henderson  <rth@redhat.com>
4729         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4730         for non-default visibility.
4731         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4732         delete ugly macro and replace with pretty function.
4734 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
4736         * coff-go32.c: Update copyright.
4737         * coff-stgo32.c: Likewise.
4738         * coff-go32.c (COFF_LONG_FILENAMES): Define.
4739         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4740         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4741         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4743 2001-01-25  Kazu Hirata  <kazu@hxi.com>
4745         * bfd-in2.h: Rebuild.
4746         * libbfd.h: Likewise.
4748 2001-01-23  H.J. Lu  <hjl@gnu.org>
4750         * bfd-in2.h: Rebuild.
4752 2001-01-23  H.J. Lu  <hjl@gnu.org>
4754         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4755         is NULL or PRIV(vms_rec) is outside of the buffer.
4757 2001-01-23  Kazu Hirata  <kazu@hxi.com>
4759         * coff64-rs6000.c: Fix formatting.
4760         * coff-arm.c: Likewise.
4761         * coffgen.c: Likewise.
4762         * cofflink.c: Likewise.
4763         * coff-mcore.c: Likewise.
4764         * coff-mips.c: Likewise.
4765         * coff-pmac.c: Likewise.
4766         * coff-ppc.c: Likewise.
4767         * coff-rs6000.c: Likewise.
4768         * elf32.c: Likewise.
4769         * elf32-fr30.c: Likewise.
4770         * elf32-i370.c: Likewise.
4771         * elf32-i860.c: Likewise.
4772         * elf32-m32r.c: Likewise.
4773         * elf32-m68k.c: Likewise.
4774         * elf32-mcore.c: Likewise.
4775         * elf32-ppc.c: Likewise.
4776         * elf32-sh.c: Likewise.
4777         * elf32-v850.c: Likewise.
4778         * elf64-alpha.c: Likewise.
4779         * elf64-sparc.c: Likewise.
4780         * elflink.c: Likewise.
4781         * elflink.h: Likewise.
4782         * elf-m10200.c: Likewise.
4783         * elf-m10300.c: Likewise.
4784         * elfxx-ia64.c: Likewise.
4786         * aoutx.h: Fix formatting.
4787         * bfd.c: Likewise.
4788         * bfd-in2.h: Likewise.
4789         * bfd-in.h: Likewise.
4790         * cpu-i386.c: Likewise.
4791         * cpu-m68hc11.c: Likewise.
4792         * dwarf2.c: Likewise.
4793         * elf64-x86-64.c: Likewise.
4794         * format.c: Likewise.
4795         * freebsd.h: Likewise.
4796         * hash.c: Likewise.
4797         * hp300hpux.c: Likewise.
4798         * hppabsd-core.c: Likewise.
4799         * hpux-core.c: Likewise.
4801 2001-01-22  Bo Thorsen  <bo@suse.de>
4803         * elf64-x86-64.c: Added PIC support for X86-64.
4804         (elf64_x86_64_link_hash_newfunc): Function added.
4805         (elf64_x86_64_link_hash_table_create): Likewise.
4806         (elf64_x86_64_check_relocs): Likewise.
4807         (elf64_x86_64_gc_mark_hook): Likewise.
4808         (elf64_x86_64_gc_sweep_hook): Likewise.
4809         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4810         (elf64_x86_64_size_dynamic_sections): Likewise.
4811         (elf64_x86_64_discard_copies): Likewise.
4812         (elf64_x86_64_finish_dynamic_symbol): Likewise.
4813         (elf64_x86_64_finish_dynamic_sections): Likewise.
4814         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4816 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4818         * Makefile.am (install-data-local): Make use of $(DESTDIR).
4819         * Makefile.in: Regenerate.
4821 2001-01-21  Kazu Hirata  <kazu@hxi.com>
4823         * coff-a29k.c: Fix formatting.
4825 2001-01-19  H.J. Lu  <hjl@gnu.org>
4827         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4828         relocation section names.
4829         (elf_i386_relocate_section): Report files with bad relocation
4830         section names and return false.
4832 2001-01-17  Bo Thorsen  <bo@suse.de>
4834         * targets.c: Alphabetize list of xvecs.
4836 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
4838         * config.bfd: Add linux target variant for elfxx-hppa.
4839         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4840         bfd_elf64_hppa_linux_vec.
4841         * configure: Regenerate.
4842         * elf64-hppa.c: Include elf64-target.h again to support linux
4843         target variant.
4844         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4845         * elf32-hppa.c: Include elf32-target.h again to support linux
4846         target variant.
4847         (elf32_hppa_post_process_headers): New function.
4848         (elf_backend_post_process_headers): Define.
4849         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4850         bfd_elf32_hppa_linux_vec.
4852         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4853         and data_segment_base fields.
4854         (elf32_hppa_link_hash_table_create ): Init them.
4855         (elf32_hppa_check_relocs): Update comments.
4856         (hppa_record_segment_addr): New function.
4857         (elf32_hppa_relocate_section): Call it.
4858         (final_link_relocate): Handle R_PARISC_SEGREL32.
4859         (elf32_hppa_final_link): New function.
4860         (bfd_elf32_bfd_final_link): Define to call it.
4861         (hppa_unwind_entry_compare): New function.
4862         * cache.c (bfd_open_file): Create files in write+read mode.
4864         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4865         SEGREL32 and numerous other relocs.  Change duplicate
4866         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4868         * opncls.c (bfd_fdopenr): Add parens like the comment says around
4869         O_ACCMODE.
4871         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4872         .plt entries for DT_INIT and DT_FINI.
4873         (elf32_hppa_finish_dynamic_sections): Remove special handling of
4874         DT_INIT and DT_FINI.
4876         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4877         offsets for stub .plt access if wide mode.  Check offset in range.
4879 2001-01-13  Nick Clifton  <nickc@redhat.com>
4881         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4882         line.
4884         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4885         line.
4887 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
4889         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4890         * configure: Regenerate.
4892 2001-01-11  Peter Targett  <peter.targett@arccores.com>
4894         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4895         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4896         * cpu-arc.c (arch_info_struct): Add entries for variants.
4897         (bfd_arc_arch) Set default to bfd_mach_arc_5.
4898         (arc_get_mach) Don't assume machine names prefixed arc- before
4899         testing.
4900         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4901         selections.
4902         (arc_elf_final_write_processing) Likewise.
4903         (ELF_MACHINE_CODE) Use EM_ARC.
4905 2001-01-10  Nick Clifton  <nickc@redhat.com>
4907         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4909 2001-01-07  Philip Blundell  <philb@gnu.org>
4911         * README: Replace `bug-gnu-utils@gnu.org' with
4912         `bug-binutils@gnu.org'.
4914 2001-01-04  Kazu Hirata  <kazu@hxi.com>
4916         * som.c: Fix formatting.
4918 2001-01-03  Kazu Hirata  <kazu@hxi.com>
4920         * ecoffswap.h: Fix formatting.
4921         * elf-bfd.h: Likewise.
4922         * elfarm-nabi.c: Likewise.
4923         * elfarm-oabi.c: Likewise.
4924         * elfcode.h: Likewise.
4925         * elfcore.h: Likewise.
4926         * elflink.c: Likewise.
4927         * elflink.h: Likewise.
4928         * elfxx-ia64.c: Likewise.
4929         * elfxx-target.h: Likewise.
4930         * libbfd.c: Likewise
4931         * linker.c: Likewise.
4932         * lynx-core.c: Likewise.
4934 2001-01-02  Kazu Hirata  <kazu@hxi.com>
4936         * pc532-mach.c: Fix formatting.
4937         * pe-arm.c: Likewise.
4938         * pe-i386.c: Likewise.
4939         * pe-mips.c: Likewise.
4940         * pe-ppc.c: Likewise.
4941         * pe-sh.c: Likewise.
4942         * pei-mips.c: Likewise.
4943         * pei-sh.c: Likewise.
4944         * peicode.h: Likewise.
4945         * ppcboot.c: Likewise.
4946         * ptrace-core.c: Likewise.
4948 2001-01-01  Kazu Hirata  <kazu@hxi.com>
4950         * reloc.c: Fix formatting.
4951         * riscix.c: Likewise.
4952         * rs6000-core.c: Likewise.
4953         * xcoff-target.h: Likewise.
4955 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
4957         * elfcode.h (elf_object_p): Also restore the bfd mach field on
4958         error, by calling bfd_default_set_arch_mach with incoming
4959         values.
4961 2000-12-26  Kazu Hirata  <kazu@hxi.com>
4963         * vaxnetbsd.c: Fix formatting.
4964         * versados.c: Likewise.
4965         * vms-gsd.c: Likewise.
4966         * vms-hdr.c: Likewise.
4967         * vms-misc.c: Likewise.
4969 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
4971         * archive.c (coff_write_armap): Don't write more than symbol_count
4972         `archive_member_file_ptr's.
4974 2000-12-25  Kazu Hirata  <kazu@hxi.com>
4976         * vms-tir.c: Fix formatting.
4978 2000-12-23  Kazu Hirata  <kazu@hxi.com>
4980         * vms.c: Fix formatting.
4981         * vms.h: Likewise.
4983 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
4985         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4987         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4989         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4990         arithmetic.
4992         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4994         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4996 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
4998         * libbfd.c (bfd_get_bits): Added
4999         (bfd_put_bits): Likewise
5000         * bfd-in.h: Declared the above.
5001         * bfd-in2.h: Regenerated.
5003 2000-12-20  Kazu Hirata  <kazu@hxi.com>
5005         * targets.c: Fix formatting.
5006         * tekhex.c: Likewise.
5007         * trad-core.c: Likewise.
5009 2000-12-19  Kazu Hirata  <kazu@hxi.com>
5011         * sco5-core.c: Fix formatting.
5012         * section.c: Likewise.
5013         * sparclinux.c: Likewise.
5014         * sparclynx.c: Likewise.
5015         * sparcnetbsd.c: Likewise.
5016         * srec.c: Likewise.
5017         * stabs.c: Likewise.
5018         * stab-syms.c: Likewise.
5019         * sunos.c: Likewise.
5020         * syms.c: Likewise.
5021         * sysdep.h: Likewise.
5023 2000-12-18  Nick Clifton  <nickc@redhat.com>
5025         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5026         defined.
5027         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5028         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5030 2000-12-18  Nick Clifton  <nickc@redhat.com>
5032         * vms-misc.c (_bfd_vms_get_record): Add default case to
5033         file_format switch.
5035 2000-12-15  Miloslav Trmac <mitr@volny.cz>
5037         * elfcore.h (elf_core_file_p): Move to the start of the program
5038         headers before attempting to read them.
5040 2000-12-14  Kazu Hirata  <kazu@hxi.com>
5042         * peigen.c: Fix formatting.
5043         * som.c: Likewise.
5044         * som.h: Likewise.
5046 2000-12-13  Kazu Hirata  <kazu@hxi.com>
5048         * peigen.c: Fix formatting.
5050 2000-12-12  Jim Wilson  <wilson@redhat.com>
5052         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5054 2000-12-08  Mark Salter  <msalter@redhat.com>
5056         * binary.c (binary_set_section_contents): Ignore sections
5057         with zero size.
5059 2000-12-12  Kazu Hirata  <kazu@hxi.com>
5061         * m68klinux.c: Fix formatting.
5062         * m68knetbsd.c: Likewise.
5063         * mipsbsd.c: Likewise.
5064         * netbsd-core.c: Likewise.
5065         * netbsd.h: Likewise.
5066         * newsos3.c: Likewise.
5067         * nlm32-alpha.c: Likewise.
5068         * nlm32-i386.c: Likewise.
5069         * nlm32-ppc.c: Likewise.
5070         * nlm32-sparc.c: Likewise.
5071         * nlmcode.h: Likewise.
5072         * nlmswap.h: Likewise.
5073         * nlm-target.h: Likewise.
5074         * ns32knetbsd.c: Likewise.
5076 2000-12-10  Fred Fish  <fnf@be.com>
5078         * elflink.h (elf_link_output_extsym): Don't complain about undefined
5079         symbols in shared objects if allow_shlib_undefined is true.
5081 2000-12-12  Nick Clifton  <nickc@redhat.com>
5083         * cpu-sh.c: Fix formattng.
5084         * elf.c: Fix formattng.
5085         * elf32-mips.c: Fix formattng.
5086         * elf32-sh.c: Fix formattng.
5087         * elf64-alpha.c: Fix formattng.
5089 2000-12-09  Nick Clifton  <nickc@redhat.com>
5091         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5092         dwarf2_find_line_info as last parameter to invocation of
5093         _bfd_dwarf2_find_nearest_line.
5094         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5095         dwarf2_find_line_info as last parameter to invocation of
5096         _bfd_dwarf2_find_nearest_line.
5098 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
5100         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5101         (BFD_LIBS): ...to here.
5102         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5103         (BFD_LIBS_CFILES): ...to here.
5104         * Makefile.in: Regenerate.
5105         * configure.in: Remove dwarf.lo from the elf shell variable.
5106         * configure: Regenerate.
5107         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5108         * libcoff.h: Regenerate.
5109         * coffgen.c (coff_find_nearest_line): Call
5110         _bfd_dwarf2_find_nearest_line.
5111         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5112         accordingly.
5113         (read_abbrevs): Likewise
5114         (decode_line_info): Likewise.
5115         (parse_comp_unit): Likewise.
5116         (comp_unit_find_nearest_line): Likewise.
5117         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5118         * libbfd.h: Regenerate.
5119         * elf.c (_bfd_elf_find_nearest_line): Update call.
5120         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5121         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5122         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5123         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5124         (styp_to_sec_flags): Handle DWARF2 sections.
5125         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5126         to _bfd_find_nearest_line.
5127         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5128         call to _bfd_find_nearest_line.
5130 2000-12-08  Kazu Hirata  <kazu@hxi.com>
5132         * coffgen.c: Fix formatting.
5133         * elf-m10300.c: Likewise.
5134         * elf32-i386.c: Likewise.
5135         * elf32-i960.c: Likewise.
5136         * elf32-m68k.c: Likewise.
5137         * elf32-mcore.c: Likewise.
5138         * elf32-ppc.c: Likewise.
5139         * elf32-sh.c: Likewise.
5140         * elf32-sparc.c: Likewise.
5141         * elf32-v850.c: Likewise.
5142         * elf64-alpha.c: Likewise.
5143         * elf64-hppa.c: Likewise.
5144         * elf64-mips.c: Likewise.
5145         * elf64-sparc.c: Likewise.
5147 2000-12-07  Kazu Hirata  <kazu@hxi.com>
5149         * elf32-ppc.c: Fix formatting.
5150         * elf64-x86-64.c: Likewise.
5152 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
5154         From  Ralf Baechle  <ralf@gnu.org>
5156         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5157         BFDs containing no sections or empty .text, .data or .bss sections
5158         to be merged, regardless of their flags.
5160 2000-12-06  Kazu Hirata  <kazu@hxi.com>
5162         * elf32-m32r.c: Fix formatting.
5163         * elf32-m68hc11.c: Likewise.
5164         * elf32-m68hc12.c: Likewise.
5165         * elf32-m68k.c: Likewise.
5166         * elf32-mcore.c: Likewise.
5167         * elf32-pj.c: Likewise.
5168         * elf32-ppc.c: Likewise.
5170 2000-12-05  Kazu Hirata  <kazu@hxi.com>
5172         * elf32-fr30.c: Fix formatting.
5173         * elf32-hppa.c: Likewise.
5174         * elf32-i370.c: Likewise.
5175         * elf32-i386.c: Likewise.
5176         * elf32-i860.c: Likewise.
5177         * elf32-i960.c: Likewise.
5179 2000-12-03  Kazu Hirata  <kazu@hxi.com>
5181         * elf32-arm.h: Fix formatting.
5182         * elf32-avr.c: Likewise.
5183         * elf32-cris.c: Likewise.
5184         * elf32-d10v.c: Likewise.
5185         * elf32-d30v.c: Likewise.
5186         * elf-hppa.h: Likewise.
5187         * elf-m10200.c: Likewise.
5188         * elf-m10300.c: Likewise.
5190 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
5192         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5193         bfd_mach_mips32_4k.  Update FIXME comment.
5194         * archures.c (bfd_mach_mips32): New constant.
5195         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5196         the latter, renumber it.
5197         * bfd-in2.h (bfd_mach_mips32): New constant.
5198         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5199         the latter, renumber it.
5200         * cpu-mips.c (I_mips32): New constant.
5201         (I_mips4K, I_mips32_4k): Rename the former to the latter.
5202         (arch_info_struct): Add bfd_mach_mips32 entry, replace
5203         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5204         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5205         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
5206         with E_MIPS_MACH_MIPS32_4K.
5207         (_bfd_mips_elf_final_write_processing): Replace
5208         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5209         bfd_mach_mips32 case.
5210         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5211         comparison with support for MIPS32.
5212         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5213         MIPS32.
5215         * aoutx.h (NAME(aout,machine_type)): Add cases for
5216         bfd_mach_mips5 and bfd_mach_mips64.
5217         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5218         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5219         * cpu_mips.c (I_mips5, I_mips64): New definitions.
5220         (arch_info_struct): Add entries for bfd_mach_mips5 and
5221         bfd_mach_mips64.
5222         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5223         _bfd_mips_elf_print_private_bfd_data): Add cases for
5224         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5225         (_bfd_mips_elf_final_write_processing): Add cases for
5226         bfd_mach_mips5 and bfd_mach_mips64.
5228         * aoutx.h (NAME(aout,machine_type)): Add a
5229         bfd_mach_mips_sb1 case.
5230         * archures.c (bfd_mach_mips_sb1): New constant.
5231         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5232         * cpu-mips.c (I_sb1): New constant.
5233         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5234         * elf32-mips.c (elf_mips_mach): Add case for
5235         E_MIPS_MACH_SB1.
5236         (_bfd_mips_elf_final_write_processing): Add case for
5237         bfd_mach_mips_sb1.
5239 2000-12-01  Joel Sherrill <joel@OARcorp.com>
5241         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5242         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5243         (sparc*-*-rtems*): Switched from a.out to ELF.
5245 2000-11-30  Jan Hubicka  <jh@suse.cz>
5247         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5248         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5249         (elf64-x86-64.lo): Add dependencies.
5250         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5251         bfd_mach_x86_64_intel_syntax.
5252         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5253         * config.bfd (x86_64): Add.
5254         * configure.in: Add support for bfd_elf64_x86_64_vec.
5255         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5256         (bfd_i386_arch, i8086_ar): Link in.
5257         * elf64-x86-64.c: New file.
5258         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5259         * targets.c (bfd_elf64_x86_64_vec): Add.
5260         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5262 2000-11-30  Kazu Hirata  <kazu@hxi.com>
5264         * xcofflink.c: Fix formatting.
5266 2000-11-28  Kazu Hirata  <kazu@hxi.com>
5268         * aoutx.h: Fix formatting.
5269         * bfd-in.h: Likewise.
5270         * bfd-in2.h: Likewise.
5271         * cache.c: Likewise.
5272         * cisco-core.c: Likewise.
5273         * coff64-rs6000.c: Likewise.
5274         * coffcode.h: Likewise.
5275         * coffswap.h: Likewise.
5276         * corefile.c: Likewise.
5277         * elf32-mips.c: Likewise.
5279 2000-11-27  Kazu Hirata  <kazu@hxi.com>
5281         * aout-adobe.c: Fix formatting.
5282         * coff64-rs6000.c: Likewise.
5283         * coffgen.c: Likewise.
5284         * cofflink.c: Likewise.
5286 2000-11-27  Philip Blundell  <pb@futuretv.com>
5288         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5289         (obj_coff_strings_written): New accessor macro for above.
5290         * libcoff.h: Regenerate.
5291         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5292         strings.
5293         * coffcode.h (coff_write_object_contents): No need to write out
5294         the string table if it's already been done.
5296 2000-11-22  Philip Blundell  <pb@futuretv.com>
5298         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5299         weak undefined symbols.
5301 2000-11-24  Nick Clifton  <nickc@redhat.com>
5303         * archures.c (bfd_mach_arm_5TE): Define.
5304         (bfd_mach_arm+XScale): Define.
5305         * bfd-in2.h: Regenerate.
5307         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5308         BFD_RELOC_ARM_PCREL_BLX.
5310         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5311         XScale machine numbers.
5313         * config.bfd (xscale-elf): Add target.
5314         (xscale-coff): Add target.
5316         * cpu-arm.c: Add xscale machine name.
5317         Add v5t, v5te and XScale machine numbers.
5319 2000-11-23  Kazu Hirata  <kazu@hxi.com>
5321         * aix386-core.c: Fix formatting.
5323 2000-11-22  Jim Wilson  <wilson@redhat.com>
5325         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5326         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5327         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5328         (ins_imms_scaled): Initialize sign_bit at function entry.
5329         (elf64_ia64_operands): Add missing initializers.
5330         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5331         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5332         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5333         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5334         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5335         parameters.
5336         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5337         and free_extsyms at function entry.
5338         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5339         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5340         (get_got): Delete unused local srel.
5341         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5342         (elfNN_ia64_relocate_section): Delete unused local dynindx.
5344 2000-11-21  Kazu Hirata  <kazu@hxi.com>
5346         * coff-a29k.c: Fix formatting.
5347         * coff-h8500.c: Likewise.
5348         * coff-i960.c: Likewise.
5349         * coff-ppc.c: Likewise.
5350         * coff-rs6000.c: Likewise.
5351         * coff-stgo32.c: Likewise.
5352         * coff-tic54x.c: Likewise.
5353         * coff-w65.c: Likewise.
5354         * cpu-h8500.c: Likewise.
5355         * cpu-hppa.c: Likewise.
5356         * cpu-ns32k.c: Likewise.
5357         * ecoff.c: Likewise.
5358         * ecofflink.c: Likewise.
5360 2000-11-21  Nick Clifton  <nickc@redhat.com>
5362         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5363         remove possibility of infinite loop.
5365 2000-11-20  Kazu Hirata  <kazu@hxi.com>
5367         * aix386-core.c: Fix formatting.
5368         * aout-adobe.c: Likewise.
5369         * aout-arm.c: Likewise.
5370         * aout-encap.c: Likewise.
5371         * aout-ns32k.c: Likewise.
5372         * aout-target.h: Likewise.
5373         * aout-tic30.c: Likewise.
5374         * aoutf1.h: Likewise.
5375         * aoutx.h: Likewise.
5376         * archive.c: Likewise.
5377         * bfd-in.h: Likewise.
5378         * bfd-in2.h: Likewise.
5379         * bfd.c: Likewise.
5380         * bout.c: Likewise.
5382 2000-11-17  H.J. Lu  <hjl@gnu.org>
5384         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5385         pltoff entries for DT_INIT and DT_FINI.
5386         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5387         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5388         entries.
5390 2000-11-16  Richard Henderson  <rth@redhat.com>
5392         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5393         (allocate_dynrel_entries): Likewise.
5394         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
5395         (set_pltoff_entry): Likewise.
5396         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5397         (elfNN_ia64_reloc_type_lookup): Likewise.
5398         (elfNN_ia64_install_value): Likewise.
5399         (elfNN_ia64_relocate_section): Likewise.
5400         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5401         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5403 2000-11-16  Kazu Hirata  <kazu@hxi.com>
5405         * cpu-a29k.c: Fix formatting.
5406         * cpu-alpha.c: Likewise.
5407         * cpu-arm.c: Likewise.
5408         * cpu-avr.c: Likewise.
5409         * cpu-d10v.c: Likewise.
5410         * cpu-h8500.c: Likewise.
5411         * cpu-hppa.c: Likewise.
5412         * cpu-i370.c: Likewise.
5413         * cpu-i386.c: Likewise.
5414         * cpu-i960.c: Likewise.
5415         * cpu-ia64-opc.c: Likewise.
5416         * cpu-ia64.c: Likewise.
5417         * cpu-m32r.c: Likewise.
5418         * cpu-m68hc11.c: Likewise.
5419         * cpu-m68hc12.c: Likewise.
5420         * cpu-m68k.c: Likewise.
5421         * cpu-m88k.c: Likewise.
5422         * cpu-mips.c: Likewise.
5423         * cpu-ns32k.c: Likewise.
5424         * cpu-pj.c: Likewise.
5425         * cpu-powerpc.c: Likewise.
5426         * cpu-sh.c: Likewise.
5427         * cpu-sparc.c: Likewise.
5428         * cpu-tic54x.c: Likewise.
5429         * cpu-v850.c: Likewise.
5430         * cpu-vax.c: Likewise.
5431         * cpu-w65.c: Likewise.
5432         * cpu-we32k.c: Likewise.
5433         * cpu-z8k.c: Likewise.
5434         * dwarf1.c: Likewise.
5435         * dwarf2.c: Likewise.
5437 2000-11-15  Kazu Hirata  <kazu@hxi.com>
5439         * coff-arm.c: Fix formatting.
5440         * coff-ppc.c: Likewise.
5441         * coff-rs6000.c: Likewise.
5442         * coff-sh.c: Likewise.
5443         * coff-sparc.c: Likewise.
5444         * coff-tic30.c: Likewise.
5445         * coff-tic54x.c: Likewise.
5446         * coff-tic80.c: Likewise.
5447         * coff-w65.c: Likewise.
5448         * coff-we32k.c: Likewise.
5449         * coff-z8k.c: Likewise.
5451 2000-11-15  Richard Henderson  <rth@redhat.com>
5453         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5454         section with the same ALLOC|LOAD flags as the source section.
5456 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
5458         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5459         by STO_ALPHA constants.
5461 2000-11-14  Kazu Hirata  <kazu@hxi.com>
5463         * coff-pmac.c: Fix formatting.
5464         * coff-ppc.c: Likewise.
5466 2000-11-13  H.J. Lu  <hjl@gnu.org>
5468         * elflink.h (elf_link_add_object_symbols): Also add indirect
5469         symbols for common symbols with the default version.
5471 2000-11-09  Philip Blundell  <pb@futuretv.com>
5473         * section.c (STD_SECTION): Set gc_mark flag.
5475 2000-11-11  Kazu Hirata  <kazu@hxi.com>
5477         * coff-i960.c: Likewise.
5478         * coff-m68k.c: Likewise.
5479         * coff-m88k.c: Likewise.
5480         * coff-mcore.c: Likewise.
5481         * coff-mips.c: Likewise.
5483 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
5485         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5487 2000-11-10  Kazu Hirata  <kazu@hxi.com>
5489         * coff-h8300.c: Fix formatting.
5490         * coff-h8500.c: Likewise.
5491         * coff-i386.c: Likewise.
5492         * coff-i860.c: Likewise.
5493         * coff-i960.c: Likewise.
5494         * coff-ia64.c: Likewise.
5496 2000-11-09  Kazu Hirata  <kazu@hxi.com>
5498         * archive.c: Fix formatting.
5499         * archures.c: Likewise.
5501 2000-11-07  Richard Henderson  <rth@redhat.com>
5503         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5504         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
5505         * section.c (bfd_set_section_contents): Call memcpy if
5506         section->contents set and location not equal to contents plus offset.
5508 2000-11-08  Kazu Hirata  <kazu@hxi.com>
5510         * bfd-in.h: Fix formatting.
5511         * bfd-in2.h: Likewise.
5512         * bfd.c: Likewise.
5513         * binary.c: Likewise.
5514         * bout.c: Likewise.
5515         * coff-a29k.c: Likewise.
5516         * coff-alpha.c: Likewise.
5517         * coff-apollo.c: Likewise.
5518         * coff-aux.c: Likewise.
5520 2000-11-07  Kazu Hirata  <kazu@hxi.com>
5522         * aix386-core.c: Fix formatting.
5523         * aoutf1.h: Likewise.
5524         * aoutx.h: Likewise.
5525         * archures.c: Likewise.
5526         * armnetbsd.c: Likewise.
5528 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
5530         * coff-h8300.c (special): Adjust reloc address.
5532 2000-11-06  Steve Ellcey <sje@cup.hp.com>
5534         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5535         to differentiate elf32 and elf64 on ia64.
5536         * bfd-in2.h: Regenerate.
5537         * config.bfd: Add target for "ia64*-*-hpux*".
5538         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5539         * configure: Regenerate.
5540         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5541         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5543         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5544         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
5545         * Makefile.in: Regnerate.
5546         * elf64-ia64.c: Deleted.
5547         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5549 2000-11-06  Kazu Hirata  <kazu@hxi.com>
5551         * aout-adobe.c: Fix formatting.
5552         * aout-arm.c: Likewise.
5553         * aout-cris.c: Likewise.
5554         * aout-encap.c: Likewise.
5555         * aout-ns32k.c: Likewise.
5556         * aout-target.h: Likewise.
5557         * aout-tic30.c: Likewise.
5559 2000-11-05  Philip Blundell  <philb@gnu.org>
5561         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5562         BFDs containing no sections to be merged, regardless of their flags.
5564 2000-11-04  Philip Blundell  <philb@gnu.org>
5566         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5567         if a relocation for an undefined symbol also results in an
5568         overflow.
5570 2000-11-06  Christopher Faylor <cgf@cygnus.com>
5572         * config.bfd: Add support for Sun Chorus.
5574 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
5576         * configure.in: Recognize alpha-*-freebsd*.
5577         * configure: Regenerate.
5579 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
5581         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5582         (Chunk): New global variable set by a parameter in objcopy.c.
5583         (S3Forced): New global variable set by a parameter in
5584         objcopy.c.
5585         (srec_set_section_contents): If S3Forced is true, always generate
5586         S3 records.
5587         (srec_write_section): Use 'Chunk' to limit maximum length of S
5588         records.
5590 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
5592         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5593         * Makefile.in: Regenerate.
5594         * bfd-in2.h: Regenerate.
5595         * po/bfd.pot: Regenerate.
5597 2000-10-31  Philip Blundell  <philb@gnu.org>
5599         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5600         EF_SOFT_FLOAT if it is defined.
5602 2000-10-27  Philip Blundell  <philb@gnu.org>
5604         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5605         attempts to mix PIC code with non-PIC, just mark the output as
5606         being position dependent.
5607         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
5608         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
5609         all mismatches, not just the first one.
5611 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
5613         * ieee.c (ieee_archive_p): Plug one of many possible
5614         memory leaks in error handling.
5616 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
5618         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5619         elf32_sparc_object_p, elf32_sparc_final_write_processing):
5620         Support v8plusb.
5621         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5622         sparc64_elf_object_p): Support v9b.
5623         * archures.c: Declare v8plusb and v9b machines.
5624         * bfd-in2.h: Ditto.
5625         * cpu-sparc.c: Ditto.
5627 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
5629         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5630         of a GOT reloc.
5632         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5633         (SYMBOL_CALLS_LOCAL): New macro.
5634         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5635         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5636         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5637         (ppc_elf_relocate_section): Use flag variable to determine
5638         whether the relocation refers to a local symbol.
5639         Test whether a PLTREL24 reloc will produce a reloc by looking
5640         to see whether a PLT entry was made.
5642 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
5644         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5645         entries that could serve as a definition for a weak symbol.
5647 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
5649         From  Ralf Baechle  <ralf@gnu.org>
5651         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5652         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
5653         against local symbols.
5654         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5656 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
5658         * section.c (struct sec): Add kept_section.
5659         (struct bfd_comdat_info): Remove sec, we can use above.
5660         (STD_SECTION): Add initializer.
5661         (bfd_make_section_anyway): Init here too.
5663         * bfd-in2.h: Regenerate.
5665         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5666         zeroing of `flags'.
5667         (elf_link_input_bfd): Set all asection->symbol->value's here, and
5668         fudge values for discarded link-once section symbols.
5670         * elf64-hppa.c: Include alloca-conf.h
5672 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
5674         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5676         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5678 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
5680         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5682 2000-10-10  Tom Rix <trix@redhat.com>
5684         * section.c (bfd_make_section_anyway): Release newsect ptr when
5685         newsect->symbol fails to alloc.  Use bfd_release instead of free.
5687 2000-10-09  Richard Henderson  <rth@cygnus.com
5689         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5690         (elf64_ia64_unwind_entry_compare): New.
5691         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5693 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
5695         * elflink.h (size_dynamic_sections): Don't create various tags if
5696         .dynstr is excluded from the link.  Don't set first dynsym entry
5697         if dynsymcount is zero.
5698         (elf_bfd_final_link): Don't try to swap out dynamic syms if
5699         .dynsym excluded from the link.  Don't try to write any dynamic
5700         sections excluded from the link.
5702         * elf.c (swap_out_syms): Handle global section symbols.
5704 2000-10-05  DJ Delorie  <dj@redhat.com>
5706         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5707         * coffcode.h (coff_set_alignment_hook): read extended reloc count
5708         (coff_write_relocs): write extended reloc count
5709         (coff_write_object_contents): account for extended relocs
5711 2000-10-05  Jim Wilson  <wilson@cygnus.com>
5713         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5714         field.
5715         * elf.c (_bfd_elf_make_section_from_shdr): Call the
5716         elf_backend_section_flags function.
5717         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5718         code.
5719         (elf64_ia64_section_flags): New function containing flag conversion
5720         code.
5721         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5722         * elfxx-target.h (elf_backend_section_flags): Define.
5723         (elfNN_bed): Initialize elf_backend_section_flags field.
5725 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
5727         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5728         _bfd_elf32_gc_record_vtable.  Correct a comment.
5730 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
5732         From  Ralf Baechle  <ralf@gnu.org>
5734         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5735         produces binaries with got[1] = 0x80000001 to differenciate them
5736         for the dynamic linker from the broken binaries produced by old
5737         versions.
5739 2000-09-30  Petr Sorfa <petrs@sco.com>
5741         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5742         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5743         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5744         * configure: Regenerate.
5746 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
5748         Define two bfd_targets for absence and presence of leading
5749         underscore on symbols.  Make sure to only link same kind.
5750         * elf32-cris.c (cris_elf_object_p,
5751         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5752         cris_elf_merge_private_bfd_data): New.
5753         (elf_backend_object_p, elf_backend_final_write_processing,
5754         bfd_elf32_bfd_print_private_bfd_data,
5755         bfd_elf32_bfd_merge_private_bfd_data): Define.
5756         <Target vector definition>: Include elf32-target.h twice with
5757         different macro settings:
5758         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5759         bfd_elf32_us_cris_vec.
5760         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5761         (elf_symbol_leading_char): First as 0, then '_'.
5762         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5763         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5764         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5765         * configure: Regenerate.
5766         * targets.c: Declare bfd_elf32_us_cris_vec.
5767         * po/bfd.pot: Regenerate.
5769 2000-09-29  Momchil Velikov  <velco@fadata.bg>
5771         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5772         R_ARM_THM_PC22 relocations.
5774 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
5776         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5778 2000-09-29  Momchil Velikov <velco@fadata.bg>
5780         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5781         is has the SEC_HAS_CONTENTS flag set.
5783 2000-09-28  ï¿½Ã–rjan Friberg  <orjanf@axis.com>
5784             Hans-Peter Nilsson  <hp@axis.com>
5786         * aout-cris.c (N_TXTADDR): Define.
5788 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
5790         * som.c: Include alloca-conf.h.
5791         * Makefile.am: "make dep-am"
5792         * Makefile.in: Regenerate.
5794 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
5796         * elf32-hppa.c (plt_stub): New.
5797         (PLT_STUB_ENTRY): Define.
5798         (elf32_hppa_link_hash_table): Change multi_subspace to packed
5799         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5800         (elf32_hppa_link_hash_table_create): Init to suit.
5801         (elf32_hppa_check_relocs): Set has_12bit_branch and
5802         has_17bit_branch as appropriate.
5803         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5804         non-local functions.
5805         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5806         Add space for plt_stub as needed.
5807         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5808         functions at plt_stub.
5809         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5810         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5812         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5813         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
5814         of fixed size, and if negative, disable handling of input sections
5815         before stub section.  Set up default stub group size depending
5816         on detected branch relocs.
5817         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5818         ensure different offsets from sym_value aren't rounded to
5819         different 2k blocks.  Use lrsel and rrsel for other stubs too for
5820         consistency rather than necessity.
5821         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5822         (final_link_relocate): Likewise.
5823         (elf32_hppa_relocate_section): Likewise.
5825         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5826         (_bfd_elf_hppa_gen_reloc_type): Generate them.
5827         (elf_hppa_final_link_relocate): Handle them.
5828         (elf_hppa_relocate_insn): Likewise.
5829         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5831 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
5833         * elfcode.h (elf_object_p): Preserve and clear abfd section
5834         information.  Restore at error.
5836 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
5838         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5839         is empty, make sure that its rva also 0. NT loader dislikes
5840         having otherwise.
5842 2000-09-26  Steve Ellcey <sje@cup.hp.com>
5844         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5845         global by default.
5847 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
5849         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5850         currently unused RELATIVE_DYNAMIC_RELOCS code.
5851         (hppa_discard_copies): Likewise.
5852         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
5853         comments.  Don't check non-code output sections for stub grouping.
5855 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
5857         * section.c (bfd_get_unique_section_name): Return NULL if
5858         bfd_malloc fails.
5860 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5862         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5863         instruction sequence to actually work.
5864         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5865         accordingly.
5867 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
5869         * elf32-sh.c (sh_elf_relocate_section): Use
5870         _bfd_final_link_relocate to apply the relocation against a section
5871         symbol, when doing relocatable links.
5873 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
5875         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5876         to id_sec.
5877         (stub_hash_newfunc): Here too.
5878         (hppa_add_stub): And here.
5879         (elf32_hppa_link_hash_table): Remove stub_section_created,
5880         reloc_section_created, first_init_sec and first_fini_sec.  Add
5881         stub_group.
5882         (elf32_hppa_link_hash_table_create): Init to suit.
5883         (hppa_get_stub_entry): Add support for grouping stub sections.
5884         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
5885         section code.  Index stub vars by section->id.
5886         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
5887         exit paths.  Zap allocation of above removed vars.  Refine
5888         link-once test.
5890         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5891         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5892         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5893         rather than pointer to bfd_link_info.
5894         (hppa_add_stub): Likewise.
5895         (final_link_relocate): Likewise.
5897 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
5899         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5900         link-once sections.
5902 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
5904         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5905         ld/emulparams/shelf.sh.
5907 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5909         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5910         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5911         * bfd-in2.h: Regenerate.
5913 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
5915         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5916         LITUSE relocations incorrectly if -relax is specified on the ld
5917         command line and the displacement field of the load or store
5918         instruction is non-zero. (Patch by paul.winalski@compaq.com)
5920 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
5922         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5923         first_fini_sec here.
5924         (elf32_hppa_size_stubs): Instead correctly find the first .init
5925         and .fini section here.
5927 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
5929         * elf32-hppa.c (clobber_millicode_symbols): New function.
5930         (elf32_hppa_size_dynamic_sections): Call it.
5932 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
5934         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5935         packed.  Add plabel, plt_abs packed booleans.
5936         (hppa_link_hash_newfunc): Init new fields.
5937         (PLABEL_PLT_ENTRY_SIZE): Define.
5938         (hppa_stub_name): Use size_t len vars.
5939         (hppa_add_stub): Likewise.
5940         (elf32_hppa_build_stubs): Likewise.
5941         (hppa_build_one_stub): Kill some compiler warnings.
5942         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5943         if dynamic linking.  Munge the local plt offsets into
5944         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
5945         size_t len vars.  Add assert for plabel addend.
5946         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5947         (elf32_hppa_hide_symbol): New function.
5948         (elf_backend_hide_symbol): Define.
5949         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5950         with h->plabel set.  Don't make plt entries to have dynamic syms
5951         when they have been forced local.  If plt entry is used by a
5952         plabel, make it PLABEL_PLT_ENTRY_SIZE.
5953         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5954         Set up .plt offsets for local syms.
5955         (elf32_hppa_relocate_section): Initialise plt entries for local
5956         syms.  Leave weak undefined plabels zero.  Make global plabel
5957         relocs against function symbol, and leave the addend zero.
5958         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5959         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5960         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
5961         relocs instead of SEGREL32 for dynamic got relocs.
5962         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5963         (elf_backend_got_header_size): Adjust.
5964         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5966         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5967         (hppa_type_of_stub): Use it instead of #if 0
5968         (hppa_discard_copies): Use it here too.
5969         (elf32_hppa_size_dynamic_sections): And here.
5971         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5972         (elf32_hppa_link_hash_table_create): And here.
5973         (hppa_build_one_stub): And here.  Instead keep track of stub
5974         offset using _raw_size.
5975         (elf32_hppa_size_stubs): Likewise.
5976         (elf32_hppa_build_stubs): Likewise.
5977         (hppa_size_one_stub): Likewise.  Resize reloc section too.
5979         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5980         first_fini_sec handling.  Don't search for reloc section or set
5981         hplink->reloc_section_created here.
5982         (elf32_hppa_size_stubs): Instead search for reloc sections, and
5983         set reloc_section_created here.
5984         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5985         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
5986         and DT_FINI.
5987         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
5989         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
5990         with `hplink->root.'.
5991         (elf32_hppa_check_relocs): Likewise.
5992         (elf32_hppa_gc_sweep_hook): Likewise.
5993         (elf32_hppa_adjust_dynamic_symbol): Likewise.
5994         (hppa_handle_PIC_calls): Likewise.
5995         (elf32_hppa_size_dynamic_sections): Likewise.
5996         (elf32_hppa_set_gp): Likewise.
5997         (elf32_hppa_relocate_section): Likewise.
5998         (elf32_hppa_finish_dynamic_symbol): Likewise.
5999         (elf32_hppa_finish_dynamic_sections): Likewise.
6001         From  David Huggins-Daines  <dhd@linuxcare.com>
6002         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6003         defined weak symbols in shared links.
6004         (final_link_relocate): Calls to defined weak symbols in shared
6005         objects must go via import stubs, as the target might not be known
6006         at link time.
6008 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
6010         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6011         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6012         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
6013         the original entries with EMPTY_HOWTOs, and added new ones to fill
6014         in the gap.
6015         (sh_elf_info_to_howto): Make sure the new gap isn't used.
6016         (sh_elf_relocate_section): Likewise.
6018 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
6020         * cpu-mips.c (arch_info_struct): Add mips:4K
6021         * bfd-in2.h (bfd_mach_mips4K): New define.
6022         * archures.c: Add bfd_mach_mips4K to comment.
6023         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6024         E_MIPS_ARCH_2 for bfd_mach_mips4K.
6026 2000-09-13  Marco Franzen <marcof@thyron.com>
6028         * som.c (som_write_symbol_strings): Do not used fixed buffers,
6029         use size_t as a counter.
6030         (som_write_space_strings): Similarly.
6032 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
6034         * elf32-i860.c (elf32_i860_relocate_pc26): New function
6035         and prototype.
6036         (elf32_i860_relocate_section): Invoke new function from here.
6038 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6040         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6041         static.
6043 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6045         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6046         target section name instead of dumping core when the target symbol is
6047         undefined.
6049 2000-09-09  Kazu Hirata  <kazu@hxi.com>
6051         * riscix.c: Remove DEFUN.
6053 2000-09-08  Nick Clifton  <nickc@redhat.com>
6055         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6056         initialise flags in output bfd if the input bfd is the default
6057         architecture with the default flags.
6059 2000-09-08  Kazu Hirata  <kazu@hxi.com>
6061         * archive.c: Fix formatting.
6062         * coff-arm.c: Likewise.
6063         * doc/chew.c: Likewise.
6065 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
6067         * section.c (bfd_get_unique_section_name): Put a dot before the
6068         numeric suffix.
6070 2000-09-07  Kazu Hirata  <kazu@hxi.com>
6072         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6073         * elf.c: Fix formatting.
6075 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
6077         * config.bfd (sh-*-linux*): Added.
6078         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6079         * targets.c: Declare them.
6080         * elf32-sh-lin.c: New file.
6081         * Makefile.am: Compile it.
6082         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6083         * configure, Makefile.in: Rebuilt.
6085 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
6087         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6088         pseduo-section when determining where the TOC ends.
6090         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6091         output x_tvndx as it is only two bytes wide.
6093         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6094         reloc is 26 or 32 bits wide.
6096         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6097         for relocs that don't change anything.  Also look at the full
6098         6 bits of bitsize.
6100 2000-09-06  Philip Blundell  <philb@gnu.org>
6102         * config.bfd (arm*-*-uclinux*): New target.
6104 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
6106         * configure: Rebuilt with new libtool.m4.
6108 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
6110         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6111         word for variable name.
6112         * bfd-in2.h: Regenerate.
6114 2000-09-05  Nick Clifton  <nickc@redhat.com>
6116         * config.in: Regenerate.
6117         * libbfd.h: Regenerate.
6118         * po/bfd.pot: Regenerate.
6119         * doc/bfdint.texi: Remove CVS date string - it foils compares with
6120         local versions.
6122 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
6124         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
6126 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
6128         Shared library and PIC support.
6129         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6130         (GOT_ENTRY_SIZE): New.
6131         (ELF_DYNAMIC_INTERPRETER): New.
6132         (STUB_SUFFIX): Define.
6133         (LONG_BRANCH_PIC_IN_SHLIB): Define.
6134         (RELATIVE_DYNAMIC_RELOCS): Define.
6135         (enum elf32_hppa_stub_type): New.
6136         (struct elf32_hppa_stub_hash_entry): Rename offset to
6137         stub_offset.  Add a number of new fields.
6138         (struct elf32_hppa_link_hash_entry): New.
6139         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
6140         global_value.
6141         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6142         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6143         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
6144         new fields.
6145         (hppa_link_hash_newfunc): New function.
6146         (elf32_hppa_link_hash_table_create): Use above function. Init new
6147         fields.
6148         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
6149         instead of addend, and remove sym_name from args.  Don't use
6150         symbol name for local syms, instead use sym index.
6151         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6152         stub type rather than size.  Pass in hash and handle import stub
6153         case.  Also pass in reloc instead of offset so we can calculate
6154         PCREL22F and PCREL12F branches properly.
6155         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
6156         import and export stubs too.
6157         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
6158         import and export stub sizing.
6159         (elf32_hppa_check_relocs): New function.
6160         (elf32_hppa_adjust_dynamic_symbol): New function.
6161         (hppa_discard_copies): New function.
6162         (elf32_hppa_size_dynamic_sections): New function.
6163         (elf_backend_size_dynamic_sections): Define.
6164         (elf32_hppa_finish_dynamic_symbol): New function.
6165         (elf_backend_finish_dynamic_symbol): Define.
6166         (elf32_hppa_size_stubs): Stash params in link hash table, and move
6167         some local vars into the link hash table too.  For shared links,
6168         trundle over function syms, generating export stubs.  Handle
6169         PCREL22F branches.  Break out stub creation code from here..
6170         (hppa_add_stub): .. to here.  New function.
6171         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6172         call the bfd linker.  Use elf_gp to record global pointer.
6173         Calculate a value from sections if $global$ is missing.
6174         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6175         (elf32_hppa_gc_mark_hook): New function.
6176         (elf_backend_gc_mark_hook): Define.
6177         (elf32_hppa_gc_sweep_hook): New function.
6178         (elf_backend_gc_sweep_hook): Define.
6179         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6180         Add rel to args, and remove howto, input_bfd, offset, addend,
6181         sym_name as we can recalculate these locally.  Handle calls to
6182         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
6183         handling of undefined weak syms.  Check that stubs are in range.
6184         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
6185         message on hitting a DPREL21L reloc that needs fixing.  Subtract
6186         off PC for PCREL14F.  Break out code that does a stub lookup from
6187         here..
6188         (hppa_get_stub_entry): ..to here.  New function.
6189         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6190         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6191         relocs, etc. etc.
6192         (elf32_hppa_finish_dynamic_sections): New function.
6193         (elf_backend_finish_dynamic_sections): Define.
6194         (elf_backend_final_write_processing) Define.
6195         (hppa_handle_PIC_calls): New function.
6196         (elf32_hppa_build_stubs): Call it.  Pass link_info to
6197         hppa_build_one_stub.
6198         (elf32_hppa_create_dynamic_sections): New function
6199         to create .plt and .got then set .plt flags correctly.
6200         (elf_backend_create_dynamic_sections): Define.
6201         (elf32_hppa_object_p): New function.
6202         (elf_backend_object_p): Define.
6203         (elf32_hppa_elf_get_symbol_type): New function.
6204         (elf_backend_get_symbol_type): Define.
6205         (elf_backend_can_gc_sections): Define.
6206         (elf_backend_want_got_plt): Define.
6207         (elf_backend_plt_alignment): Set to 2.
6208         (elf_backend_plt_readonly): Define.
6209         (elf_backend_want_plt_sym): Define.
6210         (elf_backend_got_header_size): Reserve one entry.
6212         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6213         (elf32_hppa_size_stubs): Pass in multi_subspace.
6214         (elf32_hppa_set_gp): Declare.
6216         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6217         (bfd_get_unique_section_name): New function.
6218         * bfd-in2.h: Regenerate.
6220         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6221         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6222         comment.
6224         From  David Huggins-Daines  <dhd@linuxcare.com>
6225         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6226         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6227         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6228         been updated in finish_dynamic_symbol before modifying function
6229         symbol.
6231         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6232         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
6233         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6234         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
6235         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
6236         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6237         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
6238         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6240         From David Huggins-Daines  <dhd@linuxcare.com>
6241         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6242         style of local labels as well.
6244 2000-09-03  Philip Blundell  <philb@gnu.org>
6246         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6247         references to undefined symbols in debugging sections.
6249 2000-09-02  H.J. Lu  <hjl@gnu.org>
6251         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6252         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6253         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6254         section.
6256 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
6258         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6259         (elf32_i860_is_local_label_name): New function and prototype.
6261 2000-09-02  Nick Clifton  <nickc@redhat.com>
6263         * configure.in: Increase version number to 2.10.91.
6264         * configure: Regenerate.
6265         * aclocal.m4: Regenerate.
6266         * config.in: Regenerate.
6267         * po/bfd.pot: Regenerate.
6269 2000-09-02  Daniel Berlin <dberlin@redhat.com>
6271         * elf.c (_bfd_elf_make_section_from_shdr): Add
6272         .gnu.linkobce.wi. to the list of debug section names.
6274 2000-09-02  Nick Clifton  <nickc@redhat.com>
6276         * dwarf2.c (find_debug_info): New function: Locate a section
6277         containing dwarf2 debug information.
6278         (bfd_dwarf2_find_nearest_line): Find all sections containing
6279         debug information and include them in the stash.
6281 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
6283         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6284         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6285         (sh_reloc_map): Add new relocs.
6286         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6287         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6288         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6289         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6290         functions.
6291         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6292         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6293         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6294         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6295         New array constants.
6296         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6297         New variables.
6298         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6299         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6300         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6301         elf_sh_plt_reloc_offset): Define.
6302         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6303         elf_sh_link_hash_table): New structs.
6304         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6305         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6306         relocation types.
6307         (elf_backend_create_dynamic_sections,
6308         bfd_elf32_bfd_link_hash_table_create,
6309         elf_backend_adjust_dynamic_symbol,
6310         elf_backend_size_dynamic_sections,
6311         elf_backend_finish_dynamic_symbol,
6312         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6313         elf_backend_plt_readonly, elf_backend_want_plt_sym,
6314         elf_backend_got_header_size, elf_backend_plt_header_size):
6315         Define.
6316         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6317         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6318         New relocs.
6319         * bfd-in2.h, libbfd.h: Rebuilt.
6321 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
6323         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6324         change.
6326 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
6328         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6329         not initialized, set them to indicate the SH1 instruction set.
6331 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
6333         * acinclude.m4: Include libtool and gettext macros from the
6334         top level.
6335         * aclocal.m4, configure: Rebuilt.
6337 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
6339         * elf.c: Eliminate references to __sparcv9 macro; replace with
6340         autoconf variables HAVE_PSINFO32_T etc.
6341         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6342         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6343         * config.in: Ditto.
6344         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6345         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6346         * aclocal.m4: Ditto.
6347         * configure: Regenerate.
6349 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
6351         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6352         for any shared link, not just shared -Bsymbolic.
6353         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6354         any shared link, and pass link info to it.
6355         (elf_i386_size_dynamic_sections): Update comment.
6356         (elf_i386_discard_copies): Modify to discard relocs for symbols
6357         that have been forced local.
6358         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6359         that have been forced local.
6361 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
6363         * elflink.h (elf_link_add_object_symbols): Allow common
6364         symbols to have an alignment of 1 if explicitly requested, and
6365         not overridden by other definitions.
6367 2000-08-22  Doug Kwan <dkwan@transmeta.com>
6369         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6370         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6372 2000-08-22  H.J. Lu  <hjl@gnu.org>
6374         * elf-bfd.h (elf_link_hash_table): Add runpath.
6376         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6377         * bfd-in2.h: Rebuilt.
6379         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6380         "runpath" field to NULL.
6381         (bfd_elf_get_runpath_list): New function.
6383         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6384         DT_RUNPATH entries.
6386 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
6388         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6389         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6390         explicitly.  Improve validation of r_type.
6392 2000-08-21  H.J. Lu  <hjl@gnu.org>
6394         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6395         dynamic allocated content space.  Add a comment to remind us that
6396         one day this ought to be fixed.
6397         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6398         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6399         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6401 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
6403         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6404         field with the newly relocated value instead of adding it to the
6405         existing immediate field.
6406         (elf32_i860_relocate_splitn): Likewise.
6407         (elf32_i860_relocate_highadj): Likewise.
6409 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
6411         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6412         was previously just a stub).
6414 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
6416         * elflink.c (_bfd_elf_create_got_section): Don't abort().
6417         Formatting fixes.
6418         (_bfd_elf_create_dynamic_sections): Likewise.
6420 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
6422         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6423         for undefined symbols to be the beginning of the section.
6425         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6426         four extra entries at the beginning of the .rela.plt section.
6427         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6428         section to account for the four reserved entries in the .plt section.
6430 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
6432         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6433         to the list of NOPs we recognize after a branch-and-link.
6434         Use the ori NOP when one is needed.
6436         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6437         for large archives.
6439 2000-08-14  Jim Wilson  <wilson@cygnus.com>
6441         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6442         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6443         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
6444         EF_IA_64_ABSOLUTE.
6446 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
6448         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6450 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
6452         * elf32-i860.c (elf32_i860_relocate_section): New function.
6453         (i860_final_link_relocate): New function.
6454         (elf32_i860_relocate_splitn): New function.
6455         (elf32_i860_relocate_pc16): New function.
6456         (elf32_i860_relocate_highadj): New function.
6457         (elf32_i860_howto): Minor adjustments to some relocations.
6458         (elf_info_to_howto_rel): Define.
6459         (elf_backend_relocate_section): Define.
6461 2000-08-10  Nick Clifton  <nickc@cygnus.com>
6463         * elf32-arm.h: Fix formatting.
6465 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
6467         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6469 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
6471         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6473 2000-08-07  Kazu Hirata  <kazu@hxi.com>
6475         * ieee.c (ieee_write_debug_part): Rewrite a comment.
6476         * elf64-ia64.c: Fix a typo.
6478 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
6480         * elf32-i860.c (elf32_i860_howto_table): New structure.
6481         (lookup_howto): New function.
6482         (elf32_i860_reloc_type_lookup): New function.
6483         (elf32_i860_info_to_howto_rela): New function.
6484         (elf_code_to_howto_index): New structure.
6485         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6486         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6487         elf32_i860_reloc_type_lookup.
6489 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
6491         * som.c (struct fixup_format): Constify `format'.
6492         (som_hppa_howto_table): Use SOM_HOWTO macro.
6493         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6494         (som_bfd_reloc_type_lookup): Likewise.
6495         (compare_subspaces): Remove unused `count1', `count2'.
6496         (som_begin_writing): Remove unused `total_reloc_size'.
6497         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6498         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6499         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6500         (som_find_nearest_line): Decorate unused parameter(s).
6501         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6502         (som_bfd_link_split_section): Likewise.
6504 2000-08-03  Nick Clifton  <nickc@cygnus.com>
6506         * section.c: Restore backed out code.
6507         * elf.c: Restore backed out code.
6508         (copy_private_bfd_data): Fix bug preventing stipped dynamic
6509         binaries from working.
6510         * bfd-in2.h: Regenerate.
6512 2000-08-03  H.J. Lu  <hjl@gnu.org>
6514         * section.c: Back out the change made by Nick Clifton
6515         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6516         binaries.
6517         * bfd-in2.h: Likewise.
6518         * elf.c: Likewise.
6520 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
6522         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6524 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
6526         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6527         * bfd-in2.h, libbfd.h: Regenerate.
6529 2000-07-31  Nick Clifton  <nickc@cygnus.com>
6531         * section.c (struct sec): Add new boolean field 'segment_mark'.
6532         (STD_SECTION): Initialise new field to zero.
6534         * bfd-in2.h: Regenerate.
6536         * elf.c (copy_private_bfd_data): Reorganise section to segment
6537         mapping to cope with moved sections requiring new segments,
6538         and overlapping segments.
6539         (SEGMENT_END): New macro: Return the end address of a segment.
6540         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6541         contains a section by comparing their VMA addresses.
6542         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6543         contains a section by comparing their LMA addresses.
6544         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6545         section should be included in a segment.
6546         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6547         follows another in memory.
6548         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6549         segments overlap.
6551 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
6553         * cpu-i860.c: Added comments.
6555         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6556         bfd_elf32_i860_little_vec.
6557         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6558         (ELF_MAXPAGESIZE): Changed to 4096.
6560         * targets.c (bfd_elf32_i860_little_vec): Declaration of
6561         new target.
6562         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6564         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6565         config for little endian elf32 i860.
6566         (targ_defvec): Define for the new config above
6567         as "bfd_elf32_i860_little_vec".
6568         (targ_selvecs): Define for the new config above
6569         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6571         * configure.in (bfd_elf32_i860_little_vec): Added recognition
6572         of new target vec.
6574         * configure: Regenerated.
6576 2000-07-27  H.J. Lu  <hjl@gnu.org>
6578         * elflink.h (elf_merge_symbol): Take one more argument,
6579         dt_needed, to indicate if the symbol comes from a DT_NEEDED
6580         entry. Don't overide the existing weak definition if dt_needed
6581         is true.
6582         (elf_link_add_object_symbols): Pass dt_needed to
6583         elf_merge_symbol ().
6585 2000-07-27  Nick Clifton  <nickc@cygnus.com>
6587         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6588         allocated contents.
6590 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
6592         * configure.host (*-*-aix*): AIX has 'long long' always.
6594         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6595         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6596         (xcoff_write_archive_contents_big): Don't update the offset
6597         of the symbol table, xcoff_write_armap will do it.
6599 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
6601         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6602         of dynobj for SGI_COMPAT checks.
6604 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6606         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6607         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6608         * bfd-in2.h: Regenerate.
6610 2000-07-21  Nick Clifton  <nickc@cygnus.com>
6612         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6613         range symbol indices in relocs and issue an error message.
6615 2000-07-20  H.J. Lu  <hjl@gnu.org>
6617         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6618         info->new_dtags when setting DT_FLAGS_1. It will only be set
6619         by the new linker options. It shouldn't break anything.
6621 2000-07-20  H.J. Lu  <hjl@gnu.org>
6623         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6624         only if info->new_dtags is true.
6626 2000-07-20  H.J. Lu  <hjl@gnu.org>
6628         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6629         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6631 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
6633         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6634         (ALL_MACHINES_CFILES): Add cpu-cris.c.
6635         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6636         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6637         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6638         * Makefile.in: Rebuild.
6639         * aclocal.m4: Rebuild.
6640         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6641         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6642         (bfd_cris_arch): Declare.
6643         (bfd_archures_list): Add bfd_cris_arch.
6644         * bfd-in2.h: Rebuild.
6645         * config.bfd: (cris-*-*): New target.
6646         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6647         * configure: Rebuild.
6648         * elf.c (prep_headers): Add bfd_arch_cris.
6649         * libbfd.h: Rebuild.
6650         * libaout.h (enum machine_type): Add M_CRIS.
6651         * reloc.c: Add CRIS relocations.
6652         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6653         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6654         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6655         * po/POTFILES.in, po/bfd.pot: Regenerate.
6657 2000-07-19  H.J. Lu  <hjl@gnu.org>
6659         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6660         DF_TEXTREL if DT_TEXTREL is set.
6661         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6662         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6663         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6664         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6665         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6666         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6667         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6668         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6669         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6670         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6672         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6673         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6674         DT_RPATH is set.
6675         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6677 2000-07-19  H.J. Lu  <hjl@gnu.org>
6679         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6680         * bfd-in2.h: Rebuild.
6682         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6683         (elf_dt_soname): New.
6685         * elf.c (bfd_elf_set_dt_needed_soname): New.
6687         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6688         entry if the shared object loaded by DT_NEEDED is used to
6689         resolve the reference in a regular object.
6691 2000-07-19  H.J. Lu  <hjl@gnu.org>
6693         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6694         DT_DEPAUDIT and DT_AUDIT as strings.
6696 2000-07-19  Nick Clifton  <nickc@cygnus.com>
6698         * format.c: Fix formatting.
6700 2000-07-19  H.J. Lu  <hjl@gnu.org>
6702         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6704 2000-07-19  H.J. Lu  <hjl@gnu.org>
6706         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6707         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6708         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6709         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6710         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6711         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6712         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6714 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
6716         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6717         renamed functions from here...
6718         (assign_section_numbers): Use renamed functions.
6719         (prep_headers): Use renamed functions.
6721         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6722         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6723         * bfd-in2.h: Regenerate.
6725 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
6727         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6728         parenthesis in if statement.
6730 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
6732         Enable the support for Traditional MIPS.
6733         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6734         return ict_none appropriately for traditional mips targets.
6735         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6736         (STUB_MOVE): Conditionalize for traditonal mips.
6737         (STUB_LI16): Likewise.
6738         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6739         room for RTPROC header.
6740         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6741         the permission for the PT_DYNAMIC as read, write and execute.
6742         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6743         for traditonal mips.
6744         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6745         _DYNAMIC_LINKING for traditonal mips.
6746         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6747         in case of traditonal mips.
6748         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6749         entry is required. For a function if PLT is not required then set the
6750         corresponding hash table entry to 0.
6751         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6752         traditonal mips.
6753         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6754         shared object set the value to 0.
6755         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6756         _DYNAMIC_LINKING for traditonal mips.
6757         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6758         for traditonal mips.
6760 2000-07-15  H.J. Lu  <hjl@gnu.org>
6762         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6764 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
6766         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6767         out a structure that is BFD_IN_MEMORY.
6769 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
6771         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6772         bfd pointer.  Print section id instead of bfd pointer for local
6773         syms.  Prefix addend with `+' for global syms as well as local.
6774         Correct calculation of name component lengths.
6775         (elf64_hppa_check_relocs): Update call to get_dyn_name.
6777         From David Huggins-Daines  <dhd@linuxcare.com>
6778         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6779         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6780         (elf64_hppa_modify_segment_map): Likewise.
6782 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
6784         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6785         addresses to be "naturally" sign extended.  Return -1 if unknown.
6786         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6787         * bfd-in2.h: Regenerate.
6789 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
6791         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6792         and ECOF_SIGNED_64 to list ways to extract an offset.
6793         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6794         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6795         Update.
6796         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6797         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6799 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
6801         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6802         bfd_get_start_address.
6803         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6804         (elf_swap_ehdr_out): Ditto.
6806 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
6808         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6809         compatibility with older binutils.
6811 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
6813         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6814         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6816         From Ryan Bradetich  <rbradetich@uswest.net>
6817         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6818         (parse_line_table): Ditto.
6819         (_bfd_dwarf1_find_nearest_line): Ditto.
6820         * syms.c (cmpindexentry): Remove extra `*' from params.
6822 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
6824         * elf32-mips.c (sort_dynamic_relocs): New Function.
6825         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6826         via qsort to sort the dynamic relocations in increasing r_symndx
6827         value.
6829 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
6831         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6832         ATTRIBUTE_UNUSED to unused args.
6833         (get_opd): Likewise.
6834         (get_plt): Likewise.
6835         (get_dlt): Likewise.
6836         (get_stub): Likewise.
6837         (elf64_hppa_adjust_dynamic_symbol): Likewise.
6838         (elf64_hppa_link_output_symbol_hook): Likewise.
6839         (elf64_hppa_check_relocs): Delete unused var.
6840         (elf64_hppa_size_dynamic_sections): Likewise.
6841         (elf64_hppa_finalize_opd): Likewise.
6842         (elf64_hppa_finalize_dynreloc): Likewise.
6843         (elf64_hppa_modify_segment_map): Likewise.
6844         (elf64_hppa_finish_dynamic_sections): Likewise.
6846         * elf-hppa.h (elf_hppa_final_write_processing): Add
6847         ATTRIBUTE_UNUSED to unused args.
6848         (elf_hppa_final_link_relocate): Likewise.
6849         (elf_hppa_record_segment_addrs): Add paretheses.
6850         (elf_hppa_relocate_section): Constify dyn_name.
6852         From  David Huggins-Daines  <dhd@linuxcare.com>
6853         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6854         rearrange case statement so that it gets preferred to 32-bit ones.
6856         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6857         asection->id instead of address of asection structure.
6858         (elf32_hppa_size_stubs): Likewise.
6860         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6861         for .init* and .fini*.
6863         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6864         and addends used in stub names to 32 bits.
6865         (elf32_hppa_size_stubs): Likewise.
6867         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6868         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
6869         not bfd_put_64.  Fix minor comment typo and formatting.
6871         Changes to create multiple linker stubs, positioned immediately
6872         before the section where they are required.
6873         * elf32-hppa.c: Don't include hppa_stubs.h.
6874         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6875         (elf32_hppa_stub_hash_table): Delete.
6876         (elf32_hppa_link_hash_entry): Delete.
6877         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6878         stub_hash_table, and store the struct here rather than a pointer.
6879         Delete output_symbol_count.  Add offset array.  Change
6880         global_value to a bfd_vma.
6881         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6882         (elf32_hppa_stub_hash_traverse): Delete.
6883         (elf32_hppa_name_of_stub): Delete.
6884         (elf32_hppa_link_hash_lookup): Delete.
6885         (elf32_hppa_link_hash_traverse): Delete.
6886         (elf32_hppa_stub_hash_table_init): Delete.
6887         (elf32_hppa_size_of_stub): Pass input section and offset rather
6888         than location and calculate location here.  Don't pass name as all
6889         stubs are now the same size.
6890         (elf32_hppa_stub_hash_newfunc): Init new fields.
6891         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6892         too.
6893         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6894         comparing against ints.  Rewrite stub handling code.
6895         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6896         Case enums to int before comparing against ints.  Remove
6897         bfd_reloc_dangerous case.
6898         (elf32_hppa_build_one_stub): Rewrite.
6899         (elf32_hppa_size_one_stub): New function.
6900         (elf32_hppa_build_stubs): Rewrite.
6901         (elf32_hppa_size_stubs): Pass in linker call-back functions.
6902         Rewrite stub-handling specific code.
6904         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6906         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6908         * hppa_stubs.h: Delete.
6909         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6910         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6911         * Makefile.in: Regenerate.
6913         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6914         e_nlrsel.
6916         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6918         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6919         and section name for bfd_reloc_notsupported error message.
6920         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6921         bfd_reloc_notsupported.
6922         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6924         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6925         undefined weak symbols for all relocs.
6926         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6927         offsets are relative to one past the delay slot.
6928         (elf32_hppa_size_stubs): Account for reloc addend when calculating
6929         branch destination.  Put addend into stub name too.
6930         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6931         adjust by 8 when deciding whether a linker stub is needed.  Put
6932         addend into stub name as for above.
6934         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6935         various args and vars.
6936         (elf32_hppa_bfd_final_link_relocate): Here too.
6937         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
6938         inner block var to avoid shadowing.
6940         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
6941         unsigned.
6942         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6943         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6944         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6946         * libhppa.h: Change practically all unsigned ints to plain ints.
6947         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
6948         prototypes.
6950         From Ryan Bradetich  <rbradetich@uswest.net>
6951         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6952         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6953         suit above.
6954         From  David Huggins-Daines  <dhd@linuxcare.com>
6955         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6956         to the new OP_* ones.
6958         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6959         error exit.  Bail out earlier on plabel relocs that we aren't
6960         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
6961         string, and then don't free our copy.
6962         (elf32_hppa_build_one_stub): Make insn unsigned int.
6964         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6965         available with BL, not BE and BLE.
6967         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6968         code for elf arg relocs.
6969         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6970         argument with elf_link_hash_entry h.  Handle undefined weak
6971         symbols.  Move $global$ lookup from here...
6972         (elf32_hppa_relocate_section): ...to here.  Return correct error
6973         message for non-handled relocs.
6974         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
6975         wrong test was -0x3ffff to +0x40000.
6977         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6978         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6979         Handle them as such.
6980         (elf_hppa_relocate_insn): Fix a typo.
6982         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6983         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6984         assemble_17, assemble_21): Delete.
6985         Supply defines for all 64 possible opcodes.
6986         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
6987         formats.  Handle COMICLR.
6988         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
6989         -10, -16, 16, 22.
6991         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
6992         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
6993         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
6994         to suit.
6995         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
6996         the local syms - did this code get deleted accidentally?  Ignore
6997         undefined and undefweak syms.
6999         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7000         block.  Use it instead of elf64_hppa_hash_table (info).
7001         (elf_hppa_final_link_relocate): Use hppa_info instead of
7002         elf64_hppa_hash_table (info).
7004         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7005         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7006         (hppa_rebuild_insn): Mask immediate bits here instead.
7007         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7009 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
7011         * section.c (struct sec): Add id field.  Tidy comment formatting.
7012         (bfd_make_section_anyway): Set id.
7013         (STD_SECTION): Init id too.
7014         Change CONST to const throughout.
7015         * archures.c (bfd_arch_info): Tidy comment.
7016         (bfd_arch_list): Change a CONST to const.
7017         * libbfd-in.h: Tidy comments and replace CONST with const.
7018         * elf-bfd.h: Likewise.
7019         * libbfd.h: Regenerate.
7020         * bfd-in2.h: Regenerate.
7021         * libcoff.h: Regenerate.
7023 2000-07-07  DJ Delorie  <dj@redhat.com>
7025         * archive.c (_bfd_write_archive_contents): Add an informative
7026         comment.
7028 2000-07-06  Kazu Hirata  <kazu@hxi.com>
7030         * srec.c: Fix formatting.
7032 2000-06-05  DJ Delorie  <dj@redhat.com>
7034         * MAINTAINERS: new
7036 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
7038         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7039         value of PC-relative offsets.
7041 2000-07-03  Jim Wilson  <wilson@cygnus.com>
7043         * elf64-alpha.c (alpha_elf_size_info): New.
7044         (elf_backend_size_info): Define to alpha_elf_size_info.
7045         * elfcode.h (elf_size_info): Change hash bucket size to 4.
7047 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
7049         * elf32-mips.c: Include elf32-target.h again for the traditional
7050         MIPS targets.
7052 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
7054         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7055         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7056         (avr_info_to_howto_rela): Likewise.
7057         (elf32_avr_gc_mark_hook): Likewise.
7058         (elf32_avr_gc_sweep_hook): Likewise.
7059         (elf32_avr_relocate_section): Likewise.
7061 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
7063         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7064         an external symbol for a non-shared, non-relocatable link.
7066 2000-07-03  Nick Clifton  <nickc@redhat.com>
7068         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7069         is an external symbol.
7070         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7071         external symbol.
7073 2000-07-03  Kazu Hirata  <kazu@hxi.com>
7075         * reloc16.c: Fix formatting.
7077 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
7079         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7080         to add a new target for traditional mips i.e
7081         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7082         * configure.in: Likewise.
7083         * configure: Rebuild.
7084         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7085         bfd_target_vector.
7086         (bfd_elf32_tradlittlemips_vec): Likewise.
7087         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7088         to see that elfNN_bed does not get redefined even if the target file
7089         is included twice for a chip. See elf32-mips.c.
7091 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
7093         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
7094         (CLEANFILES): Add DEPA.
7095         * Makefile.in: Regenerate.
7097 2000-06-30  DJ Delorie  <dj@cygnus.com>
7099         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7100         can't assume the PE header is at 0x80.
7102 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
7104         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7106 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
7108         * go32stub.h: Update stub.
7110 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
7112         * archures.c (bfd_mach_avr5): Define.
7113         * bfd-in2.h (bfd_mach_avr5): Define.
7114         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7115         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
7116         (compatible): Update comment.  Add missing test.
7117         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7118         for avr2 and avr4.  Simplify 8K wrap code.
7119         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7120         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7122 2000-06-26  Kazu Hirata  <kazu@hxi.com>
7124         * coff-h8300.c: Fix formatting.
7125         * cpu-h8300.c: Likewise.
7127 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
7129         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7130         for local symbols whose names are unknown.
7132 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
7134         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7135         find one.
7136         * Makefile.in: Regenerate.
7137         * doc/Makefile.in: Regenerate.
7139 2000-06-20  H.J. Lu  <hjl@gnu.org>
7141         * Makefile.am: Rebuild dependency.
7142         * Makefile.in: Rebuild.
7144 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7146         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7147         (elf_backend_copy_indirect_symbol): Map to the new function.
7149 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
7151         * archive.c (normalize): Correct pointer comparison when checking
7152         for backslashes.
7153         (bfd_bsd_truncate_arname): Likewise.
7154         (bfd_gnu_truncate_arname): Likewise.
7156 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
7158         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7159         sections elf_{text,data}_{section,symbol}.
7160         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7161         (_bfd_mips_elf_hide_symbol): New function.
7162         (elf_backend_hide_symbol): Map to the new function.
7163         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7164         definitions of mips_elf_{text,data}_{section,symbol}.
7165         (mips_elf_local_relocation_p): Try to find the direct symbol
7166         based on new check_forced argument.
7167         (mips_elf_calculate_relocation): Use new version of
7168         mips_elf_local_relocation_p.
7169         (mips_elf_relocate_section): Likewise.
7170         (_bfd_mips_elf_relocate_section): Likewise.
7171         (mips_elf_sort_hash_table): Only assert that have enough GOT
7172         space.
7173         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7174         entry if the relocation based on the new external argument.
7175         (mips_elf_create_dynamic_relocation): Assert that we have a
7176         section contents allocated where we can swap out the dynamic
7177         relocations.
7178         (mips_elf_calculate_relocation): Find the real hash-table entry
7179         correctly by using h->root.root.type.  Only create a dynamic
7180         relocation entry if the symbol is defined in a shared library.
7181         Create an external GOT entry for the GOT16 relocation if the
7182         symbol was forced local.
7183         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7184         dynamic index if the symbol was forced local.
7186 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7188         * elf32-mips.c: Fix typos in comments.
7190 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
7192         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7193         CORE_VERSION_1.
7195 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
7197         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7198         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7199         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7200         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7201         (bfd_elf32_m68hc11_vec): Likewise.
7202         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7203         Supports 68hc11 & 68hc12  at the same time.
7204         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7205         bfd_target_vector.
7206         (bfd_elf32_m68hc11_vec): Likewise.
7207         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7208         * archures.c (bfd_m68hc12_arch): Define and register in global list
7209         (bfd_m68hc11_arch): Likewise.
7210         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7211         BFD_RELOC_M68HC11_3B): Define.
7212         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7213         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7215 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
7217         * elf_bfd.h (struct elf_backend_data): Add info argument to
7218         elf_backend_hide_symbol.
7219         (_bfd_elf_link_hash_hide_symbol): Likewise.
7220         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7221         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7222         * elflink.h (elf_link_add_object_symbols): Likewise.
7223         (elf_link_assign_sym_version): Likewise.
7225 2000-06-18  H.J. Lu  <hjl@gnu.org>
7227         * coff-i386.c (coff_i386_reloc): Don't return in case of
7228         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7229         Compensate PE relocations when linking with non-PE object
7230         files to generate a non-PE executable.
7232 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
7234         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7235         GOT entries if we're doing a static link or -Bsymbolic link.
7237 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
7239         * elflink.h (elf_link_adjust_relocs): Check for and call backend
7240         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7241         available.
7242         (elf_link_output_relocs): Likewise.
7243         (elf_reloc_link_order): Likewise.
7245 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7247         * archures.c (enum bfd_architecture): #define constants for
7248         PowerPc and RS6000 machine numbers.
7249         * bfd-in2.h: Regenerate.
7250         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7251         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
7252         and RS6000 machine numbers using #defined constants from
7253         archures.c.
7254         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7255         machine numbers using #defined constants from archures.c.  Add
7256         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
7257         64-bit words in 620 entry.
7258         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7259         RSC, and RS2.
7260         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7262 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
7264         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7265         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7266         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7268 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7270         * bfd-in.h (bfd_family_coff): Define.
7271         * bfd-in2.h: Regenerate.
7272         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7273         coff_find_nearest_line): Check COFFness using bfd_family_coff()
7274         instead of bfd_target_coff_flavour.
7275         * cofflink.c (_bfd_coff_final_link): Likewise.
7276         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7277         exclude XCOFF files.
7278         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7279         Likewise.
7280         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7281         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7282         * xcofflink.c (XCOFF_XVECP): Delete.
7283         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7284         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7285         bfd_xcoff_record_link_assignment,
7286         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7287         check for bfd_target_xcoff_flavour.
7289 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7291         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7292         files on AIX 4.3.
7293         (read_hdr): New function.
7294         (rs6000coff_core_p): Store mstsave or __context64 struct instead
7295         of trying to extract individual registers.  Set abfd->arch_info
7296         to match the architecture that created the core file.
7297         (rs6000coff_get_section_contents): Delete.
7298         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7300 2000-06-14  H.J. Lu  <hjl@gnu.org>
7302         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7303         is NULL.
7305 2000-06-13  H.J. Lu  <hjl@gnu.org>
7307         * configure: Regenerate.
7309 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
7311         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7312         armpei_little_vec.
7314 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
7316         * configure.in (VERSION): Update to show this is the CVS mainline.
7318 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
7320         * elf32-d10v.c: Include elf/d10v.h
7321         (enum reloc_type): Delete.
7322         * elf32-d30v.c: Include elf/d30v.h
7323         (enum reloc_type): Delete.
7325         * Makefile.am: Run "make dep-am" to regenerate dependencies.
7326         * Makefile.in: Regenerate.
7328         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7329         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7330         move HOWTOs into elf_howto_table.
7331         (R_386_standard, R_386_ext_offset): Define.
7332         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7333         (elf_i386_reloc_type_lookup): Modify calculation of index into
7334         elf_howto_table since we've removed the padding.
7335         (elf_i386_info_to_howto_rel): Likewise.
7336         (elf_i386_relocate_section): Likewise.
7338 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
7340         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7342 2000-06-05  H.J. Lu  <hjl@gnu.org>
7344         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7345         an error when seeing an undefined symbol with hidden/internal
7346         attribute. It is handled in *_relocate_section ().
7348 2000-06-05  H.J. Lu  <hjl@gnu.org>
7350         * elflink.h (elf_fix_symbol_flags): Follow the link for the
7351         indirect symbol for the ELF_LINK_NON_ELF bit.
7352         (elf_link_output_extsym): Don't output the indirect symbol even
7353         if the ELF_LINK_NON_ELF bit is set.
7355 2000-06-01  J.T. Conklin  <jtc@redback.com>
7357         * config.bfd (i[3456]86-*-netbsdelf*): New target.
7358         (i[3456]86-*-netbsdaout*): New target.
7359         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7360         (i[3456]86-*-openbsd*): Likewise.
7362 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
7364         * trad-core.c: From hpux-core.c, include <dirent.h> or
7365         <sys/ndir.h> when possible.
7367 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
7369         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7370         definitions.  We must not assume they are sorted in the file
7371         according to their index numbers.
7373 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
7375         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7376         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
7377         R_PARISC_DIR17F are for absolute branches; Handle them as such.
7379 2000-05-30  Nick Clifton  <nickc@cygnus.com>
7381         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7382         80960CA, 80960MC as valid machine names.
7384 2000-05-30  H.J. Lu  <hjl@gnu.org>
7386         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7387         visibility bits if the symbol is undefined. Correctly handle
7388         weak undefined symbols with hidden and internal attributes.
7390         * elflink.h (elf_link_add_object_symbols): Always turn the
7391         symbol into local if it has the hidden or internal attribute.
7393 2000-05-29  Philip Blundell  <philb@gnu.org>
7395         * ppcboot.c:  Add packed attribute if compiling with GCC.
7397 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
7399         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7401 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
7403         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7404         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7405         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
7406         a few old comments.
7408 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
7410         * Makefile.am: Update dependencies with "make dep-am"
7411         * Makefile.in: Regenerate.
7413         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7414         bindtextdomain): Replace defines with those from intl/libgettext.h
7415         to quieten gcc warnings.
7417 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
7419         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7421         * archive.c (normalize, bfd_bsd_truncate_arname,
7422         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7423         file names with backslashes.
7425         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7426         before opening it.
7428         * sysdep.h: Include filenames.h.
7430 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
7432         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7434 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
7436         * elf64-sparc.c (sparc64_elf_relax_section): New.
7437         (sparc64_elf_relocate_section): Optimize tail call into branch always
7438         if possible.
7439         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7440         (elf32_sparc_relax_section): New.
7442 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
7444         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7445         Remove unusued variables.
7446         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7447         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7448         previous fix, so that shared libs really don't influence targets
7449         extension mask and memory model.
7451 2000-05-23  H.J. Lu  <hjl@gnu.org>
7453         * elf64-alpha.c (elf64_alpha_relocate_section): Check
7454         h->root.other not h->other.
7455         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7457         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7459 2000-05-23  H.J. Lu  <hjl@gnu.org>
7461         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7462         undefined symbol with the non-default visibility attributes.
7463         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7464         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7465         * elf32-i370.c (i370_elf_relocate_section): Likewise.
7466         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7467         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7468         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7469         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7470         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7471         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7472         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7473         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7475 2000-05-22  Richard Henderson  <rth@cygnus.com>
7477         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7478         PCREL22, PCREL64I.  Zero size of special relocs.
7479         (elf64_ia64_reloc_type_lookup): Likewise.
7480         (USE_BRL, oor_brl, oor_ip): New.
7481         (elf64_ia64_relax_section): New.
7482         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7483         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7484         (elf64_ia64_relocate_section): Likewise.
7485         (bfd_elf64_bfd_relax_section): New.
7486         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7487         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7488         * bfd-in2.h, libbfd.h: Regenerate.
7490 2000-05-22  Nick Clifton  <nickc@cygnus.com>
7492         * configure.in : Add peigen.lo to MIPS PE targets.
7493         * configure: Regenerate.
7495 2000-05-22  Momchil Velikov  <velco@fadata.bg>
7497         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7498         only if it is known for both input and output bfds. Separate
7499         error message strings as in some languages, it may be necessary
7500         to change more than one place in the string to change between
7501         'big' and 'little'.
7503         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7504         endianess checks, call _bfd_generic_verify_endian_match() instead.
7506         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7508         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7510         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7511         endianess before checking bfd flavours.
7513 2000-05-22  H.J. Lu  <hjl@gnu.org>
7515         * elflink.h (elf_link_output_extsym): Clear the visibility
7516         field for symbols not defined locally.
7518 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
7520         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7521         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7522         (hppa_rebuild_insn): Mask immediate bits here instead.
7523         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7525 2000-05-18  Momchil Velikov <velco@fadata.bg>
7527         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7528         relocs for an executable, ensure that they are virtual addresses.
7530 2000-05-18  Jeffrey A Law  (law@cygnus.com)
7532         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7534 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
7535             Rick Gorton             <gorton@scrugs.lkg.dec.com>
7537         * elflink.h: Add emitrelocations support: when enabled, relocation
7538         information and relocation sections are put into final output
7539         executables.  If the emitrelocations flag is set, do the following:
7540         (elf_bfd_final_link): Emit relocation sections.
7541         (elf_link_input_bfd): Compute relocation section contents.
7542         (elf_gc_sections): Don't clean relocation sections.
7544 2000-05-16  Catherine Moore  <clm@cygnus.com>
7546         * som.c (som_decode_symclass):  Recognize weak symbols.
7548 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
7550         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7551         read idata section only from dataoff.
7552         (pe_print_edata): Correctly check for valid eat_member.
7554 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
7556         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7558 2000-05-14  Philip Blundell  <philb@gnu.org>
7560         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7562 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
7564         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7566         * peigen.c (pe_print_idata): Look for .idata section and print
7567         info even if data directory has zero entries.  Read idata section
7568         starting from dataoff, and adjust all data offsets to suit.  Cast
7569         all bfd_vma vars to unsigned long before passing to fprintf.
7570         * peigen.c (pe_print_edata): Similarly, look for .edata section
7571         and print info even if data directory has zero entries.  Cast
7572         all bfd_vma vars to unsigned long before passing to fprintf.
7574         From Szabolcs Szakacsits <szaka@F-Secure.com>
7575         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7576         directory size which may be bogus.
7577         * peigen.c (pe_print_edata): Similarly.
7579 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
7581         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7582         section is empty.
7583         (copy_private_bfd_data): Allow for space possibly taken up by elf
7584         headers when calculating segment physical address from lma.
7586 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
7588         * versados.c (versados_scan): Init stringlen and pass_2_done.
7590         * trad-core.c (trad_unix_core_file_p): Return
7591         bfd_error_wrong_format rather than bfd_error_file_truncated.
7593         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7594         add_data_entry.  DataDirectory virtual address is relative.
7595         (pe_print_idata): Account for relative DataDirectory virtual
7596         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
7597         (pe_print_edata): Similarly.
7599         From Szabolcs Szakacsits <szaka@F-Secure.com>
7600         * peigen.c (dir_names): Add Delay Import Directory.
7601         (pe_print_idata):  Always search for bfd section containing
7602         idata address rather than looking up section name.  Print this
7603         section name rather than .idata.
7604         (pe_print_edata): Similarly.  Also print some fields as %08lx.
7605         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7606         Win32Version.
7608 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
7610         * xcoff.h: Rename to xcoff-target.h
7611         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7612         * coff-rs6000.c: Ditto.
7613         * coff64-rs6000.c: Ditto.
7614         * coff-pmac.c: Ditto.
7615         * Makefile.in: Regenerate.
7617 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
7619         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7620         Change U802TOC64MAGIC to U803XTOCMAGIC.
7622 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
7624         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7625         * bfd-in.h: Prototype bfd_elf_get_arch_size.
7626         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7628 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
7630         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7632 2000-05-03  Martin v. L�öwis  <loewis@informatik.hu-berlin.de>
7634         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7635         hidden and internal symbols.
7636         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7637         visibility.
7638         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7639         assign a PLT or GOT entry to symbols with hidden and
7640         internal visibility.
7642 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
7644         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7645         the .bss section.
7646         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7648 2000-05-02  H.J. Lu  <hjl@gnu.org>
7650         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7651         ELFOSABI_SYSV.
7653 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
7655         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7656         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
7657         dependencies.
7658         * Makefile.in: Regenerate.
7660 2000-05-01  Jim Wilson  <wilson@cygnus.com>
7662         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7663         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7664         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
7665         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
7666         * Makefile.in: Rebuild.
7668 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
7670         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
7671         doesn't work very well.
7673         * elf-hppa.h (elf_hppa_internal_shdr): Define.
7674         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7675         Set hdr->s_type to 1 if ARCH_SIZE == 32.
7676         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7677         (elf_hppa_info_to_howto): Likewise.
7678         (elf_hppa_info_to_howto_rel): Likewise.
7679         (elf_hppa_reloc_type_lookup): Likewise.
7680         (elf_hppa_is_local_label_name): Likewise.
7681         (elf_hppa_fake_sections): Likewise.
7682         (elf_hppa_final_write_processing): Likewise.
7683         (elf_hppa_howto_table): Fully initialise all entries.
7684         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7685         (elf_hppa_info_to_howto): Likewise.
7686         (elf_hppa_info_to_howto_rel): Likewise.
7687         (elf_hppa_reloc_type_lookup): Likewise.
7688         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7689         elf_hppa_unmark_useless_dynamic_symbols,
7690         elf_hppa_remark_useless_dynamic_symbols,
7691         elf_hppa_record_segment_addrs, elf_hppa_final_link,
7692         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7693         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7694         elf32-hppa.c mess is cleaned up.
7695         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7696         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
7697         r_field then call hppa_field_adjust inline func with variable
7698         r_field arg, instead call hppa_field_adjust with fixed arg.
7699         In case R_PARISC_PCREL22F, don't set r_field.
7700         (elf_hppa_relocate_insn): Change args and return type to unsigned
7701         int.  Call re_assemble_* funcs to do the work.
7703         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7704         sign extending.
7706         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7707         extending.
7708         (sign_extend): Mask first before sign extending.
7709         (low_sign_extend): Rewrite without condition expression.
7710         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7711         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7712         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7713         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7714         result as function return value rather than through pointer arg.
7715         Accept unsigned int args, and return unsigned int.
7716         (re_assemble_3): New.  Combines function of dis_assemble_3 with
7717         re-assembly of opcode and immediate.
7718         (re_assemble_12): Likewise.
7719         (re_assemble_16): Likewise.
7720         (re_assemble_17): Likewise.
7721         (re_assemble_21): Likewise.
7722         (re_assemble_22): Likewise.
7723         (hppa_field_adjust): Rewrite and document, paying attention to
7724         size of types and signed/unsigned issues.
7725         (get_opcode): Shift before masking.
7726         (FDLW): Rename to FLDW.
7727         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
7728         (hppa_rebuild_insn): Change args and return value to unsigned
7729         int.  Make use of re_assemble_*.  Correct case 11.
7731         * dep-in.sed: Handle ../opcodes/.
7732         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7733         elf64-hppa.h, hppa_stubs.h, xcoff.h.
7734         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7735         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7736         elfarm-nabi.lo dependencies outside of auto-dependency area.
7737         Regenerate dependencies.
7738         * Makefile.in: Regenerate.
7740         * configure.in (TRAD_HEADER): Test non-null before
7741         AC_DEFINE_UNQUOTED.
7742         * configure: Regenerate.
7744         * reloc.c: Fix mis-spelling in comment.
7746 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
7748         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7749         * vms.c (vms_openr_next_archived_file): Return NULL.
7751 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7753         * coffcode.h Copy changes mistakenly done to libcoff.h in
7754         4/24/2000 patch.
7756 2000-04-29  Andreas Jaeger  <aj@suse.de>
7758         * libbfd-in.h: Correctly check GCC version.
7759         * bfd-in.h: Likewise.
7760         * libhppa.h: Likewise.
7761         * libbfd.h: Regenerate.
7762         * bfd-in2.h: Regenerate.
7764 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7766         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7767         coffdu-rs6000.{lo,c}.
7768         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7769         on xcoff.h
7770         * Makefile.in: Regenerate.
7771         * xcoff.h: New file.
7772         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7773         * coff-rs6000.c: Move all declarations and defines that are
7774         common to the xcoff backends into xcoff.h
7775         * coff64-rs6000.c: Ditto,
7777 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7779         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
7780         _bfd_coff_force_symnames in strings and
7781         _bfd_coff_debug_string_prefix_length to their default values.
7782         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7784 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7786         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7787         _bfd_coff_force_symnames in strings and
7788         _bfd_coff_debug_string_prefix_length to their default values.
7790 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
7792         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
7793         Check local_got_refcounts before dereferencing.
7795         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7796         before deciding we don't need R_PPC_PLT32 relocation.
7797         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7798         dereferencing.
7800         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7802         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7803         .plt entries.
7804         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7805         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7806         (elf_i386_relocate_section): Allow for .plt to go missing.
7807         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7808         can use a relative reloc for got as elf_i386_relocate_section.
7809         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7811 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
7813         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7815 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
7817         * Makefile.am (coff64-rs6000.lo): New rule.
7818         * Makefile.in: Regenerate.
7819         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7820         xcoff_is_local_label_name, xcoff_rtype2howto,
7821         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7822         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7823         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7824         (NO_COFF_SYMBOLS): Define.
7825         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7826         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7827         internally.
7828         (MINUS_ONE): New macro.
7829         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7830         relocation.
7831         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7832         coff_SWAP_aux_out): Map to the new functions.
7833         * coff64-rs6000.c: New file.
7834         * libcoff.h (bfd_coff_backend_data): Add new fields
7835         _bfd_coff_force_symnames_in_strings and
7836         _bfd_coff_debug_string_prefix_length.
7837         (bfd_coff_force_symnames_in_strings,
7838         bfd_coff_debug_string_prefix_length): New macros for above fields.
7839         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7840         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
7841         of using coff_swap_sym_in directly.
7842         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7843         (coff_set_flags) Set magic for XCOFF64.
7844         (coff_compute_section_file_positions): Add symbol name length to
7845         string section length if bfd_coff_debug_string_prefix_length is
7846         true.
7847         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7848         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7849         using coff_swap_lineno_in directly.
7850         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7851         and _bfd_coff_debug_string_prefix_length fields.
7852         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7853         symbol names into strings table when
7854         bfd_coff_force_symnames_in_strings is true.
7855         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7856         SET_RELOC_VADDR): New macros.
7857         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7858         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7859         code.
7860         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7861         changes within RS6000COFF_C specific code.
7862         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7863         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7864         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7865         Extend existing hack on target name.
7866         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7867         target name.
7868         * coff-tic54x.c (ticof): Keep up to date with new fields
7869         in bfd_coff_backend_data.
7870         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7871         targ_selvecs to include rs6000coff64_vec for rs6000.
7872         * configure.in: Add rs6000coff64_vec case.
7873         * cpu-powerpc.c: New bfd_arch_info_type.
7875 2000-04-24  Jeffrey A Law  (law@cygnus.com)
7877         * config.bfd: Only disable elf32-hppa vectors, not all of the
7878         BSD and OSF configuration support.  Provide (disabled) clauses
7879         for PA64 support.
7880         * configure.in: Add clause for PA64 support.
7881         * configure: Rebuilt.
7883         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7884         (bfd_elf64_hppa_vec): Declare.
7886         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7887         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7888         (elf64-hppa.lo): Add dependencies.
7889         * Makefile.in: Rebuilt.
7891         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7893 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
7895         * libhppa.h (dis_assemble_16): New function.
7896         (pa_arch): Added pa20w element.
7898 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
7900         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7901         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7902         bfd_elf64_slurp_reloc_table.
7904         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7905         definitions to get external names.
7906         (elf_write_relocs): Renamed from write_relocs and make global.
7907         (elf_slurp_reloc_table): Make global.
7908         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7910         * archive.c (hpux_uid_gid_encode): New function.
7911         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7912         defined and the ID is greater than 99999.
7913         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7914         special uid/gid fields into 32 bit values.
7916 2000-04-21  Matthew Green  <mrg@cygnus.com>
7918         * config.bfd: Add NetBSD/sparc64 support.
7920 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
7921                           David Mosberger  <davidm@hpl.hp.com>
7922                           Timothy Wall <twall@cygnus.com>
7923                           Jim Wilson  <wilson@cygnus.com>
7925         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7926         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7927         (BFD64_BACKENDS): Add elf64-ia64.lo.
7928         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7929         (cpu-ia64.lo, elf64-ia64.lo): New rules.
7930         * Makefile.in: Rebuild.
7931         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7932         (bfd_ia64_arch): Declare.
7933         (bfd_archures_list): Add bfd_ia64_arch.
7934         * bfd-in2.h: Rebuild.
7935         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7936         * configure: Rebuild.
7937         * configure.host: (ia64-*-linux*): New host.
7938         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7939         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7940         * elf.c (prep_headers): Add bfd_arch_ia64.
7941         * libbfd.h: Rebuild.
7942         * reloc.c: Add IA-64 relocations.
7943         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7944         Declare.
7945         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7946         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7948 2000-04-21  Richard Henderson  <rth@cygnus.com>
7950         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7951         contents when performing a partial link.
7952         (bfd_elf_d30v_reloc_21): Likewise.
7954 2000-04-20  H.J. Lu  <hjl@gnu.org>
7956         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7957         patch to symbols defined by a shared object.
7958         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7960 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
7962         K&R compiler fixes.
7963         * dwarf2.c (concat_filename): Avoid string literal concatenation.
7964         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7966 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
7968         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7969         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7970         (coff-ia64.lo): Add dependency.
7971         * Makefile.in: Regenerate.
7972         * coff-ia64.c: New file.
7973         * efi-app-ia32.c: Ditto.
7974         * efi-app-ia64.c: Ditto.
7975         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7976         (coff_set_flags): Ditto.
7977         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7978         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7979         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7980         * configure: Regenerate.
7981         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7982         (PUT_OPTHDR_IMAGE_BASE): Ditto.
7983         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7984         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7985         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7986         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7987         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7988         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7989         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7990         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7991         (GET_PDATA_ENTRY): Ditto.
7992         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
7993         data_start.  Use above macros to read fields that are 64 bit wide for
7994         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
7995         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
7996         FileAlignment and SectionAlignment to minimum alignment if they
7997         are zero.
7998         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
7999         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8000         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8001         Use above macros to write fields that are 64 bit wide for
8002         COFF_WITH_PEP64.
8003         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8004         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
8005         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
8006         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
8007         begin address, end address, and unwind info address only.  Use
8008         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
8009         print addresses.
8010         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8011         HIGH3ADJ relocation names.
8012         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8013         * targets.c: Declare bfd_efi_app_ia32_vec and
8014         bfd_efi_app_ia64_vec.
8015         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8016         bfd_efi_app_ia64_vec.
8018 2000-04-17  Timothy Wall  <twall@cygnus.com>
8020         * bfd-in2.h: Add prototypes for tic54x load page access.
8021         * bfd-in.h: Regenerate.
8022         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8023         in customized _set_arch_mach function.
8024         * coffcode.h (coff_set_alignment_hook): Set section load page if
8025         the appropriate macro is defined.
8026         (write_object_contents): Read section load page.
8028 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
8030         * elf32-hppa.h: Update copyright date.
8032         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8033         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8035         * elf32-d30v.c (MAX32): Don't use LL suffix.
8036         (MIN32): Define in terms of MAX32.
8037         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8039         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8040         expression.
8042         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8044 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
8046         * dep-in.sed: Match space before file name, not after.
8047         * Makefile.am: Regenerate dependencies.
8048         * Makefile.in: Regenerate.
8050         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8051         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
8052         extend without an if statement.
8054 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
8056         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8057         signed quantites.
8058         * elf32-mips.c (gprel16_with_gp): Likewise.
8059         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8060         here using -0x40000, not (int)0xfffc0000.
8061         (elf32_hppa_size_of_stub): Likewise.
8063 2000-04-11  Timothy Wall  <twall@cygnus.com>
8065         * coff-tic54x.c: Now builds with all targets.
8066         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8067         * Makefile.in: Regenerate.
8068         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8069         unitialized variable.
8071 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
8073         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
8074         --enable-build-warnings option.
8075         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8076         * Makefile.in, configure: Re-generate.
8078 2000-04-07  Nick Clifton  <nickc@cygnus.com>
8080         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8081         BFD_RELOC_THUMB_PCREL_BLX.
8083         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8084         R_ARM_XPC25 and R_ARM_THM_PC22.
8086         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8087         R_ARM_XPC25 and R_ARM_THM_XPC22.
8088         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8089         R_ARM_[XPC25|THM_XPC22].
8091         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8092         elf/arm-oabi.h to elf/arm.h
8094         * Makefile.am: Fix dependency for elfarm-oabi.c
8095         * Makefile.in: Regenerate.
8097         * bfd-in2.h: Regenerate.
8098         * libbfd.h: Regenerate.
8100 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8102         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8103         and restore it on failure.  Release newly allocated tdata on
8104         failure.
8106 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
8108         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8109         (decode_line_info): Set it.  Report error if unit->line_offset is
8110         equal to or larger than it.
8112 2000-04-07  Timothy Wall  <twall@cygnus.com>
8114         * targets.c: Added vecs for tic54x.
8115         * reloc.c: Added relocs for tic54x.
8116         * libbfd.h: Regenerated.
8117         * configure: Add TI COFF vecs for tic54x.
8118         * configure.in: Ditto.
8119         * config.bfd (targ_cpu): Recognize new tic54x target.
8120         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8121         * bfd-in2.h: Add tic54x target and relocations.
8122         * Makefile.am, Makefile.in: Add tic54x target.
8123         * archures.c (bfd_archures_list): Add tic54x target.
8124         * coff-tic54x.c: New.
8125         * cpu-tic54x.c: New.
8127 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8129         * elfcore.h (elf_core_file_p): call backend_object_p which
8130         thereby gets an opportunity to update the arch/machine type.
8132 2000-04-06  Timothy Wall  <twall@cygnus.com>
8134         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8135         class.  Handle SEC_CLINK and SEC_BLOCK flags.
8136         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8137         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8139 2000-04-06  Nick Clifton  <nickc@cygnus.com>
8141         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8142         EF_INTERWORK if this is an unknown EABI.
8143         (elf32_arm_merge_private_bfd_data): Check EABI version
8144         numbers.  Only check EF_xxx flags if the EABI version number
8145         is unknown.
8146         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8147         if the EABI version number is unknown.
8148         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8149         if the EABI version number is unknown.
8151 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
8153         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8154         BFD_RELOC_SH_LOOP_END.
8155         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8156         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8157         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8158         (sh_elf_reloc_loop): New function.
8159         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8160         any more.
8161         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8162         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8163         * bfd-in2.h, libbfd.h: Regenerate.
8165 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
8167         * po/bfd.pot: Regenerate.
8169         * Makefile.am: Remove extraneous mkdep comment.
8170         (MKDEP): Use gcc -MM rather than mkdep.
8171         (DEP): Quote when passing vars to sub-make.  Add warning
8172         message to end.
8173         (DEP1): Rewrite for "gcc -MM".
8174         (CLEANFILES): Add DEP2.
8175         Update dependencies.
8176         * Makefile.in: Regenerate.
8178 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
8180         * configure.in: Added corefile support for AIX 4.3.  In particular,
8181         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8182         compiling rs6000-core.c.
8183         * configure: Regenerated.
8185 2000-04-03  H.J. Lu  <hjl@gnu.org>
8187         * cache.c (bfd_open_file): Unlink the output file only if
8188         it has non-zero size.
8190 2000-04-01  Ken Block USG  <block@zk3.dec.com>
8192         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8193         relative relocations for non-loaded sections in shared objects.
8194         (elf64_alpha_check_relocs): Similarly.
8196 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
8198         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8199         BFD_RELOC_16 to switch for extended relocs.
8200         (MY_swap_ext_reloc_in): New.
8201         (MY_swap_ext_reloc_out): New.
8202         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8203         than NAME(aout,swap_ext_reloc_in) for extended relocs.
8204         (NAME(aout,squirt_out_relocs)): Similarly use
8205         MY_swap_ext_reloc_out.
8206         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8208 2000-04-03  Kazu Hirata  <kazu@hxi.com>
8210         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8211         the R_PCRWORD_B case.
8213 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
8215         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8216         on some targets.
8217         * ihex.c : Ditto.
8219 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
8221         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
8222         HOWTO references to bfd_elf_generic_reloc, that have
8223         partial_inplace == true, now use the new function.  The function
8224         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8225         extends its fixes to the R_M32R_{16,24,32} relocs.
8226         The new logic in m32r_elf_lo16_reloc() has been removed, and
8227         it instead calls the new routine to obtain that functionality.
8229 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
8231         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8232         elf32_avr_check_relocs, avr_final_link_relocate,
8233         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8234         elf32_avr_object_p): Add prototypes.
8235         (elf32_avr_gc_mark_hook): Add default for h->root.type.
8236         (bfd_elf_avr_final_write_processing): Make static.
8238 2000-03-27  Denis Chertykov  <denisc@overta.ru>
8240         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
8241         * archures.c (bfd_architecture): Add AVR architecture.
8242         (bfd_archures_list): Add reference to AVR architecture info.
8243         * elf.c (prep_headers): Handle bfd_arch_avr.
8244         * reloc.c: Add various AVR relocation enums.
8245         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8246         list.
8247         * Makefile.am: Add support for AVR elf.
8248         * configure.in: Likewise.
8249         * config.bfd: Likewise.
8250         * Makefile.in: Regenerate.
8251         * configure: This too.
8252         * bfd-in2.h: And this.
8253         * libbfd.h: And this.
8255 2000-03-24  H.J. Lu  <hjl@gnu.org>
8257         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8258         (elf64_alpha_find_reloc_at_ofs): Likewise.
8260 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
8262         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8263         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
8264         allowable range used to be -2**(n-1) to 2**n-1.
8265         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
8266         "boolean overflow" with "bfd_reloc_status_type flag".
8268 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
8270         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8272 2000-03-14  Kazu Hirata  <kazu@hxi.com>
8274         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8275         of shrinks properly, including the last reloc.
8277 2000-03-13  Kazu Hirata  <kazu@hxi.com>
8279         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8280         check for R_MOVL2.
8282 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
8284         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8285         a format mismatch rather than an "error" from bfd_read such as
8286         bfd_error_file_truncated.
8288 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
8290         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8291         sign-extension and big-endian compensation for
8292         R_MIPS_64 even in ld -r.
8294 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
8296         * elf32-mips.c (mips_elf_next_relocation): Rename from
8297         mips_elf_next_lo16_relocation, and generalize to look
8298         for any relocation type.
8299         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8300         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8301         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8302         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8303         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8304         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8305         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8306         (mips_rtype_to_howto): Likewise.
8307         (mips_elf_calculate_relocation): Handle new relocs.
8308         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8309         are paired.  The addend for R_MIPS_GNU_REL16_S2
8310         is shifted right two bits.
8312 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
8314         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8315         comment, and ensure it doesn't happen again.
8316         (bfd_install_relocation): Same here.
8317         (_bfd_relocate_contents): Don't bother assigning unused signmask
8318         shift result.  Fix typos in comments.
8319         Remove trailing whitespace throughout file.
8321 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
8323         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8324         * bfd-in2.h: Rebuild.
8326 2000-03-06  Nick Clifton  <nickc@cygnus.com>
8328         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8329         sym_ptr_ptr fields.
8330         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8331         (SIZEOF_ILF_STRINGS): Redefine.
8332         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
8333         relative reloc, as opposed to a section relative reloc.
8334         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8335         not C_LABEL.
8336         Add length of symbol's prefix to string pointer.
8337         Store a pointer to the symbol in the symbol pointer table.
8338         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8339         Initialise the symbol pointer table.
8340         Store the hint in the Hint/Name table.
8341         Make the jump reloc be symbol realtive, not section relative.
8342         Create an import symbol for imported code.
8344 2000-03-06  Catherine Moore  <clm@cygnus.com>
8346         * elf.c (swap_out_syms):  Check for null type_ptr.
8348 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
8350         * aout-target.h (MY(write_object_contents)): Remove unused
8351         and unusable "#if CHOOSE_RELOC_SIZE".
8352         * pc532-mach.c (MY(write_object_contents)): Ditto.
8353         * netbsd.h (MY(write_object_contents)): Ditto.
8354         * hp300hpux.c (MY(write_object_contents)): Ditto.
8355         * freebsd.h (MY(write_object_contents)): Ditto.
8356         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8358 2000-02-29  H.J. Lu  <hjl@gnu.org>
8360         * peicode.h (jtab): Make it static.
8362         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8363         defined and COFF_IMAGE_WITH_PE is not defined.
8364         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8365         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8367 2000-03-01  Nick Clifton  <nickc@cygnus.com>
8369         * coff-arm.c (bfd_arm_process_before_allocation): Make
8370         'symndx' signed to prevent compile time warning.
8372         * coff-mcore.c: Remove unused prototype for pe_object_p.
8374         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8375         functions that are not used when COFF_IMAGE_WITH_PE is
8376         defined.
8377         (struct sh_opcode): Change type of 'flags' field to unsigned
8378         long so that it can hold the USESAS flag.
8380         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8382         * elf-m10300.c (mn10300_elf_relax_section): Initialise
8383         'sym_sec'.
8385         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8386         parameters.
8387         Remove unusued variables and code.
8388         (elf_backend_add_symbol_hook): Fix prototype.
8390         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8391         'srelgot'.
8393         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8394         'oldinst'.
8396         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8397         parameters.
8398         Remove unusued variables and code.
8399         (elf_backend_add_symbol_hook): Fix prototype.
8401         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8403         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8404         to unused function parameter.
8406         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8407         parameters.
8408         Use EMPTY_HOWTO to initialise empty howto slots.
8409         Remove unused variables.
8411         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8413 2000-03-01  H.J. Lu  <hjl@gnu.org>
8415         * aoutx.h (aout_link_input_section_std): Pass "true" to
8416         the undefined_symbol callback.
8417         (aout_link_input_section_ext): Likewise.
8418         * bout.c (get_value): Likewise.
8419         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8420         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8421         Likewise.
8422         (alpha_relocate_section): Likewise.
8423         * coff-arm.c (coff_arm_relocate_section): Likewise.
8424         * coff-i960.c (coff_i960_relocate_section): Likewise.
8425         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8426         * coff-mips.c (mips_relocate_section): Likewise.
8427         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8428         * coff-sh.c (sh_relocate_section): Likewise.
8429         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8430         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8431         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8432         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8433         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8434         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8435         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8436         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8437         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8438         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8439         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8440         * elf32-v850.c (v850_elf_relocate_section): Likewise.
8441         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8442         * elflink.h (elf_link_output_extsym): Likewise.
8443         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8444         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8445         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8447         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8448         undefined_symbol callback when building shared library with
8449         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8450         "true".
8451         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8452         * elf32-i386.c (elf_i386_relocate_section): Likewise.
8453         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8454         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8455         (elf32_mips_get_relocated_section_content): Likewise.
8456         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8457         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8458         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8459         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8461 2000-02-28  Nick Clifton  <nickc@cygnus.com>
8463         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8464         * Makefile.in: Regenerate.
8466         * configure.in: Add support for mips and sh pe vectors.
8467         * configure: regenerate.
8469         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8470         targets.
8472         * targets.c: Add mips and sh pe vectors.
8474         * libpei.h (coff_final_link_postscript): Only define if not
8475         already defined.
8477         * coffcode.h: Add support for WinCE magic numbers.
8479         * peigen.c (pe_print_reloc): Update comment and rearrange
8480         appending of newline character.
8482         * peicode.h: Add support for Image Library Format.
8483         (pe_ILF_vars): Structure containing data used by ILF code.
8484         (pe_ILF_make_a_section): New function.  Create a section based
8485         on ILF data.
8486         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
8487         ILF data.
8488         (pe_ILF_make_a_symbol): New function.  Create a symbol based
8489         on ILF data.
8490         (pe_ILF_save_relocs): New function.  Store the relocs created
8491         by pe_ILF_make_a_reloc in a section.
8492         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
8493         an ILF object.
8494         (pe_ILF_object_p): New function.  Return a bfd_target pointer
8495         for an ILF object.
8496         (pe_bfd_object_p): If an ILF object is detected call
8497         pe_ILF_object_p on it.
8499         * coff-arm.c: Add support for WinCE relocs which are different
8500         from normal ARM COFF relocs.
8501         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8503         * coff-sh.c: Add support for sh-pe target.
8504         * pe-sh.c: New file.  Support code for sh-pe target.
8505         * pei-sh.c: New file.  Support code for sh-pe target.
8507         * pe-mips.c: New file.  Support code for mips-pe target.
8508         * pei-mips.c: New file.  Support code for mips-pe target.
8510 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
8512         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8513         architecture if the object causing the bump is dynamic.
8514         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8515         and also don't it for memory ordering.
8516         (sparc64_elf_write_relocs): Take src_rela out of the loop.
8518 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
8520         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8521         calling bfd_get_section_size_before_reloc.
8522         (decode_line_info): Likewise.
8523         (_bfd_dwarf2_find_nearest_line): Likewise.
8525 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
8527         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8528         name of the libtool directory.
8529         * Makefile.in: Rebuild.
8531 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
8533         * som.c (SOM_HOWTO): Define.
8534         (som_hppa_howto_table): Use it.
8536 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
8538         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8540         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8542 2000-02-24  Catherine Moore  <clm@cygnus.com>
8544         * som.c (som_misc_symbol_info):  Add field
8545         secondary_def.
8546         (som_bfd_derive_misc_symbol_info):  Initialize
8547         secondary_def.
8548         (som_build_and_write_symbol_table): Keep track
8549         of secondary_def field.
8550         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8551         if secondary_def field is set.
8552         (som_bfd_ar_write_symbol_stuff): Initialize
8553         secondary_def.
8555 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
8557         * dwarf2.c (read_address): Read 16-bits addresses.
8558         (parse_comp_unit): Accept addr_size == 2.
8560 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
8562         * bfd-in.h: Update copyright date.
8564 2000-02-23  Linas Vepstas <linas@linas.org>
8566         * cpu-i370.c: New file.
8567         * elf32-i370.c:  New file.
8568         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8569         (bfd_i370_arch): New.
8570         (bfd_archures_list): Add bfd_i370_arch.
8571         * elf.c (prep_headers): Add bfd_arch_i370.
8572         * Makefile.am: Add support for IBM 370 elf.
8573         * config.bfd: Likewise.
8574         * configure.in: Likewise.
8575         * libbfd.h (bfd_reloc_code_real_names): Likewise.
8576         * reloc.c (bfd_reloc_code_type): Likewise.
8577         * targets.c: Likewise.
8579         * Makefile.in: Regenerate.
8580         * configure: Regenerate.
8581         * bfd-in2.h: Regenerate.
8583 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
8585         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8586         invalid relocation types, and change them to R_386_NONE.
8588 2000-02-22  H.J. Lu  <hjl@gnu.org>
8590         * elflink.h (elf_link_add_object_symbols): If a version symbol is
8591         not defined, don't add a second ELF_VER_CHR.
8593         * elflink.h (elf_bfd_final_link): Call output_extsym for global
8594         symbols converted to local symbols even when stripping all
8595         symbols.
8596         (elf_link_output_extsym): Process global symbols converted to
8597         local symbols even if they are being stripped.
8599 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
8601         * archures.c (bfd_octets_per_byte): Return unsigned int.
8602         (bfd_arch_mach_octets_per_byte): Ditto.
8603         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8604         comparison warning.
8605         * section.c (bfd_get_section_size_before_reloc): Quell signed
8606         vs. unsigned comparison warning.
8607         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
8608         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8609         change.  What was I thinking?
8610         * bfd-in2.h: Regenerate.
8612         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8613         (elf_gc_sections): Same here.
8614         (elf_gc_common_finalize_got_offsets): And here.
8616 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
8618         ELF HPPA doesn't work at present; remove it until it does.
8619         * config.bfd: Comment out setting targ_defvec to
8620         bfd_elf32_hppa_vec.
8621         * Makefile.am: Rebuild dependencies.
8622         (BFD32_BACKENDS): Remove elf32-hppa.lo.
8623         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8624         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8625         * Makefile.in: Rebuild.
8626         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8628 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
8630         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8631         is no bfd_free().  Revert bfd_free part of previous change.
8633 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
8635         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8636         arrays.
8637         (coff_compute_section_file_positions): Use bfd_free to pair
8638         bfd_malloc.
8639         (coff_write_object_contents): Likewise.
8641         * coff-rs6000.c (xcoff_howto_table_16): New variable.
8642         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8644 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
8646         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8647         (xcoff_ar_file_hdr_big): New structure.
8648         (SIZEOF_AR_FILE_HDR_BIG): New macro.
8649         (xcoff_ar_hdr_big): New structure.
8650         (SIZEOF_AR_HDR_BIG): New macro.
8651         (xcoff_big_format_p): New macro.
8652         (xcoff_ardata_big): New macro.
8653         (arch_xhdr_big): New macro.
8654         (xcoff_slurp_armap): Handle large archives.
8655         (xcoff_archive_p): Detect large archives.
8656         (xcoff_read_ar_hdr): Handle large archives.
8657         (xcoff_openr_next_archived_file): Handle large archives.
8658         (xcoff_generic_stat_arch_elt): Handle large archives.
8659         (xcoff_write_armap_old): Rename from xcoff_write_armap.
8660         (xcoff_write_armap_big): New function.
8661         (xcoff_write_armap): New function, dispatch to _old or _big.
8662         (xcoff_write_archive_contents_old): Rename from
8663         xcoff_write_archive_contents.
8664         (xcoff_write_archive_contents_big): New function.
8665         (xcoff_write_archive_contents): New function, dispatch to _old or
8666         _big.
8668 2000-02-18  Richard Henderson  <rth@cygnus.com>
8670         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8671         and hide_symbol members.
8672         (elf_link_hash_copy_indirect): Remove.
8673         (elf_link_hash_hide_symbol): Remove.
8674         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8675         and elf_backend_hide_symbol.
8676         (_bfd_elf_link_hash_copy_indirect): Declare.
8677         (_bfd_elf_link_hash_hide_symbol): Declare.
8678         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8679         (_bfd_elf_link_hash_hide_symbol): Likewise.
8680         (_bfd_elf_link_hash_table_init): Don't init killed members.
8681         * elflink.h (elf_link_add_object_symbols): Use the bed function
8682         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8683         (elf_link_assign_sym_version): Likewise.
8684         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8685         (elf_backend_hide_symbol): Likewise.
8686         (elfNN_bed): Update for new members.
8688 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
8690         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8691         STACK_END_ADDR): Define for new core file format.
8692         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8693         for handling the vagaries of the various core file structures used
8694         by AIX over the years.
8695         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8696         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8697         core_dumpx structure.
8699 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
8701         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8702         (bfd_mach_sh3_dsp): Likewise.
8703         (bfd_mach_sh4): Reinstate.
8704         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8705         * bfd-in2.h: Regenerate.
8706         * coff-sh.c (struct sh_opcode): flags is no longer short.
8707         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8708         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8709         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8710         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8711         (sh_opcodes): No longer const.
8712         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8713         (sh_insn_uses_reg): Check for USESAS and USESR8.
8714         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8715         (_bfd_sh_align_load_span): Return early for SH4.
8716         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8717         Take into account that field b of a parallel processing insn
8718         could be mistaken for a separate insn.
8719         * cpu-sh.c (arch_info_struct): New array elements for
8720         sh2, sh-dsp and sh3-dsp.
8721         Reinstate element for sh4.
8722         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8723         (SH4_NEXT): Reinstate.
8724         (SH3_NEXT, SH3E_NEXT): Adjust.
8725         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8726         * elf32-sh.c (sh_elf_set_private_flags): New function.
8727         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8728         (sh_elf_merge_private_data): New function.
8729         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8730         (bfd_elf32_bfd_copy_private_bfd_data): Define.
8731         (bfd_elf32_bfd_merge_private_bfd_data): Change to
8732         sh_elf_merge_private_data.
8734 2000-02-13  Richard Henderson  <rth@cygnus.com>
8736         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8737         hide_symbol members.
8738         (elf_link_hash_copy_indirect): New.
8739         (elf_link_hash_hide_symbol): New.
8740         * elflink.h (elf_link_add_object_symbols): Break out copy from
8741         indirect new new symbol to elf.c.
8742         (elf_link_assign_sym_version): Break out privatization of
8743         non-exported symbol to elf.c.
8744         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8745         (_bfd_elf_link_hash_hide_symbol): New.
8746         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8748 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
8750         * section.c (_bfd_strip_section_from_output): Add info parameter.
8751         If it passed as non-NULL, use it to check whether any input BFD
8752         has an input section which uses this output section.  Change all
8753         callers.
8754         * bfd-in2.h: Rebuild.
8756         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8757         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8758         1999-11-29.
8759         * bfd-in2.h: Rebuild.
8761 2000-02-10  Timothy Wall  <twall@cygnus.com>
8763         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8764         allow final modifications of swapped-in symbol.
8765         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8766         * coffcode.h (coff_write_relocs): Use macro
8767         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8768         symbol index should be set to -1.
8770 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
8772         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8773         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8774         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8775         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8776         sh_insns_uses_or_sets_freg): New functions.
8777         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8778         * (sh_insns_conflict): Use new functions and new macros to
8779         detect conflicts when two instructions both set same integer registers,
8780         both set same fp register, and both set special register.
8782 2000-02-09  Timothy Wall  <twall@cygnus.com>
8784         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8785         swapping in sections, so that the swapping routines have access to
8786         the arch/mach info.
8788 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8790         * coff-go32.c: Update comment. Update copyright.
8792 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
8794         * syms.c (bfd_decode_symclass)
8795         Two new class characters were added - 'V' and 'v'.  The
8796         meaning of 'W' is now restricted to just weak non-object
8797         symbols.  This allows differentiation between, for example,
8798         weak functions vs weak objects.  nm for example now dumps:
8799         'W' = weak global
8800         'w' = weak unresolved
8801         'V' = weak global object
8802         'v' = weak unresolved object
8804         (bfd_is_undefined_symclass): New function.  Return true if the
8805         given symbol class represents and undefined/unresolved symbol.
8807         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8808         unresolved symbols.
8810         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8812         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8813         STT_ARM_16BIT flag set, but it is not attached to a data object
8814         return STT_ARM_16BIT so that it will be treated as code by the
8815         disassembler.
8817 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
8819         * coff-i386.c (i3coff_object_p): Remove prototype.
8820         Update copyright.
8822         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8823         to name.  Update copyright.
8825         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8826         assignment to avoid warning.  Update copyright.
8828 2000-01-24  Robert Lipe  (robertl@sco.com)
8830         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8831         instead of using GNU C extension.
8833 2000-01-21  Nick Clifton  <nickc@cygnus.com>
8835         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8836         amount from a bfd_in_memory structure.
8837         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8838         structure.
8840 2000-01-14  Nick Clifton  <nickc@cygnus.com>
8842         * linker.c (default_indirect_link_order): oops - fix incorrectly
8843         applied patch from Tim Wall.
8845 2000-01-13  Timothy Wall (twall@tiac.net>
8847         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8848         = scnhsz, filhsz, relsz, aoutsz, etc)
8850         * coffswap.h: Ditto.
8852 2000-01-13  Nick Clifton  <nickc@cygnus.com>
8854         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8855         interwork thumb to arm stub.
8857 2000-01-13  Timothy Wall (twall@tiac.net>
8859         * archures.c (bfd_octets_per_byte): New function: Return
8860         target byte size.
8861         (bfd_arch_mach_octets_per_byte): New function: Return target
8862         byte size.
8864         * section.c: Distinguish between octets and bytes for usage of
8865         _cooked_size,  _raw_size, and output_offset.  Clarify
8866         description of bfd_set_section_contents.
8868         * bfd-in2.h: Regenerate.
8870         * coffgen.c: Indicate that the offset parameter is in bytes, not
8871         octets.
8873         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8874         where appropriate to get the octet offset when calling
8875         bfd_set_section_contents.
8876         (bfd_coff_reloc_link_order): Ditto.
8878         * linker.c (bfd_generic_reloc_link_order): Ditto.
8879         (_bfd_default_link_order): Ditto.
8881         * reloc.c (bfd_perform_relocation):  Distinguish between octets
8882         and bytes.  Use octets when indexing into octet data; use bytes
8883         when calculating target addresses.
8884         (bfd_install_relocation): Ditto.
8886         * srec.c (srec_write_section): Ditto.
8888 2000-01-13  Nick Clifton  <nickc@cygnus.com>
8890         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8891         3 to 2.  This allows 4 byte sized sections, which is necessary for
8892         dlltool to build functioning DLLs.
8894 2000-01-10  Philip Blundell  <pb@futuretv.com>
8896         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8897         (arm*-*-conix*): New target.
8899 2000-01-10  Egor Duda  <deo@logos-m.ru>
8901         * config.bfd: Include elf32_i386 vector to target list for cygwin
8902         and mingw.
8904         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8905         * configure.in: Test for structure win32_pstatus_t in
8906         <sys/procfs.h>
8907         * configure: Regenerate.
8909         * elf.c (elfcore_grok_win32pstatus): New function: process
8910         win32_pstatus_t notes in elf core file.
8911         (elfcore_grok_note): Detect win32_pstatus notes.
8913 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
8915         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8916         visibility.
8917         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8918         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8920 For older changes see ChangeLog-9899
8922 Local Variables:
8923 mode: change-log
8924 left-margin: 8
8925 fill-column: 74
8926 version-control: never
8927 End: