* elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
[binutils.git] / bfd / ChangeLog
blobe3cc39f05d25f60589c8e46c8a172957bcc091aa
1 2001-12-15  Jakub Jelinek  <jakub@redhat.com>
3         * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
4         * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
5         (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
6         sec_info here.  Free ehbuf.
7         (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
8         if hdr_info->strip.
9         (_bfd_elf_maybe_strip_eh_frame_hdr): New.
10         * elflink.h (size_dynamic_sections): Call it.
12 2001-12-14  Alan Modra  <amodra@bigpond.net.au>
14         * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
16 2001-12-13  Jakub Jelinek  <jakub@redhat.com>
18         * elf-bfd.h (enum elf_link_info_type): New.
19         (struct bfd_elf_section_data): Remove stab_info and merge_info
20         fields, add sec_info and sec_info_type.
21         (struct elf_obj_tdata): Add eh_frame_hdr field.
22         (_bfd_elf_discard_section_eh_frame): New prototype.
23         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
24         (_bfd_elf_eh_frame_section_offset): Likewise.
25         (_bfd_elf_write_section_eh_frame): Likewise.
26         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
27         * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
28         (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
29         (elf-eh-frame.lo): New.
30         * Makefile.in: Rebuilt.
31         * configure.in (elf): Add elf-eh-frame.lo.
32         * configure: Rebuilt.
33         * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
34         (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
35         (get_program_header_size): Take into account PT_GNU_EH_FRAME
36         segment.
37         (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
38         (_bfd_elf_rel_local_sym): Likewise.
39         (_bfd_elf_section_offset): Likewise.  Call
40         _bfd_elf_eh_frame_section_offset too.
41         * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
42         sec_info.
43         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
44         * elf-eh-frame.c: New file.
45         * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
46         .stab sections.  Set sec_info_type, use sec_info instead
47         of merge_info and stab_info.
48         (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
49         if --eh-frame-hdr.
50         (elf_bfd_final_link): Write .eh_frame_hdr section.
51         (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
52         (elf_link_input_bfd): Likewise.
53         Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
54         (elf_bfd_discard_info): Add output_bfd argument.
55         Call _bfd_elf_discard_section_eh_frame and
56         _bfd_elf_discard_section_eh_frame_hdr.
57         (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
58         names.
59         * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
60         prototypes.
61         * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
63 2001-12-12  Richard Henderson  <rth@redhat.com>
65         * syms.c (_bfd_generic_read_minisymbols): Early return for
66         no symbols.  Patch from FreeBSD folk; exact origin unknown.
68 2001-12-11  Alan Modra  <amodra@bigpond.net.au>
70         * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
71         and e_shstrndx if out of range.
72         (elf_object_p): Read extended values for e_shnum and e_shstrndx
73         from the first section header.  Allocate space in elf_elfsections
74         for reserved sections and set to NULLs.
75         (elf_write_shdrs_and_ehdr): Set overflow fields in first section
76         header.  Skip reserved sections in elf_elfsections.  Remove
77         duplicate size calculation.
79 2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
80             Richard Henderson  <rth@redhat.com>
81             Corinna Vinschen  <vinschen@redhat.com>
83         * Makefile.am: Add support for xstormy16.
84         * archures.c: Add support for xstormy16.
85         * config.bfd: Add support for xstormy16.
86         * configure.in: Add support for xstormy16.
87         * reloc.c: Add support for xstormy16.
88         * targets.c: Add support for xstormy16.
89         * cpu-xstormy16.c: New file.
90         * elf32-xstormy16.c: New file.
91         * Makefile.in: Regenerated.
92         * bfd-in2.h: Regenerated.
93         * configure: Regenerated.
94         * libbfd.h: Regenerated.
96 2001-12-07  Nick Clifton  <nickc@cambridge.redhat.com>
98         * elf.c (assign_file_positions_for_segments): Combine sentance
99         fragments into a single sentance in order to permit better
100         translation into foreign languages.
102 2001-12-07  Jim Blandy  <jimb@redhat.com>
104         * elf32-s390.c (elf32_s390_grok_prstatus): New function.
105         (elf_backend_grok_prstatus): Define.    
107 2001-12-07  Jakub Jelinek  <jakub@redhat.com>
109         * elf32-sparc.c (elf32_sparc_relocate_section): Revert
110         2001-09-14 change.
112 2001-12-07  Jakub Jelinek  <jakub@redhat.com>
114         * elf.c (_bfd_elf_rela_local_sym): Only call
115         _bfd_merged_section_offset if merge_info is non-NULL.
116         (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
117         * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
118         prototypes.
119         * elf32-arm.h (elf32_arm_final_link_relocate): Use
120         _bfd_elf_section_offset.
121         (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
122         * elf32-i386.c (elf_i386_relocate_section): Use
123         _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
124         * elf32-sh.c (sh_elf_relocate_section): Likewise.
125         * elf32-sparc.c (elf32_sparc_relocate_section): Use
126         _bfd_elf_section_offset.
127         * elf32-cris.c (cris_elf_relocate_section): Likewise.
128         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
129         * elf32-i370.c (i370_elf_relocate_section): Likewise.
130         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
131         * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
132         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
133         * elf32-s390.c (elf_s390_relocate_section): Likewise.
134         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
135         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
136         * elf64-s390.c (elf_s390_relocate_section): Likewise.
137         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
138         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
139         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
141 2001-12-07  Alan Modra  <amodra@bigpond.net.au>
143         * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
144         already forced local.
146 2001-12-05  Nick Clifton  <nickc@cambridge.redhat.com>
148         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
149         fragmented sentence parts into a whole sentence to permit
150         better translation into foreign languages.
152 2001-12-06  Hans-Peter Nilsson  <hp@bitrange.com>
154         * configure: Regenerate.
155         * Makefile.in: Regenerate.
157 2001-12-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
159         * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
160         BFD64_LIBS, make the latter depending on the availability of BFD64.
161         Add archive64.c source file.
162         * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
163         and bfd_elf64_archive_write_armap, code from elf64-mips.c
164         * archive.c (bfd_slurp_armap): Add ELF64 archive support.
165         * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
166         (mips64*el-*-linux*): Likewise.
167         (mips*el-*-linux*): Likewise. Reorder entries.
168         * configure.in (bfd_libs): Define in dependency of BFD64 and
169         AC_SUBST it.
170         * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
171         bfd_elf64_archive_slurp_armap instead.
172         (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
173         instead.
175 2001-12-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
177         * config.bfd: Remove trailing blanks.
178         * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
180 2001-12-04  Alexandre Oliva  <aoliva@redhat.com>
182         * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
183         R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
184         R_D10V_18_PCREL.  Check 10_PCREL relocations as signed.
185         Disable pointless overflow checking of NONE and 32.
187 2001-12-04  Alan Modra  <amodra@bigpond.net.au>
189         * reloc.c (bfd_install_relocation): Correct reloc address test.
190         (bfd_perform_relocation): Formatting fix.
191         * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
193 2001-12-03  Nick Clifton  <nickc@cambridge.redhat.com>
195         * configure.in (LINGUAS): Add tr.
196         * configure: Regenerate.
197         * po/tr.po: Import from translation project's web site.
199 2001-12-03  Alan Modra  <amodra@bigpond.net.au>
201         * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
202         happens to trigger on undefined symbols.
203         (final_link_relocate): Return bfd_reloc_undefined for undefined
204         stubs.
205         (elf32_hppa_relocate_section): Don't say we can't handle a reloc
206         if we have already warned about an undefined symbol.
208 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
210         * elf32-mips.c (NEWABI_P): New define.
211         (USE_REL): Remove, replaced by
212         (elf_backend_may_use_rel_p): New define.
213         (elf_backend_may_use_rela_p): Likewise.
214         (elf_backend_default_use_rela_p): Likewise.
215         (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
216         Fix some relocation definitions.
217         (elf_mips_howto_table_rela): New RELA relocation definitions for
218         NewABI support.
219         (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
220         (bfd_elf32_bfd_reloc_type_lookup): Likewise.
221         (mips_rtype_to_howto): Likewise.
222         (_bfd_mips_elf_relocate_section): Likewise.
223         (_bfd_mips_elf_object_p): Typo.
224         (elf_backend_sign_extend_vma): Reordered together with many other
225         defines nearby to resemble the order of declaration in the header
226         file.
228 2001-12-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
230         * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
231         BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
232         * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
233         * elf32-mips.c (mips_reloc_map): Likewise. Replace
234         BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
235         * elf64-mips.c (mips_reloc_map): Likewise.
236         * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
237         (BFD_RELOC_MIPS_GPREL32): Remove.
239 2001-11-30  H.J. Lu <hjl@gnu.org>
241         * elflink.h (elf_add_default_symbol): New.
242         (elf_link_add_object_symbols): Call elf_add_default_symbol ()
243         to create an indirect symbol from the default for the symbol
244         with the default version if needed.
246 2001-11-29  "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
248         * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
249         if it has already been set by another thread.
251 2001-11-28  Jakub Jelinek  <jakub@redhat.com>
253         * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
254         (elf64_alpha_relocate_section): Translate local_got_entries
255         for STT_SECTION symbol to SHF_MERGE section the first time
256         we see it.
257         * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
258         sec_merge_done.
259         (get_local_sym_hash): New, extracted from get_dyn_sym_info.
260         (get_dyn_sym_info): Use it.
261         (elfNN_ia64_relocate_section): Translate local dyn entries
262         for STT_SECTION symbol to SHF_MERGE section the first time
263         we see it.
265 2001-11-27  H.J. Lu <hjl@gnu.org>
267         * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
268         ELF.
270 2001-11-26  Jeffrey A Law  (law@cygnus.com)
272         * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
273         prototypes.
275 2001-11-24  Alan Modra  <amodra@bigpond.net.au>
277         * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
278         group sizes to accommodate c++.
280 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
282         * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
283         relocations in non-alloced sections against global symbols
284         defined in shared library being built.
285         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
287 2001-11-23  Jakub Jelinek  <jakub@redhat.com>
289         * elf.c (_bfd_elf_rela_local_sym): New.
290         * elflink.h (elf_link_input_bfd): Don't consider empty
291         merged sections as removed in relocation tests.
292         * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
293         * elf32-i386.c (elf_i386_relocate_section): Handle relocs
294         against STT_SECTION symbol of SHF_MERGE section.
295         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
296         * elf32-avr.c (elf32_avr_relocate_section): Call
297         _bfd_elf_rela_local_sym.
298         * elf32-cris.c (cris_elf_relocate_section): Likewise.
299         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
300         * elf32-fr30.c (fr30_final_link_relocate): Likewise.
301         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
302         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
303         * elf32-i370.c (i370_elf_relocate_section): Likewise.
304         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
305         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
306         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
307         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
308         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
309         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
310         * elf32-s390.c (elf_s390_relocate_section): Likewise.
311         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
312         * elf32-v850.c (v850_elf_relocate_section): Likewise.
313         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
314         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
315         * elf64-ppc.c (ppc64_elf_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         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
320         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
321         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
322         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
323         * elf32-sh.c (sh_elf_relocate_section): Likewise for
324         !partial_inplace relocs. Handle relocs against STT_SECTION
325         symbol of SHF_MERGE for partial_inplace relocs.
327 2001-11-21  Nick Clifton  <nickc@cambridge.redhat.com>
329         * po/Make-in (distclean): Move SRC-POTFILES.in and
330         BLD-POTFILES.in to maintainer-clean target.
332 2001-11-21  Alan Modra  <amodra@bigpond.net.au>
334         * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
335         than sym_sec->output_section to detect relocs against discarded
336         sections.
338 2001-11-19  H.J. Lu  <hjl@gnu.org>
340         * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
341         discarding relocations.
343 2001-11-19  Nick Clifton  <nickc@cambridge.redhat.com>
345         * section.c (bfd_is_const_section): New macro.  Return true if the
346         given seciton is one of the special, constant, sections.
347         * bfd-in2.h: Regenerate.        
348         * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
349         (coff_write_native_symbol): Use bfd_is_const_section.
351 2001-11-19  Alan Modra  <amodra@bigpond.net.au>
353         * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
355         * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
356         millicode syms as candidates for import stubs.
358         * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
359         (allocate_PIC_calls): Rename to allocate_plt_static.
360         (allocate_dynrelocs): Move most of code handling .plt entries to..
361         (allocate_plt_static): ..here.  Don't drop plabel entries.
363 2001-11-19  Hans-Peter Nilsson  <hp@bitrange.com>
365         * mmo.c: Adjust documentation tags to use texinfo 4 features.
367 2001-11-16  Nick Clifton  <nickc@cambridge.redhat.com>
369         * section.c (bfd_is_const_section): New macro.  Return true if the
370         section pointer refers to one of the special, constant sections.
371         * bfd-in2.h: Regenerate.
373         * coffgen.c (coff_count_linenumbers): Only update the line number
374         count in non-special sections.
375         (coff_write_native_symbol): Only update the line number file
376         position in non-special sections.
378 2001-11-15  Daniel Jacobowitz  <drow@mvista.com>
380         * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
381         local syms from discarded sections.  Update comment.
383 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
385         * po/SRC-POTFILES.in: Regenerate.
387         * elflink.h (elf_link_input_bfd): Complain about all relocs
388         against local syms from discarded sections.  K&R fixes.
389         (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
390         K&R fixes.
392 2001-11-15  Alexandre Oliva  <aoliva@redhat.com>
394         * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
395         overflows in the .stab section.
397 2001-11-14  Daniel Jacobowitz  <drow@mvista.com>
399         * bfd-in.h (bfd_elf32_discard_info): Add prototype.
400         (bfd_elf64_discard_info): Likewise.
401         * bfd-in2.h: Regenerate.
402         * elf-bfd.h (struct elf_reloc_cookie): New.
403         (struct elf_backend_data): Add elf_backend_discard_info,
404         elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
405         (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
406         (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
407         * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
408         (_bfd_elf32_mips_ignore_discarded_relocs): New.
409         (_bfd_elf32_mips_write_section): New.
410         (elf_backend_discard_info): Define.
411         (elf_backend_ignore_discarded_relocs): Define.
412         (elf_backend_write_section): Define.
413         * elfcode.h (elf_bfd_discard_info): Define.
414         (elf_reloc_symbol_deleted_p): Define.
415         * elflink.h (elf_link_input_bfd): Check
416         elf_section_ignore_discarded_relocs.  Call
417         bed->elf_backend_write_section if available.
418         (elf_reloc_symbol_deleted_p): New.
419         (elf_bfd_discard_info): New.
420         (elf_section_ignore_discarded_relocs): New.
421         * elfxx-target.h (elf_backend_discard_info): Define.
422         (elf_backend_ignore_discarded_relocs): Define.
423         (elf_backend_write_section): Define.
424         (elfNN_bed): Add elf_backend_discard_info,
425         elf_backend_ignore_discarded_relocs, and
426         elf_backend_write_section.
427         * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
428         * libbfd.h: Regenerate.
429         * stabs.c (_bfd_discard_section_stabs): New.
431 2001-11-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
433         * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
434         scheme to get rid of an ugly complicated test. 
435         * elf64-s390.c (elf_s390_relocate_section): Likewise.
437 2001-11-14  Andreas Jaeger  <aj@suse.de>
439         * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
440         x86-64 for display.
442 2001-11-14  Jakub Jelinek  <jakub@redhat.com>
444         * dwarf2.c (struct line_head) [total_length]: Change type to
445         bfd_vma.
446         (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
447         (struct comp_unit): Add stash and offset_size.
448         (read_8_bytes): Return bfd_vma.
449         (read_indirect_string): New.
450         (read_attribute): Handle DW_FORM_strp.
451         (decode_line_info): Support 64-bit DWARF format.
452         (_bfd_dwarf2_find_nearest_line): Likewise.
453         (parse_comp_unit): Set offset_size and stash.
455 2001-11-13  Keith Walker <keith.walker@arm.com>
457         * dwarf2.c (read_attribute_value): New function to handle
458         DW_FORM_indirect.
459         (read_attribute): Use it.
461 2001-11-13  Geoffrey Keating  <geoffk@redhat.com>
463         * dwarf2.c (decode_line_info): Properly deal with unknown standard
464         opcodes.
466 2001-11-13  John Marshall  <jmarshall@acm.org>
467             Alan Modra  <amodra@bigpond.net.au>
469         * section.c (bfd_make_section_anyway): Don't increment section_id
470         and the BFD's section_count if adding the section failed.
471         * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
472         change.
474 2001-11-12  Orjan Friberg  <orjanf@axis.com>
476         * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
477         core dump format.
479 2001-11-11  H.J. Lu <hjl@gnu.org>
481         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
482         _bfd_elf_strtab_size instead of _bfd_stringtab_size.
484         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
485         dynstr type to `struct elf_strtab_hash *'.
487 2001-11-11  Hans-Peter Nilsson  <hp@bitrange.com>
489         * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
490         size_t.  Rename second i to j.
492 2001-11-10  Jeffrey A Law  (law@cygnus.com)
494         * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
496 2001-11-10  Alan Modra  <amodra@bigpond.net.au>
498         * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
499         relocs into shared libs.
500         * elf32-cris.c (cris_elf_relocate_section): Likewise.
501         * elf32-i370.c (i370_elf_relocate_section): Likewise.
502         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
503         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
504         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
505         * elf32-sh.c (sh_elf_relocate_section): Likewise.
506         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
507         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
508         * elf64-s390.c (elf_s390_relocate_section): Likewise.
509         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
510         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
511         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
513         * elf.c (bfd_section_from_r_symndx): New function.
514         * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
515         (struct sym_sec_cache): New.
516         (bfd_section_from_r_symndx): Declare.
517         (struct bfd_elf_section_data): Change local_dynrel type to PTR.
518         * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
519         relocs when relocatable.  Don't zero entire reloc, just zero the
520         addend and sym.
521         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
522         (elf32_hppa_link_hash_table_create): Init it.
523         (elf32_hppa_check_relocs): Track dynamic relocs needed for local
524         syms on a per-section basis as we do for globals.
525         (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
526         (allocate_dynrelocs): Warning fix.
527         (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
528         section has been discarded.
529         (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
530         into shared libs.
531         * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
532         (elf_i386_link_hash_table_create): Init it.
533         (elf_i386_check_relocs): Track dynamic relocs needed for local
534         syms on a per-section basis as we do for globals.
535         (elf_i386_gc_sweep_hook): Update for local_dynrel change.
536         Remove dead code.
537         (allocate_dynrelocs): Warning fix.
538         (elf_i386_size_dynamic_sections): Don't allocate relocs when
539         section has been discarded.
540         (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
541         into shared libs.
542         * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
543         (elf_s390_link_hash_table_create): Init it.
544         (elf_s390_check_relocs): Track dynamic relocs needed for local
545         syms on a per-section basis as we do for globals.
546         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
547         Remove dead code.
548         (allocate_dynrelocs): Warning fix.
549         (elf_s390_size_dynamic_sections): Don't allocate relocs when
550         section has been discarded.
551         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
552         into shared libs.
553         * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
554         (ppc64_link_hash_table_create): Init it.
555         (ppc64_elf_check_relocs): Track dynamic relocs needed for local
556         syms on a per-section basis as we do for globals.
557         (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
558         (allocate_dynrelocs): Call the correct record_dynamic_dymbol
559         function.  Warning fix.
560         (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
561         section has been discarded.
562         (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
563         into shared libs.
564         * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
565         (elf_s390_link_hash_table_create): Init it.
566         (elf_s390_check_relocs): Track dynamic relocs needed for local
567         syms on a per-section basis as we do for globals.
568         (elf_s390_gc_sweep_hook): Update for local_dynrel change.
569         Remove dead code.
570         (allocate_dynrelocs): Warning fix.
571         (elf_s390_size_dynamic_sections): Don't allocate relocs when
572         section has been discarded.
573         (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
574         into shared libs.
576 2001-11-08  Martin Schwidefsky  <schwidefsky@de.ibm.com>
578         * elf32-s390: Major rework that introduces all recent changes to
579         the s390 backends.  Get a closer match to elf32-i386.
580         (elf_s390_relocate_section): Make use of dynamic section short-cuts.
581         Localise vars, and delay setting.  Better error reporting, replace
582         BFD_ASSERT with abort.  Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
583         symbol is not defined in the regular object file and tread the weak
584         definition as the normal one.  Don't discard relocs for undefweak or
585         undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
586         test for avoided copy relocs.  Reinstate fudge for unresolved relocs
587         in debugging sections.
588         (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc.  Don't do copy
589         reloc processing for weakdefs.  Remove redundant casts and aborts.
590         Delay setting of vars until needed.  Move creation of dynamic symbols
591         and allocation of .plt and .rela.plt to allocate_dynrelocs.  Replace
592         BFD_ASSERT with abort.  Discard .plt entries for everything with
593         plt.refcount <= 0.
594         (elf_s390_check_relocs):  Don't allocate space for dynamic relocs,
595         .got or .relgot here but do it in allocate_dynrelocs.  Reference count
596         possible .plt and .got entries.  Don't test input section SEC_READONLY
597         here to try to avoid copy relocs, and keep dyn_relocs regardless of
598         ELF_LINK_NON_GOT_REF.  Don't set DF_TEXTREL here.  Delay setting of
599         variables until needed.  Remove separate switch stmt for creating .got
600         section.  Initialise local_got_refcounts to 0.  Cache pointer to
601         "sreloc" section in elf_section_data. Tweak condition under which .got
602         created.  Report files with bad relocation section names.
603         (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
604         have been forced local.  Use same test to decide if we can use a
605         relative reloc for got as elf_s390_relocate_section.  Expand SHN_UNDEF
606         comment.  Move expressions out of function calls.  Replace BFD_ASSERT
607         with abort.
608         (elf_s390_finish_dynamic_sections): Migrate common code out of switch
609         statement.  Replace BFD_ASSERT with abort.
610         (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
611         to "ibfd".  Allocate space for local dyn relocs.  Use DF_TEXTREL flag
612         instead of looking up section names for DT_TEXTREL.  Replace
613         BFD_ASSERT with abort.  Zero out the dynamic allocated content space.
614         Add a comment to remind us that one day this ought to be fixed.
615         (struct elf_s390_link_hash_entry): Rename "root" to "elf".
616         (struct elf_s390_link_hash_table): Likewise.
617         (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
618         rid of unnecessary casts.
619         (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
620         Remove "section" field.
621         (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
622         Reference count possible .plt entries.  Don't deallocate .got and
623         .relgot space here.
624         (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
625         Update comment.
626         (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
627         dyn_relocs.
628         (elf_s390_discard_copies):  Delete.
629         (elf_s390_link_hash_traverse): Delete.
630         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
631         rather than gc variety).
632         (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
633         srelplt, sdynbss, srelbss fields.
634         (elf_s390_link_hash_table_create): Init them.
635         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
636         (allocate_dynrelocs): New function.
637         (create_got_section): New function.
638         (elf_backend_can_refcount): Define.
639         (elf_backend_copy_indirect_symbol): Define.
640         (elf_s390_copy_indirect_symbol): New function.
641         (elf_s390_create_dynamic_sections): New function.
642         (readonly_dynrelocs): New function.
643         * elf64-s390.c: Likewise.
645 2001-11-07  Jakub Jelinek  <jakub@redhat.com>
647         * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
648         (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
649         (elf-strtab.lo): Add rule.
650         * Makefile.in: Rebuilt.
651         * configure.in (elf): Add elf-strtab.lo.
652         * configure: Rebuilt.
653         * elf-bfd.h (elf_strtab_hash): Forward declare.
654         (struct elf_link_hash_table): Change dynstr type to
655         struct elf_strtab_hash *.
656         (struct elf_obj_tdata): Change strtab_ptr type to
657         struct elf_strtab_hash *.
658         (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
659         _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
660         _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
661         _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
662         _bfd_elf_strtab_finalize): New prototypes.
663         * elf-strtab.c: New file.
664         * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
665         and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
666         Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
667         when forcing dynamic symbol to local.
668         (elf_link_create_dynamic_sections): Call
669         _bfd_elf_strtab_init instead of elf_stringtab_init.
670         (elf_link_record_local_dynamic_symbol): Likewise, change
671         dynstr type.  Use _bfd_elf_strtab functions instead of
672         _bfd_stringtab calls.
673         (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
674         _bfd_stringtab calls.  For DT_RUNPATH and Verdaux vda_name fields,
675         call _bfd_elf_strtab_addref.  Call elf_finalize_dynstr.
676         (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
677         (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
678         dynamic symbol to local.
679         (elf_link_assign_sym_version): Likewise.
680         (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
681         _bfd_stringtab_emit.
682         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
683         type.  Call _bfd_elf_strtab functions instead of
684         _bfd_stringtab functions.
685         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
686         * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
687         (elf_fake_sections): Likewise.
688         (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
689         on shstrtab hash table, call _bfd_elf_strtab_addref on each section
690         name in the output.  Call _bfd_elf_strtab_finalize and
691         use _bfd_elf_strtab_offset to finalize sh_name section header fields.
692         (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
693         instead of _bfd_stringtab_size.
694         (prep_headers): Change shstrtab type.
695         Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
697 2001-11-07  Alan Modra  <amodra@bigpond.net.au>
699         * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
700         bad symtab segfault.  Formatting and warning fixes.  Improve
701         error message for internationalisation.
703 2001-11-06  H.J. Lu  (hjl@gnu.org)
705         * elflink.h (elf_link_input_bfd): Complain about relocs against
706         discarded sections.
708 2001-11-03  Alan Modra  <amodra@bigpond.net.au>
710         * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
712 2001-11-02  H.J. Lu  <hjl@gnu.org>
714         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
715         dynamic relocation for symbols defined in regular objects when
716         creating executables.
718 2001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>
720         * configure.in (ALL_LINGUAS): Add "fr".
721         * configure: Regenerate.
722         * po/fr.po: New file.
724         * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
726 2001-11-02  John David Anglin  <dave@hiauly1.hia.nrc.ca>
728         * som.c (setup_sections): Initialize subspace_sections.
730 2001-11-02  H.J. Lu  (hjl@gnu.org)
732         * coffgen.c (coff_object_p): Return 0 if the header is too big.
734 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
736         * elfcore.h (elf_core_file_p): Preserve and clear abfd section
737         information.  Save bfd arch and mach values.  Restore on error.
739 2001-11-02  Alan Modra  <amodra@bigpond.net.au>
741         * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
742         (allocate_PIC_calls): New function.
743         (allocate_dynrelocs): Don't allocate pic_call plt entries here.
744         (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
745         (elf32_hppa_finish_dynamic_symbol): Remove dead code.
747 2001-11-02  Hans-Peter Nilsson  <hp@axis.com>
749         * elf32-cris.c (cris_elf_grok_prstatus): New function.
750         (cris_elf_grok_psinfo): New function.
751         (elf_backend_grok_prstatus): Define.
752         (elf_backend_grok_psinfo): Define.
754 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
756         * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
757         prediction bits.
759 2001-10-31  Chris Demetriou  <cgd@demetriou.com>
761         * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
762         relocations properly.
764 2001-10-31  H.J. Lu <hjl@gnu.org>
766         * elflink.h (elf_link_output_extsym): Don't clear the visibility
767         field for relocateable.
769 2001-11-01  Alan Modra  <amodra@bigpond.net.au>
771         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
772         .plt relocs in DT_RELASZ.
774 2001-10-29  NIIBE Yutaka  <gniibe@m17n.org>
776         * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
777         targets.
779 2001-10-31  Nick Clifton  <nickc@cambridge.redhat.com>
781         * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
783 2001-10-30  Hans-Peter Nilsson  <hp@bitrange.com>
785         * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
786         (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
787         (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
788         Regenerate dependencies.
789         * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
790         * config.bfd: [BFD64] (mmix-*-*): New case.
791         * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
792         * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
793         (bfd_mmix_arch): Declare.
794         (bfd_archures_list): Add bfd_mmix_arch.
795         * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
796         (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
797         (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
798         bfd_mmo_mmix_vec.
799         * reloc.c: Add MMIX relocations.
800         * bfd.c (struct _bfd, tdata): Add mmo_data.
801         * Makefile.in: Regenerate.
802         * configure: Regenerate.
803         * libbfd.h: Regenerate.
804         * bfd-in2.h: Regenerate.
805         * configure: Rebuild.
807 2001-10-30  Richard Earnshaw (rearnsha@arm.com)
809         * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
810         p_paddr of the segment that contains it.
811         (copy_private_bfd_data): If the LMA for a segment is known, use it
812         for matching sections to segments.
813         (assign_file_positions_for_segments): Use the LMA when adjusting
814         for inter-section alignment padding.
816 2001-10-29  Kazu Hirata  <kazu@hxi.com>
818         * README: Fix a typo.
820 2001-10-24  Richard Henderson  <rth@redhat.com>
822         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
823         timestamp to time_t for ctime.
825 2001-10-24  Hans-Peter Nilsson  <hp@axis.com>
827         * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
828         unsigned, increasing index.
830 2001-10-23  H.J. Lu <hjl@gnu.org>
832         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
833         m != NULL before accessing it.
835 2001-10-23  Alan Modra  <amodra@bigpond.net.au>
837         * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
838         bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
839         doesn't accept BFD_RELOC_* on some targets, eg. hppa.
841         * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
842         (hppa_link_hash_newfunc): Likewise.
843         (elf32_hppa_finish_dynamic_symbol): Likewise.
844         (allocate_dynrelocs): Always allocate .got relocs if shared.
845         (elf32_hppa_relocate_section): Output them too.  Similarly
846         consolidate .plt reloc code, and no longer initialise .plt
847         when a reloc is output.
848         (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
849         when no reloc is output.
851         From Herbert Xu <herbert@gondor.apana.org.au>
852         * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
853         unreachable branches.
855 2001-10-22  H.J. Lu <hjl@gnu.org>
857         * configure.in (WIN32LIBADD): Use -L../libiberty for
858         mips*-*-linux*.
859         * configure: Rebuild.
861 2001-10-21  H.J. Lu <hjl@gnu.org>
863         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
864         if shared library is enabled only for Linux hosts.
865         * configure: Rebuild.
867 2001-10-21  H.J. Lu <hjl@gnu.org>
869         * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
870         ../libiberty/Makefile instead of $enable_shared.
871         * configure: Rebuild.
873 2001-10-21  H.J. Lu <hjl@gnu.org>
875         * elf32-cris.c (cris_reloc_type_lookup): Use int for index.  Cover
876         index 0.
878 2001-10-20  H.J. Lu <hjl@gnu.org>
880         * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
881         if shared library is enabled.
882         * configure: Rebuild.
884 2001-10-20  H.J. Lu <hjl@gnu.org>
886         * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
888 2001-10-19  H.J. Lu <hjl@gnu.org>
890         * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
891         size is empty.
893 2001-10-18  H.J. Lu <hjl@gnu.org>
895         * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
896         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
898 2001-10-18  Jakub Jelinek  <jakub@redhat.com>
900         * section.c (_bfd_strip_section_from_output): Don't count
901         SEC_EXCLUDE sections as references.  Set SEC_EXCLUDE.
903 2001-10-17  Alan Modra  <amodra@bigpond.net.au>
905         * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
906         Elf_Internal_Shdr.contents now that it's no longer a PTR.
907         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
908         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
909         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
910         * elf32-sh.c (sh_elf_relax_section): Likewise.
911         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
912         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
913         * elf.c (setup_group): Warning fixes.
914         * elflink.h (elf_link_sort_relocs): Likewise.
915         * pdp11.c (slurp_reloc_table): Likewise.
917 2001-10-16  Jeff Holcomb  <jeffh@redhat.com>
919         * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
920         casts.
922 2001-10-15  H.J. Lu <hjl@gnu.org>
924         * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
925         for relocations against discarded link-once section.
927 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
929         * elf32-i386.c (elf_i386_relocate_section): Report some detail on
930         bfd_reloc_outofrange and similar errors.
932         * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
933         rather than ind->weakdef.
934         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
935         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
936         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
937         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
938         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
940 2001-10-15  Alan Modra  <amodra@bigpond.net.au>
941             H.J. Lu  <hjl@gnu.org>
943         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
944         counts for aliases instead of aborting.
945         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
946         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
948         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
949         to -1 for non-function symbols.
950         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
951         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
952         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
953         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
954         * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
955         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
956         plt.offset instead of plt.refcount when setting to -1.
958 2001-10-12  Nick Clifton  <nickc@cambridge.redhat.com>
960         * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
961         like R_ARM_PC24.  Include reloc number in error message about
962         unresolvable relocs.
964 2001-10-10  Jakub Jelinek  <jakub@redhat.com>
966         * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
967         relocations against the same symbol in .rel{,a}.dyn section.
969 2001-10-10  Kazu Hirata  <kazu@hxi.com>
971         * aout-encap.c: Fix comment typos.
972         * aoutx.h: Likewise.
973         * archive.c: Likewise.
974         * bout.c: Likewise.
975         * coff64-rs6000.c: Likewise.
976         * coffcode.h: Likewise.
977         * coffgen.c: Likewise.
978         * cofflink.c: Likewise.
979         * coff-mips.c: Likewise.
980         * ecoff.c: Likewise.
981         * elf32-m32r.c: Likewise.
982         * libcoff-in.h: Likewise.
983         * libecoff.h: Likewise.
984         * libxcoff.h: Likewise.
985         * nlm32-i386.c: Likewise.
986         * pdp11.c: Likewise.
987         * section.c: Likewise.
988         * som.c: Likewise.
989         * som.h: Likewise.
990         * bfd-in2.h: Regenerate.
991         * libcoff.h: Likewise.
993 2001-10-10  Alan Modra  <amodra@bigpond.net.au>
995         * elf.c (elf_map_symbols): Don't create new section symbols; Use
996         existing section syms.  Update comments.
997         (copy_private_bfd_data): Formatting fixes.
998         (elfcore_grok_win32pstatus): Likewise.
999         (swap_out_syms): Likewise.  Remove unnecessary level of braces.
1001 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
1003         * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
1004         "group_name".
1005         (elf_group_name): Define.
1006         (elf_next_in_group): Define.
1007         * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
1008         (setup_group): Don't use sec->lineno for SHT_GROUP section to store
1009         first member section; Instead use elf_next_in_group.
1010         (bfd_section_from_shdr): Likewise.
1011         (set_group_contents): Likewise.  Use elf_section_syms, not sec->symbol.
1013 2001-10-09  Alan Modra  <amodra@bigpond.net.au>
1015         * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
1016         "next_in_group".  Fix gp and gp_size comments.
1017         * elf.c (union elf_internal_group): New.
1018         (setup_group): New function.
1019         (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
1020         Call setup_group for SHF_GROUP sections.
1021         (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
1022         (elf_fake_sections): Set header type for SEC_GROUP, and header
1023         flags for sections in a group.
1024         (set_group_contents): New function.
1025         (_bfd_elf_compute_section_file_positions): Call it.
1026         (assign_section_numbers): Set sh_link for SHT_GROUP.
1028         * elflink.h (gc_mark_hook): Handle section groups.
1029         * elfxx-target.h: Add SEC_GROUP to applicable_flags.
1030         * section.c (SEC_GROUP): Define.
1031         (struct sec): Comment fixes.
1032         * bfd-in2.h: Regenerate.
1034         * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
1035         out of function args.
1036         (_bfd_elf_canonicalize_reloc): Similarly.
1037         (_bfd_elf_get_symtab): Here too.
1038         (_bfd_elf_canonicalize_dynamic_symtab): And here.
1039         * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
1040         bfd_bread, and remove unnecessary cast.
1042 2001-10-08  Aldy Hernandez  <aldyh@redhat.com>
1044         * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
1046 2001-10-06  Stephane Carrez  <Stephane.Carrez@worldnet.fr>
1048         * dwarf2.c (comp_unit_find_nearest_line): Check for end of
1049         compilation unit.
1051 2001-10-06  Alan Modra  <amodra@bigpond.net.au>
1053         * bfd.c (bfd_assert): Report bfd version.
1054         (_bfd_abort): Likewise.
1056         * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
1057         section sym values.  Instead replace any relocs against them with
1058         relocs against STN_UNDEF, which has a zero value.
1060         * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
1061         relocs.
1063 2001-10-05  Jeff Law <law@redhat.com>
1065         * som.h (som_exec_data): New field "version_id".
1066         * som.c (som_object_setup): Record the version_id if it
1067         exists.
1068         (som_prep_headers): Do not initialize version_id here.
1069         (som_finish_writing): Initialize version_id here.
1071 2000-10-05  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1073         * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
1074         according to the MIPS/SGI ELF64 ABI Draft.
1075         (mips_elf_sort_hash_table): Typo.
1077 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
1079         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
1081         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
1082         copying flags if this is a weakdef.
1084 2001-10-04  Alan Modra  <amodra@bigpond.net.au>
1086         * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
1087         packing.
1089         * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
1090         to 1 rather than 0 to avoid confusing copy_indirect_symbol.
1091         (mips_elf_sort_hash_table_f): Compare got.offset against 1.
1093         * Makefile.am (BFD_H_DEPS): Add symcat.h.  Ensure everything
1094         depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
1095         backends we configure.  Run "make dep-am".
1096         (install-data-local): Install symcat.h.
1097         * dep-in.sed: Remove symcat.h from dependencies.
1098         * Makefile.in: Regenerate.
1100 2001-10-03  Vassili Karpov  <malc@pulsesoft.com>
1102         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
1104 2001-10-03  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1106         * elf64-mips.c (elf_backend_may_use_rela_p): New define.
1107         (elf_backend_default_use_rela_p): New define.
1109 2001-10-03  Alan Modra  <amodra@bigpond.net.au>
1111         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
1112         change.
1114         * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
1115         * configure: Regenerate.
1116         * Makefile.am (BFD_H_FILES): Add version.h.
1117         * Makefile.in: Regenerate.
1118         * po/SRC-POTFILES.in: Regenerate.
1120         * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
1121         elf_backend_copy_indirect_symbol so that backend has a chance to
1122         copy other necessary fields.
1123         * elf-bfd.h (struct elf_backend_data): Update description of
1124         elf_backend_copy_indirect_symbol.
1125         * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
1126         copying flags if this is a weakdef.
1127         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
1128         (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
1129         than bfd_link_hash_lookup.
1130         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
1131         reloc processing for weakdefs.
1132         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1133         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1135 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
1137         * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
1138         result of ELF64_R_TYPE to enum before using in a switch.
1139         (ppc64_elf_gc_mark_hook): Likewise.
1140         (ppc64_elf_gc_sweep_hook): Likewise.
1141         (ppc64_elf_reloc_type_class): Likewise.
1143 2001-10-02  Alan Modra  <amodra@bigpond.net.au>
1145         * version.h: New file.
1146         * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
1147         (BFD_VERSION_DATE): Define.
1148         (BFD_VERSION_STRING): Define.
1149         * configure.in: AC_SUBST bfd_version, bfd_version_date and
1150         bfd_version_string.
1151         (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
1152         * bfd-in2.h: Regenerate.
1153         * configure: Regenerate.
1154         * Makefile.am: Run "make dep-am".
1155         * Makefile.in: Regenerate.
1157         * bfd-in.h: Include "symcat.h".
1158         (CONCAT4): Redefine as for old CAT4.
1159         * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
1160         Add warning regarding whitespace.
1161         * aout-cris.c: Likewise.
1162         * aout-ns32k.c: Likewise.
1163         * aout-sparcle.c: Likewise.
1164         * aout-tic30.c: Likewise.
1165         * aout0.c: Likewise.
1166         * armnetbsd.c: Likewise.
1167         * demo64.c: Likewise.
1168         * elf-bfd.h: Likewise.
1169         * gen-aout.c: Likewise.
1170         * host-aout.c: Likewise.
1171         * hp300bsd.c: Likewise.
1172         * hp300hpux.c: Likewise.
1173         * i386aout.c: Likewise.
1174         * i386bsd.c: Likewise.
1175         * i386dynix.c: Likewise.
1176         * i386freebsd.c: Likewise.
1177         * i386linux.c: Likewise.
1178         * i386lynx.c: Likewise.
1179         * i386mach3.c: Likewise.
1180         * i386netbsd.c: Likewise.
1181         * libaout.h: Likewise.
1182         * m68k4knetbsd.c: Likewise.
1183         * m68klinux.c: Likewise.
1184         * m68klynx.c: Likewise.
1185         * m68knetbsd.c: Likewise.
1186         * m88kmach3.c: Likewise.
1187         * mipsbsd.c: Likewise.
1188         * newsos3.c: Likewise.
1189         * ns32knetbsd.c: Likewise.
1190         * pc532-mach.c: Likewise.
1191         * pdp11.c: Likewise.
1192         * riscix.c: Likewise.
1193         * sparclinux.c: Likewise.
1194         * sparclynx.c: Likewise.
1195         * sparcnetbsd.c: Likewise.
1196         * sunos.c: Likewise.
1197         * targets.c: Likewise.
1198         * vaxnetbsd.c: Likewise.
1199         * vms-hdr.c: Likewise.
1201 2001-10-01  Alan Modra  <amodra@bigpond.net.au>
1203         * bfd-in.h: Remove comments regarding generated files.
1204         * libbfd-in.h: Likewise.
1205         * libcoff-in.h: Likewise.
1206         * bfd-in2.h: Regenerate.
1207         * libbfd.h: Likewise.
1208         * libcoff.h: Likewise.
1210 2001-09-30  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1211             Hans-Peter Nilsson  <hp@bitrange.com>
1213         * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
1214         partial_inplace, matching assembler output.  Set src_mask to
1215         all ones.
1216         (sh_elf_relocate_section): Delete misplaced comment.
1217         For relocatable linking against section symbol, call
1218         _bfd_relocate_contents for partial_inplace relocs and adjust
1219         rel->r_addend for others.
1220         <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
1221         bfd_get_32, not at rel->r_addend.
1223 2001-09-30  Alan Modra  <amodra@bigpond.net.au>
1225         * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
1226         the old dir refcount, so we indirectly set them to init_refcount.
1227         Short-circuit asserts when we've just verified they are true.
1229 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1231         * section.c (struct sec): Remove kept_section.
1232         (STD_SECTION): Remove kept_section initialisation.
1233         (bfd_make_section_anyway): Here too.
1234         * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
1235         * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
1236         * elflink.h (elf_link_input_bfd): Set discarded link-once section
1237         symbols to zero, and remove all code involved with kept_section
1238         and tracking section symbol values.
1239         * bfd-in2.h: Regenerate.
1240         * configure.in: Bump version number.
1241         * configure: Regenerate.
1243 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1245         * elf64-ppc.c (struct ppc_dyn_relocs): New.
1246         (IS_ABSOLUTE_RELOC): Define.
1247         (struct ppc_link_hash_entry): New.
1248         (struct ppc_link_hash_table): New.
1249         (ppc_hash_table): Define.
1250         (link_hash_newfunc): New function.
1251         (ppc64_elf_link_hash_table_create): New function.
1252         (create_got_section): New function.
1253         (ppc64_elf_create_dynamic_sections): Call create_got_section.  Stash
1254         pointers to our dynamic sections in hash table.
1255         (ppc64_elf_copy_indirect_symbol): New function.
1256         (ppc64_elf_check_relocs): Remove DEBUG code.  Use short-cuts to
1257         dynamic sections.  Localise vars.  Modify code for refcounts
1258         starting from zero.  Don't allocate here, or force symbols dynamic.
1259         Don't copy all relocs if shared, select ones we need.  Add code
1260         to track possible copy relocs for non-shared link.
1261         (ppc64_elf_gc_mark_hook): Update comment.
1262         (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
1263         (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code.  Rewrite .plt
1264         code for reference counting garbage collection.  Don't create .plt
1265         entries for functions that don't comply with ABI naming convention,
1266         and don't allocate .plt space here.  Use short-cuts to dynamic
1267         sections.  If possible, keep dynamic relocations instead of using
1268         copy relocs.  Remove confused comments.
1269         (ppc_adjust_dynindx): Delete.
1270         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1271         (allocate_dynrelocs): New function.
1272         (readonly_dynrelocs): New function.
1273         (ppc64_elf_size_dynamic_sections): Rewrite.  Allocate local .got
1274         space here, and call allocate_dynrelocs to allocate space for
1275         global .plt, .got and reloc sections.  Use short-cuts to dynamic
1276         sections.  Call readonly_dynrelocs to determine whether we need
1277         DT_TEXTREL.  Don't generate section symbols here, the generic
1278         ELF linker code does it for us.
1279         (ppc64_elf_final_link): Call regular ELF backend linker rather than
1280         gc variety, since we do our own .got handling.
1281         (ppc64_elf_relocate_section): Remove DEBUG code.  Make use of
1282         dynamic section short-cuts.  Localise vars, and delay setting.
1283         Handle unknown relocs in main switch statement.  Replace ugly
1284         complicated tests for unresolvable relocs with a simple direct
1285         scheme using "unresolved_reloc" var.  Test ELF_ST_VISIBILITY
1286         before allowing an undefined sym in a shared lib.  Do R_*_DS tests
1287         after main switch, when we've set addend.  Do non-addend insn
1288         tweaks before main swithc.  Ignore input_section->vma when
1289         calculating reloc offsets as it's always zero.  Rewrite dynamic
1290         reloc handling.  Consolidate R_*_HA handling.  Handle more relocs.
1291         (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code.  Make use
1292         of dynamic section short-cuts.  Reorganise .plt handling code.
1293         Remove confused comments.  Take note of ELF_LINK_FORCED_LOCAL.
1294         Move expressions out of swap_reloca_out function calls.
1295         (ppc64_elf_reloc_type_class): New function.
1296         (ppc64_elf_info_to_howto): Move common expression to local var.
1297         (ppc64_elf_finish_dynamic_sections): Remove DEBUG code.  Make use
1298         of dynamic section short-cuts.  Don't fiddle with section syms
1299         here as the ELF linker does it for us.
1300         (elf_backend_can_refcount): Define.
1301         (bfd_elf64_bfd_link_hash_table_create): Define.
1302         (elf_backend_copy_indirect_symbol): Define.
1303         (elf_backend_reloc_type_class): Define.
1304         (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
1306 2001-09-29  Alan Modra  <amodra@bigpond.net.au>
1308         * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
1309         (struct elf_backend_data): Add can_refcount.
1310         * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts.  Set
1311         got.refcount and plt.refcount from init_refcount.
1312         (_bfd_elf_link_hash_table_init): Set up init_refcount.
1313         (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
1314         rather than got/plt.offset, and test for <= 0 rather than -1.
1315         * elflink.h (size_dynamic_sections): Set init_refcount to -1.
1316         * elfxx-target.h (elf_backend_can_refcount): Define.
1317         (elfNN_bed): Init can_refcount.
1318         * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
1319         (_bfd_generic_link_hash_newfunc): Likewise.
1320         * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
1321         starting from zero.
1322         (elf_backend_can_refcount): Define.
1323         * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
1324         starting from zero.
1325         (elf32_hppa_copy_indirect_symbol): Make static to agree with
1326         prototype.
1327         (elf_backend_can_refcount): Define.
1328         * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
1329         starting from zero.
1330         (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
1331         (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
1332         (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
1333         (elf_backend_can_refcount): Define.
1334         (elf_i386_copy_indirect_symbol): Make static to agree with
1335         prototype.  Formatting fix.
1336         * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
1337         starting from zero.
1338         (elf_backend_can_refcount): Define.
1339         * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
1340         starting from zero.
1341         (elf_backend_can_refcount): Define.
1342         * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
1343         starting from zero.
1344         (elf_backend_can_refcount): Define.
1345         * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
1346         starting from zero.
1347         (elf_backend_can_refcount): Define.
1348         * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
1349         starting from zero.
1350         (elf_backend_can_refcount): Define.
1352         * som.c (som_write_symbol_strings): Cast current_offset in
1353         bfd_seek call to match param type.
1355 2001-09-28  J. Brobecker <brobecker@gnat.com>
1357         * som.c (som_write_symbol_strings): Fix incorrect type of
1358         current_offset to match the function definition. Fixes a build
1359         failure on HPUX-11.00.
1361 2001-09-28  Richard Henderson  <rth@redhat.com>
1363         * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
1364         SEC_MERGE, SEC_STRINGS.
1366         * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
1367         * bfd-in2.h: Rebuild.
1369 2001-09-28  Alan Modra  <amodra@bigpond.net.au>
1371         * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
1372         reloc code using x86_64_reloc_map.
1374         * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
1375         no longer allocate here.  Localise some vars to blocks where they
1376         are used.
1377         (elf32_hppa_adjust_dynamic_symbol): Correct a comment.  Delay
1378         setting of vars until needed.
1379         (allocate_dynrelocs): Don't create a .plt entry without a reloc
1380         when symbol visibilty makes a function local.
1381         (elf32_hppa_finish_dynamic_symbol): Move expressions out of
1382         swap_reloca_out function calls.
1383         (elf32_hppa_relocate_section): Likewies.  Comment typo fix.
1384         (elf32_hppa_finish_dynamic_sections): Migrate common code out of
1385         switch statement.
1387         * elf32-i386.c (elf_i386_check_relocs): Update comment since we
1388         no longer allocate here.  Localise some vars to blocks where they
1389         are used.  Remove separate switch stmt for creating .got sec.
1390         (elf_i386_adjust_dynamic_symbol): Correct a comment.  Remove
1391         redundant casts and aborts.  Delay setting of vars until needed.
1392         (allocate_dynrelocs): Remove redundant casts and aborts.
1393         (elf_i386_size_dynamic_sections): Move comment.
1394         (elf_i386_finish_dynamic_symbol): Move expressions out of function
1395         calls.
1396         (elf_i386_relocate_section): Likewise.  Comment typo fix.
1397         (elf_i386_finish_dynamic_sections): Migrate common code out of
1398         switch statement.
1399         (elf_backend_* defines): Sort.
1401         * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
1402         without a reloc when symbol visibilty makes a function local.
1404 2001-09-27  Nick Clifton  <nickc@cambridge.redhat.com>
1406         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
1407         conflicting float flags.
1409 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1411         * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
1412         (elf_backend_copy_indirect_symbol): Define.
1413         (struct elf_i386_link_hash_entry): Rename "root" to "elf".
1414         (struct elf_i386_link_hash_table): Likewise.
1415         (link_hash_newfunc): Get rid of unnecessary casts.
1416         (elf_i386_link_hash_table_create): Likewise.
1417         (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
1418         Don't test input section SEC_READONLY here to try to avoid copy
1419         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1420         (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
1421         here to properly test whether we need copy relocs.  Do so for weak
1422         syms too.
1424         * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
1425         (elf_backend_copy_indirect_symbol): Define.
1426         (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
1427         (stub_hash_newfunc): Get rid of unnecessary casts.
1428         (hppa_link_hash_newfunc): Likewise.
1429         (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
1430         Don't test input section SEC_READONLY here to try to avoid copy
1431         relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
1432         (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
1433         here to properly test whether we need copy relocs.  Do so for weak
1434         syms too.
1436 2001-09-26  Alan Modra  <amodra@bigpond.net.au>
1438         * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
1439         VA_OPEN, VA_FIXEDARG, VA_CLOSE.
1440         (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
1442 2001-09-25  Jakub Jelinek  <jakub@redhat.com>
1444         * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
1445         computation.
1447 2001-09-25  H.J. Lu  <hjl@gnu.org>
1449         * bfd-in2.h: Regenerated.
1451 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1453         * elf32-i386.c: Add comment re linker function names and ordering.
1454         (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
1455         (elf_i386_grok_prstatus): Move before linker functions.
1456         (elf_i386_grok_psinfo): Likewise.
1457         (elf_i386_fake_sections): Move so that functions are ordered.
1458         (elf_i386_reloc_type_class): Likewise.  Comment function purpose.
1460 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1462         * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
1463         throughout file.
1465         * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete.  Remove all
1466         code handling this option.
1467         (LONG_BRANCH_VIA_PLT): Likewise.
1468         (RELATIVE_DYNRELOCS): Define as zero.
1469         (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
1470         "pc_count" fields.  Remove "section" field.
1471         (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
1472         (elf32_hppa_check_relocs): Don't allocate space for dynamic
1473         relocs here.  Instead, record all needed dynamic relocs via
1474         dyn_relocs and local_dynrel.  Cache pointer to "sreloc" section
1475         in elf_section_data.
1476         (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1477         (allocate_plt_and_got_and_discard_relocs): Rename to
1478         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1479         (readonly_dynrelocs): New function.
1480         (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
1481         Call readonly_dynrelocs to determine need for DT_TEXTREL.
1482         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1483         (elf32_hppa_relocate_section): Make use of cached sreloc.
1484         (elf32_hppa_reloc_type_class): New function.
1485         (elf_backend_reloc_type_class): Define.
1487 2001-09-25  Alan Modra  <amodra@bigpond.net.au>
1489         * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
1490         and "sreloc" fields.
1491         * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
1492         "pc_count" fields.  Remove "section" field.
1493         (elf_i386_check_relocs): Don't set DF_TEXTREL here.  Don't
1494         allocate space for dynamic relocs here.  Instead, record all
1495         needed dynamic relocs via dyn_relocs and local_dynrel.  Cache
1496         pointer to "sreloc" section in elf_section_data.
1497         (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
1498         (allocate_plt_and_got_and_discard_relocs): Rename to
1499         allocate_dynrelocs.  Allocate rather than discarding dyn relocs.
1500         (readonly_dynrelocs): New function.
1501         (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
1502         Rename "i" to "ibfd".  Allocate space for local dyn relocs.
1503         (elf_i386_relocate_section): Make use of cached sreloc.
1505 2001-09-24  Alan Modra  <amodra@bigpond.net.au>
1507         * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
1508         reloc rather than just the type.
1509         (_bfd_elf_reloc_type_class): Likewise.
1510         * elf.c (_bfd_elf_reloc_type_class): Likewise.
1511         * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
1512         * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
1513         * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
1514         * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
1515         * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
1516         * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
1517         * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
1518         * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
1519         * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
1520         * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
1521         * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
1522         * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
1523         * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
1524         * elflink.h: Formatting fixes.
1525         (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
1526         Call bfd_zmalloc rather than calloc.  Remove unnecessary cast of
1527         o->contents to PTR.  Update call to elf_backend_reloc_type_class.
1529 2001-09-22  John Reiser  <jreiser@BitWagon.com>
1531         * elfcode.h (elf_object_p): Allow for no section header at all in
1532         non-ET_REL files.  Honor 0 for e_shnum, e_shstrndx, e_shoff.
1534 2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
1536         * elfxx-ia64.c: Fix compile time warning messages.
1537         * coff-mcore.c: Fix compile time warning messages.
1538         * coff-ppc.c: Fix compile time warning messages.
1539         * coffcode.h: Fix compile time warning messages.
1540         * elf32-mips.c: Fix compile time warning messages.
1541         * elf64-alpha.c: Fix compile time warning messages.
1542         * libbfd.c: Fix compile time warning messages.
1543         * bfd-in2.h: Regenerate.
1545 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1547         * Makefile.am: Run "make dep-am".
1548         * Makefile.in: Regenerate.
1550         * aoutx.h: Formatting fixes.
1551         * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
1553         * linker.c: Replace bfd_get_filename with bfd_archive_filename
1554         in error message.
1556 2001-09-21  Alan Modra  <amodra@bigpond.net.au>
1558         * bfd.c (bfd_archive_filename): New function.
1559         * bfd-in2.h: Regenerate.
1560         * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
1561         in error messages where the bfd is an input bfd.
1562         * aout-cris.c: Likewise.
1563         * coff-arm.c: Likewise.
1564         * coff-mcore.c: Likewise.
1565         * coff-ppc.c: Likewise.
1566         * coff-rs6000.c: Likewise.
1567         * coff-sh.c: Likewise.
1568         * coff-tic54x.c: Likewise.
1569         * coff-tic80.c: Likewise.
1570         * coff64-rs6000.c: Likewise.
1571         * coffcode.h: Likewise.
1572         * coffgen.c: Likewise.
1573         * cofflink.c: Likewise.
1574         * ecofflink.c: Likewise.
1575         * elf-hppa.h: Likewise.
1576         * elf.c: Likewise.
1577         * elf32-arm.h: Likewise.
1578         * elf32-cris.c: Likewise.
1579         * elf32-gen.c: Likewise.
1580         * elf32-hppa.c: Likewise.
1581         * elf32-i370.c: Likewise.
1582         * elf32-i386.c: Likewise.
1583         * elf32-m32r.c: Likewise.
1584         * elf32-mcore.c: Likewise.
1585         * elf32-mips.c: Likewise.
1586         * elf32-ppc.c: Likewise.
1587         * elf32-s390.c: Likewise.
1588         * elf32-sh.c: Likewise.
1589         * elf32-sparc.c: Likewise.
1590         * elf32-v850.c: Likewise.
1591         * elf64-alpha.c: Likewise.
1592         * elf64-gen.c: Likewise.
1593         * elf64-ppc.c: Likewise.
1594         * elf64-s390.c: Likewise.
1595         * elf64-sparc.c: Likewise.
1596         * elf64-x86-64.c: Likewise.
1597         * elflink.h: Likewise.
1598         * elfxx-ia64.c: Likewise.
1599         * ieee.c: Likewise.
1600         * ihex.c: Likewise.
1601         * libbfd.c: Likewise.
1602         * pdp11.c: Likewise.
1603         * pe-mips.c: Likewise.
1604         * peicode.h: Likewise.
1605         * srec.c: Likewise.
1606         * xcofflink.c: Likewise.
1608         * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
1610         * elflink.c (_bfd_elf_create_linker_section): Better grammar for
1611         error message.
1613         * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
1614         error message.
1616         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
1617         Consolidate error messages, and split long messages to two lines.
1619 2001-09-20  John Reiser  <jreiser@BitWagon.com>
1621         * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
1622         and info->allow_shlib_undefined.
1623         * elf32-cris.c: Likewise.
1624         * elf32-hppa.c: Likewise.
1625         * elf32-m68k.c: Likewise.
1626         * elf32-mips.c: Likewise.
1627         * elf32-ppc.c: Likewise.
1628         * elf32-s390.c: Likewise.
1629         * elf32-sh.c: Likewise.
1630         * elf32-sparc.c: Likewise.
1631         * elf64-alpha.c: Likewise.
1632         * elf64-hppa.c: Likewise.
1633         * elf64-ppc.c: Likewise.
1634         * elf64-s390.c: Likewise.
1635         * elf64-sparc.c: Likewise.
1636         * elf64-x86-64.c: Likewise.
1637         * elfxx-ia64.c: Likewise.
1639 2001-09-18  Bruno Haible  <haible@clisp.cons.org>
1641         * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
1642         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1643         * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
1644         (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
1645         * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
1646         (bfd_default_scan): Use ISDIGIT instead of isdigit.
1647         * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
1648         (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
1649         isxdigit/isdigit/islower.
1650         * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
1651         (mangle_name): Use ISALNUM instead of isalnum.
1652         * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
1653         (scan): Use ISDIGIT instead of isdigit.
1654         * hosts/alphavms.h: Don't include <ctype.h>.
1655         * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
1656         (ieee_object_p): Use TOUPPER instead of toupper.
1657         * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
1658         (ihex_bad_byte): Use ISPRINT instead of isprint.
1659         * merge.c: Don't include <ctype.h>.
1660         * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
1661         (oasys_write_sections): Use ISDIGIT instead of isdigit.
1662         * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
1663         (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
1664         * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
1665         (mangle_name): Use ISALNUM instead of isalnum.
1666         * som.c: Include "safe-ctype.h" instead of <ctype.h>.
1667         (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
1668         isupper/islower/isdigit.
1669         (som_decode_symclass): Use TOUPPER instead of toupper.
1670         * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
1671         (srec_bad_byte): Use ISPRINT instead of isprint.
1672         (srec_scan): Use ISSPACE instead of isspace.
1673         * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
1674         (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
1675         * syms.c: Include "safe-ctype.h"
1676         (islower, toupper): Remove macro definitions.
1677         (bfd_decode_symclass): Use TOUPPER instead of toupper.
1678         * vms-gsd.c: Don't include <ctype.h>.
1679         * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
1680         (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
1681         islower/toupper.
1682         * vms-tir.c: Don't include <ctype.h>.
1684 2001-09-18  Alan Modra  <amodra@bigpond.net.au>
1686         * libbfd.c (bfd_bread): New function replacing bfd_read without
1687         redundant params.  Allow reads up to (size_t) -2 in length.
1688         (bfd_bwrite): Similarly for bfd_write.
1689         (real_read): Return a size_t.
1690         (bfd_read): Call bfd_bread.
1691         (bfd_write): Call bfd_bwrite.
1692         (warn_deprecated): New function to annoy everybody.
1693         (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
1694         * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
1695         (bfd_read, bfd_write): Define as macro.
1696         * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
1697         likewise for bfd_write.  Ensure function args are correct size by
1698         using casts or local vars.  In some cases, remove unnecessary
1699         casts.  Formatting fixes, in some cases removing a large expression
1700         from function args by using a local var.  Replace CONST with const.
1701         Modify variable types to avoid warings.  Use casts to avoid
1702         warnings when using negative numbers in unsigned expressions.
1703         * aout-adobe.c: Likewise.
1704         * aout-arm.c: Likewise.
1705         * aout-cris.c: Likewise.
1706         * aout-encap.c: Likewise.
1707         * aout-ns32k.c: Likewise.
1708         * aout-target.h: Likewise.
1709         * aout-tic30.c: Likewise.
1710         * aoutf1.h: Likewise.
1711         * aoutx.h: Likewise.
1712         * archive.c: Likewise.
1713         * archures.c: Likewise.
1714         * bfd-in.h: Likewise.
1715         * bfd.c: Likewise.
1716         * binary.c: Likewise.
1717         * bout.c: Likewise.
1718         * cache.c: Likewise.
1719         * cisco-core.c: Likewise.
1720         * coff-a29k.c: Likewise.
1721         * coff-alpha.c: Likewise.
1722         * coff-arm.c: Likewise.
1723         * coff-h8300.c: Likewise.
1724         * coff-h8500.c: Likewise.
1725         * coff-i386.c: Likewise.
1726         * coff-i860.c: Likewise.
1727         * coff-i960.c: Likewise.
1728         * coff-ia64.c: Likewise.
1729         * coff-m68k.c: Likewise.
1730         * coff-m88k.c: Likewise.
1731         * coff-mcore.c: Likewise.
1732         * coff-mips.c: Likewise.
1733         * coff-ppc.c: Likewise.
1734         * coff-rs6000.c: Likewise.
1735         * coff-sh.c: Likewise.
1736         * coff-sparc.c: Likewise.
1737         * coff-stgo32.c: Likewise.
1738         * coff-tic30.c: Likewise.
1739         * coff-tic54x.c: Likewise.
1740         * coff-tic80.c: Likewise.
1741         * coff-w65.c: Likewise.
1742         * coff-z8k.c: Likewise.
1743         * coff64-rs6000.c: Likewise.
1744         * coffcode.h: Likewise.
1745         * coffgen.c: Likewise.
1746         * cofflink.c: Likewise.
1747         * coffswap.h: Likewise.
1748         * corefile.c: Likewise.
1749         * cpu-arc.c: Likewise.
1750         * cpu-h8300.c: Likewise.
1751         * cpu-h8500.c: Likewise.
1752         * cpu-i960.c: Likewise.
1753         * cpu-ia64-opc.c: Likewise.
1754         * cpu-ns32k.c: Likewise.
1755         * cpu-pdp11.c: Likewise.
1756         * cpu-pj.c: Likewise.
1757         * cpu-sh.c: Likewise.
1758         * cpu-w65.c: Likewise.
1759         * cpu-z8k.c: Likewise.
1760         * dwarf1.c: Likewise.
1761         * dwarf2.c: Likewise.
1762         * ecoff.c: Likewise.
1763         * ecofflink.c: Likewise.
1764         * ecoffswap.h: Likewise.
1765         * elf-bfd.h: Likewise.
1766         * elf-hppa.h: Likewise.
1767         * elf-m10200.c: Likewise.
1768         * elf-m10300.c: Likewise.
1769         * elf.c: Likewise.
1770         * elf32-arc.c: Likewise.
1771         * elf32-arm.h: Likewise.
1772         * elf32-avr.c: Likewise.
1773         * elf32-cris.c: Likewise.
1774         * elf32-fr30.c: Likewise.
1775         * elf32-gen.c: Likewise.
1776         * elf32-h8300.c: Likewise.
1777         * elf32-hppa.c: Likewise.
1778         * elf32-i370.c: Likewise.
1779         * elf32-i386.c: Likewise.
1780         * elf32-i860.c: Likewise.
1781         * elf32-m32r.c: Likewise.
1782         * elf32-m68k.c: Likewise.
1783         * elf32-mcore.c: Likewise.
1784         * elf32-mips.c: Likewise.
1785         * elf32-openrisc.c: Likewise.
1786         * elf32-pj.c: Likewise.
1787         * elf32-ppc.c: Likewise.
1788         * elf32-s390.c: Likewise.
1789         * elf32-sh-lin.c: Likewise.
1790         * elf32-sh.c: Likewise.
1791         * elf32-sparc.c: Likewise.
1792         * elf32-v850.c: Likewise.
1793         * elf64-alpha.c: Likewise.
1794         * elf64-hppa.c: Likewise.
1795         * elf64-mips.c: Likewise.
1796         * elf64-ppc.c: Likewise.
1797         * elf64-s390.c: Likewise.
1798         * elf64-sparc.c: Likewise.
1799         * elf64-x86-64.c: Likewise.
1800         * elfarm-nabi.c: Likewise.
1801         * elfcode.h: Likewise.
1802         * elfcore.h: Likewise.
1803         * elflink.c: Likewise.
1804         * elflink.h: Likewise.
1805         * elfxx-ia64.c: Likewise.
1806         * elfxx-target.h: Likewise.
1807         * format.c: Likewise.
1808         * hash.c: Likewise.
1809         * hp300hpux.c: Likewise.
1810         * hppabsd-core.c: Likewise.
1811         * hpux-core.c: Likewise.
1812         * i386aout.c: Likewise.
1813         * i386dynix.c: Likewise.
1814         * i386linux.c: Likewise.
1815         * i386lynx.c: Likewise.
1816         * i386mach3.c: Likewise.
1817         * i386msdos.c: Likewise.
1818         * i386os9k.c: Likewise.
1819         * ieee.c: Likewise.
1820         * ihex.c: Likewise.
1821         * irix-core.c: Likewise.
1822         * libaout.h: Likewise.
1823         * libbfd-in.h: Likewise.
1824         * libbfd.c: Likewise.
1825         * libcoff-in.h: Likewise.
1826         * libecoff.h: Likewise.
1827         * libieee.h: Likewise.
1828         * libnlm.h: Likewise.
1829         * libpei.h: Likewise.
1830         * libxcoff.h: Likewise.
1831         * linker.c: Likewise.
1832         * lynx-core.c: Likewise.
1833         * m68klinux.c: Likewise.
1834         * merge.c: Likewise.
1835         * mipsbsd.c: Likewise.
1836         * netbsd-core.c: Likewise.
1837         * nlm.c: Likewise.
1838         * nlm32-alpha.c: Likewise.
1839         * nlm32-i386.c: Likewise.
1840         * nlm32-ppc.c: Likewise.
1841         * nlm32-sparc.c: Likewise.
1842         * nlmcode.h: Likewise.
1843         * nlmswap.h: Likewise.
1844         * ns32k.h: Likewise.
1845         * oasys.c: Likewise.
1846         * opncls.c: Likewise.
1847         * osf-core.c: Likewise.
1848         * pc532-mach.c: Likewise.
1849         * pdp11.c: Likewise.
1850         * pe-mips.c: Likewise.
1851         * peXXigen.c: Likewise.
1852         * peicode.h: Likewise.
1853         * ppcboot.c: Likewise.
1854         * ptrace-core.c: Likewise.
1855         * reloc.c: Likewise.
1856         * reloc16.c: Likewise.
1857         * riscix.c: Likewise.
1858         * rs6000-core.c: Likewise.
1859         * sco5-core.c: Likewise.
1860         * section.c: Likewise.
1861         * som.c: Likewise.
1862         * sparclinux.c: Likewise.
1863         * sparclynx.c: Likewise.
1864         * srec.c: Likewise.
1865         * stabs.c: Likewise.
1866         * sunos.c: Likewise.
1867         * syms.c: Likewise.
1868         * targets.c: Likewise.
1869         * tekhex.c: Likewise.
1870         * trad-core.c: Likewise.
1871         * versados.c: Likewise.
1872         * vms-gsd.c: Likewise.
1873         * vms-hdr.c: Likewise.
1874         * vms-misc.c: Likewise.
1875         * vms-tir.c: Likewise.
1876         * vms.c: Likewise.
1877         * vms.h: Likewise.
1878         * xcofflink.c: Likewise.
1879         * bfd-in2.h: Regenerate.
1880         * libbfd.h: Regenerate.
1881         * libcoff.h: Regenerate.
1883         * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1884         * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1885         (ufile_ptr): Define.
1886         (bfd_tell): Return a ufile_ptr.
1887         * libbfd.c (bfd_tell): Likewise.
1888         (bfd_seek): Use bfd_size_type locals.  Don't call bfd_set_error
1889         unnecessarily.
1890         * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1891         * aoutf1.h: Likewise.
1892         * som.c: Likewise.
1893         * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1894         larger than unsigned long can represent.
1896         * libbfd.c (bfd_malloc): Take a bfd_size_type arg.  Error if
1897         size overflows size_t.
1898         (bfd_realloc): Likewise.
1899         (bfd_zmalloc): Likewise.
1900         * opncls.c (bfd_alloc): Likewise.
1901         (bfd_zalloc): Likewise.
1902         * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1903         (bfd_alloc, bfd_zalloc): Update.
1905         * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1906         8 bits.
1907         (bfd_get_signed_8): Likewise.
1908         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1909         H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1910         H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1911         H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1912         * libaout.h: Likewise define and use here.
1913         * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1914         * aout-arm.c: Likewise.
1915         * aout-encap.c: Likewise.
1916         * aout-ns32k.c: Likewise.
1917         * aout-tic30.c: Likewise.
1918         * aoutf1.h: Likewise.
1919         * aoutx.h: Likewise.
1920         * bout.c: Likewise.
1921         * coff-alpha.c: Likewise.
1922         * coff-h8300.c: Likewise.
1923         * coff-h8500.c: Likewise.
1924         * coff-i960.c: Likewise.
1925         * coff-ia64.c: Likewise.
1926         * coff-m88k.c: Likewise.
1927         * coff-mips.c: Likewise.
1928         * coff-ppc.c: Likewise.
1929         * coff-rs6000.c: Likewise.
1930         * coff-sh.c: Likewise.
1931         * coff-sparc.c: Likewise.
1932         * coff-stgo32.c: Likewise.
1933         * coff-tic30.c: Likewise.
1934         * coff-tic80.c: Likewise.
1935         * coff-w65.c: Likewise.
1936         * coff-z8k.c: Likewise.
1937         * coff64-rs6000.c: Likewise.
1938         * coffgen.c: Likewise.
1939         * cofflink.c: Likewise.
1940         * coffswap.h: Likewise.
1941         * ecoff.c: Likewise.
1942         * ecoffswap.h: Likewise.
1943         * elf.c: Likewise.
1944         * elf32-mips.c: Likewise.
1945         * elf64-mips.c: Likewise.
1946         * hp300hpux.c: Likewise.
1947         * i386dynix.c: Likewise.
1948         * i386lynx.c: Likewise.
1949         * i386msdos.c: Likewise.
1950         * i386os9k.c: Likewise.
1951         * libpei.h: Likewise.
1952         * nlm32-alpha.c: Likewise.
1953         * nlm32-i386.c: Likewise.
1954         * nlm32-ppc.c: Likewise.
1955         * nlmcode.h: Likewise.
1956         * nlmswap.h: Likewise.
1957         * oasys.c: Likewise.
1958         * pdp11.c: Likewise.
1959         * pe-mips.c: Likewise.
1960         * peXXigen.c: Likewise.
1961         * peicode.h: Likewise.
1962         * riscix.c: Likewise.
1963         * sunos.c: Likewise.
1964         * xcofflink.c: Likewise.
1965         * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1966         Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1967         * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1968         equivalent H_PUT_* macro instead.
1969         (GETWORD, GETHALF, GETBYTE): Similarly.
1970         * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1971         (GETWORD, GETHALF, GETBYTE): Likewise.
1972         * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1974         * bfd-in.h (struct orl): Change "pos" to a union.
1975         * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1976         (bsd_write_armap): Here too.
1977         (coff_write_armap): And here.
1978         * coff-rs6000.c (xcoff_write_armap_old): And here.
1979         (xcoff_write_one_armap_big): And here.
1980         (xcoff_write_armap_big): And here.
1981         * ecoff.c (_bfd_ecoff_write_armap): And here.
1982         * elf64-mips.c (mips_elf64_write_armap): And here.
1984         * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1985         * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1986         * elf32-h8300.c (elf32_h8_mach): Likewise.
1987         * elf32-mips.c (elf_mips_mach): Likewise.
1988         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1990         * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1991         calls.
1992         (aix386_core_vec): Typo fix.
1994         * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1995         etc. to avoid redefined macro warning.
1996         (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1997         (MY(fix_pcrel_26)): Likewise.
1998         * aout-ns32k.c (MY(put_reloc)): Likewise.
1999         * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
2000         * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
2001         * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
2003         * aout-encap.c: Include "file", not <file> for binutils headers.
2004         (encap_object_p): Half baked attempt to fix compile errors in
2005         code dealing with "magic".
2007         * aout-ns32k.c: Include "file", not <file> for binutils headers.
2008         (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
2009         bfd_vma's rather than longs.
2010         * cpu-ns32k.c (ns32k_sign_extend): Delete.
2011         (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
2012         (_bfd_ns32k_get_immediate): Likewise.  Add code for 8 byte values,
2013         remove case 3.
2014         (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
2015         Use unsigned comparisons.
2016         (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
2017         (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
2018         (_bfd_do_ns32k_reloc_contents): Likewise.
2019         * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
2020         (_bfd_ns32k_get_immediate): Likewise.
2021         (_bfd_ns32k_put_displacement): Likewise.
2022         (_bfd_ns32k_put_immediate): Likewise.
2023         (bfd_reloc_status_type): Likewise.
2025         * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
2026         to avoid shadowing.
2027         * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
2028         * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
2029         * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
2030         avoid shadowing.
2031         (record_toc): Use a bfd_signed_vma for our_toc_offset.
2032         * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
2033         * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
2034         shadow warning.
2035         (_bfd_elfcore_strndup): Likewise for "dup".
2036         * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
2037         "name" to avoid shadowing.
2038         * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
2039         definition of "off".
2040         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2041         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
2042         definition of "s".
2043         (_bfd_mips_elf_final_link): Rename "i" to "j".  Remove duplicate
2044         "secpp".
2045         * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
2046         to avoid shadowing.
2047         * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
2048         to avoid shadowing.
2049         (elf_link_input_bfd): Likewise.
2050         (elf_bfd_final_link): Remove duplicate innermost "off" var.
2051         * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
2052         * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
2053         "input_section".
2054         * som.c (som_prep_for_fixups): Rename inner "i" to "j".
2055         * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
2056         (sunos_write_dynamic_symbol): Remove unused vars.
2057         * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
2058         innermost "directory_name" and "file_name" vars.
2059         * tekhex.c (first_phase): Rename local var "type" to "stype".
2060         (tekhex_write_object_contents): Rename innermost "s" to "sym".
2061         * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
2062         doing comparison at caller.
2063         (vms_esecflag_by_name): Likewise.
2064         * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
2065         * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
2066         (xcoff_write_global_symbol): Rename "p" param to "inf".
2068         * cisco-core.c: Add missing prototypes.
2069         (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
2070         (cisco_core_file_failing_signal): Likewise.
2071         (cisco_core_file_matches_executable_p): Likewise.
2072         * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
2073         * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
2074         * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
2075         * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
2077         * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
2078         thumb_glue_size and arm_glue_size.
2079         * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
2081         * coff64-rs6000.c: Group prototypes together.
2083         * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
2084         (buy_and_read): Remove "seek" param.  Change "size" to bfd_size_type.
2086         * cpu-arc.c: Add missing prototypes.
2087         * cpu-h8500.c: Likewise.
2088         * cpu-i960.c: Likewise.
2089         * cpu-pj.c: Likewise.
2090         * cpu-sh.c: Likewise.
2091         * cpu-w65.c: Likewise.
2092         * cpu-z8k.c: Likewise.
2093         * elf32-fr30.c: Likewise.
2094         * elf32-h8300.c: Likewise.
2095         * elf32-i370.c: Likewise.
2096         * hpux-core.c: Likewise.
2097         * versados.c: Likewise.
2099         * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
2100         * cpu-h8500.c: Likewise.
2101         * cpu-i960.c: Likewise.
2102         * cpu-z8k.c: Likewise.
2104         * cpu-ia64-opc.c: Correct comment.
2106         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
2108         * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
2109         to unsigned.
2110         (bfd_elf32_write_out_phdrs): Likewise.
2111         (bfd_elf64_write_out_phdrs): Likewise.
2112         (elf_linker_section_pointers): Change addend to bfd_vma.
2113         (_bfd_elf_find_pointer_linker_section): Likewise.
2114         (_bfd_elfcore_make_pseudosection): Change size param to size_t and
2115         filepos to unsigned file_ptr.
2116         (_bfd_elfcore_strndup): Change max param to size_t.
2117         * elf.c (_bfd_elfcore_make_pseudosection): As above.
2118         (_bfd_elfcore_strndup): Likewise.
2119         (_bfd_elf_find_pointer_linker_section): Likewise.
2121         * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
2122         insn and sym_value to ints.
2124         * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
2125         bfd_size_type.
2126         (elfcore_read_notes): Likewise.
2128         * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
2129         param from unsigned char to int.
2130         (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
2131         for info_to_howto call.
2132         (add_dynamic_entry): Define macro.
2133         (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
2135         * elf32-cris.c (add_dynamic_entry): Define macro.
2136         (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
2138         * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
2139         (elf32_h8_object_p): Likewise.
2140         (elf32_h8_merge_private_bfd_data): Likewise.
2141         (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
2143         * elf32-hppa.c (add_dynamic_entry): Define macro.
2144         (elf32_hppa_size_dynamic_sections): Use it.
2145         * elf32-i370.c (add_dynamic_entry): Define macro.
2146         (i370_elf_size_dynamic_sections): Use it.
2147         (i370_noop): Make static.
2148         * elf32-i386.c (add_dynamic_entry): Define macro.
2149         (elf_i386_size_dynamic_sections): Use it.
2150         * elf32-m68k.c (add_dynamic_entry): Define macro.
2151         (elf_m68k_size_dynamic_sections): Use it.
2152         * elf32-ppc.c (add_dynamic_entry): Define macro.
2153         (ppc_elf_size_dynamic_sections): Use it.
2154         * elf32-s390.c (add_dynamic_entry): Define macro.
2155         (elf_s390_size_dynamic_sections): Use it.
2156         * elf64-alpha.c (add_dynamic_entry): Define macro.
2157         (elf64_alpha_size_dynamic_sections): Use it.
2158         * elf64-hppa.c (add_dynamic_entry): Define macro.
2159         (elf64_hppa_size_dynamic_sections): Use it.
2160         * elf64-ppc.c (add_dynamic_entry): Define macro.
2161         (ppc64_elf_size_dynamic_sections): Use it.
2162         * elf64-s390.c (add_dynamic_entry): Define macro.
2163         (elf_s390_size_dynamic_sections): Use it.
2164         * elf64-sparc.c (add_dynamic_entry): Define macro.
2165         (sparc64_elf_size_dynamic_sections): Use it.
2166         * elf64-x86-64.c (add_dynamic_entry): Define macro.
2167         (elf64_x86_64_size_dynamic_sections): Use it.
2168         * elfxx-ia64.c (add_dynamic_entry): Define macro.
2169         (elfNN_ia64_size_dynamic_sections): Use it.
2171         * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
2172         (v850_elf_perform_relocation): Make "r_type" param unsigned.
2174         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
2175         false if the first malloc fails rather than going via error_return.
2177         * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
2178         "index" param.
2179         (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
2181         * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
2183         * elfxx-ia64.c (global_sym_index): Return a long.
2185         * ieee.c (get_symbol): Use int rather than char param.
2186         (ieee_slurp_sections): Move "section" var to inner blocks.
2187         (copy_expression): Don't init "value" to zero or worry about
2188         clearing to zero after using.
2189         (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
2190         shadowing.
2192         * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
2193         unsigned int.
2195         * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
2196         (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
2198         * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
2200         * pc532-mach.c (MYNSX): Delete.
2201         (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
2202         (write_object_contents): Correct prototype.
2204         * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
2205         than unsigned short.
2207         * section.c (bfd_set_section_contents): Remove redundant
2208         "offset < 0" test.  Check that "count" doesn't overflow size_t.
2209         (bfd_get_section_contents): Likewise.
2211         * som.c (som_fixup_formats): Add missing braces.
2212         (som_reloc_addend): Pass a bfd_vma for "addend".
2214         * srec.c (srec_write_record): Pass "type" as an unsigned int.
2215         (srec_write_symbols): Remove an unnecessary var.
2217         * targets.c (_bfd_target_vector): Sort entries.  Sort externs
2218         to match.
2219         * configure.in: Sort to match.  Bump version number.
2220         * configure: Regenerate.
2222         * tekhex.c (move_section_contents): Assert offset == 0.
2224         * versados.c (new_symbol_string): Constify arg.
2225         (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
2226         (versados_get_symbol_info): Make static.
2227         (versados_print_symbol): Likewise.
2228         (versados_get_reloc_upper_bound): Likewise.
2229         (versados_canonicalize_reloc): Likewise.
2231 2001-09-18  Nick Clifton  <nickc@cambridge.redhat.com>
2233         * elflink.h (elf_link_input_bfd): Fix typo in error message.
2235 2001-09-17  H.J. Lu  <hjl@gnu.org>
2237         * dwarf1.c (parse_die): Take a new arg for the end of the
2238         section. Return false if die is beyond the section.
2239         (parse_functions_in_unit): Pass the end of the section to
2240         parse_die ().
2241         (_bfd_dwarf1_find_nearest_line): Likewise.
2243 2001-09-14  Michael Rauch <mrauch@netbsd.org>
2245         * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
2246         just like R_SPARC_32.
2248 2001-09-14  Kevin Lo <kevlo@openbsd.org>
2250         * configure.bfd: Add arm-openbsd target.
2252 2001-09-14  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2254         * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
2255         Add support for mips64.
2257 2001-09-13  Alexandre Oliva  <aoliva@redhat.com>
2259         * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
2261 2001-09-12  Alexandre Oliva  <aoliva@redhat.com>
2263         * elf.c (prep_headers): Get the machine code from the elf
2264         backend data.
2265         * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
2266         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
2267         * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2268         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2269         * elf-arc.c (arc_elf_final_write_processing): Don't override
2270         e_machine, it's now properly set in prep_headers.
2271         * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
2272         EM_AVR_OLD.
2273         (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
2274         * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
2275         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
2276         * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
2277         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
2278         * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
2279         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
2280         * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
2281         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
2282         * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
2283         * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
2284         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
2286 2001-09-11  Richard Henderson  <rth@redhat.com>
2288         * elf64-alpha.c (elf64_alpha_section_flags): New.
2289         (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
2291 2001-09-11  Richard Henderson  <rth@redhat.com>
2293         * elf64-alpha.c (elf64_alpha_relocate_section): Do not
2294         apply HINT relocations against dynamic symbols.
2296 2001-09-11  H.J. Lu  <hjl@gnu.org>
2298         * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
2300 2001-09-09  Richard Henderson  <rth@redhat.com>
2302         * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
2304         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
2305         following a call to a near function.
2307 2001-09-08  Richard Henderson  <rth@redhat.com>
2309         * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
2310         relocation errors.  Fail gp-relative relocations against
2311         dynamic symbols.
2313 2001-09-08  Alan Modra  <amodra@bigpond.net.au>
2315         * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
2316         as well as DEF_DYNAMIC in test for avoided copy relocs.
2317         (allocate_plt_and_got_and_discard_relocs): Likewise.
2318         * elf32-hppa.c (elf_i386_relocate_section): Likewise.
2319         (allocate_plt_and_got_and_discard_relocs): Likewise.
2321 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2323         * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
2324         of R_MIPS_PC16.
2326 2001-09-06  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2328         * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
2329         definitions.
2330         (mips_elf64_howto_table_rel): Likewise.
2332 2001-09-05  Tom Rix <trix@redhat.com>
2334         * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
2335         and syscall symbols.
2336         (write_global_symbol) : Same.
2337         (bfd_xcoff_export_symbol): Remove unused syscall param.
2338         * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
2339         bfd_xcoff_import_symbol.
2340         * bfd-in.h: Same.
2341         * bfd-in2.h : Regenerate.
2343 2001-09-04  Richard Henderson  <rth@redhat.com>
2345         * elf64-alpha.c (SKIP_HOWTO): New.
2346         (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
2347         Fix sizes of 16-bit mem format relocs.
2348         (elf64_alpha_reloc_map): Update to match.
2349         (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
2350         (elf64_alpha_relax_without_lituse): Likewise.
2351         (elf64_alpha_check_relocs): Handle GPREL16.
2352         (elf64_alpha_relocate_section): Likewise.
2353         * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
2354         (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
2355         * bfd-in2.h, libbfd.h: Rebuild.
2357 2001-09-04  Jeff Law <law@redhat.com>
2359         * elf32-h8300.c (elf32_h8_relax_section): New function.
2360         (elf32_h8_relax_delete_bytes): Likewise.
2361         (elf32_h8_symbol_address_p): Likewise.
2362         (elf32_h8_get_relocated_section_contents): Likewise.
2363         (bfd_elf32_bfd_relax_section): Define.
2364         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
2366         * elf32-h8300.c (special): New function.
2367         (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
2368         all relocations.
2369         (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
2370         relocations.  Fix problems with the true 24bit reloc R_H8_DIR24R8.
2371         Fix minor problems with 8bit and 16bit PC relative relocations.
2373 2001-09-01  Andreas Jaeger  <aj@suse.de>
2375         * vms-tir.c: Add missing prototypes.
2376         * vms-hdr.c: Likewise.
2377         * vms-gsd.c: Likewise.
2378         * vms-misc.c: Likewise.
2380 2001-08-31  H.J. Lu  <hjl@gnu.org>
2382         * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
2383         with bad relocation.
2385 2001-08-31  Eric Christopher  <echristo@redhat.com>
2386             Jason Eckhardt  <jle@redhat.com>
2388         * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
2389         mips32_4k and mips64.
2390         * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
2391         bfd_mach_mips64.  Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
2392         * bfd/cpu-mips.c: Ditto.
2393         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
2394         * bfd/bfd-in2.h: Regenerate.
2396 2001-08-31  Jakub Jelinek  <jakub@redhat.com>
2398         * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
2399         value into R_ALPHA_RELATIVE's addend.
2400         (elf64_alpha_finish_dynamic_symbol): Likewise.
2402 2001-08-31  Nick Clifton  <nickc@cambridge.redhat.com>
2404         * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
2405         recomputed addend during relocatable link if not USE_REL.
2407         * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
2408         error.
2410 2001-08-30  H.J. Lu  <hjl@gnu.org>
2412         * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
2413         2 changes.
2414         (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
2415         relocations for weak definitions.
2417 2001-08-30  H.J. Lu  <hjl@gnu.org>
2419         * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
2420         (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
2421         * Makefile.in: Rebuild.
2423 2001-08-30  H.J. Lu  <hjl@gnu.org>
2425         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
2426         dynamic relocation for undefined weak symbols when creating
2427         executables. Check h->root.root.type, instead of h->root.type.
2429 2001-08-29  Joel Sherrill <joel@OARcorp.com>
2431         * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
2432         default from coff to elf.
2434 2001-08-29  Jeff Law <law@redhat.com>
2436         * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
2437         relocations.
2438         (h8_reloc_map): Similarly.
2439         (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
2440         Add support for PC relative relocations.
2442         * elf32-h8300.c: Put all prototypes together.
2443         (elf32_h8_info_to_howto): Parameter elf_reloc is used.
2444         (elf32_h8_final_link_relocate): New function for linker.
2445         (elf32_h8_relocate_section): Similarly.
2446         (elf_backend_relocate_section): Define.
2448         * cpu-h8300.c (h8300_scan, compatible): Prototype.
2449         (h8300_scan): Handle architecture:machine encodings typically
2450         found in linker scripts.
2451         * elf.c (prep_headers): Do not try to do H8 machine recognition
2452         here.
2453         * elf32-h8300.c:  Add some missing prototypes.
2454         (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
2455         (elf32_h8_object_p): Similarly.
2457 2001-08-29  Tom Rix <trix@redhat.com>
2459         * xcofflink.c (xcoff_link_add_symbols):  Fix XTY_LD symbol that
2460         does not follow a XTY_SD.
2462 2001-08-29  Alan Modra  <amodra@bigpond.net.au>
2464         * targmatch.sed: Delete case statements.
2465         * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
2466         aix4.3 and above.
2468 2001-08-29  J"orn Rennecke <amylaar@redhat.com>
2470         * Makefile.am (elf32-h8300.lo): New target.
2471         * config.bfd (h8300*-*-elf): New case.
2472         * configure.in (bfd_elf32_h8300_vec): New case.
2473         * elf.c (prep_headers): Add case for bfd_arch_h8300.
2474         * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
2475         (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
2476         (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
2477         * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
2478         * elf32-h8300.c: New file.
2479         * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
2481 2001-08-28  Nick Clifton  <nickc@cambridge.redhat.com>
2483         * sparclynx.c: Add missing prototypes.
2484         * coff-mcore.c: Add missing prototypes.
2485         * elf32-pj.c: Add missing prototypes.
2486         * nlm32-sparc.c: Add missing prototypes.
2487         * oasys.c: Add missing prototypes.
2488         * pdp11.c: Add missing prototypes.
2489         * pe-mips.c: Add missing prototypes.
2490         * riscix.c: Add missing prototypes.
2492 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2494         * elf32-i386.c: Add missing prototypes.
2495         * elf32-ppc.c: Likewise.
2496         * elf32-sh-lin.c: Likewise.
2497         * elfarm-nabi.c: Likewise.
2499 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
2501         * elf32-i386.c (elf_i386_grok_prstatus): New function.
2502         (elf_i386_grok_psinfo): New function.
2503         (elf_backend_grok_prstatus): Define.
2504         (elf_backend_grok_psinfo): Likewise.
2505         * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
2506         (ppc_elf_grok_psinfo): New function.
2507         (elf_backend_grok_prstatus): Define.
2508         (elf_backend_grok_psinfo): Likewise.
2509         * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
2510         (elf32_shlin_grok_psinfo): New function.
2511         (elf_backend_grok_prstatus): Define.
2512         (elf_backend_grok_psinfo): Likewise.
2513         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
2514         (elf32_arm_nabi_grok_psinfo): New function.
2515         (elf_backend_grok_prstatus): Define.
2516         (elf_backend_grok_psinfo): Likewise.
2518 2001-08-27  H.J. Lu  <hjl@gnu.org>
2520         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
2521         sanity check.
2522         (mips_elf_calculate_relocation): Create dynamic relocation for
2523         symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
2524         bit is not set.
2526 2001-08-27  H.J. Lu  <hjl@gnu.org>
2528         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
2529         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2530         (_bfd_elf32_mips_grok_prstatus): Likewise.
2531         (_bfd_elf32_mips_grok_psinfo): Likewise.
2532         (_bfd_mips_elf_hide_symbol): Make it static and cast to
2533         `struct mips_elf_link_hash_entry *'.
2534         (_bfd_mips_elf_copy_indirect_symbol): Make it static.
2536 2001-08-27  Nick Clifton  <nickc@cambridge.redhat.com>
2538         * mipsbsd.c: Add missing prototypes.
2539         * hp300hpux.c: Add missing prototypes.
2540         * i386aout.c: Add missing prototypes.
2541         * i386lynx.c: Add missing prototypes.
2542         * i386mach3.c: Add missing prototypes.
2543         * i386msdos.c: Add missing prototypes.
2544         * i386os9k.c: Add missing prototypes.
2546 2001-08-27  Linus Nordberg  <linus@swox.se>
2547             Torbjorn Granlund  <tege@swox.com>
2548             Staffan Ulfberg  <staffanu@swox.se>
2549             Alan Modra  <amodra@bigpond.net.au>
2551         * config.bfd: Add powerpc64 target.  Add powerpc64 vectors to
2552         targ64_selvecs for 32 bit powerpc targets.
2553         * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
2554         (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
2555         Run "make dep-am".
2556         * Makefile.in: Regenerate.
2557         * configure.in: Add elf64_powerpc vecs.
2558         * configure: Regenerate.
2559         * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
2560         * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
2561         * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
2562         * elf64-ppc.c: New file.
2563         * reloc.c: Add powerpc64 relocs.
2564         * libbfd.h: Regenerate.
2565         * bfd-in2.h: Regenerate.
2567 2001-08-27  Andreas Schwab  <schwab@suse.de>
2569         * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
2570         reloc is against read-only section.
2571         (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
2572         looking up section names for DT_TEXTREL.
2573         (elf32_m68k_reloc_type_class): New function.
2574         (elf_backend_reloc_type_class): Define.
2576 2001-08-27  Andreas Jaeger  <aj@suse.de>
2578         * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2579         reloc is against read-only section.
2580         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2581         looking up section names for DT_TEXTREL.
2582         (elf_s390_reloc_type_class): New.
2583         (elf_backend_reloc_type_class): Define.
2585         * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
2586         reloc is against read-only section.
2587         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
2588         looking up section names for DT_TEXTREL.
2589         (elf_s390_reloc_type_class): New.
2590         (elf_backend_reloc_type_class): Define.
2592         * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
2593         is against read-only section.
2594         (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2595         looking up section names for DT_TEXTREL.
2596         (ppc_elf_reloc_type_class): New.
2597         (elf_backend_reloc_type_class): Define.
2599 2001-08-26  Andreas Jaeger  <aj@suse.de>
2601         * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
2602         reloc is against read-only section.
2603         (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
2604         looking up section names for DT_TEXTREL.
2605         (elf_cris_reloc_type_class): New.
2606         (elf_backend_reloc_type_class): Define.
2608         * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
2609         against read-only section.
2610         (elf_backend_reloc_type_class): Define.
2611         (sh_elf_reloc_type_class): New.
2612         (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2613         looking up section names for DT_TEXTREL.
2615         * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
2616         reloc is against read-only section.
2617         (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
2618         looking up section names for DT_TEXTREL.
2619         (elf32_arm_reloc_type_class): New.
2620         (elf_backend_reloc_type_class): Define.
2622 2001-08-25  Andreas Jaeger  <aj@suse.de>
2624         * oasys.c: Add missing prototypes.
2626         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
2627         attribute for parameter.
2628         * elf.c (_bfd_elf_reloc_type_class): Likewise.
2630         * versados.c (get_4): Make static.
2631         (get_10): Make static.
2632         Add missing prototypes.
2633         (process_esd): Fix call to versados_new_symbol.
2635 2001-08-25  Nick Clifton  <nickc@cambridge.redhat.com>
2637         * coff-a29k.c: Add missing prototypes.
2638         * coff-apollo.c: Add missing prototypes.
2639         * coff-arm.c: Add missing prototypes.
2640         * coff-i860.c: Add missing prototypes.
2641         * coff-rs6000.c: Add missing prototypes.
2642         * coff-tic80.c: Add missing prototypes.
2643         * elf-m10200.c: Add missing prototypes.
2644         * elf-m10300.c: Add missing prototypes.
2645         * elf32-arm.h: Add missing prototypes.
2646         * elf32-d10v.c: Add missing prototypes.
2647         * elf32-m32r.c: Add missing prototypes.
2648         * elf32-mcore.c: Add missing prototypes.
2649         * elf32-openrisc.c: Add missing prototypes.
2650         * elf32-sh.c: Add missing prototypes.
2651         * elf32-sparc.c: Add missing prototypes.
2652         * elf32-v850.c: Add missing prototypes.
2653         * elfarm-nabi.c: Add missing prototypes.
2654         * elfarm-oabi.c: Add missing prototypes.
2656 2001-08-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2658         * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
2659         E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
2661 2001-08-24  H.J. Lu  <hjl@gnu.org>
2663         * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
2664         hash structure.
2666 2001-08-24  Nick Clifton  <nickc@cambridge.redhat.com>
2668         * elf-bfd.h (elf_hash_table): Revert definition.
2669         (is_elf_hash_table): New macro.
2670         * elflink.h (elf_link_add_object_symbols): Test
2671         is_elf_hash_table before accessing ELF only fields in hash
2672         structure.
2673         (elf_link_create_dynamic_sections): Fail if not using an ELF
2674         hash structure.
2675         (elf_add_dynamic_entry): Fail if not using an ELF hash
2676         structure.
2677         (elf_link_record_local_dynamic_symbol): Fail if not using an
2678         ELF hash structure.
2679         (size_dynamic_sections): Fail if not using an ELF hash
2680         structure.
2681         (elf_adjust_dynamic_symbol): Fail if not using an ELF
2682         hash structure.
2683         (elf_bfd_final_link): Fail if not using an ELF hash
2684         structure.
2686 2001-08-24  H.J. Lu  <hjl@gnu.org>
2688         * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
2689         table is not an ELF linker hash table.
2691         * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
2692         table type to bfd_link_elf_hash_table.
2694         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
2695         the last change.
2697         * linker.c (_bfd_link_hash_table_init): Set the linker hash
2698         table type to bfd_link_generic_hash_table.
2700 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
2702         * bfd.c (bfd_alt_mach_code): New function.
2703         * bfd-in2.h: Rebuilt.
2705 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
2707         * elf-m10300.c (mn10300_elf_relocate_section): Test the right
2708         `type' field in the hash entry when deciding whether to follow a
2709         link.
2711 2001-08-24  Jakub Jelinek  <jakub@redhat.com>
2713         * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
2714         last.
2715         (elf_link_sort_relocs): Adjust accordingly.
2717         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2718         (elf64_alpha_check_relocs): Set it if section this reloc is against
2719         is read-only.  Set DF_TEXTREL if a RELATIVE reloc is needed against
2720         read-only section.
2721         (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2722         is is against read-only section.
2723         (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2724         check section names.
2725         (elf64_alpha_reloc_type_class): New.
2726         (elf_backend_reloc_type_class): Define.
2728 2001-08-24  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2730         * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2731         by bfd_malloc().
2733 2001-08-23  Andreas Jaeger  <aj@suse.de>
2735         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2736         the reloc is against read-only section.
2737         (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2738         of looking up section names for DT_TEXTREL.
2739         (elf64_x86_64_reloc_type_class): New.
2740         (elf_backend_reloc_type_class): Define.
2742 2001-08-23  H.J. Lu  <hjl@gnu.org>
2744         * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2745         * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2747         * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2748         bfd_print_symbol_vandf.
2749         * coffgen.c (coff_print_symbol): Likewise.
2750         * elf.c (bfd_elf_print_symbol): Likewise.
2751         * ieee.c (ieee_print_symbol): Likewise.
2752         * nlmcode.h (nlm_print_symbol): Likewise.
2753         * oasys.c (oasys_print_symbol): Likewise.
2754         * pdp11.c (NAME(aout,print_symbol)): Likewise.
2755         * som.c (som_print_symbol): Likewise.
2756         * srec.c (srec_print_symbol): Likewise.
2757         * tekhex.c (tekhex_print_symbol): Likewise.
2758         * versados.c (versados_print_symbol): Likewise.
2759         * vms.c (vms_print_symbol): Likewise.
2761         * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2762         with bfd_fprintf_vma.
2763         (bfd_elf_print_symbol): Likewise.
2764         * syms.c (bfd_print_symbol_vandf): Likewise.
2766 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
2768         * aoutf1.h (sunos_write_object_contents): Silence compile time
2769         warning.
2770         * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2772         * bout.c: Add missing function prototypes.  Fix formatting.
2773         * coff-z8k.c: Add missing function prototypes.  Fix formatting.
2774         * coff-w65.c: Add missing function prototypes.  Fix formatting.
2775         * coff-h8500.c: Add missing function prototypes.  Fix formatting.
2776         * coff-h8300.c: Add missing function prototypes.  Fix formatting.
2777         * coff-tic54x.c: Add missing function prototypes.  Fix formatting.
2778         * coff-tic30.c: Add missing function prototypes.  Fix formatting.
2779         * coff-m68k.c: Add missing function prototypes.  Fix formatting.
2780         * coff-rs6000.c: Add missing function prototypes.  Fix formatting.
2781         * coff-sh.c: Add missing function prototypes.  Fix formatting.
2783 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
2785         * elf-bfd.h (enum elf_reloc_type_class): New.
2786         (struct elf_backend_data): Add elf_backend_reloc_type_class.
2787         (_bfd_elf_reloc_type_class): New.
2788         * elfxx-target.h (elf_backend_reloc_type_class): Define.
2789         (elfNN_bed): Add elf_backend_reloc_type_class.
2790         * elf.c (_bfd_elf_reloc_type_class): New.
2791         * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2792         is against read-only section.
2793         (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2794         looking up section names for DT_TEXTREL.
2795         (elf_i386_reloc_type_class): New.
2796         (elf_backend_reloc_type_class): Define.
2797         * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2798         reloc is against read-only section.
2799         (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2800         looking up section names for DT_TEXTREL.
2801         (elf32_sparc_reloc_type_class): New.
2802         (elf_backend_reloc_type_class): Define.
2803         * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2804         reloc is against read-only section.
2805         (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2806         looking up section names for DT_TEXTREL.
2807         (sparc64_elf_reloc_type_class): New.
2808         (elf_backend_reloc_type_class): Define.
2809         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2810         (elfNN_ia64_hash_table_create): Clear ia64_info.
2811         (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2812         section.
2813         (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2814         instead of looking up section names for DT_TEXTREL.
2815         (elfNN_ia64_reloc_type_class): New.
2816         (elf_backend_reloc_type_class): Define.
2817         * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2818         (struct elf_link_sort_rela): New.
2819         (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2820         (elf_bfd_final_link): Call elf_link_sort_relocs.
2821         Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2822         necessary.
2824 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
2826         * configure.in (x86-bsdi): No corefile support.
2827         * configure: Regenerate.
2829 2001-08-22  Nick Clifton  <nickc@cambridge.redhat.com>
2831         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2832         comma.
2834 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
2836         * coff-go32.c: Make DWARF2 sections use an alignment of 0.  Set
2837         the alignment of dwarf2 linkonce sections to 0.
2838         * coff-sto32.c: Likewise.
2840 2001-08-20  Andreas Jaeger  <aj@suse.de>
2842         * coff-sparc.c: Add missing prototypes.
2843         * elf32-s390.c: Likewise.
2844         * elf32-i960.c: Likewise.
2845         * aout-target.h: Likewise.
2847 2001-08-20  H.J. Lu  <hjl@gnu.org>
2849         * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2850         (elf_num_section_syms): New for num_section_syms.
2852         * elf.c (elf_map_symbols): Set num_section_syms.
2853         (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2854         the section symbol index.
2856 2001-08-20  Nick Clifton  <nickc@cambridge.redhat.com>
2858         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2859         select the generic has table creator.  All elf backends need elf
2860         specific fields in the hash table.
2862 2001-08-20  Alan Modra  <amodra@bigpond.net.au>
2864         * archive.c (offsetof): Remove define.
2865         * elf.c: Likewise.
2866         * oasys.c: Likewise
2867         * sysdep.h (offsetof): Define.
2869 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2871         * bfd.c (bfd_get_gp_size): Return an unsigned int.
2872         (bfd_set_gp_size): Make param unsigned.
2873         * bfd-in2.h: Regenerate.
2874         * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2875         than calling bfd_get_gp_size.
2876         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2877         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2879 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2881         * linker.c (default_fill_link_order): Handle four byte fill value.
2883 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2885         * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2886         prototype.
2887         * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2889         * elf64-mips.c (UNUSED_RELOC): Define.
2890         (mips_elf64_howto_table_rel): Use it.
2891         (mips_elf64_howto_table_rela): Here too.
2892         (mips_elf64_write_relocs): Fix signed/unsigned warning.
2894         * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2895         silence warning.
2896         * coffgen.c (coff_print_symbol): Fix warnings.
2897         (coff_find_nearest_line): Likewise.
2898         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2899         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2900         * format.c (bfd_check_format_matches): Likewise.
2901         (bfd_set_format): Likewise.
2902         * coff-ia64.c: Add missing prototypes.
2903         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2904         signed to silence warnings.
2905         (elf64_alpha_relocate_section): Likewise.
2906         (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2907         (elf64_alpha_add_symbol_hook): Likewise.
2908         (elf64_alpha_final_link): Likewise.
2909         (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2910         (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2911         (elf64_alpha_size_got_sections): Likewise.
2912         * elfxx-ia64.c: Add missing prototypes.
2913         (elfNN_ia64_relocate_section): Fix warning.
2914         (elfNN_ia64_unwind_entry_compare): Make params const.
2916 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2918         * config.bfd (targ64_selvecs): New.
2919         <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2921         * bfd-in.h (BFD_VERSION): Remove wrong comment.
2922         (BFD_DEFAULT_TARGET_SIZE): New.
2923         (BFD_ARCH_SIZE): Comment.
2924         * configure.in (target_size): New.  Set instead of target64 in
2925         selvecs case statement.  Set target64 from it.
2926         (bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
2927         * bfd-in2.h: Regenerate.
2928         * configure: Regenerate.
2930 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
2932         * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2933         (bfd_errmsgs): Add corresponding message.
2934         * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2935         finding an archive that contains different format object files.
2936         Return bfd_error_wrong_object_format for this case.
2937         * format.c: Formatting fixes.  s/CONST/const/.
2938         (bfd_check_format_matches): Accept archives that give
2939         bfd_error_wrong_object_format if no full match is found.  Tidy
2940         code handling matching_vector.  Don't return a pointer to freed
2941         memory in `matching'.  Handle ambiguous matches as for partial
2942         archive matches.
2943         * bfd-in2.h: Regenerate.
2945 2001-08-15  Alan Modra  <amodra@bigpond.net.au>
2947         * libieee.h (common_header_type): Add last_byte field.
2949         * ieee.c: Add missing prototypes.  Some format fixes.
2950         (struct output_buffer_struct): Move for availability to prototypes.
2951         (ieee_part_after): New function.
2952         (ieee_slurp_debug): Use it here.
2953         (ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
2954         ieee_part_after to set last_byte to one past end of current part.
2955         Update callers.
2956         (ieee_pos): Pass in ieee_data_struct rather than bfd.
2957         Update callers.
2958         (parse_expression): Don't go beyond the end of the current part.
2959         (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2960         (ieee_get_symtab_upper_bound, ieee_get_symtab,
2961         ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2962         ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2963         ieee_set_section_contents, ieee_write_object_contents,
2964         ieee_make_empty_symbol): Make static.
2965         (ieee_archive_p): Correct comments regarding bfd_read.
2966         (ieee_object_p): Similarly.
2967         (ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
2968         output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2969         input_bfd, output_bfd, output_buffer.
2970         (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2971         do_with_relocs, ie. as a symbol for relocatable files.
2972         (ieee_vec): Add comments showing functions referenced by macros.
2974 2001-08-14  Nick Clifton  <nickc@cambridge.redhat.com>
2976         * aout-tic30.c: Add missing prototypes.  Fix formatting.
2977         * aout-ns32k.c: Add missing prototypes.  Fix formatting.
2978         * peXXigen.c: Add missining prototypes.  Fix formatting.
2979         * aout-adobe.c: Add missining prototypes.  Fix formatting.
2981 2001-08-13  Nick Clifton  <nickc@cambridge.redhat.com>
2983         * elf32-v850.c: Add missing function prototypes.
2984         Fix some formatting.
2986         * cpu-v850.c: Add missing function prototype.
2987         Fix some formatting.
2989 2001-08-11  Nick Clifton  <nickc@cambridge.redhat.com>
2991         * elf-bfd.h (struct elf_backend_data): Add new fields
2992         'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2993         (bfd_elf_sprintf_vma): Rename function prototype to
2994         '_bfd_elf_sprintf_vma'.
2995         (bfd_elf_fprintf_vma): Rename function prototype to
2996         '_bfd_elf_fprintf_vma'.
2997         * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2998         directly, instead indirect via the elf_backend_data structure.
2999         (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
3000         instead indirect via the elf_backend_data structure.
3001         * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
3002         (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
3003         * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
3004         already defined.
3005         (elf_backend_fprintf_vma): Initialise if not already defined.
3006         (struct elf_backend_data): Initialise the
3007         elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
3009 2001-08-10  Andreas Jaeger  <aj@suse.de>
3011         * elf64-sparc.c: Add missing prototypes.
3012         * elf32-cris.c: Likewise.
3013         * elf32-i370.c: Likewise.
3014         * elf64-hppa.c: Likewise.
3015         * elf64-s390.c: Likewise.
3017 2001-08-10  Andreas Jaeger  <aj@suse.de>
3019         * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
3020         Add prototypes where needed.
3022 2001-08-10  H.J. Lu  <hjl@gnu.org>
3024         * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
3025         (bfd_fprintf_vma): Likewise.
3027 2001-08-10  H.J. Lu  <hjl@gnu.org>
3029         * bfd.c (bfd_sprintf_vma): Don't return void.
3030         (bfd_fprintf_vma): Likewise.
3032 2001-08-10  Andreas Jaeger  <aj@suse.de>
3034         * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
3035         to build warnings.
3036         * configure: Regenerate.
3038 2001-08-10  Alan Modra  <amodra@bigpond.net.au>
3040         * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
3041         warning if not BFD64.  Add braces so emacs auto format works.
3042         (bfd_elf_fprintf_vma): Likewise.
3044         * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
3045         of _xcoff_swap_ld*.
3046         * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
3047         param to agree with libxcoff.h.
3048         (xcoff_swap_ldhdr_out): Likewise.
3049         (xcoff_swap_ldsym_in): Likewise.
3050         (xcoff_swap_ldsym_out): Likewise.
3051         (xcoff_swap_ldrel_in): Likewise.
3052         (xcoff_swap_ldrel_out): Likewise.
3053         (xcoff_create_csect_from_smclas): Likewise.
3054         * coff64-rs6000.c: Add missing prototypes.
3055         (xcoff64_swap_ldhdr_in): Modify type of external param to agree
3056         with libxcoff.h.
3057         (xcoff64_swap_ldhdr_out): Likewise.
3058         (xcoff64_swap_ldsym_in): Likewise.
3059         (xcoff64_swap_ldsym_out): Likewise.
3060         (xcoff64_swap_ldrel_in): Likewise.
3061         (xcoff64_swap_ldrel_out): Likewise.
3062         (xcoff64_ppc_relocate_section): Make static.
3063         (xcoff64_slurp_armap): Likewise.
3064         (xcoff64_archive_p): Likewise.
3065         (xcoff64_openr_next_archived_file): Likewise.
3066         (xcoff64_sizeof_headers): Likewise.
3067         (xcoff64_is_lineno_count_overflow): Likewise.
3068         (xcoff64_is_reloc_count_overflow): Likewise.
3069         (xcoff64_loader_symbol_offset): Likewise.
3070         (xcoff64_loader_reloc_offset): Likewise.
3071         * elf64-gen.c: Add missing prototypes.
3073 2001-08-09  H.J. Lu  <hjl@gnu.org>
3075         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
3076         (bfd_elf_fprintf_vma): Likewise.
3078 2001-08-09  H.J. Lu  <hjl@gnu.org>
3080         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
3081         to ...
3082         * elf-bfd.h: Here.
3083         * bfd-in2.h: Regenerated.
3085 2001-08-09  H.J. Lu  <hjl@gnu.org>
3087         * bfd-in.h (bfd_sprintf_vma): New prototype.
3088         (bfd_fprintf_vma): Likewise.
3089         (bfd_elf_sprintf_vma): Likewise.
3090         (bfd_elf_fprintf_vma): Likewise.
3091         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
3092         * bfd-in2.h: Regenerated.
3094         * bfd.c (bfd_sprintf_vma): New. Defined.
3095         (bfd_fprintf_vma): Likewise.
3097         * elf.c (bfd_elf_sprintf_vma): New. Defined.
3098         (bfd_elf_fprintf_vma): Likewise.
3100 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
3102         * coff-rs6000.c: Add missing prototypes.
3103         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
3104         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
3105         xcoff_loader_reloc_offset): Make static.
3106         * dwarf1.c: Add missing prototypes.
3107         * dwarf2.c: Add missing prototypes.
3108         (struct abbrev_info): Move definition.
3109         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
3110         * elf.c: Add missing prototypes.
3111         * elf32-gen.c: Likewise.
3112         * elf32-i386.c: Likewise.
3113         * elf32-ppc.c: Likewise.
3114         (ppc_elf_sort_rela): Use PTR instead of "void *".
3115         * elflink.h: Add missing prototypes.  Formatting fixes.
3116         * merge.c: Add missing prototypes.
3117         (last4_eq): Use PTR instead of "void *".
3118         (last_eq): Likewise.
3119         * syms.c: Add missing prototypes.
3121 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
3123         * bfd.c: Fix formatting.
3124         * bfd-in2.h: Regenerate.
3126 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
3128         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
3129         true (this target uses REL relocations) and 'pcrel_offset' to
3130         false (the PC is implied, not stored in the offset).
3132 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
3134         1999-10-19  Linus Nordberg  <linus@swox.se>
3135         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
3136         * elfxx-target.h (elf_backend_want_got_sym): Define.
3137         (elfNN_bed): Add elf_backend_want_got_sym.
3138         * elflink.c (_bfd_elf_create_got_section): Define
3139         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
3141 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
3143         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
3144         (find_rela_addend): New function.
3145         (parse_comp_unit): Call it to find the abbrev offset addend.
3146         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
3147         members of dwarf2_debug as debugging information is read.
3149 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
3151         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
3152         targets as well as sh-pe.
3154 2001-08-03  Ben Harris <bjh21@netbsd.org>
3156         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
3157         reloc from start of section when computing value for R_ARM_REL32
3158         reloc.
3160 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
3162         From  H.J. Lu  <hjl@gnu.org>
3163         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
3164         keep relocs for undefined syms if there are no dynamic sections in
3165         executable.
3166         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
3168 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
3170         * cofflink.c (coff_link_check_ar_symbols): also search for
3171         __imp__symbol as well as _symbol.
3172         * linker.c (_bfd_generic_link_add_archive_symbols): also
3173         search for __imp__symbol as well as _symbol.
3175 2001-08-01  Adam Nemet  <anemet@lnxw.com>
3177         * elf.c (elf_sort_sections): Return zero only as the last step.
3179 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
3181         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
3182         ARM_COFF_BUGFIX.
3183         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
3184         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
3185         ARM_COFF_BUGFIX.
3187 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3189         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
3190         to match corresponding bfd_coff_backend data member.
3192 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
3194         * Makefile.am: Update dependencies with "make dep-am".
3195         * Makefile.in: Regenerate
3197 2001-07-15  H.J. Lu  <hjl@gnu.org>
3199         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
3200         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
3201         * Makefile.in: Regenerate.
3203 2001-07-11  H.J. Lu  <hjl@gnu.org>
3205         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
3206         flags when creating the reloc section if the ALLOC flag in the
3207         source section is set.
3209 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
3211         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
3212         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
3213         * bfd-in2.h: Regenerate.
3214         * libbfd.h: Regenerate.
3215         * elfxx-ia64.c (ia64_howto_table): Define how to handle
3216         new relocations.
3217         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
3218         (elfNN_ia64_check_relocs): Likewise.
3219         (elfNN_ia64_install_value): Likewise.
3220         (elfNN_ia64_relocate_section): Likewise.
3222 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
3224         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
3225         R_SPARC_UA64.
3226         (elf32_sparc_check_relocs): Likewise.
3227         Only create .rela section for alloced sections in shared libraries.
3228         (elf32_sparc_relocate_section): Likewise.
3229         Remove redundant check.
3230         Optimize unaligned reloc usage.
3231         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
3232         check.
3234 2001-07-11  H.J. Lu  <hjl@gnu.org>
3236         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
3237         ALLOC|LOAD flags as the source section for debugging sections
3238         when creating the reloc section.
3240 2001-07-05  Jim Wilson  <wilson@redhat.com>
3242         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
3243         the section of the bigger symbol.
3245         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
3247 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
3249         * peicode.h (coff_swap_scnhdr_in): For sections containing
3250         uninitialised data, only set their size to s_paddr if this does
3251         not reset their size to zero.  MS's latest compilers will set
3252         s_paddr to zero.
3254 2001-07-04  H.J. Lu  <hjl@gnu.org>
3256         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
3257         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
3258         bfd_mach_mips5000.
3260 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
3262         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
3264         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
3265         sections being discarded.
3267 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
3269         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
3270         instead of _bfd_elfcore_section_from_phdr.
3271         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
3272         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
3273         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
3274         (elfcore_grok_prstatus): Likewise.
3275         (elfcore_grok_lwpstatus): Likewise.
3276         (bfd_get_elf_phdr_upper_bound): Likewise.
3277         (elfcore_make_note_pseudosection): Formatting.
3278         (_bfd_elfcore_strndup): Formatting.
3279         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
3280         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
3282 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
3284         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
3285         and _bfd_elfcore_strndup.
3286         (struct elf_backend_data): Add elf_backend_grok_prstatus
3287         and elf_backend_grok_psinfo.
3288         * elf.c (_bfd_elfcore_make_pseudosection): New function.
3289         (elfcore_grok_prstatus): Use it.
3290         (elfcore_make_note_pseudosection): Likewise.
3291         (elfcore_strndup):  Rename to...
3292         (_bfd_elfcore_strndup): Here, and make global.
3293         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
3294         (elfcore_grok_note): Call elf_backend_grok_prstatus
3295         and elf_backend_grok_psinfo if available.
3296         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
3297         (_bfd_elf32_mips_grok_psinfo): New function.
3298         (elf_backend_grok_prstatus): Define.
3299         (elf_backend_grok_psinfo): Define.
3300         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
3301         (elf_backend_grok_psinfo): Likewise.
3302         (elfNN_bed): Include elf_backend_grok_prstatus and
3303         elf_backend_grok_psinfo.
3305 2001-06-29  H.J. Lu  <hjl@gnu.org>
3307         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
3308         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
3309         is NULL before filling PLT.
3311 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
3313         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
3315 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
3317         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
3318         here..
3319         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
3320         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3321         after gc has run.
3323         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
3324         (IS_ABSOLUTE_RELOC): Define.
3325         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
3326         (hppa_link_hash_newfunc): Always init it.
3327         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
3328         create COPY relocs only when the reloc is in a read-only section.
3329         Instead, allocate space for a dynamic reloc to reference the
3330         library symbol directly.  Keep track of space we allocate using
3331         relocs_entries.
3332         (hppa_discard_copies): Delete, and move code to..
3333         (allocate_plt_and_got): ..here.  Rename to
3334         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3335         relocs for non-shared link.
3336         (elf32_hppa_size_dynamic_sections): Update calls to above.
3337         (elf32_hppa_relocate_section): Write out the dynamic relocs used
3338         in lieu of COPY relocs.
3340         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
3341         here..
3342         (elf_i386_adjust_dynamic_symbol): ..nor here..
3343         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
3344         after gc has run.
3345         (elf_i386_size_dynamic_sections): Fix a comment.
3346         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
3347         involved in writing reloc out.
3349 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
3351         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
3352         Ensure syms are dynamic if we might be emitting a reloc.
3353         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
3354         for undefweak or undefined syms..
3355         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
3357         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
3358         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
3359         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
3360         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
3362 2001-06-24  H.J. Lu  <hjl@gnu.org>
3364         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
3365         strncasecmp/strcasecmp instead of strncmp/strcmp.
3367 2001-06-23  H.J. Lu  <hjl@gnu.org>
3369         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
3370         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
3371         in the regular object file and treat the weak definition as
3372         the normal one.
3374 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
3376         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
3377         unresolved_reloc test to exclude cases where we use "relocation"
3378         before setting it to point into the .got.  Reinstate fudge for
3379         unresolved relocs in debugging sections.
3381         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
3382         complicated tests for unresolvable relocs with a simple direct
3383         scheme using "unresolved_reloc" var.
3385         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
3386         elf_i386_dyn_relocs.  Update comment.
3387         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
3388         dyn_relocs.
3389         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
3390         others to aborts.
3391         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
3392         abort.
3393         (elf_i386_size_dynamic_sections): Likewise.
3394         (elf_i386_finish_dynamic_symbol): Likewise.
3395         (elf_i386_finish_dynamic_sections): Likewise.
3396         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
3397         handling code.
3399         Avoid creating COPY relocs if possible.
3400         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
3401         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
3402         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
3403         reloc is in a read-only section.  Instead, allocate space for a
3404         dynamic reloc to reference the library symbol directly.  Keep
3405         track of space we allocate using pcrel_relocs_copied.
3406         (discard_copies): Delete, and move code to ..
3407         (allocate_plt_and_got): ..here.  Rename to
3408         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
3409         relocs for non-shared link.
3410         (elf_i386_size_dynamic_sections): Update calls to above functions.
3411         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
3412         more ugly logic to avoid "unresolvable relocation" error.  Use
3413         htab shortcut in place of elf_hash_table macro.
3414         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
3415         not always be created now.
3417 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
3419         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
3420         shared libraries.
3422 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3424         * configure.host (mips64-*-linux): Reformat.
3426 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
3428         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
3429         allocate local .got space.  Use shortcuts from hash table for .got
3430         and .plt rather than comparing section names.
3431         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
3432         adjusting index into local_got_refcounts to document what we are
3433         really doing.
3434         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
3435         Tidy .got and .plt error checking.
3437 2001-06-20  Catherine Moore  <clm@redhat.com>
3439         * elf-bfd.h (struct elf_backend_data):
3440         elf_backend_emit_relocs: New field: Function for emitting
3441         relocs.
3442         elf_backend_count_relocs: New field: Function for determining
3443         the number of relocs to be emitted.
3444         * elfxx-target.h: Provide default (NULL) values for
3445         elf_backend_emit_relocs and elf_backend_count_relocs.
3446         * elflink.h (elf_link_size_reloc_section): Make the hash table
3447         big enough to hold the relocs counted by either reloc_count or
3448         o->reloc_count.
3449         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
3450         should be emitted, either because of a command line option
3451         stored in the info structure or because the target provides a
3452         special reloc emitting function.
3453         If the target provides a reloc counting function use it,
3454         unless performing a relocatable link or emitting all relocs.
3455         Also set the SEC_RELOC flag on any output section which will
3456         contain relocs.
3457         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
3458         should be emitted, either because of a command line option
3459         stored in the info structure or because the target provides a
3460         special reloc emitting function.
3461         If the target provides a reloc emitting function, use it,
3462         unless performing a relocatable link or emitting all relocs.
3464 2001-06-20  H.J. Lu  <hjl@gnu.org>
3466         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
3467         allocate local .got space.
3469 2001-06-19  Andreas Jaeger  <aj@suse.de>
3471         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
3472         dynamic symbols.
3474 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
3476         * elflink.h (struct elf_assign_sym_version_info): Remove member
3477         export_dynamic.  All users changed to use info member.
3478         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
3479         export_dynamic, instead use member in parameter info.
3480         * bfd-in.h (bfd_elf32_size_dynamic_sections,
3481         bfd_elf64_size_dynamic_sections): Update prototype.
3482         * bfd-in2.h: Regenerate.
3484 2001-06-18  H.J. Lu  <hjl@gnu.org>
3486         * elflink.h (elf_info_failed): Add a new field, verdefs.
3487         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
3488         elf_export_symbol.
3489         (elf_export_symbol): Check eif->verdefs to decide if a symbol
3490         should be exported.
3492 2001-06-17  H.J. Lu  <hjl@gnu.org>
3494         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
3495         readonly_reloc, to record if a relocation in the .rel.dyn
3496         section is against a read-only section.
3497         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
3498         field to false.
3499         (_bfd_mips_elf_check_relocs): Record if there is a relocation
3500         in the .rel.dyn section against a read-only section by setting
3501         DF_TEXTREL or readonly_reloc.
3502         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
3503         it is true.
3504         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
3505         there is a relocation in the .rel.dyn section against a
3506         read-only section.
3507         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
3508         DF_TEXTREL is set.
3510 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
3512         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
3513         function.  Move flagword result into parameter list.  Remove
3514         comment about setting bfd_error_handler to intercept failure
3515         results.
3516         * coffgen.c (make_a_section_from_file): Examine result of
3517         calling bfd_coff_styp_to_sec_flags and pass a failure back to
3518         caller.
3519         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
3520         function.  Move flagword result into parameter list.
3521         * libcoff.h: Regenerate.
3522         * libecoff.h: Regenerate.
3524 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
3526         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
3527         section is going to follow it.
3529 2001-06-12  Catherine Moore  <clm@redhat.com>
3531         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
3532         with the file_align entry from elf_backend_data.
3533         (elf_gc_smash_unused_vtentry_relocs): Likewise.
3534         (elf_gc_record_vtentry): Likewise.
3536 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
3538         * elflink.h: Whitespace changes.
3539         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
3540         rather than "unsigned char".
3541         (elf_link_output_relocs): Likewise.
3542         (elf_link_input_bfd): Likewise.
3543         (elf_reloc_link_order): LIkewise.
3544         * elf.c: s/CONST/const/.  Whitespace changes.
3545         * elf32-mips.c: Formatting fix.
3547         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
3548         * Makefile.in: Regenerate.
3549         * po/Make-in: Remove trailing tab.
3551 2001-06-09  Philip Blundell  <philb@gnu.org>
3553         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
3554         change.
3555         (elf32_arm_plt_entry): Likewise.
3557 2001-06-08  H.J. Lu  <hjl@gnu.org>
3559         * elf.c (swap_out_syms): Keep names for global section symbols.
3561 2001-06-07  H.J. Lu  <hjl@gnu.org>
3563         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
3564         MIPS-based machines need it.
3566 2001-06-07  H.J. Lu  <hjl@gnu.org>
3568         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
3569         for SGI only.
3571         * config.bfd: Remove ecoff from Linux/mips.
3573 2001-06-07  Andreas Jaeger  <aj@suse.de>
3575         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
3576         assertion.
3577         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
3578         alignment of 8 for .rela sections; handle further relocations.
3580 2001-06-06  Christian Groessler <cpg@aladdin.de>
3582         * coff-z8k.c: Fix formatting.
3583         Fix howtos: howto->size was always 1.
3585 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3587         * configure.host (mips64*-*-linux*): Define.
3589 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
3591         * elf32-i386.c (elf_i386_discard_copies): Rename to
3592         discard_copies, and use elf_link_hash_entry arg rather than
3593         elf_i386_link_hash_entry.
3594         (elf_i386_link_hash_traverse): Delete.
3595         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
3596         Tidy sizing of dynamic sections.
3597         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
3598         possible .plt entries.
3599         (elf_i386_gc_sweep_hook): Likewise.
3600         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
3601         everything with plt.refcount <= 0.
3603         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
3604         .relgot space here.
3605         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
3606         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
3607         .rel.plt here..
3608         (allocate_plt_and_got): ..instead do it all here.  New function.
3609         (elf_i386_size_dynamic_sections): Allocate local .got space and
3610         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
3611         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
3612         rather than gc variety).
3613         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3614         (elf_i386_relocate_section): Use it here and correct handling of
3615         R_386_GOT32.  Provide section and offset for "unresolvable
3616         relocation" error message.
3617         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
3619         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
3620         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
3621         (elf_i386_link_hash_table_create): Init them.
3622         (create_got_section): New function.
3623         (elf_i386_create_dynamic_sections): New function.
3624         (elf_backend_create_dynamic_sections): Set to above.
3625         (elf_i386_check_relocs): Use shortcuts from hash table rather than
3626         calling bfd_get_section_by_name.
3627         (elf_i386_gc_sweep_hook): Likewise.
3628         (elf_i386_adjust_dynamic_symbol): Likewise.
3629         (elf_i386_size_dynamic_sections): Likewise.
3630         (elf_i386_relocate_section): Likewise.
3631         (elf_i386_finish_dynamic_sections): Likewise.
3633         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
3635 2001-06-02  H.J. Lu  <hjl@gnu.org>
3637         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
3638         and ELFOSABI_HPUX.
3639         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
3641 2001-06-02  H.J. Lu  <hjl@gnu.org>
3643         * aout-cris.c (MACHTYPE_OK): New. Defined.
3645 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
3647         * section.c (_bfd_strip_section_from_output): Handle NULL
3648         output_section.
3650 2001-06-02  H.J. Lu  <hjl@gnu.org>
3652         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
3653         rs6000coff64_vec only if BFD64 is defined.
3654         (powerpc64-*-aix*): Enable only if BFD64 is defined.
3656 2001-06-02  H.J. Lu  <hjl@gnu.org>
3658         * coff-ia64.c (ia64coff_object_p): Rewrite with
3659         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
3661 2001-06-01  Andreas Jaeger  <aj@suse.de>
3663         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
3664         relocation, small reformatting.
3666 2001-05-29  Andreas Jaeger  <aj@suse.de>
3668         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
3669         (elf64_x86_64_relocate_section): Likewise.
3671 2001-05-30  Alan Modra  <amodra@one.net.au>
3673         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
3674         millicode.  Don't allocate .got and .rela.got space here..
3675         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
3676         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
3677         .rela.plt here..
3678         (hppa_handle_PIC_calls): ..nor here..
3679         (allocate_plt_and_got): ..instead do it all here.  New function.
3680         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
3681         call allocate_plt_and_got.  No need to zap .got if not dynamic.
3682         (elf32_hppa_final_link): Call regular bfd_final_link instead of
3683         gc_common_final_link.
3684         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3685         (elf32_hppa_relocate_section): Use it here.
3686         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
3687         dynamic_sections_created.
3688         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
3690 2001-05-28  Andreas Jaeger  <aj@suse.de>
3692         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
3693         generic version since we want a hashsize of 4.
3694         (elf_backend_size_info): Likewise.
3696 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3698         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
3699         a zeroing loop.
3700         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
3701         (elf_link_input_bfd): Likewise.
3702         (elf_reloc_link_order): Likewise.
3703         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
3704         relocations correctly.
3706 2001-05-28  Nicolas Pitre <nico@cam.org>
3708         * elf32-arm.h: fix PLT generation for big endian ARM
3710 2001-05-28  Alan Modra  <amodra@one.net.au>
3712         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
3713         for symbols forced local that need plabels.
3714         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
3715         .plt.rela for local syms if non-shared.
3716         (hppa_build_one_stub): Mask lsb of plt.offset.
3717         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3718         (clobber_millicode_symbols): Correct comment.
3719         (elf32_hppa_relocate_section): Likewise.
3720         (elf32_hppa_finish_dynamic_symbol): Likewise.
3722 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
3724         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3725         * bfd-in2.h: Regenerate.
3726         * libbfd.h: Regenerate.
3727         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3728         and BFD_RELOC_SPARC_UA64 mapping
3729         * elf64-sparc.c: Likewise.
3731 2001-05-25  H.J. Lu  <hjl@gnu.org>
3733         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3734         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3735         (coff-rs6000.lo): Remove the old dependency.
3736         * Makefile.in: Rebuild.
3738         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3739         coff-rs6000.lo.
3741 2001-05-25  H.J. Lu  <hjl@gnu.org>
3743         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3744         rs6000coff_core_file_matches_executable_p,
3745         rs6000coff_core_file_failing_command and
3746         rs6000coff_core_file_failing_signal only if AIX_CORE is
3747         defined.
3748         (pmac_xcoff_vec): Likewise.
3749         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3751 2001-05-25  Timothy Wall  <twall@redhat.com>
3753         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3754         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
3756 2001-05-25  H.J. Lu  <hjl@gnu.org>
3758         * bfd-in2.h: Regenerated.
3759         * libcoff.h: Likewise.
3761 2001-05-25  Alan Modra  <amodra@one.net.au>
3763         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3764         undefined millicode syms in shared libs.
3765         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3766         (elf32_hppa_check_relocs): Likewise.
3767         (elf32_hppa_adjust_dynamic_symbol): Likewise.
3768         (elf32_hppa_size_dynamic_sections): Likewise.
3769         (elf32_hppa_relocate_section): Likewise.
3770         (elf32_hppa_finish_dynamic_symbol): Likewise.
3771         (elf32_hppa_finish_dynamic_sections): Likewise.
3773 2001-05-24  Tom Rix <trix@redhat.com>
3775         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3776         xcoff-target.h not used to define rs6000 or ppc bfd.
3777         * Makefile.in same
3779         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3780         to 64 bit.
3782         * coff-rs6000.c : Many changes for 64 bit support.  Move common
3783         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
3784         and pmac_xcoff_vec
3786         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
3787         linker now supported.  Explictly define the rs6000coff64_vec.
3789         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3790         (coff_print_aux) same
3791         (coff_write_object_contents) same
3792         (coff_slurp_line_table) same
3794         * coffgen.c : (coff_fix_symbol_name) formatting
3795         (coff_mangle_symbols) xcoff 64 bit support
3796         (coff_write_symbol) same
3797         (coff_write_alien_symbol) same
3798         (coff_write_native_symbol) same
3799         (coff_write_symbols) same
3800         (coff_get_symbol_info) same
3801         (bfd_coff_get_syment) same
3802         (coff_print_symbol) same
3804         * config.bfd : add powerpc64-*-aix* target
3806         * libcoff-in.h : formatting
3808         * libcoff.h : move xcoff extern declarations to libxcoff.h
3810         * libxcoff.h : New file
3812         * xcofflink.c : Many changes for xcoff64 support.  Move common
3813         structures to include/coff/xcoff.h.  Move specific structure to
3814         backends coff-rs6000.c and coff64-rs6000.c.  Use new backend
3815         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3817         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3818         aix4.2+ -binitfini.
3820         (xcoff_build_ldsyms) : handle special __rtinit symbol.
3822 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
3824         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3825         s/ENTIRES/ENTRIES/.
3827 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3829         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3830         * libbfd.h: Regenerate.
3831         * bfd-in2.h: Regenerate.
3833         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3834         * archures.c (bfd_mach_mips12000): Define.
3835         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3836         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3837         support.
3838         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3839         * bfd-in2.h: Regenerate.
3840         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3842 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3844         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3845         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3846         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3847         that is used by GCC.
3849 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
3851         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3852         of entries in a structured section.
3853         * elf.c: Use new macro.
3854         * elf32-i386.c: Use new macro.
3855         * elf32-mips.c: Use new macro.
3856         * elf64-alpha.c: Use new macro.
3857         * elf64-sparc.c: Use new macro.
3858         * elfcode.h: Use new macro.
3859         * elflink.h: Use new macro.
3861 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
3863         * bfdint.texi: Replace -oformat with --oformat.
3865 2001-05-21  Andreas Jaeger  <aj@suse.de>
3867         * dwarf2.c (decode_line_info): Fix error message.
3868         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3869         adjust error message.
3871 2001-05-18  H.J. Lu  <hjl@gnu.org>
3873         * elflink.h (elf_link_add_object_symbols): Revert the last
3874         change.
3876 2001-05-17  Alan Modra  <amodra@one.net.au>
3878         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3879         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3880         (hppa_build_one_stub): Add an assert to check plt.offset.
3882 2001-05-17  H.J. Lu  <hjl@gnu.org>
3884         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3885         version definition to basename of the output filename.
3887 2001-05-17  H.J. Lu  <hjl@gnu.org>
3889         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3890         basename of the bfd filename.
3892 2001-05-16  Alan Modra  <amodra@one.net.au>
3894         * section.c (asection): Add linker_has_input field.
3895         (STD_SECTION): Adjust initialization to suit.
3896         * ecoff.c (bfd_debug_section): Likewise.
3897         * bfd-in2.h: Regenerate.
3899 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
3901         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3902         negative 32-bit operands to 16 operands when the operand is
3903         going to be zero-extended by the modified opcode.
3905 2001-05-12  Peter Targett  <peter.targett@arccores.com>
3907         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3908         name for 'arc5' core versions.
3909         (bfd_arc_arch): Make bfd_mach_arc_6 default.
3911         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3912         architecture.
3913         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3915 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
3917         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3918         sections as well.
3919         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3920         to .gnu.linkonce.t.FOO text section.
3922 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
3924         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3925         fields, change sec into secinfo.
3926         (struct sec_merge_info): Add chain, remove last fields.
3927         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3928         (sec_merge_hash_lookup): If lookup could not use a string only
3929         because it has bad alignment, mark the old string for deletion.
3930         (sec_merge_add): Add secinfo argument. Don't compute entry's
3931         position, instead record the section.
3932         (sec_merge_emit): Update for the sec into secinfo change in
3933         struct sec_merge_hash_entry.
3934         (_bfd_merge_section): Only record the section for merging, defer
3935         putting strings into the hash table.
3936         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3937         _bfd_merge_sections): New functions.
3938         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3939         changes.
3940         * libbfd-in.h (_bfd_merge_sections): Add prototype.
3941         (_bfd_nolink_bfd_merge_sections): Define.
3942         * libbfd.h: Likewise.
3943         (bfd_generic_merge_sections): Add prototype.
3944         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3945         (struct bfd_target): Likewise.
3946         * bfd.c (bfd_merge_sections): Define.
3947         * bfd-in2.h: Rebuilt.
3948         * elf.c (_bfd_elf_merge_sections): New function.
3949         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3950         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3951         * reloc.c (bfd_generic_merge_sections): New function.
3952         * vms.c (vms_bfd_merge_sections): New function.
3953         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3954         * aout-target.h (MY_bfd_merge_sections): Define.
3955         * aout-tic30.c (MY_bfd_merge_sections): Define.
3956         * binary.c (binary_bfd_merge_sections): Define.
3957         * bout.c (b_out_bfd_merge_sections): Define.
3958         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3959         * coffcode.c (coff_bfd_merge_sections): Define.
3960         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3961         * i386msdos.c (msdos_bfd_merge_sections): Define.
3962         * i386os9k.c (os9k_bfd_merge_sections): Define.
3963         * ieee.c (ieee_bfd_merge_sections): Define.
3964         * ihex.c (ihex_bfd_merge_sections): Define.
3965         * nlm-target.h (nlm_bfd_merge_sections): Define.
3966         * oasys.c (oasys_bfd_merge_sections): Define.
3967         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3968         * som.c (som_bfd_merge_sections): Define.
3969         * srec.c (srec_bfd_merge_sections): Define.
3970         * tekhex.c (tekhex_bfd_merge_sections): Define.
3971         * versados.c (versados_bfd_merge_sections): Define.
3972         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3974 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
3976         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3977         to be unsigned long, in order to match its use.
3979 2001-05-10  H.J. Lu  <hjl@gnu.org>
3981         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3982         indirect symbols.
3984 2001-05-09  H.J. Lu  <hjl@gnu.org>
3986         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3987         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3988         Remove the unused veriable `dynver'.
3990 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
3992         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3993         NULL or is not COFF.
3994         (coff_i386_rtype_to_howto): Don't dump core if output section
3995         owner is not COFF.
3997 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3999         * ecoff.c (bfd_debug_section): Fix initialization.
4000         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
4001         is always a positive integer. Cast away sign mismatch.
4002         * elf32-mips.c: Fix misleading comment and typo.
4003         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
4004         correct data type.
4005         * elflink.c: Fix typo.
4006         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
4007         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
4009 2001-05-04  Richard Henderson  <rth@redhat.com>
4011         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
4013 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
4015         * elf32-arm.h (elf32_arm_final_link_relocate): Set
4016         EF_ARM_HASENTRY if the start address is set.
4018 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
4020         * targets.c (_bfd_target_vector_entries): Compute value based on
4021         the size of the _bfd_target_vector and not bfd_target_vector.
4023 2001-05-03  H.J. Lu  <hjl@gnu.org>
4025         * elfcode.h: Include "libiberty.h".
4027         * elflink.h (elf_link_add_object_symbols): Set
4028         elf_dt_name (abfd) to basename of the bfd filename.
4029         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
4030         of the bfd filename.
4032 2001-05-03  Andreas Jaeger  <aj@suse.de>
4034         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
4035         (elf_generic_info_to_howto_rel): Likewise.
4036         * coff-alpha.c (reloc_nil): Likewise.
4037         (alpha_ecoff_bad_format_hook): Likewise.
4038         (alpha_adjust_reloc_out): Likewise.
4039         (alpha_bfd_reloc_type_lookup): Likewise.
4040         (alpha_convert_external_reloc): Likewise.
4041         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
4042         (elf64_alpha_reloc_bad): Likewise.
4043         (elf64_alpha_reloc_gpdisp): Likewise.
4044         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
4045         (elf64_alpha_info_to_howto): Likewise.
4046         (elf64_alpha_add_symbol_hook): Likewise.
4047         (elf64_alpha_create_got_section): Likewise.
4048         (elf64_alpha_is_local_label_name): Likewise.
4049         (elf64_alpha_merge_ind_symbols): Likewise.
4050         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
4051         (mips_elf64_get_reloc_upper_bound): Likewise.
4052         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
4053         (nlm_alpha_get_public_offset): Likewise.
4055 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
4057         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
4058         about overflow in R_OPENRISC_LO_16_IN_INSN and
4059         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
4061 2001-04-30  H.J. Lu  <hjl@gnu.org>
4063         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
4064         only for ELF_LINK_FORCED_LOCAL.
4065         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4066         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
4067         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4069         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
4070         if the symbol has hidden or internal visibility.
4072 2001-04-30  Alan Modra  <amodra@one.net.au>
4074         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
4075         calls to undefined weak symbols.
4077 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
4079         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
4080         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
4082 2001-04-27  Andreas Jaeger  <aj@suse.de>
4084         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
4085         out handled entries.
4086         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
4087         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
4088         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
4089         GOT32.
4091 2001-04-27  Sean McNeil <sean@mcneil.com>
4093         * config.bfd: Add arm-vxworks target.
4094         * coff-arm (coff_arm_relocate_section): Add in symbol value to
4095         addend (fro VXworks targets).
4097 2001-04-26  H.J. Lu  <hjl@gnu.org>
4099         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
4100         valid.
4102 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
4104         * bfd-in.h (bfd_cache_close): Declare newly exported function.
4105         * bfd-in2.h: Regenerated.
4107 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
4109         * merge.c (struct sec_merge_hash_entry): Add alignment field.
4110         (struct sec_merge_hash): Remove alignment_power.
4111         (sec_merge_hash_newfunc): Clear alignment.
4112         (sec_merge_hash_lookup): Pass alignment as argument.
4113         Use hashp->root.next, not hashp->next to walk the hash chain.
4114         If a string already in the hashtable does not have required
4115         alignment, create a new hashtable entry.
4116         (sec_merge_init): Remove alignment_power argument.
4117         (sec_merge_add): Add alignment argument.
4118         (sec_merge_emit): Alignment is now a per-entity thing, not per
4119         section.
4120         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
4121         for proper alignment.
4122         Pass alignment information to sec_merge_add.
4124 2001-04-24  Christian Groessler  <cpg@aladdin.de>
4126         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
4127         and R_REL16 reloc types; accept odd values for R_REL16 type
4129 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
4131         * cpu-openrisc.c: New file.
4132         * elf32-openrisc.c: Likewise.
4134         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
4135         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
4136         (BFD32_BACKENDS): Add elf32-openrisc.lo.
4137         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
4138         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
4139         * Makefile.in: Regenerated.
4140         * config.bfd: (openrisc-*-elf): New target.
4141         * configure.in (bfd_elf32_openrisc_vec): New vector.
4142         * configure: Regenerated.
4143         * libbfd.h: Regenerated.
4144         * bfd-in2.h: Regenerated.
4145         * reloc.c: Add OpenRISC relocations.
4146         * targets.c (bfd_elf32_openrisc_vec): Declare.
4147         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
4148         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
4149         (bfd_openrisc_arch): Declare.
4150         (bfd_archures_list): Add bfd_openrisc_arch.
4151         * elf.c (prep_headers): Add bfd_arch_openrisc.
4153 2001-04-23  Bo Thorsen  <bo@suse.de>
4155         * elf64-x86-64.c: Add c++ vtable hack.
4156         Small whitespace and comment changes.
4158 2001-04-19  Andreas Jaeger  <aj@suse.de>
4160         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4161         (elf64_x86_64_plt_entry): Likewise.
4162         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
4163         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
4165 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
4167         * elf32-cris.c: Tweak comments related to dynamic linking.
4168         (cris_elf_relocate_section): When not creating shared object, fill
4169         in the .got table for any symbol not in the dynamic symbol table.
4170         (elf_cris_finish_dynamic_symbol): When not creating shared object,
4171         only emit a .got.rela reloc if the symbol is in the dynamic symbol
4172         table.
4173         (cris_elf_check_relocs): Use variable r_type in all places rather
4174         than the original expression.  Add default case in switch for
4175         reloc types.
4176         (elf_cris_size_dynamic_sections): Iterate over
4177         elf_cris_discard_excess_program_dynamics when not creating shared
4178         library.
4179         (elf_cris_discard_excess_dso_dynamics): Renamed from
4180         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
4181         (elf_cris_discard_excess_program_dynamics): New.
4183 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
4185         * coffcode.h (coff_write_object_contents): Use
4186         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
4188 2001-04-14  H.J. Lu  <hjl@gnu.org>
4190         * bfd-in2.h: Regenerate.
4192 2001-04-14  Jakub Jelinek <jakub@redhat.com>
4194         * section.c (STD_SECTION): Add entsize.
4196 2001-04-13  H.J. Lu  <hjl@gnu.org>
4198         * section.c (SEC_MERGE): Define new flag for merging.
4199         (SEC_STRINGS): Likewise.
4200         (entsize): New field.
4202 2001-04-13  Roger Sayle  <roger@metaphorics.com>
4204         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
4205         flag on pe-i386 targets.
4207 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
4209         * libbfd-in.h (_bfd_merge_section): New.
4210         (_bfd_write_merged_section): New.
4211         (_bfd_merged_section_offset): New.
4212         * libbfd.h: Rebuilt.
4213         * linker.c (_bfd_generic_link_output_symbols): Handle
4214         discard_sec_merge.
4215         * aoutx.h (aout_link_write_symbols): Likewise.
4216         * pdp11.c (aout_link_write_symbols): Likewise.
4217         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
4218         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
4219         sections.
4220         (elf_link_sec_merge_syms): New.
4221         (elf_link_input_bfd): Call _bfd_merged_section_offset
4222         and _bfd_write_merged_section.
4223         Handle discard_sec_merge.
4224         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
4225         field.
4226         (struct bfd_elf_section_data): Likewise.
4227         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
4228         SEC_STRINGS section flags and entsize from their ELF counterparts.
4229         (_bfd_elf_link_hash_table_init): Initialize merge_info.
4230         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
4231         from their BFD counterparts.
4232         * merge.c: New file.
4233         * Makefile.am: Add strtab.lo.
4234         * Makefile.in: Rebuilt.
4236 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
4238         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
4239         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
4241 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
4243         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
4244         endian MIPS ELF target.
4245         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
4246         MIPS ELF target.
4248         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
4249         64bit big endian MIPS ELF target.
4250         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4251         endian MIPS ELF target.
4252         * configure: Regenerated.
4254         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
4255         little endian targets.
4256         (mips_elf_sym_is_global): Handle traditional targets.
4258         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
4259         64bit big endian MIPS ELF target.
4260         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
4261         endian MIPS ELF target.
4263         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
4264         and bfd_elf64_tradlittlemips_vec.
4266 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
4268         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
4269         ordinary "progbits" section.
4271 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
4273         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
4274         when -Bsymbolic causes a symbol to no longer need a .plt entry.
4276 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
4278         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
4280 2001-03-30  H.J. Lu  <hjl@gnu.org>
4282         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
4283         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
4285 2001-03-26  H.J. Lu  <hjl@gnu.org>
4287         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
4288         if there are any relocations for generic ELF.
4289         (bfd_elf32_bfd_link_add_symbols): Defined to
4290         elf32_generic_link_add_symbols.
4291         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
4292         if there are any relocations for generic ELF.
4293         (bfd_elf64_bfd_link_add_symbols): Defined to
4294         elf64_generic_link_add_symbols.
4296 2001-03-23  Nick Clifton  <nickc@redhat.com>
4298         * Makefile.am (BUILD_CFILES): New variable: List of C source
4299         files created in build directory.
4300         (BUILD_HFILES): New variable: List of header files created in
4301         build directory.
4302         (POTFILES): Delete.
4303         (po/POTFILES.in): Replace rule with empty entry.
4304         (po/SRC-POTFILES.in): New rule: Create a list of source files
4305         in the source directory.
4306         (po/BLD-POTFILES.in): New rule: Create a list of source files
4307         in the build directory.
4308         (MOSTLYCLEAN): Do not delete source files created in build
4309         directory.
4310         * Makefile.in: Regenerate.
4311         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
4312         into po/Makefile.
4313         * configure: Regenerate.
4315         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
4316         and BLD_POTFILES.
4317         Add .. to the search path when building bfd.pot.
4318         Delete POTFILES when performing distclean.
4319         Add comment describing why distclean is broken in maintainer mode.
4320         * po/POTFILES.in: Delete.
4321         * po/SRC-POTFILES.in: New file.
4322         * po/BLD-POTFILES.in: New file.
4323         * po/bfd.pot: Regenerate.
4325 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
4327         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
4328         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
4329         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
4330         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
4331         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
4332         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
4333         functions.
4334         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
4335         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
4336         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
4337         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
4338         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
4339         New HOWTO members for new relocs.
4340         (cris_reloc_map): Map new relocs.
4341         (ELF_DYNAMIC_INTERPRETER): Define.
4342         (PLT_ENTRY_SIZE): Define.
4343         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
4344         elf_cris_pic_plt_entry): New, PLT templates.
4345         (struct elf_cris_pcrel_relocs_copied, struct
4346         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
4347         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
4348         (cris_final_link_relocate): Check that 16-bit GOT relocs have
4349         positive values.  Adjust PCREL relocs to be relative to location
4350         after relocation.
4351         (cris_elf_relocate_section): Handle relocations to dynamic
4352         objects.  Handle new relocations.  Call error handler when seeing
4353         non-PIC relocation for read-only sections while generating shared
4354         object.
4355         (cris_elf_check_relocs): Set reference counts for GOT and PLT
4356         entries.
4357         (bfd_elf32_bfd_link_hash_table_create,
4358         elf_backend_adjust_dynamic_symbol,
4359         elf_backend_size_dynamic_sections,
4360         elf_backend_finish_dynamic_symbol,
4361         elf_backend_finish_dynamic_sections,
4362         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
4363         elf_backend_hide_symbol, elf_backend_want_got_plt,
4364         elf_backend_plt_readonly, elf_backend_want_plt_sym,
4365         elf_backend_got_header_size, elf_backend_plt_header_size):
4366         Define.
4368         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
4369         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
4370         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
4371         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
4372         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
4373         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
4374         * bfd-in2.h, libbfd.h: Regenerate.
4376 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
4378         (_bfd_mips_elf_relocate_section): Give a better error message when
4379         a relocation is not recognized.
4381 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
4383         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
4384         non-NULL before attempting to dereference.
4386 2001-03-20  H.J. Lu  <hjl@gnu.org>
4388         * configure.in: Remove the redundent AC_ARG_PROGRAM.
4389         * configure: Rebuild.
4391 2001-03-20  Andreas Schwab  <schwab@suse.de>
4393         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
4394         relocation value when resolving a reference from a debugging
4395         section.
4397 2001-03-16  Scott Thomason  <SThomaso@hii.com>
4399         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
4400         (xcoff64_swap_sym_out): Fix syntax errors.
4402 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
4404         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
4406 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
4408         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
4409         (hppa_link_hash_newfunc): Init it.
4410         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
4411         section appears to be non-PIC.
4412         (final_link_relocate): Likewise.
4413         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
4414         possible candidate function, and set pic_call for those that will
4415         only have a .plt entry for the PIC call stub.
4416         (hppa_handle_PIC_calls): Set maybe_pic_call.
4418 2001-03-12  DJ Delorie  <dj@redhat.com>
4420         * elf32-sh.c (sh_elf_relocate_section): Only relocation
4421         R_SH_DIR8WP* relocs if they're against external symbols, else
4422         they're just for relaxing.  Validate the reloc values.
4424 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
4426         * binary.c (bfd_external_binary_architecture): Declare.
4427         (binary_object_p): If bfd_external_binary_architecture is defined,
4428         set the architecture to this string.
4430 2001-03-11  Philip Blundell  <philb@gnu.org>
4432         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
4433         entries that could serve as a definition for a weak symbol.
4435 2001-03-08  Nick Clifton  <nickc@redhat.com>
4437         * Most files: Update copyright notices using Perl script created
4438         by Kevin Buettner <kevinb@redhat.com>.
4440 2001-03-07  Nick Clifton  <nickc@redhat.com>
4442         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
4443         prior patch on ! defined OLD_ARM_ABI.
4445 2001-03-07  Andreas Jaeger  <aj@suse.de>
4447         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
4448         some relocation values.
4450 2001-03-06  Nick Clifton  <nickc@redhat.com>
4452         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
4453         of offset in BLX(1) instruction.
4454         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
4455         offset in BLX(1) instruction.
4456         Fix formatting.
4458 2001-03-06  Nick Clifton  <nickc@redhat.com>
4460         * coff-arm.c (coff_arm_reloc_type_lookup): Add
4461         BFD_RELOC_THUMB_PCREL_BLX.
4463 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
4465         * archures.c (bfd_default_scan): Add Coldfire CPUs.
4466         * bfd-in2.h: Regenerate.
4467         * cpu-m68k.c: Add Coldfire CPUs for arch table.
4468         * ieee.c (ieee_write_processor): Set proper id for
4469         Coldfire CPUs.
4471 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
4473         * configure.in: Add s390 target.
4474         * configure: Regenerate.
4476 2001-02-28  Andreas Jaeger  <aj@suse.de>
4478         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
4479         to addend.
4481 2001-02-28  Philip Blundell  <pb@futuretv.com>
4483         * elf32-arm.h: Update mentions of renamed EF_xx constants.
4484         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
4486 2001-02-27  H.J. Lu  <hjl@gnu.org>
4488         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
4489         abfd->tdata.aout_data == NULL.
4491 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
4493         * elf32-hppa.c: Correct field selector in stub comments.
4494         (clobber_millicode_symbols): Formatting fix.
4496         * configure.in: Bump version to 2.11.90.
4497         * configure: Regenerate.
4498         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
4499         (CFILES): $SOURCE_CFILES + generated C files.
4500         (POTFILES): Include $HFILES not $SOURCE_HFILES.
4501         Run "make dep-am"
4502         * Makefile.in: Regenerate.
4503         * doc/Makefile.in: This too.
4505 2001-02-26  Timothy Wall  <twall@cygnus.com>
4507         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
4508         comments.
4510 2001-02-26  Nick Clifton <nickc@redhat.com>
4512         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
4513         up, replacing multiple if statements with a switch.
4514         (handle_COMDAT): New function.
4516 2001-02-26  H.J. Lu  <hjl@gnu.org>
4518         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
4519         a warning for section flags we do not handle instead of
4520         aborting.
4522 2001-02-26  Andreas Jaeger  <aj@suse.de>
4524         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
4526 2001-02-22  Timothy Wall  <twall@cygnus.com>
4528         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
4529         * configure.in: Add objects for elf64_ia64_aix vectors.
4530         * configure: Regenerated.
4531         * configure.host: Recognize ia64-*-aix*.
4532         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
4533         for AIX.  AIX5 requires most relocations to be dynamic (*all*
4534         binaries are somewhat similar to shared libraries).
4535         * targets.c: Add elf64_ia64_aix vectors.
4537 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
4539         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
4540         C8 said "1" instead of "8".  Clarify error string for IMM22:
4541         "signed integer" instead of just "integer".
4543 2001-02-20  Andreas Jaeger  <aj@suse.de>
4545         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
4546         PLT entries that could serve as a definition for a weak symbol.
4548 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
4550         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
4551         entries that could serve as a definition for a weak symbol.
4552         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
4554 2001-02-18  David O'Brien  <obrien@FreeBSD>
4556         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
4557         FreeBSD/i386-CURRENT differently until I can figure out the needed
4558         corefile changes.
4559         * configure: Regenerate.
4560         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
4561         FreeBSD/PowerPC, and FreeBSD/sparc64.
4563 2001-02-18  lars brinkhoff  <lars@nocrew.org>
4565         * Makefile.am: Add PDP-11 a.out target.
4566         * config.bfd: Likewise.
4567         * configure.in: Likewise.
4568         * targets.c: Likewise.
4569         * archures.c: Likewise.
4570         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
4571         * libbfd.h: Add PDP-11 relocations.
4572         * reloc.c: Likewise.
4573         * cpu-pdp11.c: New file.
4574         * pdp11.c: New file.
4576         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
4577         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4578         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
4579         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
4580         (GET_MAGIC): New macro.
4581         (PUT_MAGIC): Likewise.
4582         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
4584 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
4586         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
4587         multiarch needs it).
4589 2001-02-18  H.J. Lu  <hjl@gnu.org>
4591         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
4592         index.
4594 2001-02-18  Kazu Hirata  <kazu@hxi.com>
4596         * vms-misc.c: Fix formatting.
4598 2001-02-16  Kazu Hirata  <kazu@hxi.com>
4600         * vms.c: Fix formatting.
4602 2001-02-14  H.J. Lu  <hjl@gnu.org>
4604         * elf.c (elf_find_function): New function.
4605         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
4606         the file name and function name.
4608 2001-02-14  Nick Clifton  <nickc@redhat.com>
4610         * ecoff.c (bfd_debug_section): Update to initialise new fields in
4611         asection structure.
4613         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
4614         (BFD64_BACKENDS): Add pepigen.c
4615         Add rules to create peigen.c and pepigen.c from peXXigen.c.
4617         * Makefile.in: Regenerate.
4618         * configure:  Regenerate.
4619         * po/POTFILES.in: Regenerate.
4620         * po/bfd.pot: Regenerate.
4622 2001-02-14  H.J. Lu  <hjl@gnu.org>
4624         * libcoff-in.h (pe_tdata): Add members target_subsystem and
4625         force_minimum_alignment.
4627 2001-02-14  Bo Thorsen  <bo@suse.de>
4629         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
4630         (elf64_86_64_size_info): Struct added to fix a problem
4631         with the hashtable string entries.
4632         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
4633         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
4634         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
4635         remove the FIXME for this.
4636         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
4637         section. Also removed the FIXME for it.
4638         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
4639         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
4640         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
4642 2001-02-13  Richard Henderson  <rth@redhat.com>
4644         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
4645         and not user provided.
4647 2001-02-13  Kazu Hirata  <kazu@hxi.com>
4649         * vms.c (vms_print_symbol): Remove unreachable code.
4651         * rs6000-core.c: Fix formatting.
4653 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
4655         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
4656         as _bfd_XXi_only_swap_filehdr_out.
4657         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
4658         pe->force_minimum_alignment to TRUE.
4659         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
4660         PEI_TARGET_SUBSYSTEM.
4661         (pe_print_private_bfd_data): Call
4662         _bfd_XX_print_private_bfd_data_common() instead of
4663         _bfd_pe_print_private_bfd_data_common().
4664         (pe_bfd_copy_private_bfd_data): Call
4665         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
4666         _bfd_pe_bfd_copy_private_bfd_data_common().
4667         (coff_bfd_copy_private_section_data): Define as
4668         _bfd_XX_bfd_copy_private_section_data instead of
4669         _bfd_pe_bfd_copy_private_section_data.
4670         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
4671         of a _bfd_pe_get_symbol_info.
4673         * peigen.c: Delete.
4675         * peXXigen.c: Renamed from peigen.c.
4676         (COFF_WITH_XX): Define this macro (will get expanded into
4677         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
4678         compiled as peigen.c or pepigen.c.
4679         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
4680         define the canonical PEP structures and definitions.
4681         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
4682         effect, enforce minimum file and section alignments.  If
4683         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
4684         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
4685         so, by default, this is a no-op).
4687         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
4688         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
4689         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
4690         _bfd_pefoo if it's not defined.  Use these macros to define
4691         coff swap macros.
4693         * libcoff.h (pe_tdata): Add members target_subsystem and
4694         force_minimum_alignment.
4696         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
4697         COFF_WITH_pep.
4698         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
4700         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
4701         peigen.lo.
4703         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
4704         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
4705         PEPAOUTHDR.
4707         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
4708         (BFD64_BACKENDS_CFILES): Mention pepigen.c
4709         (peigen.c): Add rule to generate from peXXigen.c.
4710         (pepigen.c): Ditto.
4711         (pepigen.lo): List dependencies for pepigen.lo.
4713 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
4715         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
4716         $global$ referenced but not defined, set its value here.
4718 2001-02-09  Bo Thorsen  <bo@suse.de>
4720         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4721         alignment to 3.
4722         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4723         and relocation.
4724         (elf64_x86_64_relocate_section): Fix formatting.
4725         (elf64_x86_64_relocate_section): Fix addend for relocation of
4726         R_X86_64_(8|16|32|PC8|PC16|PC32).
4728 2001-02-12  Jan Hubicka  <jh@suse.cz>
4730         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4732 2001-02-11  H.J. Lu  <hjl@gnu.org>
4734         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4735         alignment.
4737 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4739         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4740         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
4741         relocations against dynsym symbols.
4743         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4744         the R_MIPS_26 relocation.
4745         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4746         the R_MIPS_26 relocation.
4747         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4748         relocation.
4749         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4750         the R_MIPS_26 relocation.
4751         (mips_elf64_howto_table_rela): Likewise.
4753         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4754         member to mark symbols that have non-CALL relocations against
4755         them.
4756         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4757         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4758         R_MIPS_GOT16.
4759         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4760         non-CALL relocation against it is encountered.
4761         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4762         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4763         no_fn_stub is not set.
4765         * elf32-mips.c (mips_elf_output_extsym): Get the output section
4766         information from the real symbol for indirect ones.
4767         Check no_fn_stub to find out if a symbol has a function stub
4768         indeed.
4770 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
4772         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4773         * Makefile.in: Regenerate.
4775 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
4777         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
4778         true if section name is an unwind table section name.
4779         (elfNN_ia64_additional_program_headers): Count each unwind section
4780         separately.
4781         (elfNN_ia64_modify_segment_map): Install one unwind program header
4782         for each unwind separate section.  Note: normally the linker
4783         script merges the unwind sections that go into a single segment,
4784         so this still generates at most one unwind program header per
4785         segment.
4787         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4788         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4789         (elfNN_ia64_fake_sections): Mark sections with names that start
4790         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4791         unwind section.
4793         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4794         Use it to make sh_info in unwind section point to the text section
4795         it applies to.
4797 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4799         * Makefile.am: Add linux target for S/390.
4800         * archures.c: Likewise.
4801         * bfd-in2.h: Likewise.
4802         * config.bfd: Likewise.
4803         * configure.in: Likewise.
4804         * elf.c: Likewise.
4805         * libbfd.h: Likewise.
4806         * targets.c: Likewise.
4807         * cpu-s390.c: New file.
4808         * elf32-s390.c: New file.
4809         * elf64-s390.c: New file.
4811 2001-02-09  Nick Clifton  <nickc@redhat.com>
4813         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4814         ImageBase.  This has already been done by coff_swap_hdr_in.
4816 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
4818         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4820 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
4822         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4823         (sparc64_elf_relocate_section): Likewise.
4825 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
4827         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4828         similar to R_SPARC_32.
4829         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4831 2001-02-08  H.J. Lu  <hjl@gnu.org>
4833         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4834         relocation entries for weak definitions when building DSO with
4835         -Bsymbolic.
4837 2001-02-08  Richard Henderson  <rth@redhat.com>
4839         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4840         before visibility.  Locally defined protected symbols are not
4841         dynamic.
4843 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
4845         * config.bfd: Enable coff64 for rs6000-*.  Patch from
4846         <hzoli@austin.ibm.com>.
4848 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
4850         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4851         found, do not attempt to find dwarf2 info before returning.
4853 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
4855         * elflink.h (is_global_symbol_definition): Rename to
4856         is_global_data_symbol_definition and have it reject function
4857         symbols.
4858         (elf_link_is_defined_archive_symbol): Use renamed function.
4860 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
4862         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4863         * libbfd.h (bfd_target_vector): Likewise.
4864         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4865         make static; create pointer reference named bfd_target_vector.
4866         (_bfd_target_vector_entries): Calculate this based on the array
4867         typed _bfd_target_vector.
4869 2001-02-06  H.J. Lu  <hjl@gnu.org>
4871         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4872         internal symbols are not dynamic.
4873         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4875 2001-02-06  Nick Clifton  <nickc@redhat.com>
4877         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4878         that it will not be pulled into the list of files that make up
4879         po/POTFILES.in.
4880         * Makefile.in: Regenerate.
4881         * po/bfd.pot:  Regenerate.
4883 2001-02-06  H.J. Lu  <hjl@gnu.org>
4885         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4886         checking.
4887         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4888         external_PEI_IMAGE_hdr.
4890 2001-02-06  Kazu Hirata  <kazu@hxi.com>
4892         * elf-m10200.c: Fix formatting.
4894 2001-02-04  Nick Clifton  <nickc@redhat.com>
4896         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4897         rel, it will be handled later on.
4899 2001-02-02  Fred Fish  <fnf@ninemoons.com>
4901         * Makefile.in: Fix typo.
4903 2001-02-01  Kazu Hirata  <kazu@hxi.com>
4905         * elf-m10300.c: Fix formatting.
4907 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
4909         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4910         (elf_backend_get_symbol_type): Define.
4911         (elf64_hppa_object_p): Set architecture and machine from elf
4912         header flags.
4914 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
4916         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4917         before mdebug.
4919 2001-01-26  Richard Henderson  <rth@redhat.com>
4921         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4922         for non-default visibility.
4923         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4924         delete ugly macro and replace with pretty function.
4926 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
4928         * coff-go32.c: Update copyright.
4929         * coff-stgo32.c: Likewise.
4930         * coff-go32.c (COFF_LONG_FILENAMES): Define.
4931         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4932         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4933         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4935 2001-01-25  Kazu Hirata  <kazu@hxi.com>
4937         * bfd-in2.h: Rebuild.
4938         * libbfd.h: Likewise.
4940 2001-01-23  H.J. Lu  <hjl@gnu.org>
4942         * bfd-in2.h: Rebuild.
4944 2001-01-23  H.J. Lu  <hjl@gnu.org>
4946         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4947         is NULL or PRIV(vms_rec) is outside of the buffer.
4949 2001-01-23  Kazu Hirata  <kazu@hxi.com>
4951         * coff64-rs6000.c: Fix formatting.
4952         * coff-arm.c: Likewise.
4953         * coffgen.c: Likewise.
4954         * cofflink.c: Likewise.
4955         * coff-mcore.c: Likewise.
4956         * coff-mips.c: Likewise.
4957         * coff-pmac.c: Likewise.
4958         * coff-ppc.c: Likewise.
4959         * coff-rs6000.c: Likewise.
4960         * elf32.c: Likewise.
4961         * elf32-fr30.c: Likewise.
4962         * elf32-i370.c: Likewise.
4963         * elf32-i860.c: Likewise.
4964         * elf32-m32r.c: Likewise.
4965         * elf32-m68k.c: Likewise.
4966         * elf32-mcore.c: Likewise.
4967         * elf32-ppc.c: Likewise.
4968         * elf32-sh.c: Likewise.
4969         * elf32-v850.c: Likewise.
4970         * elf64-alpha.c: Likewise.
4971         * elf64-sparc.c: Likewise.
4972         * elflink.c: Likewise.
4973         * elflink.h: Likewise.
4974         * elf-m10200.c: Likewise.
4975         * elf-m10300.c: Likewise.
4976         * elfxx-ia64.c: Likewise.
4978         * aoutx.h: Fix formatting.
4979         * bfd.c: Likewise.
4980         * bfd-in2.h: Likewise.
4981         * bfd-in.h: Likewise.
4982         * cpu-i386.c: Likewise.
4983         * cpu-m68hc11.c: Likewise.
4984         * dwarf2.c: Likewise.
4985         * elf64-x86-64.c: Likewise.
4986         * format.c: Likewise.
4987         * freebsd.h: Likewise.
4988         * hash.c: Likewise.
4989         * hp300hpux.c: Likewise.
4990         * hppabsd-core.c: Likewise.
4991         * hpux-core.c: Likewise.
4993 2001-01-22  Bo Thorsen  <bo@suse.de>
4995         * elf64-x86-64.c: Added PIC support for X86-64.
4996         (elf64_x86_64_link_hash_newfunc): Function added.
4997         (elf64_x86_64_link_hash_table_create): Likewise.
4998         (elf64_x86_64_check_relocs): Likewise.
4999         (elf64_x86_64_gc_mark_hook): Likewise.
5000         (elf64_x86_64_gc_sweep_hook): Likewise.
5001         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
5002         (elf64_x86_64_size_dynamic_sections): Likewise.
5003         (elf64_x86_64_discard_copies): Likewise.
5004         (elf64_x86_64_finish_dynamic_symbol): Likewise.
5005         (elf64_x86_64_finish_dynamic_sections): Likewise.
5006         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
5008 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5010         * Makefile.am (install-data-local): Make use of $(DESTDIR).
5011         * Makefile.in: Regenerate.
5013 2001-01-21  Kazu Hirata  <kazu@hxi.com>
5015         * coff-a29k.c: Fix formatting.
5017 2001-01-19  H.J. Lu  <hjl@gnu.org>
5019         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
5020         relocation section names.
5021         (elf_i386_relocate_section): Report files with bad relocation
5022         section names and return false.
5024 2001-01-17  Bo Thorsen  <bo@suse.de>
5026         * targets.c: Alphabetize list of xvecs.
5028 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
5030         * config.bfd: Add linux target variant for elfxx-hppa.
5031         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
5032         bfd_elf64_hppa_linux_vec.
5033         * configure: Regenerate.
5034         * elf64-hppa.c: Include elf64-target.h again to support linux
5035         target variant.
5036         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
5037         * elf32-hppa.c: Include elf32-target.h again to support linux
5038         target variant.
5039         (elf32_hppa_post_process_headers): New function.
5040         (elf_backend_post_process_headers): Define.
5041         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
5042         bfd_elf32_hppa_linux_vec.
5044         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
5045         and data_segment_base fields.
5046         (elf32_hppa_link_hash_table_create ): Init them.
5047         (elf32_hppa_check_relocs): Update comments.
5048         (hppa_record_segment_addr): New function.
5049         (elf32_hppa_relocate_section): Call it.
5050         (final_link_relocate): Handle R_PARISC_SEGREL32.
5051         (elf32_hppa_final_link): New function.
5052         (bfd_elf32_bfd_final_link): Define to call it.
5053         (hppa_unwind_entry_compare): New function.
5054         * cache.c (bfd_open_file): Create files in write+read mode.
5056         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
5057         SEGREL32 and numerous other relocs.  Change duplicate
5058         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
5060         * opncls.c (bfd_fdopenr): Add parens like the comment says around
5061         O_ACCMODE.
5063         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
5064         .plt entries for DT_INIT and DT_FINI.
5065         (elf32_hppa_finish_dynamic_sections): Remove special handling of
5066         DT_INIT and DT_FINI.
5068         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
5069         offsets for stub .plt access if wide mode.  Check offset in range.
5071 2001-01-13  Nick Clifton  <nickc@redhat.com>
5073         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
5074         line.
5076         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
5077         line.
5079 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
5081         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
5082         * configure: Regenerate.
5084 2001-01-11  Peter Targett  <peter.targett@arccores.com>
5086         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
5087         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
5088         * cpu-arc.c (arch_info_struct): Add entries for variants.
5089         (bfd_arc_arch) Set default to bfd_mach_arc_5.
5090         (arc_get_mach) Don't assume machine names prefixed arc- before
5091         testing.
5092         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
5093         selections.
5094         (arc_elf_final_write_processing) Likewise.
5095         (ELF_MACHINE_CODE) Use EM_ARC.
5097 2001-01-10  Nick Clifton  <nickc@redhat.com>
5099         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
5101 2001-01-07  Philip Blundell  <philb@gnu.org>
5103         * README: Replace `bug-gnu-utils@gnu.org' with
5104         `bug-binutils@gnu.org'.
5106 2001-01-04  Kazu Hirata  <kazu@hxi.com>
5108         * som.c: Fix formatting.
5110 2001-01-03  Kazu Hirata  <kazu@hxi.com>
5112         * ecoffswap.h: Fix formatting.
5113         * elf-bfd.h: Likewise.
5114         * elfarm-nabi.c: Likewise.
5115         * elfarm-oabi.c: Likewise.
5116         * elfcode.h: Likewise.
5117         * elfcore.h: Likewise.
5118         * elflink.c: Likewise.
5119         * elflink.h: Likewise.
5120         * elfxx-ia64.c: Likewise.
5121         * elfxx-target.h: Likewise.
5122         * libbfd.c: Likewise
5123         * linker.c: Likewise.
5124         * lynx-core.c: Likewise.
5126 2001-01-02  Kazu Hirata  <kazu@hxi.com>
5128         * pc532-mach.c: Fix formatting.
5129         * pe-arm.c: Likewise.
5130         * pe-i386.c: Likewise.
5131         * pe-mips.c: Likewise.
5132         * pe-ppc.c: Likewise.
5133         * pe-sh.c: Likewise.
5134         * pei-mips.c: Likewise.
5135         * pei-sh.c: Likewise.
5136         * peicode.h: Likewise.
5137         * ppcboot.c: Likewise.
5138         * ptrace-core.c: Likewise.
5140 2001-01-01  Kazu Hirata  <kazu@hxi.com>
5142         * reloc.c: Fix formatting.
5143         * riscix.c: Likewise.
5144         * rs6000-core.c: Likewise.
5145         * xcoff-target.h: Likewise.
5147 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5149         * elfcode.h (elf_object_p): Also restore the bfd mach field on
5150         error, by calling bfd_default_set_arch_mach with incoming
5151         values.
5153 2000-12-26  Kazu Hirata  <kazu@hxi.com>
5155         * vaxnetbsd.c: Fix formatting.
5156         * versados.c: Likewise.
5157         * vms-gsd.c: Likewise.
5158         * vms-hdr.c: Likewise.
5159         * vms-misc.c: Likewise.
5161 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
5163         * archive.c (coff_write_armap): Don't write more than symbol_count
5164         `archive_member_file_ptr's.
5166 2000-12-25  Kazu Hirata  <kazu@hxi.com>
5168         * vms-tir.c: Fix formatting.
5170 2000-12-23  Kazu Hirata  <kazu@hxi.com>
5172         * vms.c: Fix formatting.
5173         * vms.h: Likewise.
5175 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
5177         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
5179         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
5181         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
5182         arithmetic.
5184         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
5186         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
5188 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
5190         * libbfd.c (bfd_get_bits): Added
5191         (bfd_put_bits): Likewise
5192         * bfd-in.h: Declared the above.
5193         * bfd-in2.h: Regenerated.
5195 2000-12-20  Kazu Hirata  <kazu@hxi.com>
5197         * targets.c: Fix formatting.
5198         * tekhex.c: Likewise.
5199         * trad-core.c: Likewise.
5201 2000-12-19  Kazu Hirata  <kazu@hxi.com>
5203         * sco5-core.c: Fix formatting.
5204         * section.c: Likewise.
5205         * sparclinux.c: Likewise.
5206         * sparclynx.c: Likewise.
5207         * sparcnetbsd.c: Likewise.
5208         * srec.c: Likewise.
5209         * stabs.c: Likewise.
5210         * stab-syms.c: Likewise.
5211         * sunos.c: Likewise.
5212         * syms.c: Likewise.
5213         * sysdep.h: Likewise.
5215 2000-12-18  Nick Clifton  <nickc@redhat.com>
5217         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
5218         defined.
5219         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
5220         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
5222 2000-12-18  Nick Clifton  <nickc@redhat.com>
5224         * vms-misc.c (_bfd_vms_get_record): Add default case to
5225         file_format switch.
5227 2000-12-15  Miloslav Trmac <mitr@volny.cz>
5229         * elfcore.h (elf_core_file_p): Move to the start of the program
5230         headers before attempting to read them.
5232 2000-12-14  Kazu Hirata  <kazu@hxi.com>
5234         * peigen.c: Fix formatting.
5235         * som.c: Likewise.
5236         * som.h: Likewise.
5238 2000-12-13  Kazu Hirata  <kazu@hxi.com>
5240         * peigen.c: Fix formatting.
5242 2000-12-12  Jim Wilson  <wilson@redhat.com>
5244         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
5246 2000-12-08  Mark Salter  <msalter@redhat.com>
5248         * binary.c (binary_set_section_contents): Ignore sections
5249         with zero size.
5251 2000-12-12  Kazu Hirata  <kazu@hxi.com>
5253         * m68klinux.c: Fix formatting.
5254         * m68knetbsd.c: Likewise.
5255         * mipsbsd.c: Likewise.
5256         * netbsd-core.c: Likewise.
5257         * netbsd.h: Likewise.
5258         * newsos3.c: Likewise.
5259         * nlm32-alpha.c: Likewise.
5260         * nlm32-i386.c: Likewise.
5261         * nlm32-ppc.c: Likewise.
5262         * nlm32-sparc.c: Likewise.
5263         * nlmcode.h: Likewise.
5264         * nlmswap.h: Likewise.
5265         * nlm-target.h: Likewise.
5266         * ns32knetbsd.c: Likewise.
5268 2000-12-10  Fred Fish  <fnf@be.com>
5270         * elflink.h (elf_link_output_extsym): Don't complain about undefined
5271         symbols in shared objects if allow_shlib_undefined is true.
5273 2000-12-12  Nick Clifton  <nickc@redhat.com>
5275         * cpu-sh.c: Fix formattng.
5276         * elf.c: Fix formattng.
5277         * elf32-mips.c: Fix formattng.
5278         * elf32-sh.c: Fix formattng.
5279         * elf64-alpha.c: Fix formattng.
5281 2000-12-09  Nick Clifton  <nickc@redhat.com>
5283         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
5284         dwarf2_find_line_info as last parameter to invocation of
5285         _bfd_dwarf2_find_nearest_line.
5286         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
5287         dwarf2_find_line_info as last parameter to invocation of
5288         _bfd_dwarf2_find_nearest_line.
5290 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
5292         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
5293         (BFD_LIBS): ...to here.
5294         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
5295         (BFD_LIBS_CFILES): ...to here.
5296         * Makefile.in: Regenerate.
5297         * configure.in: Remove dwarf.lo from the elf shell variable.
5298         * configure: Regenerate.
5299         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
5300         * libcoff.h: Regenerate.
5301         * coffgen.c (coff_find_nearest_line): Call
5302         _bfd_dwarf2_find_nearest_line.
5303         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
5304         accordingly.
5305         (read_abbrevs): Likewise
5306         (decode_line_info): Likewise.
5307         (parse_comp_unit): Likewise.
5308         (comp_unit_find_nearest_line): Likewise.
5309         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
5310         * libbfd.h: Regenerate.
5311         * elf.c (_bfd_elf_find_nearest_line): Update call.
5312         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
5313         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
5314         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
5315         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
5316         (styp_to_sec_flags): Handle DWARF2 sections.
5317         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
5318         to _bfd_find_nearest_line.
5319         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
5320         call to _bfd_find_nearest_line.
5322 2000-12-08  Kazu Hirata  <kazu@hxi.com>
5324         * coffgen.c: Fix formatting.
5325         * elf-m10300.c: Likewise.
5326         * elf32-i386.c: Likewise.
5327         * elf32-i960.c: Likewise.
5328         * elf32-m68k.c: Likewise.
5329         * elf32-mcore.c: Likewise.
5330         * elf32-ppc.c: Likewise.
5331         * elf32-sh.c: Likewise.
5332         * elf32-sparc.c: Likewise.
5333         * elf32-v850.c: Likewise.
5334         * elf64-alpha.c: Likewise.
5335         * elf64-hppa.c: Likewise.
5336         * elf64-mips.c: Likewise.
5337         * elf64-sparc.c: Likewise.
5339 2000-12-07  Kazu Hirata  <kazu@hxi.com>
5341         * elf32-ppc.c: Fix formatting.
5342         * elf64-x86-64.c: Likewise.
5344 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
5346         From  Ralf Baechle  <ralf@gnu.org>
5348         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
5349         BFDs containing no sections or empty .text, .data or .bss sections
5350         to be merged, regardless of their flags.
5352 2000-12-06  Kazu Hirata  <kazu@hxi.com>
5354         * elf32-m32r.c: Fix formatting.
5355         * elf32-m68hc11.c: Likewise.
5356         * elf32-m68hc12.c: Likewise.
5357         * elf32-m68k.c: Likewise.
5358         * elf32-mcore.c: Likewise.
5359         * elf32-pj.c: Likewise.
5360         * elf32-ppc.c: Likewise.
5362 2000-12-05  Kazu Hirata  <kazu@hxi.com>
5364         * elf32-fr30.c: Fix formatting.
5365         * elf32-hppa.c: Likewise.
5366         * elf32-i370.c: Likewise.
5367         * elf32-i386.c: Likewise.
5368         * elf32-i860.c: Likewise.
5369         * elf32-i960.c: Likewise.
5371 2000-12-03  Kazu Hirata  <kazu@hxi.com>
5373         * elf32-arm.h: Fix formatting.
5374         * elf32-avr.c: Likewise.
5375         * elf32-cris.c: Likewise.
5376         * elf32-d10v.c: Likewise.
5377         * elf32-d30v.c: Likewise.
5378         * elf-hppa.h: Likewise.
5379         * elf-m10200.c: Likewise.
5380         * elf-m10300.c: Likewise.
5382 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
5384         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
5385         bfd_mach_mips32_4k.  Update FIXME comment.
5386         * archures.c (bfd_mach_mips32): New constant.
5387         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5388         the latter, renumber it.
5389         * bfd-in2.h (bfd_mach_mips32): New constant.
5390         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
5391         the latter, renumber it.
5392         * cpu-mips.c (I_mips32): New constant.
5393         (I_mips4K, I_mips32_4k): Rename the former to the latter.
5394         (arch_info_struct): Add bfd_mach_mips32 entry, replace
5395         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
5396         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
5397         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
5398         with E_MIPS_MACH_MIPS32_4K.
5399         (_bfd_mips_elf_final_write_processing): Replace
5400         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
5401         bfd_mach_mips32 case.
5402         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
5403         comparison with support for MIPS32.
5404         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
5405         MIPS32.
5407         * aoutx.h (NAME(aout,machine_type)): Add cases for
5408         bfd_mach_mips5 and bfd_mach_mips64.
5409         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
5410         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
5411         * cpu_mips.c (I_mips5, I_mips64): New definitions.
5412         (arch_info_struct): Add entries for bfd_mach_mips5 and
5413         bfd_mach_mips64.
5414         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
5415         _bfd_mips_elf_print_private_bfd_data): Add cases for
5416         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
5417         (_bfd_mips_elf_final_write_processing): Add cases for
5418         bfd_mach_mips5 and bfd_mach_mips64.
5420         * aoutx.h (NAME(aout,machine_type)): Add a
5421         bfd_mach_mips_sb1 case.
5422         * archures.c (bfd_mach_mips_sb1): New constant.
5423         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
5424         * cpu-mips.c (I_sb1): New constant.
5425         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
5426         * elf32-mips.c (elf_mips_mach): Add case for
5427         E_MIPS_MACH_SB1.
5428         (_bfd_mips_elf_final_write_processing): Add case for
5429         bfd_mach_mips_sb1.
5431 2000-12-01  Joel Sherrill <joel@OARcorp.com>
5433         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
5434         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
5435         (sparc*-*-rtems*): Switched from a.out to ELF.
5437 2000-11-30  Jan Hubicka  <jh@suse.cz>
5439         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
5440         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
5441         (elf64-x86-64.lo): Add dependencies.
5442         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
5443         bfd_mach_x86_64_intel_syntax.
5444         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
5445         * config.bfd (x86_64): Add.
5446         * configure.in: Add support for bfd_elf64_x86_64_vec.
5447         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
5448         (bfd_i386_arch, i8086_ar): Link in.
5449         * elf64-x86-64.c: New file.
5450         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
5451         * targets.c (bfd_elf64_x86_64_vec): Add.
5452         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
5454 2000-11-30  Kazu Hirata  <kazu@hxi.com>
5456         * xcofflink.c: Fix formatting.
5458 2000-11-28  Kazu Hirata  <kazu@hxi.com>
5460         * aoutx.h: Fix formatting.
5461         * bfd-in.h: Likewise.
5462         * bfd-in2.h: Likewise.
5463         * cache.c: Likewise.
5464         * cisco-core.c: Likewise.
5465         * coff64-rs6000.c: Likewise.
5466         * coffcode.h: Likewise.
5467         * coffswap.h: Likewise.
5468         * corefile.c: Likewise.
5469         * elf32-mips.c: Likewise.
5471 2000-11-27  Kazu Hirata  <kazu@hxi.com>
5473         * aout-adobe.c: Fix formatting.
5474         * coff64-rs6000.c: Likewise.
5475         * coffgen.c: Likewise.
5476         * cofflink.c: Likewise.
5478 2000-11-27  Philip Blundell  <pb@futuretv.com>
5480         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
5481         (obj_coff_strings_written): New accessor macro for above.
5482         * libcoff.h: Regenerate.
5483         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
5484         strings.
5485         * coffcode.h (coff_write_object_contents): No need to write out
5486         the string table if it's already been done.
5488 2000-11-22  Philip Blundell  <pb@futuretv.com>
5490         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
5491         weak undefined symbols.
5493 2000-11-24  Nick Clifton  <nickc@redhat.com>
5495         * archures.c (bfd_mach_arm_5TE): Define.
5496         (bfd_mach_arm+XScale): Define.
5497         * bfd-in2.h: Regenerate.
5499         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
5500         BFD_RELOC_ARM_PCREL_BLX.
5502         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
5503         XScale machine numbers.
5505         * config.bfd (xscale-elf): Add target.
5506         (xscale-coff): Add target.
5508         * cpu-arm.c: Add xscale machine name.
5509         Add v5t, v5te and XScale machine numbers.
5511 2000-11-23  Kazu Hirata  <kazu@hxi.com>
5513         * aix386-core.c: Fix formatting.
5515 2000-11-22  Jim Wilson  <wilson@redhat.com>
5517         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
5518         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
5519         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
5520         (ins_imms_scaled): Initialize sign_bit at function entry.
5521         (elf64_ia64_operands): Add missing initializers.
5522         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
5523         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
5524         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
5525         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
5526         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
5527         parameters.
5528         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
5529         and free_extsyms at function entry.
5530         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
5531         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
5532         (get_got): Delete unused local srel.
5533         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
5534         (elfNN_ia64_relocate_section): Delete unused local dynindx.
5536 2000-11-21  Kazu Hirata  <kazu@hxi.com>
5538         * coff-a29k.c: Fix formatting.
5539         * coff-h8500.c: Likewise.
5540         * coff-i960.c: Likewise.
5541         * coff-ppc.c: Likewise.
5542         * coff-rs6000.c: Likewise.
5543         * coff-stgo32.c: Likewise.
5544         * coff-tic54x.c: Likewise.
5545         * coff-w65.c: Likewise.
5546         * cpu-h8500.c: Likewise.
5547         * cpu-hppa.c: Likewise.
5548         * cpu-ns32k.c: Likewise.
5549         * ecoff.c: Likewise.
5550         * ecofflink.c: Likewise.
5552 2000-11-21  Nick Clifton  <nickc@redhat.com>
5554         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
5555         remove possibility of infinite loop.
5557 2000-11-20  Kazu Hirata  <kazu@hxi.com>
5559         * aix386-core.c: Fix formatting.
5560         * aout-adobe.c: Likewise.
5561         * aout-arm.c: Likewise.
5562         * aout-encap.c: Likewise.
5563         * aout-ns32k.c: Likewise.
5564         * aout-target.h: Likewise.
5565         * aout-tic30.c: Likewise.
5566         * aoutf1.h: Likewise.
5567         * aoutx.h: Likewise.
5568         * archive.c: Likewise.
5569         * bfd-in.h: Likewise.
5570         * bfd-in2.h: Likewise.
5571         * bfd.c: Likewise.
5572         * bout.c: Likewise.
5574 2000-11-17  H.J. Lu  <hjl@gnu.org>
5576         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
5577         pltoff entries for DT_INIT and DT_FINI.
5578         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
5579         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
5580         entries.
5582 2000-11-16  Richard Henderson  <rth@redhat.com>
5584         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
5585         (allocate_dynrel_entries): Likewise.
5586         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
5587         (set_pltoff_entry): Likewise.
5588         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
5589         (elfNN_ia64_reloc_type_lookup): Likewise.
5590         (elfNN_ia64_install_value): Likewise.
5591         (elfNN_ia64_relocate_section): Likewise.
5592         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
5593         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
5595 2000-11-16  Kazu Hirata  <kazu@hxi.com>
5597         * cpu-a29k.c: Fix formatting.
5598         * cpu-alpha.c: Likewise.
5599         * cpu-arm.c: Likewise.
5600         * cpu-avr.c: Likewise.
5601         * cpu-d10v.c: Likewise.
5602         * cpu-h8500.c: Likewise.
5603         * cpu-hppa.c: Likewise.
5604         * cpu-i370.c: Likewise.
5605         * cpu-i386.c: Likewise.
5606         * cpu-i960.c: Likewise.
5607         * cpu-ia64-opc.c: Likewise.
5608         * cpu-ia64.c: Likewise.
5609         * cpu-m32r.c: Likewise.
5610         * cpu-m68hc11.c: Likewise.
5611         * cpu-m68hc12.c: Likewise.
5612         * cpu-m68k.c: Likewise.
5613         * cpu-m88k.c: Likewise.
5614         * cpu-mips.c: Likewise.
5615         * cpu-ns32k.c: Likewise.
5616         * cpu-pj.c: Likewise.
5617         * cpu-powerpc.c: Likewise.
5618         * cpu-sh.c: Likewise.
5619         * cpu-sparc.c: Likewise.
5620         * cpu-tic54x.c: Likewise.
5621         * cpu-v850.c: Likewise.
5622         * cpu-vax.c: Likewise.
5623         * cpu-w65.c: Likewise.
5624         * cpu-we32k.c: Likewise.
5625         * cpu-z8k.c: Likewise.
5626         * dwarf1.c: Likewise.
5627         * dwarf2.c: Likewise.
5629 2000-11-15  Kazu Hirata  <kazu@hxi.com>
5631         * coff-arm.c: Fix formatting.
5632         * coff-ppc.c: Likewise.
5633         * coff-rs6000.c: Likewise.
5634         * coff-sh.c: Likewise.
5635         * coff-sparc.c: Likewise.
5636         * coff-tic30.c: Likewise.
5637         * coff-tic54x.c: Likewise.
5638         * coff-tic80.c: Likewise.
5639         * coff-w65.c: Likewise.
5640         * coff-we32k.c: Likewise.
5641         * coff-z8k.c: Likewise.
5643 2000-11-15  Richard Henderson  <rth@redhat.com>
5645         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
5646         section with the same ALLOC|LOAD flags as the source section.
5648 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
5650         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
5651         by STO_ALPHA constants.
5653 2000-11-14  Kazu Hirata  <kazu@hxi.com>
5655         * coff-pmac.c: Fix formatting.
5656         * coff-ppc.c: Likewise.
5658 2000-11-13  H.J. Lu  <hjl@gnu.org>
5660         * elflink.h (elf_link_add_object_symbols): Also add indirect
5661         symbols for common symbols with the default version.
5663 2000-11-09  Philip Blundell  <pb@futuretv.com>
5665         * section.c (STD_SECTION): Set gc_mark flag.
5667 2000-11-11  Kazu Hirata  <kazu@hxi.com>
5669         * coff-i960.c: Likewise.
5670         * coff-m68k.c: Likewise.
5671         * coff-m88k.c: Likewise.
5672         * coff-mcore.c: Likewise.
5673         * coff-mips.c: Likewise.
5675 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
5677         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
5679 2000-11-10  Kazu Hirata  <kazu@hxi.com>
5681         * coff-h8300.c: Fix formatting.
5682         * coff-h8500.c: Likewise.
5683         * coff-i386.c: Likewise.
5684         * coff-i860.c: Likewise.
5685         * coff-i960.c: Likewise.
5686         * coff-ia64.c: Likewise.
5688 2000-11-09  Kazu Hirata  <kazu@hxi.com>
5690         * archive.c: Fix formatting.
5691         * archures.c: Likewise.
5693 2000-11-07  Richard Henderson  <rth@redhat.com>
5695         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
5696         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
5697         * section.c (bfd_set_section_contents): Call memcpy if
5698         section->contents set and location not equal to contents plus offset.
5700 2000-11-08  Kazu Hirata  <kazu@hxi.com>
5702         * bfd-in.h: Fix formatting.
5703         * bfd-in2.h: Likewise.
5704         * bfd.c: Likewise.
5705         * binary.c: Likewise.
5706         * bout.c: Likewise.
5707         * coff-a29k.c: Likewise.
5708         * coff-alpha.c: Likewise.
5709         * coff-apollo.c: Likewise.
5710         * coff-aux.c: Likewise.
5712 2000-11-07  Kazu Hirata  <kazu@hxi.com>
5714         * aix386-core.c: Fix formatting.
5715         * aoutf1.h: Likewise.
5716         * aoutx.h: Likewise.
5717         * archures.c: Likewise.
5718         * armnetbsd.c: Likewise.
5720 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
5722         * coff-h8300.c (special): Adjust reloc address.
5724 2000-11-06  Steve Ellcey <sje@cup.hp.com>
5726         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5727         to differentiate elf32 and elf64 on ia64.
5728         * bfd-in2.h: Regenerate.
5729         * config.bfd: Add target for "ia64*-*-hpux*".
5730         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5731         * configure: Regenerate.
5732         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5733         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5735         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5736         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
5737         * Makefile.in: Regnerate.
5738         * elf64-ia64.c: Deleted.
5739         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5741 2000-11-06  Kazu Hirata  <kazu@hxi.com>
5743         * aout-adobe.c: Fix formatting.
5744         * aout-arm.c: Likewise.
5745         * aout-cris.c: Likewise.
5746         * aout-encap.c: Likewise.
5747         * aout-ns32k.c: Likewise.
5748         * aout-target.h: Likewise.
5749         * aout-tic30.c: Likewise.
5751 2000-11-05  Philip Blundell  <philb@gnu.org>
5753         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5754         BFDs containing no sections to be merged, regardless of their flags.
5756 2000-11-04  Philip Blundell  <philb@gnu.org>
5758         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5759         if a relocation for an undefined symbol also results in an
5760         overflow.
5762 2000-11-06  Christopher Faylor <cgf@cygnus.com>
5764         * config.bfd: Add support for Sun Chorus.
5766 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
5768         * configure.in: Recognize alpha-*-freebsd*.
5769         * configure: Regenerate.
5771 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
5773         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5774         (Chunk): New global variable set by a parameter in objcopy.c.
5775         (S3Forced): New global variable set by a parameter in
5776         objcopy.c.
5777         (srec_set_section_contents): If S3Forced is true, always generate
5778         S3 records.
5779         (srec_write_section): Use 'Chunk' to limit maximum length of S
5780         records.
5782 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
5784         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5785         * Makefile.in: Regenerate.
5786         * bfd-in2.h: Regenerate.
5787         * po/bfd.pot: Regenerate.
5789 2000-10-31  Philip Blundell  <philb@gnu.org>
5791         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5792         EF_SOFT_FLOAT if it is defined.
5794 2000-10-27  Philip Blundell  <philb@gnu.org>
5796         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5797         attempts to mix PIC code with non-PIC, just mark the output as
5798         being position dependent.
5799         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
5800         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
5801         all mismatches, not just the first one.
5803 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
5805         * ieee.c (ieee_archive_p): Plug one of many possible
5806         memory leaks in error handling.
5808 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
5810         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5811         elf32_sparc_object_p, elf32_sparc_final_write_processing):
5812         Support v8plusb.
5813         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5814         sparc64_elf_object_p): Support v9b.
5815         * archures.c: Declare v8plusb and v9b machines.
5816         * bfd-in2.h: Ditto.
5817         * cpu-sparc.c: Ditto.
5819 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
5821         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5822         of a GOT reloc.
5824         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5825         (SYMBOL_CALLS_LOCAL): New macro.
5826         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5827         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5828         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5829         (ppc_elf_relocate_section): Use flag variable to determine
5830         whether the relocation refers to a local symbol.
5831         Test whether a PLTREL24 reloc will produce a reloc by looking
5832         to see whether a PLT entry was made.
5834 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
5836         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5837         entries that could serve as a definition for a weak symbol.
5839 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
5841         From  Ralf Baechle  <ralf@gnu.org>
5843         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5844         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
5845         against local symbols.
5846         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5848 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
5850         * section.c (struct sec): Add kept_section.
5851         (struct bfd_comdat_info): Remove sec, we can use above.
5852         (STD_SECTION): Add initializer.
5853         (bfd_make_section_anyway): Init here too.
5855         * bfd-in2.h: Regenerate.
5857         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5858         zeroing of `flags'.
5859         (elf_link_input_bfd): Set all asection->symbol->value's here, and
5860         fudge values for discarded link-once section symbols.
5862         * elf64-hppa.c: Include alloca-conf.h
5864 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
5866         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5868         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5870 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
5872         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5874 2000-10-10  Tom Rix <trix@redhat.com>
5876         * section.c (bfd_make_section_anyway): Release newsect ptr when
5877         newsect->symbol fails to alloc.  Use bfd_release instead of free.
5879 2000-10-09  Richard Henderson  <rth@cygnus.com
5881         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5882         (elf64_ia64_unwind_entry_compare): New.
5883         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5885 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
5887         * elflink.h (size_dynamic_sections): Don't create various tags if
5888         .dynstr is excluded from the link.  Don't set first dynsym entry
5889         if dynsymcount is zero.
5890         (elf_bfd_final_link): Don't try to swap out dynamic syms if
5891         .dynsym excluded from the link.  Don't try to write any dynamic
5892         sections excluded from the link.
5894         * elf.c (swap_out_syms): Handle global section symbols.
5896 2000-10-05  DJ Delorie  <dj@redhat.com>
5898         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5899         * coffcode.h (coff_set_alignment_hook): read extended reloc count
5900         (coff_write_relocs): write extended reloc count
5901         (coff_write_object_contents): account for extended relocs
5903 2000-10-05  Jim Wilson  <wilson@cygnus.com>
5905         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5906         field.
5907         * elf.c (_bfd_elf_make_section_from_shdr): Call the
5908         elf_backend_section_flags function.
5909         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5910         code.
5911         (elf64_ia64_section_flags): New function containing flag conversion
5912         code.
5913         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5914         * elfxx-target.h (elf_backend_section_flags): Define.
5915         (elfNN_bed): Initialize elf_backend_section_flags field.
5917 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
5919         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5920         _bfd_elf32_gc_record_vtable.  Correct a comment.
5922 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
5924         From  Ralf Baechle  <ralf@gnu.org>
5926         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5927         produces binaries with got[1] = 0x80000001 to differenciate them
5928         for the dynamic linker from the broken binaries produced by old
5929         versions.
5931 2000-09-30  Petr Sorfa <petrs@sco.com>
5933         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5934         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5935         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5936         * configure: Regenerate.
5938 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
5940         Define two bfd_targets for absence and presence of leading
5941         underscore on symbols.  Make sure to only link same kind.
5942         * elf32-cris.c (cris_elf_object_p,
5943         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5944         cris_elf_merge_private_bfd_data): New.
5945         (elf_backend_object_p, elf_backend_final_write_processing,
5946         bfd_elf32_bfd_print_private_bfd_data,
5947         bfd_elf32_bfd_merge_private_bfd_data): Define.
5948         <Target vector definition>: Include elf32-target.h twice with
5949         different macro settings:
5950         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5951         bfd_elf32_us_cris_vec.
5952         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5953         (elf_symbol_leading_char): First as 0, then '_'.
5954         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5955         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5956         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5957         * configure: Regenerate.
5958         * targets.c: Declare bfd_elf32_us_cris_vec.
5959         * po/bfd.pot: Regenerate.
5961 2000-09-29  Momchil Velikov  <velco@fadata.bg>
5963         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5964         R_ARM_THM_PC22 relocations.
5966 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
5968         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5970 2000-09-29  Momchil Velikov <velco@fadata.bg>
5972         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5973         is has the SEC_HAS_CONTENTS flag set.
5975 2000-09-28  ï¿½Ã–rjan Friberg  <orjanf@axis.com>
5976             Hans-Peter Nilsson  <hp@axis.com>
5978         * aout-cris.c (N_TXTADDR): Define.
5980 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
5982         * som.c: Include alloca-conf.h.
5983         * Makefile.am: "make dep-am"
5984         * Makefile.in: Regenerate.
5986 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
5988         * elf32-hppa.c (plt_stub): New.
5989         (PLT_STUB_ENTRY): Define.
5990         (elf32_hppa_link_hash_table): Change multi_subspace to packed
5991         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5992         (elf32_hppa_link_hash_table_create): Init to suit.
5993         (elf32_hppa_check_relocs): Set has_12bit_branch and
5994         has_17bit_branch as appropriate.
5995         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5996         non-local functions.
5997         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5998         Add space for plt_stub as needed.
5999         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
6000         functions at plt_stub.
6001         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
6002         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
6004         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
6005         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
6006         of fixed size, and if negative, disable handling of input sections
6007         before stub section.  Set up default stub group size depending
6008         on detected branch relocs.
6009         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
6010         ensure different offsets from sym_value aren't rounded to
6011         different 2k blocks.  Use lrsel and rrsel for other stubs too for
6012         consistency rather than necessity.
6013         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
6014         (final_link_relocate): Likewise.
6015         (elf32_hppa_relocate_section): Likewise.
6017         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
6018         (_bfd_elf_hppa_gen_reloc_type): Generate them.
6019         (elf_hppa_final_link_relocate): Handle them.
6020         (elf_hppa_relocate_insn): Likewise.
6021         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
6023 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
6025         * elfcode.h (elf_object_p): Preserve and clear abfd section
6026         information.  Restore at error.
6028 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
6030         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
6031         is empty, make sure that its rva also 0. NT loader dislikes
6032         having otherwise.
6034 2000-09-26  Steve Ellcey <sje@cup.hp.com>
6036         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
6037         global by default.
6039 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
6041         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
6042         currently unused RELATIVE_DYNAMIC_RELOCS code.
6043         (hppa_discard_copies): Likewise.
6044         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
6045         comments.  Don't check non-code output sections for stub grouping.
6047 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
6049         * section.c (bfd_get_unique_section_name): Return NULL if
6050         bfd_malloc fails.
6052 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6054         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
6055         instruction sequence to actually work.
6056         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
6057         accordingly.
6059 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
6061         * elf32-sh.c (sh_elf_relocate_section): Use
6062         _bfd_final_link_relocate to apply the relocation against a section
6063         symbol, when doing relocatable links.
6065 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
6067         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
6068         to id_sec.
6069         (stub_hash_newfunc): Here too.
6070         (hppa_add_stub): And here.
6071         (elf32_hppa_link_hash_table): Remove stub_section_created,
6072         reloc_section_created, first_init_sec and first_fini_sec.  Add
6073         stub_group.
6074         (elf32_hppa_link_hash_table_create): Init to suit.
6075         (hppa_get_stub_entry): Add support for grouping stub sections.
6076         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
6077         section code.  Index stub vars by section->id.
6078         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
6079         exit paths.  Zap allocation of above removed vars.  Refine
6080         link-once test.
6082         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
6083         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6084         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
6085         rather than pointer to bfd_link_info.
6086         (hppa_add_stub): Likewise.
6087         (final_link_relocate): Likewise.
6089 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
6091         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
6092         link-once sections.
6094 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
6096         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
6097         ld/emulparams/shelf.sh.
6099 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6101         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
6102         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
6103         * bfd-in2.h: Regenerate.
6105 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
6107         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
6108         LITUSE relocations incorrectly if -relax is specified on the ld
6109         command line and the displacement field of the load or store
6110         instruction is non-zero. (Patch by paul.winalski@compaq.com)
6112 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
6114         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
6115         first_fini_sec here.
6116         (elf32_hppa_size_stubs): Instead correctly find the first .init
6117         and .fini section here.
6119 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
6121         * elf32-hppa.c (clobber_millicode_symbols): New function.
6122         (elf32_hppa_size_dynamic_sections): Call it.
6124 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
6126         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
6127         packed.  Add plabel, plt_abs packed booleans.
6128         (hppa_link_hash_newfunc): Init new fields.
6129         (PLABEL_PLT_ENTRY_SIZE): Define.
6130         (hppa_stub_name): Use size_t len vars.
6131         (hppa_add_stub): Likewise.
6132         (elf32_hppa_build_stubs): Likewise.
6133         (hppa_build_one_stub): Kill some compiler warnings.
6134         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
6135         if dynamic linking.  Munge the local plt offsets into
6136         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
6137         size_t len vars.  Add assert for plabel addend.
6138         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
6139         (elf32_hppa_hide_symbol): New function.
6140         (elf_backend_hide_symbol): Define.
6141         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
6142         with h->plabel set.  Don't make plt entries to have dynamic syms
6143         when they have been forced local.  If plt entry is used by a
6144         plabel, make it PLABEL_PLT_ENTRY_SIZE.
6145         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
6146         Set up .plt offsets for local syms.
6147         (elf32_hppa_relocate_section): Initialise plt entries for local
6148         syms.  Leave weak undefined plabels zero.  Make global plabel
6149         relocs against function symbol, and leave the addend zero.
6150         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
6151         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
6152         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
6153         relocs instead of SEGREL32 for dynamic got relocs.
6154         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
6155         (elf_backend_got_header_size): Adjust.
6156         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
6158         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
6159         (hppa_type_of_stub): Use it instead of #if 0
6160         (hppa_discard_copies): Use it here too.
6161         (elf32_hppa_size_dynamic_sections): And here.
6163         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
6164         (elf32_hppa_link_hash_table_create): And here.
6165         (hppa_build_one_stub): And here.  Instead keep track of stub
6166         offset using _raw_size.
6167         (elf32_hppa_size_stubs): Likewise.
6168         (elf32_hppa_build_stubs): Likewise.
6169         (hppa_size_one_stub): Likewise.  Resize reloc section too.
6171         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
6172         first_fini_sec handling.  Don't search for reloc section or set
6173         hplink->reloc_section_created here.
6174         (elf32_hppa_size_stubs): Instead search for reloc sections, and
6175         set reloc_section_created here.
6176         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
6177         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
6178         and DT_FINI.
6179         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
6181         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
6182         with `hplink->root.'.
6183         (elf32_hppa_check_relocs): Likewise.
6184         (elf32_hppa_gc_sweep_hook): Likewise.
6185         (elf32_hppa_adjust_dynamic_symbol): Likewise.
6186         (hppa_handle_PIC_calls): Likewise.
6187         (elf32_hppa_size_dynamic_sections): Likewise.
6188         (elf32_hppa_set_gp): Likewise.
6189         (elf32_hppa_relocate_section): Likewise.
6190         (elf32_hppa_finish_dynamic_symbol): Likewise.
6191         (elf32_hppa_finish_dynamic_sections): Likewise.
6193         From  David Huggins-Daines  <dhd@linuxcare.com>
6194         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
6195         defined weak symbols in shared links.
6196         (final_link_relocate): Calls to defined weak symbols in shared
6197         objects must go via import stubs, as the target might not be known
6198         at link time.
6200 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
6202         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
6203         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
6204         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
6205         the original entries with EMPTY_HOWTOs, and added new ones to fill
6206         in the gap.
6207         (sh_elf_info_to_howto): Make sure the new gap isn't used.
6208         (sh_elf_relocate_section): Likewise.
6210 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
6212         * cpu-mips.c (arch_info_struct): Add mips:4K
6213         * bfd-in2.h (bfd_mach_mips4K): New define.
6214         * archures.c: Add bfd_mach_mips4K to comment.
6215         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
6216         E_MIPS_ARCH_2 for bfd_mach_mips4K.
6218 2000-09-13  Marco Franzen <marcof@thyron.com>
6220         * som.c (som_write_symbol_strings): Do not used fixed buffers,
6221         use size_t as a counter.
6222         (som_write_space_strings): Similarly.
6224 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
6226         * elf32-i860.c (elf32_i860_relocate_pc26): New function
6227         and prototype.
6228         (elf32_i860_relocate_section): Invoke new function from here.
6230 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6232         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
6233         static.
6235 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6237         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
6238         target section name instead of dumping core when the target symbol is
6239         undefined.
6241 2000-09-09  Kazu Hirata  <kazu@hxi.com>
6243         * riscix.c: Remove DEFUN.
6245 2000-09-08  Nick Clifton  <nickc@redhat.com>
6247         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
6248         initialise flags in output bfd if the input bfd is the default
6249         architecture with the default flags.
6251 2000-09-08  Kazu Hirata  <kazu@hxi.com>
6253         * archive.c: Fix formatting.
6254         * coff-arm.c: Likewise.
6255         * doc/chew.c: Likewise.
6257 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
6259         * section.c (bfd_get_unique_section_name): Put a dot before the
6260         numeric suffix.
6262 2000-09-07  Kazu Hirata  <kazu@hxi.com>
6264         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
6265         * elf.c: Fix formatting.
6267 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
6269         * config.bfd (sh-*-linux*): Added.
6270         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
6271         * targets.c: Declare them.
6272         * elf32-sh-lin.c: New file.
6273         * Makefile.am: Compile it.
6274         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
6275         * configure, Makefile.in: Rebuilt.
6277 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
6279         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
6280         pseduo-section when determining where the TOC ends.
6282         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
6283         output x_tvndx as it is only two bytes wide.
6285         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
6286         reloc is 26 or 32 bits wide.
6288         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
6289         for relocs that don't change anything.  Also look at the full
6290         6 bits of bitsize.
6292 2000-09-06  Philip Blundell  <philb@gnu.org>
6294         * config.bfd (arm*-*-uclinux*): New target.
6296 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
6298         * configure: Rebuilt with new libtool.m4.
6300 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
6302         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
6303         word for variable name.
6304         * bfd-in2.h: Regenerate.
6306 2000-09-05  Nick Clifton  <nickc@redhat.com>
6308         * config.in: Regenerate.
6309         * libbfd.h: Regenerate.
6310         * po/bfd.pot: Regenerate.
6311         * doc/bfdint.texi: Remove CVS date string - it foils compares with
6312         local versions.
6314 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
6316         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
6318 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
6320         Shared library and PIC support.
6321         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
6322         (GOT_ENTRY_SIZE): New.
6323         (ELF_DYNAMIC_INTERPRETER): New.
6324         (STUB_SUFFIX): Define.
6325         (LONG_BRANCH_PIC_IN_SHLIB): Define.
6326         (RELATIVE_DYNAMIC_RELOCS): Define.
6327         (enum elf32_hppa_stub_type): New.
6328         (struct elf32_hppa_stub_hash_entry): Rename offset to
6329         stub_offset.  Add a number of new fields.
6330         (struct elf32_hppa_link_hash_entry): New.
6331         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
6332         global_value.
6333         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
6334         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
6335         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
6336         new fields.
6337         (hppa_link_hash_newfunc): New function.
6338         (elf32_hppa_link_hash_table_create): Use above function. Init new
6339         fields.
6340         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
6341         instead of addend, and remove sym_name from args.  Don't use
6342         symbol name for local syms, instead use sym index.
6343         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
6344         stub type rather than size.  Pass in hash and handle import stub
6345         case.  Also pass in reloc instead of offset so we can calculate
6346         PCREL22F and PCREL12F branches properly.
6347         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
6348         import and export stubs too.
6349         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
6350         import and export stub sizing.
6351         (elf32_hppa_check_relocs): New function.
6352         (elf32_hppa_adjust_dynamic_symbol): New function.
6353         (hppa_discard_copies): New function.
6354         (elf32_hppa_size_dynamic_sections): New function.
6355         (elf_backend_size_dynamic_sections): Define.
6356         (elf32_hppa_finish_dynamic_symbol): New function.
6357         (elf_backend_finish_dynamic_symbol): Define.
6358         (elf32_hppa_size_stubs): Stash params in link hash table, and move
6359         some local vars into the link hash table too.  For shared links,
6360         trundle over function syms, generating export stubs.  Handle
6361         PCREL22F branches.  Break out stub creation code from here..
6362         (hppa_add_stub): .. to here.  New function.
6363         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
6364         call the bfd linker.  Use elf_gp to record global pointer.
6365         Calculate a value from sections if $global$ is missing.
6366         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
6367         (elf32_hppa_gc_mark_hook): New function.
6368         (elf_backend_gc_mark_hook): Define.
6369         (elf32_hppa_gc_sweep_hook): New function.
6370         (elf_backend_gc_sweep_hook): Define.
6371         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
6372         Add rel to args, and remove howto, input_bfd, offset, addend,
6373         sym_name as we can recalculate these locally.  Handle calls to
6374         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
6375         handling of undefined weak syms.  Check that stubs are in range.
6376         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
6377         message on hitting a DPREL21L reloc that needs fixing.  Subtract
6378         off PC for PCREL14F.  Break out code that does a stub lookup from
6379         here..
6380         (hppa_get_stub_entry): ..to here.  New function.
6381         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
6382         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
6383         relocs, etc. etc.
6384         (elf32_hppa_finish_dynamic_sections): New function.
6385         (elf_backend_finish_dynamic_sections): Define.
6386         (elf_backend_final_write_processing) Define.
6387         (hppa_handle_PIC_calls): New function.
6388         (elf32_hppa_build_stubs): Call it.  Pass link_info to
6389         hppa_build_one_stub.
6390         (elf32_hppa_create_dynamic_sections): New function
6391         to create .plt and .got then set .plt flags correctly.
6392         (elf_backend_create_dynamic_sections): Define.
6393         (elf32_hppa_object_p): New function.
6394         (elf_backend_object_p): Define.
6395         (elf32_hppa_elf_get_symbol_type): New function.
6396         (elf_backend_get_symbol_type): Define.
6397         (elf_backend_can_gc_sections): Define.
6398         (elf_backend_want_got_plt): Define.
6399         (elf_backend_plt_alignment): Set to 2.
6400         (elf_backend_plt_readonly): Define.
6401         (elf_backend_want_plt_sym): Define.
6402         (elf_backend_got_header_size): Reserve one entry.
6404         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
6405         (elf32_hppa_size_stubs): Pass in multi_subspace.
6406         (elf32_hppa_set_gp): Declare.
6408         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
6409         (bfd_get_unique_section_name): New function.
6410         * bfd-in2.h: Regenerate.
6412         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
6413         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
6414         comment.
6416         From  David Huggins-Daines  <dhd@linuxcare.com>
6417         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
6418         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
6419         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
6420         been updated in finish_dynamic_symbol before modifying function
6421         symbol.
6423         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
6424         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
6425         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
6426         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
6427         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
6428         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
6429         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
6430         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
6432         From David Huggins-Daines  <dhd@linuxcare.com>
6433         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
6434         style of local labels as well.
6436 2000-09-03  Philip Blundell  <philb@gnu.org>
6438         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
6439         references to undefined symbols in debugging sections.
6441 2000-09-02  H.J. Lu  <hjl@gnu.org>
6443         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6444         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
6445         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
6446         section.
6448 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
6450         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
6451         (elf32_i860_is_local_label_name): New function and prototype.
6453 2000-09-02  Nick Clifton  <nickc@redhat.com>
6455         * configure.in: Increase version number to 2.10.91.
6456         * configure: Regenerate.
6457         * aclocal.m4: Regenerate.
6458         * config.in: Regenerate.
6459         * po/bfd.pot: Regenerate.
6461 2000-09-02  Daniel Berlin <dberlin@redhat.com>
6463         * elf.c (_bfd_elf_make_section_from_shdr): Add
6464         .gnu.linkobce.wi. to the list of debug section names.
6466 2000-09-02  Nick Clifton  <nickc@redhat.com>
6468         * dwarf2.c (find_debug_info): New function: Locate a section
6469         containing dwarf2 debug information.
6470         (bfd_dwarf2_find_nearest_line): Find all sections containing
6471         debug information and include them in the stash.
6473 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
6475         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
6476         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
6477         (sh_reloc_map): Add new relocs.
6478         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
6479         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
6480         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
6481         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
6482         functions.
6483         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
6484         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6485         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
6486         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6487         New array constants.
6488         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
6489         New variables.
6490         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6491         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
6492         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
6493         elf_sh_plt_reloc_offset): Define.
6494         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
6495         elf_sh_link_hash_table): New structs.
6496         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
6497         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
6498         relocation types.
6499         (elf_backend_create_dynamic_sections,
6500         bfd_elf32_bfd_link_hash_table_create,
6501         elf_backend_adjust_dynamic_symbol,
6502         elf_backend_size_dynamic_sections,
6503         elf_backend_finish_dynamic_symbol,
6504         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6505         elf_backend_plt_readonly, elf_backend_want_plt_sym,
6506         elf_backend_got_header_size, elf_backend_plt_header_size):
6507         Define.
6508         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
6509         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
6510         New relocs.
6511         * bfd-in2.h, libbfd.h: Rebuilt.
6513 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
6515         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
6516         change.
6518 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
6520         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
6521         not initialized, set them to indicate the SH1 instruction set.
6523 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
6525         * acinclude.m4: Include libtool and gettext macros from the
6526         top level.
6527         * aclocal.m4, configure: Rebuilt.
6529 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
6531         * elf.c: Eliminate references to __sparcv9 macro; replace with
6532         autoconf variables HAVE_PSINFO32_T etc.
6533         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
6534         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
6535         * config.in: Ditto.
6536         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
6537         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
6538         * aclocal.m4: Ditto.
6539         * configure: Regenerate.
6541 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
6543         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
6544         for any shared link, not just shared -Bsymbolic.
6545         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
6546         any shared link, and pass link info to it.
6547         (elf_i386_size_dynamic_sections): Update comment.
6548         (elf_i386_discard_copies): Modify to discard relocs for symbols
6549         that have been forced local.
6550         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
6551         that have been forced local.
6553 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
6555         * elflink.h (elf_link_add_object_symbols): Allow common
6556         symbols to have an alignment of 1 if explicitly requested, and
6557         not overridden by other definitions.
6559 2000-08-22  Doug Kwan <dkwan@transmeta.com>
6561         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
6562         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
6564 2000-08-22  H.J. Lu  <hjl@gnu.org>
6566         * elf-bfd.h (elf_link_hash_table): Add runpath.
6568         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
6569         * bfd-in2.h: Rebuilt.
6571         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
6572         "runpath" field to NULL.
6573         (bfd_elf_get_runpath_list): New function.
6575         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
6576         DT_RUNPATH entries.
6578 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
6580         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
6581         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
6582         explicitly.  Improve validation of r_type.
6584 2000-08-21  H.J. Lu  <hjl@gnu.org>
6586         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
6587         dynamic allocated content space.  Add a comment to remind us that
6588         one day this ought to be fixed.
6589         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6590         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6591         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6593 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
6595         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
6596         field with the newly relocated value instead of adding it to the
6597         existing immediate field.
6598         (elf32_i860_relocate_splitn): Likewise.
6599         (elf32_i860_relocate_highadj): Likewise.
6601 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
6603         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
6604         was previously just a stub).
6606 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
6608         * elflink.c (_bfd_elf_create_got_section): Don't abort().
6609         Formatting fixes.
6610         (_bfd_elf_create_dynamic_sections): Likewise.
6612 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
6614         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
6615         for undefined symbols to be the beginning of the section.
6617         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
6618         four extra entries at the beginning of the .rela.plt section.
6619         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
6620         section to account for the four reserved entries in the .plt section.
6622 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
6624         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
6625         to the list of NOPs we recognize after a branch-and-link.
6626         Use the ori NOP when one is needed.
6628         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
6629         for large archives.
6631 2000-08-14  Jim Wilson  <wilson@cygnus.com>
6633         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
6634         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
6635         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
6636         EF_IA_64_ABSOLUTE.
6638 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
6640         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
6642 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
6644         * elf32-i860.c (elf32_i860_relocate_section): New function.
6645         (i860_final_link_relocate): New function.
6646         (elf32_i860_relocate_splitn): New function.
6647         (elf32_i860_relocate_pc16): New function.
6648         (elf32_i860_relocate_highadj): New function.
6649         (elf32_i860_howto): Minor adjustments to some relocations.
6650         (elf_info_to_howto_rel): Define.
6651         (elf_backend_relocate_section): Define.
6653 2000-08-10  Nick Clifton  <nickc@cygnus.com>
6655         * elf32-arm.h: Fix formatting.
6657 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
6659         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
6661 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
6663         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
6665 2000-08-07  Kazu Hirata  <kazu@hxi.com>
6667         * ieee.c (ieee_write_debug_part): Rewrite a comment.
6668         * elf64-ia64.c: Fix a typo.
6670 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
6672         * elf32-i860.c (elf32_i860_howto_table): New structure.
6673         (lookup_howto): New function.
6674         (elf32_i860_reloc_type_lookup): New function.
6675         (elf32_i860_info_to_howto_rela): New function.
6676         (elf_code_to_howto_index): New structure.
6677         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
6678         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
6679         elf32_i860_reloc_type_lookup.
6681 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
6683         * som.c (struct fixup_format): Constify `format'.
6684         (som_hppa_howto_table): Use SOM_HOWTO macro.
6685         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
6686         (som_bfd_reloc_type_lookup): Likewise.
6687         (compare_subspaces): Remove unused `count1', `count2'.
6688         (som_begin_writing): Remove unused `total_reloc_size'.
6689         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
6690         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
6691         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
6692         (som_find_nearest_line): Decorate unused parameter(s).
6693         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
6694         (som_bfd_link_split_section): Likewise.
6696 2000-08-03  Nick Clifton  <nickc@cygnus.com>
6698         * section.c: Restore backed out code.
6699         * elf.c: Restore backed out code.
6700         (copy_private_bfd_data): Fix bug preventing stipped dynamic
6701         binaries from working.
6702         * bfd-in2.h: Regenerate.
6704 2000-08-03  H.J. Lu  <hjl@gnu.org>
6706         * section.c: Back out the change made by Nick Clifton
6707         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
6708         binaries.
6709         * bfd-in2.h: Likewise.
6710         * elf.c: Likewise.
6712 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
6714         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
6716 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
6718         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6719         * bfd-in2.h, libbfd.h: Regenerate.
6721 2000-07-31  Nick Clifton  <nickc@cygnus.com>
6723         * section.c (struct sec): Add new boolean field 'segment_mark'.
6724         (STD_SECTION): Initialise new field to zero.
6726         * bfd-in2.h: Regenerate.
6728         * elf.c (copy_private_bfd_data): Reorganise section to segment
6729         mapping to cope with moved sections requiring new segments,
6730         and overlapping segments.
6731         (SEGMENT_END): New macro: Return the end address of a segment.
6732         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6733         contains a section by comparing their VMA addresses.
6734         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6735         contains a section by comparing their LMA addresses.
6736         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6737         section should be included in a segment.
6738         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6739         follows another in memory.
6740         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6741         segments overlap.
6743 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
6745         * cpu-i860.c: Added comments.
6747         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6748         bfd_elf32_i860_little_vec.
6749         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6750         (ELF_MAXPAGESIZE): Changed to 4096.
6752         * targets.c (bfd_elf32_i860_little_vec): Declaration of
6753         new target.
6754         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6756         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6757         config for little endian elf32 i860.
6758         (targ_defvec): Define for the new config above
6759         as "bfd_elf32_i860_little_vec".
6760         (targ_selvecs): Define for the new config above
6761         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6763         * configure.in (bfd_elf32_i860_little_vec): Added recognition
6764         of new target vec.
6766         * configure: Regenerated.
6768 2000-07-27  H.J. Lu  <hjl@gnu.org>
6770         * elflink.h (elf_merge_symbol): Take one more argument,
6771         dt_needed, to indicate if the symbol comes from a DT_NEEDED
6772         entry. Don't overide the existing weak definition if dt_needed
6773         is true.
6774         (elf_link_add_object_symbols): Pass dt_needed to
6775         elf_merge_symbol ().
6777 2000-07-27  Nick Clifton  <nickc@cygnus.com>
6779         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6780         allocated contents.
6782 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
6784         * configure.host (*-*-aix*): AIX has 'long long' always.
6786         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6787         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6788         (xcoff_write_archive_contents_big): Don't update the offset
6789         of the symbol table, xcoff_write_armap will do it.
6791 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
6793         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6794         of dynobj for SGI_COMPAT checks.
6796 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
6798         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6799         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6800         * bfd-in2.h: Regenerate.
6802 2000-07-21  Nick Clifton  <nickc@cygnus.com>
6804         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6805         range symbol indices in relocs and issue an error message.
6807 2000-07-20  H.J. Lu  <hjl@gnu.org>
6809         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6810         info->new_dtags when setting DT_FLAGS_1. It will only be set
6811         by the new linker options. It shouldn't break anything.
6813 2000-07-20  H.J. Lu  <hjl@gnu.org>
6815         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6816         only if info->new_dtags is true.
6818 2000-07-20  H.J. Lu  <hjl@gnu.org>
6820         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6821         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6823 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
6825         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6826         (ALL_MACHINES_CFILES): Add cpu-cris.c.
6827         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6828         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6829         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6830         * Makefile.in: Rebuild.
6831         * aclocal.m4: Rebuild.
6832         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6833         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6834         (bfd_cris_arch): Declare.
6835         (bfd_archures_list): Add bfd_cris_arch.
6836         * bfd-in2.h: Rebuild.
6837         * config.bfd: (cris-*-*): New target.
6838         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6839         * configure: Rebuild.
6840         * elf.c (prep_headers): Add bfd_arch_cris.
6841         * libbfd.h: Rebuild.
6842         * libaout.h (enum machine_type): Add M_CRIS.
6843         * reloc.c: Add CRIS relocations.
6844         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6845         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6846         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6847         * po/POTFILES.in, po/bfd.pot: Regenerate.
6849 2000-07-19  H.J. Lu  <hjl@gnu.org>
6851         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6852         DF_TEXTREL if DT_TEXTREL is set.
6853         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6854         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6855         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6856         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6857         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6858         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6859         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6860         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6861         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6862         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6864         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6865         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6866         DT_RPATH is set.
6867         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6869 2000-07-19  H.J. Lu  <hjl@gnu.org>
6871         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6872         * bfd-in2.h: Rebuild.
6874         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6875         (elf_dt_soname): New.
6877         * elf.c (bfd_elf_set_dt_needed_soname): New.
6879         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6880         entry if the shared object loaded by DT_NEEDED is used to
6881         resolve the reference in a regular object.
6883 2000-07-19  H.J. Lu  <hjl@gnu.org>
6885         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6886         DT_DEPAUDIT and DT_AUDIT as strings.
6888 2000-07-19  Nick Clifton  <nickc@cygnus.com>
6890         * format.c: Fix formatting.
6892 2000-07-19  H.J. Lu  <hjl@gnu.org>
6894         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6896 2000-07-19  H.J. Lu  <hjl@gnu.org>
6898         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6899         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6900         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6901         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6902         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6903         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6904         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6906 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
6908         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6909         renamed functions from here...
6910         (assign_section_numbers): Use renamed functions.
6911         (prep_headers): Use renamed functions.
6913         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6914         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6915         * bfd-in2.h: Regenerate.
6917 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
6919         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6920         parenthesis in if statement.
6922 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
6924         Enable the support for Traditional MIPS.
6925         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6926         return ict_none appropriately for traditional mips targets.
6927         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6928         (STUB_MOVE): Conditionalize for traditonal mips.
6929         (STUB_LI16): Likewise.
6930         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6931         room for RTPROC header.
6932         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6933         the permission for the PT_DYNAMIC as read, write and execute.
6934         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6935         for traditonal mips.
6936         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6937         _DYNAMIC_LINKING for traditonal mips.
6938         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6939         in case of traditonal mips.
6940         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6941         entry is required. For a function if PLT is not required then set the
6942         corresponding hash table entry to 0.
6943         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6944         traditonal mips.
6945         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6946         shared object set the value to 0.
6947         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6948         _DYNAMIC_LINKING for traditonal mips.
6949         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6950         for traditonal mips.
6952 2000-07-15  H.J. Lu  <hjl@gnu.org>
6954         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6956 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
6958         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6959         out a structure that is BFD_IN_MEMORY.
6961 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
6963         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6964         bfd pointer.  Print section id instead of bfd pointer for local
6965         syms.  Prefix addend with `+' for global syms as well as local.
6966         Correct calculation of name component lengths.
6967         (elf64_hppa_check_relocs): Update call to get_dyn_name.
6969         From David Huggins-Daines  <dhd@linuxcare.com>
6970         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6971         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6972         (elf64_hppa_modify_segment_map): Likewise.
6974 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
6976         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6977         addresses to be "naturally" sign extended.  Return -1 if unknown.
6978         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6979         * bfd-in2.h: Regenerate.
6981 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
6983         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6984         and ECOF_SIGNED_64 to list ways to extract an offset.
6985         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6986         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6987         Update.
6988         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6989         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6991 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
6993         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6994         bfd_get_start_address.
6995         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6996         (elf_swap_ehdr_out): Ditto.
6998 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
7000         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
7001         compatibility with older binutils.
7003 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
7005         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
7006         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
7008         From Ryan Bradetich  <rbradetich@uswest.net>
7009         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
7010         (parse_line_table): Ditto.
7011         (_bfd_dwarf1_find_nearest_line): Ditto.
7012         * syms.c (cmpindexentry): Remove extra `*' from params.
7014 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
7016         * elf32-mips.c (sort_dynamic_relocs): New Function.
7017         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
7018         via qsort to sort the dynamic relocations in increasing r_symndx
7019         value.
7021 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
7023         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
7024         ATTRIBUTE_UNUSED to unused args.
7025         (get_opd): Likewise.
7026         (get_plt): Likewise.
7027         (get_dlt): Likewise.
7028         (get_stub): Likewise.
7029         (elf64_hppa_adjust_dynamic_symbol): Likewise.
7030         (elf64_hppa_link_output_symbol_hook): Likewise.
7031         (elf64_hppa_check_relocs): Delete unused var.
7032         (elf64_hppa_size_dynamic_sections): Likewise.
7033         (elf64_hppa_finalize_opd): Likewise.
7034         (elf64_hppa_finalize_dynreloc): Likewise.
7035         (elf64_hppa_modify_segment_map): Likewise.
7036         (elf64_hppa_finish_dynamic_sections): Likewise.
7038         * elf-hppa.h (elf_hppa_final_write_processing): Add
7039         ATTRIBUTE_UNUSED to unused args.
7040         (elf_hppa_final_link_relocate): Likewise.
7041         (elf_hppa_record_segment_addrs): Add paretheses.
7042         (elf_hppa_relocate_section): Constify dyn_name.
7044         From  David Huggins-Daines  <dhd@linuxcare.com>
7045         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
7046         rearrange case statement so that it gets preferred to 32-bit ones.
7048         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
7049         asection->id instead of address of asection structure.
7050         (elf32_hppa_size_stubs): Likewise.
7052         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
7053         for .init* and .fini*.
7055         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
7056         and addends used in stub names to 32 bits.
7057         (elf32_hppa_size_stubs): Likewise.
7059         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
7060         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
7061         not bfd_put_64.  Fix minor comment typo and formatting.
7063         Changes to create multiple linker stubs, positioned immediately
7064         before the section where they are required.
7065         * elf32-hppa.c: Don't include hppa_stubs.h.
7066         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
7067         (elf32_hppa_stub_hash_table): Delete.
7068         (elf32_hppa_link_hash_entry): Delete.
7069         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
7070         stub_hash_table, and store the struct here rather than a pointer.
7071         Delete output_symbol_count.  Add offset array.  Change
7072         global_value to a bfd_vma.
7073         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
7074         (elf32_hppa_stub_hash_traverse): Delete.
7075         (elf32_hppa_name_of_stub): Delete.
7076         (elf32_hppa_link_hash_lookup): Delete.
7077         (elf32_hppa_link_hash_traverse): Delete.
7078         (elf32_hppa_stub_hash_table_init): Delete.
7079         (elf32_hppa_size_of_stub): Pass input section and offset rather
7080         than location and calculate location here.  Don't pass name as all
7081         stubs are now the same size.
7082         (elf32_hppa_stub_hash_newfunc): Init new fields.
7083         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
7084         too.
7085         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
7086         comparing against ints.  Rewrite stub handling code.
7087         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
7088         Case enums to int before comparing against ints.  Remove
7089         bfd_reloc_dangerous case.
7090         (elf32_hppa_build_one_stub): Rewrite.
7091         (elf32_hppa_size_one_stub): New function.
7092         (elf32_hppa_build_stubs): Rewrite.
7093         (elf32_hppa_size_stubs): Pass in linker call-back functions.
7094         Rewrite stub-handling specific code.
7096         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
7098         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
7100         * hppa_stubs.h: Delete.
7101         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
7102         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
7103         * Makefile.in: Regenerate.
7105         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
7106         e_nlrsel.
7108         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
7110         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
7111         and section name for bfd_reloc_notsupported error message.
7112         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
7113         bfd_reloc_notsupported.
7114         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
7116         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
7117         undefined weak symbols for all relocs.
7118         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
7119         offsets are relative to one past the delay slot.
7120         (elf32_hppa_size_stubs): Account for reloc addend when calculating
7121         branch destination.  Put addend into stub name too.
7122         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
7123         adjust by 8 when deciding whether a linker stub is needed.  Put
7124         addend into stub name as for above.
7126         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
7127         various args and vars.
7128         (elf32_hppa_bfd_final_link_relocate): Here too.
7129         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
7130         inner block var to avoid shadowing.
7132         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
7133         unsigned.
7134         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
7135         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
7136         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
7138         * libhppa.h: Change practically all unsigned ints to plain ints.
7139         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
7140         prototypes.
7142         From Ryan Bradetich  <rbradetich@uswest.net>
7143         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
7144         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
7145         suit above.
7146         From  David Huggins-Daines  <dhd@linuxcare.com>
7147         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
7148         to the new OP_* ones.
7150         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
7151         error exit.  Bail out earlier on plabel relocs that we aren't
7152         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
7153         string, and then don't free our copy.
7154         (elf32_hppa_build_one_stub): Make insn unsigned int.
7156         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
7157         available with BL, not BE and BLE.
7159         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
7160         code for elf arg relocs.
7161         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
7162         argument with elf_link_hash_entry h.  Handle undefined weak
7163         symbols.  Move $global$ lookup from here...
7164         (elf32_hppa_relocate_section): ...to here.  Return correct error
7165         message for non-handled relocs.
7166         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
7167         wrong test was -0x3ffff to +0x40000.
7169         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
7170         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
7171         Handle them as such.
7172         (elf_hppa_relocate_insn): Fix a typo.
7174         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
7175         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7176         assemble_17, assemble_21): Delete.
7177         Supply defines for all 64 possible opcodes.
7178         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
7179         formats.  Handle COMICLR.
7180         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
7181         -10, -16, 16, 22.
7183         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
7184         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
7185         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
7186         to suit.
7187         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
7188         the local syms - did this code get deleted accidentally?  Ignore
7189         undefined and undefweak syms.
7191         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
7192         block.  Use it instead of elf64_hppa_hash_table (info).
7193         (elf_hppa_final_link_relocate): Use hppa_info instead of
7194         elf64_hppa_hash_table (info).
7196         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7197         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7198         (hppa_rebuild_insn): Mask immediate bits here instead.
7199         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7201 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
7203         * section.c (struct sec): Add id field.  Tidy comment formatting.
7204         (bfd_make_section_anyway): Set id.
7205         (STD_SECTION): Init id too.
7206         Change CONST to const throughout.
7207         * archures.c (bfd_arch_info): Tidy comment.
7208         (bfd_arch_list): Change a CONST to const.
7209         * libbfd-in.h: Tidy comments and replace CONST with const.
7210         * elf-bfd.h: Likewise.
7211         * libbfd.h: Regenerate.
7212         * bfd-in2.h: Regenerate.
7213         * libcoff.h: Regenerate.
7215 2000-07-07  DJ Delorie  <dj@redhat.com>
7217         * archive.c (_bfd_write_archive_contents): Add an informative
7218         comment.
7220 2000-07-06  Kazu Hirata  <kazu@hxi.com>
7222         * srec.c: Fix formatting.
7224 2000-06-05  DJ Delorie  <dj@redhat.com>
7226         * MAINTAINERS: new
7228 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
7230         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
7231         value of PC-relative offsets.
7233 2000-07-03  Jim Wilson  <wilson@cygnus.com>
7235         * elf64-alpha.c (alpha_elf_size_info): New.
7236         (elf_backend_size_info): Define to alpha_elf_size_info.
7237         * elfcode.h (elf_size_info): Change hash bucket size to 4.
7239 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
7241         * elf32-mips.c: Include elf32-target.h again for the traditional
7242         MIPS targets.
7244 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
7246         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
7247         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
7248         (avr_info_to_howto_rela): Likewise.
7249         (elf32_avr_gc_mark_hook): Likewise.
7250         (elf32_avr_gc_sweep_hook): Likewise.
7251         (elf32_avr_relocate_section): Likewise.
7253 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
7255         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
7256         an external symbol for a non-shared, non-relocatable link.
7258 2000-07-03  Nick Clifton  <nickc@redhat.com>
7260         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
7261         is an external symbol.
7262         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
7263         external symbol.
7265 2000-07-03  Kazu Hirata  <kazu@hxi.com>
7267         * reloc16.c: Fix formatting.
7269 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
7271         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
7272         to add a new target for traditional mips i.e
7273         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
7274         * configure.in: Likewise.
7275         * configure: Rebuild.
7276         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
7277         bfd_target_vector.
7278         (bfd_elf32_tradlittlemips_vec): Likewise.
7279         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
7280         to see that elfNN_bed does not get redefined even if the target file
7281         is included twice for a chip. See elf32-mips.c.
7283 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
7285         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
7286         (CLEANFILES): Add DEPA.
7287         * Makefile.in: Regenerate.
7289 2000-06-30  DJ Delorie  <dj@cygnus.com>
7291         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
7292         can't assume the PE header is at 0x80.
7294 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
7296         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
7298 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
7300         * go32stub.h: Update stub.
7302 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
7304         * archures.c (bfd_mach_avr5): Define.
7305         * bfd-in2.h (bfd_mach_avr5): Define.
7306         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
7307         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
7308         (compatible): Update comment.  Add missing test.
7309         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
7310         for avr2 and avr4.  Simplify 8K wrap code.
7311         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
7312         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
7314 2000-06-26  Kazu Hirata  <kazu@hxi.com>
7316         * coff-h8300.c: Fix formatting.
7317         * cpu-h8300.c: Likewise.
7319 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
7321         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
7322         for local symbols whose names are unknown.
7324 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
7326         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
7327         find one.
7328         * Makefile.in: Regenerate.
7329         * doc/Makefile.in: Regenerate.
7331 2000-06-20  H.J. Lu  <hjl@gnu.org>
7333         * Makefile.am: Rebuild dependency.
7334         * Makefile.in: Rebuild.
7336 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7338         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
7339         (elf_backend_copy_indirect_symbol): Map to the new function.
7341 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
7343         * archive.c (normalize): Correct pointer comparison when checking
7344         for backslashes.
7345         (bfd_bsd_truncate_arname): Likewise.
7346         (bfd_gnu_truncate_arname): Likewise.
7348 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
7350         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
7351         sections elf_{text,data}_{section,symbol}.
7352         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
7353         (_bfd_mips_elf_hide_symbol): New function.
7354         (elf_backend_hide_symbol): Map to the new function.
7355         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
7356         definitions of mips_elf_{text,data}_{section,symbol}.
7357         (mips_elf_local_relocation_p): Try to find the direct symbol
7358         based on new check_forced argument.
7359         (mips_elf_calculate_relocation): Use new version of
7360         mips_elf_local_relocation_p.
7361         (mips_elf_relocate_section): Likewise.
7362         (_bfd_mips_elf_relocate_section): Likewise.
7363         (mips_elf_sort_hash_table): Only assert that have enough GOT
7364         space.
7365         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
7366         entry if the relocation based on the new external argument.
7367         (mips_elf_create_dynamic_relocation): Assert that we have a
7368         section contents allocated where we can swap out the dynamic
7369         relocations.
7370         (mips_elf_calculate_relocation): Find the real hash-table entry
7371         correctly by using h->root.root.type.  Only create a dynamic
7372         relocation entry if the symbol is defined in a shared library.
7373         Create an external GOT entry for the GOT16 relocation if the
7374         symbol was forced local.
7375         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
7376         dynamic index if the symbol was forced local.
7378 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7380         * elf32-mips.c: Fix typos in comments.
7382 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
7384         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
7385         CORE_VERSION_1.
7387 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
7389         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
7390         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
7391         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
7392         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
7393         (bfd_elf32_m68hc11_vec): Likewise.
7394         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
7395         Supports 68hc11 & 68hc12  at the same time.
7396         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
7397         bfd_target_vector.
7398         (bfd_elf32_m68hc11_vec): Likewise.
7399         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
7400         * archures.c (bfd_m68hc12_arch): Define and register in global list
7401         (bfd_m68hc11_arch): Likewise.
7402         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
7403         BFD_RELOC_M68HC11_3B): Define.
7404         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
7405         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
7407 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
7409         * elf_bfd.h (struct elf_backend_data): Add info argument to
7410         elf_backend_hide_symbol.
7411         (_bfd_elf_link_hash_hide_symbol): Likewise.
7412         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
7413         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
7414         * elflink.h (elf_link_add_object_symbols): Likewise.
7415         (elf_link_assign_sym_version): Likewise.
7417 2000-06-18  H.J. Lu  <hjl@gnu.org>
7419         * coff-i386.c (coff_i386_reloc): Don't return in case of
7420         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
7421         Compensate PE relocations when linking with non-PE object
7422         files to generate a non-PE executable.
7424 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
7426         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
7427         GOT entries if we're doing a static link or -Bsymbolic link.
7429 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
7431         * elflink.h (elf_link_adjust_relocs): Check for and call backend
7432         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
7433         available.
7434         (elf_link_output_relocs): Likewise.
7435         (elf_reloc_link_order): Likewise.
7437 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7439         * archures.c (enum bfd_architecture): #define constants for
7440         PowerPc and RS6000 machine numbers.
7441         * bfd-in2.h: Regenerate.
7442         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
7443         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
7444         and RS6000 machine numbers using #defined constants from
7445         archures.c.
7446         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
7447         machine numbers using #defined constants from archures.c.  Add
7448         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
7449         64-bit words in 620 entry.
7450         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
7451         RSC, and RS2.
7452         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
7454 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
7456         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
7457         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
7458         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
7460 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7462         * bfd-in.h (bfd_family_coff): Define.
7463         * bfd-in2.h: Regenerate.
7464         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
7465         coff_find_nearest_line): Check COFFness using bfd_family_coff()
7466         instead of bfd_target_coff_flavour.
7467         * cofflink.c (_bfd_coff_final_link): Likewise.
7468         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
7469         exclude XCOFF files.
7470         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7471         Likewise.
7472         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
7473         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
7474         * xcofflink.c (XCOFF_XVECP): Delete.
7475         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
7476         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
7477         bfd_xcoff_record_link_assignment,
7478         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
7479         check for bfd_target_xcoff_flavour.
7481 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
7483         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
7484         files on AIX 4.3.
7485         (read_hdr): New function.
7486         (rs6000coff_core_p): Store mstsave or __context64 struct instead
7487         of trying to extract individual registers.  Set abfd->arch_info
7488         to match the architecture that created the core file.
7489         (rs6000coff_get_section_contents): Delete.
7490         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
7492 2000-06-14  H.J. Lu  <hjl@gnu.org>
7494         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
7495         is NULL.
7497 2000-06-13  H.J. Lu  <hjl@gnu.org>
7499         * configure: Regenerate.
7501 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
7503         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
7504         armpei_little_vec.
7506 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
7508         * configure.in (VERSION): Update to show this is the CVS mainline.
7510 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
7512         * elf32-d10v.c: Include elf/d10v.h
7513         (enum reloc_type): Delete.
7514         * elf32-d30v.c: Include elf/d30v.h
7515         (enum reloc_type): Delete.
7517         * Makefile.am: Run "make dep-am" to regenerate dependencies.
7518         * Makefile.in: Regenerate.
7520         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
7521         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
7522         move HOWTOs into elf_howto_table.
7523         (R_386_standard, R_386_ext_offset): Define.
7524         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
7525         (elf_i386_reloc_type_lookup): Modify calculation of index into
7526         elf_howto_table since we've removed the padding.
7527         (elf_i386_info_to_howto_rel): Likewise.
7528         (elf_i386_relocate_section): Likewise.
7530 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
7532         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
7534 2000-06-05  H.J. Lu  <hjl@gnu.org>
7536         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
7537         an error when seeing an undefined symbol with hidden/internal
7538         attribute. It is handled in *_relocate_section ().
7540 2000-06-05  H.J. Lu  <hjl@gnu.org>
7542         * elflink.h (elf_fix_symbol_flags): Follow the link for the
7543         indirect symbol for the ELF_LINK_NON_ELF bit.
7544         (elf_link_output_extsym): Don't output the indirect symbol even
7545         if the ELF_LINK_NON_ELF bit is set.
7547 2000-06-01  J.T. Conklin  <jtc@redback.com>
7549         * config.bfd (i[3456]86-*-netbsdelf*): New target.
7550         (i[3456]86-*-netbsdaout*): New target.
7551         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
7552         (i[3456]86-*-openbsd*): Likewise.
7554 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
7556         * trad-core.c: From hpux-core.c, include <dirent.h> or
7557         <sys/ndir.h> when possible.
7559 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
7561         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
7562         definitions.  We must not assume they are sorted in the file
7563         according to their index numbers.
7565 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
7567         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
7568         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
7569         R_PARISC_DIR17F are for absolute branches; Handle them as such.
7571 2000-05-30  Nick Clifton  <nickc@cygnus.com>
7573         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
7574         80960CA, 80960MC as valid machine names.
7576 2000-05-30  H.J. Lu  <hjl@gnu.org>
7578         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
7579         visibility bits if the symbol is undefined. Correctly handle
7580         weak undefined symbols with hidden and internal attributes.
7582         * elflink.h (elf_link_add_object_symbols): Always turn the
7583         symbol into local if it has the hidden or internal attribute.
7585 2000-05-29  Philip Blundell  <philb@gnu.org>
7587         * ppcboot.c:  Add packed attribute if compiling with GCC.
7589 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
7591         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
7593 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
7595         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
7596         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
7597         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
7598         a few old comments.
7600 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
7602         * Makefile.am: Update dependencies with "make dep-am"
7603         * Makefile.in: Regenerate.
7605         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
7606         bindtextdomain): Replace defines with those from intl/libgettext.h
7607         to quieten gcc warnings.
7609 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
7611         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
7613         * archive.c (normalize, bfd_bsd_truncate_arname,
7614         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
7615         file names with backslashes.
7617         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
7618         before opening it.
7620         * sysdep.h: Include filenames.h.
7622 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
7624         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
7626 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
7628         * elf64-sparc.c (sparc64_elf_relax_section): New.
7629         (sparc64_elf_relocate_section): Optimize tail call into branch always
7630         if possible.
7631         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7632         (elf32_sparc_relax_section): New.
7634 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
7636         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
7637         Remove unusued variables.
7638         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
7639         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
7640         previous fix, so that shared libs really don't influence targets
7641         extension mask and memory model.
7643 2000-05-23  H.J. Lu  <hjl@gnu.org>
7645         * elf64-alpha.c (elf64_alpha_relocate_section): Check
7646         h->root.other not h->other.
7647         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7649         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
7651 2000-05-23  H.J. Lu  <hjl@gnu.org>
7653         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
7654         undefined symbol with the non-default visibility attributes.
7655         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
7656         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7657         * elf32-i370.c (i370_elf_relocate_section): Likewise.
7658         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7659         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7660         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7661         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7662         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7663         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7664         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
7665         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7667 2000-05-22  Richard Henderson  <rth@cygnus.com>
7669         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
7670         PCREL22, PCREL64I.  Zero size of special relocs.
7671         (elf64_ia64_reloc_type_lookup): Likewise.
7672         (USE_BRL, oor_brl, oor_ip): New.
7673         (elf64_ia64_relax_section): New.
7674         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
7675         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
7676         (elf64_ia64_relocate_section): Likewise.
7677         (bfd_elf64_bfd_relax_section): New.
7678         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
7679         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
7680         * bfd-in2.h, libbfd.h: Regenerate.
7682 2000-05-22  Nick Clifton  <nickc@cygnus.com>
7684         * configure.in : Add peigen.lo to MIPS PE targets.
7685         * configure: Regenerate.
7687 2000-05-22  Momchil Velikov  <velco@fadata.bg>
7689         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
7690         only if it is known for both input and output bfds. Separate
7691         error message strings as in some languages, it may be necessary
7692         to change more than one place in the string to change between
7693         'big' and 'little'.
7695         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
7696         endianess checks, call _bfd_generic_verify_endian_match() instead.
7698         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
7700         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
7702         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
7703         endianess before checking bfd flavours.
7705 2000-05-22  H.J. Lu  <hjl@gnu.org>
7707         * elflink.h (elf_link_output_extsym): Clear the visibility
7708         field for symbols not defined locally.
7710 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
7712         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
7713         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
7714         (hppa_rebuild_insn): Mask immediate bits here instead.
7715         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
7717 2000-05-18  Momchil Velikov <velco@fadata.bg>
7719         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7720         relocs for an executable, ensure that they are virtual addresses.
7722 2000-05-18  Jeffrey A Law  (law@cygnus.com)
7724         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7726 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
7727             Rick Gorton             <gorton@scrugs.lkg.dec.com>
7729         * elflink.h: Add emitrelocations support: when enabled, relocation
7730         information and relocation sections are put into final output
7731         executables.  If the emitrelocations flag is set, do the following:
7732         (elf_bfd_final_link): Emit relocation sections.
7733         (elf_link_input_bfd): Compute relocation section contents.
7734         (elf_gc_sections): Don't clean relocation sections.
7736 2000-05-16  Catherine Moore  <clm@cygnus.com>
7738         * som.c (som_decode_symclass):  Recognize weak symbols.
7740 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
7742         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7743         read idata section only from dataoff.
7744         (pe_print_edata): Correctly check for valid eat_member.
7746 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
7748         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7750 2000-05-14  Philip Blundell  <philb@gnu.org>
7752         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7754 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
7756         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7758         * peigen.c (pe_print_idata): Look for .idata section and print
7759         info even if data directory has zero entries.  Read idata section
7760         starting from dataoff, and adjust all data offsets to suit.  Cast
7761         all bfd_vma vars to unsigned long before passing to fprintf.
7762         * peigen.c (pe_print_edata): Similarly, look for .edata section
7763         and print info even if data directory has zero entries.  Cast
7764         all bfd_vma vars to unsigned long before passing to fprintf.
7766         From Szabolcs Szakacsits <szaka@F-Secure.com>
7767         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7768         directory size which may be bogus.
7769         * peigen.c (pe_print_edata): Similarly.
7771 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
7773         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7774         section is empty.
7775         (copy_private_bfd_data): Allow for space possibly taken up by elf
7776         headers when calculating segment physical address from lma.
7778 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
7780         * versados.c (versados_scan): Init stringlen and pass_2_done.
7782         * trad-core.c (trad_unix_core_file_p): Return
7783         bfd_error_wrong_format rather than bfd_error_file_truncated.
7785         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7786         add_data_entry.  DataDirectory virtual address is relative.
7787         (pe_print_idata): Account for relative DataDirectory virtual
7788         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
7789         (pe_print_edata): Similarly.
7791         From Szabolcs Szakacsits <szaka@F-Secure.com>
7792         * peigen.c (dir_names): Add Delay Import Directory.
7793         (pe_print_idata):  Always search for bfd section containing
7794         idata address rather than looking up section name.  Print this
7795         section name rather than .idata.
7796         (pe_print_edata): Similarly.  Also print some fields as %08lx.
7797         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7798         Win32Version.
7800 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
7802         * xcoff.h: Rename to xcoff-target.h
7803         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7804         * coff-rs6000.c: Ditto.
7805         * coff64-rs6000.c: Ditto.
7806         * coff-pmac.c: Ditto.
7807         * Makefile.in: Regenerate.
7809 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
7811         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7812         Change U802TOC64MAGIC to U803XTOCMAGIC.
7814 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
7816         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7817         * bfd-in.h: Prototype bfd_elf_get_arch_size.
7818         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7820 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
7822         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7824 2000-05-03  Martin v. L�öwis  <loewis@informatik.hu-berlin.de>
7826         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7827         hidden and internal symbols.
7828         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7829         visibility.
7830         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7831         assign a PLT or GOT entry to symbols with hidden and
7832         internal visibility.
7834 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
7836         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7837         the .bss section.
7838         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7840 2000-05-02  H.J. Lu  <hjl@gnu.org>
7842         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7843         ELFOSABI_SYSV.
7845 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
7847         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7848         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
7849         dependencies.
7850         * Makefile.in: Regenerate.
7852 2000-05-01  Jim Wilson  <wilson@cygnus.com>
7854         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7855         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7856         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
7857         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
7858         * Makefile.in: Rebuild.
7860 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
7862         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
7863         doesn't work very well.
7865         * elf-hppa.h (elf_hppa_internal_shdr): Define.
7866         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7867         Set hdr->s_type to 1 if ARCH_SIZE == 32.
7868         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7869         (elf_hppa_info_to_howto): Likewise.
7870         (elf_hppa_info_to_howto_rel): Likewise.
7871         (elf_hppa_reloc_type_lookup): Likewise.
7872         (elf_hppa_is_local_label_name): Likewise.
7873         (elf_hppa_fake_sections): Likewise.
7874         (elf_hppa_final_write_processing): Likewise.
7875         (elf_hppa_howto_table): Fully initialise all entries.
7876         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7877         (elf_hppa_info_to_howto): Likewise.
7878         (elf_hppa_info_to_howto_rel): Likewise.
7879         (elf_hppa_reloc_type_lookup): Likewise.
7880         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7881         elf_hppa_unmark_useless_dynamic_symbols,
7882         elf_hppa_remark_useless_dynamic_symbols,
7883         elf_hppa_record_segment_addrs, elf_hppa_final_link,
7884         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7885         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7886         elf32-hppa.c mess is cleaned up.
7887         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7888         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
7889         r_field then call hppa_field_adjust inline func with variable
7890         r_field arg, instead call hppa_field_adjust with fixed arg.
7891         In case R_PARISC_PCREL22F, don't set r_field.
7892         (elf_hppa_relocate_insn): Change args and return type to unsigned
7893         int.  Call re_assemble_* funcs to do the work.
7895         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7896         sign extending.
7898         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7899         extending.
7900         (sign_extend): Mask first before sign extending.
7901         (low_sign_extend): Rewrite without condition expression.
7902         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7903         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7904         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7905         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7906         result as function return value rather than through pointer arg.
7907         Accept unsigned int args, and return unsigned int.
7908         (re_assemble_3): New.  Combines function of dis_assemble_3 with
7909         re-assembly of opcode and immediate.
7910         (re_assemble_12): Likewise.
7911         (re_assemble_16): Likewise.
7912         (re_assemble_17): Likewise.
7913         (re_assemble_21): Likewise.
7914         (re_assemble_22): Likewise.
7915         (hppa_field_adjust): Rewrite and document, paying attention to
7916         size of types and signed/unsigned issues.
7917         (get_opcode): Shift before masking.
7918         (FDLW): Rename to FLDW.
7919         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
7920         (hppa_rebuild_insn): Change args and return value to unsigned
7921         int.  Make use of re_assemble_*.  Correct case 11.
7923         * dep-in.sed: Handle ../opcodes/.
7924         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7925         elf64-hppa.h, hppa_stubs.h, xcoff.h.
7926         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7927         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7928         elfarm-nabi.lo dependencies outside of auto-dependency area.
7929         Regenerate dependencies.
7930         * Makefile.in: Regenerate.
7932         * configure.in (TRAD_HEADER): Test non-null before
7933         AC_DEFINE_UNQUOTED.
7934         * configure: Regenerate.
7936         * reloc.c: Fix mis-spelling in comment.
7938 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
7940         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7941         * vms.c (vms_openr_next_archived_file): Return NULL.
7943 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7945         * coffcode.h Copy changes mistakenly done to libcoff.h in
7946         4/24/2000 patch.
7948 2000-04-29  Andreas Jaeger  <aj@suse.de>
7950         * libbfd-in.h: Correctly check GCC version.
7951         * bfd-in.h: Likewise.
7952         * libhppa.h: Likewise.
7953         * libbfd.h: Regenerate.
7954         * bfd-in2.h: Regenerate.
7956 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7958         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7959         coffdu-rs6000.{lo,c}.
7960         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7961         on xcoff.h
7962         * Makefile.in: Regenerate.
7963         * xcoff.h: New file.
7964         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7965         * coff-rs6000.c: Move all declarations and defines that are
7966         common to the xcoff backends into xcoff.h
7967         * coff64-rs6000.c: Ditto,
7969 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7971         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
7972         _bfd_coff_force_symnames in strings and
7973         _bfd_coff_debug_string_prefix_length to their default values.
7974         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7976 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
7978         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7979         _bfd_coff_force_symnames in strings and
7980         _bfd_coff_debug_string_prefix_length to their default values.
7982 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
7984         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
7985         Check local_got_refcounts before dereferencing.
7987         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7988         before deciding we don't need R_PPC_PLT32 relocation.
7989         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7990         dereferencing.
7992         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7994         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7995         .plt entries.
7996         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7997         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7998         (elf_i386_relocate_section): Allow for .plt to go missing.
7999         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
8000         can use a relative reloc for got as elf_i386_relocate_section.
8001         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
8003 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
8005         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
8007 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
8009         * Makefile.am (coff64-rs6000.lo): New rule.
8010         * Makefile.in: Regenerate.
8011         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
8012         xcoff_is_local_label_name, xcoff_rtype2howto,
8013         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
8014         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
8015         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
8016         (NO_COFF_SYMBOLS): Define.
8017         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
8018         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
8019         internally.
8020         (MINUS_ONE): New macro.
8021         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
8022         relocation.
8023         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
8024         coff_SWAP_aux_out): Map to the new functions.
8025         * coff64-rs6000.c: New file.
8026         * libcoff.h (bfd_coff_backend_data): Add new fields
8027         _bfd_coff_force_symnames_in_strings and
8028         _bfd_coff_debug_string_prefix_length.
8029         (bfd_coff_force_symnames_in_strings,
8030         bfd_coff_debug_string_prefix_length): New macros for above fields.
8031         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
8032         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
8033         of using coff_swap_sym_in directly.
8034         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
8035         (coff_set_flags) Set magic for XCOFF64.
8036         (coff_compute_section_file_positions): Add symbol name length to
8037         string section length if bfd_coff_debug_string_prefix_length is
8038         true.
8039         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
8040         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
8041         using coff_swap_lineno_in directly.
8042         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
8043         and _bfd_coff_debug_string_prefix_length fields.
8044         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
8045         symbol names into strings table when
8046         bfd_coff_force_symnames_in_strings is true.
8047         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
8048         SET_RELOC_VADDR): New macros.
8049         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
8050         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
8051         code.
8052         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
8053         changes within RS6000COFF_C specific code.
8054         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
8055         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
8056         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
8057         Extend existing hack on target name.
8058         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
8059         target name.
8060         * coff-tic54x.c (ticof): Keep up to date with new fields
8061         in bfd_coff_backend_data.
8062         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
8063         targ_selvecs to include rs6000coff64_vec for rs6000.
8064         * configure.in: Add rs6000coff64_vec case.
8065         * cpu-powerpc.c: New bfd_arch_info_type.
8067 2000-04-24  Jeffrey A Law  (law@cygnus.com)
8069         * config.bfd: Only disable elf32-hppa vectors, not all of the
8070         BSD and OSF configuration support.  Provide (disabled) clauses
8071         for PA64 support.
8072         * configure.in: Add clause for PA64 support.
8073         * configure: Rebuilt.
8075         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
8076         (bfd_elf64_hppa_vec): Declare.
8078         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
8079         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
8080         (elf64-hppa.lo): Add dependencies.
8081         * Makefile.in: Rebuilt.
8083         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
8085 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
8087         * libhppa.h (dis_assemble_16): New function.
8088         (pa_arch): Added pa20w element.
8090 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
8092         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
8093         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
8094         bfd_elf64_slurp_reloc_table.
8096         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
8097         definitions to get external names.
8098         (elf_write_relocs): Renamed from write_relocs and make global.
8099         (elf_slurp_reloc_table): Make global.
8100         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
8102         * archive.c (hpux_uid_gid_encode): New function.
8103         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
8104         defined and the ID is greater than 99999.
8105         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
8106         special uid/gid fields into 32 bit values.
8108 2000-04-21  Matthew Green  <mrg@cygnus.com>
8110         * config.bfd: Add NetBSD/sparc64 support.
8112 2000-04-21  Richard Henderson  <rth@cygnus.com>
8113             David Mosberger  <davidm@hpl.hp.com>
8114             Timothy Wall <twall@cygnus.com>
8115             Jim Wilson  <wilson@cygnus.com>
8117         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
8118         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
8119         (BFD64_BACKENDS): Add elf64-ia64.lo.
8120         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
8121         (cpu-ia64.lo, elf64-ia64.lo): New rules.
8122         * Makefile.in: Rebuild.
8123         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
8124         (bfd_ia64_arch): Declare.
8125         (bfd_archures_list): Add bfd_ia64_arch.
8126         * bfd-in2.h: Rebuild.
8127         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
8128         * configure: Rebuild.
8129         * configure.host: (ia64-*-linux*): New host.
8130         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
8131         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
8132         * elf.c (prep_headers): Add bfd_arch_ia64.
8133         * libbfd.h: Rebuild.
8134         * reloc.c: Add IA-64 relocations.
8135         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
8136         Declare.
8137         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
8138         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
8140 2000-04-21  Richard Henderson  <rth@cygnus.com>
8142         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
8143         contents when performing a partial link.
8144         (bfd_elf_d30v_reloc_21): Likewise.
8146 2000-04-20  H.J. Lu  <hjl@gnu.org>
8148         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
8149         patch to symbols defined by a shared object.
8150         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
8152 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
8154         K&R compiler fixes.
8155         * dwarf2.c (concat_filename): Avoid string literal concatenation.
8156         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
8158 2000-04-11  David Mosberger  <davidm@hpl.hp.com>
8160         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
8161         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
8162         (coff-ia64.lo): Add dependency.
8163         * Makefile.in: Regenerate.
8164         * coff-ia64.c: New file.
8165         * efi-app-ia32.c: Ditto.
8166         * efi-app-ia64.c: Ditto.
8167         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
8168         (coff_set_flags): Ditto.
8169         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
8170         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
8171         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
8172         * configure: Regenerate.
8173         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
8174         (PUT_OPTHDR_IMAGE_BASE): Ditto.
8175         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8176         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
8177         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8178         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
8179         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8180         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
8181         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8182         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
8183         (GET_PDATA_ENTRY): Ditto.
8184         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
8185         data_start.  Use above macros to read fields that are 64 bit wide for
8186         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
8187         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
8188         FileAlignment and SectionAlignment to minimum alignment if they
8189         are zero.
8190         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
8191         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
8192         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
8193         Use above macros to write fields that are 64 bit wide for
8194         COFF_WITH_PEP64.
8195         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
8196         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
8197         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
8198         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
8199         begin address, end address, and unwind info address only.  Use
8200         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
8201         print addresses.
8202         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
8203         HIGH3ADJ relocation names.
8204         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
8205         * targets.c: Declare bfd_efi_app_ia32_vec and
8206         bfd_efi_app_ia64_vec.
8207         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
8208         bfd_efi_app_ia64_vec.
8210 2000-04-17  Timothy Wall  <twall@cygnus.com>
8212         * bfd-in2.h: Add prototypes for tic54x load page access.
8213         * bfd-in.h: Regenerate.
8214         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
8215         in customized _set_arch_mach function.
8216         * coffcode.h (coff_set_alignment_hook): Set section load page if
8217         the appropriate macro is defined.
8218         (write_object_contents): Read section load page.
8220 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
8222         * elf32-hppa.h: Update copyright date.
8224         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
8225         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
8227         * elf32-d30v.c (MAX32): Don't use LL suffix.
8228         (MIN32): Define in terms of MAX32.
8229         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
8231         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
8232         expression.
8234         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
8236 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
8238         * dep-in.sed: Match space before file name, not after.
8239         * Makefile.am: Regenerate dependencies.
8240         * Makefile.in: Regenerate.
8242         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
8243         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
8244         extend without an if statement.
8246 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
8248         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
8249         signed quantites.
8250         * elf32-mips.c (gprel16_with_gp): Likewise.
8251         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
8252         here using -0x40000, not (int)0xfffc0000.
8253         (elf32_hppa_size_of_stub): Likewise.
8255 2000-04-11  Timothy Wall  <twall@cygnus.com>
8257         * coff-tic54x.c: Now builds with all targets.
8258         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
8259         * Makefile.in: Regenerate.
8260         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
8261         unitialized variable.
8263 2000-04-07  Andrew Cagney  <cagney@b1.cygnus.com>
8265         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
8266         --enable-build-warnings option.
8267         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
8268         * Makefile.in, configure: Re-generate.
8270 2000-04-07  Nick Clifton  <nickc@cygnus.com>
8272         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
8273         BFD_RELOC_THUMB_PCREL_BLX.
8275         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8276         R_ARM_XPC25 and R_ARM_THM_PC22.
8278         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
8279         R_ARM_XPC25 and R_ARM_THM_XPC22.
8280         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
8281         R_ARM_[XPC25|THM_XPC22].
8283         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
8284         elf/arm-oabi.h to elf/arm.h
8286         * Makefile.am: Fix dependency for elfarm-oabi.c
8287         * Makefile.in: Regenerate.
8289         * bfd-in2.h: Regenerate.
8290         * libbfd.h: Regenerate.
8292 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8294         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
8295         and restore it on failure.  Release newly allocated tdata on
8296         failure.
8298 2000-04-07  Jim Wilson  <wilson@cygnus.com>
8300         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
8301         (decode_line_info): Set it.  Report error if unit->line_offset is
8302         equal to or larger than it.
8304 2000-04-07  Timothy Wall  <twall@cygnus.com>
8306         * targets.c: Added vecs for tic54x.
8307         * reloc.c: Added relocs for tic54x.
8308         * libbfd.h: Regenerated.
8309         * configure: Add TI COFF vecs for tic54x.
8310         * configure.in: Ditto.
8311         * config.bfd (targ_cpu): Recognize new tic54x target.
8312         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
8313         * bfd-in2.h: Add tic54x target and relocations.
8314         * Makefile.am, Makefile.in: Add tic54x target.
8315         * archures.c (bfd_archures_list): Add tic54x target.
8316         * coff-tic54x.c: New.
8317         * cpu-tic54x.c: New.
8319 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
8321         * elfcore.h (elf_core_file_p): call backend_object_p which
8322         thereby gets an opportunity to update the arch/machine type.
8324 2000-04-06  Timothy Wall  <twall@cygnus.com>
8326         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
8327         class.  Handle SEC_CLINK and SEC_BLOCK flags.
8328         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
8329         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
8331 2000-04-06  Nick Clifton  <nickc@cygnus.com>
8333         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
8334         EF_INTERWORK if this is an unknown EABI.
8335         (elf32_arm_merge_private_bfd_data): Check EABI version
8336         numbers.  Only check EF_xxx flags if the EABI version number
8337         is unknown.
8338         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
8339         if the EABI version number is unknown.
8340         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
8341         if the EABI version number is unknown.
8343 2000-04-05  J"orn Rennecke <amylaar@cygnus.co.uk>
8345         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
8346         BFD_RELOC_SH_LOOP_END.
8347         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
8348         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
8349         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
8350         (sh_elf_reloc_loop): New function.
8351         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
8352         any more.
8353         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
8354         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
8355         * bfd-in2.h, libbfd.h: Regenerate.
8357 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
8359         * po/bfd.pot: Regenerate.
8361         * Makefile.am: Remove extraneous mkdep comment.
8362         (MKDEP): Use gcc -MM rather than mkdep.
8363         (DEP): Quote when passing vars to sub-make.  Add warning
8364         message to end.
8365         (DEP1): Rewrite for "gcc -MM".
8366         (CLEANFILES): Add DEP2.
8367         Update dependencies.
8368         * Makefile.in: Regenerate.
8370 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
8372         * configure.in: Added corefile support for AIX 4.3.  In particular,
8373         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
8374         compiling rs6000-core.c.
8375         * configure: Regenerated.
8377 2000-04-03  H.J. Lu  <hjl@gnu.org>
8379         * cache.c (bfd_open_file): Unlink the output file only if
8380         it has non-zero size.
8382 2000-04-01  Ken Block USG  <block@zk3.dec.com>
8384         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
8385         relative relocations for non-loaded sections in shared objects.
8386         (elf64_alpha_check_relocs): Similarly.
8388 2000-04-03  Hans-Peter Nilsson  <hp@axis.com>
8390         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
8391         BFD_RELOC_16 to switch for extended relocs.
8392         (MY_swap_ext_reloc_in): New.
8393         (MY_swap_ext_reloc_out): New.
8394         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
8395         than NAME(aout,swap_ext_reloc_in) for extended relocs.
8396         (NAME(aout,squirt_out_relocs)): Similarly use
8397         MY_swap_ext_reloc_out.
8398         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
8400 2000-04-03  Kazu Hirata  <kazu@hxi.com>
8402         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
8403         the R_PCRWORD_B case.
8405 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
8407         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
8408         on some targets.
8409         * ihex.c : Ditto.
8411 2000-03-30  Donald Lindsay  <dlindsay@cygnus.com>
8413         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
8414         HOWTO references to bfd_elf_generic_reloc, that have
8415         partial_inplace == true, now use the new function.  The function
8416         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
8417         extends its fixes to the R_M32R_{16,24,32} relocs.
8418         The new logic in m32r_elf_lo16_reloc() has been removed, and
8419         it instead calls the new routine to obtain that functionality.
8421 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
8423         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
8424         elf32_avr_check_relocs, avr_final_link_relocate,
8425         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
8426         elf32_avr_object_p): Add prototypes.
8427         (elf32_avr_gc_mark_hook): Add default for h->root.type.
8428         (bfd_elf_avr_final_write_processing): Make static.
8430 2000-03-27  Denis Chertykov  <denisc@overta.ru>
8432         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
8433         * archures.c (bfd_architecture): Add AVR architecture.
8434         (bfd_archures_list): Add reference to AVR architecture info.
8435         * elf.c (prep_headers): Handle bfd_arch_avr.
8436         * reloc.c: Add various AVR relocation enums.
8437         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
8438         list.
8439         * Makefile.am: Add support for AVR elf.
8440         * configure.in: Likewise.
8441         * config.bfd: Likewise.
8442         * Makefile.in: Regenerate.
8443         * configure: This too.
8444         * bfd-in2.h: And this.
8445         * libbfd.h: And this.
8447 2000-03-24  H.J. Lu  <hjl@gnu.org>
8449         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
8450         (elf64_alpha_find_reloc_at_ofs): Likewise.
8452 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
8454         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
8455         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
8456         allowable range used to be -2**(n-1) to 2**n-1.
8457         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
8458         "boolean overflow" with "bfd_reloc_status_type flag".
8460 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
8462         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
8464 2000-03-14  Kazu Hirata  <kazu@hxi.com>
8466         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
8467         of shrinks properly, including the last reloc.
8469 2000-03-13  Kazu Hirata  <kazu@hxi.com>
8471         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
8472         check for R_MOVL2.
8474 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
8476         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
8477         a format mismatch rather than an "error" from bfd_read such as
8478         bfd_error_file_truncated.
8480 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
8482         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
8483         sign-extension and big-endian compensation for
8484         R_MIPS_64 even in ld -r.
8486 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
8488         * elf32-mips.c (mips_elf_next_relocation): Rename from
8489         mips_elf_next_lo16_relocation, and generalize to look
8490         for any relocation type.
8491         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
8492         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
8493         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
8494         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
8495         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
8496         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
8497         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
8498         (mips_rtype_to_howto): Likewise.
8499         (mips_elf_calculate_relocation): Handle new relocs.
8500         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
8501         are paired.  The addend for R_MIPS_GNU_REL16_S2
8502         is shifted right two bits.
8504 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
8506         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
8507         comment, and ensure it doesn't happen again.
8508         (bfd_install_relocation): Same here.
8509         (_bfd_relocate_contents): Don't bother assigning unused signmask
8510         shift result.  Fix typos in comments.
8511         Remove trailing whitespace throughout file.
8513 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
8515         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
8516         * bfd-in2.h: Rebuild.
8518 2000-03-06  Nick Clifton  <nickc@cygnus.com>
8520         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
8521         sym_ptr_ptr fields.
8522         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
8523         (SIZEOF_ILF_STRINGS): Redefine.
8524         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
8525         relative reloc, as opposed to a section relative reloc.
8526         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
8527         not C_LABEL.
8528         Add length of symbol's prefix to string pointer.
8529         Store a pointer to the symbol in the symbol pointer table.
8530         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
8531         Initialise the symbol pointer table.
8532         Store the hint in the Hint/Name table.
8533         Make the jump reloc be symbol realtive, not section relative.
8534         Create an import symbol for imported code.
8536 2000-03-06  Catherine Moore  <clm@cygnus.com>
8538         * elf.c (swap_out_syms):  Check for null type_ptr.
8540 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
8542         * aout-target.h (MY(write_object_contents)): Remove unused
8543         and unusable "#if CHOOSE_RELOC_SIZE".
8544         * pc532-mach.c (MY(write_object_contents)): Ditto.
8545         * netbsd.h (MY(write_object_contents)): Ditto.
8546         * hp300hpux.c (MY(write_object_contents)): Ditto.
8547         * freebsd.h (MY(write_object_contents)): Ditto.
8548         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
8550 2000-02-29  H.J. Lu  <hjl@gnu.org>
8552         * peicode.h (jtab): Make it static.
8554         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
8555         defined and COFF_IMAGE_WITH_PE is not defined.
8556         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
8557         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
8559 2000-03-01  Nick Clifton  <nickc@cygnus.com>
8561         * coff-arm.c (bfd_arm_process_before_allocation): Make
8562         'symndx' signed to prevent compile time warning.
8564         * coff-mcore.c: Remove unused prototype for pe_object_p.
8566         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
8567         functions that are not used when COFF_IMAGE_WITH_PE is
8568         defined.
8569         (struct sh_opcode): Change type of 'flags' field to unsigned
8570         long so that it can hold the USESAS flag.
8572         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
8574         * elf-m10300.c (mn10300_elf_relax_section): Initialise
8575         'sym_sec'.
8577         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
8578         parameters.
8579         Remove unusued variables and code.
8580         (elf_backend_add_symbol_hook): Fix prototype.
8582         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
8583         'srelgot'.
8585         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
8586         'oldinst'.
8588         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
8589         parameters.
8590         Remove unusued variables and code.
8591         (elf_backend_add_symbol_hook): Fix prototype.
8593         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
8595         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
8596         to unused function parameter.
8598         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
8599         parameters.
8600         Use EMPTY_HOWTO to initialise empty howto slots.
8601         Remove unused variables.
8603         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
8605 2000-03-01  H.J. Lu  <hjl@gnu.org>
8607         * aoutx.h (aout_link_input_section_std): Pass "true" to
8608         the undefined_symbol callback.
8609         (aout_link_input_section_ext): Likewise.
8610         * bout.c (get_value): Likewise.
8611         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
8612         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
8613         Likewise.
8614         (alpha_relocate_section): Likewise.
8615         * coff-arm.c (coff_arm_relocate_section): Likewise.
8616         * coff-i960.c (coff_i960_relocate_section): Likewise.
8617         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
8618         * coff-mips.c (mips_relocate_section): Likewise.
8619         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
8620         * coff-sh.c (sh_relocate_section): Likewise.
8621         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
8622         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
8623         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
8624         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8625         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8626         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8627         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8628         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8629         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8630         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8631         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8632         * elf32-v850.c (v850_elf_relocate_section): Likewise.
8633         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
8634         * elflink.h (elf_link_output_extsym): Likewise.
8635         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
8636         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
8637         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
8639         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
8640         undefined_symbol callback when building shared library with
8641         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
8642         "true".
8643         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
8644         * elf32-i386.c (elf_i386_relocate_section): Likewise.
8645         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8646         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
8647         (elf32_mips_get_relocated_section_content): Likewise.
8648         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8649         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8650         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
8651         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8653 2000-02-28  Nick Clifton  <nickc@cygnus.com>
8655         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
8656         * Makefile.in: Regenerate.
8658         * configure.in: Add support for mips and sh pe vectors.
8659         * configure: regenerate.
8661         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
8662         targets.
8664         * targets.c: Add mips and sh pe vectors.
8666         * libpei.h (coff_final_link_postscript): Only define if not
8667         already defined.
8669         * coffcode.h: Add support for WinCE magic numbers.
8671         * peigen.c (pe_print_reloc): Update comment and rearrange
8672         appending of newline character.
8674         * peicode.h: Add support for Image Library Format.
8675         (pe_ILF_vars): Structure containing data used by ILF code.
8676         (pe_ILF_make_a_section): New function.  Create a section based
8677         on ILF data.
8678         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
8679         ILF data.
8680         (pe_ILF_make_a_symbol): New function.  Create a symbol based
8681         on ILF data.
8682         (pe_ILF_save_relocs): New function.  Store the relocs created
8683         by pe_ILF_make_a_reloc in a section.
8684         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
8685         an ILF object.
8686         (pe_ILF_object_p): New function.  Return a bfd_target pointer
8687         for an ILF object.
8688         (pe_bfd_object_p): If an ILF object is detected call
8689         pe_ILF_object_p on it.
8691         * coff-arm.c: Add support for WinCE relocs which are different
8692         from normal ARM COFF relocs.
8693         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
8695         * coff-sh.c: Add support for sh-pe target.
8696         * pe-sh.c: New file.  Support code for sh-pe target.
8697         * pei-sh.c: New file.  Support code for sh-pe target.
8699         * pe-mips.c: New file.  Support code for mips-pe target.
8700         * pei-mips.c: New file.  Support code for mips-pe target.
8702 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
8704         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
8705         architecture if the object causing the bump is dynamic.
8706         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
8707         and also don't it for memory ordering.
8708         (sparc64_elf_write_relocs): Take src_rela out of the loop.
8710 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
8712         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
8713         calling bfd_get_section_size_before_reloc.
8714         (decode_line_info): Likewise.
8715         (_bfd_dwarf2_find_nearest_line): Likewise.
8717 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
8719         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8720         name of the libtool directory.
8721         * Makefile.in: Rebuild.
8723 2000-02-25  Rodney Brown (RodneyBrown@pmsc.com)
8725         * som.c (SOM_HOWTO): Define.
8726         (som_hppa_howto_table): Use it.
8728 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
8730         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8732         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8734 2000-02-24  Catherine Moore  <clm@cygnus.com>
8736         * som.c (som_misc_symbol_info):  Add field
8737         secondary_def.
8738         (som_bfd_derive_misc_symbol_info):  Initialize
8739         secondary_def.
8740         (som_build_and_write_symbol_table): Keep track
8741         of secondary_def field.
8742         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8743         if secondary_def field is set.
8744         (som_bfd_ar_write_symbol_stuff): Initialize
8745         secondary_def.
8747 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
8749         * dwarf2.c (read_address): Read 16-bits addresses.
8750         (parse_comp_unit): Accept addr_size == 2.
8752 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
8754         * bfd-in.h: Update copyright date.
8756 2000-02-23  Linas Vepstas <linas@linas.org>
8758         * cpu-i370.c: New file.
8759         * elf32-i370.c:  New file.
8760         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8761         (bfd_i370_arch): New.
8762         (bfd_archures_list): Add bfd_i370_arch.
8763         * elf.c (prep_headers): Add bfd_arch_i370.
8764         * Makefile.am: Add support for IBM 370 elf.
8765         * config.bfd: Likewise.
8766         * configure.in: Likewise.
8767         * libbfd.h (bfd_reloc_code_real_names): Likewise.
8768         * reloc.c (bfd_reloc_code_type): Likewise.
8769         * targets.c: Likewise.
8771         * Makefile.in: Regenerate.
8772         * configure: Regenerate.
8773         * bfd-in2.h: Regenerate.
8775 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
8777         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8778         invalid relocation types, and change them to R_386_NONE.
8780 2000-02-22  H.J. Lu  <hjl@gnu.org>
8782         * elflink.h (elf_link_add_object_symbols): If a version symbol is
8783         not defined, don't add a second ELF_VER_CHR.
8785         * elflink.h (elf_bfd_final_link): Call output_extsym for global
8786         symbols converted to local symbols even when stripping all
8787         symbols.
8788         (elf_link_output_extsym): Process global symbols converted to
8789         local symbols even if they are being stripped.
8791 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
8793         * archures.c (bfd_octets_per_byte): Return unsigned int.
8794         (bfd_arch_mach_octets_per_byte): Ditto.
8795         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8796         comparison warning.
8797         * section.c (bfd_get_section_size_before_reloc): Quell signed
8798         vs. unsigned comparison warning.
8799         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
8800         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8801         change.  What was I thinking?
8802         * bfd-in2.h: Regenerate.
8804         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8805         (elf_gc_sections): Same here.
8806         (elf_gc_common_finalize_got_offsets): And here.
8808 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
8810         ELF HPPA doesn't work at present; remove it until it does.
8811         * config.bfd: Comment out setting targ_defvec to
8812         bfd_elf32_hppa_vec.
8813         * Makefile.am: Rebuild dependencies.
8814         (BFD32_BACKENDS): Remove elf32-hppa.lo.
8815         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8816         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8817         * Makefile.in: Rebuild.
8818         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8820 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
8822         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8823         is no bfd_free().  Revert bfd_free part of previous change.
8825 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
8827         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8828         arrays.
8829         (coff_compute_section_file_positions): Use bfd_free to pair
8830         bfd_malloc.
8831         (coff_write_object_contents): Likewise.
8833         * coff-rs6000.c (xcoff_howto_table_16): New variable.
8834         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8836 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
8838         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8839         (xcoff_ar_file_hdr_big): New structure.
8840         (SIZEOF_AR_FILE_HDR_BIG): New macro.
8841         (xcoff_ar_hdr_big): New structure.
8842         (SIZEOF_AR_HDR_BIG): New macro.
8843         (xcoff_big_format_p): New macro.
8844         (xcoff_ardata_big): New macro.
8845         (arch_xhdr_big): New macro.
8846         (xcoff_slurp_armap): Handle large archives.
8847         (xcoff_archive_p): Detect large archives.
8848         (xcoff_read_ar_hdr): Handle large archives.
8849         (xcoff_openr_next_archived_file): Handle large archives.
8850         (xcoff_generic_stat_arch_elt): Handle large archives.
8851         (xcoff_write_armap_old): Rename from xcoff_write_armap.
8852         (xcoff_write_armap_big): New function.
8853         (xcoff_write_armap): New function, dispatch to _old or _big.
8854         (xcoff_write_archive_contents_old): Rename from
8855         xcoff_write_archive_contents.
8856         (xcoff_write_archive_contents_big): New function.
8857         (xcoff_write_archive_contents): New function, dispatch to _old or
8858         _big.
8860 2000-02-18  Richard Henderson  <rth@cygnus.com>
8862         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8863         and hide_symbol members.
8864         (elf_link_hash_copy_indirect): Remove.
8865         (elf_link_hash_hide_symbol): Remove.
8866         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8867         and elf_backend_hide_symbol.
8868         (_bfd_elf_link_hash_copy_indirect): Declare.
8869         (_bfd_elf_link_hash_hide_symbol): Declare.
8870         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8871         (_bfd_elf_link_hash_hide_symbol): Likewise.
8872         (_bfd_elf_link_hash_table_init): Don't init killed members.
8873         * elflink.h (elf_link_add_object_symbols): Use the bed function
8874         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8875         (elf_link_assign_sym_version): Likewise.
8876         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8877         (elf_backend_hide_symbol): Likewise.
8878         (elfNN_bed): Update for new members.
8880 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
8882         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8883         STACK_END_ADDR): Define for new core file format.
8884         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8885         for handling the vagaries of the various core file structures used
8886         by AIX over the years.
8887         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8888         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8889         core_dumpx structure.
8891 2000-02-17  J"orn Rennecke <amylaar@cygnus.co.uk>
8893         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8894         (bfd_mach_sh3_dsp): Likewise.
8895         (bfd_mach_sh4): Reinstate.
8896         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8897         * bfd-in2.h: Regenerate.
8898         * coff-sh.c (struct sh_opcode): flags is no longer short.
8899         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8900         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8901         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8902         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8903         (sh_opcodes): No longer const.
8904         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8905         (sh_insn_uses_reg): Check for USESAS and USESR8.
8906         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8907         (_bfd_sh_align_load_span): Return early for SH4.
8908         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8909         Take into account that field b of a parallel processing insn
8910         could be mistaken for a separate insn.
8911         * cpu-sh.c (arch_info_struct): New array elements for
8912         sh2, sh-dsp and sh3-dsp.
8913         Reinstate element for sh4.
8914         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8915         (SH4_NEXT): Reinstate.
8916         (SH3_NEXT, SH3E_NEXT): Adjust.
8917         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8918         * elf32-sh.c (sh_elf_set_private_flags): New function.
8919         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8920         (sh_elf_merge_private_data): New function.
8921         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8922         (bfd_elf32_bfd_copy_private_bfd_data): Define.
8923         (bfd_elf32_bfd_merge_private_bfd_data): Change to
8924         sh_elf_merge_private_data.
8926 2000-02-13  Richard Henderson  <rth@cygnus.com>
8928         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8929         hide_symbol members.
8930         (elf_link_hash_copy_indirect): New.
8931         (elf_link_hash_hide_symbol): New.
8932         * elflink.h (elf_link_add_object_symbols): Break out copy from
8933         indirect new new symbol to elf.c.
8934         (elf_link_assign_sym_version): Break out privatization of
8935         non-exported symbol to elf.c.
8936         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8937         (_bfd_elf_link_hash_hide_symbol): New.
8938         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8940 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
8942         * section.c (_bfd_strip_section_from_output): Add info parameter.
8943         If it passed as non-NULL, use it to check whether any input BFD
8944         has an input section which uses this output section.  Change all
8945         callers.
8946         * bfd-in2.h: Rebuild.
8948         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8949         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8950         1999-11-29.
8951         * bfd-in2.h: Rebuild.
8953 2000-02-10  Timothy Wall  <twall@cygnus.com>
8955         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8956         allow final modifications of swapped-in symbol.
8957         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8958         * coffcode.h (coff_write_relocs): Use macro
8959         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8960         symbol index should be set to -1.
8962 2000-02-10  Toshiyasu Morita (toshi.morita@sega.com)
8964         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8965         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8966         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8967         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8968         sh_insns_uses_or_sets_freg): New functions.
8969         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8970         * (sh_insns_conflict): Use new functions and new macros to
8971         detect conflicts when two instructions both set same integer registers,
8972         both set same fp register, and both set special register.
8974 2000-02-09  Timothy Wall  <twall@cygnus.com>
8976         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8977         swapping in sections, so that the swapping routines have access to
8978         the arch/mach info.
8980 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8982         * coff-go32.c: Update comment. Update copyright.
8984 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
8986         * syms.c (bfd_decode_symclass)
8987         Two new class characters were added - 'V' and 'v'.  The
8988         meaning of 'W' is now restricted to just weak non-object
8989         symbols.  This allows differentiation between, for example,
8990         weak functions vs weak objects.  nm for example now dumps:
8991         'W' = weak global
8992         'w' = weak unresolved
8993         'V' = weak global object
8994         'v' = weak unresolved object
8996         (bfd_is_undefined_symclass): New function.  Return true if the
8997         given symbol class represents and undefined/unresolved symbol.
8999         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
9000         unresolved symbols.
9002         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
9004         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
9005         STT_ARM_16BIT flag set, but it is not attached to a data object
9006         return STT_ARM_16BIT so that it will be treated as code by the
9007         disassembler.
9009 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
9011         * coff-i386.c (i3coff_object_p): Remove prototype.
9012         Update copyright.
9014         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
9015         to name.  Update copyright.
9017         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
9018         assignment to avoid warning.  Update copyright.
9020 2000-01-24  Robert Lipe  (robertl@sco.com)
9022         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
9023         instead of using GNU C extension.
9025 2000-01-21  Nick Clifton  <nickc@cygnus.com>
9027         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
9028         amount from a bfd_in_memory structure.
9029         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
9030         structure.
9032 2000-01-14  Nick Clifton  <nickc@cygnus.com>
9034         * linker.c (default_indirect_link_order): oops - fix incorrectly
9035         applied patch from Tim Wall.
9037 2000-01-13  Timothy Wall (twall@tiac.net>
9039         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
9040         = scnhsz, filhsz, relsz, aoutsz, etc)
9042         * coffswap.h: Ditto.
9044 2000-01-13  Nick Clifton  <nickc@cygnus.com>
9046         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
9047         interwork thumb to arm stub.
9049 2000-01-13  Timothy Wall (twall@tiac.net>
9051         * archures.c (bfd_octets_per_byte): New function: Return
9052         target byte size.
9053         (bfd_arch_mach_octets_per_byte): New function: Return target
9054         byte size.
9056         * section.c: Distinguish between octets and bytes for usage of
9057         _cooked_size,  _raw_size, and output_offset.  Clarify
9058         description of bfd_set_section_contents.
9060         * bfd-in2.h: Regenerate.
9062         * coffgen.c: Indicate that the offset parameter is in bytes, not
9063         octets.
9065         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
9066         where appropriate to get the octet offset when calling
9067         bfd_set_section_contents.
9068         (bfd_coff_reloc_link_order): Ditto.
9070         * linker.c (bfd_generic_reloc_link_order): Ditto.
9071         (_bfd_default_link_order): Ditto.
9073         * reloc.c (bfd_perform_relocation):  Distinguish between octets
9074         and bytes.  Use octets when indexing into octet data; use bytes
9075         when calculating target addresses.
9076         (bfd_install_relocation): Ditto.
9078         * srec.c (srec_write_section): Ditto.
9080 2000-01-13  Nick Clifton  <nickc@cygnus.com>
9082         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
9083         3 to 2.  This allows 4 byte sized sections, which is necessary for
9084         dlltool to build functioning DLLs.
9086 2000-01-10  Philip Blundell  <pb@futuretv.com>
9088         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
9089         (arm*-*-conix*): New target.
9091 2000-01-10  Egor Duda  <deo@logos-m.ru>
9093         * config.bfd: Include elf32_i386 vector to target list for cygwin
9094         and mingw.
9096         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
9097         * configure.in: Test for structure win32_pstatus_t in
9098         <sys/procfs.h>
9099         * configure: Regenerate.
9101         * elf.c (elfcore_grok_win32pstatus): New function: process
9102         win32_pstatus_t notes in elf core file.
9103         (elfcore_grok_note): Detect win32_pstatus notes.
9105 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9107         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
9108         visibility.
9109         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
9110         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
9112 For older changes see ChangeLog-9899
9114 Local Variables:
9115 mode: change-log
9116 left-margin: 8
9117 fill-column: 74
9118 version-control: never
9119 End: